/* ============================================================
   TebakKata — Main Stylesheet
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:        #c9a84c;
  --gold-lt:     #f0d27a;
  --gold-dk:     #8a6220;
  --bg:          #0d0d0e;
  --bg2:         #131315;
  --bg3:         #1a1a1e;
  --surface:     #1e1e23;
  --surface2:    #252529;
  --surface3:    #2c2c32;
  --border:      rgba(201,168,76,.1);
  --border2:     rgba(201,168,76,.22);
  --border3:     rgba(201,168,76,.4);
  --text:        #f0ebe0;
  --text2:       #9e9688;
  --text3:       #545250;
  --yes:         #4caf7a;
  --yes-bg:      rgba(76,175,122,.12);
  --maybe:       #e9a84c;
  --maybe-bg:    rgba(233,168,76,.12);
  --no:          #e05252;
  --no-bg:       rgba(224,82,82,.12);
  --r:           14px;
  --r-sm:        9px;
  --shadow:      0 4px 40px rgba(0,0,0,.45);
  --font-d:      'Playfair Display', Georgia, serif;
  --font-b:      'DM Sans', system-ui, sans-serif;
  --ease:        cubic-bezier(.4,0,.2,1);
}

html, body { height: 100%; background: var(--bg); color: var(--text); font-family: var(--font-b); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* ---- Backgrounds ---- */
.bg-noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  background-repeat: repeat;
}
.bg-radial {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: url("https://files.catbox.moe/ber0no.jpeg");
}
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(201,168,76,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(201,168,76,.035) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ---- Screens ---- */
.screen { display: none; min-height: 100vh; position: relative; z-index: 1; flex-direction: column; }
.screen.active { display: flex; }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--r);
  background: linear-gradient(135deg, rgba(201,168,76,.04) 0%, transparent 60%);
  pointer-events: none;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--r-sm); font-family: var(--font-b);
  font-size: 14px; font-weight: 500; border: none; cursor: pointer;
  transition: all .15s var(--ease); text-decoration: none; white-space: nowrap; user-select: none;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dk) 100%);
  color: #1a1000; font-weight: 600;
  box-shadow: 0 2px 16px rgba(201,168,76,.2);
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 24px rgba(201,168,76,.3); }
.btn-primary:active { transform: translateY(0); filter: brightness(.95); }
.btn-outline { background: transparent; color: var(--gold); border: 1px solid var(--border2); }
.btn-outline:hover { background: rgba(201,168,76,.08); border-color: var(--gold); }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface2); color: var(--text); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.w-full { width: 100%; }

.btn-icon-sm {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text2); cursor: pointer; transition: all .15s var(--ease); flex-shrink: 0;
}
.btn-icon-sm:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }
.btn-icon-sm svg { width: 14px; height: 14px; }

/* ---- Inputs ---- */
.field-group { margin-bottom: 14px; }
.field-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text2); margin-bottom: 6px; }
.field-opt { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11px; color: var(--text3); }
.field-input {
  width: 100%; padding: 10px 14px; background: var(--bg3);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text); font-family: var(--font-b); font-size: 14px; outline: none;
  transition: border-color .15s var(--ease);
}
.field-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.1); }
.field-input::placeholder { color: var(--text3); }
.code-input { font-size: 18px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.input-row { display: flex; gap: 8px; align-items: center; }
.input-row .field-input { flex: 1; margin: 0; }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 3px; background: var(--bg3); border-radius: var(--r-sm); padding: 4px; margin-bottom: 20px; }
.tab { flex: 1; padding: 9px 16px; border-radius: 6px; border: none; background: transparent; color: var(--text2); font-family: var(--font-b); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s var(--ease); }
.tab.active { background: var(--surface2); color: var(--gold); box-shadow: 0 1px 6px rgba(0,0,0,.3); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ===================================================
   LOBBY
   =================================================== */
.lobby-wrap {
  max-width: 420px; width: 100%; margin: 0 auto; padding: 56px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  position: relative; z-index: 1;
}
.logo-block { display: flex; align-items: center; gap: 16px; }
.logo-mark svg { width: 56px; height: 56px; }
.logo-heading { font-family: var(--font-d); font-size: 36px; font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--gold-lt), var(--gold)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.logo-tagline { font-size: 12px; color: var(--text2); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.lobby-card { width: 100%; }
.lobby-card .btn-primary { margin-top: 6px; }
.lobby-status { min-height: 20px; font-size: 13px; color: var(--text2); text-align: center; margin-top: 10px; }
.lobby-status.error { color: var(--no); }
.lobby-status.success { color: var(--yes); }
.admin-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text3); text-decoration: none; transition: color .15s; }
.admin-link:hover { color: var(--gold); }
.admin-link svg { width: 13px; height: 13px; }

