:root {
  color-scheme: dark;
  --ink: #071d2d;
  --night: #07131f;
  --night-soft: #0d2233;
  --paper: #f5fbfa;
  --muted: #8da8b6;
  --cyan: #5df6e6;
  --cyan-strong: #00d9c5;
  --blue: #4a7dff;
  --coral: #ff6f75;
  --line: rgba(148, 219, 220, 0.17);
  --radius: 28px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--paper);
  background:
    radial-gradient(
      circle at 77% 13%,
      rgba(17, 205, 193, 0.12),
      transparent 28%
    ),
    radial-gradient(
      circle at 14% 42%,
      rgba(74, 125, 255, 0.09),
      transparent 30%
    ),
    var(--night);
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

.page-shell {
  overflow: hidden;
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  text-decoration: none;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--ink);
  border-radius: 10px;
  background: var(--cyan);
  box-shadow: 0 0 26px rgba(93, 246, 230, 0.28);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.signal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow:
    0 0 0 5px rgba(93, 246, 230, 0.1),
    0 0 12px var(--cyan);
}

.hero {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 760px;
  padding: 68px 0 90px;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(480px, 1.12fr);
  gap: 94px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.hero-copy h1 {
  margin: 0;
  max-width: 560px;
  font-size: clamp(50px, 6.2vw, 86px);
  line-height: 0.94;
  letter-spacing: -0.067em;
}

.hero-copy h1 span {
  color: transparent;
  background: linear-gradient(90deg, var(--cyan), #69a7ff);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-intro {
  max-width: 510px;
  margin: 30px 0 38px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.hero-metrics {
  display: flex;
  gap: 34px;
}

.hero-metrics div {
  display: grid;
  gap: 5px;
}

.hero-metrics strong {
  color: var(--paper);
  font-size: 22px;
  letter-spacing: -0.03em;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.coach-card {
  --surface-color: var(--cyan);
  position: relative;
  min-height: 686px;
  padding: 22px;
  border: 1px solid rgba(126, 248, 239, 0.15);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(17, 44, 61, 0.94), rgba(9, 27, 41, 0.98)),
    var(--night-soft);
  box-shadow:
    0 38px 90px rgba(0, 0, 0, 0.4),
    inset 0 1px rgba(255, 255, 255, 0.05);
}

.coach-card.surface-inner {
  --surface-color: #b987ff;
}

.coach-card.surface-biting {
  --surface-color: #ffc857;
}

.coach-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(93, 246, 230, 0.35),
    transparent 38%,
    rgba(74, 125, 255, 0.15)
  );
  filter: blur(1px);
}

.app-header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 13px;
}

.app-header > div {
  display: grid;
  gap: 3px;
}

.app-header strong {
  font-size: 14px;
}

.app-kicker,
.session-meta span,
.instruction span,
.pressure-heading span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.icon-button,
.reset-action,
.result-close {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: 180ms ease;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 18px;
}

.icon-button:hover,
.reset-action:hover {
  color: var(--paper);
  border-color: rgba(93, 246, 230, 0.45);
}

