:root {
  color-scheme: light;
  --ink: #1d2a2a;
  --muted: #5d6d68;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --line: rgba(42, 67, 62, 0.18);
  --green: #378b4f;
  --green-dark: #1f6438;
  --amber: #d99a2b;
  --rose: #d9576b;
  --sky: #bfe8f5;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #e8f5ee;
}

.profile-menu {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
}

.profile-button {
  width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  border-radius: 50%;
  color: #172322;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

.profile-panel {
  position: absolute;
  top: 62px;
  right: 0;
  width: 230px;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(42, 67, 62, 0.16);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.profile-panel label {
  font-weight: 850;
}

.profile-panel select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
  font-weight: 750;
  color: var(--ink);
  background: #ffffff;
}

.profile-panel button {
  justify-content: center;
  width: 100%;
}

.calibration-status {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
}

.hidden {
  display: none !important;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--panel-strong);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 100, 56, 0.45);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.selection-screen,
.diver-screen {
  min-height: 100vh;
}

.selection-screen {
  display: grid;
  place-items: center;
  padding: 86px 24px 24px;
  background:
    linear-gradient(rgba(9, 40, 33, 0.16), rgba(9, 40, 33, 0.24)),
    url("./assets/meadow-background.png") center / cover no-repeat;
}

.selection-hero {
  width: min(980px, 100%);
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.34);
}

.selection-hero .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.selection-hero h1 {
  max-width: 760px;
  font-size: clamp(2.1rem, 6vw, 5.4rem);
  line-height: 0.96;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.mode-card {
  position: relative;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  color: #ffffff;
  text-align: left;
  background: rgba(16, 45, 40, 0.6);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.mode-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.52));
}

.meadow-card {
  background:
    linear-gradient(rgba(20, 69, 44, 0.12), rgba(20, 69, 44, 0.38)),
    url("./assets/meadow-background.png") center / cover no-repeat;
}

