:root {
  color-scheme: dark;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --control-rail: 82px;
}

* { box-sizing: border-box; }
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #0d0c1b;
  font-family: Inter, ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

body { display: grid; place-items: center; }
button { font: inherit; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

#game-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at 50% 15%, #322b72 0%, #15152d 48%, #090915 100%);
}

#game {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  transform: translate(-50%, -50%);
  display: block;
  outline: none;
  transition: width .18s ease, height .18s ease, top .18s ease;
}

.ui-row {
  position: absolute;
  top: max(10px, var(--safe-top));
  right: max(10px, var(--safe-right));
  display: flex;
  gap: 8px;
  z-index: 6;
}

.icon-btn,
.touch-btn {
  border: 1px solid rgba(255,255,255,.20);
  color: white;
  background: rgba(12, 12, 30, .66);
  box-shadow: 0 8px 24px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  font-size: 21px;
}

.icon-btn:focus-visible,
.touch-btn:focus-visible {
  outline: 3px solid rgba(111,255,233,.88);
  outline-offset: 3px;
}

.icon-btn:active,
.touch-btn.active,
.touch-btn:active {
  transform: translateY(2px) scale(.97);
  background: rgba(88, 73, 190, .88);
}

#rotate-hint {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  padding: 30px;
  text-align: center;
  color: white;
  background: radial-gradient(circle at 50% 35%, rgba(73,58,152,.98), rgba(9,9,22,.99));
}

#rotate-hint strong { font-size: 26px; }
#rotate-hint span { color: #d4d7ff; font-size: 16px; }
.rotate-phone { font-size: 70px; line-height: 1; margin-bottom: 6px; }

#touch-controls {
  position: absolute;
  left: max(10px, var(--safe-left));
  right: max(10px, var(--safe-right));
  bottom: max(8px, var(--safe-bottom));
  height: 66px;
  z-index: 7;
  pointer-events: none;
  align-items: center;
}

#touch-controls[data-mode="move"] {
  display: flex;
  justify-content: space-between;
}

#touch-controls[data-mode="action"] {
  display: flex;
  justify-content: center;
}

.touch-btn {
  pointer-events: auto;
  width: 66px;
  height: 60px;
  border-radius: 21px;
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
}

.touch-btn.action {
  width: 104px;
  height: 60px;
  border-radius: 22px;
  font-size: 17px;
  letter-spacing: .08em;
  background: linear-gradient(145deg, rgba(255, 82, 125, .92), rgba(121, 66, 214, .92));
}

/* Touch devices get a dedicated control rail beneath the 16:9 playfield. */
@media (hover: none), (pointer: coarse), (max-width: 900px) {
  :root { --control-rail: clamp(72px, 18vh, 86px); }

  #game-shell.controls-active #game {
    top: calc((100% - var(--control-rail)) / 2);
    width: min(100vw, calc((100vh - var(--control-rail)) * 16 / 9));
    height: min(calc(100vh - var(--control-rail)), calc(100vw * 9 / 16));
  }

  .icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: 18px;
  }
}

@media (max-height: 420px) and (orientation: landscape) {
  :root { --control-rail: 68px; }
  #touch-controls { height: 54px; bottom: max(7px, var(--safe-bottom)); }
  .touch-btn { width: 60px; height: 52px; border-radius: 18px; font-size: 24px; }
  .touch-btn.action { width: 94px; height: 52px; font-size: 15px; }
  .icon-btn { width: 36px; height: 36px; border-radius: 12px; font-size: 17px; }
}

@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  #touch-controls { display: none !important; }
}

@media (max-aspect-ratio: 3 / 4) and (max-width: 900px) {
  #rotate-hint { display: flex; }
  #touch-controls,
  #top-controls { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  #game { transition: none; }
}

/* Part 6: audio controls, pause/settings and tutorial overlays */
#top-controls {
  max-width: calc(100vw - 20px);
}

#top-controls .icon-btn {
  font-weight: 900;
}

#modal-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: max(18px, var(--safe-top)) max(18px, var(--safe-right)) max(18px, var(--safe-bottom)) max(18px, var(--safe-left));
  color: #fff;
  background:
    radial-gradient(circle at 50% 25%, rgba(74, 58, 162, .72), rgba(7, 7, 20, .94) 62%),
    rgba(4, 4, 14, .9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: auto;
}