.session-meta {
  margin-top: 20px;
  padding: 14px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.session-meta > div {
  display: grid;
  gap: 4px;
}
.session-meta strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.meta-center {
  text-align: center;
}
.align-right {
  text-align: right;
}

.mouth-stage {
  --surface-color: var(--cyan);
  position: relative;
  height: 314px;
  margin: 12px 0 8px;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(
      circle at 50% 49%,
      rgba(93, 246, 230, 0.1),
      transparent 32%
    ),
    linear-gradient(180deg, rgba(10, 33, 48, 0.1), rgba(5, 21, 33, 0.34));
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

.mouth-stage.surface-inner {
  --surface-color: #b987ff;
}

.mouth-stage.surface-biting {
  --surface-color: #ffc857;
}

.mouth-stage.surface-biting::after {
  content: "BITING SURFACE";
  position: absolute;
  z-index: 18;
  top: 12px;
  left: 50%;
  padding: 5px 10px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 200, 87, 0.55);
  border-radius: 999px;
  color: #ffe8a8;
  background: rgba(68, 45, 7, 0.84);
  box-shadow: 0 0 18px rgba(255, 184, 55, 0.28);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.1em;
  pointer-events: none;
}

.ambient-glow {
  position: absolute;
  inset: 48px 15%;
  border-radius: 50%;
  background: rgba(93, 246, 230, 0.09);
  filter: blur(36px);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(93, 246, 230, 0.08);
  border-radius: 50%;
}

.orbit-one {
  inset: 44px 108px;
  transform: rotate(-12deg);
}
.orbit-two {
  inset: 74px 80px;
  transform: rotate(28deg);
}

.reward-bank {
  position: absolute;
  z-index: 15;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
  pointer-events: none;
}

.reward-bank > span {
  min-width: 43px;
  height: 27px;
  padding: 0 8px 0 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(244, 205, 105, 0.22);
  border-radius: 999px;
  color: #fff5d1;
  background: rgba(8, 27, 39, 0.78);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.22);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.reward-bank > span:last-child {
  border-color: rgba(123, 231, 255, 0.25);
  color: #dffaff;
}

.mini-reward {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
}

.mini-coin {
  width: 17px;
  height: 17px;
  border: 1px solid #ffe194;
  border-radius: 50%;
  color: #8a570b;
  background:
    radial-gradient(circle at 34% 27%, #fff4bd 0 9%, transparent 10%),
    repeating-conic-gradient(
      from 8deg,
      rgba(255, 234, 152, 0.18) 0 6deg,
      transparent 6deg 18deg
    ),
    radial-gradient(
      circle,
      #eebd50 0 46%,
      #a96713 49% 66%,
      #efc55b 69% 78%,
      #80500f 81%
    );
  box-shadow:
    inset 0 0 0 1px rgba(255, 241, 181, 0.55),
    inset 0 -2px 3px rgba(80, 42, 2, 0.42),
    0 0 8px rgba(238, 182, 57, 0.34);
  font-size: 8px;
}

.mini-diamond {
  width: 14px;
  height: 14px;
  clip-path: polygon(50% 0, 100% 36%, 76% 100%, 24% 100%, 0 36%);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0 18%, transparent 19%),
    conic-gradient(
      from 45deg at 50% 36%,
      #eaffff,
      #65cfff 19%,
      #7f75ff 39%,
      #bdf8ff 58%,
      #568ce7 76%,
      #ecffff
    );
  filter: drop-shadow(0 0 5px rgba(113, 226, 255, 0.55));
  transform: perspective(30px) rotateX(-12deg) rotateY(18deg);
}

.reward-bank.collecting > span {
  animation: bankCollect 320ms cubic-bezier(0.2, 1.6, 0.4, 1);
}

.reward-layer {
  position: absolute;
  z-index: 24;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.reward-token {
  --reward-drift: 0px;
  --reward-lift: -82px;
  --reward-spin: 1turn;
  --reward-target-x: 70px;
  --reward-target-y: -120px;
  position: absolute;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  translate: -50% -50%;
  filter: drop-shadow(0 0 10px rgba(255, 195, 63, 0.5));
  animation: rewardFlight 1250ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.reward-shape {
  display: grid;
  place-items: center;
}

.reward-token.coin .reward-shape {
  width: 30px;
  height: 30px;
  position: relative;
  border: 2px solid #ffe59a;
  border-radius: 50%;
  color: #714207;
  background:
    radial-gradient(circle at 30% 23%, #fff8cc 0 8%, transparent 9%),
    repeating-conic-gradient(
      from 9deg,
      rgba(255, 238, 162, 0.22) 0 5deg,
      transparent 5deg 16deg
    ),
    radial-gradient(
      circle,
      #edba48 0 39%,
      #c47c18 42% 51%,
      #f1c352 54% 66%,
      #915711 69% 78%,
      #f4cf67 81%
    );
  box-shadow:
    inset 0 0 0 2px rgba(255, 234, 145, 0.42),
    inset 0 -4px 5px rgba(83, 44, 3, 0.48),
    inset 3px 2px 4px rgba(255, 244, 190, 0.36),
    0 1px 0 #6e410d,
    0 0 15px rgba(238, 181, 54, 0.68);
  font-size: 11px;
  font-style: normal;
  text-shadow: 0 1px rgba(255, 234, 155, 0.45);
  transform-style: preserve-3d;
  backface-visibility: visible;
  animation: antiqueCoinTurn 720ms linear infinite;
}

.reward-token.coin .reward-shape::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(103, 57, 5, 0.5);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 229, 132, 0.36);
}

.reward-token.coin .reward-shape::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: linear-gradient(
    105deg,
    transparent 28%,
    rgba(255, 255, 220, 0.7) 47%,
    transparent 63%
  );
  mix-blend-mode: screen;
  opacity: 0.52;
}

.reward-token.diamond .reward-shape {
  position: relative;
  width: 22px;
  height: 22px;
  clip-path: polygon(50% 0, 100% 35%, 77% 100%, 23% 100%, 0 35%);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0 16%, transparent 17%),
    conic-gradient(
      from 45deg at 50% 34%,
      #f2ffff 0 9%,
      #5fd5ff 10% 24%,
      #8174ff 25% 39%,
      #c6fbff 40% 55%,
      #4d88e9 56% 72%,
      #aeefff 73% 87%,
      #ffffff 88%
    );
  box-shadow: inset 0 0 9px rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 0 11px rgba(113, 225, 255, 0.95));
  transform-style: preserve-3d;
  animation: diamondFacetTurn 900ms cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.reward-token.diamond .reward-shape::before {
  content: "";
  position: absolute;
  inset: 2px 4px 8px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: linear-gradient(
    135deg,
    white,
    rgba(119, 214, 255, 0.1) 48%,
    rgba(97, 77, 228, 0.62)
  );
  opacity: 0.86;
}

.reward-token.diamond .reward-shape::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 12px;
  left: 4px;
  top: 1px;
  transform: rotate(38deg);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  filter: blur(0.6px);
}

.reward-toast {
  position: absolute;
  z-index: 16;
  left: 50%;
  top: 50%;
  padding: 7px 12px;
  transform: translate(-50%, -50%) scale(0.88);
  border: 1px solid rgba(141, 236, 255, 0.32);
  border-radius: 999px;
  color: #e9fdff;
  background: rgba(7, 31, 44, 0.9);
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.3),
    0 0 18px rgba(105, 225, 255, 0.15);
  opacity: 0;
  pointer-events: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reward-toast.visible {
  animation: rewardToast 900ms ease forwards;
}