.diver-card {
  background:
    linear-gradient(rgba(9, 35, 59, 0.08), rgba(9, 35, 59, 0.58)),
    radial-gradient(circle at 50% 18%, #7bd7ea, #0f6f8f 54%, #08324d);
}

.timer-card {
  background:
    linear-gradient(rgba(23, 28, 34, 0.08), rgba(23, 28, 34, 0.62)),
    radial-gradient(circle at 50% 45%, #f45d5d 0 28%, #2fbf71 29% 52%, #14191f 53%);
}

.smiley-card {
  background:
    linear-gradient(rgba(36, 50, 42, 0.1), rgba(36, 50, 42, 0.54)),
    radial-gradient(circle at 28% 35%, #ffd86b 0 12%, transparent 13%),
    radial-gradient(circle at 68% 45%, #75d891 0 13%, transparent 14%),
    linear-gradient(135deg, #7bc7e8, #e9f6dd);
}

.snail-card {
  background:
    linear-gradient(rgba(46, 58, 35, 0.08), rgba(46, 58, 35, 0.58)),
    radial-gradient(circle at 70% 36%, #f7d26a 0 11%, transparent 12%),
    linear-gradient(135deg, #79c877, #d7efbb);
}

.color-card {
  background:
    linear-gradient(rgba(18, 24, 26, 0.12), rgba(18, 24, 26, 0.58)),
    radial-gradient(circle at 28% 26%, #ffffff 0 10%, transparent 11%),
    linear-gradient(135deg, #3fb85f, #318fc4 35%, #c99424 68%, #c84b78);
}

.mode-card span,
.mode-card strong {
  position: relative;
  z-index: 1;
}

.mode-card span {
  font-size: clamp(1.8rem, 4vw, 3.3rem);
  font-weight: 900;
  line-height: 1;
}

.mode-card strong {
  max-width: 360px;
  margin-top: 12px;
  font-size: 1rem;
  line-height: 1.35;
}

.axes-card {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.22)),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 17%, rgba(0, 0, 0, 0.14) 17% 18%, rgba(0, 0, 0, 0) 18% 34%, rgba(0, 0, 0, 0.14) 34% 35%, rgba(0, 0, 0, 0) 35% 51%, rgba(0, 0, 0, 0.14) 51% 52%, rgba(0, 0, 0, 0) 52% 68%, rgba(0, 0, 0, 0.14) 68% 69%, rgba(0, 0, 0, 0) 69% 85%, rgba(0, 0, 0, 0.14) 85% 86%, rgba(0, 0, 0, 0) 86% 100%),
    linear-gradient(135deg, #f7f7f0, #22282e 50%, #f7f7f0);
}

.back-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
}

.fullscreen-button {
  position: absolute;
  top: 18px;
  right: 118px;
  z-index: 4;
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
}

.back-button.dark {
  color: #ffffff;
  background: rgba(8, 26, 43, 0.45);
}

.fullscreen-button.dark {
  color: #ffffff;
  background: rgba(8, 26, 43, 0.45);
}

.presentation-mode {
  grid-template-columns: 1fr !important;
  grid-template-rows: 100vh !important;
}

.presentation-mode .control-panel {
  display: none;
}

.presentation-mode .stage,
.presentation-mode .diver-stage,
.presentation-mode .timer-stage,
.presentation-mode .smiley-stage,
.presentation-mode .snail-stage,
.presentation-mode .color-stage,
.presentation-mode .mandala-stage,
.presentation-mode .axes-stage,
.presentation-mode canvas {
  min-height: 100vh !important;
}

.presentation-mode .back-button {
  display: none;
}

.color-screen.presentation-mode .back-button {
  display: block;
  right: 118px;
}

.color-screen.presentation-mode .fullscreen-button {
  opacity: 1;
}

.mandala-screen.presentation-mode .back-button {
  display: block;
  right: 118px;
}

.mandala-screen.presentation-mode .fullscreen-button {
  opacity: 1;
}

.axes-screen.presentation-mode .back-button {
  display: block;
  right: 118px;
}

.axes-screen.presentation-mode .fullscreen-button {
  opacity: 1;
}

.presentation-mode .fullscreen-button {
  right: 18px;
  opacity: 0.38;
}

.presentation-mode .fullscreen-button:hover {
  opacity: 1;
}

.diver-screen {
  min-height: 100vh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  color: #ffffff;
  background: #073654;
}

.diver-stage {
  position: relative;
  min-height: 62vh;
  overflow: hidden;
}

#diverCanvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 62vh;
}

.diver-hud {
  position: absolute;
  top: 24px;
  left: 24px;
  width: min(430px, calc(100% - 48px));
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(6, 31, 53, 0.48);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.diver-hud .eyebrow,
.diver-hud .feedback {
  color: rgba(255, 255, 255, 0.76);
}

.star-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 5px;
  margin-top: 14px;
  color: #ffd76a;
  font-size: clamp(1.05rem, 2.6vw, 1.85rem);
  font-weight: 900;
  letter-spacing: 2px;
}

.diver-controls {
  color: var(--ink);
  border-top-color: rgba(10, 40, 54, 0.18);
  background: rgba(244, 251, 252, 0.96);
}

.diver-controls .readout {
  border-color: rgba(10, 40, 54, 0.16);
  background: rgba(255, 255, 255, 0.82);
}

.diver-controls .slider {
  accent-color: #70d6ff;
}

.diver-controls .range-label label,
.diver-controls .scale-row,
.diver-controls .readout span {
  color: var(--muted);
}

.diver-meter {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(10, 40, 54, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.timer-screen,
.smiley-screen,
.snail-screen,
.color-screen,
.mandala-screen,
.axes-screen {
  min-height: 100vh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.timer-stage,
.smiley-stage,
.snail-stage,
.color-stage,
.mandala-stage,
.axes-stage {
  position: relative;
  min-height: 62vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 28px;
  background: radial-gradient(circle at 50% 35%, #f7faf7, #dfeee8 54%, #bfd9d0);
}

.snail-stage {
  place-items: stretch;
  align-content: center;
  gap: 26px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.1)),
    url("./assets/meadow-background.png") center / cover no-repeat;
}

.axes-stage {
  --axes-bg: #fbfaf4;
  --axes-ink: #1d2021;
  --axes-muted: rgba(29, 32, 33, 0.72);
  --axes-positive: #2f9f4f;
  --axes-negative: #d84e59;
  --axes-grid: rgba(20, 22, 24, 0.11);
  --axes-zero: rgba(18, 20, 22, 0.7);
  background: linear-gradient(180deg, #faf9f2, #eef0e8);
}

.axes-stage.dark-mode {
  --axes-bg: #0d1016;
  --axes-ink: #f4f5ef;
  --axes-muted: rgba(244, 245, 239, 0.74);
  --axes-positive: #78f08f;
  --axes-negative: #ff6d7d;
  --axes-grid: rgba(255, 255, 255, 0.1);
  --axes-zero: rgba(255, 255, 255, 0.72);
  background: linear-gradient(180deg, #0b0d12, #141720);
}

.axes-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.snail-hud {
  width: min(920px, 92vw);
  margin: 42px auto 0;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
}

.snail-track {
  position: relative;
  width: min(1000px, 90vw);
  height: 220px;
  margin: 0 auto;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(141, 94, 48, 0.08), rgba(141, 94, 48, 0.22)),
    #d7b579;
  box-shadow: inset 0 16px 30px rgba(92, 61, 29, 0.18), 0 20px 60px rgba(38, 63, 44, 0.18);
}

.snail-track::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  top: 50%;
  height: 8px;
  border-radius: 999px;
  background: rgba(91, 65, 34, 0.25);
  transform: translateY(-50%);
}

.snail-goal {
  position: absolute;
  right: 28px;
  top: 50%;
  padding: 10px 14px;
  border-radius: 8px;
  color: #ffffff;
  background: #2d7e46;
  font-weight: 900;
  transform: translateY(-50%);
}

.snail-character {
  --snail-x: 0;
  position: absolute;
  left: 7%;
  top: 50%;
  width: 150px;
  height: 90px;
  transform: translate(calc(var(--snail-x) * min(720px, 70vw)), -50%) scaleX(-1);
  transition: transform 700ms ease;
}

.snail-character.retreating {
  transform: translate(calc(var(--snail-x) * min(720px, 70vw)), -50%) scaleX(1);
}

.snail-body {
  position: absolute;
  left: 8px;
  bottom: 16px;
  width: 120px;
  height: 32px;
  border-radius: 999px;
  background: #b9a26b;
}

.snail-shell {
  position: absolute;
  left: 42px;
  bottom: 30px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 45% 48%, #f0c37a 0 12%, #9f6740 13% 24%, #d39451 25% 42%, #7d4f36 43% 58%, #c17d45 59%);
  box-shadow: 0 8px 16px rgba(61, 40, 24, 0.18);
}

.snail-eye {
  position: absolute;
  bottom: 44px;
  width: 24px;
  height: 38px;
  border-left: 3px solid #8d7b55;
}

.snail-eye::after {
  content: "";
  position: absolute;
  top: -7px;
  left: -8px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #22312b;
}

.snail-eye.left {
  left: 12px;
  transform: rotate(-12deg);
}

.snail-eye.right {
  left: 38px;
  transform: rotate(10deg);
}

.snail-meter {
  width: min(560px, 90vw);
  margin: 0 auto 26px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.color-stage {
  --chosen-color: #3fb85f;
  --color-brightness: 0.28;
  --color-darkness: 0.42;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 42px 28px 34px;
  color: #10211d;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 255, 255, calc(0.18 + var(--color-brightness) * 0.64)), transparent 0 32%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, color-mix(in srgb, var(--chosen-color) calc(44% + var(--color-brightness) * 42%), #ffffff), color-mix(in srgb, var(--chosen-color) calc(64% - var(--color-darkness) * 12%), #000000 calc(var(--color-darkness) * 72%)));
  transition: background 420ms ease, color 420ms ease;
}

.color-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, calc(var(--color-darkness) * 0.58));
  transition: background 420ms ease;
}

.color-glow {
  position: absolute;
  inset: 12%;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--chosen-color) 72%, #ffffff) 0, transparent 64%);
  filter: blur(28px);
  opacity: calc(0.14 + var(--color-brightness) * 0.42);
  transform: scale(calc(0.84 + var(--color-brightness) * 0.28));
  transition: opacity 420ms ease, transform 420ms ease;
}

.color-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 92vw);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 22px 80px rgba(15, 28, 24, 0.22);
  backdrop-filter: blur(12px);
}

.color-screen.presentation-mode .color-panel {
  position: absolute;
  top: 18px;
  left: 18px;
  width: auto;
  min-width: 220px;
  justify-items: start;
  gap: 4px;
  padding: 12px 16px;
  text-align: left;
  background: rgba(255, 255, 255, 0.38);
}

.color-screen.presentation-mode .color-panel .eyebrow,
.color-screen.presentation-mode .color-panel h1,
.color-screen.presentation-mode .color-panel p:not(.eyebrow),
.color-screen.presentation-mode .color-meter {
  display: none;
}

.color-screen.presentation-mode .color-panel .timer {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
}

.color-screen.presentation-mode .color-score {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
}

.color-screen.presentation-mode .edge-volume-meter {
  bottom: 18px;
  left: 18px;
  right: 18px;
  height: 18px;
  border-radius: 999px;
}

.color-panel h1 {
  font-size: clamp(2.2rem, 6vw, 5.6rem);
}

.color-panel .timer {
  margin-top: 4px;
}

.color-panel p:not(.eyebrow) {
  max-width: 540px;
  margin: 0;
  color: #20342f;
  font-weight: 800;
}

.color-score {
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 950;
  line-height: 0.95;
}

.color-score small {
  color: var(--muted);
  font-size: 0.28em;
}

.color-meter {
  position: relative;
  z-index: 1;
  width: min(920px, 92vw);
  margin: 26px auto 0;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.edge-volume-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.edge-threshold {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  border-radius: 999px;
  background: rgba(23, 35, 34, 0.92);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.58);
  transform: translateX(-50%);
  pointer-events: none;
}

.edge-volume-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), color-mix(in srgb, var(--chosen-color) 62%, #ffffff));
  transition: width 160ms ease;
}

.color-palette {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.color-swatch {
  min-height: 42px;
  padding: 0;
  border-radius: 8px;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.color-swatch.active {
  border-color: rgba(23, 35, 34, 0.82);
  box-shadow: 0 0 0 3px rgba(23, 35, 34, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.56);
  transform: translateY(-1px);
}

.mandala-card {
  background:
    linear-gradient(rgba(18, 14, 24, 0.08), rgba(18, 14, 24, 0.64)),
    url("./assets/mandala-photoreal.png") center / cover no-repeat;
}

.mandala-stage {
  --mandala-scale: 0.12;
  --mandala-rotation: 0deg;
  --mandala-glow: 0.72;
  grid-template-rows: 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 42px 28px 34px;
  color: #f4e9d8;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 216, 139, calc(0.18 + var(--mandala-glow) * 0.2)), transparent 0 28%, transparent 52%),
    radial-gradient(circle at 50% 50%, rgba(111, 58, 111, 0.3), transparent 0 44%, rgba(0, 0, 0, 0.28) 76%),
    linear-gradient(180deg, #19131b, #0e0d12 62%, #060608);
  isolation: isolate;
  transition: background 420ms ease, color 420ms ease;
}

.mandala-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 230, 166, 0.4), transparent 0 18%, transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(255, 121, 184, 0.24), transparent 0 28%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(104, 214, 255, 0.2), transparent 0 35%, transparent 48%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.14), transparent 0 52%, rgba(0, 0, 0, 0.12) 82%);
  filter: blur(18px);
  mix-blend-mode: screen;
}

.mandala-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 205, 115, calc(0.24 + var(--mandala-glow) * 0.3)), transparent 0 24%, transparent 34%),
    radial-gradient(circle at 50% 48%, rgba(255, 135, 193, calc(0.08 + var(--mandala-glow) * 0.12)), transparent 0 32%, transparent 46%),
    radial-gradient(circle at 50% 48%, rgba(0, 0, 0, 0.02), transparent 44%, rgba(0, 0, 0, 0.2) 74%, rgba(0, 0, 0, 0.38) 100%);
}

