
  :root {
    --bg: #f5f7f2;
    --surface: #ffffff;
    --surface2: #eef2e8;
    --border: #d4dcc8;
    --accent: #4a7c59;
    --accent-light: #6aab7a;
    --danger: #c0392b;
    --correct: #27ae60;
    --cursor-key: #00d4aa;
    --text-primary: #1a2e1a;
    --text-secondary: #4a6148;
    --text-muted: #8aa085;
    --shadow: 0 2px 12px rgba(30,60,30,0.10);
    --shadow-lg: 0 8px 32px rgba(30,60,30,0.15);
    --radius: 10px;
    --key-bg: #f0f4ec;
    --key-border: #c8d4be;
    --key-shadow: 0 3px 0 #b0c0a4;
  }

  /* ── DARK THEME ── */
  .dark-theme {
    --bg: #0f1a0f;
    --surface: #1a2a1a;
    --surface2: #1f301f;
    --border: #2e4a2e;
    --accent: #5aab72;
    --accent-light: #7acc8a;
    --danger: #e05050;
    --correct: #3cc870;
    --cursor-key: #00e8b8;
    --text-primary: #d4ecd4;
    --text-secondary: #8ab88a;
    --text-muted: #5a7a5a;
    --shadow: 0 2px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.55);
    --key-bg: #1e2e1e;
    --key-border: #2e4a2e;
    --key-shadow: 0 3px 0 #0a1a0a;
  }
  .dark-theme .click-to-start { background: rgba(15,26,15,0.88); }
  .dark-theme .game-word-display.correct-flash { background: #1a3d26; border-color: var(--correct); }
  .dark-theme .game-word-display.wrong-flash   { background: #3d1a1a; border-color: var(--danger); }
  .dark-theme .result-overlay { background: rgba(0,0,0,0.7); }
  .dark-theme .caps-on { background: #2a2800; border-color: #b0900a; }

  /* ── FOOTER ── */
  .site-footer {
    background: var(--surface);
    border-top: 2px solid var(--border);
    padding: 18px 28px;
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 -2px 12px rgba(30,60,30,0.08);
  }
  .footer-credit {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .footer-credit a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.2s;
  }
  .footer-credit a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 100%; height: 2px;
    background: var(--accent-light);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
  }
  .footer-credit a:hover { color: var(--accent-light); }
  .footer-credit a:hover::after { transform: scaleX(1); }

  .footer-socials {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--key-bg);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.22s ease;
    flex-shrink: 0;
  }
  .social-link svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
    display: block;
  }
  .social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(74,124,89,0.25);
  }
  .social-link.fb:hover  { background: #1877f2; border-color: #1877f2; color: #fff; }
  .social-link.tw:hover  { background: #000;    border-color: #000;    color: #fff; }
  .social-link.ig:hover  { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); border-color: #d6249f; color: #fff; }
  .social-link.gh:hover  { background: #24292e; border-color: #24292e; color: #fff; }

  @media (max-width: 560px) {
    .site-footer {
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 14px;
      padding: 20px 16px;
    }
    .footer-credit {
      justify-content: center;
    }
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: 'Mukta', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* ── TOP NAV BAR ── */
  .topnav {
    background: var(--surface);
    border-bottom: 2px solid var(--border);
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 0;
    height: 54px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
  }
  .logo {
    font-size: 21px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    flex-shrink: 0;
    letter-spacing: -0.5px;
    margin-right: 28px;
  }
  .site-nav {
    display: flex;
    gap: 0;
    flex: 1;
    height: 100%;
  }
  .site-nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 18px;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Mukta', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.18s;
    text-decoration: none;
    white-space: nowrap;
  }
  .site-nav-item::after {
    content: '';
    position: absolute;
    bottom: 0; left: 18px; right: 18px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
    transform: scaleX(0);
    transition: transform 0.2s;
  }
  .site-nav-item:hover { color: var(--accent); }
  .site-nav-item:hover::after { transform: scaleX(0.5); }
  .site-nav-item.active { color: var(--accent); font-weight: 600; }
  .site-nav-item.active::after { transform: scaleX(1); }
  .site-nav-item .nav-icon { font-size: 16px; }

  /* ── HEADER (old, repurposed as toolbar header) ── */
  header {
    display: none; /* replaced by .topnav */
  }

  /* ── TOOLBAR ── */
  .toolbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
  }
  .toolbar-group {
    display: flex; gap: 4px; align-items: center;
    border-right: 1px solid var(--border);
    padding-right: 10px;
  }
  .toolbar-group:last-child { border-right: none; }
  .toolbar-label {
    font-size: 11px; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-right: 2px; font-weight: 600;
  }
  .pill-btn {
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--key-bg);
    color: var(--text-secondary);
    font-family: 'Mukta', sans-serif;
    font-size: 13px; cursor: pointer;
    transition: all 0.15s; font-weight: 500;
  }
  .pill-btn:hover { border-color: var(--accent-light); color: var(--accent); }
  .pill-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

  /* ── MAIN ── */
  main { max-width: 900px; margin: 0 auto; padding: 20px 14px; width: 100%; }

  /* ── STATS ── */
  .stats-row { display: flex; justify-content: flex-end; gap: 20px; margin-bottom: 10px; }
  .stat { text-align: right; }
  .stat-val {
    font-size: 28px; font-weight: 700;
    font-family: 'JetBrains Mono', monospace; line-height: 1;
  }
  .stat-val.red { color: var(--danger); }
  .stat-val.green { color: var(--correct); }
  .stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

  /* ── TYPING AREA ── */
  .typing-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    position: relative;
  }
  #prompt-display {
    font-size: 22px;
    line-height: 2;
    letter-spacing: 2px;
    color: var(--text-secondary);
    user-select: none;
    min-height: 60px;
    word-break: break-all;
  }
  #prompt-display.nepali-font { font-family: 'Noto Sans Devanagari', sans-serif; }
  #prompt-display.english-font { font-family: 'JetBrains Mono', monospace; font-size: 20px; }

  .char { position: relative; transition: color 0.1s; }
  .char.correct { color: var(--correct); }
  .char.wrong { color: var(--danger); text-decoration: underline wavy var(--danger); }
  .char.cursor::after {
    content: '';
    position: absolute;
    left: 0; top: 4px; bottom: 4px;
    width: 2px;
    background: var(--accent);
    animation: blink 0.9s step-end infinite;
    border-radius: 2px;
  }
  @keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

  #typed-input {
    position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px;
  }
  .click-to-start {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(245,247,242,0.85);
    backdrop-filter: blur(2px);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 15px; color: var(--text-secondary);
    gap: 8px; font-weight: 500;
    transition: opacity 0.2s;
  }
  .click-to-start.hidden { opacity: 0; pointer-events: none; }
  .click-to-start span { font-size: 20px; }

  /* ── KEYBOARD ── */
  .keyboard-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 12px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
  }
  .kb-row {
    display: flex; gap: 4px;
    margin-bottom: 5px;
    justify-content: center;
  }
  .key {
    background: var(--key-bg);
    border: 1px solid var(--key-border);
    border-radius: 6px;
    box-shadow: var(--key-shadow);
    min-width: 36px; height: 46px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    cursor: default;
    position: relative;
    transition: all 0.08s;
    flex: 1; max-width: 48px;
    padding: 2px;
  }
  .key.pressed {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 0 #2d6043;
    transform: translateY(2px);
  }
  .key.highlight {
    background: var(--cursor-key);
    border-color: #00b090;
    box-shadow: 0 3px 0 #009070;
    animation: pulse-key 0.4s ease;
  }
  @keyframes pulse-key {
    0%{ transform: scale(1.1) translateY(-1px); }
    100%{ transform: scale(1) translateY(0); }
  }
  .key-top { font-size: 9px; color: var(--text-muted); line-height: 1; align-self: flex-start; margin-left: 3px; font-family: 'JetBrains Mono', monospace; }
  .key-main { font-size: 13px; font-weight: 600; line-height: 1; }
  .key-main.dev { font-family: 'Noto Sans Devanagari', sans-serif; }
  .key-main.eng { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
  .key-sub { font-size: 9px; color: var(--text-muted); line-height: 1; margin-top: 1px; font-family: 'JetBrains Mono', monospace; }

  .key.pressed .key-top,
  .key.pressed .key-sub,
  .key.highlight .key-top,
  .key.highlight .key-sub { color: rgba(255,255,255,0.75); }
  .key.pressed .key-main,
  .key.highlight .key-main { color: #fff; }

  /* Special key widths */
  .key.k-backspace { max-width: 72px; flex: 1.8; }
  .key.k-tab       { max-width: 64px; flex: 1.6; }
  .key.k-caps      { max-width: 70px; flex: 1.7; }
  .key.k-enter     { max-width: 80px; flex: 2; }
  .key.k-lshift    { max-width: 92px; flex: 2.3; }
  .key.k-rshift    { max-width: 110px; flex: 2.7; }
  .key.k-space     { max-width: 340px; flex: 7; }
  .key.k-mod       { max-width: 52px; flex: 1.2; }
  .key.caps-on     { background: #fff3cd; border-color: #f0c040; }

  /* ── KEYBOARD + HANDS LAYOUT ── */
  .kb-with-hands {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .kb-panel { flex: 1; min-width: 0; }
  .hand-side {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .hand-svg { width: 72px; opacity: 0.80; transition: opacity 0.2s; }

  /* On mobile: stack hands below keyboard */
  @media (max-width: 700px) {
    .kb-with-hands { flex-wrap: wrap; }
    .hand-side { display: none; }
    /* On mobile, side placeholders never show — keyboard takes full width */
    .show-hands-ph { display: none !important; }
    .hands-row-mobile { display: flex !important; }
    /* kb-panel always takes full width on mobile */
    .kb-panel { width: 100%; flex: none; }
    /* When hands are hidden on mobile, kb-panel takes full width */
    .hands-hidden .kb-panel { width: 100%; }
  }
  .hands-row-mobile {
    display: none;
    justify-content: space-between;
    padding: 6px 20px 0;
  }

  /* ── RESULT OVERLAY ── */
  .result-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(20,40,20,0.55);
    z-index: 200; align-items: center; justify-content: center;
  }
  .result-overlay.show { display: flex; }
  .result-card {
    background: var(--surface);
    border-radius: 16px; padding: 40px 48px;
    text-align: center; box-shadow: var(--shadow-lg);
    animation: pop-in 0.3s ease;
  }
  @keyframes pop-in { from{transform:scale(0.85);opacity:0} to{transform:scale(1);opacity:1} }
  .result-title { font-size: 28px; font-weight: 700; color: var(--accent); margin-bottom: 24px; }
  .result-stats { display: flex; gap: 32px; justify-content: center; margin-bottom: 28px; }
  .result-stat { text-align: center; }
  .result-stat-val { font-size: 42px; font-weight: 700; font-family: 'JetBrains Mono', monospace; color: var(--accent); }
  .result-stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

  .btn-primary {
    padding: 12px 32px; background: var(--accent); color: #fff;
    border: none; border-radius: 8px;
    font-family: 'Mukta', sans-serif; font-size: 16px; font-weight: 600;
    cursor: pointer; transition: background 0.18s;
  }
  .btn-primary:hover { background: var(--accent-light); }

  .progress-bar { height: 4px; background: var(--surface2); border-radius: 2px; margin-bottom: 12px; overflow: hidden; }
  .progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-light)); border-radius: 2px; transition: width 0.2s; width: 0%; }
  .timer-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  .timer-display { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text-muted); }

  /* ── VISIBILITY TOGGLES ── */
  .show-placeholder {
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
    background: var(--surface);
    gap: 6px;
    user-select: none;
  }
  .show-placeholder:hover {
    border-color: var(--accent-light);
    color: var(--accent);
    background: var(--surface2);
  }
  .show-placeholder.show-kb-ph {
    margin-bottom: 24px;
    min-height: 56px;
  }
  .show-placeholder.show-hands-ph {
    width: 72px;
    min-height: 80px;
    flex-shrink: 0;
    border-radius: 10px;
    flex-direction: column;
    font-size: 11px;
    padding: 6px 4px;
  }

  /* ── CLICKABLE LAYOUT BADGE ── */
  .kb-lang-badge {
    text-align: center; font-size: 11px; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 10px;
  }
  .kb-lang-badge span {
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 12px; padding: 2px 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    display: inline-flex; align-items: center; gap: 5px;
  }
  .kb-lang-badge span:hover {
    background: var(--accent); border-color: var(--accent); color: #fff;
  }
  .kb-lang-badge span::after {
    content: '⇄';
    font-size: 10px;
    opacity: 0.6;
  }

  /* ── HOME PAGE ── */
  .home-hero {
    text-align: center;
    padding: 52px 20px 40px;
  }
  .home-hero-icon { font-size: 56px; margin-bottom: 16px; }
  .home-title { font-size: 36px; font-weight: 700; color: var(--text-primary); margin-bottom: 14px; line-height: 1.2; }
  .home-title span { color: var(--accent); }
  .home-subtitle { font-size: 16px; color: var(--text-secondary); max-width: 520px; margin: 0 auto 28px; line-height: 1.7; }
  .home-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 8px;
  }
  .home-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: border-color 0.18s, box-shadow 0.18s;
  }
  .home-card:hover { border-color: var(--accent-light); box-shadow: var(--shadow-lg); }
  .home-card-icon { font-size: 32px; margin-bottom: 10px; }
  .home-card h3 { font-size: 16px; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
  .home-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

  /* ── GAME PAGE ── */
  .game-container {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 22px;
    box-shadow: var(--shadow);
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
  }
  .game-header { text-align: center; margin-bottom: 24px; }
  .game-title { font-size: 26px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
  .game-desc { font-size: 14px; color: var(--text-secondary); }
  .game-hud {
    display: flex; justify-content: center; gap: 36px;
    margin-bottom: 28px;
  }
  .game-hud-item { text-align: center; }
  .game-hud-val { font-size: 40px; font-weight: 700; font-family: 'JetBrains Mono', monospace; color: var(--accent); line-height: 1; }
  .game-hud-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
  .game-word-display {
    font-size: 32px; font-weight: 700;
    text-align: center; color: var(--text-primary);
    font-family: 'Mukta', sans-serif;
    padding: 20px 0; letter-spacing: 1px;
    border: 2px dashed var(--border);
    border-radius: 8px; margin-bottom: 16px;
    min-height: 80px; display: flex; align-items: center; justify-content: center;
    background: var(--surface2);
  }
  .game-word-display.correct-flash { background: #d4f0de; border-color: var(--correct); }
  .game-word-display.wrong-flash   { background: #fde0de; border-color: var(--danger); }
  .game-input {
    width: 100%; padding: 12px 16px;
    font-size: 18px; font-family: 'Mukta', sans-serif;
    border: 2px solid var(--border); border-radius: 8px;
    outline: none; background: var(--surface);
    color: var(--text-primary);
    transition: border-color 0.15s;
  }
  .game-input:focus { border-color: var(--accent); }
  .game-input:disabled { background: var(--surface2); color: var(--text-muted); }

  /* ── GAME TOOLBAR ── */
  .game-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 20px;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
  }
  .game-toolbar .toolbar-group {
    border-right: 1px solid var(--border);
    padding-right: 12px;
  }
  .game-toolbar .toolbar-group:last-child {
    border-right: none;
    padding-right: 0;
  }

  /* ── GLOBAL RESPONSIVE: no horizontal overflow ── */
  html { overflow-x: hidden; }
  body { overflow-x: hidden; }
  main { max-width: 900px; margin: 0 auto; padding: 20px 12px; box-sizing: border-box; }

  /* Toolbar responsive: allow scroll if too narrow */
  .toolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar-group { flex-shrink: 0; }

  /* Top nav responsive */
  .topnav { padding: 0 12px; gap: 0; overflow: hidden; }
  .logo { margin-right: 12px; font-size: 18px; }
  .site-nav { overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav-item { padding: 0 12px; font-size: 14px; white-space: nowrap; flex-shrink: 0; }

  /* Game container responsive */
  .game-container { padding: 20px 14px; }

  /* Result card responsive */
  .result-card { margin: 12px; padding: 28px 20px; max-width: calc(100vw - 24px); box-sizing: border-box; }

  /* ── TABLET (max-width: 768px) ── */
  @media (max-width: 768px) {
    main { padding: 14px 10px; }
    .game-toolbar { padding: 6px 10px; }
    .game-container { padding: 18px 12px; }
    .game-hud { gap: 20px; }
    .game-hud-val { font-size: 32px; }
    .game-word-display { font-size: 26px; padding: 14px 10px; min-height: 64px; }
    .home-hero { padding: 36px 12px 28px; }
    .home-title { font-size: 28px; }
    .typing-card { padding: 18px 14px; }
    #prompt-display { font-size: 19px; letter-spacing: 1px; }
  }

  /* ── MOBILE (max-width: 620px) ── */
  @media (max-width: 620px) {
    /* Nav */
    .topnav { height: 48px; }
    .logo { font-size: 16px; margin-right: 8px; }
    .site-nav-item { padding: 0 10px; font-size: 13px; }
    .site-nav-item .nav-icon { font-size: 14px; }

    /* Main */
    main { padding: 10px 8px; }

    /* Keyboard */
    .keyboard-card { padding: 10px 6px; }
    .key { min-width: 0; height: 34px; padding: 1px; flex: 1; max-width: none; }
    .key-main { font-size: 9px; }
    .key-top { font-size: 7px; }
    .key-sub { font-size: 7px; }
    .key.k-backspace { flex: 1.6; }
    .key.k-tab       { flex: 1.5; }
    .key.k-caps      { flex: 1.6; }
    .key.k-enter     { flex: 1.8; }
    .key.k-lshift    { flex: 2.0; }
    .key.k-rshift    { flex: 2.2; }
    .key.k-space     { flex: 5; max-width: none; }
    .key.k-mod       { flex: 1.1; }
    .kb-row { gap: 2px; margin-bottom: 3px; }

    /* Typing card */
    .typing-card { padding: 14px 10px; }
    #prompt-display { font-size: 15px; letter-spacing: 0.5px; line-height: 1.8; word-break: break-all; }
    .stats-row { gap: 14px; }
    .stat-val { font-size: 22px; }

    /* Game */
    .game-container { padding: 14px 10px; }
    .game-toolbar { padding: 6px 8px; gap: 6px; }
    .game-toolbar .toolbar-group { padding-right: 8px; }
    .game-title { font-size: 20px; }
    .game-desc { font-size: 12px; }
    .game-hud { gap: 14px; margin-bottom: 18px; }
    .game-hud-val { font-size: 28px; }
    .game-hud-label { font-size: 10px; }
    .game-word-display { font-size: 22px; padding: 12px 8px; min-height: 60px; }
    .game-input { font-size: 16px; padding: 10px 12px; }

    /* Home */
    .home-hero { padding: 28px 8px 20px; }
    .home-title { font-size: 22px; }
    .home-subtitle { font-size: 14px; }
    .home-hero-icon { font-size: 40px; }
    .home-card { padding: 18px 14px; }
    .home-cards { gap: 10px; }

    /* Result overlay */
    .result-card { padding: 24px 16px; }
    .result-stat-val { font-size: 30px; }
    .result-stats { gap: 20px; }
    .result-title { font-size: 22px; margin-bottom: 18px; }

    /* Toolbar */
    .toolbar { padding: 6px 10px; }
    .pill-btn { padding: 3px 10px; font-size: 12px; }
    .toolbar-label { font-size: 10px; }
  }

  /* ── TINY MOBILE (max-width: 380px) ── */
  @media (max-width: 380px) {
    .key { height: 28px; }
    .key-main { font-size: 8px; }
    .key-top, .key-sub { display: none; }
    #prompt-display { font-size: 13px; }
    .game-hud-val { font-size: 24px; }
    .game-word-display { font-size: 18px; }
    .site-nav-item { padding: 0 8px; font-size: 12px; }
    .logo { font-size: 14px; }
  }