.diamond-celebration {
  position: absolute;
  z-index: 32;
  inset: 0;
  display: grid;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at center,
    rgba(111, 225, 255, 0.18),
    transparent 43%
  );
}

.diamond-celebration.visible {
  visibility: visible;
  animation: diamondCelebrationFade 1600ms ease-out forwards;
}

.diamond-aura,
.diamond-gem,
.diamond-spark {
  grid-area: 1 / 1;
}

.diamond-aura {
  width: 138px;
  height: 138px;
  border: 1px solid rgba(185, 249, 255, 0.7);
  border-radius: 50%;
  box-shadow:
    0 0 20px rgba(112, 221, 255, 0.55),
    inset 0 0 24px rgba(121, 110, 255, 0.2);
}

.diamond-gem {
  position: relative;
  width: 94px;
  height: 88px;
  clip-path: polygon(50% 0, 100% 35%, 77% 100%, 23% 100%, 0 35%);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0 13%, transparent 14%),
    conic-gradient(
      from 45deg at 50% 34%,
      #f4ffff 0 9%,
      #64d9ff 10% 24%,
      #8276ff 25% 39%,
      #d5ffff 40% 55%,
      #4b8de9 56% 72%,
      #b9f6ff 73% 87%,
      #ffffff 88%
    );
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.9);
  filter:
    drop-shadow(0 0 13px rgba(168, 244, 255, 1))
    drop-shadow(0 0 34px rgba(109, 98, 255, 0.82));
}

.diamond-gem::before,
.diamond-gem::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.diamond-gem::before {
  inset: 5px 18px 35px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: linear-gradient(135deg, white, rgba(113, 221, 255, 0.18) 48%, #7569ee);
}

.diamond-gem::after {
  width: 12px;
  height: 42px;
  left: 18px;
  top: 7px;
  transform: rotate(38deg);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  filter: blur(1px);
}

.diamond-spark {
  --spark-x: 0px;
  --spark-y: -82px;
  --spark-delay: 0ms;
  width: 8px;
  height: 8px;
  position: relative;
  border-radius: 50%;
  background: #f3ffff;
  box-shadow:
    0 0 7px white,
    0 0 16px #71ddff;
  animation-delay: var(--spark-delay);
}

.diamond-spark::before,
.diamond-spark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: white;
  transform: translate(-50%, -50%);
}

.diamond-spark::before {
  width: 2px;
  height: 20px;
}

.diamond-spark::after {
  width: 20px;
  height: 2px;
}

.spark-one {
  --spark-x: -88px;
  --spark-y: -54px;
}

.spark-two {
  --spark-x: 82px;
  --spark-y: -64px;
  --spark-delay: 80ms;
}

.spark-three {
  --spark-x: 104px;
  --spark-y: 16px;
  --spark-delay: 160ms;
}

.spark-four {
  --spark-x: 63px;
  --spark-y: 82px;
  --spark-delay: 240ms;
}

.spark-five {
  --spark-x: -76px;
  --spark-y: 74px;
  --spark-delay: 120ms;
}

.spark-six {
  --spark-x: -103px;
  --spark-y: 11px;
  --spark-delay: 200ms;
}

.jaw {
  position: absolute;
  left: 50%;
  width: 330px;
  height: 126px;
  transform: translateX(-50%);
}

.jaw-top {
  top: 105px;
}
.jaw-bottom {
  bottom: 105px;
}

.tooth {
  --angle: 0deg;
  --distance: 140px;
  --tooth-scale: 1;
  position: absolute;
  left: calc(50% - 16px);
  top: calc(50% - 22px);
  width: 32px;
  height: 44px;
  border: 1px solid rgba(191, 255, 253, 0.78);
  border-radius: 9px 9px 13px 13px;
  background: linear-gradient(145deg, #ffffff 4%, #d8ffff 45%, #87d8df 100%);
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.95),
    0 0 0 1px rgba(93, 246, 230, 0.12),
    0 6px 17px rgba(0, 0, 0, 0.42);
  transform: rotate(var(--angle)) translateY(calc(var(--distance) * -1))
    rotate(calc(var(--angle) * -1)) scale(var(--tooth-scale));
  transform-origin: 16px calc(var(--distance) + 22px);
  transition:
    filter 250ms ease,
    opacity 250ms ease,
    background 250ms ease,
    box-shadow 250ms ease;
}

.jaw-bottom .tooth {
  border-radius: 13px 13px 9px 9px;
}

.tooth.active {
  z-index: 2;
  border-color: var(--surface-color);
  background: linear-gradient(145deg, #ffffff, #a6fff3 64%, #43e5d5);
  box-shadow:
    0 0 17px color-mix(in srgb, var(--surface-color) 72%, transparent),
    inset 0 2px 4px white;
}

.tooth.active.surface-inner {
  background: linear-gradient(145deg, #ffffff, #e5d3ff 58%, #a36df1);
}

.tooth.active.surface-outer {
  background: linear-gradient(145deg, #ffffff, #b8fff5 58%, #43e5d5);
}

.tooth.active.surface-biting {
  border-color: #ffd36f;
  background: linear-gradient(145deg, #fffef8, #fff2c8 64%, #e8bb57);
  box-shadow:
    0 0 20px rgba(255, 190, 64, 0.82),
    inset 0 2px 4px white;
}

.tooth.active.surface-biting::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 8px;
  border: 1px solid rgba(255, 250, 210, 0.95);
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 42% 36%,
    #fff7c7 0 12%,
    #ffd66f 28%,
    #e49b19 70%,
    #9c5d08 100%
  );
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.85),
    0 0 8px rgba(255, 184, 49, 0.95);
}

.jaw-top .tooth.active.surface-biting::after {
  bottom: 4px;
}

.jaw-bottom .tooth.active.surface-biting::after {
  top: 4px;
}

.tooth.done {
  filter: saturate(0.12) brightness(0.68);
  opacity: 0.5;
}

.tooth.active.done {
  filter: none;
  opacity: 1;
}

.progress-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 108px;
  height: 108px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
}