.mandala-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(248, 228, 187, 0.12), transparent 34%),
    radial-gradient(circle at 50% 50%, rgba(255, 248, 225, 0.22), transparent 18%, transparent 40%);
  filter: blur(8px);
}

.mandala-halo {
  position: absolute;
  inset: 6%;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 235, 171, calc(0.36 + var(--mandala-glow) * 0.34)) 0, transparent 54%),
    radial-gradient(circle, rgba(255, 120, 191, calc(0.12 + var(--mandala-glow) * 0.14)) 0, transparent 70%);
  filter: blur(44px);
  opacity: calc(0.56 + var(--mandala-glow) * 0.28);
}

.mandala-art {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(116vw, 1420px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(var(--mandala-scale)) rotate(var(--mandala-rotation));
  transition: transform 220ms linear, filter 420ms ease;
  z-index: 0;
  display: block;
  overflow: hidden;
  background: url("./assets/mandala-photoreal.png") center / contain no-repeat;
  box-shadow:
    0 0 36px rgba(255, 232, 175, 0.34),
    0 0 88px rgba(255, 128, 194, 0.18);
  filter: brightness(1.08) contrast(1.06) saturate(1.14) drop-shadow(0 18px 50px rgba(0, 0, 0, 0.42));
}

.mandala-art::before,
.mandala-art::after {
  content: none;
}

.mandala-panel {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 2;
  width: min(320px, calc(100vw - 48px));
  display: grid;
  justify-items: start;
  gap: 6px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(255, 244, 215, 0.22);
  border-radius: 8px;
  text-align: left;
  background: rgba(18, 14, 18, 0.24);
  box-shadow: 0 22px 80px rgba(10, 10, 12, 0.28);
  backdrop-filter: blur(12px);
}

.mandala-panel h1 {
  font-size: clamp(1.25rem, 3.2vw, 2.35rem);
  line-height: 1.02;
}

.mandala-panel .timer {
  margin-top: 4px;
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.mandala-panel p:not(.eyebrow) {
  max-width: 100%;
  margin: 0;
  color: rgba(255, 244, 221, 0.88);
  font-weight: 800;
}

.mandala-score {
  font-size: clamp(2.2rem, 6vw, 4.3rem);
  font-weight: 950;
  line-height: 0.95;
}

.mandala-score small {
  color: rgba(255, 244, 221, 0.75);
  font-size: 0.28em;
}

.mandala-meter {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 2;
  width: min(1060px, 94vw);
  transform: translateX(-50%);
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 248, 233, 0.78);
  box-shadow: 0 18px 42px rgba(10, 10, 12, 0.18);
  backdrop-filter: blur(8px);
}

.mandala-screen .mini-meter strong,
.mandala-screen .vertical-labels,
.mandala-screen .range-label strong,
.mandala-screen .range-label label,
.mandala-screen .eyebrow,
.mandala-screen .label,
.mandala-screen .feedback,
.mandala-screen .scale-row,
.mandala-screen .readout span {
  color: rgba(255, 244, 221, 0.78);
}

.mandala-screen .control-panel {
  color: #f4e9d8;
  background: rgba(22, 16, 22, 0.96);
  border-top-color: rgba(255, 244, 215, 0.12);
}

.mandala-screen .slider {
  accent-color: #d6b56a;
}

.mandala-screen .readout {
  background: rgba(255, 248, 233, 0.12);
  border-color: rgba(255, 244, 215, 0.14);
}

.mandala-screen .primary,
.mandala-screen button.running {
  color: #161112;
  background: linear-gradient(180deg, #ffe9ab, #d3ae59);
  border-color: rgba(255, 233, 171, 0.72);
}

.mandala-screen .controls-row button,
.mandala-screen .extend-row button {
  background: rgba(255, 248, 233, 0.9);
}

.mandala-screen.presentation-mode .mandala-panel {
  position: absolute;
  top: 18px;
  left: 18px;
  width: auto;
  min-width: 220px;
  justify-items: start;
  gap: 4px;
  padding: 12px 16px;
  text-align: left;
  background: rgba(255, 248, 233, 0.35);
  color: #fff4dc;
}

.mandala-screen.presentation-mode .mandala-panel .eyebrow,
.mandala-screen.presentation-mode .mandala-panel h1,
.mandala-screen.presentation-mode .mandala-panel p:not(.eyebrow),
.mandala-screen.presentation-mode .mandala-meter {
  display: none;
}

.mandala-screen.presentation-mode .mandala-panel .timer {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
}

.mandala-screen.presentation-mode .mandala-score {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
}

.mandala-screen.presentation-mode .edge-volume-meter {
  bottom: 10px;
  left: 14px;
  right: 14px;
  height: 20px;
  border-radius: 999px;
}

.mandala-screen .edge-volume-meter span {
  background: linear-gradient(90deg, rgba(255, 244, 221, 0.18), rgba(255, 214, 121, 0.94));
}

.axes-screen .edge-volume-meter span {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(68, 184, 105, 0.92));
}

.axes-panel {
  position: absolute;
  top: 72px;
  left: 24px;
  z-index: 2;
  width: min(300px, calc(100% - 48px));
  display: grid;
  justify-items: start;
  gap: 6px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  text-align: left;
  color: var(--axes-ink);
  background: color-mix(in srgb, var(--axes-bg) 84%, transparent);
  box-shadow: 0 22px 80px rgba(10, 10, 12, 0.26);
  backdrop-filter: blur(12px);
}

.axes-panel h1 {
  font-size: clamp(1.15rem, 3vw, 2.1rem);
  line-height: 1.02;
}

.axes-panel p:not(.eyebrow) {
  max-width: 100%;
  margin: 0;
  color: var(--axes-muted);
  font-weight: 800;
}

.axes-panel .timer {
  margin-top: 6px;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.axes-score {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 950;
  line-height: 0.95;
}

.axes-score small {
  color: var(--axes-muted);
  font-size: 0.28em;
}

.axes-meter {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 2;
  width: min(1060px, 94vw);
  transform: translateX(-50%);
  padding: 14px 16px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--axes-bg) 82%, white);
  box-shadow: 0 18px 42px rgba(10, 10, 12, 0.16);
  backdrop-filter: blur(8px);
}

