  * { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh; overflow: hidden;
  }
  .screen { display: none; height: 100vh; padding: 20px; }
  .screen.active { display: flex; flex-direction: column; align-items: center; justify-content: center; }
  .nav-controls {
    position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%);
    display: none; gap: 10px; z-index: 80;
    background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.45);
    border-radius: 999px; padding: 8px; backdrop-filter: blur(10px);
  }
  .nav-controls.show { display: flex; }
  .nav-btn {
    min-width: 92px; padding: 9px 16px; border: none; border-radius: 999px;
    background: rgba(255,255,255,0.92); color: #4b5fd5;
    font-weight: bold; font-size: 0.98em; cursor: pointer; font-family: inherit;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  }
  .nav-btn:hover { transform: translateY(-1px); }
  .student-bar {
    position: fixed; top: 12px; right: 16px; z-index: 90;
    display: none; align-items: center; gap: 8px;
    padding: 8px 10px 8px 14px; border-radius: 999px;
    background: rgba(255,255,255,0.9); color: #4b5fd5;
    box-shadow: 0 5px 18px rgba(0,0,0,0.18); font-weight: bold;
  }
  .student-bar.show { display: flex; }
  .student-info { font-size: 0.95em; white-space: nowrap; }
  .switch-btn {
    border: none; border-radius: 999px; padding: 6px 12px;
    background: #667eea; color: white; font-family: inherit;
    font-weight: bold; cursor: pointer;
  }

  /* Login */
  #login { color: white; text-align: center; }
  #login h1 { font-size: 2.6em; margin-bottom: 22px; text-shadow: 3px 3px 6px rgba(0,0,0,0.25); }
  .login-panel {
    width: 100%; max-width: 560px; padding: 24px;
    background: rgba(255,255,255,0.94); color: #333;
    border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,0.24);
  }
  .login-panel h2 { color: #4b5fd5; margin-bottom: 14px; }
  .saved-players {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px; margin-bottom: 16px;
  }
  .player-card {
    min-height: 72px; border: 2px solid #cbd5ff; border-radius: 12px;
    background: #f6f8ff; color: #4b5fd5; font-family: inherit;
    font-weight: bold; cursor: pointer; font-size: 1.05em;
  }
  .player-card small { display: block; margin-top: 4px; color: #777; font-size: 0.78em; }
  .empty-players { color: #666; font-weight: bold; margin-bottom: 14px; }
  .login-input-row { display: flex; gap: 10px; justify-content: center; }
  .login-input-row input {
    width: min(260px, 60vw); padding: 14px 16px; border: 3px solid #667eea;
    border-radius: 14px; font-size: 1.15em; font-family: inherit; outline: none;
  }
  .login-input-row button {
    border: none; border-radius: 14px; padding: 0 22px;
    background: linear-gradient(135deg, #667eea, #764ba2); color: white;
    font-family: inherit; font-size: 1.1em; font-weight: bold; cursor: pointer;
  }
  .login-error { min-height: 24px; margin-top: 10px; color: #c62828; font-weight: bold; }

  /* Home */
  #home { color: white; text-align: center; overflow-y: auto; }
  #home h1 { font-size: 2.6em; margin-bottom: 10px; text-shadow: 3px 3px 6px rgba(0,0,0,0.25); }
  .home-subtitle { font-size: 1.15em; opacity: 0.9; margin-bottom: 24px; }
  .topic-grid {
    width: 100%; max-width: 780px; display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px;
  }
  .topic-card {
    min-height: 210px; padding: 20px 16px; border: 2px solid rgba(255,255,255,0.55);
    border-radius: 16px; background: rgba(255,255,255,0.92); color: #333;
    cursor: pointer; font-family: inherit; text-align: center;
    box-shadow: 0 8px 26px rgba(0,0,0,0.22); transition: all 0.25s;
  }
  .topic-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 12px 32px rgba(0,0,0,0.3); }
  .topic-card.locked { cursor: default; opacity: 0.72; filter: grayscale(0.25); }
  .topic-card.locked:hover { transform: none; }
  .topic-icon { font-size: 3.4em; line-height: 1; margin-bottom: 14px; }
  .topic-name { font-size: 1.45em; font-weight: bold; color: #4b5fd5; margin-bottom: 8px; }
  .topic-desc { font-size: 0.95em; line-height: 1.6; color: #555; }
  .topic-status {
    display: inline-block; margin-top: 14px; padding: 5px 12px; border-radius: 999px;
    background: #e8f5e9; color: #2e7d32; font-size: 0.9em; font-weight: bold;
  }
  .topic-card.locked .topic-status { background: #f0f0f0; color: #777; }
  .topic-toast {
    min-height: 28px; margin-top: 18px; padding: 6px 14px;
    color: rgba(255,255,255,0.95); font-weight: bold;
  }

  /* Welcome */
  #welcome { text-align: center; color: white; }
  #welcome h1 { font-size: 3em; margin-bottom: 10px; text-shadow: 3px 3px 6px rgba(0,0,0,0.3); animation: bounce 2s infinite; }
  #welcome .subtitle { font-size: 1.3em; margin-bottom: 40px; opacity: 0.9; }
  @keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-15px)} }
  .start-btn {
    font-size: 1.5em; padding: 18px 60px; border: none; border-radius: 50px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white; cursor: pointer; box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: all 0.3s; font-family: inherit;
  }
  .start-btn:hover { transform: scale(1.08); }
  .welcome-chars { font-size: 4em; margin: 30px 0; display: flex; justify-content: center; align-items: center; gap: 60px; }
  .face-right { display: inline-block; transform: scaleX(-1); }
  .home-link {
    margin-top: 16px; padding: 8px 20px; border: 1px solid rgba(255,255,255,0.5);
    border-radius: 999px; background: rgba(255,255,255,0.16); color: white;
    cursor: pointer; font-family: inherit; font-size: 0.95em;
  }
  .home-link:hover { background: rgba(255,255,255,0.25); }
  .core-card, .review-card {
    width: 100%; max-width: 620px; padding: 22px;
    background: rgba(255,255,255,0.92); color: #333;
    border-radius: 16px; box-shadow: 0 8px 28px rgba(0,0,0,0.24);
    text-align: left;
  }
  .core-card h2, .review-card h2 { text-align: center; color: #4b5fd5; margin-bottom: 14px; }
  .core-list { display: grid; gap: 10px; font-size: 1.25em; line-height: 1.6; font-weight: bold; }
  .core-line {
    padding: 12px 14px; border-radius: 12px;
    background: #f0f4ff; border-left: 4px solid #667eea;
    display: flex; align-items: center; gap: 12px; cursor: pointer;
    opacity: 0; transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease, background 0.3s, border-color 0.3s;
    pointer-events: none;
  }
  .core-line.visible {
    opacity: 1; transform: translateY(0); pointer-events: auto;
  }
  .core-line.checked {
    background: #e8f5e9; border-left-color: #43a047;
  }
  .core-line .core-text { flex: 1; }
  .core-check {
    width: 28px; height: 28px; min-width: 28px; border-radius: 8px;
    border: 2.5px solid #b0bec5; background: white; cursor: pointer;
    display: grid; place-items: center; transition: all 0.25s;
    font-size: 0; color: transparent;
  }
  .core-check:hover { border-color: #667eea; background: #f0f4ff; }
  .core-check.done {
    border-color: #43a047; background: #43a047; color: white;
    font-size: 16px; animation: checkPop 0.3s ease;
  }
  @keyframes checkPop {
    0% { transform: scale(0.6); } 50% { transform: scale(1.2); } 100% { transform: scale(1); }
  }
  .start-btn:disabled {
    opacity: 0.4; pointer-events: none; filter: grayscale(0.6);
  }
  .review-question { font-size: 1.25em; font-weight: bold; text-align: center; margin-bottom: 14px; }
  .review-feedback { margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-weight: bold; display: none; text-align: center; }
  .review-feedback.correct { display: block; background: #e8f5e9; color: #2e7d32; }
  .review-feedback.wrong { display: block; background: #ffebee; color: #c62828; }
  .point-pill {
    display: inline-block; margin-left: 8px; padding: 3px 9px; border-radius: 999px;
    background: #fff3cd; color: #b26a00; font-size: 0.78em; font-weight: bold;
    vertical-align: middle;
  }

  /* Meet Game - New Design */
  .meet-subtitle { font-size: 1em; color: #555; text-align: center; margin-bottom: 8px; font-weight: bold; }
  .gap-indicator {
    display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    font-size: 0.8em; font-weight: bold; color: #c2185b; background: #fce4ec;
    padding: 2px 10px; border-radius: 10px; border: 1px solid #f48fb1; z-index: 4;
  }
  .time-counter { text-align: center; margin-top: 8px; font-size: 1.1em; font-weight: bold; color: #667eea; }
  .control-panel {
    width: 100%; max-width: 800px; flex: 1; min-height: 0;
    background: rgba(255,255,255,0.95); border-radius: 16px; padding: 16px 20px;
    box-shadow: 0 6px 30px rgba(0,0,0,0.2); overflow-y: auto;
  }
  .slider-group { margin: 10px 0; }
  .slider-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-weight: bold; color: #444; }
  .slider-value { color: #667eea; font-size: 1.1em; }
  .speed-slider { width: 100%; height: 8px; border-radius: 4px; outline: none; -webkit-appearance: none; appearance: none; background: linear-gradient(90deg,#e0e5ff,#667eea); }
  .speed-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: #667eea; border: 3px solid white; box-shadow: 0 2px 8px rgba(0,0,0,0.2); cursor: pointer; }
  .speed-sum-display { text-align: center; margin: 8px 0; padding: 8px; background: #f0f4ff; border-radius: 10px; font-weight: bold; color: #667eea; font-size: 1.05em; border: 2px solid #d7defc; }
  .predict-choices { display: flex; gap: 12px; justify-content: center; margin: 12px 0; }
  .predict-btn { min-width: 90px; padding: 14px 20px; border: 2px solid #d7defc; border-radius: 14px; background: white; color: #4b5fd5; font-size: 1.3em; font-weight: bold; cursor: pointer; font-family: inherit; transition: all 0.2s; }
  .predict-btn:hover { border-color: #667eea; background: #f0f4ff; transform: translateY(-2px); }
  .predict-btn.ok { border-color: #4caf50; background: #e8f5e9; color: #2e7d32; }
  .predict-btn.err { border-color: #f44336; background: #ffebee; color: #c62828; }
  .compare-label { display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: 0.85em; font-weight: bold; }
  .compare-label-a { background: #e3f2fd; color: #1565c0; }
  .compare-label-b { background: #fce4ec; color: #c2185b; }
  .console-row { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 8px 0; flex-wrap: wrap; }
  .console-label { font-weight: bold; color: #555; min-width: 80px; text-align: right; }
  .console-input { width: 90px; padding: 8px; border: 2px solid #ddd; border-radius: 10px; text-align: center; font-size: 1.15em; font-family: inherit; }
  .console-input:focus { outline: none; border-color: #667eea; }
  .console-input.ok { border-color: #4caf50 !important; background: #e8f5e9; }
  .console-input.err { border-color: #f44336 !important; background: #ffebee; }
  .console-unit { color: #666; font-weight: bold; }
  .meet-feedback { text-align: center; margin-top: 10px; padding: 10px; border-radius: 10px; font-weight: bold; }
  .meet-feedback.success { background: #e8f5e9; color: #2e7d32; }
  .meet-feedback.miss { background: #fff3e0; color: #e65100; }
  .meet-feedback.overshoot { background: #fce4ec; color: #c2185b; }
  .round-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
  .round-dot { width: 10px; height: 10px; border-radius: 50%; background: #ddd; }
  .round-dot.active { background: #667eea; transform: scale(1.2); }
  .round-dot.done { background: #4caf50; }
  .discovery { background: linear-gradient(135deg,#e8f5e9,#f1f8e9); border: 1px solid #81c784; border-radius: 10px; padding: 10px 14px; margin: 8px 0; font-size: 1em; color: #2e7d32; text-align: center; line-height: 1.6; }
  .challenge-text { font-size: 1.05em; color: #333; line-height: 1.7; padding: 10px 12px; background: #f0f4ff; border-radius: 10px; border-left: 4px solid #667eea; margin-bottom: 10px; }
  .road-b { margin-top: 5px; }

  /* Game */
  #game { justify-content: flex-start; padding: 10px 20px; overflow: hidden; }
  .top-bar {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; max-width: 800px; color: white; flex-shrink: 0; margin-bottom: 8px;
  }
  .level-badge { background: rgba(255,255,255,0.2); padding: 6px 16px; border-radius: 20px; font-size: 1em; font-weight: bold; backdrop-filter: blur(10px); }
  .stars-display { font-size: 1.2em; letter-spacing: 3px; }

  /* Road */
  .road-container {
    width: 100%; max-width: 800px; background: rgba(255,255,255,0.95);
    border-radius: 16px; padding: 14px 20px; box-shadow: 0 6px 30px rgba(0,0,0,0.2);
    flex-shrink: 0; margin-bottom: 10px;
  }
  .story-text { font-size: 1em; color: #333; line-height: 1.7; padding: 10px 12px; background: #f0f4ff; border-radius: 10px; border-left: 4px solid #667eea; margin-bottom: 10px; }
  .road { position: relative; height: 80px; margin: 5px 0; }
  .road-line { position: absolute; top: 50%; left: 30px; right: 30px; height: 4px; background: repeating-linear-gradient(90deg,#999 0,#999 15px,transparent 15px,transparent 25px); transform: translateY(-2px); }
  .road-label-left,.road-label-right { position: absolute; top: 65px; font-size: 0.8em; color: #666; font-weight: bold; }
  .road-label-left { left: 10px; } .road-label-right { right: 10px; }
  .road-distance { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); font-size: 0.9em; color: #667eea; font-weight: bold; background: white; padding: 2px 10px; border-radius: 10px; border: 2px solid #667eea; }
  .character { position: absolute; top: 50%; transform: translateY(-50%); font-size: 2.2em; transition: left 0.05s linear, right 0.05s linear; z-index: 2; }
  .char-left { left: 5px; } .char-right { right: 5px; }
  .char-emoji { display: inline-block; }
  .char-left .char-emoji { transform: scaleX(-1); }
  .char-name { position: absolute; font-size: 0.35em; white-space: nowrap; text-align: center; width: 80px; left: 50%; transform: translateX(-50%); bottom: -20px; color: #555; font-weight: bold; }
  .char-speed { position: absolute; font-size: 0.3em; white-space: nowrap; text-align: center; width: 120px; left: 50%; transform: translateX(-50%); top: -20px; color: #e74c3c; font-weight: bold; }
  .meet-effect { display: none; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 2em; z-index: 3; animation: pop 0.5s ease-out; }
  @keyframes pop { 0%{transform:translate(-50%,-50%) scale(0);opacity:0} 50%{transform:translate(-50%,-50%) scale(1.3)} 100%{transform:translate(-50%,-50%) scale(1);opacity:1} }
  .info-cards { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
  .info-card { background: #fff3e0; border: 2px solid #ffb74d; border-radius: 10px; padding: 5px 12px; font-size: 0.85em; font-weight: bold; color: #e65100; }
  .info-card.unknown { background: #fce4ec; border-color: #f48fb1; color: #c2185b; }

  /* Bottom Panel */
  .steps-container {
    width: 100%; max-width: 800px; flex: 1; min-height: 0;
    background: rgba(255,255,255,0.95); border-radius: 16px; padding: 16px 20px;
    box-shadow: 0 6px 30px rgba(0,0,0,0.2); display: flex; flex-direction: column; overflow: hidden;
  }
  .steps-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-shrink: 0; }
  .steps-title { font-size: 1.1em; color: #667eea; font-weight: bold; display: flex; align-items: center; gap: 6px; }
  .step-dots { display: flex; gap: 6px; align-items: center; }
  .step-dot { width: 12px; height: 12px; border-radius: 50%; background: #ddd; transition: all 0.3s; }
  .step-dot.active { background: #667eea; transform: scale(1.2); }
  .step-dot.done { background: #4caf50; }

  .step-card-area { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; overflow-y: auto; }

  /* Tip Card */
  .tip-card {
    padding: 20px; border-radius: 14px;
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border: 2px solid #66bb6a; text-align: center;
    animation: cardIn 0.4s ease-out;
  }
  .tip-title { font-size: 1.2em; font-weight: bold; color: #2e7d32; margin-bottom: 12px; }
  .tip-lines { text-align: left; margin: 0 auto; max-width: 400px; }
  .tip-lines p { font-size: 1.05em; color: #333; line-height: 1.8; margin: 4px 0; }
  .tip-btn {
    margin-top: 16px; padding: 10px 36px; border: none; border-radius: 25px;
    background: linear-gradient(135deg, #66bb6a, #43a047);
    color: white; font-size: 1.05em; cursor: pointer; font-family: inherit;
    box-shadow: 0 4px 15px rgba(76,175,80,0.4); transition: all 0.3s;
  }
  .tip-btn:hover { transform: scale(1.05); }

  /* Step Card */
  .step-card {
    padding: 18px; border-radius: 14px;
    background: #f8f9ff; border: 2px solid #667eea;
    animation: cardIn 0.35s ease-out;
  }
  @keyframes cardIn { from{opacity:0;transform:translateX(40px)} to{opacity:1;transform:translateX(0)} }
  .step-label { font-weight: bold; color: #444; margin-bottom: 14px; font-size: 1.05em; line-height: 1.5; }
  .step-label .step-num { display: inline-block; width: 28px; height: 28px; line-height: 28px; text-align: center; background: #667eea; color: white; border-radius: 50%; margin-right: 8px; font-size: 0.85em; }

  /* Input type */
  .step-input-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .step-card input[type="number"] {
    width: 100px; padding: 8px 10px; font-size: 1.15em;
    border: 2px solid #ddd; border-radius: 10px;
    text-align: center; font-family: inherit; transition: all 0.3s;
  }
  .step-card input[type="number"]:focus { outline: none; border-color: #667eea; }
  input.input-ok { border-color: #4caf50 !important; background: #e8f5e9; }
  input.input-err { border-color: #f44336 !important; background: #ffebee; }
  .step-card .unit { font-size: 1em; color: #666; }

  /* Formula type */
  .op-picker-row { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
  .op-picker-label { font-size: 0.95em; color: #555; font-weight: bold; }
  .op-btn {
    width: 40px; height: 40px; border: 2px solid #ddd; border-radius: 10px;
    background: white; font-size: 1.3em; cursor: pointer; font-weight: bold;
    color: #667eea; transition: all 0.2s; font-family: inherit;
  }
  .op-btn:hover { border-color: #667eea; background: #f0f2ff; }
  .op-btn.selected { border-color: #667eea; background: #e0e5ff; box-shadow: 0 2px 8px rgba(102,126,234,0.3); }
  .op-btn.op-ok { border-color: #4caf50 !important; background: #e8f5e9 !important; color: #2e7d32; }
  .op-btn.op-err { border-color: #f44336 !important; background: #ffebee !important; color: #c62828; }

  .formula-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }
  .formula-row input[type="number"] {
    width: 80px; padding: 8px 4px; font-size: 1.15em;
    border: 2px solid #ddd; border-radius: 10px;
    text-align: center; font-family: inherit; transition: all 0.3s;
  }
  .formula-row input:focus { outline: none; border-color: #667eea; }
  .formula-op { font-size: 1.4em; font-weight: bold; color: #667eea; min-width: 24px; text-align: center; }
  .formula-op-display { font-size: 1.4em; font-weight: bold; min-width: 30px; text-align: center; color: #aaa; border: 2px dashed #ddd; border-radius: 8px; padding: 2px 6px; transition: all 0.3s; }
  .formula-op-display.has-op { color: #667eea; border-color: #667eea; border-style: solid; }
  .formula-unit { font-size: 0.9em; color: #666; margin-left: 2px; }

  .check-btn {
    padding: 8px 24px; background: linear-gradient(135deg, #667eea, #764ba2);
    color: white; border: none; border-radius: 10px;
    font-size: 1em; cursor: pointer; font-family: inherit; transition: all 0.2s;
  }
  .check-btn:hover { transform: scale(1.05); }
  .check-btn:disabled { opacity: 0.5; cursor: default; transform: none; }

  .step-feedback { margin-top: 10px; padding: 10px 15px; border-radius: 8px; font-weight: bold; display: none; }
  .step-feedback.correct { display: block; background: #e8f5e9; color: #2e7d32; }
  .step-feedback.wrong { display: block; background: #ffebee; color: #c62828; }

  .hint-btn { margin-top: 12px; padding: 6px 16px; background: #fff3e0; border: 1px solid #ffb74d; border-radius: 8px; color: #e65100; font-size: 0.9em; cursor: pointer; font-family: inherit; }
  .hint-text { display: none; margin-top: 8px; padding: 10px; background: #fff8e1; border-radius: 8px; color: #f57f17; font-size: 0.95em; border: 1px dashed #ffb74d; }

  /* Robot Mission */
  .mission-panel {
    padding: 14px; border-radius: 14px; background: #f8f9ff;
    border: 2px solid #667eea; animation: cardIn 0.35s ease-out;
  }
  .mission-head {
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px; margin-bottom: 10px;
  }
  .mission-title { font-size: 1.05em; font-weight: bold; color: #3949ab; }
  .mission-title .step-num { display: inline-block; width: 28px; height: 28px; line-height: 28px; text-align: center; background: #667eea; color: white; border-radius: 50%; margin-right: 8px; font-size: 0.85em; }
  .mission-action {
    min-width: 54px; height: 54px; display: grid; place-items: center;
    border-radius: 16px; background: #eef2ff; font-size: 2em;
    box-shadow: inset 0 0 0 2px #cbd5ff;
  }
  .mission-board {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; align-items: center;
  }
  .mission-visual {
    min-height: 142px; border-radius: 14px; background: white;
    border: 2px dashed #cbd5ff; display: grid; place-items: center; padding: 12px;
  }
  .energy-meter {
    width: 100%; max-width: 230px; height: 18px; border: 2px solid #cbd5ff;
    border-radius: 999px; overflow: hidden; background: #eef2ff;
  }
  .energy-fill {
    width: 18%; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, #66bb6a, #29b6f6);
    transition: width 0.35s ease;
  }
  .mission-visual.on .energy-fill { width: 100%; }
  .mission-visual.shake { animation: shake 0.4s; }
  .mission-big { font-size: 2.8em; line-height: 1; margin-bottom: 8px; }
  .mission-small { color: #555; font-weight: bold; text-align: center; line-height: 1.5; }
  .chip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .mission-chip {
    min-height: 68px; border: 2px solid #d7defc; border-radius: 14px;
    background: white; color: #4b5fd5; font-size: 1.25em; font-weight: bold;
    cursor: pointer; font-family: inherit; transition: all 0.2s;
  }
  .mission-chip:hover { transform: translateY(-2px); border-color: #667eea; background: #f0f4ff; }
  .mission-chip small { font-size: 0.68em; color: #777; }
  .mission-chip.ok { border-color: #43a047; background: #e8f5e9; color: #2e7d32; }
  .mission-chip.err { border-color: #e53935; background: #ffebee; color: #c62828; }
  .robot-console {
    border-radius: 14px; background: white; border: 2px solid #d7defc;
    padding: 12px; text-align: center;
  }
  .mission-panel input[type="number"] {
    width: 100px; padding: 8px 10px; font-size: 1.15em;
    border: 2px solid #ddd; border-radius: 10px;
    text-align: center; font-family: inherit; transition: all 0.3s;
  }
  .mission-panel input[type="number"]:focus { outline: none; border-color: #667eea; }
  .mission-panel .unit { font-size: 1em; color: #666; }
  .launch-btn {
    margin-top: 6px; padding: 10px 28px; border: none; border-radius: 999px;
    background: linear-gradient(135deg, #ff7043, #f4511e); color: white;
    font-family: inherit; font-size: 1.05em; font-weight: bold; cursor: pointer;
    box-shadow: 0 5px 16px rgba(244,81,30,0.28);
  }
  .launch-btn:disabled { opacity: 0.5; cursor: default; box-shadow: none; }

  /* Complete Card */
  .complete-card { text-align: center; animation: cardIn 0.5s ease-out; }
  .complete-card .congrats { font-size: 1.4em; color: #4caf50; font-weight: bold; margin-bottom: 5px; }
  .complete-card .earned-stars { font-size: 2em; margin: 6px 0; }
  .tip-reminder {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border: 1px solid #81c784; border-radius: 10px;
    padding: 10px 14px; margin: 8px 0; font-size: 0.9em; color: #2e7d32;
    text-align: left; line-height: 1.6;
  }
  .tip-reminder b { color: #1b5e20; }
  .complete-card .solution-summary {
    background: #f0f4ff; border-radius: 12px; padding: 14px; margin: 8px 0;
    text-align: left; font-size: 0.95em; line-height: 1.8; color: #333;
    border-left: 4px solid #667eea;
  }
  .next-btn {
    padding: 14px 50px; background: linear-gradient(135deg, #4caf50, #45a049);
    color: white; border: none; border-radius: 30px; font-size: 1.2em;
    cursor: pointer; font-family: inherit;
    box-shadow: 0 5px 20px rgba(76,175,80,0.4); transition: all 0.3s;
  }
  .next-btn:hover { transform: scale(1.05); }

  /* Victory */
  #victory { text-align: center; color: white; overflow-y: auto; }
  #victory h1 { font-size: 2.8em; margin-bottom: 15px; animation: bounce 1.5s infinite; }
  #victory .trophy { font-size: 5em; margin: 20px 0; }
  #victory .final-stars { font-size: 2em; margin: 15px 0; }
  #victory .formula-card { background: rgba(255,255,255,0.9); border-radius: 15px; padding: 20px; max-width: 500px; margin: 20px auto; color: #333; text-align: left; }
  #victory .formula-card h3 { color: #667eea; margin-bottom: 10px; }
  #victory .formula-card p { margin: 8px 0; font-size: 1.1em; }

  /* Area Game */
  #areaWelcome, #areaVictory, #areaComplete { text-align: center; color: white; overflow-y: auto; }
  #areaWelcome h1, #areaVictory h1 { font-size: 2.7em; margin-bottom: 12px; text-shadow: 3px 3px 6px rgba(0,0,0,0.25); animation: bounce 2s infinite; }
  .shape-icons { font-size: 4em; margin: 24px 0; display: flex; gap: 36px; align-items: center; justify-content: center; }
  #areaGame { justify-content: flex-start; padding: 10px 16px; overflow-y: auto; }
  #areaLevelSelect { text-align: center; color: white; overflow-y: auto; }

  .am-formula-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 12px; max-width: 780px; width: 100%; margin-bottom: 20px; }
  .am-formula-card { background: rgba(255,255,255,0.95); border-radius: 14px; padding: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.12); border-left: 4px solid #ccc; text-align: left; }
  .am-formula-card .am-sname { font-weight: 700; font-size: 1em; display: block; margin-bottom: 4px; }
  .am-formula-card svg { width: 100%; height: 80px; display: block; margin: 4px auto; }
  .am-formula-card .am-ftext { font-size: 1.05em; color: #e74c3c; font-weight: 700; margin: 6px 0 2px; }
  .am-formula-card .am-fwhy { font-size: 0.8em; color: #888; }

  .am-level-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); gap: 14px; max-width: 600px; width: 100%; margin: 14px 0 20px; }
  .am-level-btn { background: rgba(255,255,255,0.94); border: 2px solid rgba(255,255,255,0.6); border-radius: 14px; padding: 16px; text-align: center; cursor: pointer; font-family: inherit; color: #333; transition: all 0.2s; }
  .am-level-btn:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
  .am-level-btn.locked { opacity: 0.45; pointer-events: none; }
  .am-level-btn .am-ln { font-size: 1.8em; font-weight: 900; color: #667eea; }
  .am-level-btn .am-lname { font-weight: 700; margin: 2px 0; }
  .am-level-btn .am-ldesc { font-size: 0.78em; color: #888; }

  .am-game-header { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 780px; margin-bottom: 6px; }
  .am-card-grid { display: grid; gap: 10px; max-width: 780px; width: 100%; justify-items: center; }
  .am-card { background: rgba(255,255,255,0.96); border-radius: 12px; padding: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.12); border: 3px solid #ccc; cursor: pointer; width: 100%; max-width: 175px; min-height: 180px; display: flex; flex-direction: column; align-items: center; transition: all 0.2s; position: relative; }
  .am-card:hover { transform: translateY(-3px); box-shadow: 0 4px 16px rgba(0,0,0,0.18); }
  .am-card.selected { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.35); transform: translateY(-4px); }
  .am-card.matched { animation: amMatchPop 0.6s ease-out forwards; }
  .am-card.shake { animation: amShake 0.5s ease-out; }
  .am-card.locked { border-style: dashed; opacity: 0.85; }
  .am-card .am-lock { position: absolute; top: 4px; right: 6px; font-size: 1.1em; }
  .am-card .am-abadge { position: absolute; bottom: 4px; right: 6px; background: #e74c3c; color: #fff; padding: 1px 8px; border-radius: 8px; font-size: 0.8em; font-weight: 700; }
  .am-card svg { width: 100%; height: 100px; }
  .am-card .am-clabel { font-size: 0.78em; color: #999; margin-top: 3px; }
  .am-card .am-fhint { font-size: 0.72em; color: #667eea; font-weight: 600; margin-top: 1px; }
  .am-card .am-mismatch { position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%); background: #e74c3c; color: #fff; padding: 2px 8px; border-radius: 6px; font-size: 0.78em; font-weight: 600; white-space: nowrap; opacity: 0; transition: opacity 0.3s; }
  .am-card .am-mismatch.show { opacity: 1; }

  .am-score-bar { display: flex; justify-content: center; gap: 24px; padding: 10px 20px; margin-top: 10px; background: rgba(255,255,255,0.85); border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.08); color: #333; font-size: 0.95em; }
  .am-score-bar .am-sval { font-weight: 900; font-size: 1.2em; color: #667eea; }
  .am-score-bar .am-cval { font-weight: 900; font-size: 1.2em; color: #f59e0b; }

  .am-combo-float { position: fixed; pointer-events: none; z-index: 200; font-weight: 900; text-align: center; animation: amComboFloat 1.3s ease-out forwards; }
  .am-combo-float .am-btext { font-size: 56px; color: #ff6b35; text-shadow: 0 3px 12px rgba(255,107,53,.5); line-height: 1; }
  .am-combo-float .am-stext { font-size: 18px; color: #f59e0b; }
  .am-combo-float.mega .am-btext { font-size: 72px; color: #ff3e00; text-shadow: 0 4px 18px rgba(255,62,0,.6); }
  .am-match-flash { position: fixed; pointer-events: none; z-index: 199; font-size: 30px; font-weight: 900; color: #2e7d32; animation: amMatchFloat 0.8s ease-out forwards; }

  @keyframes amMatchPop { 0%{transform:scale(1);opacity:1} 30%{transform:scale(1.08);box-shadow:0 0 24px rgba(76,175,80,.5)} 100%{transform:scale(0);opacity:0} }
  @keyframes amShake { 0%,100%{transform:translateX(0)} 15%{transform:translateX(-8px)} 30%{transform:translateX(8px)} 45%{transform:translateX(-6px)} 60%{transform:translateX(6px)} 75%{transform:translateX(-3px)} }
  @keyframes amComboFloat { 0%{transform:scale(0) translateY(0);opacity:0} 15%{transform:scale(1.5) translateY(-5px);opacity:1} 35%{transform:scale(1.15) translateY(-18px);opacity:1} 70%{transform:scale(1.1) translateY(-50px);opacity:.8} 100%{transform:scale(1) translateY(-100px);opacity:0} }
  @keyframes amMatchFloat { 0%{transform:scale(0) translateY(0);opacity:0} 20%{transform:scale(1.2) translateY(-8px);opacity:1} 100%{transform:translateY(-40px);opacity:0} }
  @keyframes amUnlock { 0%{box-shadow:0 0 0 0 rgba(76,175,80,.5)} 50%{box-shadow:0 0 0 10px rgba(76,175,80,0)} 100%{box-shadow:none} }

  .am-reverse-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.45); display: none; align-items: center; justify-content: center; z-index: 150; }
  .am-reverse-overlay.active { display: flex; }
  .am-reverse-box { background: #fff; border-radius: 18px; padding: 24px; max-width: 340px; width: 90%; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.25); position: relative; }
  .am-reverse-box h3 { font-size: 1.1em; margin-bottom: 10px; color: #4b5fd5; }
  .am-reverse-box svg { width: 170px; height: 95px; margin: 6px auto; display: block; }
  .am-reverse-box .am-ragiven { font-size: 1.2em; font-weight: 700; color: #e74c3c; margin: 6px 0; }
  .am-reverse-box .am-rinput-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0; }
  .am-reverse-box input[type=number] { width: 72px; padding: 7px 10px; border: 2px solid #d0d0d0; border-radius: 10px; font-size: 1.15em; text-align: center; font-weight: 700; outline: none; }
  .am-reverse-box input:focus { border-color: #667eea; }
  .am-reverse-box input.wrong { border-color: #e74c3c; animation: amShake 0.4s; }
  .am-reverse-box .am-rhint { font-size: 0.82em; color: #e74c3c; min-height: 18px; }
  .am-rclose { position: absolute; top: 8px; right: 12px; font-size: 1.2em; cursor: pointer; color: #999; background: none; border: none; }

  .am-complete-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; max-width: 340px; }
  .am-stat { background: rgba(255,255,255,0.92); border-radius: 12px; padding: 12px; color: #333; }
  .am-stat .am-stlabel { font-size: 0.78em; color: #999; }
  .am-stat .am-stval { font-size: 1.7em; font-weight: 900; color: #667eea; }

  .am-review-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 12px; max-width: 700px; width: 100%; margin: 14px 0; }
  .am-review-card { background: rgba(255,255,255,0.94); border-radius: 12px; padding: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); border-left: 3px solid #ccc; display: flex; align-items: center; gap: 10px; color: #333; text-align: left; }
  .am-review-card svg { width: 70px; height: 50px; flex-shrink: 0; }
  .am-review-card .am-rformula { font-weight: 700; color: #e74c3c; font-size: 0.95em; }
  .am-review-card .am-rtip { font-size: 0.75em; color: #888; margin-top: 2px; }

  .confetti-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100; }
  .confetti-piece { position: absolute; width: 10px; height: 10px; top: -20px; animation: confettiFall linear forwards; }
  @keyframes confettiFall { to { top: 110vh; transform: rotate(720deg); } }
  @keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-5px)} 80%{transform:translateX(5px)} }

  /* Ten Game */
  #tenWelcome, #tenVictory { text-align: center; color: white; overflow-y: auto; }
  #tenWelcome h1, #tenVictory h1 {
    font-size: 2.7em; margin-bottom: 12px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.25); animation: bounce 2s infinite;
  }
  #tenVictory .trophy { font-size: 5em; margin: 20px 0; }
  #tenVictory .final-stars { font-size: 2em; margin: 15px 0; }
  .ten-welcome-cards {
    font-size: 3.2em; margin: 24px 0; display: flex; gap: 12px;
    align-items: center; justify-content: center;
  }
  .ten-welcome-card {
    display: inline-flex; align-items: center; justify-content: center;
    width: 68px; height: 88px; background: white;
    border-radius: 14px; font-size: 0.65em; font-weight: 900; color: #FF6B35;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25), inset 0 -3px 0 rgba(0,0,0,0.08);
    border: 3px solid rgba(255,255,255,0.7);
    position: relative; overflow: hidden;
  }
  .ten-welcome-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.6), transparent);
    border-radius: 11px 11px 0 0;
  }
  .ten-welcome-card:nth-child(1) { color: #E65100; animation: tenFloat 2.5s ease-in-out infinite; }
  .ten-welcome-card:nth-child(3) { color: #1565C0; animation: tenFloat 2.5s ease-in-out 0.3s infinite; }
  .ten-welcome-card:nth-child(5) { color: #2E7D32; font-size: 0.55em; animation: tenFloat 2.5s ease-in-out 0.6s infinite; }
  @keyframes tenFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
  }
  .ten-welcome-plus { font-size: 0.55em; color: rgba(255,255,255,0.95); text-shadow: 0 2px 4px rgba(0,0,0,0.2); }
  .ten-welcome-eq { font-size: 0.55em; color: #F7C948; text-shadow: 0 2px 4px rgba(0,0,0,0.2); }

  #tenGame { justify-content: flex-start; padding: 10px 16px; overflow: hidden; }
  .ten-game-area {
    width: 100%; max-width: 520px; display: flex; flex-direction: column;
    align-items: center; gap: 8px; height: 100%; margin: 0 auto;
  }
  .ten-target-bar {
    width: 100%; background: rgba(255,255,255,0.94); border-radius: 14px;
    padding: 10px 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    flex-shrink: 0;
  }
  .ten-target-row { display: flex; width: 100%; justify-content: space-between; align-items: center; }
  .ten-target-center { text-align: center; }
  .ten-target-label { font-size: 0.85em; color: #888; font-weight: bold; }
  .ten-target-num {
    display: inline-block; background: linear-gradient(135deg, #FF6B35, #F7C948);
    color: white; font-size: 2.4em; padding: 4px 22px; border-radius: 14px;
    min-width: 60px; text-align: center; font-weight: 900;
    box-shadow: 0 4px 16px rgba(255,107,53,0.35);
    animation: targetPulse 2s ease-in-out infinite;
  }
  @keyframes targetPulse {
    0%,100% { transform: scale(1); box-shadow: 0 4px 16px rgba(255,107,53,0.35); }
    50% { transform: scale(1.06); box-shadow: 0 6px 24px rgba(255,107,53,0.5); }
  }
  .ten-level-info { font-size: 0.82em; color: #999; font-weight: bold; }
  .ten-level-points { font-size: 0.82em; color: #FF6B35; font-weight: bold; }
  .ten-timer-wrap { display: flex; align-items: center; gap: 8px; flex: 1; }
  .ten-timer-bar { flex: 1; height: 10px; background: #e8e8e8; border-radius: 5px; overflow: hidden; }
  .ten-timer-fill {
    height: 100%; background: linear-gradient(90deg, #66bb6a, #aed581);
    border-radius: 5px; transition: width 1s linear;
  }
  .ten-timer-text { font-size: 0.9em; font-weight: bold; color: #666; min-width: 30px; text-align: right; }

  .ten-board {
    width: 100%; flex: 1; min-height: 0; display: grid; gap: 8px; padding: 12px;
    background: rgba(255,255,255,0.94); border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15); align-content: center;
  }
  .ten-card {
    aspect-ratio: 1; border: 3px solid #e0e0e0; border-radius: 14px;
    background: white; cursor: pointer; font-family: inherit;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: all 0.2s ease; box-shadow: 0 3px 10px rgba(0,0,0,0.08), inset 0 -2px 0 rgba(0,0,0,0.05);
    position: relative; min-height: 0; overflow: hidden;
  }
  .ten-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 35%;
    background: linear-gradient(180deg, rgba(255,255,255,0.7), transparent);
    border-radius: 11px 11px 0 0; pointer-events: none;
  }
  .ten-card[data-val="1"], .ten-card[data-val="2"] {
    background: linear-gradient(160deg, #FFF3E0, #FFE0B2); border-color: #FFB74D;
  }
  .ten-card[data-val="3"], .ten-card[data-val="4"] {
    background: linear-gradient(160deg, #FFEBEE, #FFCDD2); border-color: #EF9A9A;
  }
  .ten-card[data-val="5"] {
    background: linear-gradient(160deg, #FFFDE7, #FFF9C4); border-color: #FFD54F;
  }
  .ten-card[data-val="6"], .ten-card[data-val="7"] {
    background: linear-gradient(160deg, #E8F5E9, #C8E6C9); border-color: #81C784;
  }
  .ten-card[data-val="8"], .ten-card[data-val="9"] {
    background: linear-gradient(160deg, #E3F2FD, #BBDEFB); border-color: #64B5F6;
  }
  .ten-card[data-val="1"] .ten-card-num, .ten-card[data-val="2"] .ten-card-num { color: #E65100; }
  .ten-card[data-val="3"] .ten-card-num, .ten-card[data-val="4"] .ten-card-num { color: #C62828; }
  .ten-card[data-val="5"] .ten-card-num { color: #F9A825; }
  .ten-card[data-val="6"] .ten-card-num, .ten-card[data-val="7"] .ten-card-num { color: #2E7D32; }
  .ten-card[data-val="8"] .ten-card-num, .ten-card[data-val="9"] .ten-card-num { color: #1565C0; }
  .ten-card:hover:not(.matched) { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
  .ten-card.selected {
    border-color: #2979FF; background: #E3F2FD;
    box-shadow: 0 0 0 3px rgba(41,121,255,0.25), 0 4px 14px rgba(41,121,255,0.2);
    transform: scale(1.06);
  }
  .ten-card.highlighted {
    border-color: #FFB300; background: #FFF8E1;
    box-shadow: 0 0 0 3px rgba(255,179,0,0.35);
    animation: tenPulse 0.8s infinite;
  }
  @keyframes tenPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(255,179,0,0.35); }
    50% { box-shadow: 0 0 0 6px rgba(255,179,0,0.15); }
  }
  .ten-card.matched {
    border-color: #66BB6A !important; background: #E8F5E9 !important;
    pointer-events: none;
    animation: tenMatchPop 0.45s ease-out forwards;
  }
  @keyframes tenMatchPop {
    0% { transform: scale(1.15); opacity: 1; }
    40% { transform: scale(1.25); opacity: 0.9; }
    100% { transform: scale(0); opacity: 0; }
  }
  .ten-card.fill-card {
    background: linear-gradient(160deg, #F3E5F5, #E1BEE7); border-color: #BA68C8;
  }
  .ten-card.fill-card .ten-card-num { color: #7B1FA2; }
  .fw-particle {
    position: fixed; pointer-events: none; z-index: 101;
    will-change: transform, opacity; line-height: 1;
  }
  .fw-burst { animation: fwBurst var(--dur) ease-out var(--delay) forwards; opacity: 0; }
  .fw-ring { animation: fwRing var(--dur) ease-out var(--delay) forwards; opacity: 0; }
  .fw-fountain { animation: fwFountain var(--dur) cubic-bezier(.2,.8,.3,1) var(--delay) forwards; opacity: 0; }
  .fw-sparkle { animation: fwSparkle var(--dur) ease-in-out var(--delay) forwards; opacity: 0; }
  @keyframes fwBurst {
    0% { transform: translate(0,0) scale(1); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
  }
  @keyframes fwRing {
    0% { transform: translate(0,0) scale(.3); opacity: 1; }
    50% { opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; }
  }
  @keyframes fwFountain {
    0% { transform: translate(0,0); opacity: 1; }
    40% { transform: translate(calc(var(--dx)*.4), calc(var(--dy) - 50px)); opacity: 1; }
    100% { transform: translate(var(--dx), calc(var(--dy) + 30px)); opacity: 0; }
  }
  @keyframes fwSparkle {
    0% { transform: translate(0,0) scale(0) rotate(0deg); opacity: 0; }
    25% { opacity: 1; transform: translate(calc(var(--dx)*.3), calc(var(--dy)*.3)) scale(1.3) rotate(90deg); }
    100% { transform: translate(var(--dx), var(--dy)) scale(0) rotate(180deg); opacity: 0; }
  }
  .ten-fill-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.45); z-index: 200;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(3px);
  }
  .ten-fill-box {
    background: white; border-radius: 20px; padding: 28px;
    box-shadow: 0 12px 40px rgba(0,0,0,.3); text-align: center;
    min-width: 260px; max-width: 90vw;
    animation: tenFillIn .25s ease-out;
  }
  @keyframes tenFillIn { 0%{transform:scale(.8);opacity:0} 100%{transform:scale(1);opacity:1} }
  .ten-fill-prompt { font-size: 1.4em; font-weight: bold; color: #333; margin-bottom: 16px; line-height: 1.6; }
  .ten-fill-prompt b { color: #7B1FA2; }
  .ten-fill-input {
    width: 120px; padding: 12px 16px; border: 3px solid #BA68C8;
    border-radius: 14px; font-size: 1.6em; font-weight: bold;
    text-align: center; outline: none; font-family: inherit;
  }
  .ten-fill-input:focus { border-color: #7B1FA2; box-shadow: 0 0 0 3px rgba(123,31,162,.2); }
  .ten-fill-btns { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }
  .ten-fill-btns button {
    padding: 10px 28px; border: none; border-radius: 12px;
    font-size: 1.1em; font-weight: bold; cursor: pointer; font-family: inherit;
  }
  .ten-fill-cancel { background: #eee; color: #666; }
  .ten-fill-ok { background: linear-gradient(135deg,#BA68C8,#7B1FA2); color: white; }
  .ten-card.special-lightning {
    border-color: #FFD600; background: linear-gradient(135deg, #FFFDE7, #FFF9C4);
    animation: tenSparkle 1.5s infinite;
  }
  .ten-card.special-lightning.matched { animation: none; }
  @keyframes tenSparkle {
    0%, 100% { box-shadow: 0 0 8px rgba(255,214,0,0.3); }
    50% { box-shadow: 0 0 18px rgba(255,214,0,0.6); }
  }
  .ten-card.special-trap { border-color: #EF5350; background: linear-gradient(135deg, #FFF5F5, #FFEBEE); }
  .ten-card-num { font-size: 1.8em; font-weight: 800; color: #333; line-height: 1; }
  .ten-card-dots {
    font-size: 0.45em; color: #FF6B35; letter-spacing: 1px; margin-top: 3px;
    word-break: break-all; text-align: center; max-width: 85%; line-height: 1.4;
  }
  .ten-card-special { font-size: 1.8em; line-height: 1; }

  .ten-hud {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 6px 14px; background: rgba(255,255,255,0.88); border-radius: 12px;
    font-weight: bold; color: #555; font-size: 0.9em; flex-shrink: 0;
  }
  .ten-combo {
    color: #FF6B35; font-size: 1.1em; min-width: 50px; text-align: center;
    transition: all 0.2s ease;
  }
  .ten-combo.active {
    font-size: 1.35em;
    text-shadow: 0 0 8px rgba(255,107,53,0.4);
    animation: tenComboPop 0.4s ease-out;
  }
  @keyframes tenComboPop {
    0% { transform: scale(0.6); } 50% { transform: scale(1.3); } 100% { transform: scale(1); }
  }
  .ten-feedback {
    min-height: 28px; text-align: center; font-weight: bold;
    font-size: 1.05em; padding: 5px 14px; border-radius: 10px; flex-shrink: 0;
    transition: all 0.2s ease;
  }
  .ten-feedback.correct { color: #2e7d32; animation: tenFBIn 0.3s ease-out; }
  .ten-feedback.combo { color: #FF6B35; font-size: 1.15em; animation: tenFBIn 0.3s ease-out; }
  @keyframes tenFBIn { 0% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: translateY(0); } }
  .ten-feedback.wrong { color: #c62828; }
  .ten-feedback.lightning { color: #F57F17; }
  .ten-feedback.trap { color: #c62828; }
  .ten-complete {
    grid-column: 1 / -1; text-align: center; padding: 20px 16px;
    animation: cardIn 0.5s ease-out;
  }
  .ten-complete .congrats { font-size: 1.6em; color: #4caf50; font-weight: bold; margin-bottom: 8px; }
  .ten-complete .earned-stars { font-size: 2.2em; margin: 10px 0; }
  .ten-complete-score { font-size: 1.15em; color: #FF6B35; font-weight: bold; margin-bottom: 4px; }
  .ten-complete-pairs { font-size: 0.95em; color: #666; margin-bottom: 14px; }

  /* Reading Game */
  #rdWelcome, #rdLevels, #rdResults { text-align: center; color: white; }
  #rdWelcome h1 { font-size: 2.7em; margin-bottom: 8px; text-shadow: 3px 3px 6px rgba(0,0,0,0.3); animation: bounce 2s infinite; }
  .rd-scene { font-size: 3.5em; margin: 18px 0; }
  #rdGame { justify-content: flex-start; padding: 10px 16px; overflow: hidden; }
  .rd-game-area {
    width: 100%; max-width: 560px; display: flex; flex-direction: column;
    align-items: center; gap: 8px; height: 100%; margin: 0 auto;
  }
  .rd-header {
    width: 100%; display: flex; justify-content: space-between; align-items: center;
    padding: 8px 14px; background: rgba(255,255,255,0.2); border-radius: 12px;
    color: white; font-weight: bold; flex-shrink: 0;
  }
  .rd-header .rd-score { font-size: 1.15em; }
  .rd-header .rd-streak { font-size: 0.9em; opacity: 0.9; }
  .rd-conveyor {
    width: 100%; background: linear-gradient(180deg, #5a4a3a, #4a3a2a);
    border-radius: 14px; padding: 12px; position: relative;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.4); flex-shrink: 0;
  }
  .rd-conveyor::before {
    content: ''; position: absolute; top: 0; left: 20px; right: 20px; height: 4px;
    background: repeating-linear-gradient(90deg, #888 0, #888 20px, transparent 20px, transparent 30px);
    border-radius: 2px; animation: rdBelt 2s linear infinite;
  }
  @keyframes rdBelt { from { background-position: 0 0; } to { background-position: 30px 0; } }
  .rd-package {
    background: #fffde8; border: 3px solid #d4a574; border-radius: 12px;
    padding: 14px; min-height: 80px; position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); transition: all 0.3s;
  }
  .rd-package.locked { opacity: 0.75; }
  .rd-package.unlocked { border-color: #4caf50; box-shadow: 0 0 0 3px rgba(76,175,80,0.3); }
  .rd-package.correct { animation: rdPkgOk 0.5s; }
  .rd-package.wrong { animation: rdPkgNo 0.5s; }
  @keyframes rdPkgOk { 50% { transform: scale(1.04); border-color: #4caf50; } }
  @keyframes rdPkgNo { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
  .rd-pkg-label {
    position: absolute; top: -10px; left: 14px; background: #ff7043;
    color: white; font-size: 0.72em; font-weight: bold; padding: 3px 10px; border-radius: 6px;
  }
  .rd-pkg-status {
    position: absolute; top: -10px; right: 14px; font-size: 0.72em;
    font-weight: bold; padding: 3px 10px; border-radius: 6px; background: #eee; color: #666;
  }
  .rd-pkg-status.unlocked { background: #4caf50; color: white; }
  .rd-qtext {
    font-size: 1.25em; line-height: 1.8; text-align: center; color: #333; font-weight: bold;
  }
  .rd-qtext .rd-kw {
    display: inline-block; padding: 2px 6px; border-radius: 6px;
    cursor: pointer; transition: all 0.2s; border: 2px solid transparent;
  }
  .rd-qtext .rd-kw:hover { background: rgba(102,126,234,0.1); }
  .rd-qtext .rd-kw.found {
    background: #c8e6c9; border-color: #4caf50; color: #2e7d32; animation: rdKwPop 0.3s;
  }
  .rd-qtext .rd-kw.pre { background: #fff3cd; border-color: #ffc107; color: #e65100; }
  @keyframes rdKwPop { 50% { transform: scale(1.15); } }
  .rd-hint {
    width: 100%; text-align: center; min-height: 30px; padding: 4px;
    color: white; font-weight: bold; font-size: 0.9em; flex-shrink: 0;
  }
  .rd-houses {
    width: 100%; display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 10px; flex-shrink: 0;
  }
  .rd-house {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 12px 6px; border-radius: 14px; cursor: pointer;
    background: rgba(255,255,255,0.92); border: 3px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); transition: all 0.2s; font-family: inherit;
  }
  .rd-house:hover { transform: translateY(-3px); border-color: #667eea; }
  .rd-house:active { transform: scale(0.95); }
  .rd-house.disabled { pointer-events: none; opacity: 0.5; }
  .rd-house.rd-ok { border-color: #4caf50; background: #e8f5e9; animation: rdHouseOk 0.5s; }
  .rd-house.rd-no { border-color: #f44336; background: #ffebee; animation: rdHouseNo 0.4s; }
  .rd-house.flash-ok { border-color: #4caf50; background: #f1f8e9; }
  @keyframes rdHouseOk { 50% { transform: scale(1.08); } }
  @keyframes rdHouseNo { 25% { transform: translateX(-4px) rotate(-2deg); } 75% { transform: translateX(4px) rotate(2deg); } }
  .rd-house-roof { font-size: 1.8em; }
  .rd-house-val { font-size: 1.2em; font-weight: bold; color: #333; }
  .rd-fb-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    display: none; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.4); z-index: 100; padding: 20px;
  }
  .rd-fb-overlay.show { display: flex; }
  .rd-fb-card {
    background: white; border-radius: 20px; padding: 28px;
    text-align: center; max-width: 340px; width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: feedbackIn 0.3s;
  }
  .rd-fb-card .fb-icon { font-size: 3em; margin-bottom: 8px; }
  .rd-fb-card .fb-title { font-size: 1.3em; font-weight: bold; margin-bottom: 8px; }
  .rd-fb-card .fb-body { font-size: 0.95em; color: #555; line-height: 1.6; margin-bottom: 14px; }
  .rd-fb-card .fb-body .hl { color: #e65100; font-weight: bold; }
  .rd-fb-card .fb-ok-btn {
    border: none; border-radius: 30px; padding: 11px 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white; font-family: inherit; font-size: 1em; font-weight: bold; cursor: pointer;
  }
  .rd-change-alert {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
    background: rgba(255,152,0,0.95); color: white; padding: 14px 26px;
    border-radius: 14px; font-size: 1.3em; font-weight: bold;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3); z-index: 90;
    display: none; animation: alertPop 0.4s;
  }
  .rd-change-alert.show { display: block; }
  @keyframes alertPop { from { transform: translate(-50%,-50%) scale(0.5); } to { transform: translate(-50%,-50%) scale(1); } }
  .rd-level-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
    width: 100%; max-width: 380px;
  }
  .rd-level-card {
    padding: 16px 8px; border-radius: 14px; border: 2px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.9); color: #333; cursor: pointer;
    font-family: inherit; font-weight: bold; font-size: 0.95em;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2); transition: all 0.2s;
  }
  .rd-level-card:hover { transform: translateY(-3px); }
  .rd-level-card:active { transform: scale(0.95); }
  .rd-level-card.locked { opacity: 0.5; cursor: default; filter: grayscale(0.4); }
  .rd-level-card.locked:hover { transform: none; }
  .rd-level-card.current { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.4); }
  .rd-level-card .lv-icon { font-size: 1.6em; margin-bottom: 4px; }
  .rd-level-card .lv-sub { font-size: 0.78em; color: #555; }
  .rd-results-card {
    background: rgba(255,255,255,0.92); color: #333; border-radius: 18px;
    padding: 22px; max-width: 380px; width: 100%; box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  }
  .rd-stat { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #eee; font-size: 1.05em; }
  .rd-stat:last-child { border: none; }
  .rd-stat .label { color: #555; }
  .rd-stat .val { font-weight: bold; color: #4b5fd5; }
  .rd-btn-row { display: flex; gap: 10px; margin-top: 16px; }
  .rd-btn-row button {
    flex: 1; padding: 12px; border: none; border-radius: 14px;
    font-family: inherit; font-size: 1em; font-weight: bold; cursor: pointer;
  }
  .rd-btn-retry { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
  .rd-btn-next { background: linear-gradient(135deg, #4caf50, #2e7d32); color: white; }
  .rd-btn-home { background: #eee; color: #555; }
  /* Grid Game */
  #gridWelcome, #gridVictory { text-align: center; color: white; overflow-y: auto; }
  #gridWelcome h1, #gridVictory h1 {
    font-size: 2.7em; margin-bottom: 12px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.25); animation: bounce 2s infinite;
  }
  #gridVictory .trophy { font-size: 5em; margin: 20px 0; }
  #gridVictory .final-stars { font-size: 2em; margin: 15px 0; }
  .grid-welcome-visual {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; margin: 20px 0; font-size: 1.4em;
  }
  .grid-mini-cell {
    width: 38px; height: 38px; display: grid; place-items: center;
    border-radius: 8px; font-weight: bold; font-size: 0.9em;
  }
  .grid-mini-cell.num { background: rgba(255,255,255,0.92); color: #4b5fd5; }
  .grid-mini-cell.fog { background: rgba(255,255,255,0.3); color: rgba(255,255,255,0.6); }

  #gridGame { justify-content: flex-start; padding: 10px 16px; overflow: hidden; }
  .grid-game-area {
    width: 100%; max-width: 800px; display: flex; flex-direction: column;
    gap: 8px; height: 100%; align-self: center;
  }
  .grid-info-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 14px; background: rgba(255,255,255,0.92);
    border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  }
  .grid-task {
    flex: 1; font-size: 1.05em; font-weight: bold; color: #333; line-height: 1.5;
  }
  .grid-task .highlight { color: #e74c3c; }
  .grid-flips {
    padding: 6px 14px; border-radius: 999px;
    background: #fff3e0; color: #e65100; font-weight: bold; font-size: 0.9em;
    white-space: nowrap;
  }
  .grid-board-wrap {
    flex: 1; min-height: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: rgba(255,255,255,0.95); border-radius: 16px;
    box-shadow: 0 6px 30px rgba(0,0,0,0.2); padding: 12px; overflow: auto;
  }
  .grid-board {
    display: grid; gap: 3px; margin: 0 auto;
  }
  .grid-cell {
    min-width: 36px; min-height: 36px; border: 2px solid #d0d8f0;
    border-radius: 8px; background: #f0f4ff; color: #4b5fd5;
    font-weight: bold; font-size: 1em; cursor: default;
    display: grid; place-items: center; transition: all 0.3s;
    font-family: inherit; padding: 2px;
  }
  .grid-cell.fog {
    background: linear-gradient(135deg, #b0bec5, #90a4ae);
    color: transparent; cursor: pointer; border-color: #90a4ae;
    position: relative;
  }
  .grid-cell.fog::after {
    content: '☁'; position: absolute; font-size: 1.1em;
    color: rgba(255,255,255,0.7);
  }
  .grid-cell.fog:hover { background: linear-gradient(135deg, #a0aeb5, #80949e); transform: scale(1.05); }
  .grid-cell.revealed {
    animation: fogClear 0.4s ease-out;
    background: #e8f5e9; border-color: #66bb6a; color: #2e7d32;
  }
  @keyframes fogClear {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
  }
  .grid-cell.treasure {
    background: linear-gradient(135deg, #fff9c4, #ffe082);
    border-color: #ffb300; color: #e65100;
    animation: treasurePop 0.5s ease-out;
    font-size: 1.2em;
  }
  @keyframes treasurePop {
    0% { transform: scale(0); } 50% { transform: scale(1.3); } 100% { transform: scale(1); }
  }
  .grid-cell.wrong-guess {
    background: #ffebee; border-color: #ef9a9a; color: #c62828;
    animation: shake 0.4s;
  }
  .grid-cell.header-row {
    background: #e3e9ff; color: #3949ab; font-size: 0.8em;
    border: none; min-height: 28px; cursor: default;
  }
  .grid-cell.header-col {
    background: #e3e9ff; color: #3949ab; font-size: 0.8em;
    border: none; min-width: 28px; cursor: default;
  }
  .grid-cell.header-corner { background: transparent; border: none; }
  .grid-cell.highlight-col {
    background: #e8eaf6; border-color: #7986cb;
  }
  .grid-input-area {
    display: flex; gap: 10px; align-items: center; justify-content: center;
    flex-wrap: wrap; padding: 10px 0;
  }
  .grid-input-area label { font-weight: bold; color: #333; font-size: 1em; }
  .grid-input-area input {
    width: 70px; padding: 8px; font-size: 1.15em; text-align: center;
    border: 2px solid #667eea; border-radius: 10px; font-family: inherit;
  }
  .grid-input-area input:focus { outline: none; border-color: #3949ab; }
  .grid-check-btn {
    padding: 10px 28px; background: linear-gradient(135deg, #667eea, #764ba2);
    color: white; border: none; border-radius: 12px;
    font-size: 1.05em; font-weight: bold; cursor: pointer;
    font-family: inherit; box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    transition: all 0.2s;
  }
  .grid-check-btn:hover { transform: scale(1.05); }
  .grid-check-btn:disabled { opacity: 0.4; cursor: default; transform: none; }
  .grid-feedback {
    min-height: 36px; padding: 8px 14px; text-align: center;
    font-weight: bold; border-radius: 10px; font-size: 0.95em;
  }
  .grid-feedback.correct { background: #e8f5e9; color: #2e7d32; }
  .grid-feedback.wrong { background: #ffebee; color: #c62828; }
  .grid-feedback.info { background: #e3f2fd; color: #1565c0; }
  .grid-complete {
    padding: 20px; text-align: center; animation: cardIn 0.5s ease-out;
  }
  .grid-complete .congrats { font-size: 1.6em; color: #4caf50; font-weight: bold; margin-bottom: 8px; }
  .grid-complete .earned-stars { font-size: 2.2em; margin: 10px 0; }
  .grid-next-btn {
    margin-top: 14px; padding: 10px 36px; border: none; border-radius: 25px;
    background: linear-gradient(135deg, #66bb6a, #43a047);
    color: white; font-size: 1.05em; cursor: pointer; font-family: inherit;
    box-shadow: 0 4px 15px rgba(76,175,80,0.4);
  }
  .grid-walker {
    display: flex; gap: 8px; align-items: center; justify-content: center;
    margin: 8px 0;
  }
  .grid-walker-btn {
    padding: 8px 18px; border: 2px solid #667eea; border-radius: 10px;
    background: #f0f4ff; color: #667eea; font-weight: bold;
    cursor: pointer; font-family: inherit; font-size: 0.95em;
    transition: all 0.2s;
  }
  .grid-walker-btn:hover { background: #e0e5ff; }
  .grid-walker-btn.active { background: #667eea; color: white; }
  .grid-walker-pos {
    padding: 6px 14px; background: #fff3e0; border-radius: 10px;
    color: #e65100; font-weight: bold; font-size: 0.95em;
  }
  .grid-frame {
    position: absolute; border: 3px solid #e74c3c; border-radius: 6px;
    pointer-events: none; z-index: 5;
    box-shadow: 0 0 12px rgba(231,76,60,0.4);
    transition: all 0.2s;
  }
  .grid-frame.correct { border-color: #4caf50; box-shadow: 0 0 16px rgba(76,175,80,0.5); }

  @media (max-width: 600px) {
    .screen { padding-bottom: 74px; }
    .nav-controls { bottom: 8px; }
    .nav-btn { min-width: 82px; padding: 8px 12px; font-size: 0.9em; }
    #home h1 { font-size: 2em; }
    .home-subtitle { font-size: 1em; margin-bottom: 16px; }
    .topic-grid { grid-template-columns: 1fr; gap: 12px; }
    .topic-card { min-height: 150px; padding: 16px 14px; }
    .topic-icon { font-size: 2.6em; margin-bottom: 10px; }
    .topic-name { font-size: 1.25em; }
    #areaWelcome h1, #areaVictory h1 { font-size: 2em; }
    .am-card { max-width: 150px; min-height: 160px; padding: 6px; }
    .am-card svg { height: 85px; }
    .am-combo-float .am-btext { font-size: 42px; }
    .am-formula-grid { grid-template-columns: 1fr; }
    #tenWelcome h1, #tenVictory h1 { font-size: 2em; }
    #gridWelcome h1, #gridVictory h1 { font-size: 2em; }
    .grid-cell { min-width: 30px; min-height: 30px; font-size: 0.85em; }
    .grid-board { gap: 2px; }
    .grid-info-bar { padding: 6px 10px; }
    .grid-task { font-size: 0.92em; }
    .ten-welcome-cards { font-size: 2.4em; margin: 16px 0; }
    .ten-welcome-card { width: 48px; height: 60px; }
    .ten-card-num { font-size: 1.5em; }
    .ten-card-dots { font-size: 0.38em; }
    .ten-board { padding: 8px; gap: 6px; flex: 0 0 auto; }
    .ten-target-bar { padding: 8px 12px; }
    .ten-game-area { gap: 6px; }
    .shape-icons { font-size: 3em; gap: 20px; }
    .area-stage { padding: 10px 12px; }
    .area-answer { padding: 12px 14px; }
    .area-story { font-size: 0.9em; }
    .formula-slot { font-size: 1.1em; min-width: 38px; min-height: 38px; padding: 5px 8px; }
    .tool-chip { min-height: 40px; font-size: 1em; }
    .choice-grid { grid-template-columns: 1fr; }
    .shape-svg { width: 220px; }
    #rdWelcome h1 { font-size: 2em; }
    .rd-scene { font-size: 2.6em; }
    .rd-qtext { font-size: 1.1em; }
    .rd-houses { gap: 8px; }
    .rd-house { padding: 10px 4px; }
    .rd-house-roof { font-size: 1.5em; }
    .rd-level-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; }
    #welcome h1 { font-size: 2em; }
    .story-text { font-size: 0.88em; padding: 8px 10px; }
    .road-container { padding: 10px 14px; }
    .steps-container { padding: 12px 14px; }
    .mission-board { grid-template-columns: 1fr; }
    .mission-visual { min-height: 104px; }
    .chip-grid { grid-template-columns: 1fr; }
    .mission-chip { min-height: 52px; }
    .info-cards { gap: 4px; } .info-card { font-size: 0.75em; padding: 4px 8px; }
    .formula-row input[type="number"] { width: 65px; font-size: 1em; padding: 6px 2px; }
    .op-btn { width: 36px; height: 36px; font-size: 1.1em; }
    .student-bar { top: 8px; right: 8px; padding: 6px 8px 6px 10px; }
    .student-info { font-size: 0.82em; }
    .switch-btn { padding: 5px 9px; font-size: 0.82em; }
    .login-panel { padding: 18px; }
    .login-input-row { flex-direction: column; }
    .login-input-row input, .login-input-row button { width: 100%; min-height: 52px; }
  }
  @media (max-width: 380px) {
    .ten-card-num { font-size: 1.3em; }
    .ten-board { gap: 5px; padding: 6px; }
    .ten-target { font-size: 1em; }
    .ten-hud { font-size: 0.82em; padding: 4px 8px; }
    .ten-fill-box { padding: 20px 16px; min-width: 220px; }
    .ten-fill-input { width: 100px; font-size: 1.3em; padding: 10px 12px; }
  }
  @media (min-width: 768px) {
    .ten-game-area { max-width: 680px; }
    .ten-card-num { font-size: 2.2em; }
    .ten-board { gap: 12px; padding: 18px; align-content: start; }
    .ten-target-bar { padding: 14px 20px; }
    .ten-hud { padding: 8px 18px; font-size: 1em; }
  }
  @media (max-height: 700px) {
    .ten-board { padding: 8px; gap: 5px; }
    .ten-target-bar { padding: 6px 10px; }
    .ten-hud { padding: 4px 10px; font-size: 0.85em; }
    .road { height: 65px; }
    .story-text { font-size: 0.85em; line-height: 1.5; padding: 8px 10px; margin-bottom: 6px; }
    .road-container { padding: 10px 14px; margin-bottom: 6px; }
    .info-card { font-size: 0.75em; padding: 3px 8px; }
  }
  @media (max-height: 420px) and (orientation: landscape) {
    .top-bar { margin-bottom: 4px; }
    .ten-target-bar { padding: 4px 10px; }
    .ten-board { padding: 6px; gap: 4px; }
    .ten-hud { padding: 3px 8px; font-size: 0.8em; }
    .ten-feedback { min-height: 20px; font-size: 0.9em; padding: 2px 10px; }
    .ten-game-area { gap: 3px; }
  }
