:root {
  --bg: #1f1f20;
  --panel: #252526;
  --panel-soft: #2d2d2f;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f7f7f7;
  --muted: rgba(255, 255, 255, 0.48);
  --bad: #ff4c4c;
  --medium: #ffd44c;
  --good: #96d44c;
  --excellent: #96d4f3;
  --none: #7c7c7c;
  --cell: 54px;
  --cols: 11;
  --rows: 7;
  --matrix-slot-top: 27.29%;
  --matrix-slot-height: 54.31%;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: #111112;
  color: var(--text);
  font-family: Avenir Next, Avenir, Helvetica Neue, sans-serif;
}

button {
  color: inherit;
  font: inherit;
}

.phone {
  position: relative;
  width: min(390px, 100vw);
  height: min(844px, 100vh);
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
  border: 0;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.52);
}

body.input-view .phone {
  height: min(844px, 100vh);
  min-height: 0;
}

.reference-screen {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  background: #1f1f20;
}

body.input-view .reference-screen {
  z-index: 20;
}

body.input-view .reference-screen::after {
  content: "";
  position: absolute;
  z-index: 4;
  left: 0;
  top: var(--matrix-slot-top);
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.055);
  pointer-events: none;
}

.reference-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.input-matrix-canvas {
  position: absolute;
  z-index: 2;
  left: 0;
  top: var(--matrix-slot-top);
  width: 100%;
  height: var(--matrix-slot-height);
  display: block;
  cursor: pointer;
  touch-action: manipulation;
}

.matrix-mode-toggle {
  position: absolute;
  z-index: 12;
  left: 2.18%;
  top: 27.96%;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0.64;
  transition: opacity 160ms ease, transform 220ms ease;
}

body.input-view .matrix-mode-toggle {
  z-index: 25;
}

.matrix-mode-toggle:hover {
  opacity: 0.92;
}

.matrix-mode-toggle:active {
  transform: scale(0.94);
}

.mode-icon {
  width: 24px;
  height: 24px;
  display: block;
  overflow: visible;
}

.mode-icon path {
  vector-effect: non-scaling-stroke;
  transition:
    fill 220ms ease,
    stroke 220ms ease,
    opacity 220ms ease,
    transform 520ms cubic-bezier(0.2, 0.82, 0.18, 1);
}

.icon-plane {
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.62);
  stroke-width: 2.2;
  stroke-linejoin: round;
  transform-origin: 16px 16px;
}

.icon-cube-top,
.icon-cube-left,
.icon-cube-right {
  opacity: 0;
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
  transform-origin: 16px 15px;
}

.icon-cube-top {
  transform: translateY(7px) scaleY(0.1);
}

.icon-cube-left {
  transform: translate(2px, -2px) scale(0.12, 0.2);
}

.icon-cube-right {
  transform: translate(-2px, -2px) scale(0.12, 0.2);
}

body.map3d-view .icon-plane,
body.is-transitioning .icon-plane {
  stroke: rgba(150, 212, 243, 0.94);
  opacity: 0;
  transform: scale(0.35);
}

body.map3d-view .icon-cube-top,
body.map3d-view .icon-cube-left,
body.map3d-view .icon-cube-right {
  opacity: 1;
  stroke: rgba(150, 212, 243, 0.92);
  transform: translate(0, 0) scale(1);
}

body.is-transitioning .mode-icon {
  animation: iconTilt 620ms cubic-bezier(0.2, 0.82, 0.18, 1);
}

@keyframes iconTilt {
  0% {
    transform: rotate(0deg) scale(1);
  }
  45% {
    transform: rotate(-9deg) scale(1.04);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}

body.input-view .phone > :not(.reference-screen):not(.matrix-mode-toggle),
body.map3d-view .phone > :not(.reference-screen):not(.matrix-stage):not(.matrix-mode-toggle) {
  visibility: hidden;
}

body.map3d-view .reference-screen {
  pointer-events: auto;
}

.topbar {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 10px;
  padding: 34px 20px 18px;
}

.icon-button,
.plus-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button span {
  width: 22px;
  height: 3px;
  margin: 2px 0;
  display: block;
  background: white;
  border-radius: 99px;
}

.plus-button {
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0;
}

.lens-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ff4c4c 0 35%, #ffd44c 36% 55%, #96d44c 56% 72%, #96d4f3 73% 100%);
  box-shadow: inset 0 0 0 7px rgba(31, 31, 32, 0.22);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.tabs button {
  position: relative;
  padding: 14px 8px 16px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

.tabs .active {
  color: white;
  font-weight: 700;
}

.tabs .active::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 3px;
  background: white;
}

.selector-block {
  border-bottom: 1px solid var(--line);
}

.selector-row {
  min-height: 60px;
  display: grid;
  grid-template-columns: 34px 1fr 18px;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 22px;
}

.lens-row {
  min-height: 78px;
  font-size: 20px;
  line-height: 1.22;
}

.selector-icon {
  opacity: 0.72;
}

.camera-icon {
  width: 24px;
  height: 17px;
  border-radius: 5px;
  background: #c9c9c9;
  position: relative;
}

.camera-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--bg);
  border-radius: 50%;
}

