/* Showtime AV game, dariodarski.com
   Loaded after styles.css. The page around the game uses the site's light style;
   the venue and the equipment sit on a dark "stage" built from the site navy.
   Layout: the venue on top and the equipment below, so signal flows down the
   screen; on wide screens the venue moves beside the equipment and stays in view. */

.st-page {
  /* Site palette */
  --navy: #010024;
  --text-2: #334155;
  --text-3: #64748b;
  --line: #e2e8f0;
  --surface: #f8fafc;
  --surface-2: #eef2f6;
  --blue: #4982a6;
  --blue-light: #7fb0cf;
  --peach: #e97e54;
  --coral: #d9695f;
  --teal: #307a74;
  --teal-light: #4fb3a8;
  --amber: #f2bd4f;

  /* Darker shade of the site blue, used where the page needs a strong colour (instead of near-black navy) */
  --blue-dark: #2b5f80;

  /* Stage: a steel blue from the site blue family (lighter than the old near-black navy) */
  --stage: #27445c;
  --stage-panel: #31526b;
  --stage-panel-hi: #3a5f7a;
  --stage-line: #4b718c;
  --stage-ink: #f2f6fa;
  --stage-muted: #c9d7e2;
  --stage-faint: #a7bccb;
  --metal: #c9ccdc;

  /* Cables and sockets */
  --c-xlr: var(--blue-light);
  --c-jack: var(--peach);

  --marker: "Permanent Marker", "Marker Felt", "Comic Sans MS", cursive;
  --fh: 112px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

[hidden] { display: none !important; }

/* On this page the site menu scrolls away, so the venue can stay pinned on phones */
.st-page .main-nav { position: relative; }

/* styles.css sets overflow-x: hidden on html and body, which stops position: sticky
   from working. clip prevents sideways scrolling in the same way without that side effect. */
html:has(body.st-page),
body.st-page { overflow-x: clip; }

/* Same column as the rest of the site (.text-container): 1000px including 20px side padding,
   so the content lines up with the logo and menu in the bar above. */
.st-app {
  max-width: 1000px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  padding-block: 18px calc(156px + var(--safe-b));
  color: var(--navy);
}

/* Undo site-wide element styles inside the game */
.st-app button,
.st-overlay button {
  font: inherit;
  color: inherit;
  padding: 0;
  border-radius: 0;
  background: none;
  transform: none;
  transition: none;
}
.st-app p,
.st-overlay p { margin: 0; line-height: 1.5; color: inherit; }
.st-app :focus-visible,
.st-overlay :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.st-backbar { margin-bottom: 8px; }

/* ------------------------------------------------------------ header */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-block: 0 14px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.onair { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 3px rgba(217, 105, 95, .2); }
.brand-name { font-weight: 800; font-size: 1.35rem; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); }
.proto { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; background: #fff; }
.levels { display: flex; flex-wrap: wrap; gap: 6px; }
.st-app .chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 13px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--navy);
  font-size: .84rem; font-weight: 600; cursor: pointer;
}
.chip .n { font-weight: 700; color: var(--text-3); }
.st-app .chip[aria-current="step"] { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.chip[aria-current="step"] .n { color: var(--blue-light); }
.st-app .chip:disabled { cursor: default; color: var(--text-3); background: var(--surface); }
.chip .chip-soon { font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.st-app .icon-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--navy);
  font-size: .84rem; font-weight: 600; cursor: pointer;
}
.icon-btn svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------- brief */
.brief { display: grid; gap: 6px; padding-block: 2px 16px; }
.st-app .eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.brief h1 { margin: 0; font-size: clamp(1.8rem, 4.5vw, 2.4rem); font-weight: 700; line-height: 1.1; color: var(--navy); text-wrap: balance; }
.brief p { color: var(--text-2); }
.brief-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.st-app .ghost {
  min-height: 36px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--navy); font-size: .88rem; font-weight: 600; cursor: pointer;
}
.st-app .ghost:hover { background: var(--surface); }
/* Game controls above the Play button: Hint, Start over and (once a level is complete) Next level */
.ctl-row { display: flex; gap: 8px; max-width: 560px; margin: 0 auto 10px; }
.st-app .ctl {
  flex: 1 1 0; min-width: 0; min-height: 40px; padding: 6px 6px; border-radius: 9px; cursor: pointer;
  background: #fff; color: var(--navy); border: 1px solid var(--line);
  font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 6px rgba(1, 0, 36, .15);
}
.st-app .ctl:hover { background: var(--surface); }
.st-app .ctl:focus-visible, .st-app .show-btn:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }
.st-app .ctl-next { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; font-weight: 700; }
.st-app .ctl-next:hover { background: #224d69; }
.st-app .hint-box { margin-top: 8px; padding: 9px 13px; border: 1px solid var(--amber); border-radius: 8px; background: #fff8e8; color: var(--navy); font-size: .92rem; }
.hint-box b { color: #9a6a00; }

/* ------------------------------------------------------------- stage */
.stage {
  background: var(--stage);
  color: var(--stage-ink);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 24px -8px rgba(1, 0, 36, .35);
}
.stage-grid { display: grid; gap: 14px; }
.venue-col {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6;
  background: var(--stage); margin: -6px -6px 0; padding: 6px 6px 8px;
  border-radius: 12px 12px 0 0;
}
.venue-frame { border: 1px solid var(--stage-line); border-radius: 12px; overflow: hidden; background: #0a0a22; }
#venue { display: block; width: 100%; height: auto; max-height: 30vh; }
/* Instructions and feedback together, on a light panel so they are easy to read */
.guide-box {
  margin-top: 10px; padding: 10px 14px; border-radius: 10px;
  background: #f4f7fb; color: var(--navy); box-shadow: 0 2px 8px rgba(1, 0, 36, .18);
}
.st-app .status {
  min-height: 2.7em; display: flex; gap: 8px; align-items: flex-start;
  font-size: .95rem; font-weight: 500; line-height: 1.35; color: var(--navy);
}
.status::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: .35em; background: #94a3b8; }
.status.info::before { background: var(--blue); }
.status.warn::before { background: #d97706; }
.status.ok::before { background: var(--teal); }

.showbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 18px calc(12px + var(--safe-b));
  background: linear-gradient(to top, rgba(255, 255, 255, .96) 65%, rgba(255, 255, 255, 0));
}
.st-app .show-btn {
  width: 100%; max-width: 560px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; border-radius: 12px; cursor: pointer;
  background: var(--coral); color: #fff; font-weight: 800; font-size: 1.2rem; letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(217, 105, 95, .35);
}
.show-btn svg { width: 18px; height: 18px; }
.st-app .show-btn.live { background: var(--teal); color: #fff; box-shadow: 0 6px 18px rgba(48, 122, 116, .35); }
.show-btn.live .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); animation: blink 1.2s ease-in-out infinite; }

@media (max-width: 859px) {
  /* Phones: keep the pinned room picture and the bottom controls compact so the equipment stays visible */
  #venue { max-height: 26vh; }
  .st-wired .howto, .guide-box:has(.hint-box:not([hidden])) .howto { display: none; }
  .st-app .ctl { min-height: 36px; font-size: .84rem; }
  .ctl-row { margin-bottom: 8px; }
  .st-app .show-btn { min-height: 48px; }
  /* Give the equipment the full phone width */
  .stage { margin-inline: calc(-1 * max(20px, env(safe-area-inset-left, 0px))); border-radius: 0; padding: 10px 12px 14px; }
}

@media (max-width: 859px) and (max-height: 720px) {
  #venue { max-height: 22vh; }
}

@media (min-width: 860px) {
  .st-app { padding-block-end: 40px; }
  .stage { padding: 20px; }
  .stage-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: start; gap: 28px; }
  /* The venue column fills the stage height: the picture and status stay pinned at the top while you scroll,
     and the Showtime button sits in the bottom-left corner (it follows the bottom of the screen until it gets there) */
  .venue-col { position: static; align-self: stretch; display: flex; flex-direction: column; margin: 0; padding: 0; border-radius: 0; }
  .venue-pin { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px); z-index: 6; background: var(--stage); }
  #venue { max-height: none; }
  .showbar { position: sticky; bottom: 12px; z-index: 6; margin-top: auto; padding: 14px 0 0; background: none; }
  .st-app .show-btn { max-width: none; }
}

/* ------------------------------------------------------------- board */
.st-app .howto { margin-top: 8px; padding-top: 8px; border-top: 1px solid #dde4ec; font-size: .85rem; line-height: 1.4; color: var(--text-2); }
.howto .fine { display: none; }
@media (pointer: fine) { .howto .fine { display: inline; } }
.board { position: relative; display: grid; gap: 52px; padding-block: 6px 6px; }
.row { display: flex; justify-content: center; gap: 12px; }
.row > .card { flex: 0 1 calc(50% - 6px); min-width: 0; }
.row-desk > .card { flex: 1 1 100%; }
.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; overflow: visible; }

.card {
  position: relative; z-index: 1; min-width: 0;
  background: linear-gradient(180deg, var(--stage-panel-hi), var(--stage-panel) 38%);
  border: 1px solid var(--stage-line); border-radius: 10px; padding: 6px 10px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 8px 20px rgba(0, 0, 0, .25);
}
.card::before, .card::after {
  content: ""; position: absolute; top: 7px; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8f94b8, #3a3e66); opacity: .7;
}
.card::before { left: 7px; }
.card::after { right: 7px; }
.card-body { display: flex; align-items: center; gap: 10px; min-width: 0; padding-inline: 4px; }
.card-icon { flex: none; width: 34px; height: 34px; color: var(--stage-muted); }
.card-icon .cone { transform-box: fill-box; transform-origin: center; transition: transform 60ms linear; }
.card-text { display: grid; min-width: 0; }
.card-name { font-weight: 700; font-size: .95rem; letter-spacing: .05em; text-transform: uppercase; line-height: 1.15; color: var(--stage-ink); }
.card-role { font-size: .78rem; color: var(--stage-muted); line-height: 1.25; }

/* Ports (sockets) */
.port-row { display: flex; justify-content: center; gap: 4px; }
.st-app .port {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 52px; min-height: 48px; padding: 3px 2px; border-radius: 8px;
  cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
  color: var(--stage-ink); transition: opacity .15s;
}
.port:hover .socket { filter: brightness(1.25); }
.plabel { font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--stage-ink); line-height: 1.1; text-align: center; }
.ptag { font-size: .6rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--stage-faint); line-height: 1; }
.socket {
  position: relative; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: #07071a;
  box-shadow: inset 0 0 0 3px var(--ring), inset 0 0 0 5px #07071a, inset 0 0 0 6px #3a3e66;
  --ring: var(--c-xlr);
}
.socket::after { content: ""; position: absolute; inset: 0; border-radius: 50%; }
.s-xlr::after {
  background:
    radial-gradient(circle at 36% 42%, var(--metal) 0 1.6px, transparent 2.2px),
    radial-gradient(circle at 64% 42%, var(--metal) 0 1.6px, transparent 2.2px),
    radial-gradient(circle at 50% 66%, var(--metal) 0 1.6px, transparent 2.2px);
}
.s-jack { --ring: var(--c-jack); }
.s-jack::after { background: radial-gradient(circle at 50% 50%, #000 0 3px, var(--metal) 3.4px 4.6px, transparent 5px); }
.s-combo { --ring: transparent; }
.s-combo::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--c-xlr) 0 50%, var(--c-jack) 0 100%);
  -webkit-mask: radial-gradient(circle, transparent 11.5px, #000 12px);
  mask: radial-gradient(circle, transparent 11.5px, #000 12px);
}
.s-combo::after {
  background:
    radial-gradient(circle at 50% 50%, #000 0 2.6px, var(--metal) 3px 3.8px, transparent 4.2px),
    radial-gradient(circle at 36% 34%, var(--metal) 0 1.3px, transparent 1.8px),
    radial-gradient(circle at 64% 34%, var(--metal) 0 1.3px, transparent 1.8px);
}
.port.selected .socket { outline: 3px solid var(--stage-ink); outline-offset: 3px; }
.port.can .socket { outline: 2px dashed var(--stage-ink); outline-offset: 4px; animation: can 1s ease-in-out infinite; }
.port.dim { opacity: .38; }

/* Lighting desk (no cables: faders and colour buttons only) */
.light-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.light-strip { padding-top: 6px; }
.light-strip .ch-num { font-size: .68rem; text-transform: uppercase; text-align: center; color: var(--stage-ink); }
.swatches { display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start; gap: 6px; max-width: 92px; min-height: 56px; padding: 2px 0 4px; }
.st-app .swatch {
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  background: var(--sw); border: 2px solid rgba(0, 0, 0, .35);
}
.st-app .swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--stage-panel), 0 0 0 4px var(--stage-ink); }
.st-app .swatch:focus-visible { outline: 2px solid var(--stage-ink); outline-offset: 4px; }