.axes-theme-row {
  display: grid;
  gap: 10px;
}

.axes-theme-row button {
  align-self: start;
  background: color-mix(in srgb, var(--axes-bg) 86%, white);
}

.axes-screen .mini-meter strong,
.axes-screen .vertical-labels,
.axes-screen .range-label strong,
.axes-screen .range-label label,
.axes-screen .eyebrow,
.axes-screen .label,
.axes-screen .feedback,
.axes-screen .scale-row,
.axes-screen .readout span {
  color: var(--axes-muted);
}

.axes-screen .control-panel {
  color: var(--axes-ink);
  background: color-mix(in srgb, var(--axes-bg) 92%, black);
  border-top-color: rgba(255, 255, 255, 0.08);
}

.axes-screen .slider {
  accent-color: #6d8ef3;
}

.axes-screen .readout {
  background: color-mix(in srgb, var(--axes-bg) 88%, white);
  border-color: rgba(255, 255, 255, 0.12);
}

.axes-screen .primary,
.axes-screen button.running {
  color: #11161d;
  background: linear-gradient(180deg, #f7f7f0, #d9dee5);
  border-color: rgba(255, 255, 255, 0.7);
}

.axes-screen .controls-row button,
.axes-screen .extend-row button,
.axes-screen .axes-theme-row button {
  background: color-mix(in srgb, var(--axes-bg) 90%, white);
}

.axes-screen .edge-volume-meter span {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), rgba(68, 184, 105, 0.92));
}

