/* ═══════════════════════════════════════════════
   SCRIPTURE LINKS — styles.css
   Mobile-first, parchment & illuminated gold theme
   ═══════════════════════════════════════════════ */

:root {
  --parchment:      #f5ecd7;
  --parchment-dark: #e8d9b8;
  --ink:            #1a1108;
  --ink-faded:      #4a3820;
  --gold:           #c8901a;
  --gold-light:     #e8b84b;
  --gold-dark:      #8a6010;
  --crimson:        #8b1a1a;
  --royal:          #2b4a8a;
  --royal-dark:     #1a2f5a;
  --ashen:          #8a8880;
  --ashen-dark:     #6e6c65;
  --bg:             #2a1f0e;

  --kb-height: 200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 15%, rgba(200,144,26,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(43,74,138,0.06) 0%, transparent 55%);
  font-family: 'EB Garamond', Georgia, serif;
  color: var(--parchment);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ═══ HEADER ═══ */
.app-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(200,144,26,0.25);
  background: rgba(0,0,0,0.25);
}
.header-left, .header-right { width: 64px; display: flex; align-items: center; }
.header-right { justify-content: flex-end; }
.header-center { text-align: center; }
.app-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.05rem;
  color: var(--gold-light);
  letter-spacing: 0.03em;
  text-shadow: 0 0 14px rgba(200,144,26,0.35);
  white-space: nowrap;
}
.app-subtitle {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(232,184,75,0.55);
}
.header-streak {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--gold-light);
}
.icon-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(200,144,26,0.5);
  background: rgba(200,144,26,0.12);
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s;
}
.icon-btn:hover { background: rgba(200,144,26,0.25); transform: scale(1.06); }

/* ═══ MAIN SCROLL AREA ═══ */
.game-main {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px calc(var(--kb-height) + 20px);
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

/* ═══ MODE TOGGLE ═══ */
.mode-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.mode-btn {
  flex: 1;
  font-family: 'Cinzel', serif;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  padding: 7px 10px;
  border-radius: 3px;
  border: 1.5px solid rgba(200,144,26,0.3);
  background: rgba(245,236,215,0.06);
  color: rgba(245,236,215,0.55);
  cursor: pointer;
  transition: all 0.2s;
}
.mode-btn:hover { background: rgba(200,144,26,0.12); }
.mode-btn.active {
  background: rgba(200,144,26,0.22);
  border-color: var(--gold);
  color: var(--gold-light);
}
.mode-btn.locked {
  opacity: 0.4;
  cursor: not-allowed;
}
.mode-btn.locked:hover { background: rgba(245,236,215,0.06); }

/* ═══ STATUS STRIP ═══ */
.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.status-score { display: flex; align-items: baseline; gap: 6px; }
.status-label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(232,184,75,0.55);
}
.status-value {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gold-light);
}
.attempts-row { display: flex; flex-wrap: wrap; gap: 6px; row-gap: 4px; max-width: 70px; justify-content: flex-end; }
.attempt-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(245,236,215,0.12);
  border: 1.5px solid rgba(200,144,26,0.4);
  transition: all 0.3s;
  flex-shrink: 0;
}
.attempt-dot.used   { background: var(--gold); border-color: var(--gold-dark); }
.attempt-dot.failed { background: var(--crimson); border-color: #5a0f0f; }
.hint-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 3px;
  border: 1.5px solid rgba(200,144,26,0.45);
  background: rgba(200,144,26,0.1);
  color: var(--gold-light);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.hint-btn:hover { background: rgba(200,144,26,0.22); }
.hint-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ═══ SHARED PANEL ═══ */
.shared-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(200,144,26,0.08);
  border: 1px solid rgba(200,144,26,0.25);
  border-radius: 4px;
  padding: 7px 12px;
  margin-bottom: 8px;
  min-height: 42px;
}
.shared-panel-label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-light);
  flex-shrink: 0;
  opacity: 0.8;
}
.shared-panel-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.shared-badge {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.78rem;
  color: #fff;
  box-shadow: 0 2px 8px rgba(139,96,16,0.4);
  animation: popIn 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}