.modal-panel {
  width: min(620px, 94vw);
  max-height: min(650px, 92vh);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 30px;
  background: linear-gradient(160deg, rgba(35, 31, 82, .96), rgba(15, 14, 39, .98));
  box-shadow: 0 28px 90px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.1);
  text-align: center;
}

.modal-panel h2 {
  margin: 4px 0 20px;
  font-size: clamp(30px, 6vw, 46px);
  line-height: 1.05;
}

.eyebrow {
  margin: 0;
  color: #8dfff3;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .16em;
}

.setting-row,
.guide-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-actions {
  display: grid;
  gap: 11px;
}

.modal-panel button {
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  color: #fff;
  background: rgba(255,255,255,.075);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  font-weight: 850;
  cursor: pointer;
}

.modal-panel button:hover,
.modal-panel button:focus-visible {
  background: rgba(255,255,255,.13);
  outline: 3px solid rgba(111,255,233,.82);
  outline-offset: 2px;
}

.modal-panel button:active { transform: translateY(1px) scale(.99); }
.modal-panel button:disabled { opacity: .38; cursor: not-allowed; }

.modal-panel .primary-btn {
  background: linear-gradient(145deg, #6a58ef, #3fbcbb);
  border-color: rgba(255,255,255,.28);
}

.modal-panel .danger-btn {
  color: #ffd7df;
  background: rgba(255, 72, 107, .12);
}

.setting-btn[aria-pressed="false"] {
  color: #a9aec8;
  background: rgba(10,10,25,.45);
}

.keyboard-help {
  margin: 16px 0 0;
  color: #bfc4ed;
  font-size: 13px;
}

.guide-panel {
  width: min(900px, 96vw);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
  text-align: left;
}

.guide-card {
  min-height: 142px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 18px;
  background: rgba(255,255,255,.055);
}

.guide-card .guide-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
  border-radius: 12px;
  color: #fff;
  background: rgba(112, 246, 231, .16);
  font-size: 22px;
  font-weight: 900;
}

.guide-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.guide-card p {
  margin: 0;
  color: #cdd2f8;
  font-size: 13px;
  line-height: 1.4;
}

.tutorial-panel {
  position: relative;
  width: min(680px, 95vw);
}

.tutorial-icon {
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-top: -34px;
  border: 3px solid rgba(255,255,255,.28);
  border-radius: 22px;
  color: #8dfff3;
  background: #211d52;
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
  font-size: 38px;
  font-weight: 1000;
}

.tutorial-demo {
  position: relative;
  height: 170px;
  margin: 18px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(93,72,190,.28), rgba(12,12,35,.72));
}

.tutorial-demo::before,
.tutorial-demo::after {
  position: absolute;
  content: "";
}

.tutorial-demo .demo-player,
.tutorial-demo .demo-object,
.tutorial-demo .demo-extra,
.tutorial-demo .demo-label {
  position: absolute;
}

.demo-player {
  left: 46%;
  bottom: 16px;
  width: 42px;
  height: 48px;
  border-radius: 17px 17px 13px 13px;
  background: #6ce5e8;
  box-shadow: 0 0 22px rgba(108,229,232,.5);
}

.demo-player::before {
  position: absolute;
  left: 9px;
  top: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  content: "";
  background: #16162c;
  box-shadow: 17px 0 #16162c;
}

.tutorial-demo[data-game="gem-rush"] .demo-player,
.tutorial-demo[data-game="meteor-dodge"] .demo-player,
.tutorial-demo[data-game="lava-lanes"] .demo-player {
  animation: tutorial-slide 2.3s ease-in-out infinite;
}

.tutorial-demo[data-game="gem-rush"] .demo-object {
  left: 51%; top: 16px; width: 26px; height: 26px;
  background: #ffd95a; transform: rotate(45deg);
  box-shadow: 0 0 22px #ffd95a;
  animation: tutorial-fall 1.55s linear infinite;
}

.tutorial-demo[data-game="gem-rush"] .demo-extra {
  left: 25%; top: 10px; width: 22px; height: 22px;
  border-radius: 50%; background: #ff617f;
  box-shadow: 0 0 18px #ff617f;
  animation: tutorial-fall 1.8s .45s linear infinite;
}