.axes-screen.presentation-mode .axes-panel {
  position: absolute;
  top: 18px;
  left: 18px;
  width: auto;
  min-width: 220px;
  justify-items: start;
  gap: 4px;
  padding: 12px 16px;
  text-align: left;
  background: color-mix(in srgb, var(--axes-bg) 64%, transparent);
  color: var(--axes-ink);
}

.axes-screen.presentation-mode .axes-panel .eyebrow,
.axes-screen.presentation-mode .axes-panel h1,
.axes-screen.presentation-mode .axes-panel p:not(.eyebrow),
.axes-screen.presentation-mode .axes-meter,
.axes-screen.presentation-mode .axes-theme-row,
.axes-screen.presentation-mode .axes-theme-row button {
  display: none;
}

.axes-screen.presentation-mode .axes-panel .timer {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
}

.axes-screen.presentation-mode .axes-score {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
}

.axes-screen.presentation-mode .edge-volume-meter {
  bottom: 10px;
  left: 14px;
  right: 14px;
  height: 20px;
  border-radius: 999px;
}

.result-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 28, 25, 0.48);
  backdrop-filter: blur(10px);
}

.result-card {
  width: min(620px, 100%);
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.24);
}

.result-face {
  font-size: clamp(4rem, 11vw, 7.5rem);
  line-height: 1;
}