.shared-badge.hint-revealed {
  background: linear-gradient(135deg, #a89880, #6e5e46);
}
.shared-panel-empty {
  font-style: italic;
  font-size: 0.72rem;
  color: rgba(245,236,215,0.35);
}

/* ═══ PREVIOUS GUESSES DROPDOWN ═══ */
.prev-guesses-details {
  margin-bottom: 10px;
  border: 1px solid rgba(200,144,26,0.22);
  border-radius: 4px;
  background: rgba(0,0,0,0.2);
  overflow: hidden;
}
.prev-guesses-details summary {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232,184,75,0.7);
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.prev-guesses-details summary::-webkit-details-marker { display: none; }
.prev-guesses-details summary::before {
  content: '▸';
  transition: transform 0.2s;
  font-size: 0.7rem;
}
.prev-guesses-details[open] summary::before { transform: rotate(90deg); }
.prev-guesses-body {
  padding: 6px 12px 12px;
  max-height: 220px;
  overflow-y: auto;
  border-top: 1px dashed rgba(200,144,26,0.15);
}
.prev-attempt-block { margin-bottom: 10px; }
.prev-attempt-block:last-child { margin-bottom: 0; }
.prev-attempt-label {
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245,236,215,0.4);
  margin-bottom: 4px;
}
.prev-word-row {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 3px;
}
.prev-category-icon { font-size: 10px; width: 16px; flex-shrink: 0; opacity: 0.6; }
.prev-letter-tile {
  width: 20px; height: 22px;
  flex-shrink: 0;
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  font-weight: 700;
  color: #fff;
}
.prev-letter-tile.correct { background: var(--gold);  border: 1px solid var(--gold-dark); }
.prev-letter-tile.partial { background: var(--royal); border: 1px solid var(--royal-dark); }
.prev-letter-tile.wrong   { background: var(--ashen); border: 1px solid var(--ashen-dark); }

/* ═══ WORD ROWS ═══ */
.words-area { display: flex; flex-direction: column; gap: 8px; }
.word-row {
  background: var(--parchment);
  border: 2px solid rgba(138,96,16,0.35);
  border-radius: 5px;
  padding: 8px 10px 10px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}
.word-row.active {
  border-width: 3px;
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(200,144,26,0.3), 0 0 9px 2px rgba(232,184,75,0.55), 0 4px 16px rgba(0,0,0,0.35);
}
.word-row.locked {
  border-color: var(--gold-dark);
  cursor: default;
  opacity: 0.95;
}
.word-row.locked::after {
  content: '✓';
  position: absolute;
  top: 6px; right: 10px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  color: var(--gold-dark);
  font-size: 0.85rem;
}
.word-row-label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.word-row-icon { font-size: 12px; }