.camera-icon::after {
  content: "";
  position: absolute;
  left: 5px;
  top: -4px;
  width: 11px;
  height: 5px;
  border-radius: 4px 4px 0 0;
  background: #c9c9c9;
}

.target-icon {
  width: 25px;
  height: 25px;
  border: 2px solid #c9c9c9;
  border-radius: 50%;
  position: relative;
}

.target-icon::before,
.target-icon::after {
  content: "";
  position: absolute;
  background: #c9c9c9;
}

.target-icon::before {
  width: 35px;
  height: 2px;
  left: -7px;
  top: 10px;
}

.target-icon::after {
  width: 2px;
  height: 35px;
  left: 10px;
  top: -7px;
}

.chevron {
  width: 13px;
  height: 13px;
  border-top: 2px solid rgba(255, 255, 255, 0.35);
  border-right: 2px solid rgba(255, 255, 255, 0.35);
  rotate: 45deg;
}

.view-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 12px 12px 0;
}

.view-button {
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.64);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.view-button.active {
  color: #171717;
  background: var(--excellent);
  border-color: transparent;
}

.mode-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 8px;
}

.variant-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 12px 12px 0;
}

.input-view .variant-strip,
.input-view .mode-strip,
.input-view .idea-bar {
  display: none;
}

.variant-card {
  min-width: 0;
  height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  text-align: left;
  cursor: pointer;
}

.variant-card span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.variant-card strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.variant-card.active {
  border-color: rgba(150, 212, 243, 0.65);
  background:
    linear-gradient(180deg, rgba(150, 212, 243, 0.19), rgba(150, 212, 243, 0.052));
  box-shadow: inset 0 0 0 1px rgba(150, 212, 243, 0.18);
}

.variant-card.active strong {
  color: white;
}

.chip,
.toggle,
.idea-bar button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.64);
  cursor: pointer;
}

.chip {
  min-width: 74px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
}

.chip.active {
  color: #171717;
  background: var(--excellent);
  border-color: transparent;
}

.toggle {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
}

.toggle input {
  accent-color: var(--excellent);
}

.matrix-stage {
  position: relative;
  height: 456px;
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 24%),
    radial-gradient(ellipse at center, rgba(150, 212, 243, 0.1), transparent 58%),
    var(--bg);
  touch-action: none;
}

body.map3d-view .matrix-stage {
  position: absolute;
  z-index: 8;
  left: 0;
  top: var(--matrix-slot-top);
  width: 100%;
  height: var(--matrix-slot-height);
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  visibility: visible;
}

.scene-copy {
  position: absolute;
  z-index: 4;
  left: 18px;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
}

.input-view .scene-copy {
  display: none;
}

.map3d-view .scene-copy,
.is-transitioning .scene-copy {
  display: none;
}

.scene-copy span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scene-copy strong {
  font-size: 20px;
  max-width: 360px;
  line-height: 1.15;
}