.progress-ring {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}
.ring-track,
.ring-value {
  fill: none;
  stroke-width: 5;
}
.ring-track {
  stroke: rgba(122, 179, 190, 0.15);
}
.ring-value {
  stroke: var(--surface-color);
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  filter: drop-shadow(
    0 0 5px color-mix(in srgb, var(--surface-color) 72%, transparent)
  );
  transition:
    stroke-dashoffset 250ms linear,
    stroke 200ms ease;
}

.progress-copy {
  display: grid;
  text-align: center;
  gap: 1px;
}
.progress-copy strong {
  font-size: 26px;
  letter-spacing: -0.06em;
}
.progress-copy span {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.smart-brush {
  --brush-x: 50%;
  --brush-y: 18%;
  --brush-rotate: -28deg;
  position: absolute;
  left: var(--brush-x);
  top: var(--brush-y);
  width: 108px;
  height: 26px;
  transform: translate(-50%, -50%) rotate(var(--brush-rotate));
  transform-origin: 20% 50%;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.32));
  transition:
    left 550ms cubic-bezier(0.22, 1, 0.36, 1),
    top 550ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 550ms cubic-bezier(0.22, 1, 0.36, 1);
}

.smart-brush.brushing {
  animation: brushScrub 0.26s ease-in-out infinite alternate;
}

.smart-brush.pointer-controlled {
  transition: none;
}

.bristles {
  position: absolute;
  left: 0;
  top: 2px;
  width: 21px;
  height: 22px;
  border-radius: 5px 2px 2px 5px;
  background: repeating-linear-gradient(
    90deg,
    #dafffb 0 2px,
    var(--surface-color, var(--cyan)) 2px 3px
  );
  box-shadow: 0 0 12px color-mix(in srgb, var(--surface-color) 65%, transparent);
}

.brush-neck {
  position: absolute;
  left: 18px;
  top: 9px;
  width: 27px;
  height: 8px;
  border-radius: 5px;
  background: #d7f4f2;
}

.brush-handle {
  position: absolute;
  left: 39px;
  top: 4px;
  width: 69px;
  height: 18px;
  border-radius: 10px 15px 15px 10px;
  background: linear-gradient(180deg, #f3ffff, #a4d7d6);
  box-shadow: inset 0 -3px 4px rgba(28, 88, 92, 0.15);
}

.brush-handle i {
  position: absolute;
  right: 11px;
  top: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--surface-color, var(--cyan-strong));
  box-shadow: 0 0 8px var(--surface-color, var(--cyan));
}

.zone-alert {
  position: relative;
  z-index: 8;
  width: min(420px, calc(100% - 30px));
  min-height: 52px;
  margin: 0 auto 8px;
  padding: 11px 14px;
  transform: translateY(-6px);
  display: grid;
  place-content: center;
  gap: 2px;
  text-align: center;
  border: 1px solid rgba(255, 111, 117, 0.5);
  border-radius: 13px;
  background: rgba(56, 20, 27, 0.93);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}

.zone-alert.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.zone-alert strong {
  color: #ff969b;
  font-size: 12px;
}
.zone-alert span {
  color: #d9a2a7;
  font-size: 9px;
}
.mouth-stage.is-wrong .ring-value {
  stroke: var(--coral);
}

.mouth-stage.tracking-target .tooth.active {
  filter: brightness(1.22);
  box-shadow:
    0 0 25px color-mix(in srgb, var(--surface-color) 90%, transparent),
    inset 0 2px 5px white;
}

.mouse-hint {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 12px;
  padding: 7px 11px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  border: 1px solid rgba(93, 246, 230, 0.18);
  border-radius: 999px;
  color: #a5c5ce;
  background: rgba(5, 24, 36, 0.82);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.025em;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.mouse-hint span {
  color: var(--surface-color);
  font-size: 13px;
}
.mouse-hint.hidden {
  opacity: 0;
  transform: translate(-50%, 8px);
}

.instruction {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(95, 246, 230, 0.04);
}

.instruction-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--ink) !important;
  border-radius: 10px;
  background: var(--surface-color, var(--cyan));
  font-size: 17px !important;
}

.instruction > div {
  display: grid;
  gap: 3px;
}
.instruction strong {
  font-size: 13px;
}

.pressure-panel {
  margin-top: 13px;
}
.pressure-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pressure-heading strong {
  color: var(--cyan);
  font-size: 11px;
}
.pressure-track {
  position: relative;
  height: 7px;
  margin-top: 8px;
  overflow: visible;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    #4e7eff 0 32%,
    var(--cyan) 32% 69%,
    #ff797f 69%
  );
  opacity: 0.85;
}