.tile-grid {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
}
.letter-tile {
  flex: 1 1 0;
  max-width: 44px;
  aspect-ratio: 10 / 11;
  min-width: 0;
  border: 1.5px solid rgba(138,96,16,0.35);
  background: rgba(255,255,255,0.55);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: clamp(0.65rem, 3.6vw, 1.05rem);
  font-weight: 700;
  color: var(--ink);
  user-select: none;
  transition: all 0.2s;
}
.letter-tile.filled {
  border-color: var(--gold-dark);
  background: rgba(255,255,255,0.85);
  animation: tilePop 0.12s ease;
}
.letter-tile.correct { background: var(--gold);  border-color: var(--gold-dark);  color: #fff; }
.letter-tile.partial { background: var(--royal); border-color: var(--royal-dark); color: #fff; }
.letter-tile.wrong   { background: var(--ashen); border-color: var(--ashen-dark); color: #fff; }
.letter-tile.reveal  { animation: flipTile 0.45s ease both; }

/* ═══ FEEDBACK ═══ */
.feedback-bar {
  min-height: 26px;
  text-align: center;
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(245,236,215,0.7);
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 3px;
  transition: all 0.25s;
}
.feedback-bar.error   { background: rgba(139,26,26,0.25);  color: #f0c0c0; }
.feedback-bar.success { background: rgba(200,144,26,0.18); color: var(--gold-light); }
.feedback-bar.hint    { background: rgba(43,74,138,0.25);  color: #bcd0f0; }

/* ═══ KEYBOARD ═══ */
.kb-container {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(20,14,4,0.96);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(200,144,26,0.3);
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}
.kb-hint {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(232,184,75,0.4);
  margin-bottom: 5px;
}
.kb-row {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 5px;
  padding: 0 2px;
}
.kb-row:last-child { margin-bottom: 0; }
.kb-key {
  flex: 1 1 0;
  max-width: 42px;
  height: 46px;
  border-radius: 4px;
  border: 1px solid rgba(200,144,26,0.3);
  background: rgba(245,236,215,0.12);
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--parchment);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, transform 0.06s;
  user-select: none;
  touch-action: manipulation;
}
.kb-key:active { transform: scale(0.94); background: rgba(200,144,26,0.3); }
.kb-key.kb-wide {
  flex: 1.6 1 0;
  max-width: 70px;
  font-size: 0.56rem;
  letter-spacing: 0.06em;
}
.kb-key.correct { background: var(--gold);  border-color: var(--gold-dark);  color: #fff; }
.kb-key.partial { background: var(--royal); border-color: var(--royal-dark); color: #fff; }
.kb-key.wrong   { background: rgba(110,108,101,0.55); border-color: var(--ashen-dark); color: rgba(245,236,215,0.45); }
.kb-key.shared  { box-shadow: inset 0 0 0 2px var(--gold-light); }

/* ═══ RESULT VIEW ═══ */
.result-view { display: none; }
.result-view.show { display: block; animation: fadeUp 0.5s ease both; }
.result-card {
  background: var(--parchment);
  border: 2px solid var(--gold-dark);
  border-radius: 5px;
  padding: 20px 16px;
  color: var(--ink);
  box-shadow: 0 0 0 5px rgba(200,144,26,0.1), 0 16px 48px rgba(0,0,0,0.6);
}
.result-header { position: relative; text-align: center; margin-bottom: 12px; }
.result-icon { font-size: 2rem; display: block; margin-bottom: 4px; }
.result-icon.win-icon {
  animation: iconPulse 0.7s ease-out both;
}

/* ═══ WIN CELEBRATION ═══ */
.win-fx {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}
.win-spark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-light) 0%, var(--gold) 60%, transparent 100%);
  opacity: 0;
  animation: sparkBurst 1.1s ease-out var(--delay) both;
}
@keyframes sparkBurst {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.4); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(1); }
}
@keyframes iconPulse {
  0%   { transform: scale(0.4); opacity: 0; text-shadow: 0 0 0 rgba(232,184,75,0); }
  55%  { transform: scale(1.25); opacity: 1; text-shadow: 0 0 22px rgba(232,184,75,0.9); }
  100% { transform: scale(1); opacity: 1; text-shadow: 0 0 10px rgba(232,184,75,0.55); }
}
.result-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.25rem;
  color: var(--gold-dark);
}
.result-bonus {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--gold-dark);
  margin-top: 3px;
}
.result-score-big {
  font-family: 'Cinzel', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
}
.result-score-label {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 14px;
}
.answer-row { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.answer-chip {
  padding: 4px 12px;
  border-radius: 16px;
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  background: rgba(200,144,26,0.12);
  color: var(--gold-dark);
  border: 1px solid rgba(200,144,26,0.35);
}
.result-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(200,144,26,0.4), transparent);
  margin: 14px 0;
}
.result-section-title {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 10px;
}
.verse-cards { display: flex; flex-direction: column; gap: 10px; }
.verse-card {
  background: rgba(255,255,255,0.45);
  border-left: 3px solid var(--gold);
  border-radius: 0 4px 4px 0;
  padding: 10px 12px;
  opacity: 0;
  animation: verseIn 0.5s ease both;
}
.verse-card:nth-child(1) { animation-delay: 0.15s; }
.verse-card:nth-child(2) { border-left-color: var(--royal); animation-delay: 0.32s; }
.verse-card:nth-child(3) { border-left-color: var(--crimson); animation-delay: 0.49s; }
@keyframes verseIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.verse-word {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--gold-dark);
  margin-bottom: 3px;
}
.verse-text { font-style: italic; font-size: 0.86rem; line-height: 1.5; margin-bottom: 3px; }
.verse-ref { font-family: 'Cinzel', serif; font-size: 0.6rem; color: var(--ink-faded); letter-spacing: 0.08em; }

.result-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.btn {
  padding: 10px 20px;
  border-radius: 3px;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #fff;
  box-shadow: 0 3px 10px rgba(139,96,16,0.4);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); background: linear-gradient(135deg, var(--gold-light), var(--gold)); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--gold-dark);
  border: 1.5px solid rgba(200,144,26,0.45);
}
.btn-ghost:hover { background: rgba(200,144,26,0.12); }

