```css
:root {
  --bg: #070a12;
  --panel: #101725;
  --panel-2: #0c1320;
  --border: rgba(255,255,255,0.09);
  --text: #e6ecf5;
  --muted: #6b7a91;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Bricolage Grotesque', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.6s cubic-bezier(.2,.8,.2,1);
}
@keyframes fadeUp { from { opacity:0; transform: translateY(16px); } to { opacity:1; transform:none; } }

/* Animated background orbs */
.bg-orbs { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.4; }
.orb-1 { width: 420px; height: 420px; background: #00e0d5; top: -120px; left: -80px; animation: float1 18s ease-in-out infinite; }
.orb-2 { width: 360px; height: 360px; background: #a06bff; bottom: -100px; right: -60px; animation: float2 22s ease-in-out infinite; }
.orb-3 { width: 300px; height: 300px; background: #3dff88; top: 40%; left: 55%; opacity: 0.22; animation: float1 26s ease-in-out infinite; }
@keyframes float1 { 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(60px,40px) scale(1.15);} }
@keyframes float2 { 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(-50px,-30px) scale(1.1);} }

/* Header */
.header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px; margin-bottom: 22px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo-badge {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  font-size: 1.6rem; background: linear-gradient(135deg, #00e0d5, #a06bff);
  box-shadow: 0 8px 26px rgba(0,224,213,0.35); animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-4px);} }
.logo { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.logo-10 {
  background: linear-gradient(90deg, #00e0d5, #3dff88);
  -webkit-background-clip: text; background-clip: text; color: transparent; margin-left: 2px;
}
.tagline { color: var(--muted); font-size: 0.82rem; margin-top: 5px; }
.header-stats { display: flex; gap: 12px; align-items: center; }
.hs { text-align: center; background: var(--panel); border:1px solid var(--border); padding: 7px 12px; border-radius: 12px; }
.hs-val { display:block; font-family:'JetBrains Mono', monospace; font-weight:700; font-size:1.25rem; }
.hs-lbl { display:block; font-size:0.55rem; color:var(--muted); text-transform:uppercase; letter-spacing:0.1em; }
.ach-btn {
  background: linear-gradient(135deg, rgba(255,210,63,0.15), rgba(255,140,66,0.1));
  border:1px solid rgba(255,210,63,0.4); color:#ffd23f;
  padding: 10px 14px; border-radius: 12px; font-size:0.85rem; cursor:pointer; font-weight:700;
  font-family:'JetBrains Mono', monospace; transition: all .2s;
}
.ach-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(255,210,63,0.25); }
.reset-btn {
  background: transparent; border:1px solid var(--border); color:var(--muted);
  padding: 9px 12px; border-radius: 12px; font-size:0.72rem; cursor:pointer;
  font-family:'JetBrains Mono', monospace; transition: all .2s;
}
.reset-btn:hover { border-color:#ff5470; color:#ff5470; }

/* Track nav */
.track-nav { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.track-btn {
  flex: 1; min-width: 200px; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 14px 16px; border-radius: 16px; cursor: pointer; transition: all .25s;
  background: var(--panel); border: 1.5px solid var(--border); color: var(--text);
}
.track-btn:hover { transform: translateY(-3px); border-color: var(--tc); }
.track-active { background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01)); }
.track-icon {
  font-size: 1.5rem; font-family: 'JetBrains Mono', monospace; font-weight: 800;
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
  background: rgba(255,255,255,0.05); flex: 0 0 auto;
}
.track-meta { display: flex; flex-direction: column; }
.track-name { font-weight: 800; font-size: 0.98rem; }
.track-blurb { font-size: 0.72rem; color: var(--muted); }

/* Tiles */
.tiles { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 16px; scrollbar-width: thin; }
.tile {
  flex: 0 0 auto; min-width: 104px; padding: 12px 12px 10px; border-radius: 14px;
  background: var(--panel); border: 1.5px solid var(--border); color: var(--text);
  cursor: pointer; transition: all 0.2s; text-align: center; position: relative;
}
.tile:hover:not(:disabled) { border-color: var(--tc); transform: translateY(-3px); }
.tile-active { border-color: var(--tc); box-shadow: 0 0 0 1px var(--tc), 0 6px 24px color-mix(in srgb, var(--tc) 30%, transparent); }
.tile-locked { opacity: 0.35; cursor: not-allowed; }
.tile-lang {
  position: absolute; top: 6px; left: 6px; font-size: 0.55rem; font-weight: 700;
  padding: 2px 6px; border-radius: 6px; background: var(--tc); color: #06121a;
  text-transform: uppercase; font-family: 'JetBrains Mono', monospace;
}
.tile-name { font-size: 0.82rem; font-weight: 800; margin-top: 6px; }
.tile-stars { font-size: 0.78rem; color:#ffd23f; height:1.1rem; margin-top: 2px; }
.tile-check {
  position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%;
  background: #3dff88; color: #06121a; font-size: 0.7rem; font-weight: 800; display: grid; place-items: center;
}

/* Tip */
.tip {
  font-size: 0.82rem; color: #cdd8e6; background: linear-gradient(90deg, rgba(160,107,255,0.12), transparent);
  border-left: 3px solid #a06bff; padding: 10px 14px; border-radius: 8px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px; font-style: italic;
}
.tip-sensei { font-size: 1.2rem; font-style: normal; animation: badgePulse 2.4s ease-in-out infinite; }

/* Practice */
.practice {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border); border-radius: 20px;
  padding: 22px; margin-bottom: 18px; box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.code-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.code-dots { display: flex; gap: 6px; }
.code-dots i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.code-file { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--muted); }

.prompt {
  font-family: 'JetBrains Mono', monospace; font-size: 1.5rem; line-height: 2;
  letter-spacing: 0.02em; margin-bottom: 20px; word-break: break-word; user-select: none;
}
.prompt-code {
  font-size: 1.35rem; background: rgba(0,0,0,0.3); padding: 16px 18px; border-radius: 12px;
  white-space: pre-wrap; line-height: 1.9;
}
.ch { color: #47566b; transition: all 0.1s; }
.ch-correct { color: #3dff88; text-shadow: 0 0 6px rgba(61,255,136,0.4); }
.ch-wrong { color: #fff; background: #ff5470; border-radius: 4px; animation: shake 0.2s; }
@keyframes shake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-2px);} 75%{transform:translateX(2px);} }
.ch-current {
  color: #fff; background: color-mix(in srgb, var(--fc) 25%, transparent);
  border-bottom: 3px solid var(--fc); border-radius: 4px 4px 0 0;
  box-shadow: 0 0 14px color-mix(in srgb, var(--fc) 50%, transparent);
  animation: pulseCur 1s ease-in-out infinite;
}
@keyframes pulseCur { 0%,100%{ box-shadow: 0 0 8px color-mix(in srgb, var(--fc) 40%, transparent);} 50%{ box-shadow: 0 0 20px color-mix(in srgb, var(--fc) 70%, transparent);} }

.stats-row { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-box { flex: 1; min-width: 64px; text-align: center; padding: 11px 6px; background: rgba(0,0,0,0.3); border-radius: 12px; }
.stat-val { font-size: 1.5rem; font-weight: 800; font-family:'JetBrains Mono', monospace; }
.stat-lbl { font-size: 0.58rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px; }

/* Hands */
.hands-row { display: flex; justify-content: center; gap: 60px; margin-bottom: 14px; }
.hand-svg-wrap { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.hand-svg { max-width: 130px; }
.palm { fill: rgba(255,255,255,0.06); stroke: rgba(255,255,255,0.12); stroke-width: 1.5; }
.finger { fill: rgba(255,255,255,0.09); stroke: rgba(255,255,255,0.14); stroke-width: 1.5; transition: all 0.15s; }
.finger-active { animation: fingerTap 0.4s ease-in-out infinite; }
@keyframes fingerTap { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(4px);} }
.hand-label { font-family:'JetBrains Mono', monospace; font-size: 0.6rem; color: var(--muted); letter-spacing: 0.15em; }

/* Keyboard */
.kb-wrap {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border); border-radius: 18px;
  padding: 16px; margin-bottom: 20px; box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.kb-row { display: flex; gap: 6px; margin-bottom: 6px; justify-content: center; }
.kb-key {
  width: 46px; height: 46px; border-radius: 10px; display: flex; position: relative;
  align-items: center; justify-content: center; font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem; font-weight: 700; transition: all 0.09s; text-transform: uppercase;
  flex: 0 0 auto; border: 1.5px solid var(--border);
}
.kb-next { transform: translateY(-3px); }
.kb-correct { animation: keyCorrect 0.2s; }
.kb-wrong { animation: keyWrong 0.2s; }
@keyframes keyCorrect { 0%{ box-shadow: 0 0 0 rgba(61,255,136,0);} 50%{ box-shadow: 0 0 26px rgba(61,255,136,0.9); background:#3dff8855;} 100%{} }
@keyframes keyWrong { 0%,100%{transform:translateY(0);} 25%{transform:translateX(-3px);} 50%{background:#ff547055;} 75%{transform:translateX(3px);} }
.key-dot { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; opacity: 0.85; }
.home-bump { position: absolute; bottom: 5px; width: 12px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.55); }
.kb-space { width: 300px; text-transform: lowercase; font-size: 0.7rem; }
.kb-shift { width: 76px; text-transform: lowercase; font-size: 0.9rem; }
.kb-bksp { width: 60px; text-transform: lowercase; font-size: 1rem; }
.kb-enter { width: 76px; text-transform: lowercase; font-size: 1rem; }

/* Make every rendered key feel tappable */
.kb-key[role="button"] { cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.kb-key[role="button"]:active { transform: translateY(2px); filter: brightness(1.35); }

/* Mobile keyboard hint — hidden on devices with a real pointer (desktop) */
.kb-hint {
  display: none; text-align: center; font-size: 0.8rem; color: #7dd3ff;
  background: rgba(0,224,213,0.08); border: 1px solid rgba(0,224,213,0.25);
  border-radius: 10px; padding: 9px 12px; margin-bottom: 12px;
}
@media (hover: none), (pointer: coarse) { .kb-hint { display: block; } }

/* Overlay */
.overlay {
  position: fixed; inset: 0; background: rgba(3,6,12,0.88); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  z-index: 50; animation: fadeUp 0.3s ease;
}
.result-card, .ach-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border); border-radius: 22px;
  padding: 30px; text-align: center; max-width: 440px; width: 100%;
  box-shadow: 0 24px 70px rgba(0,0,0,0.6);
  animation: popIn 0.4s cubic-bezier(.2,1.4,.4,1);
}
@keyframes popIn { from { opacity:0; transform: scale(0.85);} to { opacity:1; transform: scale(1);} }
.result-emoji { font-size: 3rem; margin-bottom: 6px; animation: badgePulse 1.6s ease-in-out infinite; }
.result-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.result-stars { color: #ffd23f; font-size: 1.6rem; margin-bottom: 18px; }
.result-stats { display: flex; justify-content: center; gap: 28px; margin-bottom: 16px; }
.rs-val { font-family: 'JetBrains Mono', monospace; font-size: 1.9rem; font-weight: 800; }
.rs-lbl { font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.result-hint { font-size: 0.75rem; color: #94a3b8; margin-bottom: 12px; }
.weak-key {
  display: inline-block; margin: 0 3px; padding: 3px 9px; background: rgba(255,84,112,0.18);
  border: 1px solid rgba(255,84,112,0.4); border-radius: 6px; font-family: 'JetBrains Mono', monospace;
  color: #ffa3b4; text-transform: uppercase;
}
.new-badges { margin: 8px 0 16px; padding: 12px; background: rgba(255,210,63,0.08); border: 1px solid rgba(255,210,63,0.3); border-radius: 14px; }
.nb-title { font-weight: 800; color: #ffd23f; margin-bottom: 8px; }
.nb-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.nb-chip { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: rgba(0,0,0,0.3); border-radius: 20px; font-size: 0.8rem; font-weight: 700; animation: popIn 0.5s; }
.nb-icon { font-size: 1.1rem; }
.result-btns { display: flex; gap: 10px; justify-content: center; margin-top: 8px; }
.btn { padding: 11px 22px; border-radius: 12px; font-weight: 800; cursor: pointer; border: none; font-family: 'Bricolage Grotesque', sans-serif; font-size: 0.92rem; transition: all 0.15s; }
.btn-1 { background: linear-gradient(135deg, #00e0d5, #3dff88); color: #06121a; }
.btn-1:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,224,213,0.4); }
.btn-2 { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid var(--border); }
.btn-2:hover { background: rgba(255,255,255,0.14); }

/* Achievements grid */
.ach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
.ach-item { padding: 14px 10px; background: rgba(0,0,0,0.3); border-radius: 14px; border: 1px solid var(--border); opacity: 0.5; transition: all .2s; }
.ach-got { opacity: 1; border-color: rgba(255,210,63,0.5); background: rgba(255,210,63,0.06); box-shadow: 0 0 18px rgba(255,210,63,0.12); }
.ach-icon { font-size: 1.8rem; margin-bottom: 4px; }
.ach-name { font-weight: 800; font-size: 0.85rem; }
.ach-desc { font-size: 0.68rem; color: var(--muted); margin-top: 2px; }

/* Confetti */
.confetti { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.confetti-bit { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: 0; } }

/* Dashboard */
.dash { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--border); border-radius: 18px; padding: 18px; margin-bottom: 20px; }
.dash-title { font-weight: 800; font-size: 0.92rem; margin-bottom: 14px; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 76px; margin-bottom: 14px; }
.spark-bar { flex: 1; border-radius: 4px 4px 0 0; min-height: 8px; transition: height 0.4s; }
.dash-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.76rem; color: var(--muted); }
.dash-meta b { color: var(--text); font-family: 'JetBrains Mono', monospace; }

/* Footer */
.footer { text-align: center; font-size: 0.75rem; color: var(--muted); margin-top: 30px; }
.footer a { color: #00e0d5; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* Smooth touch scrolling + no tap flash on interactive elements */
.tiles { -webkit-overflow-scrolling: touch; }
button, .kb-key, .tile, .track-btn { -webkit-tap-highlight-color: transparent; }

/* ===== Tablet ===== */
@media (max-width: 820px) {
  .app { padding: 16px 10px 48px; }
  .track-btn { min-width: 100%; }
}

/* ===== Phone (Android / small screens): stack vertically, big tap targets ===== */
@media (max-width: 640px) {
  .app { padding: 12px 8px 40px; }

  /* Header stacks vertically */
  .header { flex-direction: column; align-items: stretch; gap: 12px; }
  .brand { justify-content: flex-start; }
  .logo { font-size: 1.5rem; }
  .logo-badge { width: 44px; height: 44px; font-size: 1.3rem; }
  .header-stats { justify-content: space-between; gap: 8px; }
  .hs { flex: 1; padding: 6px 8px; }
  .ach-btn, .reset-btn { padding: 10px 12px; }

  /* Readable prompt */
  .prompt { font-size: 1.15rem; line-height: 1.85; }
  .prompt-code { font-size: 1rem; padding: 12px; }
  .practice { padding: 14px; }

  /* Stats as a 3-col grid rather than cramped flex */
  .stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-box { min-width: 0; padding: 9px 4px; }
  .stat-val { font-size: 1.2rem; }

  /* Hands scale, stay side by side */
  .hands-row { gap: 12px; margin-bottom: 10px; }
  .hand-svg { max-width: 96px; }

  /* Keyboard FILLS the width — no horizontal scroll, finger-sized keys */
  .kb-wrap { padding: 8px 5px; }
  .kb-row { gap: 4px; margin-bottom: 4px; padding-left: 0 !important; }
  .kb-key {
    flex: 1 1 0; width: auto; min-width: 0; height: 46px;
    font-size: 0.82rem; border-radius: 6px;
  }
  .key-dot { width: 5px; height: 5px; top: 3px; right: 3px; }
  .home-bump { width: 10px; bottom: 3px; }
  .kb-space { flex: 4 1 0; width: auto; }
  .kb-shift { flex: 2 1 0; width: auto; }
  .kb-bksp { flex: 1.6 1 0; width: auto; }
  .kb-enter { flex: 2 1 0; width: auto; }

  /* Bigger lesson tiles for fingers */
  .tile { min-width: 118px; padding: 14px 12px 12px; }
  .tile-name { font-size: 0.88rem; }

  /* Tracks + achievements stack */
  .track-btn { min-width: 100%; padding: 12px 14px; }
  .ach-grid { grid-template-columns: 1fr; }
  .result-stats { gap: 18px; }
  .result-card, .ach-card { padding: 22px 18px; }
}

/* ===== Very small phones ===== */
@media (max-width: 380px) {
  .kb-key { height: 42px; font-size: 0.74rem; }
  .hand-svg { max-width: 80px; }
  .hands-row { gap: 8px; }
  .prompt { font-size: 1.05rem; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
```