@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap");
:root {
  color-scheme: var(--scheme);
  --bg: var(--c-030504);
  --line: var(--c-151e18);
  --muted: var(--c-7f8b83);
  --text: var(--c-f3f7f4);
  --accent: var(--c-19d77b);
  --green: var(--c-19d77b);
  --red: var(--c-ff6b6b);
  --easy: var(--c-19d77b);
  --medium: var(--c-e4c51c);
  --hard: var(--c-f08b22);
  --expert: var(--c-e94b3e);
  --impossible: var(--c-b65bea);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body);
  min-height: 100vh; min-height: 100dvh; overflow-x: hidden; display: flex; flex-direction: column; -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; touch-action: manipulation; }
img { max-width: 100%; }
button { cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.25s, opacity 0.2s; }
button:active:not(:disabled) { transform: scale(0.97); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.spot { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.spot::before, .spot::after, .spot .tint { content: ""; position: absolute; inset: 0; clip-path: polygon(36% 0, 64% 0, 76% 100%, 24% 100%); }
.spot::before { background: linear-gradient(180deg, var(--c-0f1812) 0%, var(--c-0a110d) 55%, var(--c-070c09) 100%); }
.spot::after { background: radial-gradient(ellipse at 50% 0%, var(--c-19d77b1a), transparent 62%); animation: breathe 7s ease-in-out infinite; }
.spot .tint { background: radial-gradient(ellipse at 50% 10%, var(--c-2b120d), var(--c-150d0b) 75%); opacity: 0; transition: opacity 0.7s; z-index: 1; }
body.lost .spot .tint { opacity: 1; }
@keyframes breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (max-width: 700px) {
  .spot::before, .spot::after, .spot .tint { clip-path: polygon(18% 0, 82% 0, 88% 100%, 12% 100%); }
}
.topbar { height: 68px; display: flex; align-items: center; justify-content: center; padding: 0 16px; position: sticky; top: 0; z-index: 6; background: linear-gradient(var(--c-030504d9), var(--c-03050400)); flex: none; }
.brand { display: flex; align-items: center; gap: 11px; border: 0; background: none; color: var(--c-ffffff); padding: 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.45px; }
.brand:hover { opacity: 0.85; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; color: var(--c-06100a); }
.brand-mark svg { width: 20px; height: 20px; }
.hub-btn { position: absolute; right: max(16px, env(safe-area-inset-right)); top: calc(14px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; background: var(--c-070b09); border: 1px solid var(--line); border-radius: 12px; color: var(--c-cfd8d1); font: 700 13px var(--font-body); text-decoration: none; transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s; animation: rise 0.5s var(--ease) both; }
.hub-btn:hover { background: var(--c-0e2418); border-color: var(--c-1d4a30); color: var(--c-b9f3d1); }
.hub-btn:active { transform: scale(0.97); }
.hub-btn svg { width: 15px; height: 15px; }
@media (max-width: 420px) { .hub-btn span { display: none; } .hub-btn { padding: 0 12px; } }
.user-card { position: absolute; left: 16px; top: 14px; display: flex; align-items: center; gap: 4px; background: var(--c-070b09); border: 1px solid var(--line); border-radius: 12px; padding: 3px 3px 3px 13px; animation: rise 0.5s var(--ease) both; }
.user-card { max-width: min(340px, calc(50vw - 41px)); min-width: 0; }
.user-card .uname { flex: 1 1 auto; min-width: 0; display: flex; font-size: 13px; font-weight: 700; }
.dots { flex: none; }
.dots { width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--c-aab5ad); display: grid; place-items: center; }
.dots:hover { background: var(--c-0e2418); color: var(--c-b9f3d1); }
.dots svg { width: 16px; height: 16px; }
@media (max-width: 900px) { .brand .brand-text { display: none; } }
@media (max-width: 440px) { .brand { display: none; } .user-card { max-width: calc(100vw - 79px); } }
main { position: relative; z-index: 1; width: min(940px, calc(100% - 32px)); margin: 0 auto; padding: 26px 0 40px; flex: 1; }
.foot { position: relative; z-index: 1; text-align: center; padding: 14px 0 24px; font-size: 12px; color: var(--c-4f5c54); letter-spacing: 0.4px; flex: none; }
.view { display: none; }
.view.active { display: block; animation: viewIn 0.5s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
#intro { position: fixed; top: max(14px, env(safe-area-inset-top)); left: 50%; z-index: 100; transform: translateX(-50%); display: flex; align-items: center; border-radius: 3px; background: var(--c-1f2721); overflow: hidden; pointer-events: none; white-space: nowrap; clip-path: inset(0 100% 0 0); animation: introWipe 0.55s cubic-bezier(0.7, 0, 0.2, 1) 0.15s forwards; }
#intro::before { content: ""; align-self: stretch; width: 4px; background: var(--c-19d77b); }
#intro .ib-by { padding: 13px 0 13px 16px; font: 700 11px var(--font-body); letter-spacing: 3px; color: var(--c-7fae92); }
#intro .ib-name { padding: 12px 20px 12px 10px; font: 800 18px var(--font-display); color: var(--c-f1fff7); }
#intro.out { animation: introWipeOut 0.45s cubic-bezier(0.7, 0, 0.2, 1) forwards; }
@keyframes introWipe { to { clip-path: inset(0 0 0 0); } }
@keyframes introWipeOut { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }
@media (max-width: 440px) { #intro { top: 62px; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.view.active .stack > * { animation: rise 0.5s var(--ease) both; }
.view.active .stack > *:nth-child(2) { animation-delay: 0.05s; }
.view.active .stack > *:nth-child(3) { animation-delay: 0.1s; }
.view.active .stack > *:nth-child(4) { animation-delay: 0.15s; }
.view.active .stack > *:nth-child(5) { animation-delay: 0.2s; }
.view.active .stack > *:nth-child(6) { animation-delay: 0.25s; }
.stack { width: min(420px, 100%); margin: 0 auto; }
.stack.wide { width: min(820px, 100%); }
.center { text-align: center; }
.game-body { margin-top: 60px; transition: opacity 0.3s; }
.game-body.waiting { opacity: 0.4; pointer-events: none; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.hero { text-align: center; margin: 18px auto 30px; max-width: 650px; }
.hero h1 { font: 700 clamp(34px, 6vw, 54px) / 1.04 var(--font-display); letter-spacing: -1.8px; margin: 10px 0; }
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mode-card { min-height: 190px; padding: 20px; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, var(--c-0b120e), var(--c-070b09)); color: var(--c-ffffff); display: flex; flex-direction: column; align-items: flex-start; animation: rise 0.6s var(--ease) both; }
.mode-card:nth-child(2) { animation-delay: 0.08s; }
.mode-card:nth-child(3) { animation-delay: 0.16s; }
.mode-card:hover { transform: translateY(-4px); border-color: var(--c-19d77b66); background: linear-gradient(145deg, var(--c-0f1b14), var(--c-080d0a)); box-shadow: 0 14px 40px var(--c-19d77b12); }
.mode-icon { width: 42px; height: 42px; border-radius: 11px; background: var(--c-19d77b16); color: var(--accent); display: grid; place-items: center; margin-bottom: 27px; }
.mode-icon svg { width: 23px; height: 23px; }
.mode-card h2 { font: 600 21px var(--font-display); margin: 0 0 8px; }
.mode-card p { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0; }
.card-bottom { margin-top: auto; padding-top: 22px; color: var(--accent); font-size: 11px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.top-row { display: flex; align-items: center; margin-bottom: 16px; }
.back { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--c-070b09); color: var(--c-cfd8d1); display: grid; place-items: center; flex: none; }
.back:hover { background: var(--c-0e2418); border-color: var(--c-1d4a30); color: var(--c-b9f3d1); }
.back svg { width: 16px; height: 16px; }
.duel-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 16px; }
.duel-top #duelRound { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.duel-top .score { justify-self: end; font: 700 18px var(--font-display); color: var(--accent); font-variant-numeric: tabular-nums; }
.page-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.page-heading h1 { font: 600 26px var(--font-display); margin: 0; }
.page-heading p { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.diff { display: flex; gap: 6px; margin-bottom: 18px; }
.diff.wrap { flex-wrap: wrap; }
.pill { --c: var(--easy); flex: 1 1 auto; border: 0; border-radius: 999px; padding: 9px 12px; font-size: 12px; font-weight: 800; background: color-mix(in srgb, var(--c) 13%, var(--c-060908)); color: var(--c); }
.pill[data-level="medium"] { --c: var(--medium); }
.pill[data-level="hard"] { --c: var(--hard); }
.pill[data-level="expert"] { --c: var(--expert); }
.pill[data-level="impossible"] { --c: var(--impossible); }
.pill:hover { background: color-mix(in srgb, var(--c) 22%, var(--c-060908)); }
.pill.sel { background: var(--c); color: var(--c-06100a); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 45%, transparent); }
@media (max-width: 480px) { .pill { padding: 8px 8px; font-size: 11px; } }
.clip-bar { height: 16px; background: var(--c-131a15); border-radius: 999px; position: relative; overflow: hidden; }
.clip-fill { height: 100%; min-width: 10px; width: 2%; background: linear-gradient(90deg, var(--c-0ecb70), var(--c-55efa0)); border-radius: 999px; transition: width 0.5s var(--ease); }
.clip-prog { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--c-e9fff4), var(--c-ffffff)); border-radius: 999px; box-shadow: 0 0 12px var(--c-ffffffcc); }
.clip-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--c-030504); }
.clip-bar.bad { animation: barbad 0.7s; }
@keyframes barbad { 25% { background: var(--c-3b1111); box-shadow: 0 0 0 2px var(--c-ff6b6b), 0 0 26px var(--c-ff6b6b88); } 100% { box-shadow: 0 0 0 0 transparent; } }
.clip-bar.bad .clip-fill { animation: fillbad 0.7s; }
@keyframes fillbad { 25% { background: var(--c-ff5a4d); } }
.clip-marker-wrap { position: relative; height: 26px; margin-top: 2px; }
.clip-marker { position: absolute; top: 0; left: 2%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; color: var(--accent); font: 700 11px var(--font-display), monospace; transition: left 0.5s var(--ease); }
.clip-marker i { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 5px solid var(--accent); margin-bottom: 3px; }
.play-row { position: relative; display: flex; align-items: center; justify-content: center; margin: 14px 0 22px; }
.play-row { --pb: 92px; }
.play-big { position: relative; z-index: 1; width: 92px; height: 92px; border: 0; border-radius: 50%; background: var(--accent); color: var(--c-06100a); display: grid; place-items: center; box-shadow: 0 0 40px var(--c-19d77b40); }
.play-ring { position: absolute; left: 50%; top: 50%; width: var(--pb); height: var(--pb); margin: calc(var(--pb) / -2) 0 0 calc(var(--pb) / -2); border: 2px solid var(--accent); border-radius: 50%; background: none; pointer-events: none; z-index: 0; animation: ringOut 1.5s ease-out forwards; }
@keyframes ringOut { from { transform: scale(1); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.play-big:hover { transform: scale(1.06); box-shadow: 0 0 56px var(--c-19d77b66); }
.play-big svg { width: 52px; height: 52px; }
.clip-len { position: absolute; left: calc(50% + 58px); bottom: 2px; font: 700 14px var(--font-display), monospace; color: var(--accent); }
.answer-row { display: flex; gap: 8px; }
.search { flex: 1; position: relative; min-width: 0; }
.search > svg.mag { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--c-7f8b83); pointer-events: none; }
input, select { width: 100%; background: var(--c-080c0a); border: 1px solid var(--line); border-radius: 12px; color: var(--c-ffffff); padding: 13px 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.search input { padding-left: 38px; padding-right: 40px; }
input:focus { border-color: var(--c-19d77b88); box-shadow: 0 0 0 3px var(--c-19d77b14); }
.spin { position: absolute; right: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border: 2px solid var(--c-19d77b30); border-top-color: var(--accent); border-radius: 50%; opacity: 0; transition: opacity 0.2s; animation: spinr 0.7s linear infinite; pointer-events: none; }
@keyframes spinr { to { transform: rotate(360deg); } }
.search.loading .spin { opacity: 1; }
.search .xm { position: absolute; right: 13px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--red); opacity: 0; pointer-events: none; }
.search.bad .xm { opacity: 1; animation: pop 0.4s var(--ease); }
.search.bad input { border-color: var(--red); background: var(--c-150b0b); box-shadow: 0 0 0 3px var(--c-ff6b6b22); animation: shake 0.4s; }
@keyframes pop { from { transform: scale(0.3); } }
.option.shake { animation: shake 0.35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.gs-btn { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--c-0a0f0c); color: var(--c-cfd8d1); padding: 0 18px; font-weight: 800; font-size: 14px; white-space: nowrap; }
.gs-btn svg { width: 14px; height: 14px; }
.gs-btn:not(.is-guess):hover { background: var(--c-0e2418); border-color: var(--c-1d4a30); color: var(--c-b9f3d1); }
.gs-btn.is-guess { background: var(--accent); border-color: var(--accent); color: var(--c-05120a); }
.gs-btn.is-guess:hover { background: var(--c-4be59b); }
.gs-btn.is-guess .ico { display: none; }
.gs-btn .ico { display: flex; }
.sugg { display: none; margin-top: 6px; gap: 4px; flex-direction: column; }
.sugg.open { display: flex; }
.sugg-row { width: 100%; text-align: left; padding: 7px 11px 7px 7px; border: 1px solid var(--line); background: var(--c-080c0a); color: var(--c-eaf4ed); border-radius: 10px; animation: rise 0.3s var(--ease) both; display: flex; gap: 10px; align-items: center; font-size: 13px; }
.sugg-row img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; background: var(--c-111a14); flex: none; }
.sugg-row .t { display: flex; flex-direction: column; min-width: 0; }
.sugg-row b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg-row small { color: var(--c-7f8b83); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg-row:nth-child(2) { animation-delay: 0.03s; } .sugg-row:nth-child(3) { animation-delay: 0.06s; }
.sugg-row:nth-child(4) { animation-delay: 0.09s; } .sugg-row:nth-child(5) { animation-delay: 0.12s; } .sugg-row:nth-child(6) { animation-delay: 0.15s; }
.sugg-row:hover:not(.none), .sugg-row.active { background: var(--c-0e2418); border-color: var(--c-1d4a30); }
.sugg-row.none { color: var(--c-7f8b83); justify-content: center; padding: 12px; }
.sugg-row.done { opacity: 0.4; filter: grayscale(1); cursor: not-allowed; pointer-events: none; }
.sugg-row .ag { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--c-9aa6a0); white-space: nowrap; padding-left: 8px; }
.duel-wrap { position: relative; }
.wait { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; text-align: center; font-weight: 700; font-size: 15px; color: var(--c-cfe9da); pointer-events: none; gap: 10px; }
.wait.show { display: flex; animation: fade 0.35s both; }
.wait i { width: 16px; height: 16px; border: 2px solid var(--c-19d77b30); border-top-color: var(--accent); border-radius: 50%; animation: spinr 0.7s linear infinite; }
.options { display: flex; flex-direction: column; gap: 8px; }
.option { display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: var(--c-080c0a); color: var(--c-eeeeee); padding: 6px 12px 6px 6px; min-height: 54px; animation: rise 0.4s var(--ease) both; }
.option:nth-child(2) { animation-delay: 0.04s; } .option:nth-child(3) { animation-delay: 0.08s; }
.option:nth-child(4) { animation-delay: 0.12s; } .option:nth-child(5) { animation-delay: 0.16s; }
.option img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; background: var(--c-111a14); flex: none; }
.option span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.option strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.option small { font-size: 11px; color: var(--c-7f8b83); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.option:hover:not(:disabled) { border-color: var(--c-19d77b77); background: var(--c-0c1710); transform: translateX(3px); }
.option.correct { border-color: var(--green); background: var(--c-0f2a1a); opacity: 1; }
.option.wrong { border-color: var(--c-ff6b6b99); background: var(--c-200c0c); box-shadow: 0 0 22px var(--c-ff6b6b22); }
.skip-btn { width: 100%; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--c-0a0f0c); color: var(--c-cfd8d1); padding: 12px 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 7px; }
.skip-btn svg { width: 14px; height: 14px; }
.skip-btn:hover:not(:disabled) { background: var(--c-0e2418); border-color: var(--c-1d4a30); color: var(--c-b9f3d1); }
.skip-btn.small { width: auto; margin: 0 auto; padding: 9px 16px; font-size: 13px; }
.msg { min-height: 0; margin-top: 14px; font-size: 13px; color: var(--muted); text-align: center; }
.msg:empty { display: none; }
.msg .bad { color: var(--red); }
.msg.loading { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.4; } }
.msg .retry { margin-left: 8px; border: 1px solid var(--c-1d4a30); background: var(--c-0e2418); color: var(--c-b9f3d1); border-radius: 8px; padding: 5px 11px; font-weight: 700; }
.reveal { display: flex; align-items: center; gap: 12px; justify-content: center; text-align: left; }
.reveal img { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; }
.reveal b { display: block; font-size: 14px; color: var(--c-ffffff); }
.reveal small { color: var(--c-8a978e); font-size: 12px; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 35; }
.res { text-align: center; padding-top: 34px; }
.res-art { width: 148px; height: 148px; border-radius: 16px; object-fit: cover; background: var(--c-111a14); animation: artIn 0.7s var(--ease) both; }
.res.good .res-art { box-shadow: 0 0 0 1px var(--c-19d77b44), 0 0 70px var(--c-19d77b44); }
.res.bad .res-art { box-shadow: 0 0 70px var(--c-e94b3e44); }
@keyframes artIn { from { opacity: 0; transform: scale(0.8) translateY(20px); } }
.res-eyebrow { color: var(--c-ff5a4d); letter-spacing: 5px; font-size: 11px; font-weight: 800; margin-top: 20px; animation: rise 0.5s 0.1s var(--ease) both; }
.res-title { font: 700 28px var(--font-display); margin: 12px 0 4px; line-height: 1.15; animation: rise 0.5s 0.15s var(--ease) both; }
.res.good .res-title { margin-top: 22px; }
.res-sub { color: var(--c-9aa6a0); font-size: 14px; animation: rise 0.5s 0.2s var(--ease) both; }
.res-badges { display: flex; justify-content: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; align-items: center; }
.stamp { border: 2.5px solid var(--green); color: var(--green); border-radius: 999px; padding: 8px 16px; font: 800 13px var(--font-display); letter-spacing: 0.8px; transform: rotate(-4deg); box-shadow: 0 0 24px var(--c-19d77b33), inset 0 0 18px var(--c-19d77b22); animation: stamp 0.5s 0.3s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
@keyframes stamp { from { opacity: 0; transform: rotate(-4deg) scale(2); } }
.res.bad .stamp { border-color: var(--c-ff5a4d); color: var(--c-ff5a4d); box-shadow: 0 0 24px var(--c-ff5a4d33), inset 0 0 18px var(--c-ff5a4d22); }
.streak { display: inline-flex; align-items: center; gap: 6px; background: var(--c-0c1510); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13px; color: var(--green); animation: rise 0.5s 0.4s var(--ease) both; }
.res-actions { margin-top: 20px; display: flex; justify-content: center; animation: rise 0.5s 0.5s var(--ease) both; }
.res-next { border: 0; outline: 0; border-radius: 999px; background: var(--c-1f2721); color: var(--c-19d77b); padding: 15px 52px; font-weight: 800; font-size: 15px; letter-spacing: 0.3px; box-shadow: none; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.res-next:hover { background: var(--c-28342b); transform: translateY(-1px); }
.res-next:active { transform: none; }
.res.bad .res-next { background: var(--c-2a1d1a); color: var(--c-ff7a6b); }
.res.bad .res-next:hover { background: var(--c-352320); }
@media (hover: hover) and (pointer: fine) { .res-next::after { content: "\21B5"; margin-left: 12px; opacity: 0.55; font-weight: 700; } }
.cool { height: 3px; width: 150px; background: var(--c-ffffff10); border-radius: 9px; margin: 20px auto 0; overflow: hidden; }
.cool i { display: block; height: 100%; width: 0; background: var(--green); }
.res.bad .cool i { background: var(--c-ff5a4d); }
.primary { border: 0; border-radius: 12px; background: var(--accent); color: var(--c-05120a); padding: 13px 18px; font-weight: 800; white-space: nowrap; }
.primary:hover:not(:disabled) { background: var(--c-4be59b); transform: translateY(-1px); box-shadow: 0 8px 26px var(--c-19d77b30); }
.primary.full { width: 100%; }
.field { margin-bottom: 17px; }
.field-label { display: block; color: var(--c-aab5ad); font-size: 11px; font-weight: 800; letter-spacing: 1px; margin-bottom: 9px; }
.helper { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 10px; text-align: center; }
.dd { position: relative; }
.dd-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; background: var(--c-080c0a); border: 1px solid var(--line); border-radius: 12px; color: var(--c-7f8b83); padding: 13px 14px; text-align: left; }
.dd-btn.has { color: var(--c-ffffff); }
.dd-btn:hover, .dd.open .dd-btn { border-color: var(--c-19d77b88); }
.dd-btn svg { width: 12px; height: 12px; transition: transform 0.25s; }
.dd.open .dd-btn svg { transform: rotate(180deg); }
.dd-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--c-070b09); border: 1px solid var(--c-17261c); border-radius: 12px; padding: 5px; opacity: 0; transform: translateY(-6px) scale(0.98); transform-origin: top; pointer-events: none; transition: 0.22s var(--ease); z-index: 8; box-shadow: 0 18px 40px var(--c-000000aa); }
.dd.open .dd-menu { opacity: 1; transform: none; pointer-events: auto; }
.dd-menu.scroll { max-height: 226px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--c-1f3a2a) transparent; }
.duel-top .duel-right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.dtimer { display: none; font: 700 14px var(--font-display); color: var(--c-dfe8e1); background: var(--c-0b120e); border: 1px solid var(--line); border-radius: 20px; padding: 3px 10px; font-variant-numeric: tabular-nums; letter-spacing: 0.3px; }
.dtimer.on { display: inline-block; }
.dtimer.low { color: var(--c-ff7b7b); border-color: var(--c-ff5a5a66); animation: tpulse 1s ease-in-out infinite; }
@keyframes tpulse { 50% { background: var(--c-2a0f0f); } }
.dd-item { width: 100%; text-align: left; border: 0; background: transparent; color: var(--c-dfe8e1); padding: 11px 12px; border-radius: 9px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.dd-item:hover { background: var(--c-0e2418); color: var(--c-b9f3d1); }
.dd-item.sel { color: var(--accent); }
.dd-item svg { width: 14px; height: 14px; opacity: 0; }
.dd-item.sel svg { opacity: 1; }
.duel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.menu { background: var(--c-060908); border: 1px solid var(--c-111a14); border-radius: 16px; padding: 24px; animation: rise 0.55s var(--ease) both; }
.menu:nth-child(2) { animation-delay: 0.08s; }
.menu h2 { font: 600 20px var(--font-display); margin: 0 0 8px; }
.menu p { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 0 20px; }
.code-input { text-align: center; text-transform: uppercase; letter-spacing: 6px; font: 700 22px var(--font-display); }
.round-count { max-width: 140px; }
.lobby-code { font: 700 38px var(--font-display); letter-spacing: 8px; color: var(--accent); margin: 12px 0 14px; padding-left: 8px; }
.lobby-players { margin: 26px 0 8px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 700; }
.lobby-players small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.lobby-settings { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.lb-overlay { position: fixed; inset: 0; z-index: 25; display: none; align-items: center; justify-content: center; padding: 20px; background: var(--c-030504ee); backdrop-filter: blur(6px); }
.lb-overlay.open { display: flex; animation: fade 0.35s both; }
.lb-inner { width: min(420px, 100%); text-align: center; }
.lb-inner h2 { font: 700 26px var(--font-display); margin: 6px 0 14px; }
.lb { position: relative; margin-top: 18px; text-align: left; }
.lb-row { position: absolute; left: 0; right: 0; height: 62px; top: calc(var(--i) * 72px); display: flex; align-items: center; gap: 14px; padding: 0 16px; border-radius: 14px; background: var(--c-0a100c); border: 1px solid var(--line); transition: top 0.85s cubic-bezier(0.3, 0.9, 0.3, 1), background 0.4s, border-color 0.4s; }
.lb-row.first { background: linear-gradient(100deg, var(--c-10301f), var(--c-0b150f)); border-color: var(--c-25885066); z-index: 2; }
.lb-row .rank { font: 800 18px var(--font-display); color: var(--accent); width: 18px; }
.lb-row .nm { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-weight: 700; }
.lb-row .nm small { color: var(--muted); font-weight: 500; }
.lb-row .gain { font-size: 12px; color: var(--c-70efa5); font-weight: 800; opacity: 0; transition: opacity 0.4s; }
.lb-row .gain.show { opacity: 1; }
.lb-row .pts { font: 700 19px var(--font-display); font-variant-numeric: tabular-nums; min-width: 62px; text-align: right; }
.lb-foot { margin-top: 22px; font-size: 12px; color: var(--muted); }
.pd { text-align: center; padding-top: 40px; }
.pd-intro h2 { font: 700 34px var(--font-display); margin: 10px 0 0; }
.pd-bars { display: flex; gap: 6px; justify-content: center; align-items: flex-end; height: 64px; margin-top: 30px; }
.pd-bars i { width: 6px; border-radius: 4px; background: var(--accent); height: 8px; animation: eq 0.55s ease-in-out infinite alternate; animation-delay: calc(var(--k) * 60ms); }
@keyframes eq { to { height: 58px; } }
.pd-stage { display: none; }
.pd-stage.show { display: block; animation: fade 0.5s both; }
.pd-title { font: 700 34px var(--font-display); margin: 0; }
.pd-podium { display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin: 30px 0 28px; min-height: 340px; }
.pd-col { width: 150px; display: flex; flex-direction: column; align-items: center; }
.pd-av { position: relative; width: 56px; height: 56px; border-radius: 50%; background: var(--c-0e2418); border: 2px solid var(--c-1d4a30); display: grid; place-items: center; font: 800 22px var(--font-display); color: var(--accent); margin-bottom: 8px; }
.pd-col.first .pd-av { border-color: var(--accent); box-shadow: 0 0 34px var(--c-19d77b55); }
.crown { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); width: 26px; height: 26px; color: var(--c-ffd84d); }
.pd-name { font-weight: 800; max-width: 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; line-height: 1.2; }
.pd-name .nm-rk, .pd-title .nm-rk { flex-direction: column; gap: 3px; }
.pd-name .trophies, .pd-title .trophies { margin: 0; padding: 2px 0; }
.pd-name .nm-t, .pd-title .nm-t { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; text-align: center; }
.pd-title { overflow-wrap: anywhere; line-height: 1.15; font-size: clamp(22px, 7.2vw, 34px); }
.pd-title .nm-rk { display: inline-flex; vertical-align: bottom; }
.pd-name small { color: var(--muted); font-weight: 500; }
.pd-score { font: 700 15px var(--font-display); color: var(--accent); margin: 2px 0 10px; }
.pd-block { width: 100%; height: 0; border-radius: 14px 14px 0 0; background: linear-gradient(var(--c-142f21), var(--c-0a1710)); border: 1px solid var(--c-1b5a38); border-bottom: 0; display: flex; justify-content: center; padding-top: 12px; font: 800 36px var(--font-display); color: var(--c-8bf0b8); transition: height 1.1s cubic-bezier(0.2, 0.9, 0.2, 1); overflow: hidden; }
.pd-col.first .pd-block { background: linear-gradient(var(--c-1f7a49), var(--c-0d2418)); box-shadow: 0 0 50px var(--c-19d77b33); color: var(--c-d9ffe9); }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: var(--c-0c130f); border: 1px solid var(--c-1f2d24); color: var(--c-ffffff); padding: 12px 17px; border-radius: 11px; font-size: 13px; opacity: 0; pointer-events: none; transition: 0.3s var(--ease); z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-back { position: fixed; inset: 0; z-index: 40; background: var(--c-000000b8); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 18px; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.modal-back.open { opacity: 1; pointer-events: auto; }
.sheet { width: min(440px, 100%); max-height: 92vh; overflow: auto; background: var(--c-070b09); border: 1px solid var(--c-141d17); border-radius: 20px; padding: 24px; transform: translateY(18px) scale(0.96); transition: transform 0.4s var(--ease); box-shadow: 0 30px 80px var(--c-000000cc); }
.modal-back.open .sheet { transform: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.sheet-head h2 { font: 700 24px var(--font-display); margin: 0; }
.x { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--c-0a0f0c); color: var(--c-cfd8d1); display: grid; place-items: center; }
.x:hover { background: var(--c-0e2418); border-color: var(--c-1d4a30); color: var(--c-b9f3d1); transform: rotate(90deg); }
.x svg { width: 14px; height: 14px; }
.sheet section { margin-bottom: 22px; }
.sheet h3 { font-size: 11px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.slider-row { margin-bottom: 14px; }
.slider-row div { display: flex; justify-content: space-between; font-size: 13px; color: var(--c-cfd8d1); margin-bottom: 8px; }
.slider-row b { color: var(--accent); font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; appearance: none; height: 6px; padding: 0; border: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--v, 50%), var(--c-131a15) var(--v, 50%)); box-shadow: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid var(--c-070b09); box-shadow: 0 0 0 1px var(--accent); cursor: pointer; transition: transform 0.15s; }
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--c-070b09); cursor: pointer; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-tile { background: var(--c-0a100c); border: 1px solid var(--c-121b15); border-radius: 12px; padding: 14px 8px; text-align: center; }
.stat-tile b { display: block; font: 700 22px var(--font-display); color: var(--c-ffffff); }
.stat-tile span { display: block; margin-top: 4px; font-size: 10px; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
@media (max-width: 760px) {
  .mode-grid, .duel-grid { grid-template-columns: 1fr; }
  .mode-card { min-height: 170px; }
  .mode-icon { margin-bottom: 17px; }
}
.topbar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); padding-top: env(safe-area-inset-top); height: calc(68px + env(safe-area-inset-top)); }
.user-card { left: max(16px, env(safe-area-inset-left)); top: calc(14px + env(safe-area-inset-top)); }
.foot { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.toast { max-width: calc(100% - 32px); text-align: center; bottom: max(22px, env(safe-area-inset-bottom)); }
.pd-col { width: min(150px, 42vw); }
.sheet { max-height: 92vh; max-height: 92dvh; }
@media (max-width: 760px) {
  input, select { font-size: 16px; }
  .menu { padding: 18px; }
  .pd-title, .pd-intro h2 { font-size: 28px; }
}
@media (max-width: 420px) {
  main { width: calc(100% - 24px); padding-top: 18px; }
  .pill { padding: 8px 4px; font-size: 10.5px; }
  .diff { gap: 4px; }
  .play-row { --pb: 84px; }
  .play-big { width: 84px; height: 84px; }
  .play-big svg { width: 46px; height: 46px; }
  .clip-len { left: calc(50% + 52px); }
  .gs-btn { padding: 0 13px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .sheet { padding: 18px; border-radius: 18px; }
  .lobby-code { font-size: 30px; letter-spacing: 5px; }
  .res-art { width: 124px; height: 124px; }
  .res-title { font-size: 24px; }
  .pd-podium { gap: 8px; }
  .pd-col { width: 44vw; }
}
@media (max-width: 340px) {
  .hero h1 { font-size: 30px; }
  .mode-card { padding: 16px; min-height: 150px; }
  .pill { font-size: 9.5px; padding: 8px 2px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .topbar { height: calc(54px + env(safe-area-inset-top)); }
  .user-card { top: calc(9px + env(safe-area-inset-top)); }
  main { padding-top: 12px; }
  .game-body { margin-top: 12px; }
  .play-row { margin: 8px 0 14px; }
  .play-row { --pb: 70px; }
  .play-big { width: 70px; height: 70px; }
  .play-big svg { width: 38px; height: 38px; }
  .hero { margin: 4px auto 16px; }
  .res { padding-top: 6px; }
  .res-art { width: 96px; height: 96px; }
  .pd { padding-top: 12px; }
  .pd-podium { margin: 14px 0; }
  .mode-card { min-height: 150px; }
}
@media (min-width: 1500px) { main { width: min(1100px, calc(100% - 64px)); } }
[hidden] { display: none !important; }
.top-row { justify-content: space-between; }
.score-chip { display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 14px; background: var(--c-070b09); border: 1px solid var(--line); border-radius: 999px; color: var(--accent); font: 700 15px var(--font-display); font-variant-numeric: tabular-nums; }
.score-chip:hover { background: var(--c-0e2418); border-color: var(--c-1d4a30); }
.score-chip .rk { font-size: 12px; color: var(--c-8aa395); font-weight: 700; }
.score-chip .rk:empty { display: none; }
.nm-rk { display: inline-flex; align-items: center; }
.nm-rk { display: inline-flex; align-items: center; max-width: 100%; min-width: 0; vertical-align: middle; }
.nm-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trophies { display: inline-flex; align-items: center; flex: none; margin: 0 calc(var(--s, 1em) * 0.5) 0 0; padding: 2px 3px 2px 0; border: 0; background: none; color: inherit; font: inherit; cursor: help; border-radius: 8px; }
.trophies:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tr { --w: calc(var(--s, 1em) * 0.69); display: inline-grid; flex: none; position: relative; width: var(--w); height: var(--s, 1em); margin-left: calc(var(--w) * -0.52); z-index: calc(30 - var(--i, 0)); filter: drop-shadow(1px 0 1px var(--c-000000aa)); transition: transform 0.18s var(--ease); }
.tr:first-child { margin-left: 0; }
.tr.cr + .tr.md { margin-left: calc(var(--s, 1em) * 0.3); }
.tr.cr + .tr.md { margin-left: calc(var(--s, 1em) * 0.28); }   
.tr.cr { --w: calc(var(--s, 1em) * 1.03); height: calc(var(--s, 1em) * 0.85); }
.tr svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tr svg * { stroke: var(--c-050806); stroke-width: 1.5; stroke-linejoin: round; paint-order: stroke; }
.trophies:hover .tr { transform: translateY(-1px); }
.tr.rk1 { color: var(--c-ffd84d); } .tr.rk2 { color: var(--c-d6dde3); } .tr.rk3 { color: var(--c-e29a5f); }
#trModal { z-index: 70; }
.tr-list { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 16px; }
.tr-item { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 12px; background: var(--c-0a100c); border: 1px solid var(--line); }
.tr-item .tr { --s: 26px; margin: 0; min-width: 22px; justify-content: center; }
.tr-item b { display: block; font-size: 14px; }
.tr-item span.d { color: var(--muted); font-size: 12.5px; }
.tr-note { color: var(--muted); font-size: 12.5px; line-height: 1.55; margin: 0; }
.tr-who { word-break: break-word; overflow-wrap: anywhere; font: 700 21px var(--font-display); margin: 0; min-width: 0; }
.menu-pop { position: absolute; left: 0; top: calc(100% + 8px); min-width: 210px; background: var(--c-070b09); border: 1px solid var(--c-17261c); border-radius: 14px; padding: 6px; opacity: 0; transform: translateY(-6px) scale(0.97); transform-origin: top left; pointer-events: none; transition: 0.22s var(--ease); z-index: 20; box-shadow: 0 18px 40px var(--c-000000aa); }
.menu-pop.open { opacity: 1; transform: none; pointer-events: auto; }
.menu-item { width: 100%; display: flex; align-items: center; gap: 11px; border: 0; background: transparent; color: var(--c-dfe8e1); padding: 11px 12px; border-radius: 9px; font-weight: 700; font-size: 13px; text-align: left; }
.menu-item:hover { background: var(--c-0e2418); color: var(--c-b9f3d1); }
.menu-item svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.click-actions { display: flex; gap: 8px; margin-top: 10px; align-items: stretch; }
.click-actions .skip-btn { margin-top: 0; flex: 1; padding: 9px 14px; font-size: 13px; }
.hearts { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 76px; padding: 0 14px; background: var(--c-070b09); border: 1px solid var(--line); border-radius: 12px; font: 800 16px var(--font-display); color: var(--c-ffffff); font-variant-numeric: tabular-nums; }
.hearts svg { width: 18px; height: 18px; color: var(--c-ff5a78); }
.hearts.hit { animation: heartHit 0.55s; }
@keyframes heartHit { 30% { transform: scale(1.14); border-color: var(--c-ff5a7899); box-shadow: 0 0 20px var(--c-ff5a7844); } }
.sugg.open { max-height: 340px; overflow-y: auto; padding-right: 3px; scrollbar-width: thin; scrollbar-color: var(--c-1d4a30) transparent; }
.sugg.open::-webkit-scrollbar { width: 6px; }
.sugg.open::-webkit-scrollbar-thumb { background: var(--c-1d4a30); border-radius: 9px; }
.sugg-row { flex: none; }
.join-msg { font-size: 13px; font-weight: 600; color: var(--c-ff8e8e); text-align: center; max-height: 0; opacity: 0; overflow: hidden; margin-top: 0; transition: 0.3s; line-height: 1.45; }
.join-msg.show { max-height: 70px; opacity: 1; margin-top: 12px; }
.join-msg.note { color: var(--c-9aa6a0); }
.code-input.err { border-color: var(--red); background: var(--c-150b0b); }
input.shake { animation: shake 0.4s; }
.lobby-head { display: flex; justify-content: space-between; margin: 24px 0 8px; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; color: var(--c-8a978e); }
.player-list { display: flex; flex-direction: column; gap: 6px; text-align: left; max-height: 320px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--c-1d4a30) transparent; }
.pl-row { flex: none; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--c-0a100c); border: 1px solid var(--line); border-radius: 12px; animation: rise 0.3s var(--ease) both; }
.pl-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.pl-name small, .lbr-name small, .lb-row .nm small, .pd-rest-row .nm small { flex: none; }
.pl-name small { color: var(--muted); font-weight: 500; }
.pl-tag { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--accent); }
.kick { width: 30px; height: 30px; flex: none; border: 1px solid var(--line); border-radius: 8px; background: var(--c-0a0f0c); color: var(--c-9aa6a0); display: grid; place-items: center; }
.kick:hover { background: var(--c-2a1010); border-color: var(--c-7a2a2a); color: var(--c-ff8e8e); }
.kick svg { width: 13px; height: 13px; }
.lobby-settings { margin-top: 16px; }
.diff.off { opacity: 0.35; pointer-events: none; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 8px 0 14px; font-size: 13px; font-weight: 700; color: var(--c-cfd8d1); }
.switch-row small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; margin-top: 3px; line-height: 1.4; }
.switch { position: relative; width: 46px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; z-index: 1; -webkit-appearance: none; appearance: none; }
.switch i { position: absolute; inset: 0; background: var(--c-0b100d); border: 1px solid var(--line); border-radius: 99px; transition: 0.25s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--c-6d7a72); transition: 0.25s var(--ease); }
.switch input:checked + i { background: var(--c-0e2418); border-color: var(--c-1d6a40); }
.switch input:checked + i::after { transform: translateX(20px); background: var(--accent); }
.pd-col { width: min(140px, 29vw); }
.pd-rest { max-width: 380px; margin: 0 auto 22px; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; text-align: left; scrollbar-width: thin; scrollbar-color: var(--c-1d4a30) transparent; }
.pd-rest-row { flex: none; display: flex; gap: 12px; align-items: center; padding: 9px 14px; background: var(--c-0a100c); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.pd-rest-row .rn { width: 22px; color: var(--c-6d7a72); font: 800 14px var(--font-display); }
.pd-rest-row .nm { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-weight: 700; }
.pd-rest-row b { font: 700 14px var(--font-display); color: var(--accent); }
.lb-overlay { overflow-y: auto; }
.lb-inner { margin: auto; }
@media (max-width: 420px) { .pd-col { width: 30vw; } .pd-podium { gap: 6px; } .pd-name { font-size: 13px; } }
.lbsheet { width: min(500px, 100%); }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; background: var(--c-050806); border: 1px solid var(--c-0f1712); border-radius: 12px; padding: 4px; }
.tab { flex: 1; border: 0; background: transparent; color: var(--c-7f8b83); font: 700 13px var(--font-body); padding: 9px 6px; border-radius: 9px; }
.tab:hover { color: var(--c-cfd8d1); }
.tab.sel { background: var(--c-0e2418); color: var(--c-b9f3d1); box-shadow: 0 0 0 1px var(--c-1d4a30); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 14px; }
.chip { border: 1px solid var(--line); background: var(--c-0a0f0c); color: var(--c-9aa6a0); font: 700 12px var(--font-body); padding: 7px 12px; border-radius: 999px; }
.chip:hover { color: var(--c-cfd8d1); border-color: var(--c-1d4a30); }
.chip.sel { background: var(--accent); border-color: var(--accent); color: var(--c-05120a); }
.lbr { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; margin-bottom: 6px; background: var(--c-0a100c); border: 1px solid var(--line); animation: rise 0.35s var(--ease) both; }
.lbr-rank { width: 26px; font: 800 15px var(--font-display); color: var(--c-6d7a72); }
.lbr-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.lbr-name small { color: var(--muted); font-weight: 500; }
.lbr b { font: 700 15px var(--font-display); font-variant-numeric: tabular-nums; color: var(--c-dfe8e1); }
.lbr.p1 { background: linear-gradient(100deg, var(--c-40320b), var(--c-1b1606)); border-color: var(--c-9c7a14); }
.lbr.p1 .lbr-rank { color: var(--c-ffd84d); } .lbr.p1 b { color: var(--c-ffe58a); }
.lbr.p2 { background: linear-gradient(100deg, var(--c-2f353a), var(--c-15191c)); border-color: var(--c-76828d); }
.lbr.p2 .lbr-rank { color: var(--c-d6dde3); } .lbr.p2 b { color: var(--c-e8edf1); }
.lbr.p3 { background: linear-gradient(100deg, var(--c-40261a), var(--c-1b100a)); border-color: var(--c-9a6038); }
.lbr.p3 .lbr-rank { color: var(--c-e29a5f); } .lbr.p3 b { color: var(--c-f0b78a); }
.lbr.me { box-shadow: 0 0 0 1px var(--c-19d77b77); }
.lb-note { color: var(--muted); font-size: 13px; text-align: center; padding: 22px 8px; line-height: 1.5; }
.lb-dots { text-align: center; color: var(--c-4f5c54); letter-spacing: 4px; margin: 2px 0 8px; }
.reset-btn { margin-top: 12px; width: 100%; border: 1px solid var(--c-3a1c1c); background: var(--c-140a0a); color: var(--c-ff8e8e); border-radius: 12px; padding: 11px; font-weight: 700; font-size: 13px; }
.reset-btn:hover { background: var(--c-231010); border-color: var(--c-7a2a2a); }
.sheet.small { width: min(400px, 100%); }
.sheet p.sub { color: var(--muted); font-size: 13px; line-height: 1.5; margin: -8px 0 16px; }
.form { display: flex; flex-direction: column; gap: 9px; }
.auth-msg { display: none; font-size: 12px; color: var(--c-ff8e8e); margin-top: 11px; line-height: 1.45; text-align: center; }
.auth-msg.show { display: block; } .auth-msg.good { color: var(--c-70efa5); }
.auth-switch { font-size: 12px; color: var(--muted); text-align: center; margin: 14px 0 0; }
.link { color: var(--accent); font: inherit; font-weight: 700; background: none; border: 0; padding: 0; cursor: pointer; }
.link:hover { text-decoration: underline; }
.link.muted { color: var(--c-9aa6a0); font-size: 12px; font-weight: 600; }
.forgot { display: block; text-align: center; margin-top: 12px; }
.acc-label { font-size: 10px; font-weight: 800; letter-spacing: 1.2px; color: var(--c-8a978e); margin: 12px 0 7px; }
.acc-label:first-child { margin-top: 0; }
.acc-field { display: flex; align-items: center; gap: 8px; }
.acc-wrap { position: relative; flex: 1; min-width: 0; }
.acc-input[readonly] { background: var(--c-060908); color: var(--c-7f8b83); border-color: var(--c-101813); cursor: default; }
.acc-input.editing { background: var(--c-080c0a); color: var(--c-ffffff); border-color: var(--c-19d77b88); }
.icon-btn { width: 44px; height: 44px; flex: none; border: 1px solid var(--line); background: var(--c-0a0f0c); color: var(--c-cfd8d1); border-radius: 12px; display: grid; place-items: center; }
.icon-btn:hover { background: var(--c-0e2418); border-color: var(--c-1d4a30); color: var(--c-b9f3d1); }
.icon-btn svg { width: 16px; height: 16px; }
.eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: transparent; color: var(--c-7f8b83); display: grid; place-items: center; border-radius: 8px; }
.eye:hover { color: var(--c-b9f3d1); }
.eye svg { width: 17px; height: 17px; }
.acc-wrap input.has-eye { padding-right: 42px; }
.logout { margin-top: 18px; width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--c-0a0f0c); color: var(--c-cfd8d1); padding: 11px; font-weight: 700; font-size: 13px; }
.logout:hover { background: var(--c-0e2418); border-color: var(--c-1d4a30); color: var(--c-b9f3d1); }
#welcomeModal { z-index: 60; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace !important; font-size: 12px !important; letter-spacing: 0; text-overflow: ellipsis; }
.hint { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 10px 0 0; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  #intro { display: none !important; }
  .play-ring { display: none !important; }
}
.sheet.leave { width: min(380px, 100%); text-align: center; padding: 28px 22px 22px; border-color: var(--c-2a1d1a); }
.modal-back.open .sheet.leave { animation: lvPop 0.45s var(--ease); }
@keyframes lvPop { 0% { transform: translateY(22px) scale(0.94); } 60% { transform: translateY(-3px) scale(1.01); } 100% { transform: none; } }
.lv-ic { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--c-2a1411); color: var(--c-ff7a63); border: 1.5px solid var(--c-5a2a22); }
.lv-ic svg { width: 26px; height: 26px; }
.sheet.leave h2 { margin: 0 0 6px; font: 800 23px var(--font-display); }
.sheet.leave p { margin: 0; color: var(--c-a2afa7); font: 500 14.5px / 1.4 var(--font-display); }
.lv-stats { display: flex; gap: 8px; margin: 18px 0 20px; }
.lv-stats span { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 10px 4px; border-radius: 11px; background: var(--c-0d1310); border: 1px solid var(--c-1d2822); }
.lv-stats small { font: 800 9.5px var(--font-display); letter-spacing: 1.3px; color: var(--c-6f8d7c); }
.lv-stats b { font: 800 18px var(--font-display); color: var(--c-e9f1ec); font-variant-numeric: tabular-nums; }
.lv-actions { display: flex; flex-direction: column; gap: 9px; }
.lv-actions .primary { width: 100%; padding: 14px 18px; font-size: 15px; }
.lv-go { width: 100%; padding: 13px 18px; border-radius: 12px; border: 1.5px solid var(--c-5a2a22); background: transparent; color: var(--c-ff8d78); font: 800 14.5px var(--font-display); cursor: pointer; transition: background 0.2s, color 0.2s; }
.lv-go:hover { background: var(--c-ff6a3d); color: var(--c-1a0a05); border-color: var(--c-ff6a3d); }
    

.rg-cheat { margin-left: auto; margin-right: 8px; font: 700 11px var(--font-body); letter-spacing: 0.2px; color: var(--c-ffb4a8); background: var(--c-2a1411); border: 1px solid var(--c-6a2c22); border-radius: 7px; padding: 4px 8px; max-width: 60%; animation: cheatPulse 1.6s ease-in-out infinite; }
.rg-cheat[hidden] { display: none; }
.cheat-note { margin: 10px 4px 0; font: 600 12px var(--font-body); color: var(--c-ffb4a8); text-align: center; line-height: 1.55; }
.cheat-note[hidden] { display: none; }
.mr-cheat { font-style: normal; font: 800 9px var(--font-body); letter-spacing: 0.9px; color: var(--c-ffb4a8); background: var(--c-2a1411); border: 1px solid var(--c-6a2c22); border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: middle; }

@keyframes cheatPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--c-ff6a3d00);
  }
  50% {
    box-shadow: 0 0 14px 0 var(--c-ff6a3d55);
  }
}


#soloStack,
#duelStack {
  width: min(510px, 100%);
}