.share-toast {
  text-align: center;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--gold-dark);
  margin-top: 8px;
  min-height: 18px;
}

/* ═══ MODAL ═══ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20,12,4,0.75);
  backdrop-filter: blur(3px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; animation: fadeUp 0.25s ease both; }
.modal {
  background: var(--parchment);
  border: 2px solid var(--gold-dark);
  border-radius: 5px;
  box-shadow: 0 0 0 5px rgba(200,144,26,0.1), 0 24px 60px rgba(0,0,0,0.7);
  width: 100%;
  max-width: 440px;
  max-height: 86vh;
  overflow-y: auto;
  position: relative;
  padding: 28px 22px 20px;
  color: var(--ink);
}
.modal-close {
  position: absolute;
  top: 8px; right: 10px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--gold-dark);
  cursor: pointer;
  opacity: 0.6;
  padding: 4px;
}
.modal-close:hover { opacity: 1; }
.modal-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1rem;
  color: var(--gold-dark);
  text-align: center;
  margin-bottom: 3px;
}
.modal-subtitle {
  font-family: 'Cinzel', serif;
  font-size: 0.56rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 16px;
  opacity: 0.7;
}
.modal-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(200,144,26,0.4), transparent);
  margin: 12px 0;
}
.modal-section-title {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 8px;
}
.modal p {
  font-size: 0.84rem;
  color: var(--ink-faded);
  line-height: 1.6;
  margin-bottom: 8px;
}
.modal strong { color: var(--ink); font-weight: 600; }
.legend { display: flex; flex-direction: column; gap: 7px; }
.legend-row { display: flex; align-items: center; gap: 10px; }
.legend-tiles { display: flex; gap: 3px; flex-shrink: 0; }
.legend-tile {
  width: 26px; height: 28px;
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 0.66rem;
  font-weight: 700;
  color: #fff;
}
.legend-tile.c-correct { background: var(--gold);  border: 1px solid var(--gold-dark); }
.legend-tile.c-partial { background: var(--royal); border: 1px solid var(--royal-dark); }
.legend-tile.c-wrong   { background: var(--ashen); border: 1px solid var(--ashen-dark); }
.legend-desc { font-size: 0.8rem; color: var(--ink-faded); line-height: 1.35; }
.legend-desc strong { color: var(--ink); }
.legend-note { font-size: 0.76rem !important; font-style: italic; margin-top: 8px; }
.points-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.points-table td {
  padding: 4px 6px;
  color: var(--ink-faded);
  border-bottom: 1px solid rgba(200,144,26,0.12);
}
.points-table td:first-child { font-family: 'Cinzel', serif; font-size: 0.66rem; color: var(--gold-dark); }
.points-table td:last-child { text-align: right; font-weight: 600; color: var(--ink); }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes tilePop  { 0% { transform: scale(0.85); } 100% { transform: scale(1); } }
@keyframes flipTile { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
@keyframes popIn    { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
@keyframes shake    { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
.shake { animation: shake 0.4s ease; }

@media (prefers-reduced-motion: reduce) {
  .win-spark, .result-icon.win-icon, .verse-card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    text-shadow: none !important;
  }
}

/* ═══ DESKTOP / LARGER SCREENS ═══ */
@media (min-width: 640px) {
  :root { --kb-height: 220px; }
  .app-title { font-size: 1.4rem; }
  .app-subtitle { font-size: 0.64rem; }
  .game-main { max-width: 620px; padding-top: 18px; }
  .letter-tile { max-width: 48px; font-size: 1.1rem; }
  .kb-key { max-width: 46px; height: 52px; font-size: 0.9rem; }
  .kb-key.kb-wide { max-width: 80px; font-size: 0.6rem; }
  .kb-container { padding-bottom: 12px; }
  #keyboard { max-width: 560px; margin: 0 auto; }
  .word-row { padding: 10px 14px 12px; }
  .result-card { padding: 26px 24px; }
}

/* very small phones */
@media (max-width: 360px) {
  .letter-tile { font-size: 0.6rem; gap: 2px; }
  .tile-grid { gap: 2px; }
  .kb-key { height: 42px; font-size: 0.72rem; }
}