.terrain-hud {
  position: absolute;
  z-index: 11;
  top: 14px;
  right: 16px;
  min-width: 118px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding: 8px 9px 7px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  background: rgba(24, 24, 25, 0.58);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  backdrop-filter: blur(12px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.terrain-hud.visible {
  opacity: 1;
  transform: translateY(0);
}

.input-view .terrain-hud {
  display: none;
}

.hud-coordinates {
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.hud-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.hud-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.scene {
  position: absolute;
  inset: 0;
  perspective: 900px;
  perspective-origin: 50% 42%;
}

.terrain-scene {
  perspective: none;
}

#terrainCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

#terrainCanvas:active {
  cursor: grabbing;
}

.matrix {
  --rx: 63deg;
  --rz: -33deg;
  --zoom: 0.72;
  position: absolute;
  left: 50%;
  top: 48%;
  width: calc(var(--cols) * var(--cell));
  height: calc(var(--rows) * var(--cell));
  transform-style: preserve-3d;
  transform:
    translate(-50%, -48%)
    scale(var(--zoom))
    rotateX(var(--rx))
    rotateZ(var(--rz));
  transition: transform 280ms ease;
}

.matrix::before {
  content: "";
  position: absolute;
  inset: -32px;
  transform: translateZ(-1px);
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 48% 48%, rgba(150, 212, 243, 0.18), transparent 32%),
    radial-gradient(circle at 38% 62%, rgba(150, 212, 76, 0.16), transparent 30%),
    rgba(255, 255, 255, 0.015);
  background-size: var(--cell) var(--cell), var(--cell) var(--cell), 100% 100%, 100% 100%, 100% 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 54px rgba(0, 0, 0, 0.34);
}

.matrix::after {
  content: "";
  position: absolute;
  inset: -32px;
  transform: translateZ(0);
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms ease, background 260ms ease;
}

.matrix.grid-off::before {
  background:
    radial-gradient(circle at 48% 48%, rgba(150, 212, 243, 0.16), transparent 32%),
    radial-gradient(circle at 38% 62%, rgba(150, 212, 76, 0.13), transparent 30%),
    rgba(255, 255, 255, 0.012);
}

.matrix.heat-floor::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 48% 52%, rgba(150, 212, 243, 0.34), transparent 19%),
    radial-gradient(circle at 38% 59%, rgba(150, 212, 76, 0.26), transparent 22%),
    radial-gradient(circle at 45% 30%, rgba(255, 212, 76, 0.22), transparent 18%),
    radial-gradient(circle at 52% 36%, rgba(255, 76, 76, 0.2), transparent 16%),
    rgba(255, 255, 255, 0.012);
  background-size: var(--cell) var(--cell), var(--cell) var(--cell), 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
}

.variant-mountain::after {
  opacity: 1;
  background:
    radial-gradient(circle at 48% 48%, rgba(150, 212, 243, 0.22), transparent 14%),
    radial-gradient(circle at 39% 58%, rgba(150, 212, 76, 0.18), transparent 16%),
    radial-gradient(circle at 44% 33%, rgba(255, 212, 76, 0.13), transparent 16%);
  mix-blend-mode: screen;
}

.variant-cloud::before {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.12) 1px, transparent 2px),
    radial-gradient(circle at 50% 54%, rgba(150, 212, 243, 0.16), transparent 46%),
    rgba(255, 255, 255, 0.008);
  background-size: 18px 18px, 100% 100%, 100% 100%;
  border-color: rgba(255, 255, 255, 0.08);
}

.variant-contour::before {
  background:
    repeating-radial-gradient(ellipse at 48% 49%, rgba(150, 212, 243, 0.22) 0 3px, transparent 3px 18px),
    repeating-radial-gradient(ellipse at 38% 59%, rgba(150, 212, 76, 0.16) 0 2px, transparent 2px 16px),
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    rgba(255, 255, 255, 0.01);
  background-size: 100% 100%, 100% 100%, var(--cell) var(--cell), var(--cell) var(--cell), 100% 100%;
}

.variant-contour::after {
  opacity: 1;
  background:
    radial-gradient(circle at 48% 48%, rgba(150, 212, 243, 0.3), transparent 16%),
    radial-gradient(circle at 38% 61%, rgba(150, 212, 76, 0.22), transparent 19%),
    radial-gradient(circle at 51% 36%, rgba(255, 76, 76, 0.14), transparent 15%);
  filter: blur(6px);
}

.axis-label {
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--cell);
  height: 22px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 16px;
  font-weight: 700;
  transform-style: preserve-3d;
  pointer-events: none;
}

.axis-label.x {
  top: -44px;
  transform: translateZ(4px) rotateZ(-55deg);
}

.axis-label.y {
  left: -70px;
  justify-content: end;
  color: rgba(255, 255, 255, 0.86);
}

.ridge {
  position: absolute;
  z-index: 1;
  display: block;
  width: var(--cell);
  height: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.26);
  box-shadow: 0 0 12px rgba(150, 212, 243, 0.13);
  transform: translateZ(var(--ridge-z));
  transform-origin: left center;
  pointer-events: none;
  transition: opacity 220ms ease, background 220ms ease, transform 220ms ease;
}

.ridge.vertical {
  rotate: 90deg;
}