.result-card h2 {
  margin: 6px 0 0;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
}

.result-score {
  margin-top: 16px;
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 950;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.result-score small {
  color: var(--muted);
  font-size: 0.28em;
}

#resultMessage {
  max-width: 520px;
  margin: 20px auto 24px;
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
}

.timer-layout {
  width: min(980px, 92vw);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 210px;
  align-items: center;
  justify-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.circle-timer {
  --progress: 1;
  --calm: 0;
  position: relative;
  width: min(50vw, 520px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(#111 calc(var(--progress) * 360deg), rgba(17, 17, 17, 0.1) 0),
    #ffffff;
  box-shadow: 0 22px 70px rgba(35, 57, 50, 0.18);
}

.circle-timer::before {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: #df4b4b;
}

.green-fill {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  overflow: hidden;
}

.green-fill::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--calm) * 100%);
  background: linear-gradient(180deg, #65d782, #1d9a52);
  transition: height 320ms ease;
}

.timer-center {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

.timer-center span {
  font-size: clamp(2.4rem, 8vw, 6rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.timer-center strong {
  font-size: clamp(2rem, 5vw, 4rem);
}

.timer-center small {
  color: var(--muted);
  font-weight: 800;
}

.focus-bar {
  width: min(680px, 80vw);
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 32, 28, 0.16);
}

.time-progress {
  width: min(980px, 92vw);
  height: 14px;
  margin: 12px auto 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 32, 28, 0.12);
  box-shadow: inset 0 0 0 1px rgba(17, 32, 28, 0.06);
}

.vertical-meter {
  width: 190px;
  min-height: 460px;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  align-items: stretch;
}

.vertical-track {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(20, 38, 34, 0.16);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(217, 87, 107, 0.16), rgba(217, 201, 77, 0.13), rgba(55, 179, 106, 0.16));
}

.vertical-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  border-radius: inherit;
  background: linear-gradient(0deg, #37b36a, #d9c84d, #d9576b);
  transition: height 160ms ease;
}

.vertical-threshold {
  position: absolute;
  left: -8px;
  right: -8px;
  bottom: 50%;
  height: 3px;
  border-radius: 999px;
  background: #172322;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
  transform: translateY(50%);
  transition: bottom 160ms ease;
}

.vertical-arrow {
  position: absolute;
  left: calc(100% + 8px);
  bottom: 0%;
  width: 0;
  height: 0;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-right: 24px solid #172322;
  transform: translateY(50%);
  transition: bottom 160ms ease;
}

.vertical-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 850;
}

