:root {
  color-scheme: light;
  --paper: #edf0f6;
  --paper-bright: #f9faff;
  --ink: #17203b;
  --muted: #68708a;
  --line: #cbd1df;
  --blue: #4b68ff;
  --coral: #ff5575;
  --yellow: #ffd84d;
  --mint: #6ce7bd;
  --shadow: 0 26px 60px rgba(38, 49, 94, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(75, 104, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(75, 104, 255, 0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.game-shell {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  border-bottom: 2px solid var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  color: var(--ink);
  font-family: "Unbounded", sans-serif;
  font-size: 12px;
  line-height: 0.95;
  text-decoration: none;
  text-transform: uppercase;
}

.brand strong {
  color: var(--blue);
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 48px;
  place-items: center;
  transform: skew(-9deg);
  border: 2px solid var(--ink);
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 23px;
}

.session-strip {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(249, 250, 255, 0.74);
}

.session-strip > div {
  display: flex;
  min-width: 104px;
  padding: 11px 17px;
  flex-direction: column;
  text-align: center;
}

.session-strip > div + div {
  border-left: 1px solid var(--line);
}

.session-strip span,
.panel-heading p,
.challenge-copy > p:first-child,
.match-score span,
.footer-note,
.status-chip {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.session-strip span {
  color: var(--muted);
}

.session-strip strong {
  margin-top: 2px;
  font-family: "Unbounded", sans-serif;
  font-size: 15px;
}

.text-button {
  padding: 10px 0;
  border: 0;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 14px;
}

.mask-toggle {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(249, 250, 255, 0.84);
  cursor: pointer;
  font-size: 10px;
}

.mask-toggle > span {
  color: var(--blue);
  font-size: 19px;
  line-height: 1;
}

.mask-toggle strong {
  font-size: 10px;
  white-space: nowrap;
}

.mask-toggle[aria-pressed="true"] {
  border-color: var(--blue);
  background: #eef1ff;
  box-shadow: 3px 3px 0 rgba(75, 104, 255, 0.18);
}

.intro-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.65fr);
  align-items: end;
  gap: 60px;
  padding: 42px 3vw 32px;
}

.intro-copy .eyebrow {
  grid-column: 1 / -1;
  margin: 0 0 -36px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.intro-copy h1 {
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(34px, 4.6vw, 70px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.intro-copy h1 em {
  position: relative;
  color: var(--coral);
  font-style: normal;
}

.intro-copy h1 em::after {
  position: absolute;
  right: 0;
  bottom: -9px;
  left: 0;
  height: 8px;
  transform: rotate(-1deg);
  background: var(--yellow);
  content: "";
  z-index: -1;
}

.intro-copy > p:last-child {
  max-width: 390px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.face-off {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.panel {
  min-width: 0;
  padding: 20px;
  border: 2px solid var(--ink);
  border-radius: 26px;
  background: var(--paper-bright);
  box-shadow: var(--shadow);
}

.target-panel {
  transform: rotate(-0.35deg);
}

.camera-panel {
  transform: rotate(0.35deg);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 36px;
  margin-bottom: 14px;
}

.panel-heading > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.panel-heading p {
  margin: 0;
}

.panel-index {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-family: "Unbounded", sans-serif;
  font-size: 10px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: white;
  color: var(--muted);
}

.status-chip[data-state="ready"],
.status-chip[data-state="tracking"],
.status-chip[data-state="captured"] {
  border-color: #36ac84;
  background: #eafff7;
  color: #167c5d;
}

.status-chip[data-state="missing"],
.status-chip[data-state="error"] {
  border-color: #ef9b31;
  background: #fff6e4;
  color: #9b5a08;
}

.target-stage,
.camera-stage {
  position: relative;
  overflow: hidden;
  height: clamp(300px, 36vw, 500px);
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: #10162b;
}

.target-stage img,
.target-stage canvas,
.camera-stage video,
.camera-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.target-stage img {
  object-fit: contain;
}

.target-stage canvas,
.camera-stage canvas {
  pointer-events: none;
  transition: opacity 160ms ease;
}

body[data-masks="hidden"] #targetOverlay,
body[data-masks="hidden"] #cameraOverlay {
  visibility: hidden;
  opacity: 0;
}

body[data-masks="visible"] #targetOverlay,
body[data-masks="visible"] #cameraOverlay {
  visibility: visible;
  opacity: 1;
}

.target-stage figcaption,
.live-label {
  position: absolute;
  z-index: 2;
  top: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 99px;
  background: rgba(16, 22, 43, 0.76);
  color: white;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.target-stage figcaption {
  left: 14px;
}

.live-label {
  right: 14px;
}

.live-label span {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 85, 117, 0.18);
}

.live-label b {
  font: inherit;
}

.camera-stage[data-view="capture"] .live-label span {
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(108, 231, 189, 0.18);
}

.camera-stage video {
  transform: scaleX(-1);
  object-fit: cover;
}

.capture-image {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.capture-image[hidden] {
  display: none;
}

.camera-stage[data-view="capture"] video {
  visibility: hidden;
}

.camera-stage[data-view="capture"] #cameraOverlay {
  visibility: hidden !important;
  opacity: 0 !important;
}

.camera-stage canvas {
  transform: scaleX(-1);
}

.camera-gate {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 34px;
  background:
    radial-gradient(circle at 50% 40%, rgba(75, 104, 255, 0.25), transparent 38%),
    #10162b;
  color: white;
  text-align: center;
}

.camera-gate[hidden] {
  display: none;
}

.camera-gate-icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: var(--mint);
  font-size: 34px;
}

.camera-gate strong {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(18px, 2vw, 26px);
  text-transform: uppercase;
}

.camera-gate p {
  max-width: 350px;
  margin: 10px auto 18px;
  color: #aeb7d6;
  font-size: 12px;
  line-height: 1.55;
}

.primary-button {
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid var(--ink);
  border-radius: 13px;
  background: var(--yellow);
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.primary-button:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.primary-button:disabled {
  cursor: wait;
  filter: grayscale(0.45);
}

.error-text {
  min-height: 18px;
  margin: 12px 0 0 !important;
  color: #ffb0bd !important;
}

.challenge-copy {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 0.8fr);
  gap: 8px 20px;
  padding: 20px 4px 4px;
}

.challenge-copy > p:first-child {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--blue);
}

.challenge-copy h2 {
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(20px, 2.2vw, 31px);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.challenge-copy > p:last-child {
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.metric-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 29px;
  margin: 12px 4px 0;
}

.metric-chips span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: white;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.match-readout {
  padding: 20px 4px 4px;
}

.match-summary {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: end;
  gap: 20px;
  margin-bottom: 13px;
}

.match-score {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.match-score strong {
  color: var(--blue);
  font-family: "Unbounded", sans-serif;
  font-size: 31px;
}

.match-summary > p {
  justify-self: end;
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}

.heuristic-scores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.heuristic-item {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
}

.heuristic-item > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.heuristic-item span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.heuristic-item strong {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 9px;
}

.heuristic-track {
  overflow: hidden;
  height: 5px;
  border-radius: 99px;
  background: #e4e7f0;
}

.heuristic-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 90ms linear;
}

.heuristic-item[data-matched="true"] .heuristic-track i {
  background: var(--mint);
}

.heuristic-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 10px;
  border: 1px dashed var(--line);
  border-radius: 11px;
  color: var(--muted);
  font-size: 10px;
}

.hold-track {
  overflow: hidden;
  height: 13px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: white;
}

#holdBar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--yellow), var(--coral));
  transition: width 90ms linear;
}

.face-off-mark {
  position: absolute;
  z-index: 5;
  top: 44%;
  left: 50%;
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  transform: translate(-50%, -50%) rotate(-7deg);
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--coral);
  box-shadow: 6px 6px 0 var(--ink);
  color: white;
  font-family: "Unbounded", sans-serif;
  font-size: 19px;
}

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

.meme-button {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(249, 250, 255, 0.74);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease;
}

.meme-button:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
}

.meme-button[aria-current="true"] {
  border: 2px solid var(--blue);
  background: white;
  box-shadow: 4px 4px 0 rgba(75, 104, 255, 0.2);
}

.meme-button[data-complete="true"]::after {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  content: "✓";
  font-weight: 900;
}

.meme-button img {
  width: 66px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
}

.meme-button span {
  min-width: 0;
}

.meme-button strong,
.meme-button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meme-button strong {
  font-size: 12px;
}

.meme-button small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.footer-note {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px 4px 0;
  color: var(--muted);
}

.footer-note span {
  color: var(--ink);
}

.footer-note p {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.footer-note strong {
  color: var(--blue);
  text-align: right;
}

.result-overlay {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(23, 32, 59, 0.72);
  backdrop-filter: blur(12px);
}

.result-overlay[hidden] {
  display: none;
}

.update-notice {
  position: fixed;
  z-index: 19;
  right: 18px;
  bottom: 18px;
  display: flex;
  width: min(520px, calc(100% - 36px));
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--yellow);
  box-shadow: 7px 7px 0 var(--ink);
}

.update-notice[hidden] {
  display: none;
}

.update-notice > div {
  min-width: 0;
  flex: 1;
}

.update-notice strong {
  font-family: "Unbounded", sans-serif;
  font-size: 13px;
  text-transform: uppercase;
}

.update-notice p {
  margin: 3px 0 0;
  font-size: 10px;
  line-height: 1.35;
}

.update-notice button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 12px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
}

