/* Wok Street: night-market pixel UI. Chunky borders, hard offset shadows, no soft gradients.
   Animations: transform/opacity only. Looping ones sit in sections watched by pauseOffscreen(). */
img { image-rendering: auto; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; letter-spacing: .03em; margin: 0; }
.px { border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }

/* ---- nav */
.nav { position: sticky; top: 0; z-index: 20; padding: 10px 0; }
.nav-in { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--card); border: 4px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 400 27px/1 var(--f-display); letter-spacing: .04em; color: var(--accent); white-space: nowrap; }
.tabs { display: flex; gap: 8px; margin-left: 8px; }
.nav-r { display: flex; gap: 8px; margin-left: auto; }
.tab { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; background: var(--card2); color: var(--text); border: 3px solid var(--ink); font: 400 12px/1 var(--f-ui); letter-spacing: .06em; text-decoration: none; cursor: pointer; white-space: nowrap; }
.tab.on { background: var(--accent); color: var(--accent-ink); }
.tab.off { opacity: .5; cursor: default; }
.tab.x { font: 700 16px/1 var(--f-body); min-width: 40px; justify-content: center; }
button.tab { appearance: none; }
@media (max-width: 900px) { .tabs .tab:not(.on) { display: none; } }
@media (max-width: 520px) { .brand b { font-size: 17px; } .tabs { display: none; } }

/* ---- hero */
.hero { text-align: center; padding: 34px 0 6px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 7px 12px; background: var(--ink); color: var(--teal); font: 400 12px/1 var(--f-ui); letter-spacing: .08em; }
h1 { margin-top: 16px; font-size: clamp(64px, 15vw, 150px); line-height: .9; letter-spacing: .04em; color: var(--accent); text-shadow: 0 5px 0 var(--fire), 0 10px 0 var(--ink); }
.lede { max-width: 640px; margin: 22px auto 0; font-size: clamp(16px, 2.4vw, 20px); font-weight: 700; color: var(--text); text-shadow: 0 2px 0 var(--ink); }
.lede b { color: var(--accent); }
.perk { display: inline-flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 8px 14px; background: var(--card); border: 3px solid var(--ink); font-weight: 700; }
.perk b { color: var(--accent); }
.perk img { width: 28px; height: 28px; }