.pressure-fill {
  display: block;
  height: 100%;
  width: 48%;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.18);
}
.pressure-marker {
  position: absolute;
  left: 48%;
  top: 50%;
  width: 13px;
  height: 13px;
  transform: translate(-50%, -50%);
  border: 3px solid #0b2232;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.45);
  transition: left 400ms ease;
}

.pressure-scale {
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
  color: #6c8796;
  font-size: 8px;
}

.session-actions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 42px;
  gap: 8px;
}

.primary-action,
.secondary-action,
.gallery-toggle {
  min-height: 42px;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 750;
  transition:
    transform 180ms ease,
    filter 180ms ease,
    border-color 180ms ease;
}

.primary-action {
  border: 0;
  color: #032828;
  background: linear-gradient(135deg, var(--cyan), #3ed5ff);
  box-shadow: 0 9px 28px rgba(0, 217, 197, 0.18);
}

.secondary-action,
.gallery-toggle {
  border: 1px solid var(--line);
  color: #bad0d8;
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
}

.primary-action:hover,
.secondary-action:hover,
.gallery-toggle:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.secondary-action:hover,
.gallery-toggle:hover {
  border-color: rgba(93, 246, 230, 0.42);
}
.play-icon {
  margin-right: 5px;
  font-size: 10px;
}
.reset-action {
  width: 42px;
  border-radius: 13px;
  color: var(--muted);
  font-size: 18px;
}

.result-card {
  position: absolute;
  z-index: 20;
  inset: 12px;
  padding: 48px 34px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(93, 246, 230, 0.25);
  border-radius: 26px;
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(93, 246, 230, 0.18),
      transparent 32%
    ),
    rgba(5, 23, 35, 0.98);
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  transition: 300ms ease;
}

.result-card.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.result-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--muted);
}
.result-spark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--ink);
  background: var(--cyan);
  font-size: 25px;
  box-shadow: 0 0 40px rgba(93, 246, 230, 0.32);
}
.result-card > p:first-of-type {
  margin: 21px 0 5px;
  color: var(--cyan);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.16em;
}
.result-card > strong {
  font-size: 75px;
  line-height: 1;
  letter-spacing: -0.08em;
}
.result-card > strong small {
  font-size: 27px;
  color: var(--cyan);
}
.result-card h2 {
  margin: 8px 0 26px;
  font-size: 25px;
}
.result-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.result-stats span {
  padding: 12px 5px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.result-stats b {
  color: var(--paper);
  font-size: 14px;
  text-transform: none;
}
.result-tip {
  max-width: 360px;
  margin: 24px 0 !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  line-height: 1.6;
}
.result-card .primary-action {
  width: 210px;
}

.zone-section,
.storyboard-section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 86px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 34px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.055em;
}
.section-heading > p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.zone-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.zone-card {
  --zone-color: var(--cyan);
  position: relative;
  min-height: 148px;
  padding: 20px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.026);
  cursor: pointer;
  transition: 220ms ease;
}

.zone-card.surface-inner {
  --zone-color: #b987ff;
}

.zone-card.surface-outer {
  --zone-color: var(--cyan);
}

.zone-card.surface-biting {
  --zone-color: #ffc857;
}

.zone-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--zone-color);
  opacity: 0.62;
}

.zone-card::after {
  content: "";
  position: absolute;
  right: -45px;
  bottom: -55px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.04;
  filter: blur(6px);
}

.zone-card:hover,
.zone-card.active {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--zone-color) 55%, transparent);
  background: color-mix(in srgb, var(--zone-color) 7%, transparent);
}
.zone-card.active {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--zone-color) 18%, transparent),
    0 18px 35px rgba(0, 0, 0, 0.18);
}
.zone-index {
  color: var(--zone-color);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
}
.zone-card strong {
  display: block;
  margin-top: 31px;
  font-size: 15px;
}
.zone-card small {
  display: inline-flex;
  margin-top: 8px;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--zone-color) 30%, transparent);
  border-radius: 999px;
  color: var(--zone-color);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.zone-check {
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--zone-color);
  opacity: 0;
}
.zone-card.done .zone-check {
  opacity: 1;
}

.compact-heading {
  align-items: center;
}
.gallery-toggle {
  padding: 0 17px;
}

.story-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  max-height: 290px;
  overflow: hidden;
  transition: max-height 500ms ease;
}

.story-strip.expanded {
  max-height: 1900px;
}

.story-frame {
  position: relative;
  aspect-ratio: 0.51;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0b1822;
  cursor: zoom-in;
  transition: 180ms ease;
}

.story-frame:hover {
  transform: translateY(-3px);
  border-color: rgba(93, 246, 230, 0.46);
}
.story-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.story-frame span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 6px;
  color: white;
  background: rgba(3, 16, 24, 0.78);
  font-size: 9px;
}

.lightbox {
  width: min(420px, calc(100% - 30px));
  padding: 0;
  border: 1px solid rgba(93, 246, 230, 0.3);
  border-radius: 22px;
  color: var(--paper);
  background: #071722;
  box-shadow: 0 30px 100px black;
}

.lightbox::backdrop {
  background: rgba(1, 10, 16, 0.84);
  backdrop-filter: blur(8px);
}
.lightbox img {
  width: 100%;
  max-height: 78vh;
  display: block;
  object-fit: contain;
  background: #06111a;
}
.lightbox p {
  margin: 0;
  padding: 13px 18px 17px;
  color: var(--muted);
  font-size: 12px;
}
.lightbox button {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: rgba(5, 16, 25, 0.78);
  cursor: pointer;
}

