:root {
  --bg: #0f0e0b;
  --panel: #181611;
  --panel-2: #201d16;
  --line: #343026;
  --text: #f7f2e5;
  --muted: #aaa394;
  --yellow: #f2bf3d;
  --yellow-2: #ffd86d;
  --ink: #17130a;
  --green: #52d48f;
  --red: #ff6f68;
  --shadow: 0 26px 70px rgba(0,0,0,.34);
  --radius: 20px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(242,191,61,.09), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
button,input { font: inherit; }
button { color: inherit; }
button:focus-visible,input:focus-visible { outline: 3px solid rgba(242,191,61,.42); outline-offset: 3px; }
.grain { position: fixed; inset: 0; pointer-events: none; opacity: .12; z-index: -1; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E"); }
.topbar { width: min(1180px, calc(100% - 36px)); margin: 0 auto; height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--yellow); color: var(--ink); font-weight: 950; font-size: 20px; transform: rotate(-3deg); box-shadow: 0 8px 26px rgba(242,191,61,.2); }
.brand strong,.brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .01em; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 2px; text-transform: uppercase; letter-spacing: .16em; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.text-btn,.icon-btn { border: 1px solid var(--line); background: #171510; cursor: pointer; transition: .2s ease; }
.text-btn:hover,.icon-btn:hover { border-color: #575044; background: #201d17; }
.text-btn { height: 40px; padding: 0 14px; border-radius: 10px; color: #d9d2c3; font-size: 13px; font-weight: 750; }
.text-btn span { color: var(--yellow); margin-left: 4px; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.icon-btn svg { width: 18px; fill: none; stroke: #d9d2c3; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.page-shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 74px 0 42px; }
.hero { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 44px; padding-bottom: 56px; }
.eyebrow,.section-kicker { margin: 0 0 10px; color: var(--yellow); letter-spacing: .16em; font-size: 11px; font-weight: 850; }
h1 { margin: 0; max-width: 790px; font-size: clamp(42px, 6vw, 78px); line-height: .96; letter-spacing: -.055em; font-weight: 900; }
.hero-copy { max-width: 700px; color: var(--muted); line-height: 1.65; font-size: 16px; margin: 23px 0 0; }
.word-count-card { min-width: 170px; border-left: 3px solid var(--yellow); padding: 8px 0 8px 20px; }
.word-count-card strong,.word-count-card span { display: block; }
.word-count-card strong { font-size: 36px; letter-spacing: -.04em; }
.word-count-card span { color: var(--muted); margin-top: 3px; font-size: 13px; }
.tier-section { border-top: 1px solid rgba(255,255,255,.09); padding: 34px 0 46px; }
.section-heading { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 18px; }
h2 { font-size: 25px; margin: 0; letter-spacing: -.025em; }
.tier-description { color: var(--muted); margin: 0; max-width: 470px; text-align: right; font-size: 13px; }
.tier-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.tier-card { position: relative; text-align: left; min-height: 125px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #16140f; cursor: pointer; overflow: hidden; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.tier-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.tier-card:hover { transform: translateY(-2px); border-color: #585043; background: #1b1812; }
.tier-card.active { border-color: rgba(242,191,61,.58); background: #201b10; }
.tier-card.active::after { transform: scaleX(1); }
.tier-number { display: block; color: #7e7769; font-size: 11px; font-weight: 800; letter-spacing: .12em; margin-bottom: 28px; }
.tier-card strong,.tier-card small { display: block; }
.tier-card strong { font-size: 17px; }
.tier-card small { color: var(--muted); margin-top: 4px; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .75fr); gap: 18px; align-items: start; }
.game-card,.stats-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.game-card { padding: clamp(22px, 4vw, 42px); position: relative; overflow: hidden; }
.game-card::before { content: ""; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: rgba(242,191,61,.05); right: -130px; top: -130px; pointer-events: none; }
.round-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 35px; }
.difficulty-chip { display: inline-flex; height: 28px; align-items: center; border-radius: 7px; padding: 0 10px; background: var(--yellow); color: var(--ink); font-size: 10px; letter-spacing: .13em; font-weight: 950; }
.round-counter { color: var(--muted); font-size: 12px; font-weight: 700; }
.audio-zone { display: flex; align-items: center; gap: 12px; }
.listen-btn { flex: 1; display: flex; align-items: center; min-height: 100px; text-align: left; gap: 16px; border: 1px solid #3b362a; background: #211e16; border-radius: 16px; padding: 14px 18px; cursor: pointer; transition: .2s ease; }
.listen-btn:hover { border-color: rgba(242,191,61,.55); background: #272216; transform: translateY(-1px); }
.listen-btn.playing { border-color: var(--yellow); }
.speaker-disc { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--yellow); color: var(--ink); box-shadow: 0 0 0 0 rgba(242,191,61,.28); }
.listen-btn.playing .speaker-disc { animation: pulse 1s infinite; }
.speaker-disc svg { width: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.listen-copy { min-width: 0; }
.listen-copy strong,.listen-copy small { display: block; }
.listen-copy strong { font-size: 18px; }
.listen-copy small { color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.wave { margin-left: auto; display: flex; align-items: center; gap: 3px; height: 28px; opacity: .45; }
.wave i { display: block; width: 3px; height: 8px; background: var(--yellow); border-radius: 10px; }
.wave i:nth-child(2),.wave i:nth-child(4) { height: 16px; }
.wave i:nth-child(3) { height: 24px; }
.playing .wave i { animation: wave .75s ease-in-out infinite alternate; }
.playing .wave i:nth-child(2) { animation-delay: .12s; }.playing .wave i:nth-child(3) { animation-delay: .24s; }.playing .wave i:nth-child(4) { animation-delay: .36s; }.playing .wave i:nth-child(5) { animation-delay: .48s; }
.letter-count { flex: 0 0 84px; min-height: 100px; border: 1px solid var(--line); border-radius: 16px; background: #14130f; display: grid; place-content: center; text-align: center; color: var(--muted); font-size: 11px; }
.letter-count span { color: var(--text); font-size: 25px; font-weight: 900; line-height: 1; margin-bottom: 5px; }
.clue-row { display: flex; gap: 8px; margin-top: 12px; }
.clue-btn { border: 0; background: transparent; color: #bdb5a6; padding: 8px 10px; border-radius: 8px; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; font-size: 12px; font-weight: 700; }
.clue-btn:hover { background: rgba(255,255,255,.045); color: var(--text); }
.clue-btn svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.clue-panel { margin-top: 8px; border-left: 2px solid var(--yellow); background: #13120e; padding: 13px 15px; color: #d7d0c1; line-height: 1.55; font-size: 13px; border-radius: 0 10px 10px 0; animation: slideDown .22s ease; }
.answer-form { margin-top: 30px; }
.answer-form label { display: block; font-size: 12px; font-weight: 800; color: #cfc8b9; margin-bottom: 9px; }
.input-wrap { position: relative; }
.answer-form input { width: 100%; height: 62px; border: 1px solid #403a2e; background: #11100d; border-radius: 13px; color: var(--text); font-size: 21px; padding: 0 50px 0 17px; outline: none; transition: border-color .2s ease, box-shadow .2s ease; }
.answer-form input::placeholder { color: #686257; }
.answer-form input:focus { border-color: rgba(242,191,61,.72); box-shadow: 0 0 0 4px rgba(242,191,61,.08); }
.answer-form input.correct { border-color: rgba(82,212,143,.7); }.answer-form input.incorrect { border-color: rgba(255,111,104,.72); }
.input-state { position: absolute; right: 17px; top: 50%; transform: translateY(-50%); font-size: 20px; font-weight: 900; }
.primary-btn { width: 100%; height: 54px; margin-top: 10px; border: 0; border-radius: 12px; background: var(--yellow); color: var(--ink); font-weight: 900; cursor: pointer; transition: transform .18s ease, background .18s ease; }
.primary-btn:hover { background: var(--yellow-2); transform: translateY(-1px); }.primary-btn:active { transform: translateY(1px); }
.primary-btn:disabled { opacity: .46; cursor: default; transform: none; }
.feedback { min-height: 22px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.feedback.success { color: var(--green); }.feedback.error { color: var(--red); }
.secondary-actions { margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.secondary-btn { height: 44px; border: 1px solid var(--line); background: #14130f; border-radius: 10px; color: #d4ccbd; cursor: pointer; font-size: 12px; font-weight: 800; transition: .18s ease; }
.secondary-btn:hover { border-color: #595144; background: #1c1913; }
.revealed-word { margin-top: 16px; padding: 18px; border-radius: 12px; background: #231e10; border: 1px solid rgba(242,191,61,.35); animation: reveal .32s cubic-bezier(.2,.7,.2,1); }
.revealed-word span,.revealed-word strong { display: block; }
.revealed-word span { color: var(--muted); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; }
.revealed-word strong { font-size: clamp(25px, 5vw, 42px); margin-top: 5px; letter-spacing: -.035em; overflow-wrap: anywhere; }
.stats-panel { padding: 24px; background: #14130f; position: sticky; top: 18px; }
.stats-heading { display: flex; align-items: start; justify-content: space-between; }
.live-dot { font-size: 9px; letter-spacing: .12em; color: var(--green); border: 1px solid rgba(82,212,143,.25); background: rgba(82,212,143,.07); padding: 5px 7px; border-radius: 7px; font-weight: 900; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 22px; }
.stat { border: 1px solid var(--line); background: #1a1813; padding: 14px; border-radius: 11px; }
.stat span,.stat strong { display: block; }.stat span { color: var(--muted); font-size: 10px; }.stat strong { margin-top: 8px; font-size: 24px; letter-spacing: -.035em; }
.progress-block { margin-top: 25px; }
.progress-label { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }.progress-label strong { color: #d4ccbd; }
.progress-track { height: 6px; background: #262219; border-radius: 10px; overflow: hidden; margin-top: 9px; }.progress-track span { display: block; height: 100%; width: 0%; background: var(--yellow); border-radius: inherit; transition: width .35s ease; }
.history-block { margin-top: 27px; }
.history-title { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 800; }
.history-title button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; font-size: 10px; }.history-title button:hover { color: var(--text); }
.history-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 190px; overflow: auto; scrollbar-width: thin; scrollbar-color: #403a2f transparent; }
.history-item { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.055); padding: 8px 1px; gap: 10px; font-size: 12px; animation: slideDown .2s ease; }.history-item:last-child { border-bottom: 0; }.history-item span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.history-item b { font-size: 10px; }.history-item.good b { color: var(--green); }.history-item.bad b { color: var(--red); }.history-empty { color: #736d61; font-size: 11px; line-height: 1.5; margin: 10px 0 0; }
.shortcut-card { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); font-size: 10px; display: grid; gap: 8px; }.shortcut-card>span { font-weight: 850; color: #d3ccbd; margin-bottom: 2px; }.shortcut-card div { display: flex; align-items: center; gap: 5px; }kbd { min-width: 24px; padding: 3px 5px; border: 1px solid #444033; background: #211e18; border-radius: 5px; color: #cfc8ba; text-align: center; box-shadow: inset 0 -1px 0 rgba(255,255,255,.08); }
.bank-section { margin-top: 76px; border-top: 1px solid rgba(255,255,255,.09); border-bottom: 1px solid rgba(255,255,255,.09); padding: 38px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }.bank-section p:last-child { color: var(--muted); line-height: 1.7; margin: 0; font-size: 14px; }
footer { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 24px 0 34px; display: flex; justify-content: space-between; color: #777065; font-size: 11px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: #f6f0df; color: #17130a; padding: 11px 15px; border-radius: 10px; font-weight: 800; font-size: 12px; box-shadow: 0 16px 50px rgba(0,0,0,.45); pointer-events: none; transition: .25s ease; z-index: 50; }.toast.show { opacity: 1; transform: translate(-50%,0); }
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }.confetti { position: absolute; width: 7px; height: 12px; background: var(--yellow); top: 40%; left: 50%; animation: confetti .8s ease-out forwards; }
.shake { animation: shake .28s ease; }
@keyframes pulse { 50% { box-shadow: 0 0 0 13px rgba(242,191,61,0); } }
@keyframes wave { to { height: 5px; opacity: .55; } }
@keyframes slideDown { from { opacity:0; transform:translateY(-6px) } to { opacity:1; transform:none } }
@keyframes reveal { from { opacity:0; transform:scale(.98) translateY(-4px) } to { opacity:1; transform:none } }
@keyframes shake { 25%{transform:translateX(-7px)} 50%{transform:translateX(6px)} 75%{transform:translateX(-3px)} }
@keyframes confetti { to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity:0; } }
@media (max-width: 900px) {
  .tier-grid { grid-template-columns: repeat(3,1fr); }.tier-card:nth-child(4),.tier-card:nth-child(5){ grid-column: span 1; }
  .game-layout { grid-template-columns: 1fr; }.stats-panel { position: static; }.hero { grid-template-columns: 1fr; }.word-count-card { width: max-content; }.bank-section { grid-template-columns:1fr; gap:16px; }
}
@media (max-width: 620px) {
  .topbar,.page-shell,footer { width: min(100% - 24px,1180px); }.topbar { height:70px; }.page-shell { padding-top:46px; }
  .text-btn { display:none; } h1 { font-size:44px; }.hero { padding-bottom:42px; }.section-heading { align-items:start; flex-direction:column; gap:7px; }.tier-description { text-align:left; }
  .tier-grid { grid-template-columns:1fr 1fr; }.tier-card { min-height:104px; }.tier-card:last-child { grid-column:1/-1; }.tier-number { margin-bottom:18px; }
  .game-card { padding:20px 16px; border-radius:16px; }.audio-zone { align-items:stretch; }.listen-btn { min-height:94px; padding:12px; }.speaker-disc { width:50px;height:50px; }.listen-copy strong{font-size:15px}.listen-copy small{max-width:180px}.wave{display:none}.letter-count{min-height:94px;flex-basis:66px}.clue-row{flex-wrap:wrap}.secondary-actions{grid-template-columns:1fr}.stats-panel{border-radius:16px}footer{flex-direction:column;gap:7px}.shortcut-card{display:none}
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; scroll-behavior:auto !important; } }