/* ===================================================
   WAITING ROOM
   =================================================== */
.waiting-wrap {
  max-width: 580px; width: 100%; margin: 0 auto; padding: 40px 20px 120px;
  display: flex; flex-direction: column; gap: 20px; position: relative; z-index: 1;
}
.room-code-block { text-align: center; padding: 8px; }
.rc-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text3); margin-bottom: 6px; }
.rc-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.rc-code { font-family: var(--font-d); font-size: 52px; font-weight: 900; color: var(--gold); letter-spacing: .15em; line-height: 1; }
.rc-hint { font-size: 12px; color: var(--text3); margin-top: 4px; }

.card-section-title { font-family: var(--font-d); font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 14px; }

.players-list { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.player-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r-sm);
  transition: border-color .15s;
}
.player-item.is-host { border-color: var(--border2); }
.player-item.is-me { background: rgba(201,168,76,.04); }
.player-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-dk));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-size: 14px; font-weight: 700; color: #1a1000;
}
.player-name { flex: 1; font-size: 14px; font-weight: 500; }
.badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: .05em; }
.host-badge { background: rgba(201,168,76,.12); color: var(--gold); border: 1px solid var(--border2); }
.spec-badge { background: var(--surface2); color: var(--text2); border: 1px solid var(--border); }
.you-tag { font-size: 11px; color: var(--text2); font-weight: 400; }
.loading-pulse { color: var(--text3); font-size: 13px; padding: 16px 0; }

.waiting-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ===================================================
   MIC BAR
   =================================================== */
.mic-bar {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border2); border-radius: 40px;
  padding: 10px 18px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow); z-index: 100; min-width: 260px;
}
.mic-btn {
  width: 42px; height: 42px; border-radius: 50%; border: none; flex-shrink: 0;
  background: rgba(201,168,76,.1); color: var(--gold);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all .15s var(--ease);
}
.mic-btn:hover { background: rgba(201,168,76,.2); }
.mic-btn.active { background: var(--gold); color: #1a1000; animation: pulse-ring 2s infinite; }
.mic-btn.muted { background: var(--no-bg); color: var(--no); }
.mic-btn svg { width: 18px; height: 18px; }

.mic-btn-sm {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border);
  background: transparent; color: var(--text2);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all .15s var(--ease); flex-shrink: 0;
}
.mic-btn-sm:hover { border-color: var(--border2); color: var(--gold); }
.mic-btn-sm.active { background: rgba(201,168,76,.12); color: var(--gold); border-color: var(--border2); animation: pulse-ring 2s infinite; }
.mic-btn-sm.muted { background: var(--no-bg); color: var(--no); border-color: rgba(224,82,82,.3); }
.mic-btn-sm svg { width: 14px; height: 14px; }

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(201,168,76,.35); }
  70% { box-shadow: 0 0 0 8px rgba(201,168,76,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,168,76,0); }
}

.mic-info { flex: 1; min-width: 0; }
.mic-state-label { font-size: 12px; font-weight: 500; color: var(--text2); display: block; }
.voice-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.voice-chips-sm { display: flex; gap: 3px; }
.voice-chip {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface2); display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--text2); cursor: default;
  transition: all .15s;
}
.voice-chip.speaking { background: rgba(76,175,122,.15); border-color: var(--yes); color: var(--yes); }
#mic-visualizer { border-radius: 4px; background: var(--bg3); flex-shrink: 0; }

/* ===================================================
   GAME HEADER
   =================================================== */
.game-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(13,13,14,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  display: flex; align-items: center; gap: 16px;
}
.gh-left { display: flex; flex-direction: column; min-width: 0; }
.gh-room { font-size: 11px; color: var(--text3); font-weight: 600; letter-spacing: .06em; }
.gh-round { font-size: 13px; font-weight: 700; color: var(--gold); }
.gh-giver { font-size: 11px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gh-scores { display: flex; gap: 8px; flex: 1; justify-content: center; flex-wrap: wrap; overflow: hidden; }
.gh-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.score-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 3px 10px 3px 4px; min-width: 70px;
}
.score-chip.is-me { border-color: var(--border2); }
.score-avatar {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-dk));
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #1a1000;
}
.score-info { display: flex; flex-direction: column; min-width: 0; }
.score-name { font-size: 10px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60px; }
.score-value { font-family: var(--font-d); font-size: 16px; font-weight: 900; color: var(--gold); line-height: 1; }

/* ===================================================
   GAME BODY
   =================================================== */