.tutorial-demo[data-game="meteor-dodge"] .demo-object {
  left: 52%; top: 8px; width: 44px; height: 44px;
  border-radius: 50%; background: #ff744f;
  box-shadow: 0 0 28px #ff744f;
  animation: tutorial-fall 1.2s linear infinite;
}

.tutorial-demo[data-game="meteor-dodge"] .demo-extra {
  left: 47%; bottom: 18px; width: 78px; height: 26px;
  border: 4px solid #ff9b73; border-radius: 50%;
  animation: warning-pulse .8s ease-out infinite;
}

.tutorial-demo[data-game="balance-beam"] .demo-object {
  left: 21%; bottom: 38px; width: 58%; height: 10px;
  border-radius: 8px; background: #ffd166;
  transform-origin: 50% 50%;
  animation: beam-tilt 2.4s ease-in-out infinite;
}

.tutorial-demo[data-game="balance-beam"] .demo-player {
  left: calc(50% - 21px); bottom: 47px;
  animation: balance-bob 2.4s ease-in-out infinite;
}

.tutorial-demo[data-game="signal-sprint"] .demo-object {
  left: calc(50% - 32px); top: 18px; width: 64px; height: 64px;
  border-radius: 50%;
  background: #ff5473;
  box-shadow: 0 0 25px #ff5473;
  animation: signal-change 2.1s steps(1) infinite;
}

.tutorial-demo[data-game="signal-sprint"] .demo-label {
  left: 0; right: 0; bottom: 23px;
  color: #fff; font-weight: 1000; letter-spacing: .1em;
  animation: tap-pop 2.1s ease-in-out infinite;
}

.tutorial-demo[data-game="target-pop"] .demo-object {
  left: 22%; top: 44px; width: 56px; height: 56px;
  border: 9px solid #ff6f91; border-radius: 50%;
  box-shadow: inset 0 0 0 8px #fff, 0 0 24px #ff6f91;
  animation: target-move 2s ease-in-out infinite;
}

.tutorial-demo[data-game="target-pop"] .demo-extra {
  width: 28px; height: 28px; border: 4px solid #8dfff3; border-radius: 50%;
  animation: tap-ring 2s ease-out infinite;
}

.tutorial-demo[data-game="lava-lanes"]::before {
  inset: 0;
  background: linear-gradient(90deg, transparent 32%, rgba(255,255,255,.08) 33%, transparent 34%, transparent 65%, rgba(255,255,255,.08) 66%, transparent 67%);
}

.tutorial-demo[data-game="lava-lanes"] .demo-object {
  left: 18%; top: 6px; width: 34px; height: 34px;
  background: #ff674c; clip-path: polygon(50% 0, 100% 100%, 0 100%);
  animation: tutorial-fall 1.35s linear infinite;
}

.tutorial-demo[data-game="lava-lanes"] .demo-extra {
  right: 18%; top: 9px; width: 34px; height: 34px;
  background: #ffd95a; clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 61%, 80% 100%, 50% 76%, 20% 100%, 30% 61%, 0 38%, 38% 35%);
  animation: tutorial-fall 1.55s .25s linear infinite;
}

.tutorial-objective {
  margin: 0 auto 16px;
  max-width: 560px;
  color: #d5d9ff;
  font-size: 17px;
  line-height: 1.45;
}

.tutorial-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
  text-align: left;
}

.tutorial-facts p {
  margin: 0;
  padding: 13px;
  border-radius: 16px;
  background: rgba(255,255,255,.055);
}

.tutorial-facts strong,
.tutorial-facts span { display: block; }
.tutorial-facts strong { margin-bottom: 5px; color: #8dfff3; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.tutorial-facts span { color: #fff; font-size: 14px; line-height: 1.4; }

.skip-tutorials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 13px 0;
  color: #c7cbed;
  font-size: 13px;
}