.ridge.empty {
  opacity: 0.18;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.grid-off .ridge {
  opacity: 0;
}

.variant-cloud .ridge {
  opacity: 0;
}

.variant-mountain .ridge {
  opacity: 0.78;
}

.variant-contour .ridge {
  opacity: 0.44;
  background: rgba(150, 212, 243, 0.34);
  transform: translateZ(5px);
}

.cell {
  --h: 6px;
  --s: 12px;
  --color: var(--none);
  position: absolute;
  width: var(--cell);
  height: var(--cell);
  transform-style: preserve-3d;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.cell .stem {
  position: absolute;
  z-index: -1;
  width: 2px;
  height: var(--h);
  min-height: 3px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--color), rgba(255, 255, 255, 0.08));
  opacity: 0;
  transform: translateZ(calc(var(--h) / 2)) rotateX(90deg);
  transform-origin: center bottom;
  pointer-events: none;
  transition: opacity 220ms ease, width 220ms ease;
}

.cell::before {
  content: "";
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--color);
  transform: translateZ(var(--h));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--color), white 16%),
    0 0 22px color-mix(in srgb, var(--color), transparent 38%);
  transition: width 240ms ease, height 240ms ease, transform 240ms ease, box-shadow 240ms ease;
}

.cell::after {
  content: "";
  position: absolute;
  width: calc(var(--s) * 1.9);
  height: calc(var(--s) * 1.9);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--color), transparent 54%), transparent 66%);
  transform: translateZ(2px);
  opacity: 0.5;
  transition: opacity 240ms ease, width 240ms ease, height 240ms ease;
}

.cell.empty::before {
  opacity: 0.5;
  box-shadow: none;
}

.cell.selected::before {
  width: calc(var(--s) + 16px);
  height: calc(var(--s) + 16px);
  transform: translateZ(calc(var(--h) + 18px));
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.18),
    0 0 46px color-mix(in srgb, var(--color), transparent 12%);
}

.cell.selected::after {
  opacity: 0.9;
}

.variant-cloud .cell .stem,
.variant-mountain .cell:not(.empty) .stem {
  opacity: 0.42;
}

.variant-cloud .cell .stem {
  width: 3px;
  opacity: 0.72;
}

.variant-cloud .cell::before {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--color), white 20%),
    0 0 28px color-mix(in srgb, var(--color), transparent 24%),
    0 18px 36px rgba(0, 0, 0, 0.28);
}

.variant-contour .cell::before {
  transform: translateZ(calc(var(--h) * 0.34));
}

.variant-contour .cell::after {
  width: calc(var(--s) * 3.6);
  height: calc(var(--s) * 3.6);
  opacity: 0.62;
  filter: blur(2px);
}

.cell.trail::after {
  opacity: 1;
  animation: trail 1.4s ease infinite;
}

.mode-halo .cell:not(.empty)::after {
  width: calc(var(--s) * 3.2);
  height: calc(var(--s) * 3.2);
  opacity: 0.82;
}

.mode-slice .cell:not(.selected) {
  opacity: 0.28;
}

.mode-slice .cell.selected,
.mode-slice .cell.slice-neighbor {
  opacity: 1;
}

.mode-slice .ridge {
  opacity: 0.12;
}

.scan-line {
  position: absolute;
  left: -32px;
  right: -32px;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(150, 212, 243, 0.9), transparent);
  transform: translateZ(82px);
  animation: scan 2.2s ease-in-out;
  pointer-events: none;
}

.legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 13px 12px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  border-bottom: 1px solid var(--line);
}

.legend div {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.bad {
  background: var(--bad);
}

.medium {
  background: var(--medium);
}

.good {
  background: var(--good);
}

.excellent {
  background: var(--excellent);
}

.idea-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px 12px 22px;
}

.idea-bar button {
  min-height: 42px;
  padding: 8px;
  font-size: 12px;
  font-weight: 700;
}

.idea-bar button.active {
  color: #171717;
  background: var(--medium);
  border-color: transparent;
}

@keyframes trail {
  0% {
    transform: translateZ(3px) scale(0.7);
    opacity: 0.2;
  }
  55% {
    opacity: 0.95;
  }
  100% {
    transform: translateZ(5px) scale(1.45);
    opacity: 0;
  }
}

@keyframes scan {
  from {
    top: -30px;
    opacity: 0;
  }
  20%,
  82% {
    opacity: 1;
  }
  to {
    top: calc(var(--rows) * var(--cell) + 30px);
    opacity: 0;
  }
}

@media (max-width: 420px) {
  :root {
    --cell: 48px;
  }

  .brand {
    font-size: 28px;
    gap: 13px;
  }

  .lens-mark {
    width: 46px;
    height: 46px;
  }

  .matrix-stage {
    height: 420px;
  }

  body.map3d-view .matrix-stage {
    height: var(--matrix-slot-height);
  }
}
