/* SARDENTOTO Togel Result UI V2.5 — only Togel elements are targeted.
   Narrow KUDAHOKI-inspired proportions, no changes to scraper/database/other categories. */

/* Common result elements */
.tg-result-card,
.tg-result-card *{box-sizing:border-box}
.tg-result-card{color:#f6f3ed;min-width:0;position:relative;display:flex;flex-direction:column;overflow:hidden;text-align:center;box-shadow:0 4px 12px #0009}
.tg-result-card__top{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;flex:0 0 auto}
.tg-result-card__top h3{margin:0;color:#e7b94d;font-family:Arial,Helvetica,sans-serif;font-weight:500;overflow-wrap:anywhere;line-height:1.18}
.tg-result-card__top span{color:#f5f3f0;line-height:1.22}
.tg-result-card__body{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.tg-result-card__date{color:#f0e8e4;font-weight:400;line-height:1.35}
.tg-result-card__numbers{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0}
.tg-result-card__prize{display:flex;justify-content:center;align-items:center;min-width:0}
.tg-result-card .tg-digit{flex:0 0 auto;display:inline-grid;place-items:center;color:#19150d;border-radius:50%;font-family:Arial,Helvetica,sans-serif;font-weight:800;line-height:1;background:linear-gradient(155deg,#ffe88c 0%,#fbd040 22%,#f4b516 73%,#d99400 100%);box-shadow:inset 0 1px 1px #fff4a3aa,0 2px 3px #0007}
.tg-result-card__waiting{display:flex;align-items:center;justify-content:center;color:#d8c9ad;text-align:center;line-height:1.35}
.tg-result-card__schedule{color:#f5eee8;flex:0 0 auto;white-space:nowrap;font-family:Arial,Helvetica,sans-serif}
.tg-result-card__action{flex:0 0 auto}
.tg-result-card__button{display:inline-flex;align-items:center;justify-content:center;gap:5px;border:1px solid #ffe58d;border-radius:26px;background:linear-gradient(180deg,#ffe477 0%,#ffce39 24%,#d99a08 67%,#eab737 100%);color:#382a15;font-family:Arial,Helvetica,sans-serif;font-weight:800;text-shadow:0 1px 1px #fff8a057;text-decoration:none;box-shadow:inset 0 1px 1px #fff8b8,0 3px 6px #0007;white-space:nowrap}
.tg-result-card__button:focus-visible{outline:2px solid #fff;outline-offset:2px}
.tg-result-card__button:active:not(:disabled){filter:brightness(.94)}
.tg-result-card__button:disabled{cursor:not-allowed;opacity:1}
.tg-result-card__play{width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:8px solid #5b421f;display:inline-block}

/* Homepage result carousel: 2 cards partially visible, not one oversized card. */
.tg-home-section .game-section__heading{justify-content:flex-start}
.tg-home-section .card-carousel{position:relative}
.tg-home-section .tg-home-rail{display:flex!important;gap:15px!important;align-items:flex-start!important;scroll-snap-type:x mandatory;scroll-padding-left:27px;padding:7px 28px 12px!important}
.tg-home-section .tg-home-rail>.tg-result-card{flex:0 0 clamp(184px,55vw,230px)!important;width:clamp(184px,55vw,230px)!important;max-width:none!important;scroll-snap-align:start;scroll-margin-inline:0}
.tg-home-section .card-carousel__arrow{top:49%;font-size:23px;color:#ffe43a}
.tg-home-section .card-carousel__arrow.is-left{left:2px}
.tg-home-section .card-carousel__arrow.is-right{right:2px}
.tg-result-card--home{min-height:0!important;border:1px solid #68552f;border-radius:18px;background:#282025;box-shadow:0 3px 10px #000b}
.tg-result-card--home .tg-result-card__top{min-height:43px;padding:7px 7px 5px;background:#221e20}
.tg-result-card--home .tg-result-card__top h3{font-size:clamp(12px,3.2vw,15px);max-width:100%}
.tg-result-card--home .tg-result-card__top span{font-size:clamp(10px,2.6vw,12px)}
.tg-result-card--home .tg-result-card__body{display:grid;grid-template-columns:minmax(62px,.62fr) minmax(0,1fr);gap:1px;align-items:center;justify-content:center;min-height:60px;padding:8px 5px;background:#322522}
.tg-result-card--home .tg-result-card__date{margin:0!important;padding:0 2px;font-size:clamp(10px,2.6vw,12px);overflow-wrap:break-word;line-height:1.5;text-align:center}
.tg-result-card--home .tg-result-card__numbers{gap:5px;min-height:0!important;padding:0!important}
.tg-result-card--home .tg-result-card__prize{gap:4px;width:100%}
.tg-result-card--home .tg-digit{width:clamp(22px,6.3vw,28px);height:clamp(22px,6.3vw,28px);font-size:clamp(12px,3.7vw,16px)}
.tg-result-card--home .tg-result-card__waiting{padding:10px 2px;min-height:48px;font-size:10px}
.tg-result-card--home .tg-result-card__schedule{margin-top:0;border-top:1px solid #604630;background:#302324;padding:7px 2px;font-size:clamp(8.5px,2.3vw,11px)}

/* V4.0: PLAY NOW appears under the schedule on home result cards for authenticated members only. */
.tg-result-card--home .tg-result-card__action{
  display:flex;align-items:center;justify-content:center;
  padding:9px 8px 11px;border-top:1px solid #49352b;
  background:linear-gradient(180deg,#302324 0%,#261c1f 100%);
}
.tg-result-card--home .tg-result-card__button{
  width:min(100%,172px);min-height:35px;padding:7px 12px;
  font-size:12px;line-height:1.15;letter-spacing:.2px;
  transition:filter .16s ease,transform .16s ease,box-shadow .16s ease;
}
.tg-result-card--home .tg-result-card__button:hover{
  filter:brightness(1.06);transform:translateY(-1px);
  box-shadow:inset 0 1px 1px #fff8b8,0 4px 10px #0008;
}
@media(prefers-reduced-motion:reduce){
  .tg-result-card--home .tg-result-card__button{transition:none}
}

/* Market listing page — KUDAHOKI-like image hierarchy + two narrow columns. */
/* Original user-supplied artwork: show entire banner without HTML overlay or crop. */
.tg-hero{width:100%;position:relative;display:block;padding:0!important;margin:0;min-height:0!important;height:auto!important;line-height:0;overflow:hidden;background:#06102f}
.tg-hero::before,.tg-hero::after{content:none!important;display:none!important}
.tg-hero__banner{display:block;width:100%;height:auto;aspect-ratio:1536/427;object-fit:contain;border:0}
.tg-page{padding:12px 6px 22px}
.tg-page__heading{text-align:center;margin:0 0 4px}
.tg-page__heading h1{font:800 27px/1.15 Georgia,'Times New Roman',serif;color:#d8a737;margin:3px 0 5px;text-shadow:0 1px 3px #000}
.tg-page__heading-line{height:2px;width:79px;margin:0 auto 11px;background:#d7a632}
.tg-page__heading p{margin:0;font-size:10px;color:#f8deb1}
.tg-page__heading small{display:block;font-size:9px;color:#c4af89;margin:3px 0 0}
.tg-wap-toggle{display:inline-flex;justify-content:center;align-items:center;gap:9px;min-width:171px;min-height:35px;margin:0 auto 3px;padding:7px 20px;color:#241d11;background:linear-gradient(180deg,#ffe88d,#f4ba35);border:1px solid #ffe69a;border-radius:11px;box-shadow:0 2px 6px #000b;font-size:13px;font-weight:500;cursor:pointer}
.tg-wap-toggle img{width:25px;height:25px;object-fit:contain;flex-shrink:0}
.tg-filters{display:flex;flex-direction:column;align-items:stretch;gap:0;margin:11px 6px 13px}
.tg-filters__search{box-sizing:border-box;display:flex;align-items:center;gap:6px;align-self:flex-end;width:min(47%,210px);min-height:30px;border:1px solid #e4b632;border-radius:24px;color:#f8c63e;padding:4px 8px;background:#0b090bd6}
.tg-filters__search input{width:100%;min-width:0;border:0;background:transparent;outline:0;color:#fff;font-size:12px}
.tg-filters__search input::placeholder{color:#b6a58b}
.tg-page__grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:stretch}
.tg-page__grid .tg-result-card[hidden]{display:none}
.tg-page .tg-result-card--market{border:2px solid #e4b12e;border-radius:10px;min-height:0;background:radial-gradient(ellipse at 51% 101%,#0d4b58aa 0%,transparent 44%),radial-gradient(ellipse at 60% 68%,#72501355,transparent 55%),linear-gradient(180deg,#080707 0%,#100b09 78%,#070f14 100%);box-shadow:inset 0 0 0 1px #9a782b75,0 3px 8px #000a;padding:5px 2px 7px}
.tg-page .tg-result-card--market:before,.tg-page .tg-result-card--market:after{content:'';position:absolute;pointer-events:none;z-index:0;bottom:0;width:48%;height:73px;border-bottom:1px solid #d5a32866;opacity:.5}
.tg-page .tg-result-card--market:before{left:0;clip-path:polygon(0 0,100% 100%,0 100%);background:linear-gradient(34deg,#17485099,transparent)}
.tg-page .tg-result-card--market:after{right:0;clip-path:polygon(100% 0,100% 100%,0 100%);background:linear-gradient(150deg,transparent,#15596f66)}
.tg-page .tg-result-card--market>*{position:relative;z-index:1}
.tg-page .tg-result-card__top{background:transparent;min-height:40px;padding:1px 3px 5px;gap:4px}
.tg-page .tg-result-card__top h3{font-size:clamp(11px,3.08vw,14px);font-weight:500}
.tg-page .tg-result-card__top span{font-size:clamp(10px,2.74vw,13px)}
.tg-page .tg-result-card__body{padding:6px 1px 4px;min-height:64px;background:transparent}
.tg-page .tg-result-card__date{font-size:clamp(10px,2.8vw,13px);margin:1px 0 8px;text-align:center}
.tg-page .tg-result-card__numbers{gap:6px;min-height:0;padding:0 0 5px}
.tg-page .tg-result-card__prize{gap:clamp(3px,1.1vw,6px)}
.tg-page .tg-result-card__prize .tg-digit{width:clamp(20px,5.8vw,29px);height:clamp(20px,5.8vw,29px);font-size:clamp(12px,3.75vw,18px)}
.tg-page .tg-result-card__waiting{font-size:11px;padding:12px 4px;min-height:40px}
.tg-page .tg-result-card__schedule{margin-top:auto;border:0;background:transparent;padding:5px 0 7px;font-size:clamp(9px,2.42vw,11px);white-space:normal}
.tg-page .tg-result-card__action{border:0;background:transparent;padding:0 2px 5px;flex:0 0 auto}
.tg-page .tg-result-card__button{min-height:30px;padding:5px clamp(10px,2.8vw,17px);font-size:clamp(10px,2.6vw,12px);max-width:98%}
.tg-empty-sync{margin:10px;padding:15px 12px;border:1px solid #a8822b;border-radius:12px;text-align:center;background:#131113ee;color:#edd7a0;font-size:12px}
.tg-page__disclaimer{font-size:10px;color:#ccb892;line-height:1.55;margin:13px 5px 0}
.tg-page.is-wap-view .tg-page__grid{grid-template-columns:1fr;gap:8px}
.tg-page.is-wap-view .tg-result-card--market{display:grid;grid-template-columns:38% 62%;grid-template-rows:auto auto auto;padding:5px;border-radius:8px}
.tg-page.is-wap-view .tg-result-card__top{grid-column:1;grid-row:1/span 2;min-height:0;align-self:center}
.tg-page.is-wap-view .tg-result-card__body{grid-column:2;grid-row:1/span 2;padding:1px}
.tg-page.is-wap-view .tg-result-card__date{margin:2px 0 4px}
.tg-page.is-wap-view .tg-result-card__numbers{gap:2px;padding:0}
.tg-page.is-wap-view .tg-result-card__prize{gap:4px}
.tg-page.is-wap-view .tg-result-card__schedule{grid-column:1;grid-row:3;align-self:center;padding:5px 0}
.tg-page.is-wap-view .tg-result-card--view-only .tg-result-card__schedule{grid-column:1 / -1;grid-row:3}
.tg-page.is-wap-view .tg-result-card__action{grid-column:2;grid-row:3;align-self:center;padding:2px 0}
@media(max-width:345px){.tg-home-section .tg-home-rail>.tg-result-card{flex-basis:184px!important;width:184px!important}.tg-result-card--home .tg-digit{width:22px;height:22px;font-size:12px}.tg-page{padding-inline:4px}.tg-page__grid{gap:6px}.tg-page .tg-result-card--market{padding-inline:1px}.tg-page .tg-result-card__prize .tg-digit{width:20px;height:20px;font-size:12px}.tg-page .tg-result-card__top h3{font-size:11px}.tg-filters__search{width:58%}}
@media(min-width:521px){.tg-home-section .tg-home-rail>.tg-result-card{flex-basis:230px!important;width:230px!important}}

.tg-page__sync{text-align:center;margin:14px 0 0;color:#c4b090;font-size:10px}