.skip-tutorials input { width: 18px; height: 18px; accent-color: #6ce5e8; }
.wide-btn { width: 100%; }

@keyframes tutorial-slide { 0%,100% { transform: translateX(-82px); } 50% { transform: translateX(82px); } }
@keyframes tutorial-fall { from { transform: translateY(-50px) rotate(0); opacity: 0; } 18% { opacity: 1; } to { transform: translateY(170px) rotate(180deg); opacity: .9; } }
@keyframes warning-pulse { from { transform: scale(.5); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
@keyframes beam-tilt { 0%,100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes balance-bob { 0%,100% { transform: translate(-34px, -2px) rotate(7deg); } 50% { transform: translate(34px, 2px) rotate(-7deg); } }
@keyframes signal-change { 0%,46% { background:#ff5473; box-shadow:0 0 25px #ff5473; } 47%,100% { background:#70f6e7; box-shadow:0 0 30px #70f6e7; } }
@keyframes tap-pop { 0%,48% { transform: scale(.85); opacity:.35; } 56% { transform: scale(1.2); opacity:1; } 75%,100% { transform: scale(1); opacity:.65; } }
@keyframes target-move { 0%,100% { transform: translateX(0) scale(.9); } 50% { transform: translateX(290px) scale(1.08); } }
@keyframes tap-ring { 0%,35% { left:24%; top:58px; transform:scale(.2); opacity:0; } 50% { left:24%; top:58px; transform:scale(1.8); opacity:1; } 70%,100% { left:calc(24% + 290px); top:58px; transform:scale(2.8); opacity:0; } }

@media (max-width: 760px) {
  .modal-panel { padding: 20px; border-radius: 24px; }
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tutorial-demo { height: 140px; }
  .tutorial-facts { grid-template-columns: 1fr; }
}

@media (max-height: 500px) and (orientation: landscape) {
  #modal-layer { place-items: start center; padding-top: 8px; padding-bottom: 8px; }
  .modal-panel { width: min(900px, 96vw); max-height: calc(100vh - 16px); padding: 16px 20px; }
  .modal-panel h2 { margin: 2px 0 12px; font-size: 28px; }
  .setting-row { margin-bottom: 10px; }
  .modal-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .modal-panel button { min-height: 40px; }
  .keyboard-help { margin-top: 8px; }
  .guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
  .guide-card { min-height: 112px; padding: 10px; }
  .guide-card p { font-size: 11px; }
  .tutorial-panel { display: grid; grid-template-columns: 230px 1fr; gap: 0 18px; align-items: center; text-align: left; }
  .tutorial-panel .eyebrow { grid-column: 2; }
  .tutorial-demo { grid-column: 1; grid-row: 1 / span 7; height: 210px; margin: 0; }
  .tutorial-icon { display: none; }
  .tutorial-panel h2 { grid-column: 2; }
  .tutorial-objective, .tutorial-facts, .skip-tutorials, .tutorial-panel .wide-btn { grid-column: 2; }
  .tutorial-facts { grid-template-columns: 1fr 1fr; margin: 7px 0; gap: 8px; }
  .tutorial-facts p { padding: 9px; }
  .skip-tutorials { justify-content: flex-start; margin: 6px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .tutorial-demo *, .tutorial-demo::before, .tutorial-demo::after { animation: none !important; }
}

/* Demo labels are only used by Signal Sprint. */
.tutorial-demo .demo-label { display: none; }
.tutorial-demo[data-game="signal-sprint"] .demo-label { display: block; }

/* Part 7: Quick Play, records, medals and achievements */
.panel-copy {
  margin: -4px auto 18px;
  max-width: 720px;
  color: #cbd0ff;
  line-height: 1.5;
  text-align: center;
}

.collection-panel { width: min(900px, 96vw); }
.quick-grid,
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-card,
.achievement-card,
.record-row,
.stat-card {
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 20px;
  background: rgba(255,255,255,.065);
  color: #fff;
}

.quick-card {
  min-height: 148px;
  padding: 16px;
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-rows: auto auto auto;
  gap: 3px 10px;
  text-align: left;
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}
.quick-card:hover,
.quick-card:focus-visible {
  transform: translateY(-3px);
  border-color: #70f6e7;
  background: rgba(112,246,231,.12);
  outline: none;
}
.quick-card .card-icon {
  grid-row: 1 / 4;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 17px;
  font-size: 34px;
  background: rgba(112,246,231,.12);
  color: #8dfff3;
}
.quick-card strong { font-size: 17px; }
.quick-card small { color: #aeb7e7; line-height: 1.35; }
.quick-card .card-record { color: #ffd95a; font-weight: 850; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card { padding: 13px 10px; text-align: center; }
.stat-card strong { display: block; font-size: 25px; color: #8dfff3; }
.stat-card span { display: block; margin-top: 3px; color: #bfc5ef; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }

.records-grid { display: grid; gap: 8px; }
.record-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.35fr) repeat(3, minmax(110px, 1fr));
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
}
.record-name { display: flex; align-items: center; gap: 9px; font-weight: 900; }
.record-name b { color: #8dfff3; font-size: 22px; }
.record-cell { text-align: center; color: #d8dcff; font-weight: 800; }
.record-cell small { display: block; color: #8f99cc; font-size: 10px; margin-bottom: 2px; }
.medal-bronze { color: #d89a72; }
.medal-silver { color: #dce2ef; }
.medal-gold { color: #ffd95a; }

.achievements-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.achievement-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 3px 12px;
  padding: 14px;
  text-align: left;
}
.achievement-card.locked { filter: grayscale(.8); opacity: .55; }
.achievement-badge {
  grid-row: 1 / 4;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,217,90,.13);
  border: 2px solid rgba(255,217,90,.38);
  color: #ffd95a;
  font-size: 28px;
}
.achievement-card strong { font-size: 17px; }
.achievement-card p { margin: 2px 0; color: #bdc4ef; font-size: 13px; line-height: 1.35; }
.achievement-progress { color: #8dfff3; font-size: 11px; font-weight: 900; }

.quick-result-panel { width: min(540px, 94vw); text-align: center; }
.result-medal {
  width: 104px;
  height: 104px;
  margin: 2px auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 55px;
  color: #ffd95a;
  background: radial-gradient(circle, rgba(255,217,90,.22), rgba(113,89,235,.12));
  border: 3px solid rgba(255,217,90,.45);
  box-shadow: 0 0 42px rgba(255,217,90,.16);
}
.result-score { margin: 4px 0 12px; font-size: 48px; font-weight: 1000; color: #fff; }
.quick-result-actions { margin-top: 18px; }

#achievement-toast {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: max(18px, var(--safe-bottom));
  min-width: 270px;
  max-width: min(430px, 90vw);
  padding: 13px 20px;
  border: 1px solid rgba(255,217,90,.42);
  border-radius: 18px;
  text-align: center;
  color: #fff;
  background: linear-gradient(145deg, rgba(88,68,180,.97), rgba(24,21,58,.98));
  box-shadow: 0 18px 50px rgba(0,0,0,.42);
  transform: translate(-50%, 140%);
  opacity: 0;
  pointer-events: none;
  transition: transform .28s ease, opacity .28s ease;
}
#achievement-toast.show { transform: translate(-50%, 0); opacity: 1; }
#achievement-toast span { display: block; color: #ffd95a; font-size: 11px; font-weight: 1000; letter-spacing: .12em; }
#achievement-toast strong { display: block; margin-top: 4px; font-size: 17px; }

@media (max-width: 760px), (max-height: 470px) {
  .collection-panel { padding: 19px; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .quick-card { min-height: 112px; padding: 11px; grid-template-columns: 43px 1fr; }
  .quick-card .card-icon { width: 42px; height: 42px; font-size: 26px; border-radius: 13px; }
  .quick-card strong { font-size: 14px; }
  .quick-card small { font-size: 11px; }
  .stats-grid { grid-template-columns: repeat(4, minmax(82px, 1fr)); gap: 7px; }
  .stat-card { padding: 8px 5px; }
  .stat-card strong { font-size: 20px; }
  .record-row { grid-template-columns: minmax(125px, 1.3fr) repeat(3, minmax(78px, 1fr)); padding: 8px; font-size: 12px; }
  .achievements-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .achievement-card { grid-template-columns: 44px 1fr; padding: 10px; }
  .achievement-badge { width: 42px; height: 42px; font-size: 21px; }
  .achievement-card strong { font-size: 13px; }
  .achievement-card p { font-size: 10px; }
}

@media (max-width: 560px) {
  .quick-grid,
  .achievements-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .record-row { grid-template-columns: 1.4fr repeat(3, .8fr); }
}