/* Sound desk */
.card-desk { align-items: stretch; padding-inline: 10px; }
.card-head { display: flex; align-items: baseline; justify-content: center; gap: 8px; flex-wrap: wrap; text-align: center; padding-inline: 14px; }
.desk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(104px, 1.25fr); gap: 6px; }
.strip {
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0;
  background: rgba(0, 0, 0, .2); border: 1px solid rgba(255, 255, 255, .04); border-radius: 8px; padding: 4px 2px 6px;
}
.ch-num { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: .74rem; letter-spacing: .08em; color: var(--stage-muted); }
.led { width: 7px; height: 7px; border-radius: 50%; background: #20223f; box-shadow: inset 0 0 0 1px #000; }
.led.on { background: var(--teal-light); box-shadow: 0 0 6px var(--teal-light); }
.tape {
  width: 92%; max-width: 74px; min-height: 22px; display: grid; place-items: center;
  background: #f1ece0; color: #1d1d1f; border-radius: 2px; transform: rotate(-1.5deg);
  font-family: var(--marker); font-size: .82rem; line-height: 1; padding: 3px 2px; overflow: hidden; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
.tape.empty { color: #b9b3a5; }
.fader { display: flex; gap: 2px; align-items: stretch; }
.fader-scale { position: relative; width: 20px; height: var(--fh); }
.fader-scale span { position: absolute; right: 0; transform: translateY(50%); font-size: .56rem; font-weight: 700; color: var(--stage-faint); font-variant-numeric: tabular-nums; line-height: 1; }
.fader-track { position: relative; width: 30px; height: var(--fh); }
.fader-track::before { content: ""; position: absolute; left: 50%; top: 6px; bottom: 6px; width: 4px; transform: translateX(-50%); background: #04041a; border-radius: 2px; box-shadow: 0 0 0 1px #2c2f55; }
.fader-track input {
  position: absolute; left: 50%; top: 50%; width: var(--fh); height: 30px; margin: 0; padding: 0;
  transform: translate(-50%, -50%) rotate(-90deg);
  -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; touch-action: none;
}
.fader-track input::-webkit-slider-runnable-track { height: 30px; background: transparent; }
.fader-track input::-moz-range-track { height: 30px; background: transparent; }
.fader-track input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 15px; height: 28px; margin-top: 1px; border-radius: 3px;
  border: 1px solid #0b0b1c;
  background: linear-gradient(90deg, #b9bdd0, #e9ebf3 40%, #262a44 46% 54%, #e9ebf3 60%, #9a9fba);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .5);
}
.fader-track input::-moz-range-thumb {
  width: 15px; height: 28px; border-radius: 3px; border: 1px solid #0b0b1c;
  background: linear-gradient(90deg, #b9bdd0, #e9ebf3 40%, #262a44 46% 54%, #e9ebf3 60%, #9a9fba);
}
.fader-track input:focus-visible { outline: none; }
.fader-track input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--blue-light); }
.fader-track input:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--blue-light); }
.db { font-size: .66rem; font-weight: 700; color: var(--stage-muted); font-variant-numeric: tabular-nums; }
.strip-main { justify-content: space-between; }
.main-label { font-weight: 700; font-size: .74rem; letter-spacing: .1em; color: var(--stage-muted); }
.meters { display: flex; gap: 6px; align-items: flex-end; }
.meter { display: flex; flex-direction: column-reverse; gap: 2px; }
.seg { width: 12px; height: 6px; border-radius: 1px; background: #1b1d3a; }
.seg.on { background: var(--teal-light); }
.seg.on.seg-amber { background: var(--amber); }
.seg.on.seg-red { background: var(--coral); }
.meter-lr { display: flex; gap: 6px; font-size: .6rem; font-weight: 700; color: var(--stage-faint); justify-content: center; }
.meter-lr span { width: 12px; text-align: center; }

/* Compact layout, so the whole game area fits in one laptop window:
   equipment cards on one line, shorter faders and tighter spacing between devices */
.board { gap: 26px; grid-template-columns: minmax(0, 1fr); }
.card-unit { flex-direction: row; justify-content: center; gap: 12px; padding: 6px 14px; }
.card-unit .card-body { padding-inline: 0; }
.card-unit .card-icon { width: 28px; height: 28px; }
@media (max-width: 559px) {
  /* Narrow phones: not enough width for cards on one line */
  .card-unit { flex-direction: column; gap: 4px; padding: 6px 8px 8px; }
}
.card-desk { --fh: 80px; }
.card-lights { --fh: 64px; }
.strip { gap: 3px; }
@media (min-width: 860px) {
  .stage { padding: 16px; }
  .stage-grid { gap: 22px; }
  .swatches { flex-wrap: nowrap; max-width: none; min-height: 0; gap: 4px; padding-bottom: 2px; }
  .st-app .swatch { width: 18px; height: 18px; }
}

/* ------------------------------------------------------------- venue */
.screen-label { font-family: Roboto, Arial, sans-serif; font-weight: 700; font-size: 9px; letter-spacing: .2em; fill: #3c4070; text-anchor: middle; }
.screen-sub { font-family: Roboto, Arial, sans-serif; font-size: 6.5px; fill: #34375e; text-anchor: middle; }
.light { transition: opacity .2s linear; }
.light stop { transition: stop-color .3s; }
.person .head, .person .body { fill: #1f2142; transition: fill .8s; }
.live .person .head, .live .person .body { fill: #2b2e55; }
.person .bob { transform-box: fill-box; transform-origin: 50% 100%; }
.groove .person .bob { animation: bob var(--beat, .6s) ease-in-out infinite; }
.groove .person:nth-child(3n) .bob { animation-delay: -.15s; }
.groove .person:nth-child(4n+1) .bob { animation-delay: -.3s; }
.q { font-family: Roboto, Arial, sans-serif; font-weight: 800; font-size: 12px; fill: var(--amber); opacity: 0; transition: opacity .3s; }
.confused .asker .q { opacity: 1; }
#presenter { transform: translateX(170px); transition: transform 2.2s ease-in-out; }
#presenter.on { transform: translateX(0); }
#presenter.gone { display: none; }
.spk-cone { transform-box: fill-box; transform-origin: center; }
.waves { transition: opacity 80ms linear; }
#bubble { opacity: 0; transition: opacity .25s; }
#bubble.show { opacity: 1; }
#bubbleBox { fill: #f4f6fa; stroke: none; }
#bubbleTail { fill: #f4f6fa; }
#bubbleText { font-family: Roboto, Arial, sans-serif; font-weight: 700; font-size: 8px; fill: #010024; }
#bubble.muffled #bubbleBox, #bubble.muffled #bubbleTail { fill: #22254a; }
#bubble.muffled #bubbleText { fill: #8f94b8; font-style: italic; }

/* ----------------------------------------------------------- overlays */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 12;
  bottom: calc(144px + var(--safe-b)); width: min(560px, calc(100% - 32px));
  background: var(--blue-dark); color: #fff; border-radius: 10px; padding: 11px 15px; font-size: .92rem; font-weight: 500; line-height: 1.45;
  box-shadow: 0 10px 30px rgba(1, 0, 36, .35);
}
@media (min-width: 860px) { .toast { bottom: 28px; } }
.panel-wrap { position: fixed; inset: 0; z-index: 1000; background: rgba(1, 0, 36, .45); display: grid; align-items: end; justify-items: center; padding: 16px; padding-bottom: calc(16px + var(--safe-b)); }
@media (min-width: 640px) { .panel-wrap { align-items: center; } }
.panel {
  width: min(520px, 100%); max-height: calc(100% - 8px); overflow: auto;
  background: #fff; color: var(--navy); border: 1px solid var(--line); border-radius: 14px; padding: 22px;
  display: grid; gap: 10px; box-shadow: 0 20px 60px rgba(1, 0, 36, .3);
}
.panel .eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.panel h2 { margin: 0; font-size: 1.8rem; font-weight: 700; line-height: 1.1; color: var(--navy); text-wrap: balance; }
#panelBody { display: grid; gap: 10px; }
.panel p { color: var(--text-2); }
.panel .tip { color: #9a5b00; font-size: .92rem; }
.panel ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--text-2); }
.panel .muted { color: var(--text-3); font-size: .92rem; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.st-overlay .primary { min-height: 44px; padding: 10px 18px; border-radius: 10px; background: var(--blue-dark); color: #fff; font-weight: 700; cursor: pointer; }
.st-overlay .primary:hover { background: #224d69; }
.st-overlay .ghost { min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--navy); font-weight: 600; cursor: pointer; }
.st-overlay .ghost:hover { background: var(--surface); }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes can { 50% { outline-color: transparent; } }
@media (prefers-reduced-motion: reduce) {
  .st-app *, .st-app *::before, .st-app *::after { animation: none !important; transition: none !important; }
}

/* ----------------------------------------------------------- embedded
   showtime.html?embed=1 inside the homepage's Technology Stack tab */
html.st-embed, html.st-embed body { background: #ffffff; }
.st-embed .main-nav, .st-embed .st-backbar { display: none !important; }
.st-embed .st-app { max-width: none; padding: 14px 18px 18px; }
/* The frame doesn't scroll itself, so pop-ups and messages follow the part of it that is on screen */
.st-embed .panel-wrap { bottom: auto; top: var(--vt, 0px); height: var(--vh, 100vh); }
.st-embed .toast { bottom: auto; top: calc(var(--vt, 0px) + var(--vh, 100vh) - 80px); }
/* The homepage's bar above the frame already names the game */
.st-embed .top .brand { display: none; }
