/* 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; }