.result-card {
  position: relative;
  width: min(520px, 100%);
  padding: 46px;
  transform: rotate(-1deg);
  border: 3px solid var(--ink);
  border-radius: 28px;
  background: var(--paper-bright);
  box-shadow: 12px 12px 0 var(--yellow);
  text-align: center;
}

.result-card[data-gallery="true"] {
  width: min(980px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-x: hidden;
  overflow-y: auto;
  transform: none;
  padding: 34px;
}

.result-card::before,
.result-card::after {
  position: absolute;
  width: 58px;
  height: 18px;
  transform: rotate(-34deg);
  background: var(--coral);
  content: "";
}

.result-card::before {
  top: 8px;
  left: -21px;
}

.result-card::after {
  right: -20px;
  bottom: 12px;
}

.result-card > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.result-card h2 {
  margin: 14px 0 10px;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(28px, 6vw, 48px);
  line-height: 1;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.result-card p {
  margin: 0 auto 25px;
  color: var(--muted);
  line-height: 1.6;
}

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

.session-gallery[hidden] {
  display: none;
}

.gallery-shot {
  position: relative;
  overflow: hidden;
  min-width: 0;
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: 15px;
  background: #10162b;
}

.gallery-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-shot figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  color: white;
}

.gallery-shot strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-shot span {
  flex: 0 0 auto;
  color: var(--yellow);
  font-family: "Unbounded", sans-serif;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 950px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .session-strip {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: stretch;
  }

  .session-strip > div {
    min-width: 0;
    flex: 1;
  }

  .intro-copy {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-inline: 0;
  }

  .intro-copy .eyebrow {
    margin: 0;
  }

  .face-off {
    grid-template-columns: 1fr;
  }

  .target-panel,
  .camera-panel {
    transform: none;
  }

  .face-off-mark {
    top: 50%;
  }

  .target-stage,
  .camera-stage {
    height: min(68vw, 520px);
  }

  .meme-picker {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  body {
    background-size: 24px 24px;
  }

  .game-shell {
    display: flex;
    width: min(100% - 16px, 1440px);
    min-height: 100svh;
    padding: 0 0 max(8px, env(safe-area-inset-bottom));
    flex-direction: column;
  }

  .topbar {
    position: sticky;
    z-index: 12;
    top: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-row: auto;
    order: 0;
    min-height: 50px;
    gap: 5px;
    padding: max(4px, env(safe-area-inset-top)) 0 4px;
    border-bottom-width: 1px;
    background: rgba(237, 240, 246, 0.94);
    backdrop-filter: blur(12px);
  }

  .brand-mark {
    width: 28px;
    height: 32px;
    box-shadow: 3px 3px 0 var(--ink);
    font-size: 17px;
  }

  .brand > span:last-child {
    display: none;
  }

  .session-strip {
    grid-column: auto;
    grid-row: auto;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .session-strip > div {
    min-width: 0;
    padding: 2px 6px;
  }

  .session-strip span {
    font-size: 7px;
    letter-spacing: 0.06em;
  }

  .session-strip strong {
    margin-top: 1px;
    font-size: 10px;
  }

  .header-actions {
    gap: 5px;
  }

  .mask-toggle {
    width: 38px;
    min-height: 36px;
    padding: 3px;
    flex-direction: column;
    gap: 0;
    border: 0;
    background: transparent;
  }

  .mask-toggle > span {
    font-size: 18px;
  }

  .mask-toggle strong {
    display: none;
  }

  .mask-toggle::after {
    color: var(--muted);
    content: "Маски";
    font-size: 7px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
  }

  .text-button {
    padding: 5px 0;
    font-size: 8px;
  }

  .intro-copy {
    display: none;
  }

  .meme-picker {
    order: 1;
    display: flex;
    overflow-x: auto;
    gap: 6px;
    margin: 5px -8px 6px;
    padding: 2px 8px 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .meme-picker::-webkit-scrollbar {
    display: none;
  }

  .meme-button {
    position: relative;
    display: block;
    flex: 0 0 64px;
    height: 55px;
    padding: 3px;
    border-radius: 10px;
    scroll-snap-align: start;
  }

  .meme-button:hover {
    transform: none;
  }

  .meme-button img {
    width: 100%;
    height: 47px;
    border-radius: 7px;
  }

  .meme-button strong {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .meme-button small {
    display: none;
  }

  .meme-button[data-complete="true"]::after {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    font-size: 9px;
  }

  .face-off {
    display: flex;
    order: 2;
    gap: 7px;
    flex-direction: column;
  }

  .camera-panel {
    order: 1;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .target-panel {
    order: 3;
  }

  .panel {
    position: relative;
    overflow: hidden;
    padding: 0;
    border-width: 1px;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(38, 49, 94, 0.1);
  }

  .panel-heading {
    position: absolute;
    z-index: 6;
    top: 8px;
    right: 8px;
    left: 8px;
    min-height: 24px;
    margin: 0;
    pointer-events: none;
  }

  .panel-index {
    display: none;
  }

  .panel-heading p {
    padding: 5px 7px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 99px;
    background: rgba(16, 22, 43, 0.68);
    color: white;
    font-size: 7px;
    backdrop-filter: blur(8px);
  }

  .target-stage {
    width: 100%;
    height: clamp(218px, 30.5dvh, 268px);
    border: 0;
    border-radius: 15px;
  }

  .camera-stage {
    width: 100%;
    height: clamp(280px, 37.5dvh, 320px);
    border: 1px solid var(--ink);
    border-radius: 15px;
    box-shadow: 0 10px 28px rgba(38, 49, 94, 0.1);
  }

  .status-chip {
    min-height: 24px;
    max-width: 126px;
    padding: 4px 7px;
    overflow: hidden;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(16, 22, 43, 0.72);
    color: white;
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(8px);
  }

  .target-panel .status-chip {
    display: none;
  }

  .camera-gate {
    padding: 40px 14px;
  }

  .camera-gate-icon {
    display: none;
  }

  .camera-gate strong {
    font-size: 13px;
  }

  .camera-gate p {
    display: none;
  }

  .primary-button {
    min-height: 36px;
    margin-top: 10px;
    padding: 7px 14px;
    border-radius: 10px;
    box-shadow: 3px 3px 0 var(--ink);
    font-size: 11px;
  }

  .match-readout {
    position: relative;
    z-index: 2;
    margin: 7px 0 0;
    padding: 9px 10px;
    border: 1px solid var(--ink);
    border-radius: 14px;
    background: linear-gradient(135deg, #10162b, #182140);
    box-shadow: 0 8px 22px rgba(38, 49, 94, 0.12);
    color: white;
    pointer-events: none;
  }

  .match-summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
  }

  .match-score {
    display: flex;
    align-items: baseline;
    gap: 7px;
  }

  .match-score span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 7px;
  }

  .match-score strong {
    color: white;
    font-size: 28px;
    line-height: 1;
  }

  .match-summary > p {
    overflow: hidden;
    max-width: 48%;
    color: rgba(255, 255, 255, 0.72);
    font-size: 7px;
    line-height: 1.25;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .heuristic-scores {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
  }

  .heuristic-item {
    min-width: 0;
    padding: 0;
    flex: 1;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .heuristic-item > div:first-child {
    gap: 3px;
    margin-bottom: 3px;
  }

  .heuristic-item span,
  .heuristic-item strong {
    color: rgba(255, 255, 255, 0.8);
    font-size: 6px;
  }

  .heuristic-empty {
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .heuristic-track {
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
  }

  .hold-track {
    height: 5px;
    border: 0;
    background: rgba(255, 255, 255, 0.2);
  }

  .challenge-copy {
    position: absolute;
    z-index: 5;
    right: 0;
    bottom: 0;
    left: 0;
    gap: 3px;
    padding: 42px 11px 10px;
    grid-template-columns: 1fr;
    background: linear-gradient(transparent, rgba(10, 15, 34, 0.94) 46%);
    color: white;
    pointer-events: none;
  }

  .challenge-copy > p:first-child {
    grid-column: auto;
    color: var(--yellow);
    font-size: 7px;
  }

  .challenge-copy h2 {
    color: white;
    font-size: 15px;
    line-height: 1.05;
  }

  .challenge-copy > p:last-child {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.78);
    font-size: 8px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .target-panel .metric-chips {
    display: none;
  }

  .target-stage figcaption,
  .live-label {
    display: none;
  }

  .face-off-mark {
    display: none;
  }

  .footer-note {
    display: none;
  }

  .result-card {
    padding: 36px 24px;
  }

  .update-notice {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: calc(100% - 16px);
    gap: 10px;
    padding: 10px 11px;
    border-width: 1px;
    border-radius: 13px;
    box-shadow: 4px 4px 0 var(--ink);
  }

  .update-notice strong {
    font-size: 10px;
  }

  .update-notice p {
    font-size: 8px;
  }

  .update-notice button {
    min-height: 36px;
    padding: 6px 10px;
    border-width: 1px;
    font-size: 9px;
  }

  .result-card[data-gallery="true"] {
    width: 100%;
    max-height: calc(100dvh - 16px);
    padding: 22px 14px 18px;
    border-width: 2px;
    border-radius: 17px;
    box-shadow: 6px 6px 0 var(--yellow);
  }

  .result-card[data-gallery="true"] h2 {
    margin: 9px 0 6px;
    font-size: 22px;
  }

  .result-card[data-gallery="true"] > p {
    margin-bottom: 14px;
    font-size: 10px;
    line-height: 1.4;
  }

  .session-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 16px;
  }

  .gallery-shot {
    border-width: 1px;
    border-radius: 11px;
  }

  .gallery-shot figcaption {
    padding: 6px 7px;
  }

  .gallery-shot strong {
    font-size: 7px;
  }

  .gallery-shot span {
    font-size: 8px;
  }
}

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