
:root{
  --bg:#020504; --panel:#07110b; --panel2:#0a1510; --line:#21462c;
  --text:#f5f7f5; --muted:#a9b2ac; --green:#71e455; --red:#f1655f;
  --amber:#e6b44a; --slate:#a8b0ab;
}
*{box-sizing:border-box}
html{background:#000}
body{margin:0;background:#000;color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif}
button{font:inherit}
svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.app-shell{max-width:430px;margin:0 auto;min-height:100vh;background:radial-gradient(circle at 40% 3%,#0a2a15 0,#041008 31%,#010302 72%);padding:10px 10px 32px}
.hero{display:grid;grid-template-columns:78px minmax(0,1fr) 74px;gap:8px;align-items:center;margin-bottom:9px}
.hero-image{width:78px;height:84px;border-radius:18px;object-fit:cover}
.hero-copy h1{font-size:21px;line-height:1;margin:0 0 4px;font-weight:850;letter-spacing:.1px}
.variant{font-size:15px;color:var(--green);font-style:italic;margin-bottom:5px}
.last-verified{display:flex;align-items:center;gap:5px;color:#b3bcb6;font-size:11px}
.last-verified svg{width:14px;height:14px;color:var(--green)}
.hero-tools{display:grid;grid-template-columns:1fr;gap:5px}
.tool-button{min-height:48px;padding:5px 3px;border-radius:11px;border:1px solid #35483d;background:#09110d;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:9.5px}
.tool-button svg{width:23px;height:23px;margin-bottom:2px}

.panel{border:1px solid var(--line);background:linear-gradient(180deg,#07150d,#030806);border-radius:18px;padding:11px;margin:9px 0}
.section-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:9px}
.section-icon{width:38px;height:38px;display:flex;align-items:center;justify-content:center;color:var(--green)}
.section-icon svg{width:30px;height:30px}
.section-copy h2,.section-copy h3{margin:0;line-height:1.05}
.section-copy h2{font-size:20px}
.section-copy h3{font-size:18px}
.section-copy p{margin:3px 0 0;color:var(--muted);font-size:13px}

.refresh-title{white-space:nowrap;font-size:18.5px!important;letter-spacing:-.25px!important}
.refresh-rail{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;padding:11px 12px 0 0}
.refresh-rail::-webkit-scrollbar{display:none}
.refresh-card{flex:0 0 88%;min-width:88%;scroll-snap-align:center;border:1px solid #314339;border-radius:18px;padding:18px;background:linear-gradient(180deg,#121a17,#09100d)}
.cue-row{display:flex;align-items:center;gap:14px}
.cue-icon{width:58px;height:58px;display:flex;align-items:center;justify-content:center}
.cue-icon svg{width:58px;height:58px}
.refresh-card h3{font-size:22px;margin:0;text-transform:uppercase;line-height:1.02}
.cue-divider{width:58%;height:1px;background:currentColor;opacity:.65;margin:9px 0 11px}
.refresh-card ul{list-style:none;padding:0;margin:0}
.refresh-card li{font-size:18px;line-height:1.3;margin:9px 0;color:#eef2ef;padding-left:28px;position:relative}
.refresh-card li:before{content:"✓";position:absolute;left:0;color:var(--green);font-weight:900}
.refresh-card.green{color:#79e35b}.refresh-card.blue{color:#68a9ff}.refresh-card.purple{color:#bb75ff}.refresh-card.orange{color:#f2a33f}.refresh-card.teal{color:#54d8d3}
.pager{display:flex;justify-content:center;align-items:center;gap:8px;padding:1px 0 2px;margin:0;min-height:10px}
.pager button{appearance:none;border:0;padding:0;width:7px;height:7px;border-radius:50%;background:#657169}
.pager button.active{background:#f3f5f3}

.status-pill{display:inline-flex;align-items:center;gap:5px;min-height:26px;padding:5px 9px;border-radius:10px;font-size:11px;font-weight:800;line-height:1;white-space:nowrap}
.status-pill svg{width:16px;height:16px}
.status-pill.verified{color:#dfffe0;background:#0c1710;border:1px solid #36503d}.status-pill.verified svg{color:var(--green)}
.status-pill.review{color:#f5d99a;background:#1d170c;border:1px solid #5d4a22}.status-pill.review svg{color:var(--amber)}.status-pill.review .fill{fill:var(--amber);stroke:none}
.status-pill.draft{color:#d0d5d2;background:#121513;border:1px solid #414844}.status-pill.draft svg{color:var(--slate)}

.layout-image-button{display:block;width:100%;padding:0;margin:10px 0 0;border:0;background:transparent;border-radius:15px;overflow:hidden}
.layout-image-button img{display:block;width:100%;height:auto}
.zoom-label{text-align:center;color:#c2cac4;font-size:14px;margin-top:6px}

.before-panel{background:linear-gradient(180deg,#4a1111,#220808);border-color:#99413d}
.before-head .section-icon{color:#ff7068;width:44px;height:44px}
.before-head .section-icon svg{width:38px;height:38px;stroke-width:2.1}
.before-list{list-style:none;padding:0;margin:5px 0 0}
.before-list li{font-size:15px;line-height:1.28;padding:10px 4px;border-top:1px solid rgba(255,255,255,.08)}
.before-list li:before{content:"• ";color:#ff675f;font-weight:900}

.accordion{border:1px solid #173722;border-radius:15px;background:#06100a;margin:9px 0;overflow:hidden}
.accordion summary{list-style:none;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:12px;padding:13px 12px;cursor:pointer}
.accordion summary::-webkit-details-marker{display:none}
.accordion-left{display:flex;align-items:center;gap:9px;min-width:0}
.accordion-left .section-icon{width:34px;height:34px;flex:0 0 34px}
.accordion-left .section-icon svg{width:27px;height:27px}
.disclosure{display:inline-block;margin-left:6px;color:#9aa59e;font-size:13px;transition:transform .16s ease;transform-origin:center}
.accordion[open] .disclosure{transform:rotate(180deg)}
.accordion-body{padding:0 16px 16px;color:#e9ecea}
.accordion-body li{font-size:16px;line-height:1.42;margin:9px 0}
.info-group{padding:11px 0;border-top:1px solid #16241a}.info-group:first-child{border-top:0}
.info-group strong{font-size:17px}.info-group p{font-size:15px;color:#c9d0cb;line-height:1.4;margin:5px 0}
table{width:100%;border-collapse:collapse}td{padding:10px;border-bottom:1px solid #1d2b20;font-size:16px}td:last-child{text-align:right;font-weight:800;color:#b0ff9f}

.modal[hidden]{display:none}
.modal{position:fixed;inset:0;z-index:1000;background:rgba(0,0,0,.94);display:flex;align-items:center;justify-content:center;padding:14px}
.modal-card{position:relative;width:100%;max-width:760px;max-height:92vh;overflow:auto;-webkit-overflow-scrolling:touch;background:#020604;border:1px solid #36503d;border-radius:18px;padding:42px 10px 12px;touch-action:pan-x pan-y pinch-zoom}
.modal-card img{display:block;width:150%;max-width:none;height:auto}
.modal-close{position:absolute;top:8px;right:10px;width:32px;height:32px;border-radius:50%;border:1px solid #506156;background:#172019;color:#fff;font-size:24px;line-height:1}
.modal-hint{text-align:center;color:#b7c0ba;font-size:12px;padding-top:8px}
.modal-open{overflow:hidden}

#error,.error{color:#ffb1ad;background:#2b0b0b;border:1px solid #6e2c2a;padding:12px;border-radius:12px;margin:10px 0}
footer{text-align:center;color:#69736d;font-size:11px;padding:14px 0 0}

/* v0.3 — compact per-game search */
.game-search-shell{margin:5px 0 7px}
.game-search-toggle{
  margin-left:auto;display:flex;align-items:center;gap:6px;
  border:1px solid #2c4335;background:#07100b;color:#cbd4ce;
  border-radius:12px;padding:7px 10px;font-size:12px;
}
.search-glyph{color:var(--green);font-size:18px;line-height:1}
.game-search-panel{
  margin-top:7px;border:1px solid #294333;border-radius:15px;
  background:#06100a;padding:9px;
}
.game-search-input-row{display:grid;grid-template-columns:1fr 34px;gap:7px}
.game-search-input-row input{
  width:100%;border:1px solid #385142;border-radius:11px;
  background:#0a1510;color:#fff;padding:10px 11px;font-size:15px;outline:none;
}
.game-search-input-row input:focus{border-color:#62c850}
.game-search-input-row button{
  border:1px solid #385142;border-radius:10px;background:#101913;color:#fff;font-size:21px;
}
.game-search-results{display:grid;gap:6px;margin-top:8px}
.search-result{
  display:block;width:100%;text-align:left;border:1px solid #203629;border-radius:11px;
  background:#09130d;color:#fff;padding:9px 10px;
}
.search-result-title{display:block;color:#9df18a;font-size:12px;font-weight:800;margin-bottom:3px}
.search-result-text{display:block;color:#d6ddd8;font-size:13px;line-height:1.3}
.search-empty{color:#9ca8a0;font-size:13px;padding:8px}

/* Game Facts */
.game-facts-grid{padding-top:2px}
.fact-row{display:grid;grid-template-columns:42% 1fr;gap:12px;padding:10px 0;border-top:1px solid #17251b}
.fact-row:first-child{border-top:0}
.fact-row span{color:#aeb8b1;font-size:13px}
.fact-row strong{font-size:14px;line-height:1.25}

/* Give pager breathing room without shrinking dots */
.pager{padding:7px 0 2px!important}

/* Six-position layout overlay */
.layout-stage{position:relative;overflow:hidden;background:#072012}
.layout-stage>img{display:block;width:100%;height:auto}
.seat-mask{
  position:absolute;left:0;right:0;bottom:0;height:39%;
  background:linear-gradient(180deg,rgba(3,28,16,.15) 0%,#082516 32%,#071f13 100%);
  border-top:1px solid rgba(214,149,50,.16);
}
.seat-slot{
  position:absolute;bottom:5%;width:12.5%;height:19%;
  border:2px solid rgba(223,228,225,.82);border-radius:9px;
  background:rgba(2,13,8,.14);
}
.seat-1{left:9%;transform:rotate(16deg)}
.seat-2{left:23%;bottom:2%;transform:rotate(9deg)}
.seat-3{left:38%;bottom:0;transform:rotate(3deg)}
.seat-4{right:38%;bottom:0;transform:rotate(-3deg)}
.seat-5{right:23%;bottom:2%;transform:rotate(-9deg)}
.seat-6{right:9%;transform:rotate(-16deg)}
.layout-modal-visual{width:150%;max-width:none}
.layout-modal-visual .layout-stage{width:100%}

/* v0.4 — Hero utility cleanup */
.game-search-toggle{display:none!important}
.game-search-shell{margin:5px 0 7px}
.game-search-panel{margin-top:4px}
.hero-tools-v04{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.hero-tools-v04 .tool-button{min-width:0}
.hero-search-icon{
  width:24px;height:24px;display:flex;align-items:center;justify-content:center;
  font-size:27px;line-height:1;color:#fff;margin-bottom:2px;
}

/* v0.5 — approved hero utility treatment */
.hero-tools-v04{
  display:grid;
  grid-template-columns:72px 72px;
  gap:12px;
  justify-content:end;
  align-content:start;
}
.hero-tools-v04 .tool-button{
  width:72px;
  min-width:72px;
  height:72px;
  padding:8px 5px 7px;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  overflow:hidden;
}
.hero-tools-v04 .tool-button span:last-child{
  display:block;
  width:100%;
  text-align:center;
  font-size:12px;
  line-height:1.05;
  white-space:nowrap;
}
.hero-tools-v04 .tool-svg{width:25px;height:25px;margin:0}
.hero-tools-v04 .hero-search-icon{
  width:25px;height:25px;font-size:27px;line-height:25px;margin:0;
}

/* v0.5 — the layout image itself now contains the verified six positions.
   No artificial seat overlays are used. */
.layout-stage{position:relative;overflow:hidden;background:#072012}
.layout-stage>img{display:block;width:100%;height:auto}
.layout-stage .seat-mask,
.layout-stage .seat-slot{display:none!important}
.layout-modal-visual{width:150%;max-width:none}
.layout-modal-visual .layout-stage{width:100%}

/* v0.6 — cleaner hero hierarchy */
.hero{
  grid-template-columns:78px minmax(0,1fr) 48px!important;
  gap:9px!important;
}
.hero-search-only{
  display:flex;
  align-items:flex-start;
  justify-content:flex-end;
  align-self:start;
}
.hero-search-button{
  width:44px;
  height:44px;
  border-radius:13px;
  border:1px solid #385044;
  background:linear-gradient(180deg,#0c1711,#07100b);
  color:#f7f9f7;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
.hero-search-button:active{transform:scale(.97)}
.hero-search-button .hero-search-icon{
  width:auto;
  height:auto;
  margin:0;
  font-size:29px;
  line-height:1;
  color:#e9f0eb;
}

/* Search expands directly below the hero */
.game-search-shell{margin:3px 0 7px!important}
.game-search-panel{margin-top:4px!important}

/* v0.6 — Layout is a compact reference preview, not half the screen */
.layout-image-button{
  margin-top:9px!important;
  max-height:28vh;
  min-height:150px;
  overflow:hidden!important;
  background:#031008!important;
  border-radius:15px!important;
}
.layout-stage{
  width:100%;
  height:min(28vh,220px);
  min-height:150px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#031008;
}
.layout-stage>img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center 50%!important;
}

/* Full zoom stays uncropped */
.layout-modal-visual .layout-stage{
  height:auto!important;
  min-height:0!important;
  display:block!important;
}
.layout-modal-visual .layout-stage>img{
  width:100%!important;
  height:auto!important;
  object-fit:contain!important;
}

/* Official Manual accordion */
.official-manual-body p{
  color:#cbd3ce;
  font-size:14px;
  line-height:1.4;
  margin:2px 0 12px;
}
.official-manual-open{
  width:100%;
  min-height:48px;
  border:1px solid #36503d;
  border-radius:12px;
  background:#0b1710;
  color:#f4f7f5;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  font-weight:700;
}
.official-manual-open svg{
  width:23px;
  height:23px;
}

/* In-app PDF viewer */
.manual-modal[hidden]{display:none}
.manual-modal{
  position:fixed;
  inset:0;
  z-index:1200;
  background:rgba(0,0,0,.95);
  padding:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom));
  display:flex;
  align-items:stretch;
  justify-content:center;
}
.manual-modal-card{
  width:min(100%,760px);
  height:100%;
  background:#050806;
  border:1px solid #36503d;
  border-radius:16px;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto 1fr;
}
.manual-modal-toolbar{
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px 8px 14px;
  border-bottom:1px solid #29362d;
  background:#09100c;
}
.manual-modal-toolbar>div{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.manual-modal-toolbar strong{
  font-size:15px;
  line-height:1.1;
}
.manual-modal-toolbar span{
  color:#98a49c;
  font-size:11px;
  margin-top:3px;
}
.manual-modal-close{
  width:38px;
  height:38px;
  flex:0 0 38px;
  border-radius:50%;
  border:1px solid #4b5a50;
  background:#161e19;
  color:#fff;
  font-size:27px;
  line-height:1;
}
#manualFrame{
  width:100%;
  height:100%;
  border:0;
  background:#fff;
}

/* v0.7 — ONLY approved refinements */

/* Search: retain existing TGKS button language, enlarge glyph,
   reverse handle direction, and center control against hero. */
.hero-search-only{
  align-self:center!important;
  align-items:center!important;
}
.hero-search-button{
  width:44px!important;
  height:44px!important;
}
.hero-search-button .hero-search-icon{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:34px!important;
  height:34px!important;
  font-size:34px!important;
  line-height:34px!important;
  margin:0!important;
  transform:scaleX(-1);
  transform-origin:center;
}

/* Layout: shorter rectangular preview, ~25% less vertical real estate
   than v0.6. Full zoom remains uncropped below. */
.layout-image-button{
  max-height:21vh!important;
  min-height:112px!important;
}
.layout-stage{
  height:min(21vh,165px)!important;
  min-height:112px!important;
}
.layout-stage>img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center 50%!important;
}

/* Preserve complete image in zoom modal. */
.layout-modal-visual .layout-stage{
  height:auto!important;
  min-height:0!important;
}
.layout-modal-visual .layout-stage>img{
  width:100%!important;
  height:auto!important;
  object-fit:contain!important;
  transform:none!important;
}

/* v0.8 — Search icon: same orientation, ~18% larger */
.hero-search-button .hero-search-icon{
  width:40px!important;
  height:40px!important;
  font-size:40px!important;
  line-height:40px!important;
  transform:scaleX(-1)!important;
}

/* v0.8 — Refresh carousel: one dominant card, subtle NEXT-card peek only */
.refresh-rail{
  gap:10px!important;
  padding:11px 10px 0 0!important;
  scroll-padding-left:0!important;
}
.refresh-card{
  flex:0 0 94%!important;
  min-width:94%!important;
  scroll-snap-align:start!important;
  padding:16px 17px 15px!important;
}
.refresh-card li{
  font-size:17px!important;
  line-height:1.22!important;
  margin:7px 0!important;
}
.cue-row{gap:12px!important}
.cue-icon{
  width:53px!important;
  height:53px!important;
}
.cue-icon svg{
  width:53px!important;
  height:53px!important;
}
.refresh-card h3{
  font-size:21px!important;
}
.cue-divider{
  margin:7px 0 9px!important;
}

/* Keep a little breathing room before the page dots */
.pager{
  padding:8px 0 2px!important;
}

/* v0.8 — Before You Deal: collapsible, still unmistakably red */
.before-collapsible{
  margin:9px 0;
  border:1px solid #99413d;
  border-radius:18px;
  overflow:hidden;
  background:linear-gradient(180deg,#4a1111,#220808);
}
.before-collapsible summary{
  list-style:none;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:13px 12px;
  cursor:pointer;
}
.before-collapsible summary::-webkit-details-marker{display:none}
.before-left{
  min-width:0;
  display:flex;
  align-items:center;
  gap:9px;
}
.before-left .section-icon{
  color:#ff7068;
  width:44px;
  height:44px;
  flex:0 0 44px;
}
.before-left .section-icon svg{
  width:38px;
  height:38px;
  stroke-width:2.1;
}
.before-collapsible h2{
  margin:0;
  font-size:20px;
  line-height:1.05;
}
.before-collapsible p{
  margin:3px 0 0;
  color:#d8b8b6;
  font-size:13px;
}
.before-disclosure{
  display:inline-block;
  margin-left:7px;
  color:#eab5b1;
  font-size:13px;
  transition:transform .16s ease;
  transform-origin:center;
}
.before-collapsible[open] .before-disclosure{
  transform:rotate(180deg);
}
.before-body{
  padding:0 12px 8px;
  border-top:1px solid rgba(255,255,255,.06);
}
.before-collapsible .before-list{
  margin:0;
}

/* v0.9 — iPhone Safari search keyboard fix.
   16px+ input text prevents Safari's automatic focus zoom. */
.game-search-input-row input{
  font-size:16px!important;
  line-height:1.25!important;
}

/* v0.9 — page-based Official Manual reader */
.manual-modal-card{
  grid-template-rows:auto auto 1fr!important;
}
.manual-reader-controls{
  min-height:44px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 9px;
  border-bottom:1px solid #29362d;
  background:#070c09;
}
.manual-reader-controls button{
  width:36px;
  height:32px;
  border-radius:9px;
  border:1px solid #435147;
  background:#111914;
  color:#fff;
  font-size:21px;
  line-height:1;
}
.manual-reader-controls button:disabled{
  opacity:.3;
}
#manualPageLabel{
  min-width:56px;
  text-align:center;
  color:#d7ddd9;
  font-size:12px;
  font-variant-numeric:tabular-nums;
}
.manual-control-spacer{
  flex:1;
}
.manual-page-viewport{
  width:100%;
  height:100%;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  background:#2b2b2b;
  padding:8px;
  touch-action:pan-x pan-y pinch-zoom;
}
.manual-page-image{
  display:block;
  width:100%;
  max-width:none;
  height:auto;
  margin:0 auto;
  background:#fff;
  box-shadow:0 2px 16px rgba(0,0,0,.5);
}

/* Old iframe viewer is retired */
#manualFrame{display:none!important}

/* v1.0 gradient lock candidate — only approved hero refinements */

/* Hero stays open to the page: no box, no border, no rounded container.
   Subtle vertical tonal shift only: darker at top, gently greener/lighter below. */
.hero{
  position:relative!important;
  isolation:isolate;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.hero::before{
  content:"";
  position:absolute;
  z-index:-1;
  top:-10px;
  left:-10px;
  right:-10px;
  bottom:-5px;
  background:linear-gradient(
    180deg,
    rgba(3,7,4,.92) 0%,
    rgba(5,11,7,.72) 38%,
    rgba(8,18,12,.46) 72%,
    rgba(10,23,15,.18) 100%
  );
  pointer-events:none;
}

/* Move Search subtly inward from the outer edge while keeping current alignment/size. */
.hero-search-only{
  padding-right:7px!important;
}

/* Free Bet v0.2 — dual official manuals */
.manual-choice-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}
.manual-choice{
  justify-content:flex-start!important;
  padding:9px 12px!important;
  text-align:left;
}
.manual-choice>span{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.manual-choice strong{
  font-size:14px;
  line-height:1.1;
}
.manual-choice small{
  color:#9eaaa2;
  font-size:11px;
  font-weight:500;
}
