/* Gotcha Gauntlet. Everything is prefixed gg- and laid out against its own root box. */
.gg { --gg-ink: #dfe9ff; --gg-mut: #8aa3c4; --gg-acc: #55d6ff; --gg-warm: #ffd166; --gg-pink: #ff6b81; --gg-line: #1c2b4a; --gg-panel: #0b1328;
  color: var(--gg-ink); position: relative; }
.gg-stage { position: relative; width: 100%; height: min(78vh, 640px); min-height: 380px; overflow: hidden; display: flex; flex-direction: column;
  background: #050914; outline: none; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.gg.is-playing .gg-stage { touch-action: none; }
.gg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar */
.gg-hud { flex: 0 0 auto; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 4px 0 12px; z-index: 3;
  background: rgba(11, 19, 40, .94); border-bottom: 1px solid var(--gg-line); font-size: 14px; }
.gg-lvl { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; letter-spacing: .01em; }
.gg-lvl small { color: var(--gg-mut); font-weight: 600; margin-right: 6px; }
.gg-stat { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; color: var(--gg-ink); }
.gg-stat svg { width: 17px; height: 17px; fill: var(--gg-pink); }
.gg-stat .gg-holes { fill: #0b1328; }
.gg-time b { font-weight: 700; color: var(--gg-warm); min-width: 3.2em; text-align: right; }
.gg.no-timer .gg-time { display: none; }
.gg-hbtns { flex: 0 0 auto; display: inline-flex; gap: 2px; }
.gg-ibtn { width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--gg-ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.gg-ibtn:hover { background: rgba(85, 214, 255, .12); }
.gg-ibtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gg-ibtn .gg-fill { fill: currentColor; stroke: none; }
.gg-ibtn[aria-pressed="true"] .off, .gg-ibtn[aria-pressed="false"] .on { display: none; }
.gg button:focus-visible, .gg-stage:focus-visible { outline: 2px solid var(--gg-acc); outline-offset: 2px; }
.gg-stage:focus-visible { outline-offset: -2px; }

/* play area */
.gg-view { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.gg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gg-banner { position: absolute; left: 50%; top: 10px; transform: translate(-50%, -10px); padding: 8px 18px; border-radius: 999px; pointer-events: none;
  background: rgba(11, 19, 40, .86); border: 1px solid rgba(85, 214, 255, .45); font-weight: 800; font-size: 16px; white-space: nowrap; opacity: 0;
  transition: opacity .18s, transform .18s; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.gg-banner.show { opacity: 1; transform: translate(-50%, 0); }
.gg-banner.win { border-color: rgba(255, 209, 102, .7); color: var(--gg-warm); }
.gg-quip { position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 8px); max-width: min(92%, 460px); padding: 8px 14px; border-radius: 12px;
  background: rgba(11, 19, 40, .9); border: 1px solid var(--gg-line); color: var(--gg-ink); font-size: 14px; line-height: 1.35; text-align: center;
  pointer-events: none; opacity: 0; transition: opacity .2s, transform .2s; }
.gg-quip.show { opacity: 1; transform: translate(-50%, 0); }
.gg-quip b { color: var(--gg-pink); }
.gg-skip { position: absolute; right: 10px; top: 10px; z-index: 2; }

/* touch controls: a strip under the play area on an upright phone, corner buttons over it when sideways */
.gg-pad { flex: 0 0 auto; height: 124px; display: none; align-items: center; justify-content: space-between; padding: 0 16px; gap: 12px;
  background: rgba(8, 14, 30, .96); border-top: 1px solid var(--gg-line); touch-action: none; }
.gg.gg-touch .gg-pad { display: flex; }
.gg.gg-menu .gg-pad, .gg.gg-menu .gg-hud { visibility: hidden; }
.gg-dpad { display: flex; gap: 12px; }
.gg-pbtn { width: 76px; height: 76px; border-radius: 20px; border: 1px solid rgba(85, 214, 255, .35); background: rgba(85, 214, 255, .1); color: var(--gg-ink);
  display: grid; place-items: center; padding: 0; touch-action: none; cursor: pointer; }
.gg-pbtn svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.gg-pbtn.on { background: rgba(85, 214, 255, .32); border-color: var(--gg-acc); }
.gg-jump { width: 92px; height: 92px; border-radius: 50%; border-color: rgba(255, 209, 102, .5); background: rgba(255, 209, 102, .14); align-content: center; gap: 0; }
.gg-jump span { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-top: -4px; }
.gg-jump.on { background: rgba(255, 209, 102, .4); border-color: var(--gg-warm); }

/* menus and dialogs */
.gg-panel { position: absolute; inset: 0; z-index: 6; display: none; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  background: radial-gradient(120% 90% at 50% 0%, rgba(20, 34, 70, .82), rgba(4, 6, 15, .9)); padding: 14px 12px 18px; -webkit-overflow-scrolling: touch; }
.gg-panel.show { display: flex; flex-direction: column; }
.gg-panel.see { background: rgba(4, 6, 15, .55); }
.gg-card { max-width: 560px; width: 100%; margin: auto; display: flex; flex-direction: column; gap: 12px; flex: 0 0 auto; }
.gg-card.top { margin-top: 0; }
.gg-card.result { margin: auto auto 0; }                 /* results sit low, leaving the top free for the site's reward card */
.gg-tleft, .gg-tright { display: flex; flex-direction: column; gap: 12px; }
.gg-head { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.gg-head h2 { flex: 1 1 auto; margin: 0; font-size: 20px; line-height: 1.2; min-width: 0; }
.gg-x { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--gg-line); background: rgba(11, 19, 40, .8); color: var(--gg-ink); font-size: 22px; line-height: 1; cursor: pointer; }
.gg-logo { margin: 0; text-align: center; font-size: clamp(30px, 7vw, 46px); line-height: 1.05; font-weight: 900; letter-spacing: -.01em;
  background: linear-gradient(180deg, #fff1c2, #ffd166 55%, #ff9f5a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 10px rgba(255, 160, 80, .25)); }
.gg-tag { margin: -4px 0 0; text-align: center; color: var(--gg-mut); font-size: 14px; }
.gg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1px solid rgba(85, 214, 255, .45);
  background: rgba(85, 214, 255, .12); color: var(--gg-ink); font: inherit; font-weight: 750; font-size: 16px; cursor: pointer; text-align: center; }
.gg-btn:hover { background: rgba(85, 214, 255, .22); }
.gg-btn.go { min-height: 58px; font-size: 19px; border-color: rgba(255, 209, 102, .8); background: linear-gradient(180deg, rgba(255, 209, 102, .3), rgba(255, 159, 90, .2)); color: #fff6dc; }
.gg-btn.go:hover { background: linear-gradient(180deg, rgba(255, 209, 102, .42), rgba(255, 159, 90, .3)); }
.gg-btn.gg-small { min-height: 40px; font-size: 14px; padding: 0 14px; background: rgba(11, 19, 40, .85); }
.gg-btn small { display: block; font-weight: 600; font-size: 12px; color: var(--gg-mut); }
.gg-btn .gg-two { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.gg-btn:disabled { opacity: .45; cursor: default; }
.gg-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.gg-row > .gg-btn { flex: 1 1 140px; }
.gg-note { margin: 0; text-align: center; color: var(--gg-mut); font-size: 13.5px; line-height: 1.45; }
.gg-note b { color: var(--gg-ink); }
.gg-daily-line { min-height: 1em; }
.gg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.gg-stats div { background: rgba(11, 19, 40, .82); border: 1px solid var(--gg-line); border-radius: 12px; padding: 8px 6px; text-align: center; }
.gg-stats b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.gg-stats span { font-size: 12px; color: var(--gg-mut); }
.gg-stats .new { border-color: rgba(255, 209, 102, .7); }
.gg-stats .new span::after { content: ' · new best'; color: var(--gg-warm); }
.gg-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.gg-set { position: relative; text-align: left; min-height: 76px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--gg-line); background: rgba(11, 19, 40, .86);
  color: var(--gg-ink); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.gg-set:hover { border-color: rgba(85, 214, 255, .55); }
.gg-set b { font-size: 15px; } .gg-set small { color: var(--gg-mut); font-size: 12px; }
.gg-set i { position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; }
.gg-set.locked { opacity: .55; }
.gg-set .gg-bar { height: 4px; border-radius: 4px; background: #16223f; overflow: hidden; margin-top: 4px; }
.gg-set .gg-bar span { display: block; height: 100%; background: var(--gg-acc); }
.gg-levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.gg-lv { min-height: 56px; border-radius: 12px; border: 1px solid var(--gg-line); background: rgba(11, 19, 40, .86); color: var(--gg-ink); font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 2px; }
.gg-lv b { font-size: 17px; } .gg-lv small { font-size: 11px; color: var(--gg-mut); white-space: nowrap; }
.gg-lv.done { border-color: rgba(85, 214, 255, .55); } .gg-lv.done b { color: var(--gg-acc); }
.gg-lv.tro::after { content: '★'; position: absolute; font-size: 10px; color: var(--gg-warm); transform: translate(18px, -18px); }
.gg-lv:disabled { opacity: .4; cursor: default; }
.gg-opts { display: flex; flex-direction: column; gap: 6px; }
.gg-opt { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--gg-line); background: rgba(11, 19, 40, .86);
  color: var(--gg-ink); font: inherit; text-align: left; cursor: pointer; width: 100%; }
.gg-opt span { flex: 1 1 auto; } .gg-opt small { display: block; color: var(--gg-mut); font-size: 12px; }
.gg-opt i { flex: 0 0 auto; width: 42px; height: 24px; border-radius: 12px; background: #23314f; position: relative; transition: background .15s; }
.gg-opt i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #c9d6ee; transition: transform .15s; }
.gg-opt[aria-pressed="true"] i { background: var(--gg-acc); }
.gg-opt[aria-pressed="true"] i::after { transform: translateX(18px); background: #fff; }
.gg-hats { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.gg-hat { min-height: 96px; border-radius: 12px; border: 1px solid var(--gg-line); background: rgba(11, 19, 40, .86); color: var(--gg-ink); font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; font-size: 12px; text-align: center; }
.gg-hat canvas { width: 56px; height: 56px; }
.gg-hat[aria-pressed="true"] { border-color: var(--gg-warm); box-shadow: 0 0 0 1px var(--gg-warm) inset; }
.gg-hat:disabled { cursor: default; } .gg-hat:disabled canvas { opacity: .35; }
.gg-hat small { color: var(--gg-mut); font-size: 11px; line-height: 1.25; }
.gg-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.gg-steps li { display: flex; gap: 10px; align-items: flex-start; background: rgba(11, 19, 40, .82); border: 1px solid var(--gg-line); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.45; }
.gg-steps li > i { flex: 0 0 auto; font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 209, 102, .18); color: var(--gg-warm); font-weight: 800; font-size: 13px; }
.gg kbd { display: inline-block; min-width: 1.6em; padding: 1px 5px; border-radius: 5px; border: 1px solid var(--gg-line); background: #0e1a33; font: inherit; font-size: .85em; text-align: center; }
.gg-help { margin: 8px 2px 0; color: var(--gg-mut); font-size: 13px; line-height: 1.5; }
.gg.gg-touch .gg-help { display: none; }
.gg-hero { display: block; margin: 0 auto; width: 120px; height: 110px; }

@media (max-width: 600px) {
  .gg-stage { height: min(76vh, 600px); }
  .gg-hud { gap: 8px; padding-left: 10px; font-size: 13px; }
  .gg-levels { gap: 6px; }
  .gg-sets { grid-template-columns: 1fr 1fr; }
}
@media (max-height: 640px) and (max-width: 600px) { .gg-pad { height: 112px; } .gg-pbtn { width: 68px; height: 68px; } .gg-jump { width: 84px; height: 84px; } }
/* a phone held sideways: the play area fills the stage, the bar and the buttons float over it */
@media (max-height: 520px) and (orientation: landscape) {
  .gg-stage { height: 84vh; min-height: 250px; }
  .gg-hud { position: absolute; left: 0; right: 0; top: 0; height: 38px; background: linear-gradient(180deg, rgba(5, 9, 20, .78), rgba(5, 9, 20, 0)); border: 0; }
  .gg-pad { position: absolute; left: 0; right: 0; bottom: 0; height: auto; padding: 0 14px 10px; background: none; border: 0; pointer-events: none; align-items: flex-end; z-index: 3; }
  .gg-pad .gg-pbtn { pointer-events: auto; width: 66px; height: 66px; background: rgba(85, 214, 255, .12); }
  .gg-pad .gg-jump { width: 80px; height: 80px; background: rgba(255, 209, 102, .14); }
  .gg-quip { bottom: auto; top: 44px; }
  .gg-card { gap: 9px; }
  .gg-logo { font-size: 30px; }
  .gg-title { display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: 16px; max-width: 780px; }
  .gg-panel { padding: 10px 14px 12px; }
}
.stage.is-immersive .stage-body > .gg { min-height: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.stage.is-immersive .gg-stage { flex: 1 1 auto; height: auto; max-height: none; min-height: 0; }
.stage.is-immersive .gg-help { display: none; }
@media (prefers-reduced-motion: reduce) { .gg-banner, .gg-quip, .gg-opt i, .gg-opt i::after { transition: none; } }
/* on the see-through title the buttons get a solid underlay, so nothing in the level shows through their labels */
.gg-panel.see .gg-btn { background-color: #0b1530; }
.gg-panel.see .gg-btn.go { background: linear-gradient(180deg, rgba(255, 209, 102, .3), rgba(255, 159, 90, .2)), #241a10; }
/* result panels: the body may scroll when the site's coin card leaves little room; the buttons below it never do */
.gg-card.result { max-height: 100%; min-height: 0; }
.gg-rbody { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.gg-rfoot { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; }