.vertical-labels strong {
  color: var(--ink);
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
}

.focus-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #35b86f, #d8c94c);
  transition: width 280ms ease;
}

.time-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #37b36a, #aee66e, #f4d76c);
  transition: width 280ms ease;
}

.volume-gauge {
  position: relative;
  width: min(420px, 80vw);
  height: 150px;
  margin-top: 20px;
}

.volume-gauge.compact {
  width: min(360px, 100%);
  height: 126px;
}

.gauge-arc {
  position: absolute;
  inset: 0 0 auto;
  height: 150px;
  border-radius: 150px 150px 0 0;
  background:
    conic-gradient(from 270deg at 50% 100%, #37b36a 0deg, #d9c84d 55deg, #d9576b 110deg, transparent 111deg);
  mask: radial-gradient(circle at 50% 100%, transparent 0 52%, #000 53% 67%, transparent 68%);
}

.volume-gauge.compact .gauge-arc {
  height: 126px;
}

.gauge-needle {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 4px;
  height: 92px;
  border-radius: 999px;
  background: #172322;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(-55deg);
  transition: transform 160ms ease;
}

.volume-gauge.compact .gauge-needle {
  height: 76px;
}

.gauge-needle::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #172322;
  transform: translateX(-50%);
}

.gauge-labels {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 800;
}

.gauge-labels strong {
  color: var(--ink);
  font-size: 1.8rem;
  font-variant-numeric: tabular-nums;
}

.smiley-stage {
  align-content: start;
  place-items: stretch;
  gap: 22px;
}

.smiley-summary {
  max-width: 980px;
  width: 100%;
  margin: 54px auto 0;
}

.smiley-status-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 420px);
  align-items: center;
  gap: 22px;
}

.mini-meter {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) 64px auto;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 850;
}

.wide-meter {
  width: min(980px, 92vw);
  margin: 0 auto;
}

.mini-meter-track {
  position: relative;
  height: 24px;
  overflow: visible;
  border-radius: 999px;
  background: rgba(22, 44, 40, 0.14);
}

.mini-meter-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #37b36a, #d9c84d, #d9576b);
  transition: width 160ms ease;
}

.mini-meter-threshold {
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 50%;
  width: 3px;
  border-radius: 999px;
  background: #172322;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.72);
  transform: translateX(-50%);
  transition: left 160ms ease;
}

.mini-meter-arrow {
  position: absolute;
  top: -18px;
  left: 0%;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 16px solid #172322;
  transform: translateX(-50%);
  transition: left 160ms ease;
}

.mini-meter strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.smiley-grid {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 12px;
}

.smiley-item {
  min-height: 84px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  transform: scale(0.92);
  opacity: 0.65;
  transition: transform 260ms ease, opacity 260ms ease, background 260ms ease;
}

.smiley-item.done {
  transform: scale(1);
  opacity: 1;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.stage {
  position: relative;
  min-height: 62vh;
  overflow: hidden;
  background: var(--sky);
}

#meadowCanvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 62vh;
}

.stage-overlay {
  position: absolute;
  inset: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  pointer-events: none;
}

.status-panel {
  width: min(430px, 100%);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 60px rgba(40, 74, 70, 0.16);
  backdrop-filter: blur(12px);
}

.eyebrow,
.label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.range-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.range-label label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.range-label strong {
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 2.4rem);
  line-height: 1.05;
}

.timer {
  margin-top: 16px;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 0.95;
}

.meter {
  position: relative;
  height: 14px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(29, 42, 42, 0.12);
}

.meter-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--rose));
  transition: width 120ms linear;
}

.meter-threshold {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 50%;
  width: 3px;
  border-radius: 999px;
  background: #172322;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.72);
  transform: translateX(-50%);
}