.game-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  padding: 16px 20px 20px; flex: 1; min-height: 0;
}
.game-left { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.game-right { display: flex; flex-direction: column; min-height: 0; }
.game-card { padding: 18px; }
.chat-card { display: flex; flex-direction: column; flex: 1; min-height: 400px; }
.card-eyebrow { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--text3); margin-bottom: 12px; }

/* Word display */
.word-card { text-align: center; padding: 28px 20px; }
.word-card-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text3); font-weight: 600; display: block; margin-bottom: 12px; }
.word-card-eyebrow.choosing { color: var(--maybe); }
.word-card-eyebrow.playing { color: var(--yes); }
.word-big { font-family: var(--font-d); font-size: 38px; font-weight: 900; color: var(--gold); line-height: 1.1; word-break: break-word; margin-bottom: 8px; }
.word-big.masked { color: var(--text2); }
.word-hint { font-size: 13px; color: var(--text2); font-style: italic; }

/* Masked word chars */
.mask-char { display: inline-block; border-bottom: 2px solid var(--gold); width: 18px; text-align: center; margin: 0 1px; color: transparent; }
.mask-space { display: inline-block; width: 14px; }

/* Template grid */
.template-grid { display: flex; flex-direction: column; gap: 8px; max-height: 280px; overflow-y: auto; padding-right: 4px; }
.template-grid::-webkit-scrollbar { width: 3px; }
.template-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.tmpl-cat-header { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.tmpl-cat-name { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text2); }
.tmpl-cat-count { font-size: 10px; color: var(--text3); }
.tmpl-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tmpl-tag {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 20px;
  padding: 4px 11px; font-size: 12px; cursor: pointer; color: var(--text2);
  transition: all .12s var(--ease); font-family: var(--font-b);
}
.tmpl-tag:hover { background: rgba(201,168,76,.08); border-color: var(--border2); color: var(--gold); }
.tmpl-tag.selected { background: rgba(201,168,76,.2); border-color: var(--gold); color: var(--gold); }

/* Spectator card */
.spectator-card { text-align: center; padding: 32px 20px; }
.spectator-eye { width: 48px; height: 48px; margin: 0 auto 14px; color: var(--text3); }
.spectator-eye svg { width: 100%; height: 100%; }
.spectator-title { font-size: 15px; font-weight: 600; color: var(--text2); margin-bottom: 4px; }
.spectator-sub { font-size: 13px; color: var(--text3); }

/* ===================================================
   CHAT
   =================================================== */
.chat-box {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column;
  gap: 3px; padding-right: 2px; margin-bottom: 14px;
}
.chat-box::-webkit-scrollbar { width: 3px; }
.chat-box::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Each message row */
.chat-row { display: flex; align-items: flex-end; gap: 7px; padding: 1px 0; }
.chat-row.me { flex-direction: row-reverse; }
.chat-row.system, .chat-row.answer-row { justify-content: center; }

/* Avatar */
.chat-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-dk));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #1a1000; align-self: flex-end;
}
.chat-avatar-spacer { width: 26px; flex-shrink: 0; }

.chat-bubble-wrap { display: flex; flex-direction: column; max-width: 75%; }
.me .chat-bubble-wrap { align-items: flex-end; }

.chat-sender { font-size: 10px; color: var(--text3); margin-bottom: 3px; padding-left: 4px; }

.chat-bubble {
  padding: 7px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45;
  word-break: break-word; position: relative;
}
.chat-bubble.theirs {
  background: var(--surface2); border: 1px solid var(--border);
  border-bottom-left-radius: 3px; color: var(--text);
}
.chat-bubble.mine {
  background: rgba(201,168,76,.12); border: 1px solid var(--border2);
  border-bottom-right-radius: 3px; color: var(--text);
}
.chat-bubble.is-guess {
  border-style: dashed;
}
.chat-bubble.theirs.is-guess { border-color: rgba(201,168,76,.25); }
.chat-bubble.mine.is-guess { border-color: var(--gold); }

.guess-prefix { margin-right: 4px; opacity: .6; }
.guess-prefix svg { width: 12px; height: 12px; vertical-align: middle; }

/* System message */
.chat-system-msg {
  font-size: 11px; color: var(--text3); font-style: italic; padding: 4px 10px;
  background: transparent; text-align: center;
}