@keyframes brushScrub {
  from {
    translate: -3px 0;
  }
  to {
    translate: 3px 0;
  }
}
@keyframes rewardFlight {
  0% {
    opacity: 0;
    transform: translate(0, 5px) rotate(0) scale(0.45);
  }
  16% {
    opacity: 1;
    transform: translate(calc(var(--reward-drift) * 0.25), -12px)
      rotate(0.12turn) scale(1.12);
  }
  72% {
    opacity: 1;
    transform: translate(var(--reward-drift), var(--reward-lift))
      rotate(var(--reward-spin)) scale(0.95);
  }
  100% {
    opacity: 0;
    transform: translate(var(--reward-target-x), var(--reward-target-y))
      rotate(var(--reward-spin)) scale(0.32);
  }
}
@keyframes antiqueCoinTurn {
  0% {
    transform: perspective(90px) rotateX(8deg) rotateY(0deg);
  }
  50% {
    filter: brightness(0.72) saturate(1.15);
  }
  100% {
    transform: perspective(90px) rotateX(8deg) rotateY(360deg);
  }
}
@keyframes diamondFacetTurn {
  0% {
    transform: perspective(80px) rotateX(-18deg) rotateY(0deg) rotateZ(-6deg);
  }
  50% {
    transform: perspective(80px) rotateX(14deg) rotateY(180deg) rotateZ(7deg);
    filter: brightness(1.32) saturate(1.15);
  }
  100% {
    transform: perspective(80px) rotateX(-18deg) rotateY(360deg) rotateZ(-6deg);
  }
}
@keyframes rewardToast {
  0% {
    opacity: 0;
    transform: translate(-50%, -38%) scale(0.84);
  }
  18%,
  68% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -75%) scale(0.96);
  }
}
@keyframes bankCollect {
  50% {
    transform: translateY(-2px) scale(1.12);
    filter: brightness(1.25);
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  .hero-copy {
    text-align: center;
  }
  .hero-copy h1,
  .hero-intro {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-metrics {
    justify-content: center;
  }
  .coach-card {
    width: min(590px, 100%);
    margin: 0 auto;
  }
  .zone-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .story-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .site-header,
  .hero,
  .zone-section,
  .storyboard-section {
    width: min(100% - 24px, 1180px);
  }
  .site-header {
    height: 70px;
  }
  .header-status {
    font-size: 0;
  }
  .hero {
    padding: 50px 0 65px;
  }
  .hero-copy h1 {
    font-size: 54px;
  }
  .hero-intro {
    font-size: 15px;
  }
  .hero-metrics {
    gap: 20px;
  }
  .coach-card {
    padding: 15px;
    border-radius: 25px;
  }
  .mouth-stage {
    height: 300px;
  }
  .session-actions {
    grid-template-columns: 1fr 42px;
  }
  .secondary-action {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 18px;
  }
  .zone-section,
  .storyboard-section {
    padding: 65px 0;
  }
  .zone-list {
    grid-template-columns: 1fr;
  }
  .zone-card {
    min-height: 120px;
  }
  .zone-card strong {
    margin-top: 18px;
  }
  .story-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 420px;
  }
  .story-strip.expanded {
    max-height: 3300px;
  }
  .result-stats {
    grid-template-columns: 1fr;
  }
  .result-card {
    justify-content: start;
    overflow-y: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Mobile-first game shell — Čuvari osmijeha */
body {
  min-height: 100dvh;
  overscroll-behavior-y: none;
  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(31, 226, 206, 0.2),
      transparent 36%
    ),
    #06111d;
}

.page-shell {
  min-height: 100dvh;
}

.hero {
  width: 100%;
  min-height: 100dvh;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  place-items: start center;
}

.coach-card {
  width: min(100%, 460px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 16px
    max(12px, env(safe-area-inset-bottom));
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(
      circle at 50% 25%,
      rgba(29, 199, 188, 0.08),
      transparent 34%
    ),
    linear-gradient(180deg, #0b2131 0%, #071723 57%, #06121d 100%);
  box-shadow: none;
}

.coach-card::before {
  display: none;
}

.app-header {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  min-height: 46px;
}

.app-header > div {
  text-align: center;
}

.app-header strong {
  font-size: 15px;
}

.app-kicker {
  color: var(--cyan);
}

.icon-button,
.reset-action {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  -webkit-tap-highlight-color: transparent;
}

.status-strip {
  min-height: 54px;
  margin-top: 10px;
  padding: 8px 0;
  display: grid;
  grid-template-columns: 0.8fr 1fr 1.25fr;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.status-item,
.combo-status > div {
  display: grid;
  gap: 2px;
}

.status-item > span,
.combo-status span:not(.combo-flame),
.mission-progress > span,
.combo-card > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.status-item strong,
.combo-status strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.combo-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.combo-status small {
  color: #ffbd6a;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

#multiplierValue {
  color: #ffd374;
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 0 14px rgba(255, 168, 70, 0.5);
}

.combo-flame {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffefaa;
  background: linear-gradient(145deg, #ffbf47, #ff6d59);
  box-shadow: 0 0 18px rgba(255, 147, 65, 0.24);
  font-size: 11px;
  transform: rotate(45deg) scale(0.72);
}

.combo-flame::first-letter {
  transform: rotate(-45deg);
}

.reward-bank {
  position: static;
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.reward-bank > span {
  min-width: 46px;
  height: 30px;
  padding-right: 9px;
  font-size: 11px;
}

.mission-progress {
  height: 28px;
  display: grid;
  grid-template-columns: auto 1fr 34px;
  align-items: center;
  gap: 8px;
}

.mission-progress strong {
  color: var(--cyan);
  text-align: right;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.mission-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(141, 168, 182, 0.16);
}

.mission-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), #5d93ff);
  box-shadow: 0 0 10px rgba(93, 246, 230, 0.45);
  transition: width 250ms linear;
}

.mouth-stage {
  height: clamp(314px, 38dvh, 340px);
  margin: 0;
  border: 1px solid rgba(104, 228, 219, 0.1);
  border-radius: 25px;
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(93, 246, 230, 0.11),
      transparent 33%
    ),
    linear-gradient(180deg, rgba(7, 27, 41, 0.82), rgba(4, 18, 29, 0.46));
  cursor: grab;
}

.technique-cue {
  position: absolute;
  z-index: 16;
  top: 12px;
  right: 12px;
  min-height: 26px;
  padding: 4px 7px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(93, 246, 230, 0.22);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(5, 24, 36, 0.82);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  transition: 180ms ease;
}

.technique-cue > b {
  font-size: 8px;
  font-weight: 850;
  white-space: nowrap;
}

.technique-cue .combo-pips {
  gap: 2px;
}

.technique-cue .combo-pips i {
  width: 7px;
  height: 7px;
}

.mouth-stage:active {
  cursor: grabbing;
}

.mouth-stage.combo-hot {
  border-color: rgba(255, 176, 73, 0.32);
  box-shadow:
    inset 0 0 34px rgba(255, 127, 65, 0.08),
    0 0 24px rgba(255, 131, 58, 0.08);
  animation: comboStagePulse 1.8s ease-in-out infinite;
}

.mouth-stage.combo-max {
  border-color: rgba(255, 217, 91, 0.58);
  box-shadow:
    inset 0 0 45px rgba(255, 129, 44, 0.15),
    0 0 30px rgba(255, 196, 58, 0.18);
}

.rush-label {
  position: absolute;
  z-index: 16;
  top: 14px;
  left: 14px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 197, 92, 0.35);
  border-radius: 999px;
  color: #ffe09a;
  background: rgba(70, 31, 11, 0.78);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
  opacity: 0;
  transform: translateY(-5px) scale(0.9);
  transition: 220ms ease;
  pointer-events: none;
}

.combo-hot .rush-label {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.score-pop {
  position: absolute;
  z-index: 19;
  translate: -50% -50%;
  min-height: 28px;
  padding: 5px 9px 5px 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 224, 121, 0.72);
  border-radius: 999px;
  color: #fff3b4;
  background: rgba(66, 39, 5, 0.9);
  box-shadow: 0 0 18px rgba(255, 188, 53, 0.34);
  font-size: 13px;
  font-weight: 950;
  text-shadow:
    0 2px 2px rgba(0, 0, 0, 0.7),
    0 0 12px rgba(255, 192, 65, 0.8);
  white-space: nowrap;
  pointer-events: none;
  animation: scorePop 1100ms cubic-bezier(0.2, 0.85, 0.25, 1) forwards;
}

.score-pop::before {
  content: "✦";
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #ffe59a;
  border-radius: 50%;
  color: #714207;
  background: radial-gradient(circle at 35% 28%, #fff8cc, #e6a72f 48%, #92520a 76%);
  box-shadow: 0 0 8px rgba(255, 196, 57, 0.72);
  font-size: 8px;
}

.mouth-stage.surface-biting::after {
  display: none;
}

.jaw-top {
  top: calc(50% - 29px);
}

/* The player/game navigation replaces the tall branded header on this screen. */
.app-header {
  display: none;
}

.jaw-bottom {
  bottom: calc(50% - 53px);
}

.reward-toast {
  top: 52px;
  font-size: 10px;
}

.instruction {
  min-height: 56px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  border-radius: 16px;
}

.instruction strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.zone-pill {
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--surface-color) 35%, transparent);
  border-radius: 999px;
  color: var(--surface-color) !important;
  background: color-mix(in srgb, var(--surface-color) 8%, transparent);
  font-size: 8px !important;
  white-space: nowrap;
}

.quality-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
  align-items: stretch;
}

.pressure-panel {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.pressure-track {
  height: 6px;
  margin-top: 7px;
}

.combo-card {
  padding: 8px 10px;
  display: grid;
  align-content: center;
  gap: 9px;
  border: 1px solid rgba(121, 216, 255, 0.17);
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(71, 129, 255, 0.08),
    rgba(147, 96, 255, 0.06)
  );
}

.combo-card > span {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.combo-card > span b {
  color: #aeefff;
  font-size: 8px;
}

.combo-pips {
  display: flex;
  gap: 5px;
}

.combo-pips i {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(121, 216, 255, 0.32);
  border-radius: 4px;
  background: rgba(121, 216, 255, 0.06);
  transform: rotate(45deg) scale(0.72);
  transition: 180ms ease;
}

.combo-pips i.filled {
  border-color: #bdf8ff;
  background: linear-gradient(135deg, #dfffff, #5fc8ff 55%, #8174ff);
  box-shadow: 0 0 9px rgba(95, 207, 255, 0.65);
  transform: rotate(45deg) scale(0.88);
}

.combo-card.rewarded {
  animation: bankCollect 360ms cubic-bezier(0.2, 1.6, 0.4, 1);
}

.coach-card.multiplier-active .combo-flame {
  animation: multiplierFlame 900ms ease-in-out infinite alternate;
}

.coach-card.multiplier-active .primary-action {
  box-shadow:
    0 10px 30px rgba(0, 217, 197, 0.24),
    0 0 24px rgba(255, 158, 65, 0.08);
}

@keyframes scorePop {
  0% {
    opacity: 0;
    transform: translateY(5px) scale(0.75);
  }
  18% {
    opacity: 1;
    transform: translateY(-6px) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translateY(-50px) scale(0.92);
  }
}

@keyframes diamondCelebrationFade {
  0% {
    opacity: 0;
  }
  12%,
  72% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.diamond-celebration.visible .diamond-gem {
  animation: diamondReveal 1600ms cubic-bezier(0.2, 0.85, 0.24, 1) forwards;
}

.diamond-celebration.visible .diamond-aura {
  animation: diamondAura 1600ms ease-out forwards;
}

.diamond-celebration.visible .diamond-spark {
  animation: diamondSpark 1050ms ease-out var(--spark-delay) forwards;
}

@keyframes diamondReveal {
  0% {
    opacity: 0;
    transform: rotate(-18deg) scale(0.16);
  }
  28% {
    opacity: 1;
    transform: rotate(5deg) scale(1.16);
  }
  48%,
  75% {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(8deg) scale(0.82);
  }
}

@keyframes diamondAura {
  0% {
    opacity: 0;
    transform: scale(0.28) rotate(-25deg);
  }
  35% {
    opacity: 0.9;
    transform: scale(1) rotate(12deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.45) rotate(32deg);
  }
}

@keyframes diamondSpark {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0) scale(0.2);
  }
  30% {
    opacity: 1;
    transform: translate(calc(var(--spark-x) * 0.58), calc(var(--spark-y) * 0.58))
      rotate(35deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--spark-x), var(--spark-y)) rotate(90deg) scale(0.25);
  }
}

@media (prefers-reduced-motion: reduce) {
  .diamond-celebration.visible {
    opacity: 1;
    visibility: visible;
    animation: none !important;
  }

  .diamond-celebration.visible .diamond-gem,
  .diamond-celebration.visible .diamond-aura {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .diamond-celebration.visible .diamond-spark {
    display: none;
  }
}

@keyframes comboStagePulse {
  50% {
    filter: brightness(1.06);
  }
}

@keyframes multiplierFlame {
  to {
    filter: brightness(1.25) drop-shadow(0 0 9px rgba(255, 164, 66, 0.7));
    transform: rotate(45deg) scale(0.82);
  }
}

.session-actions {
  margin-top: 10px;
  grid-template-columns: 1fr 44px;
  gap: 8px;
}

.primary-action,
.reset-action {
  min-height: 48px;
}

.primary-action {
  border-radius: 15px;
}

.secondary-action {
  display: none;
}

.reward-rule {
  margin: 9px 2px 0;
  color: #7893a0;
  text-align: center;
  font-size: 9px;
  line-height: 1.35;
}

.reward-rule span {
  color: #f3c85b;
}

.reward-rule b {
  margin: 0 4px;
  color: rgba(141, 168, 182, 0.35);
}

.zone-alert {
  min-width: 0;
}

.result-card {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: max(56px, env(safe-area-inset-top)) 24px
    max(28px, env(safe-area-inset-bottom));
  border: 0;
  border-radius: 0;
}

.result-card .primary-action {
  width: min(100%, 320px);
  margin-top: 6px;
}

.zone-section {
  width: min(920px, calc(100% - 40px));
  padding: 72px 0;
}

.zone-card:disabled {
  cursor: default;
}

@media (min-width: 700px) {
  .hero {
    padding: 40px 0;
  }

  .coach-card {
    min-height: 820px;
    border: 1px solid rgba(126, 248, 239, 0.15);
    border-radius: 38px;
    box-shadow: 0 38px 90px rgba(0, 0, 0, 0.42);
  }

  .result-card {
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(93, 246, 230, 0.25);
    border-radius: 28px;
  }
}

@media (max-width: 699px) {
  .zone-section {
    display: none;
  }

  .mouth-stage {
    height: clamp(340px, calc(100dvh - 172px), 560px);
  }

  .zone-alert:not(.visible) {
    display: none;
  }
}

@media (max-height: 730px) and (max-width: 699px) {
  .coach-card {
    padding-top: max(8px, env(safe-area-inset-top));
  }

  .app-header {
    min-height: 40px;
  }

  .app-header strong {
    font-size: 13px;
  }

  .status-strip {
    min-height: 48px;
    margin-top: 5px;
  }

  .mouth-stage {
    height: clamp(340px, calc(100dvh - 172px), 480px);
  }
}

@media (max-width: 350px) {
  .coach-card {
    padding-inline: 10px;
  }

  .reward-bank > span {
    min-width: 41px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .mouse-hint {
    display: none;
  }
}