.feedback {
  min-height: 42px;
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.average-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: inherit;
  background: rgba(255, 255, 255, 0.16);
  font-size: clamp(0.82rem, 1.3vw, 1rem);
  font-weight: 850;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.average-chip strong {
  font-size: 1.15em;
  font-variant-numeric: tabular-nums;
}

.control-panel {
  display: grid;
  gap: 18px;
  padding: 76px 18px 18px;
  border-top: 1px solid var(--line);
  background: rgba(247, 252, 249, 0.96);
}

.legal-screen {
  min-height: 100vh;
  padding: 96px 22px 40px;
  background:
    linear-gradient(rgba(12, 34, 31, 0.1), rgba(12, 34, 31, 0.18)),
    #edf6f1;
}

.legal-card {
  position: relative;
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 22px 70px rgba(20, 45, 40, 0.16);
}

.legal-card h1,
.legal-card h2,
.legal-card p {
  margin: 0;
}

.legal-card h1 {
  font-size: clamp(1.8rem, 4vw, 3.4rem);
}

.legal-card h2 {
  margin-top: 14px;
}

.legal-note {
  padding: 12px 14px;
  border-radius: 8px;
  color: #243536;
  background: #fff4d2;
  font-weight: 750;
}

.legal-back {
  position: static;
  width: fit-content;
  margin-bottom: 12px;
}

.legal-return {
  width: fit-content;
  margin-top: 18px;
}

.panel-group {
  display: grid;
  gap: 14px;
}

.slider {
  width: 100%;
  height: 28px;
  accent-color: var(--green-dark);
  cursor: pointer;
}

.scale-row {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.primary {
  border-color: rgba(31, 100, 56, 0.7);
  color: #ffffff;
  background: var(--green-dark);
}

button.running {
  border-color: rgba(31, 100, 56, 0.92);
  color: #ffffff;
  background: #168244;
  box-shadow: 0 0 0 3px rgba(34, 163, 84, 0.18);
}

.controls-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.extend-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.extend-row button {
  min-height: 36px;
  padding: 0 8px;
  font-size: 0.9rem;
}

.readout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.readout {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.readout span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.readout strong {
  display: block;
  margin-top: 5px;
  font-size: 1.55rem;
  line-height: 1;
}

.threshold-control {
  position: relative;
}

.live-volume-marker {
  position: relative;
  height: 0;
  pointer-events: none;
}

.live-volume-marker::before {
  content: "";
  position: absolute;
  left: var(--volume, 0%);
  bottom: 34px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #172322;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.86);
  transform: translateX(-50%);
  transition: left 160ms ease;
}

@media (min-width: 960px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr) 390px;
    grid-template-rows: 100vh;
  }

  .stage,
  #meadowCanvas {
    min-height: 100vh;
  }

  .control-panel {
    padding-top: 76px;
    align-content: start;
    border-top: 0;
    border-left: 1px solid var(--line);
    overflow: auto;
  }

  .controls-row,
  .readout-grid {
    grid-template-columns: 1fr;
  }

  .diver-screen {
    grid-template-columns: minmax(0, 1fr) 390px;
    grid-template-rows: 100vh;
  }

  .diver-stage,
  #diverCanvas {
    min-height: 100vh;
  }

  .diver-controls {
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
  }

  .timer-screen,
  .smiley-screen,
  .snail-screen,
  .color-screen,
  .mandala-screen,
  .axes-screen {
    grid-template-columns: minmax(0, 1fr) 390px;
    grid-template-rows: 100vh;
  }

  .axes-stage,
  #axesCanvas {
    min-height: 100vh;
  }
}

@media (min-width: 560px) {
  .axes-screen {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 34vw);
    grid-template-rows: 100vh;
  }

  .axes-stage,
  #axesCanvas {
    min-height: 100vh;
  }

  .axes-screen .control-panel {
    padding-top: 76px;
    align-content: start;
    border-top: 0;
    border-left: 1px solid var(--line);
    overflow: auto;
  }

  .axes-screen .controls-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .stage-overlay {
    inset: 12px;
  }

  .status-panel {
    padding: 14px;
  }

  .control-panel {
    padding: 76px 12px 12px;
  }

  .controls-row,
  .readout-grid {
    grid-template-columns: 1fr 1fr;
  }

  .timer-layout {
    grid-template-columns: 1fr;
  }

  .smiley-status-row {
    grid-template-columns: 1fr;
  }

  .circle-timer {
    width: min(82vw, 420px);
  }

  .vertical-meter {
    width: min(320px, 86vw);
    min-height: 260px;
  }

  .color-palette {
    grid-template-columns: repeat(5, 1fr);
  }

  .color-screen.presentation-mode .color-panel {
    top: 78px;
  }

  .mandala-screen.presentation-mode .mandala-panel {
    top: 78px;
  }

  .axes-screen.presentation-mode .axes-panel {
    top: 78px;
  }
}