/* ---- the window with the steps */
.win { max-width: 760px; margin: 28px auto 0; background: var(--fire); border: 4px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); padding: 0 12px 14px; }
.win-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 10px; }
.win-tab { display: inline-block; padding: 9px 18px 7px; background: var(--card); color: var(--accent); border: 4px solid var(--ink); border-bottom: 0; font: 700 14px/1 var(--f-ui); letter-spacing: .2em; }
.win-bar { margin-bottom: 8px; padding: 7px 12px; background: var(--card); color: var(--text); border: 3px solid var(--ink); font: 400 11px/1 var(--f-ui); letter-spacing: .14em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps { list-style: none; margin: 0; padding: 12px; display: grid; gap: 10px; background: var(--card); border: 4px solid var(--ink); }
.step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px; background: var(--card2); border: 3px solid var(--ink); }
.step .n { display: grid; place-items: center; width: 40px; height: 40px; background: var(--accent); color: var(--accent-ink); border: 3px solid var(--ink); font: 700 16px/1 var(--f-ui); }
.step h3 { font-size: 28px; line-height: 1.05; padding-top: 4px; }
.step .sub { margin: 4px 0 0; color: var(--mute); font: 400 10.5px/1.4 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; }
.step.lock { opacity: .55; }
.step.lock .n { background: var(--bg2); color: var(--mute); }
.step.done { background: var(--bg2); }
.step.done .n { background: var(--ok); }
.step.done h3 { color: var(--mute); font-size: 24px; }
.step.now { border-color: var(--accent); background: #321a58; }
.step.now.in { animation: stepIn .35s steps(4) both; }
.step.nope { animation: nope .3s steps(4); }
@keyframes stepIn { from { opacity: .3; transform: translateY(6px); } }
@keyframes nope { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: stretch; }
.act .field { flex: 1 1 220px; }
.note { margin: 12px 0 0; padding: 10px 12px; background: var(--ink); color: var(--accent); font: 400 11.5px/1.5 var(--f-ui); letter-spacing: .05em; }
.note b { color: var(--text); font-weight: 400; }
.err { min-height: 1.2em; margin: 8px 0 0; color: var(--warn); font-size: 14px; font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; background: var(--accent); color: var(--accent-ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  font: 700 13px/1 var(--f-ui); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: transform .08s steps(2); }
.btn:hover { transform: translate(-1px, -1px); }
.btn:active { transform: translate(3px, 3px); }
.btn:disabled, .btn.wait { opacity: .6; pointer-events: none; }
.btn.dark { background: var(--ink); color: var(--text); }
.btn.ghost { background: var(--card2); color: var(--text); }
.btn.ok { background: var(--ok); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 11px; box-shadow: 3px 3px 0 var(--ink); }
.btn.big { width: 100%; min-height: 58px; font-size: 15px; }
.field { width: 100%; min-height: 46px; padding: 0 12px; background: var(--ink); color: var(--text); border: 3px solid var(--line); font: 600 16px/1.2 var(--f-body); outline: none; border-radius: 0; }
.field:focus { border-color: var(--accent); }
.field.mono { font-family: var(--f-mono); font-size: 14px; }
.at-wrap { display: flex; flex: 1 1 220px; }
.at-wrap span { display: grid; place-items: center; width: 42px; background: var(--line); border: 3px solid var(--line); border-right: 0; font: 400 22px/1 var(--f-display); }

/* card preview */
.cardbox { margin-top: 12px; }
.cardbox canvas, .cardbox img { display: block; width: 100%; height: auto; border: 3px solid var(--ink); background: var(--ink); }

/* ---- status board after joining */
.board { padding: 12px 12px 14px; }
.board-in { padding: 14px; background: var(--card); border: 4px solid var(--ink); }
.bd-top { display: flex; gap: 12px; align-items: center; }
.bd-top img { width: 56px; height: 56px; }
.bd-top h3 { font-size: 38px; color: var(--accent); }
.kick { margin: 0; color: var(--teal); font: 400 11px/1 var(--f-ui); letter-spacing: .1em; }
.bd-st { display: flex; gap: 8px; align-items: center; margin: 14px 0 12px; font-weight: 800; }
.bd-st.ok { color: var(--ok); } .bd-st.warn { color: var(--warn); }
.bd-act { display: flex; flex-wrap: wrap; gap: 8px; }
.bd-note { margin: 14px 0 0; color: var(--mute); font-size: 13px; }

/* ---- about */
.about { margin-top: 70px; text-align: center; }
.about h2, .live h2 { font-size: clamp(38px, 7vw, 60px); letter-spacing: .04em; color: var(--accent); text-shadow: 0 4px 0 var(--ink); }
.about-lede { max-width: 640px; margin: 12px auto 0; font-weight: 700; text-shadow: 0 2px 0 var(--ink); }
.tiles { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; text-align: left; }
.tiles li { display: flex; flex-direction: column; background: var(--card); border: 4px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.tiles img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 4px solid var(--ink); }
.tiles b { padding: 10px 12px 0; font: 400 27px/1 var(--f-display); color: var(--accent); letter-spacing: .06em; }
.tiles span { padding: 6px 12px 14px; color: var(--mute); font-size: 14px; font-weight: 600; line-height: 1.35; }
@media (max-width: 980px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tiles li:last-child { grid-column: 1 / -1; } .tiles li:last-child img { aspect-ratio: 16 / 7; } }
.h-reg { margin-top: 60px !important; }
.regs { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.regs li { display: flex; flex-direction: column; align-items: center; padding: 14px 8px 12px; background: var(--card); border: 4px solid var(--ink); }
.regs img { height: 96px; width: auto; animation: bob 1.2s steps(2) infinite; }
.regs li:nth-child(2n) img { animation-delay: -.6s; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.regs b { margin-top: 10px; font: 400 11px/1 var(--f-ui); letter-spacing: .08em; color: var(--accent); }
.regs span { margin-top: 6px; color: var(--mute); font-size: 13px; font-weight: 600; line-height: 1.3; }
@media (max-width: 820px) { .regs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .regs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- live feed */
.live { margin-top: 70px; }
.live-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.live-head h2 { display: flex; align-items: center; gap: 12px; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stats div { padding: 12px; background: var(--card); border: 3px solid var(--ink); }
.stats dt { color: var(--mute); font: 400 10px/1.3 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; }
.stats dd { margin: 8px 0 0; font: 400 29px/1 var(--f-display); color: var(--accent); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.feed li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--card); border: 3px solid var(--ink); }
.feed li.empty { display: block; color: var(--mute); text-align: center; font-weight: 700; }
.feed img, .feed .pf { width: 40px; height: 40px; border: 2px solid var(--ink); }
.feed .pf { display: grid; place-items: center; background: var(--card2); font: 400 22px/1 var(--f-display); }
.who { display: grid; min-width: 0; } .who b, .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who span { color: var(--mute); font-size: 12.5px; }
.what { color: var(--mute); font-size: 13px; white-space: nowrap; }
.tx { display: inline-flex; align-items: center; min-height: 34px; padding: 0 10px; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--ink); font: 700 10.5px/1 var(--f-ui); text-decoration: none; white-space: nowrap; }
.fs { display: inline-flex; align-items: center; min-height: 34px; padding: 0 10px; border: 2px solid var(--line); color: var(--mute); font: 400 10.5px/1 var(--f-ui); white-space: nowrap; }
@media (max-width: 560px) { .feed li { grid-template-columns: 36px minmax(0, 1fr) auto; } .what { display: none; } }
.feed-more { margin: 14px auto 0; display: flex; }

.foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 50px 0 60px; color: var(--mute); font: 400 11px/1.4 var(--f-ui); letter-spacing: .06em; }
.foot a { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; text-decoration: none; font: 700 16px/1 var(--f-body); color: var(--text); }

/* ---- pop-ups + celebration */
.popwrap { position: fixed; left: 50%; bottom: 16px; z-index: 50; display: grid; gap: 8px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); pointer-events: none; }
.livepop { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--card); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: popIn .3s steps(4) both; }
.livepop.out { animation: popOut .3s steps(4) forwards; }
.lp-dot { width: 9px; height: 9px; background: var(--ok); flex: none; }
@keyframes popIn { from { opacity: 0; transform: translateY(16px); } }
@keyframes popOut { to { opacity: 0; transform: translateY(10px); } }
.sentfx { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(6, 2, 13, .92); animation: fadeIn .3s both; }
.sentfx[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } }
.sf-in { position: relative; z-index: 2; text-align: center; }
.sf-badge { width: 110px; height: 110px; margin: 0 auto; display: grid; place-items: center; background: var(--ok); color: var(--ink); border: 4px solid var(--ink); font: 400 73px/1 var(--f-display); animation: pop .6s steps(6) both; }
@keyframes pop { from { transform: scale(0); } }
.sentfx h2 { margin: 22px 0 0; font-size: clamp(54px, 12vw, 120px); line-height: 1; color: var(--accent); text-shadow: 0 5px 0 var(--fire); animation: rise .5s .2s steps(5) both; }
.sf-amt { margin: 14px 0 0; font: 400 32px/1.2 var(--f-display); animation: rise .5s .35s steps(5) both; }
.sf-act { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; animation: rise .5s .5s steps(5) both; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
.sf-bits { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sf-bits i { position: absolute; left: 50%; top: 45%; width: 12px; height: 12px; background: var(--accent); opacity: 0; animation: burst 1.6s var(--d) cubic-bezier(.2, .7, .3, 1) forwards; }
.sf-bits i:nth-child(3n) { background: var(--pink); } .sf-bits i:nth-child(3n+1) { background: var(--teal); }
@keyframes burst { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(calc(var(--x) * 42vw), 38vh) rotate(540deg); } }

/* phones: the open step uses the full width under its title */
@media (max-width: 560px) {
  .win { padding: 0 8px 10px; } .steps { padding: 8px; gap: 8px; }
  .step { grid-template-columns: 36px minmax(0, 1fr); gap: 4px 10px; padding: 10px; align-items: center; }
  .step > div { display: contents; }
  .step .n { width: 36px; height: 36px; grid-row: 1; }
  .step h3 { font-size: 25px; padding: 0; }
  .step .sub, .step .act, .step .note, .step .cardbox, .step .err { grid-column: 1 / -1; }
  .step .sub { margin-top: 2px; }
  .act .btn { flex: 1 1 auto; }
  .win-bar { font-size: 9.5px; letter-spacing: .08em; }
}

/* play call-out on the board */
.tab .dot { margin-left: 8px; }
.playcta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-top: 14px; padding: 10px 14px; background: #321a58; border: 3px solid var(--accent); text-decoration: none; }
.playcta img { height: 84px; width: auto; animation: bob 1s steps(2) infinite; }
.playcta b { display: block; font: 400 34px/1 var(--f-display); color: var(--accent); letter-spacing: .03em; }
.playcta em { display: block; margin-top: 4px; font-style: normal; font-size: 14px; font-weight: 600; color: var(--mute); }
@media (max-width: 560px) { .playcta { grid-template-columns: auto minmax(0, 1fr); } .playcta .btn { grid-column: 1 / -1; } }