/* Answer bubbles */
.answer-row { margin: 6px 0; }
.chat-answer-bubble {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 700;
  border: 1.5px solid transparent; letter-spacing: .02em;
  animation: pop-in .2s var(--ease);
}
.chat-answer-bubble.yes { background: var(--yes-bg); border-color: var(--yes); color: var(--yes); }
.chat-answer-bubble.no { background: var(--no-bg); border-color: var(--no); color: var(--no); }
.chat-answer-bubble.maybe { background: var(--maybe-bg); border-color: var(--maybe); color: var(--maybe); }
.answer-icon svg { width: 16px; height: 16px; }
.answer-by { font-size: 11px; opacity: .7; font-weight: 400; }

@keyframes pop-in {
  from { transform: scale(.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-row { animation: slide-up .18s var(--ease) both; }

/* ===================================================
   ANSWER BUTTONS
   =================================================== */
.answer-section { display: flex; flex-direction: column; gap: 10px; }
.last-guess-preview {
  font-size: 12px; color: var(--text2); text-align: center;
  padding: 6px 12px; background: var(--bg3); border-radius: var(--r-sm);
  border: 1px dashed var(--border2);
}
.answer-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

.ans-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 14px 8px; border: 1.5px solid transparent;
  border-radius: var(--r-sm); font-family: var(--font-b); font-size: 12px;
  font-weight: 700; cursor: pointer; transition: all .15s var(--ease);
  text-transform: uppercase; letter-spacing: .04em;
}
.ans-btn svg { width: 20px; height: 20px; }
.ans-btn:hover { transform: translateY(-2px); }
.ans-btn:active { transform: translateY(0) scale(.97); }

.ans-yes { background: var(--yes-bg); border-color: var(--yes); color: var(--yes); }
.ans-yes:hover { background: rgba(76,175,122,.22); box-shadow: 0 4px 16px rgba(76,175,122,.2); }
.ans-maybe { background: var(--maybe-bg); border-color: var(--maybe); color: var(--maybe); }
.ans-maybe:hover { background: rgba(233,168,76,.22); box-shadow: 0 4px 16px rgba(233,168,76,.2); }
.ans-no { background: var(--no-bg); border-color: var(--no); color: var(--no); }
.ans-no:hover { background: rgba(224,82,82,.22); box-shadow: 0 4px 16px rgba(224,82,82,.2); }

/* ===================================================
   OVERLAY
   =================================================== */
.overlay {
  position: fixed; inset: 0; background: rgba(13,13,14,.85); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; z-index: 200;
}
.overlay-card {
  background: var(--surface); border: 1px solid var(--border2); border-radius: var(--r);
  padding: 40px; text-align: center; max-width: 400px; width: 90%;
  box-shadow: var(--shadow), 0 0 40px rgba(201,168,76,.12);
  animation: pop-in .25s var(--ease);
}
.result-emoji { font-size: 48px; margin-bottom: 12px; }
.overlay-title { font-family: var(--font-d); font-size: 26px; font-weight: 900; color: var(--gold); margin-bottom: 8px; }
.overlay-body { font-size: 14px; color: var(--text2); margin-bottom: 24px; }

/* ===================================================
   FINAL SCORE
   =================================================== */
.final-wrap {
  max-width: 500px; width: 100%; margin: 0 auto; padding: 56px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  position: relative; z-index: 1;
}
.final-header { text-align: center; }
.trophy-wrap svg { width: 72px; height: 72px; }
.final-title { font-family: var(--font-d); font-size: 38px; font-weight: 900; background: linear-gradient(135deg, var(--gold-lt), var(--gold)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-top: 8px; }
.final-sub { font-size: 13px; color: var(--text2); margin-top: 4px; }
.final-card { width: 100%; padding: 20px; }
.final-list { display: flex; flex-direction: column; gap: 10px; }
.final-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r-sm);
}
.final-row.winner { border-color: var(--border2); background: rgba(201,168,76,.05); }
.final-rank { font-size: 22px; width: 32px; text-align: center; flex-shrink: 0; }
.final-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-dk));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-size: 14px; font-weight: 700; color: #1a1000;
}
.final-name { flex: 1; font-size: 14px; font-weight: 500; }
.final-pts { font-family: var(--font-d); font-size: 22px; font-weight: 900; color: var(--gold); }
.final-pts span { font-family: var(--font-b); font-size: 11px; font-weight: 400; color: var(--text2); }
.final-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ===================================================
   TOAST
   =================================================== */
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--surface2); border: 1px solid var(--border2); color: var(--text);
  padding: 9px 20px; border-radius: 30px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: all .22s var(--ease); z-index: 999;
  white-space: nowrap; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 780px) {
  .game-body { grid-template-columns: 1fr; }
  .game-right { min-height: 380px; }
  .gh-scores { display: none; }
  .word-big { font-size: 28px; }
  .ans-btn { padding: 10px 4px; font-size: 11px; }
}
