:root {
  --bg1: #7b2fe0; --bg2: #4b1aa8; --ink: #2b1d3a; --muted: #7a6a90; --card: #ffffff; --line: #e6dcf5;
  --accent: #7b2fe0; --accent2: #5a1fbf; --gold: #ffcc2e;
  --a0: #ffa31a; --a1: #00a8f3; --a2: #2bc45e; --a3: #f5395b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: 'Fredoka', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif; color: var(--ink); background: linear-gradient(160deg, var(--bg1), var(--bg2)); overflow: hidden; user-select: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; }
.hidden { display: none !important; }
#app { display: flex; height: 100%; }
/* sidebar */
#side { width: 210px; flex: none; background: #fff; display: flex; flex-direction: column; padding: 14px 10px; gap: 4px; box-shadow: 4px 0 18px rgba(30, 0, 70, 0.25); z-index: 5; }
.logo { font-size: 34px; font-weight: 700; color: var(--accent); padding: 4px 10px 14px; letter-spacing: -1px; cursor: pointer; }
.logo span { color: var(--a0); }
.nav { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; font-size: 18px; font-weight: 600; color: #4a3a60; text-align: left; transition: background 0.15s; }
.nav i { font-style: normal; font-size: 20px; width: 24px; text-align: center; }
.nav:hover { background: #f3ecff; }
.nav.on { background: var(--accent); color: #fff; box-shadow: 0 4px 0 var(--accent2); }
.side-foot { margin-top: auto; padding: 10px; border-top: 2px solid var(--line); font-size: 13px; color: var(--muted); }
/* main */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#top { display: flex; align-items: center; gap: 14px; padding: 12px 22px; color: #fff; }
#top .who { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; margin-right: auto; }
#top .who .av { width: 50px; height: 50px; background: rgba(255, 255, 255, 0.18); border-radius: 14px; display: flex; align-items: center; justify-content: center; }
#top .lvl { font-size: 13px; font-weight: 600; opacity: 0.85; }
.pill { background: rgba(0, 0, 0, 0.25); padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 7px; }
.tk, .pill .tk { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2a8, #ffcc2e 55%, #d99a00); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15); display: inline-block; }
#view { flex: 1; overflow-y: auto; padding: 6px 22px 30px; }
h1.t { color: #fff; font-size: 34px; margin: 6px 0 4px; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.2); }
p.sub { color: rgba(255, 255, 255, 0.85); margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { background: var(--card); border-radius: 18px; box-shadow: 0 6px 0 rgba(30, 0, 70, 0.25); overflow: hidden; }
.btn { background: var(--accent); color: #fff; font-weight: 700; padding: 10px 18px; border-radius: 12px; box-shadow: 0 4px 0 var(--accent2); transition: transform 0.08s; font-size: 16px; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent2); }
.btn.green { background: #2bc45e; box-shadow: 0 4px 0 #1d8f43; }
.btn.orange { background: #ffa31a; box-shadow: 0 4px 0 #c97a00; }
.btn.red { background: #f5395b; box-shadow: 0 4px 0 #b81f3d; }
.btn.blue { background: #00a8f3; box-shadow: 0 4px 0 #0079b0; }
.btn.white { background: #fff; color: var(--accent); box-shadow: 0 4px 0 #c9b8e6; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: default; }
/* play: mode cards */
.mode { cursor: pointer; transition: transform 0.15s; }
.mode:hover { transform: translateY(-4px) rotate(-0.5deg); }
.mode .art { height: 130px; display: flex; align-items: center; justify-content: center; font-size: 64px; position: relative; }
.mode .art .st { position: absolute; right: 8px; bottom: 4px; }
.mode .body { padding: 12px 16px 16px; }
.mode h3 { font-size: 22px; }
.mode p { color: var(--muted); font-size: 14px; line-height: 1.35; margin-top: 4px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #f3ecff; color: var(--accent); margin-top: 8px; margin-right: 4px; }
/* market */
.mk-top { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.pack { cursor: pointer; text-align: center; position: relative; transition: transform 0.15s; }
.pack:hover { transform: translateY(-4px); }
.pack .pk { padding: 14px 10px 6px; display: flex; justify-content: center; }
.pk-svg { filter: drop-shadow(0 7px 5px rgba(30, 0, 70, 0.3)); transition: transform 0.15s; overflow: visible; }
.pack:hover .pk-svg { transform: rotate(-3deg) scale(1.04); }
.pack .foot { padding: 6px 12px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-weight: 700; }
.pack .pname { font-size: 17px; }
.pack .pcost { display: flex; align-items: center; gap: 6px; font-size: 18px; background: #f3ecff; padding: 3px 14px; border-radius: 999px; }
.pack .own { position: absolute; top: 8px; right: 8px; background: rgba(0, 0, 0, 0.35); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 999px; z-index: 2; }
.switch { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; cursor: pointer; }
.switch .tg { width: 46px; height: 26px; border-radius: 999px; background: rgba(0, 0, 0, 0.3); position: relative; transition: background 0.2s; }
.switch .tg::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left 0.2s; }
.switch.on .tg { background: #2bc45e; }
.switch.on .tg::after { left: 23px; }
/* stups collection */
.col-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.col-pack { background: #fff; border-radius: 18px; padding: 14px; margin-bottom: 16px; box-shadow: 0 6px 0 rgba(30, 0, 70, 0.25); }
.col-pack h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 20px; }
.col-pack h3 small { color: var(--muted); font-weight: 500; font-size: 14px; }
.stup-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.stup { border-radius: 14px; padding: 6px 4px 8px; text-align: center; cursor: pointer; position: relative; border: 3px solid transparent; transition: transform 0.12s; }
.stup:hover { transform: scale(1.05); }
.stup .nm { font-size: 13px; font-weight: 600; line-height: 1.1; min-height: 28px; display: flex; align-items: center; justify-content: center; }
.stup .ct { position: absolute; top: 4px; right: 6px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; }
.stup.locked svg { filter: brightness(0) opacity(0.25); }
.stup.locked .nm { color: #b3a6c6; }
.stup .rar { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.rar-X, .rar-M { animation: hue 3s linear infinite; }
@keyframes hue { to { filter: hue-rotate(360deg); } }
/* discover / sets */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.search { flex: 1; min-width: 200px; padding: 11px 16px; border-radius: 12px; border: none; font-size: 16px; box-shadow: 0 4px 0 rgba(30, 0, 70, 0.25); outline: none; }
.chip { background: rgba(255, 255, 255, 0.2); color: #fff; padding: 8px 14px; border-radius: 999px; font-weight: 600; }
.chip.on { background: #fff; color: var(--accent); }
.set { cursor: pointer; display: flex; flex-direction: column; }
.set .bar { height: 78px; display: flex; align-items: center; justify-content: center; font-size: 40px; position: relative; }
.set .star { position: absolute; top: 6px; right: 10px; font-size: 22px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3)); }
.set .body { padding: 10px 14px 14px; }
.set h4 { font-size: 17px; }
.set .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.editor { background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 6px 0 rgba(30, 0, 70, 0.25); }
.editor input[type=text] { width: 100%; padding: 9px 12px; border: 2px solid var(--line); border-radius: 10px; margin: 4px 0; outline: none; }
.editor input[type=text]:focus { border-color: var(--accent); }
.qrow { border: 2px solid var(--line); border-radius: 14px; padding: 12px; margin: 10px 0; }
.qrow .ans { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.qrow .ans label { display: flex; align-items: center; gap: 6px; }
.qrow .ans input[type=radio] { accent-color: #2bc45e; width: 18px; height: 18px; flex: none; }
/* stats */
.stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.stat { background: #fff; border-radius: 16px; padding: 16px; box-shadow: 0 6px 0 rgba(30, 0, 70, 0.25); }
.stat b { display: block; font-size: 30px; color: var(--accent); }
.stat span { color: var(--muted); font-weight: 600; }
/* modal */
#modal { position: fixed; inset: 0; background: rgba(20, 0, 50, 0.6); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
#modalBox { background: #fff; border-radius: 22px; max-width: 640px; width: 100%; max-height: 92vh; overflow-y: auto; padding: 22px; box-shadow: 0 8px 0 rgba(30, 0, 70, 0.35); animation: pop 0.2s ease-out; }
#modalBox.wide { max-width: 900px; }
#modalBox.clear { background: none; box-shadow: none; padding: 0; overflow: visible; }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }
.mh { font-size: 26px; font-weight: 700; margin-bottom: 10px; }
.rates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; }
.rate { display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 10px; background: #f8f4ff; font-size: 13px; }
.rate b { display: block; }
/* pack opening */
.open-stage { position: relative; width: min(440px, 92vw); height: min(520px, 80vh); margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; }
.open-pack { display: flex; align-items: center; justify-content: center; flex-direction: column; cursor: pointer; position: relative; }
.open-pack .name { font-weight: 700; font-size: 26px; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); margin-top: 6px; }
.open-pack .pk-svg { filter: drop-shadow(0 12px 8px rgba(0, 0, 0, 0.35)); }
.open-pack.wiggle { animation: wiggle 0.25s ease-in-out; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-5deg) scale(1.03); } 50% { transform: rotate(5deg) scale(1.05); } 75% { transform: rotate(-3deg) scale(1.06); } }
.pk-spark { filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 8px #ffe680); }
.open-pack.shake { animation: shake 0.9s ease-in-out; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(-8deg) scale(1.02); } 20% { transform: rotate(8deg); } 30% { transform: rotate(-10deg) scale(1.05); } 40% { transform: rotate(10deg); } 50% { transform: rotate(-12deg) scale(1.08); } 60% { transform: rotate(12deg); } 70% { transform: rotate(-14deg) scale(1.12); } 80% { transform: rotate(14deg) scale(1.15); } 90% { transform: scale(1.25); } }
.flash { position: fixed; inset: 0; background: #fff; z-index: 60; pointer-events: none; animation: flash 0.6s ease-out forwards; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.reveal { display: flex; flex-direction: column; align-items: center; }
@keyframes rise { from { transform: translateY(60px) scale(0.3); opacity: 0; } }
.rays { position: absolute; top: 50%; left: 50%; width: 560px; height: 560px; margin: -330px 0 0 -280px; border-radius: 50%; background: repeating-conic-gradient(var(--rc) 0deg 10deg, transparent 10deg 30deg); opacity: 0.45; animation: spin 10s linear infinite; -webkit-mask: radial-gradient(circle, #000 20%, transparent 70%); mask: radial-gradient(circle, #000 20%, transparent 70%); pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.reveal .rname { font-size: 34px; font-weight: 700; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); margin-top: 6px; }
.reveal .rr { font-size: 20px; font-weight: 700; background: #fff; padding: 2px 16px; border-radius: 999px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2); margin-top: 4px; }
.reveal .new { background: #ff3d6e; padding: 3px 12px; border-radius: 999px; font-weight: 700; margin-top: 6px; animation: bob 0.8s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-4px) scale(1.06); } }
.open-btns { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
.multi { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: min(620px, 94vw); }
.multi .stup { background: #fff; animation: rise 0.4s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.confetti { position: fixed; top: -20px; width: 10px; height: 14px; z-index: 61; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
/* toasts */
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { background: #2b1d3a; color: #fff; padding: 10px 18px; border-radius: 12px; font-weight: 600; animation: pop 0.2s ease-out; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); }
/* ── game screens ─────────────────────────────────────────────────────── */
#game { position: fixed; inset: 0; z-index: 30; background: linear-gradient(160deg, #6b2bd6, #3a1490); display: flex; flex-direction: column; color: #fff; overflow: hidden; }
.g-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(0, 0, 0, 0.2); flex: none; }
.g-top .ttl { font-weight: 700; font-size: 20px; margin-right: auto; display: flex; align-items: center; gap: 8px; }
.g-top .timer { font-weight: 700; font-size: 20px; background: rgba(0, 0, 0, 0.25); padding: 4px 12px; border-radius: 10px; min-width: 70px; text-align: center; }
.g-body { flex: 1; display: flex; min-height: 0; }
.g-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px; min-width: 0; position: relative; }
.g-side { width: 260px; flex: none; background: rgba(0, 0, 0, 0.18); overflow-y: auto; padding: 10px; }
.lb-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; margin-bottom: 5px; background: rgba(255, 255, 255, 0.1); font-weight: 600; transition: background 0.3s; }
.lb-row.me { background: rgba(255, 204, 46, 0.35); }
.lb-row .rk { width: 22px; text-align: center; opacity: 0.8; }
.lb-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .sc { font-weight: 700; }
.feed { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 4px; align-items: center; pointer-events: none; z-index: 5; width: 90%; }
.feed div { background: rgba(0, 0, 0, 0.45); padding: 5px 12px; border-radius: 999px; font-size: 14px; animation: pop 0.2s; text-align: center; }
/* question */
.q-wrap { width: min(860px, 100%); display: flex; flex-direction: column; gap: 12px; flex: 1; max-height: 640px; }
.q-text { background: #fff; color: var(--ink); border-radius: 18px; padding: 22px; font-size: clamp(20px, 3.2vw, 30px); font-weight: 700; text-align: center; min-height: 110px; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2); }
.q-ans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; }
.q-ans button { border-radius: 18px; color: #fff; font-weight: 700; font-size: clamp(17px, 2.6vw, 24px); padding: 14px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25); min-height: 90px; transition: transform 0.08s, opacity 0.2s; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2); }
.q-ans button:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.q-ans button:nth-child(1) { background: var(--a0); } .q-ans button:nth-child(2) { background: var(--a1); } .q-ans button:nth-child(3) { background: var(--a2); } .q-ans button:nth-child(4) { background: var(--a3); }
.q-ans button.dim { opacity: 0.35; }
.q-ans button.right { outline: 5px solid #fff; }
.verdict { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 10; font-size: 48px; font-weight: 700; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); animation: pop 0.2s; }
.verdict.ok { background: rgba(43, 196, 94, 0.94); }
.verdict.no { background: rgba(245, 57, 91, 0.94); }
.verdict small { font-size: 20px; font-weight: 600; margin-top: 8px; text-shadow: none; }
.big-btn { background: #fff; color: var(--accent); font-weight: 700; font-size: 26px; padding: 18px 40px; border-radius: 18px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25); }
.big-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
/* lobby */
.lobby { text-align: center; width: 100%; max-width: 900px; }
.code { display: inline-block; background: #fff; color: var(--ink); border-radius: 16px; padding: 10px 26px; margin: 8px 0 18px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25); }
.code small { display: block; color: var(--muted); font-weight: 600; }
.code b { font-size: 40px; letter-spacing: 4px; }
.players { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0; min-height: 120px; }
.player { background: rgba(255, 255, 255, 0.15); border-radius: 14px; padding: 6px 10px; display: flex; flex-direction: column; align-items: center; font-weight: 600; animation: rise 0.4s cubic-bezier(.2, 1.6, .4, 1); width: 104px; }
.opts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.opts label { background: rgba(0, 0, 0, 0.2); padding: 8px 12px; border-radius: 12px; font-weight: 600; }
.opts select { margin-left: 6px; border-radius: 8px; border: none; padding: 3px 6px; }
/* chests / choices */
.choices { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.choice { width: 170px; height: 190px; background: #fff; color: var(--ink); border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; box-shadow: 0 8px 0 rgba(0, 0, 0, 0.25); cursor: pointer; transition: transform 0.12s; text-align: center; padding: 10px; }
.choice:hover { transform: translateY(-6px); }
.choice .ic { font-size: 62px; }
.choice.flip { animation: flipin 0.45s; }
@keyframes flipin { from { transform: rotateY(90deg); } }
/* results */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin: 16px 0; }
.podium .pl { display: flex; flex-direction: column; align-items: center; font-weight: 700; }
.podium .blk { width: 120px; border-radius: 14px 14px 0 0; display: flex; align-items: flex-start; justify-content: center; font-size: 40px; padding-top: 6px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.reward { background: #fff; color: var(--ink); border-radius: 18px; padding: 14px 22px; display: inline-flex; gap: 24px; font-weight: 700; font-size: 20px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25); align-items: center; }
/* race */
.track { width: 100%; max-width: 980px; display: flex; flex-direction: column; gap: 4px; }
.lane { position: relative; height: 46px; background: rgba(255, 255, 255, 0.1); border-radius: 10px; border-right: 6px dashed #fff; }
.lane.me { background: rgba(255, 204, 46, 0.25); }
.lane .runner { position: absolute; top: -2px; transition: left 0.6s cubic-bezier(.3, 1.4, .5, 1); display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; white-space: nowrap; }
/* fishing */
.lake { width: 100%; max-width: 760px; height: 230px; border-radius: 20px; background: linear-gradient(#7fd0ff 0 30%, #2f8fe0 30%, #1a5fb0); position: relative; overflow: hidden; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25); }
.lake .dock { position: absolute; left: 0; top: 24%; width: 30%; height: 18px; background: #8a5a35; border-bottom: 6px solid #6b4423; }
.lake .fisher { position: absolute; left: 12%; top: -4px; }
.lake .line { position: absolute; left: 32%; top: 22%; width: 2px; background: #fff; transform-origin: top; transition: height 0.6s; }
.lake .catch { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; color: #fff; font-weight: 700; animation: rise 0.5s cubic-bezier(.2, 1.6, .4, 1); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); }
.wave { position: absolute; left: -10%; width: 120%; height: 20px; top: 28%; background: radial-gradient(circle at 10px -4px, transparent 12px, rgba(255, 255, 255, 0.35) 13px) repeat-x; background-size: 24px 20px; animation: drift 6s linear infinite; }
@keyframes drift { to { transform: translateX(24px); } }
/* tower defense */
#td { background: #5fae4a; border-radius: 16px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25); max-width: 100%; touch-action: none; }
.td-bar { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.td-shop { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.td-shop button { background: #fff; color: var(--ink); border-radius: 12px; padding: 4px 8px; font-weight: 700; font-size: 13px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); }
.td-shop button.sel { outline: 4px solid var(--a0); }
/* café */
.cafe { width: 100%; max-width: 900px; display: flex; flex-direction: column; gap: 12px; }
.cust-row { display: flex; gap: 10px; min-height: 170px; align-items: flex-end; flex-wrap: wrap; justify-content: center; }
.cust { background: #fff; color: var(--ink); border-radius: 16px; padding: 6px 8px 10px; width: 140px; text-align: center; cursor: pointer; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25); animation: rise 0.4s; position: relative; }
.cust .ord { font-size: 26px; }
.cust .pat { height: 6px; background: #eee; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.cust .pat i { display: block; height: 100%; background: #2bc45e; }
.counter { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.food { background: rgba(255, 255, 255, 0.15); border-radius: 14px; padding: 8px 12px; text-align: center; font-weight: 700; min-width: 96px; }
.food .em { font-size: 34px; }
/* mobile */
@media (max-width: 760px) {
  #app { flex-direction: column-reverse; }
  #side { width: 100%; flex: none; flex-direction: row; padding: 4px; gap: 0; overflow-x: auto; box-shadow: 0 -4px 14px rgba(30, 0, 70, 0.25); }
  .logo, .side-foot { display: none; }
  .nav { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 4px; flex: 1; min-width: 56px; justify-content: center; align-items: center; text-align: center; }
  .nav.on { box-shadow: none; }
  #top { padding: 10px 12px; }
  #top .who { font-size: 16px; }
  #top .who .av { width: 40px; height: 40px; }
  .pill { font-size: 15px; padding: 5px 12px; }
  #view { padding: 4px 12px 20px; }
  h1.t { font-size: 26px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mode .art { height: 96px; font-size: 46px; }
  .mode h3 { font-size: 17px; }
  .mode p { font-size: 12px; }
  .pack .pk svg.pk-svg { width: 130px; height: 130px; }
  .pack .pname { font-size: 14px; }
  .stup-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .stup svg { width: 74px; height: 74px; }
  .g-body { flex-direction: column; }
  .g-side { width: 100%; max-height: 120px; display: flex; gap: 6px; overflow-x: auto; overflow-y: hidden; padding: 6px; }
  .g-side .lb-row { flex: none; min-width: 150px; margin: 0; }
  .q-ans { gap: 8px; }
  .q-ans button { min-height: 72px; padding: 8px; }
  .q-text { padding: 14px; min-height: 80px; }
  .choice { width: 104px; height: 140px; font-size: 15px; }
  .choice .ic { font-size: 42px; }
  .multi { grid-template-columns: repeat(3, 1fr); }
  .podium .blk { width: 90px; }
  .lane { height: 38px; }
}
@media (max-width: 760px) {
  .lane { height: 28px; }
  .lane .runner svg { width: 30px; height: 30px; }
}

/* reveal animations */
.open-pack.drop { animation: packdrop 0.42s cubic-bezier(.5, 0, .9, .6) forwards; }
@keyframes packdrop { 0% { transform: translateY(0) rotate(0); } 20% { transform: translateY(-18px) rotate(-3deg); } 100% { transform: translateY(115vh) rotate(16deg); } }
.rays { opacity: 0; transition: opacity 0.4s; }
.rays.on { opacity: 0.45; }
.rays.big { opacity: 0.7; width: 760px; height: 760px; margin: -430px 0 0 -380px; animation-duration: 6s; }
.rv-stup { position: relative; z-index: 2; }
.rv-stup.pop { animation: stuppop 0.5s cubic-bezier(.2, 1.7, .4, 1) both; }
@keyframes stuppop { 0% { transform: translateY(140px) scale(0.1); } 60% { transform: translateY(-14px) scale(1.12); } 100% { transform: translateY(0) scale(1); } }
.rv-stup.sil { animation: charge linear both; filter: drop-shadow(0 0 10px var(--rc)) drop-shadow(0 0 26px var(--rc)); }
.rv-stup.sil svg { filter: brightness(0); }
.rv-stup.sil.chroma { animation: charge linear both, rainbowglow 0.5s linear infinite; }
@keyframes charge { 0% { transform: scale(0.45) rotate(0); } 15% { transform: scale(0.6) rotate(-4deg); } 30% { transform: scale(0.66) rotate(4deg); } 45% { transform: scale(0.74) rotate(-5deg); } 60% { transform: scale(0.82) rotate(5deg); } 75% { transform: scale(0.9) rotate(-6deg); } 90% { transform: scale(0.98) rotate(6deg); } 100% { transform: scale(1.05) rotate(0); } }
@keyframes rainbowglow { 0% { filter: drop-shadow(0 0 12px #ff4d6d) drop-shadow(0 0 28px #ff4d6d); } 33% { filter: drop-shadow(0 0 12px #4dd2ff) drop-shadow(0 0 28px #4dd2ff); } 66% { filter: drop-shadow(0 0 12px #7be06b) drop-shadow(0 0 28px #ffd84d); } 100% { filter: drop-shadow(0 0 12px #ff4d6d) drop-shadow(0 0 28px #ff4d6d); } }
.rv-stup.burst { animation: stupburst 0.55s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes stupburst { 0% { transform: scale(1.5); filter: brightness(3); } 100% { transform: scale(1); filter: brightness(1); } }
.rv-text.wait, .open-btns.wait { opacity: 0; }
.rv-text.in, .open-btns.in { animation: fadeup 0.35s ease-out both; }
@keyframes fadeup { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rv-text { display: flex; flex-direction: column; align-items: center; }
.spk { position: absolute; border-radius: 50%; pointer-events: none; z-index: 3; margin: -4px 0 0 -4px; box-shadow: 0 0 8px currentColor; }
.pulse-ring2 { position: absolute; left: 50%; top: 40%; width: 140px; height: 140px; margin: -70px 0 0 -70px; border-radius: 50%; border: 6px solid var(--rc); box-shadow: 0 0 20px var(--rc); pointer-events: none; animation: ringout 0.75s ease-out forwards; }
@keyframes ringout { from { transform: scale(2.6); opacity: 0; } 40% { opacity: 1; } to { transform: scale(0.4); opacity: 0; } }
.open-stage.quake { animation: quake 0.09s linear infinite; }
.open-stage.quake2 { animation: quake2 0.07s linear infinite; }
@keyframes quake { 0% { transform: translate(0, 0); } 25% { transform: translate(-3px, 2px); } 50% { transform: translate(3px, -2px); } 75% { transform: translate(-2px, -3px); } }
@keyframes quake2 { 0% { transform: translate(0, 0); } 25% { transform: translate(-7px, 4px); } 50% { transform: translate(6px, -5px); } 75% { transform: translate(-5px, -6px); } }
