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

  @font-face {
    font-family: "Nunito";
    src: url("../fonts/Nunito-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
  }

  @font-face {
    font-family: "Nunito";
    src: url("../fonts/Nunito-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
  }

  @font-face {
    font-family: "Nunito";
    src: url("../fonts/Nunito-ExtraBold.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
  }

  @font-face {
    font-family: "Nunito";
    src: url("../fonts/Nunito-Black.ttf") format("truetype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
  }

  :root {
    --app-font: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --app-height: 100vh;
  }

  /* Prevent long press context menu and text selection on buttons */
  button, .menu-btn, .icon-btn, .btn-plus1, .btn-plus5, .btn-lock, .b-card, .daily-banner {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
  }

  /* Prevent selection on the whole phone */
  .phone {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
  body {
    font-family: var(--app-font);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: var(--app-height);
    background: #1a1a2e;
    overflow: hidden;
  }

  .phone {
    width: 390px;
    height: 844px;
    background: linear-gradient(170deg, #87CEEB 0%, #b8e4f7 40%, #F5F0E8 100%);
    border-radius: 50px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    transform-origin: center center;
  }

  /* Desktop scaling */
  @media (max-height: 900px) and (min-width: 421px) {
    .phone { transform: scale(0.9); }
  }
  @media (max-height: 800px) and (min-width: 421px) {
    .phone { transform: scale(0.8); }
  }
  @media (max-height: 700px) and (min-width: 421px) {
    .phone { transform: scale(0.7); }
  }

  /* Mobile — fill full screen, account for browser chrome */
  @media (hover: none) and (pointer: coarse), (max-width: 900px) and (orientation: portrait) {
    html {
      height: 100%;
      height: 100dvh;
      height: var(--app-height);
      overflow: hidden;
    }
    html, body {
      height: 100%;
      height: 100dvh;
      height: var(--app-height);
      overflow: hidden;
    }
    body {
      background: linear-gradient(170deg, #87CEEB 0%, #b8e4f7 40%, #F5F0E8 100%);
      align-items: flex-start;
      padding: 0;
    }
    .phone {
      width: 100vw;
      height: 100vh;
      height: 100dvh;
      height: var(--app-height);
      min-height: var(--app-height);
      border-radius: 0;
      box-shadow: none;
      transform: none !important;
    }
    .screen {
      padding: calc(18px + env(safe-area-inset-top)) 24px max(28px, calc(18px + env(safe-area-inset-bottom))) !important;
    }
  }
  
  .bg-flash { position: absolute; top:0; left:0; width:100%; height:100%; background: linear-gradient(170deg, #FF6B00 0%, #F5A623 100%); opacity: 0; transition: opacity 0.4s ease-out; z-index: 0; }
  .bg-flash.show { opacity: 0.4; }
  .damage-overlay { position: absolute; top:0; left:0; width:100%; height:100%; box-shadow: inset 0 0 0 rgba(231,76,60,0); transition: box-shadow 0.2s; z-index: 90; pointer-events: none; }
  .damage-overlay.flash { box-shadow: inset 0 0 60px rgba(231,76,60,0.8); }

  .floating-numbers { position: absolute; width: 100%; height: 100%; top: 0; left: 0; pointer-events: none; overflow: hidden; z-index: 1;}
  .float-num { position: absolute; font-size: 26px; font-weight: 900; opacity: 0.03; color: #2a6496; animation: floatUp linear infinite; }
  @keyframes floatUp { 0% { transform: translateY(900px) rotate(-10deg); opacity: 0; } 10% { opacity: 0.03; } 90% { opacity: 0.03; } 100% { transform: translateY(-100px) rotate(10deg); opacity: 0; } }

  .screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column;
    padding: 50px 30px 55px;
    padding-bottom: max(55px, calc(55px + env(safe-area-inset-bottom)));
    z-index: 10;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
  }
  .screen.active { transform: translateX(0); }
  .screen.left { transform: translateX(-100%); }
  .screen.right { transform: translateX(100%); }

  /* ================================ */
  /* HOME SCREEN — Option A           */
  /* ================================ */
  .home-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 0 6px;
    gap: 10px;
  }

  .home-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    margin-bottom: 2px;
  }
  .home-stat-card {
    min-width: 0;
    padding: 12px 8px 10px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.72);
    background: rgba(255,255,255,0.4);
    box-shadow: 0 8px 18px rgba(42,100,150,0.08);
    text-align: center;
  }
  .home-stat-title {
    color: rgba(42,100,150,0.6);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.2px;
  }
  .home-stat-main {
    margin-top: 5px;
    color: #2a6496;
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .home-stat-sub {
    margin-top: 3px;
    color: rgba(15,32,68,0.38);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  .home-stat-meta {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    color: rgba(42,100,150,0.68);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .home-stat-meta b {
    color: #0f2044;
    font-variant-numeric: tabular-nums;
  }

  /* Logo */
  .logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: -2px;
  }
  .logo-glow {
    position: absolute;
    width: 88px; height: 88px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(91,200,245,0.35) 0%, transparent 70%);
    animation: glowPulse 2s ease-in-out infinite;
  }
  @keyframes glowPulse { 0%,100% { transform:scale(1); opacity:0.6; } 50% { transform:scale(1.2); opacity:1; } }
  .logo-float { animation: logoFloat 3s ease-in-out infinite; }
  @keyframes logoFloat { 0%,100% { transform:translateY(0) rotate(-2deg); } 50% { transform:translateY(-10px) rotate(2deg); } }

  .game-title {
    font-size: 48px;
    font-weight: 900;
    color: #0f2044;
    line-height: 1;
    text-align: center;
    letter-spacing: -2px;
    text-shadow: 0 3px 0 rgba(255,255,255,0.5);
    margin-bottom: -2px;
  }
  .game-title span { color: #F5A623; }

  .home-tagline {
    font-size: 11px;
    font-weight: 800;
    color: rgba(42,100,150,0.5);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 2px;
  }

  .player-name-box {
    width: 100%;
    margin-bottom: 0;
  }
  .player-name-box label {
    display: block;
    margin-bottom: 5px;
    font-size: 10px;
    font-weight: 900;
    color: rgba(42,100,150,0.6);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
  }
  .player-name-row {
    display: grid;
    grid-template-columns: 1fr 70px;
    gap: 8px;
  }
  .player-name-row input {
    width: 100%;
    min-width: 0;
    height: 34px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.52);
    color: #0f2044;
    font-family: var(--app-font);
    font-size: 15px;
    font-weight: 900;
    text-align: center;
    outline: none;
  }
  .player-name-row button {
    height: 34px;
    border: none;
    border-radius: 8px;
    background: #4A7FA5;
    box-shadow: 0 4px 0 #2D5F80;
    color: white;
    font-family: var(--app-font);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
  }
  .player-name-status {
    min-height: 16px;
    margin-top: 4px;
    color: rgba(42,100,150,0.65);
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
  }

  .profile-card {
    display: grid;
    gap: 8px;
    background: rgba(255,255,255,0.58);
    border-radius: 14px;
    border: 3px solid rgba(255,255,255,0.8);
    padding: 8px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.07);
  }
  .profile-section {
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.65);
    background: rgba(255,255,255,0.34);
    overflow: hidden;
  }
  .profile-section-title {
    padding: 6px 12px 5px;
    background: rgba(74,127,165,0.12);
    color: #2a6496;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    text-align: left;
  }
  .profile-row {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 5px 12px;
    border-top: 2px solid rgba(255,255,255,0.42);
  }
  .profile-row span {
    color: rgba(42,100,150,0.72);
    font-size: 13px;
    font-weight: 900;
  }
  .profile-row b {
    color: #0f2044;
    font-size: 16px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    text-align: right;
  }

  .menu-btn {
    width: 100%;
    border: none;
    font-family: var(--app-font);
    font-weight: 900;
    color: white;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: transform 0.08s, box-shadow 0.08s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
  }
  .menu-btn:active { transform: translateY(4px); }

  .menu-btn.primary {
    height: 66px;
    border-radius: 18px;
    font-size: 24px;
    background: #27ae60;
    box-shadow: 0 5px 0 #1e8449, 0 8px 20px rgba(39,174,96,0.3);
    margin-bottom: 0;
  }
  .menu-btn.primary:active { box-shadow: 0 2px 0 #1e8449; }

  .menu-btn.secondary {
    height: 56px;
    border-radius: 14px;
    font-size: 16px;
    background: #5BC8F5;
    box-shadow: 0 5px 0 #3A9AC7, 0 8px 20px rgba(91,200,245,0.3);
    margin-bottom: 0;
    gap: 2px;
  }
  .menu-btn.secondary:active { box-shadow: 0 2px 0 #3A9AC7; }
  .menu-btn.secondary small { font-size: 10px; opacity: 0.85; letter-spacing: 2px; }

  .menu-btn.locked {
    background: rgba(255,255,255,0.3);
    box-shadow: 0 4px 0 rgba(0,0,0,0.06);
    color: rgba(42,100,150,0.5);
    border: 2px solid rgba(255,255,255,0.6);
    pointer-events: none;
    text-shadow: none;
  }

  .home-icon-row {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 2px;
  }

  .icon-btn {
    flex: 1;
    height: 44px;
    border-radius: 14px;
    border: none;
    font-family: var(--app-font);
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    background: rgba(255,255,255,0.35);
    border: 2px solid rgba(255,255,255,0.65);
    color: #2a6496;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: transform 0.08s, background 0.2s;
    text-shadow: none;
  }
  .icon-btn:active { transform: scale(0.96); }

  .dev-btn { margin-top: 12px; background: none; border: none; color: rgba(15,32,68,0.3); font-size: 11px; font-weight: 800; text-transform: uppercase; cursor: pointer; letter-spacing: 1px; }
  .dev-btn:active { color: #e74c3c; }

  .ks-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(39,174,96,0.12);
    border: 1.5px solid rgba(39,174,96,0.3);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 9px;
    font-weight: 800;
    color: #27ae60;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
  }

  .btn-exit-game { background: rgba(255,255,255,0.55); border-radius: 16px; border: 2px solid rgba(255,255,255,0.7); width: 60px; align-self: stretch; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; flex-shrink: 0; transition: transform 0.08s; padding: 6px 0; }
  .btn-exit-game:active { transform: translateY(2px); background: rgba(255,255,255,0.65); }
  .exit-icon { font-size: 20px; line-height: 1; }
  .exit-label { font-size: 10px; font-weight: 900; color: rgba(50,80,120,0.7); text-transform: uppercase; letter-spacing: 1.5px; }

  .top-bar { width: 100%; display: flex; justify-content: space-between; }
  .score-box { background: rgba(255,255,255,0.55); border-radius: 16px; border: 2px solid rgba(255,255,255,0.7); padding: 8px 16px; text-align: center; min-width: 100px; }
  .score-box-label { font-size: 10px; font-weight: 800; color: rgba(50,80,120,0.7); text-transform: uppercase; letter-spacing: 1.5px; }
  .score-box-value { font-size: 22px; font-weight: 900; color: #2a6496; line-height: 1.1; transition: color 0.3s; font-variant-numeric: tabular-nums; }
  .score-box-value.daily-mode { color: #FF6B00; } 
  
  .timer-section { width: 100%; margin-top: 12px;}
  .timer-label { text-align: center; font-size: 16px; font-weight: 800; color: #2a6496; margin-bottom: 8px; transition: color 0.3s; font-variant-numeric: tabular-nums; }
  .timer-label span { font-size: 20px; color: #1a5490; transition: color 0.3s; font-variant-numeric: tabular-nums; }
  @keyframes pulseText { 0% { transform: scale(1); text-shadow: 0 0 10px rgba(232, 58, 26, 0.4); } 100% { transform: scale(1.05); text-shadow: 0 0 20px rgba(232, 58, 26, 0.8); } }
  .timer-label.danger { color: #e83a1a; display: block; animation: pulseText 0.4s infinite alternate; }
  .timer-label.danger span { color: #e83a1a; }
  @keyframes shakeTimer { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-4px); } }
  .timer-label.shake { animation: shakeTimer 0.3s ease; color: #e74c3c; }
  .timer-label.shake span { color: #e74c3c; }
  
  .timer-bar-bg { width: 100%; height: 14px; background: rgba(255,255,255,0.5); border-radius: 10px; overflow: hidden; border: 2px solid rgba(255,255,255,0.7); }
  .timer-bar-fill { height: 100%; background: linear-gradient(90deg, #5BC8F5, #2a9fd6); border-radius: 8px; transition: transform 0.08s linear, background 0.3s; transform-origin: left center; transform: scaleX(1); width: 100%; will-change: transform; }
  .timer-bar-fill.warning { background: linear-gradient(90deg, #f5c623, #e8a21a); }
  .timer-bar-fill.danger  { background: linear-gradient(90deg, #f55c23, #e83a1a); }
  .timer-bar-fill.daily   { background: linear-gradient(90deg, #27ae60, #2ecc71); } 

  .middle-section { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; width: 100%; padding: 20px 0; }
  .question-section { text-align: center; display: flex; justify-content: center; }
  .question-text { display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1; background: rgba(255, 255, 255, 0.38); border-radius: 40px; padding: 15px 35px; border: 2px solid rgba(255,255,255,0.5); box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
  .question-text .n1, .question-text .n2 { display: inline-block; opacity: 0; font-size: 64px; font-weight: 900; color: #2a6496; text-shadow: 0 3px 0 rgba(255,255,255,0.4); letter-spacing: -1px; }
  .question-text .operator { display: inline-block; opacity: 0; font-size: 36px; font-weight: 900; color: #F5A623; text-shadow: 0 2px 0 rgba(180,90,0,0.2); margin-bottom: 6px; }
  @keyframes slideInLeft { 0% { transform: translateX(-30px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
  @keyframes slideInRight { 0% { transform: translateX(30px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
  @keyframes popIn { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
  .question-text.animate .n1 { animation: slideInLeft 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
  .question-text.animate .operator { animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s both; display: inline-block; }
  .question-text.animate .n2 { animation: slideInRight 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.03s both; }
  
  .circle-section { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 10px; }
  .tap-circle-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0px; transition: transform 0.08s ease; }
  .tap-circle-inner.punch { transform: scale(1.15); }
  @keyframes shakeWrong { 0% { transform: translateX(0) scale(1); } 20% { transform: translateX(-12px) scale(0.95); } 40% { transform: translateX(12px) scale(0.95); } 55% { transform: translateX(-8px); } 70% { transform: translateX(8px); } 100% { transform: translateX(0) scale(1); } }
  .tap-circle-inner.wrong { animation: shakeWrong 0.6s ease forwards; }
  .tap-number { font-size: 110px; font-weight: 900; color: #0f2044; text-shadow: 0 4px 0 rgba(255,255,255,0.5), 0 8px 20px rgba(0,0,0,0.08); line-height: 1; position: relative; z-index: 2; font-variant-numeric: tabular-nums; }
  .tap-label { font-size: 11px; font-weight: 800; color: rgba(15,32,68,0.35); text-transform: uppercase; letter-spacing: 3px; position: relative; z-index: 2; }
  
  .question-counter { font-size: 12px; font-weight: 800; color: rgba(50,80,120,0.5); text-transform: uppercase; letter-spacing: 2px; }
  .feedback-text { font-size: 20px; font-weight: 900; color: transparent; text-transform: uppercase; letter-spacing: 2px; min-height: 28px; text-align: center; }
  .feedback-text.wrong { color: #e74c3c; }
  .hint-text { font-size: 13px; font-weight: 800; color: rgba(50,80,120,0.55); text-align: center; letter-spacing: 1px; transition: opacity 0.8s ease; opacity: 1; }
  .hint-text.hidden { opacity: 0; pointer-events: none; }

  .buttons-section { width: 100%; display: flex; align-items: center; gap: 12px; }
  .btn-plus1 { width: 90px; height: 85px; border-radius: 14px; border: none; background: #5BC8F5; box-shadow: 0 4px 0 #3A9AC7, 0 6px 16px rgba(91,200,245,0.25); font-family: var(--app-font); font-size: 24px; font-weight: 900; color: white; cursor: pointer; transition: transform 0.08s, box-shadow 0.08s; text-shadow: 0 2px 4px rgba(0,0,0,0.15); flex-shrink: 0; }
  .btn-plus1:active { transform: translateY(3px); box-shadow: 0 1px 0 #3A9AC7; }
  .btn-plus5 { width: 90px; height: 85px; border-radius: 14px; border: 2px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.15); box-shadow: none; font-family: var(--app-font); font-size: 24px; font-weight: 900; color: rgba(42,100,150,0.25); cursor: default; pointer-events: none; transition: all 0.4s ease; flex-shrink: 0; }
  .btn-plus5.unlocked { background: #4A7FA5; box-shadow: 0 4px 0 #2D5F80, 0 6px 16px rgba(74,127,165,0.25); color: white; cursor: pointer; pointer-events: all; text-shadow: 0 2px 4px rgba(0,0,0,0.15); animation: unlockPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
  @keyframes unlockPop { 0% { transform: scale(0.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
  .btn-plus5.unlocked:active { transform: translateY(3px); box-shadow: 0 1px 0 #2D5F80; }
  .btn-lock { flex: 1; height: 85px; border-radius: 14px; border: none; background: #27ae60; box-shadow: 0 4px 0 #1e8449, 0 6px 20px rgba(39,174,96,0.3); font-family: var(--app-font); font-size: 32px; font-weight: 900; color: white; cursor: pointer; transition: transform 0.08s, box-shadow 0.08s; text-shadow: 0 2px 4px rgba(0,0,0,0.15); }
  .btn-lock:active { transform: translateY(3px); box-shadow: 0 1px 0 #1e8449; }

  .game-over-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; text-align: center; }
  .leaderboard-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px; text-align: center; width: 100%; height: 100%; }
  .profile-wrapper { flex: 1; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px; text-align: center; width: 100%; padding-top: 0; padding-bottom: 0; }
  #screenProfile { overflow: hidden; padding-top: 32px; padding-bottom: 32px; }
  .profile-header { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 0 2px; }
  .profile-avatar { font-size: 28px; line-height: 1; }
  .profile-header-name { font-size: 20px; font-weight: 900; color: #0f2044; letter-spacing: 0.5px; }
  .profile-name-card { background: rgba(255,255,255,0.58); border-radius: 14px; border: 3px solid rgba(255,255,255,0.8); padding: 10px 14px 8px; box-shadow: 0 10px 24px rgba(0,0,0,0.07); }
  .profile-name-label { font-size: 10px; font-weight: 900; color: rgba(42,100,150,0.6); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; }
  .profile-highlight-card { background: linear-gradient(135deg, rgba(245,166,35,0.35), rgba(255,220,100,0.2)); border-radius: 14px; border: 2px solid rgba(245,166,35,0.7); padding: 12px 20px; display: flex; flex-direction: column; align-items: center; gap: 3px; box-shadow: 0 6px 18px rgba(245,166,35,0.25); }
  .profile-highlight-card span { color: rgba(42,100,150,0.75); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 1.2px; }
  .profile-highlight-card b { color: #0f2044; font-size: 32px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
  .profile-footer { width: 100%; margin-top: auto; padding-top: 4px; display: flex; }

  .name-prompt-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,32,68,0.62); z-index: 200; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .name-prompt-overlay.show { opacity: 1; pointer-events: all; }
  .name-prompt-box { background: rgba(255,255,255,0.96); border-radius: 24px; padding: 28px 24px 20px; width: 82%; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
  .name-prompt-title { font-size: 22px; font-weight: 900; color: #0f2044; margin-bottom: 6px; }
  .name-prompt-sub { font-size: 11px; font-weight: 800; color: rgba(42,100,150,0.6); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 18px; }
  .name-prompt-skip { margin-top: 14px; background: none; border: none; color: rgba(42,100,150,0.4); font-family: var(--app-font); font-size: 11px; font-weight: 800; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; display: block; width: 100%; text-align: center; }
  .go-title { font-size: 38px; font-weight: 900; color: #0f2044; text-shadow: 0 3px 0 rgba(255,255,255,0.5); }
  .go-box { background: rgba(255,255,255,0.58); border-radius: 24px; border: 3px solid rgba(255,255,255,0.8); padding: 30px; width: 100%; box-shadow: 0 20px 40px rgba(0,0,0,0.1); display: none; }
  .go-box.active { display: block; }
  .go-label { font-size: 14px; font-weight: 800; color: rgba(50,80,120,0.7); text-transform: uppercase; letter-spacing: 2px; }
  .go-score { font-size: 54px; font-weight: 900; color: #2a6496; line-height: 1; margin: 10px 0; font-variant-numeric: tabular-nums; }
  .result-title { color: #0f2044; font-size: 22px; font-weight: 900; line-height: 1.1; margin-top: 2px; }
  .result-note { color: rgba(42,100,150,0.72); font-size: 13px; font-weight: 900; line-height: 1.25; margin: 8px auto 10px; max-width: 250px; }
  .go-streak { font-size: 16px; font-weight: 800; color: #F5A623; }
  .leaderboard-status { min-height: 22px; margin-top: 12px; font-size: 14px; font-weight: 900; color: #F5A623; text-transform: uppercase; letter-spacing: 1px; }
  .leaderboard-status.pending { font-size: 11px; color: rgba(42,100,150,0.55); }

  .go-action-row { display: flex; gap: 10px; width: 100%; }
  .go-action-btn { flex: 1; height: 58px; border-radius: 14px; border: 2px solid rgba(255,255,255,0.65); background: rgba(255,255,255,0.46); color: #2a6496; font-family: var(--app-font); font-size: 20px; font-weight: 900; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; transition: transform 0.08s, background 0.15s; }
  .go-action-btn span { font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: rgba(42,100,150,0.7); }
  .go-action-btn:active { transform: translateY(2px); background: rgba(255,255,255,0.65); }
  .leaderboard-panel { width: 100%; flex: 1; display: flex; flex-direction: column; background: rgba(255,255,255,0.58); border-radius: 24px; border: 3px solid rgba(255,255,255,0.8); padding: 16px 18px 14px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); margin-top: 2px; }
  .leaderboard-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
  .leaderboard-tab { min-height: 42px; border: 2px solid rgba(255,255,255,0.65); border-radius: 8px; background: rgba(255,255,255,0.35); color: #2a6496; font-family: var(--app-font); font-size: 13px; font-weight: 900; text-transform: uppercase; cursor: pointer; }
  .leaderboard-tab.active { background: #27ae60; color: white; border-color: #27ae60; box-shadow: 0 4px 0 #1e8449; }
  .leaderboard-list { display: flex; flex-direction: column; gap: 8px; flex: 1; }
  .leaderboard-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; min-height: 46px; padding: 10px 14px; background: rgba(255,255,255,0.45); border: 2px solid rgba(255,255,255,0.65); border-radius: 10px; color: #0f2044; font-weight: 900; font-size: 15px; }
  .leaderboard-row.rank-1 { background: rgba(255,215,0,0.22); border-color: rgba(255,190,0,0.5); font-size: 17px; min-height: 54px; }
  .leaderboard-row.rank-2 { background: rgba(200,210,220,0.35); border-color: rgba(180,195,210,0.6); font-size: 16px; min-height: 50px; }
  .leaderboard-row.rank-3 { background: rgba(205,140,80,0.18); border-color: rgba(180,110,50,0.35); font-size: 15px; }
  .leaderboard-rank { color: #F5A623; font-variant-numeric: tabular-nums; }
  .leaderboard-row.rank-1 .leaderboard-rank { color: #d4a000; font-size: 20px; }
  .leaderboard-row.rank-2 .leaderboard-rank { color: #8a9baa; }
  .leaderboard-row.rank-3 .leaderboard-rank { color: #b07840; }
  .leaderboard-name { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .leaderboard-score { color: #2a6496; font-variant-numeric: tabular-nums; }
  .leaderboard-row.rank-1 .leaderboard-score { color: #b8860b; }
  .leaderboard-empty { display: flex; align-items: center; justify-content: center; flex: 1; color: rgba(42,100,150,0.65); font-size: 13px; font-weight: 800; line-height: 1.4; }
  .leaderboard-footer { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 0 2px; }
  .leaderboard-home-btn { flex: 1; min-height: 46px; border-radius: 10px; border: 2px solid rgba(255,255,255,0.7); background: rgba(255,255,255,0.52); color: #2a6496; font-family: var(--app-font); font-size: 15px; font-weight: 900; cursor: pointer; transition: transform 0.08s, background 0.15s; }
  .leaderboard-home-btn:active { transform: translateY(2px); background: rgba(255,255,255,0.68); }
  .leaderboard-tool { width: 46px; height: 46px; border-radius: 10px; border: 2px solid rgba(255,255,255,0.7); background: rgba(255,255,255,0.52); color: #2a6496; font-family: var(--app-font); font-size: 20px; font-weight: 900; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.08s, background 0.15s; }
  .leaderboard-tool:active { transform: translateY(2px); background: rgba(255,255,255,0.68); }
  
  .daily-grid { font-size: 32px; letter-spacing: 5px; line-height: 1.4; margin: 15px 0; display: block; min-height: 90px; }
  .grid-emoji { display: inline-block; transform: scale(0); opacity: 0; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s; }
  .grid-emoji.pop { transform: scale(1); opacity: 1; }
  .share-btn { background: #27ae60; box-shadow: 0 4px 0 #1e8449; border: none; padding: 12px 24px; border-radius: 12px; font-family: var(--app-font); font-weight: 900; color: white; font-size: 18px; cursor: pointer; text-transform: uppercase; width: 100%; margin-top: 10px; transition: transform 0.08s, opacity 0.3s; opacity: 0; transform: translateY(10px); }
  .share-btn:active { transform: translateY(13px); box-shadow: 0 1px 0 #1e8449; }

  .speed-tier-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 50; pointer-events: none; opacity: 0; }
  .speed-tier-overlay.show { animation: tierFadeInOut 0.7s ease forwards; }
  @keyframes tierFadeInOut { 0% { opacity: 0; } 15% { opacity: 1; } 65% { opacity: 1; } 100% { opacity: 0; } }
  .speed-tier-word { font-size: 64px; font-weight: 900; letter-spacing: -2px; line-height: 1; text-align: center; animation: tierWordPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
  @keyframes tierWordPop { 0% { transform: scale(0.4); opacity: 0; } 30% { transform: scale(1.1); opacity: 1; } 55% { transform: scale(1.0); } 80% { opacity: 1; } 100% { transform: scale(1.0); opacity: 0; } }
  .godlike  .speed-tier-word { color: #FF6B00; text-shadow: 0 0 30px rgba(255,107,0,0.8), 0 4px 0 rgba(0,0,0,0.2); }
  .insane   .speed-tier-word { color: #cc00cc; text-shadow: 0 0 30px rgba(200,0,200,0.7), 0 4px 0 rgba(0,0,0,0.2); }
  .great    .speed-tier-word { color: #2a9fd6; text-shadow: 0 0 30px rgba(42,159,214,0.7), 0 4px 0 rgba(0,0,0,0.2); }
  .nice     .speed-tier-word { color: #27ae60; text-shadow: 0 0 30px rgba(39,174,96,0.7), 0 4px 0 rgba(0,0,0,0.2); }
  .speed-tier-sub { font-size: 18px; font-weight: 800; color: white; letter-spacing: 3px; text-transform: uppercase; margin-top: 8px; text-shadow: 0 2px 8px rgba(0,0,0,0.3); animation: tierSubFade 0.7s ease forwards; }
  @keyframes tierSubFade { 0% { transform: translateY(8px); opacity: 0; } 30% { transform: translateY(0); opacity: 1; } 65% { opacity: 1; } 100% { opacity: 0; } }
  .tier-particles { position: absolute; width: 100%; height: 100%; top: 0; left: 0; pointer-events: none; }
  .tier-particle { position: absolute; width: 8px; height: 8px; border-radius: 50%; animation: particleFly 0.6s ease forwards; }
  @keyframes particleFly { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; } }

  .toast { position: absolute; left: 50%; transform: translateX(-50%) translateY(10px); color: white; font-size: 13px; font-weight: 800; padding: 10px 22px; border-radius: 20px; white-space: nowrap; opacity: 0; pointer-events: none; z-index: 100; letter-spacing: 1px; text-transform: uppercase; transition: opacity 0.3s, transform 0.3s; }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
  .unlock-toast { bottom: 135px; background: linear-gradient(135deg, #4A7FA5, #2D5F80); box-shadow: 0 5px 0 #1a4060; }
  .clipboard-toast { top: 60px; background: #27ae60; box-shadow: 0 5px 0 #1e8449; }

  .time-penalty-toast { position: absolute; top: 120px; left: 50%; transform: translateX(-50%); font-size: 32px; font-weight: 900; color: #e74c3c; text-shadow: 0 4px 10px rgba(231,76,60,0.4), 0 2px 0 #fff; z-index: 100; pointer-events: none; opacity: 0; }
  .time-penalty-toast.show { animation: penaltyFloat 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
  @keyframes penaltyFloat { 0% { transform: translateX(-50%) translateY(20px) scale(0.5); opacity: 0; } 20% { transform: translateX(-50%) translateY(0) scale(1.2); opacity: 1; } 80% { transform: translateX(-50%) translateY(-20px) scale(1); opacity: 1; } 100% { transform: translateX(-50%) translateY(-40px) scale(0.8); opacity: 0; } }

  .help-overlay {
    position: absolute;
    inset: 0;
    z-index: 220;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15,32,68,0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .help-overlay.show {
    opacity: 1;
    pointer-events: all;
  }
  .help-box {
    width: 100%;
    max-width: 320px;
    border-radius: 8px;
    border: 3px solid rgba(255,255,255,0.86);
    background: rgba(255,255,255,0.96);
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    padding: 24px 22px 20px;
    text-align: center;
  }
  .help-title {
    color: #0f2044;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 16px;
  }
  .help-copy {
    display: grid;
    gap: 10px;
    color: rgba(42,100,150,0.78);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.25;
  }
  .help-copy b { color: #0f2044; }
  .help-close-btn {
    width: 100%;
    height: 50px;
    margin-top: 20px;
    border: none;
    border-radius: 8px;
    background: #27ae60;
    box-shadow: 0 5px 0 #1e8449;
    color: white;
    font-family: var(--app-font);
    font-size: 17px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
  }
  .help-close-btn:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #1e8449;
  }

  .phone.on-fire { animation: phoneShake 0.5s ease; box-shadow: 0 0 50px #FF6B00, 0 40px 80px rgba(0,0,0,0.5); transition: box-shadow 0.3s; }
  @keyframes phoneShake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
  .fire-toast { position: absolute; top: 30%; left: 50%; transform: translate(-50%, -50%) scale(0); font-size: 42px; font-weight: 900; color: #FF6B00; text-shadow: 0 4px 15px rgba(255,107,0,0.6), 0 2px 0 #fff; z-index: 100; pointer-events: none; opacity: 0; white-space: nowrap; text-transform: uppercase; letter-spacing: -1px; }
  .fire-toast.show { animation: popFire 2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
  @keyframes popFire { 0% { transform: translate(-50%, -50%) scale(0.5) rotate(-5deg); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.1) rotate(3deg); opacity: 1; } 80% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; } }
