:root {
  color-scheme: dark;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: #eff1e8;
  background: #121410;
  --panel: #1a1d16;
  --line: #343a2d;
  --muted: #b7bfac;
  --accent: #d7fa83;
  --focus: #f0ffcb;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button { font: inherit; }
button:not(:disabled), label:has(input:not(:disabled)) { cursor: pointer; }
button:disabled { opacity: .5; }
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.shell { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid #2a3024; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
}
.brand, .headset-label, .preview-name, .button {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand { color: inherit; text-decoration: none; font-size: 17px; font-weight: 650; letter-spacing: -.025em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: 1px solid #65784a;
  box-shadow: inset 0 0 0 4px #121410, inset 0 0 0 5px #425435;
}
.brand-mark i, .preview-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.headset-label {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 7px 12px;
  font-size: 14px;
}
.vr-icon { position: relative; width: 20px; height: 13px; border: 1.5px solid currentColor; border-radius: 4px 4px 5px 5px; }
.vr-icon::before, .vr-icon::after {
  content: "";
  position: absolute;
  top: 3px;
  width: 4px;
  height: 4px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.vr-icon::before { left: 3px; }
.vr-icon::after { right: 3px; }

.intro { margin: 43px 0 31px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(3rem, 7vw, 5.15rem); font-weight: 620; letter-spacing: -.078em; line-height: 1.02; }
h1 span { color: var(--accent); }
.intro p { color: var(--muted); font-size: clamp(1rem, 2vw, 1.125rem); margin-top: 13px; line-height: 1.55; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 342px); gap: 16px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); }
.preview { overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; }
.preview-header, .preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 19px; }
.preview-header { border-bottom: 1px solid var(--line); min-height: 55px; }
.preview-header h2 { font-size: 16px; font-weight: 620; }
.timer { color: #dde7c8; font-family: ui-monospace, "Cascadia Mono", monospace; font-size: 15px; font-variant-numeric: tabular-nums; }
.field { position: relative; min-height: 294px; overflow: hidden; background: #151a12; isolation: isolate; }
.field canvas { position: absolute; width: 100%; height: 100%; display: block; }
.field-corners { position: absolute; inset: 16px; pointer-events: none; }
.field-corners i { position: absolute; width: 15px; height: 15px; border: solid #627450; border-width: 1px 0 0 1px; border-top-left-radius: 2px; }
.field-corners i:nth-child(2) { right: 0; transform: rotate(90deg); }
.field-corners i:nth-child(3) { right: 0; bottom: 0; transform: rotate(180deg); }
.field-corners i:nth-child(4) { bottom: 0; transform: rotate(270deg); }
.meter { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform: scaleX(var(--progress, 0)); transform-origin: left center; }
.field-message {
  position: absolute;
  inset: auto 19px 22px auto;
  border: 1px solid #46523b;
  border-radius: 8px;
  background: #191d15;
  color: var(--accent);
  padding: 7px 11px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.preview-footer { border-top: 1px solid var(--line); min-height: 54px; }
.preview-footer p { color: var(--muted); font-size: 14px; line-height: 1.4; }
.reset { background: transparent; color: var(--accent); border: 0; padding: 0; font-size: 14px; }
.reset:hover { text-decoration: underline; }

.setup { display: flex; flex-direction: column; padding: 21px; }
.setup h2 { font-size: 22px; font-weight: 630; letter-spacing: -.036em; margin-bottom: 20px; }
fieldset { border: 0; margin: 0; padding: 0; min-inline-size: 0; }
.setting { margin-bottom: 17px; }
.setting legend { color: #e1e6d8; font-size: 14px; font-weight: 590; padding: 0 0 7px; }
.segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  border: 1px solid #353c2e;
  background: #131710;
  padding: 3px;
  border-radius: 10px;
}
.segments span { display: block; padding: 8px 2px; text-align: center; border-radius: 6px; color: var(--muted); font-size: 14px; }
.segments label:hover span { color: #fff; }
.segments input:checked + span { background: #303c23; color: #e6f6c8; box-shadow: inset 0 0 0 1px #475937; }
.segments input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }
.segments input, .exercise input, .screen-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.launch { display: grid; gap: 8px; margin-top: auto; }
.button {
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 650;
}
.primary { background: var(--accent); color: #1d2712; }
.primary:not(:disabled):hover { background: #e5ffa8; }
.secondary { background: #22271e; border-color: #3a4233; color: #e8eddf; }
.secondary:not(:disabled):hover { background: #303829; }
.play-icon { width: 11px; height: 12px; clip-path: polygon(12% 0, 100% 50%, 12% 100%); background: currentColor; }
.play-icon.paused { clip-path: polygon(0 0, 35% 0, 35% 100%, 65% 100%, 65% 0, 100% 0, 100% 100%, 0 100%); }
.vr-status { min-height: 20px; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.4; }
.vr-status[data-error] { color: #f0dca5; }

.exercises { margin-top: 29px; }
.exercises legend { padding: 0; font-size: 23px; font-weight: 630; letter-spacing: -.04em; }
.exercise-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 13px; }
.exercise { position: relative; min-width: 0; }
.tile {
  display: flex;
  min-height: 82px;
  height: 100%;
  gap: 12px;
  align-items: center;
  padding: 13px 30px 13px 13px;
  background: #1a1d16;
  border: 1px solid #333a2e;
  border-radius: 12px;
}
.tile canvas { flex: 0 0 40px; width: 40px; height: 40px; background: #222b1b; border: 1px solid #3b4b30; border-radius: 9px; }
.tile strong, .tile small { display: block; }
.tile strong { font-size: 15px; font-weight: 630; line-height: 1.3; }
.tile small { color: var(--muted); font-size: 14px; line-height: 1.4; margin-top: 3px; }
.exercise:hover .tile { border-color: #65794e; }
.exercise input:checked + .tile { border-color: #89a653; background: #24301b; }
.exercise input:checked + .tile::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 16px;
  width: 9px;
  height: 5px;
  border: solid var(--accent);
  border-width: 0 0 1.5px 1.5px;
  transform: rotate(-45deg);
}
.exercise input:focus-visible + .tile { outline: 2px solid var(--focus); outline-offset: 2px; }
.exercise input:disabled + .tile { opacity: .65; }
.site-footer { display: flex; justify-content: space-between; gap: 8px 24px; color: var(--muted); margin: 28px 0; padding-top: 15px; border-top: 1px solid #2e3429; font-size: 14px; line-height: 1.55; }

@media (max-width: 840px) {
  .shell { width: calc(100% - 44px); }
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(250px, 32%); }
  .exercise-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 57px; }
  .headset-label { font-size: 13px; }
  .intro { margin: 29px 0 22px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .field { min-height: 235px; }
  .setup { padding: 16px; }
  .setup h2 { margin-bottom: 13px; }
  .tile { gap: 8px; padding-inline: 9px 19px; }
  .tile canvas { flex-basis: 32px; width: 32px; height: 32px; }
  .exercise input:checked + .tile::after { right: 8px; top: 10px; width: 7px; }
  .site-footer { flex-direction: column; }
}
@media (max-width: 375px) {
  .exercise-list { grid-template-columns: minmax(0, 1fr); }
}
