@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap");

:root {
  --bg: #03070d;
  --panel: rgba(6, 18, 28, 0.76);
  --panel-solid: #07131e;
  --line: rgba(112, 220, 243, 0.16);
  --line-bright: rgba(69, 225, 255, 0.55);
  --cyan: #52e8ff;
  --cyan-soft: #b4f5ff;
  --blue: #2d7dff;
  --green: #68f6a3;
  --lime: #b7ff5b;
  --white: #eefcff;
  --muted: #73909d;
  --danger: #ff6d80;
  --mono: "Space Mono", Consolas, monospace;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: "Noto Sans JP", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: dark;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 50% -10%, rgba(21, 105, 137, 0.22), transparent 42%),
    radial-gradient(circle at 82% 62%, rgba(15, 89, 122, 0.12), transparent 35%),
    linear-gradient(145deg, #020509, #06111a 52%, #02060b);
  font-family: var(--sans);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.ambient-grid {
  position: fixed;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  opacity: 0.44;
  background-image:
    linear-gradient(rgba(62, 197, 221, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 197, 221, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
}

.ambient-grid::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(125deg, transparent 15%, rgba(71, 220, 255, 0.055) 50%, transparent 51%);
}

.noise-layer {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.topbar {
  position: relative;
  z-index: 12;
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(3, 10, 16, 0.94), rgba(8, 22, 32, 0.84), rgba(3, 10, 16, 0.94));
  backdrop-filter: blur(18px);
}

.topbar::after {
  position: absolute;
  right: 34px;
  bottom: -1px;
  width: 26%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--cyan));
  box-shadow: 0 0 10px var(--cyan);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--white);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: block;
  width: 38px;
  height: 42px;
  filter: drop-shadow(0 0 8px rgba(82, 232, 255, 0.55));
}

.brand-mark i {
  position: absolute;
  inset: 0;
  border: 1px solid var(--cyan);
  clip-path: polygon(50% 0, 94% 25%, 94% 75%, 50% 100%, 6% 75%, 6% 25%);
}

.brand-mark i:nth-child(2) {
  inset: 6px;
  border-color: var(--green);
}

.brand-mark i:nth-child(3) {
  inset: 13px;
  border: 0;
  background: var(--cyan);
}

.brand b {
  display: block;
  color: var(--cyan-soft);
  font: 700 25px/1 var(--display);
  letter-spacing: 0.21em;
}

.brand b[data-site-setting="projectTitle"] {
  font-size: 19px;
  letter-spacing: 0.06em;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font: 9px/1.2 var(--mono);
  letter-spacing: 0.16em;
}

.top-status {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font: 10px/1 var(--mono);
  letter-spacing: 0.11em;
}

.top-status b {
  color: var(--cyan-soft);
  font-weight: 400;
}

.top-status > a {
  color: var(--cyan-soft);
  text-decoration: none;
}

.top-status > a:hover,
.top-status > a:focus-visible { text-decoration: underline; }

.status-pill {
  display: inline-flex;
  height: 29px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid rgba(104, 246, 163, 0.25);
  background: rgba(36, 127, 85, 0.08);
  color: var(--green);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.pulse-dot,
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(104, 246, 163, 0.45);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(104, 246, 163, 0); }
}

.app-shell {
  display: grid;
  width: min(1500px, calc(100% - 56px));
  min-height: calc(100vh - 126px);
  margin: 0 auto;
  grid-template-columns: 214px minmax(540px, 1fr) 235px;
  gap: 27px;
  align-items: center;
}

.side-panel {
  min-height: 610px;
  padding: 20px 0;
}

.panel-label {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 25px;
  color: var(--cyan);
  font: 10px/1 var(--mono);
  letter-spacing: 0.18em;
}

.panel-label::before {
  width: 21px;
  height: 1px;
  content: "";
  background: var(--cyan);
  box-shadow: 0 0 7px var(--cyan);
}

.phase-list {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.phase-list::before {
  position: absolute;
  top: 25px;
  bottom: 25px;
  left: 17px;
  width: 1px;
  content: "";
  background: linear-gradient(var(--cyan), rgba(82, 232, 255, 0.08));
}

.phase-list li {
  position: relative;
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 16px;
  opacity: 0.35;
  transition: opacity 300ms, transform 300ms;
}

.phase-list li > span {
  z-index: 1;
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid rgba(108, 190, 206, 0.3);
  background: var(--bg);
  color: var(--muted);
  font: 9px var(--mono);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.phase-list li div {
  padding: 8px 0;
}

.phase-list b {
  display: block;
  color: #a9c1ca;
  font: 600 14px/1 var(--display);
  letter-spacing: 0.15em;
}

.phase-list small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}

.phase-list li.is-active,
.phase-list li.is-complete {
  opacity: 1;
}

.phase-list li.is-active {
  transform: translateX(5px);
}

.phase-list li.is-active > span {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: inset 0 0 12px rgba(82, 232, 255, 0.14), 0 0 12px rgba(82, 232, 255, 0.12);
}

.phase-list li.is-active b {
  color: var(--cyan-soft);
  text-shadow: 0 0 9px rgba(82, 232, 255, 0.35);
}

.phase-list li.is-complete > span {
  border-color: var(--green);
  color: var(--green);
}

.mini-readout {
  margin-top: 31px;
  padding: 15px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(43, 153, 186, 0.07), transparent);
  font-family: var(--mono);
}

.mini-readout span,
.mini-readout small {
  display: block;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.mini-readout b {
  display: block;
  margin: 7px 0;
  color: var(--cyan-soft);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.privacy-note {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 31px;
  padding: 15px 14px;
  overflow: hidden;
  border: 1px solid rgba(105, 255, 199, 0.58);
  background:
    linear-gradient(135deg, rgba(105, 255, 199, 0.13), rgba(82, 232, 255, 0.035) 68%),
    rgba(2, 15, 19, 0.82);
  color: #a9c8c1;
  box-shadow:
    inset 3px 0 0 var(--green),
    0 0 22px rgba(105, 255, 199, 0.09);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

.privacy-note::after {
  position: absolute;
  right: -20px;
  bottom: -28px;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(105, 255, 199, 0.12);
  border-radius: 50%;
  content: "";
}

.privacy-note svg {
  position: relative;
  z-index: 1;
  flex: 0 0 25px;
  width: 25px;
  fill: var(--green);
  filter: drop-shadow(0 0 7px rgba(105, 255, 199, 0.45));
}

.privacy-note > div {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.privacy-note span {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
  font: 700 7px var(--mono);
  letter-spacing: 0.18em;
}

.privacy-note p {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
}

.privacy-note b {
  color: #d9fff0;
  font: 700 11px var(--sans);
  letter-spacing: 0.035em;
}

.privacy-note small {
  display: block;
  margin-top: 8px;
  color: #91ada6;
  font-size: 8px;
  line-height: 1.65;
}

.scanner-column {
  width: 100%;
  padding: 34px 0 24px;
}

.scanner-card {
  position: relative;
  border: 1px solid rgba(81, 205, 229, 0.25);
  background: rgba(3, 11, 17, 0.75);
  clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 22px, 100% calc(100% - 22px), calc(100% - 22px) 100%, 22px 100%, 0 calc(100% - 22px), 0 22px);
  box-shadow: 0 24px 75px rgba(0, 0, 0, 0.38);
  transition: border-color 400ms, box-shadow 400ms;
}

.scanner-card::before,
.scanner-card::after {
  position: absolute;
  z-index: 4;
  width: 90px;
  height: 2px;
  content: "";
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.scanner-card::before {
  top: 0;
  left: 45px;
}

.scanner-card::after {
  right: 45px;
  bottom: 0;
}

.scanner-meta {
  display: flex;
  height: 39px;
  align-items: center;
  justify-content: space-between;
  padding: 0 23px;
  color: #66818c;
  background: rgba(6, 20, 29, 0.85);
  font: 8px var(--mono);
  letter-spacing: 0.1em;
}

.scanner-meta b {
  color: var(--cyan);
  font-weight: 400;
}

.scanner-meta--top {
  border-bottom: 1px solid var(--line);
}

.scanner-meta--bottom {
  border-top: 1px solid var(--line);
}

.scanner-meta--top span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8fa8b0;
}

.viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 385px;
  background:
    radial-gradient(circle at 50% 42%, rgba(22, 82, 99, 0.28), transparent 34%),
    linear-gradient(145deg, #061019, #020609);
  isolation: isolate;
}

.viewport::before {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(91, 230, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 230, 255, 0.055) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(ellipse at center, black 15%, transparent 78%);
}

#camera,
#face-canvas {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

#camera {
  opacity: 0;
  filter: saturate(0.72) contrast(1.12) brightness(0.76) hue-rotate(4deg);
  transition: opacity 700ms, filter 500ms;
}

#face-canvas {
  z-index: 2;
}

.is-camera-live #camera {
  opacity: 0.8;
}

.is-wireframe #camera {
  opacity: 0.035;
  filter: grayscale(1) brightness(0.25) contrast(1.5);
}

.is-wireframe #face-canvas {
  filter: drop-shadow(0 0 4px rgba(82, 232, 255, 0.75));
}

.video-shade {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 12, 18, 0.38), transparent 22%, transparent 78%, rgba(0, 12, 18, 0.38)),
    linear-gradient(0deg, rgba(0, 10, 16, 0.3), transparent 25%);
}

.reticle {
  position: absolute;
  z-index: 5;
  inset: 23px;
  pointer-events: none;
  border: 1px solid rgba(107, 220, 241, 0.1);
}

.reticle > i {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(72, 223, 255, 0.12);
  transform: translate(-50%, -50%);
}

.reticle > i:nth-child(1) { width: 66%; aspect-ratio: 1; }
.reticle > i:nth-child(2) { width: 38%; aspect-ratio: 1; border-style: dashed; animation: spin 24s linear infinite; }
.reticle > i:nth-child(3) {
  width: 7px;
  height: 7px;
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.reticle-corner {
  position: absolute;
  width: 35px;
  height: 35px;
}

.reticle-corner::before,
.reticle-corner::after {
  position: absolute;
  content: "";
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(82, 232, 255, 0.45);
}

.reticle-corner::before { width: 35px; height: 2px; }
.reticle-corner::after { width: 2px; height: 35px; }
.c1 { top: -1px; left: -1px; }
.c2 { top: -1px; right: -1px; transform: scaleX(-1); }
.c3 { right: -1px; bottom: -1px; transform: scale(-1); }
.c4 { bottom: -1px; left: -1px; transform: scaleY(-1); }

.face-guide {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: min(36%, 270px);
  aspect-ratio: 0.76;
  border: 1px dashed rgba(82, 232, 255, 0.22);
  border-radius: 50% 50% 47% 47%;
  transform: translate(-50%, -54%);
  opacity: 0;
  transition: opacity 300ms;
}

.is-tracking .face-guide {
  opacity: 1;
}

.face-guide::before,
.face-guide::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  background: rgba(82, 232, 255, 0.18);
  transform: translate(-50%, -50%);
}

.face-guide::before { width: 120%; height: 1px; }
.face-guide::after { width: 1px; height: 110%; }

.guide-tick {
  position: absolute;
  width: 25px;
  height: 2px;
  background: var(--green);
  box-shadow: 0 0 7px var(--green);
}

.tick-1 { top: 15%; left: -12px; }
.tick-2 { top: 15%; right: -12px; }
.tick-3 { bottom: 14%; left: -12px; }
.tick-4 { right: -12px; bottom: 14%; }

.scanline {
  position: absolute;
  z-index: 6;
  top: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--white), var(--cyan), transparent);
  box-shadow: 0 0 12px 4px rgba(82, 232, 255, 0.28);
}

.is-tracking .scanline,
.is-analyzing .scanline {
  opacity: 0.85;
  animation: scan 2.7s linear infinite;
}

.is-analyzing .scanline {
  height: 3px;
  animation-duration: 1.1s;
  box-shadow: 0 0 28px 10px rgba(82, 232, 255, 0.35);
}

@keyframes scan {
  from { top: 0; }
  to { top: 100%; }
}

.flash {
  position: absolute;
  z-index: 15;
  inset: 0;
  pointer-events: none;
  background: #dffcff;
  opacity: 0;
}

.flash.is-active {
  animation: flash 620ms ease-out;
}

@keyframes flash {
  0% { opacity: 0; }
  10% { opacity: 1; }
  28% { opacity: 0.82; }
  100% { opacity: 0; }
}

.center-message {
  position: absolute;
  z-index: 8;
  top: 48%;
  left: 50%;
  width: min(520px, 75%);
  text-align: center;
  transform: translate(-50%, -50%);
  transition: opacity 250ms, transform 250ms;
}

.center-message::before {
  display: block;
  width: 46px;
  height: 1px;
  margin: 0 auto 13px;
  content: "";
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
}

.message-eyebrow {
  display: block;
  margin-bottom: 9px;
  color: var(--cyan);
  font: 8px var(--mono);
  letter-spacing: 0.24em;
}

.center-message strong {
  display: block;
  font-size: clamp(20px, 2.4vw, 31px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-shadow: 0 0 18px rgba(82, 232, 255, 0.18);
}

.center-message p {
  margin: 11px 0 0;
  color: #8ca3ac;
  font-size: 11px;
}

.center-message .operation-hint {
  display: inline-block;
  margin-top: 16px;
  padding: 7px 11px;
  border: 1px solid rgba(82, 232, 255, 0.24);
  color: var(--cyan-soft);
  background: rgba(3, 16, 24, 0.68);
  font-size: 10px;
  letter-spacing: 0.05em;
  box-shadow: 0 0 18px rgba(82, 232, 255, 0.06);
  animation: operation-hint-pulse 2.2s ease-in-out infinite;
}

@keyframes operation-hint-pulse {
  50% { border-color: rgba(82, 232, 255, 0.52); color: #effdff; }
}

.is-tracking .center-message {
  top: 17%;
}

.is-tracking .center-message strong {
  font-size: 17px;
}

.is-tracking .center-message p {
  display: none;
}

.is-analyzing .center-message,
.is-captured .center-message {
  opacity: 0;
  transform: translate(-50%, -45%);
}

.smile-meter {
  position: absolute;
  z-index: 8;
  bottom: 25px;
  left: 50%;
  width: min(390px, 70%);
  padding: 11px 16px 10px;
  border: 1px solid rgba(82, 232, 255, 0.22);
  background: rgba(3, 13, 20, 0.82);
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  backdrop-filter: blur(12px);
  transition: opacity 250ms, transform 250ms;
}

.is-tracking .smile-meter {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.meter-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #90a7b0;
  font: 8px var(--mono);
  letter-spacing: 0.15em;
}

.meter-head b {
  color: var(--green);
  font-size: 10px;
}

.meter-track {
  display: block;
  height: 4px;
  overflow: hidden;
  background: rgba(147, 217, 230, 0.11);
}

.meter-track i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  box-shadow: 0 0 9px var(--cyan);
  transition: width 90ms linear;
}

.smile-meter small {
  display: block;
  margin-top: 7px;
  color: #617f8a;
  font-size: 8px;
  text-align: center;
}

.analysis-overlay {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(4, 23, 33, 0.42), rgba(1, 7, 11, 0.75) 70%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(58, 223, 255, 0.028) 3px 4px);
  transition: opacity 350ms;
}

.is-analyzing .analysis-overlay {
  opacity: 1;
}

.analysis-hex {
  position: relative;
  display: grid;
  width: 168px;
  height: 168px;
  place-items: center;
}

.hex-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(82, 232, 255, 0.55);
  clip-path: polygon(25% 7%, 75% 7%, 100% 50%, 75% 93%, 25% 93%, 0 50%);
  background: rgba(5, 35, 48, 0.1);
  filter: drop-shadow(0 0 6px rgba(82, 232, 255, 0.35));
}

.ring-a {
  animation: hex-pulse 1.6s ease-in-out infinite;
}

.ring-b {
  inset: 17px;
  border-style: dashed;
  border-color: var(--green);
  animation: hex-spin 7s linear infinite;
}

@keyframes hex-pulse {
  50% { transform: scale(1.07); opacity: 0.48; }
}

@keyframes hex-spin {
  to { transform: rotate(360deg); }
}

.analysis-value {
  display: flex;
  align-items: baseline;
  font-family: var(--display);
}

.analysis-value b {
  color: var(--cyan-soft);
  font-size: 54px;
  line-height: 1;
  text-shadow: 0 0 15px rgba(82, 232, 255, 0.45);
}

.analysis-value span {
  color: var(--green);
  font-size: 14px;
}

.analysis-overlay > p {
  margin: 18px 0 10px;
  color: var(--cyan);
  font: 9px var(--mono);
  letter-spacing: 0.16em;
}

.analysis-log {
  width: 330px;
  min-height: 17px;
  color: #698a95;
  font: 7px/1.7 var(--mono);
  text-align: center;
  letter-spacing: 0.08em;
}

.scanner-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  transition: opacity 250ms;
}

.primary-button,
.secondary-button {
  position: relative;
  display: flex;
  min-height: 62px;
  align-items: center;
  border: 0;
  color: var(--white);
  cursor: pointer;
  transition: transform 180ms, filter 180ms, opacity 180ms;
}

.primary-button:hover,
.secondary-button:hover,
.text-button:hover {
  filter: brightness(1.18);
  transform: translateY(-2px);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(0);
}

.primary-button {
  min-width: 260px;
  gap: 13px;
  padding: 0 18px;
  background: linear-gradient(105deg, rgba(23, 128, 162, 0.86), rgba(11, 76, 105, 0.72));
  border: 1px solid rgba(82, 232, 255, 0.55);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  box-shadow: inset 0 0 22px rgba(82, 232, 255, 0.1), 0 0 20px rgba(27, 161, 193, 0.1);
}

.primary-button::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 22px;
  height: 2px;
  content: "";
  background: var(--green);
}

.primary-button span,
.secondary-button span {
  text-align: left;
}

.primary-button b,
.secondary-button b {
  display: block;
  font: 600 14px/1 var(--display);
  letter-spacing: 0.12em;
}

.primary-button small,
.secondary-button small {
  display: block;
  margin-top: 7px;
  color: #96b9c3;
  font-size: 8px;
}

.primary-button em {
  margin-left: auto;
  color: rgba(167, 239, 249, 0.38);
  font: normal 22px var(--display);
}

.button-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--cyan);
  transform: rotate(45deg);
}

.button-icon i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--green);
}

.secondary-button {
  min-width: 194px;
  gap: 13px;
  padding: 0 18px;
  border: 1px solid rgba(117, 184, 200, 0.25);
  background: rgba(5, 22, 31, 0.7);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.play-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(82, 232, 255, 0.35);
  border-radius: 50%;
  color: var(--cyan);
  font: 10px var(--mono);
  text-align: center !important;
}

.camera-help {
  margin: 11px 0 0;
  color: #526d76;
  font-size: 8px;
  text-align: center;
}

.side-panel--right {
  padding-left: 3px;
}

.telemetry-main {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 5px 0 23px;
  border-bottom: 1px solid var(--line);
}

.telemetry-main > p {
  margin: 0;
  color: #68828d;
  font: 8px/1.7 var(--mono);
  letter-spacing: 0.12em;
}

.radial-gauge {
  position: relative;
  width: 100px;
  height: 100px;
}

.radial-gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.radial-gauge circle {
  fill: none;
  stroke-width: 5;
}

.gauge-bg {
  stroke: rgba(91, 172, 188, 0.12);
}

.gauge-value {
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-dasharray: 320.44;
  stroke-dashoffset: 320.44;
  filter: drop-shadow(0 0 4px var(--cyan));
  transition: stroke-dashoffset 120ms linear;
}

.radial-gauge > div {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.radial-gauge b {
  color: var(--cyan-soft);
  font: 700 31px/1 var(--display);
}

.radial-gauge small {
  margin-top: 3px;
  color: var(--green);
  font: 7px var(--mono);
  letter-spacing: 0.11em;
}

.signal-row {
  display: grid;
  align-items: center;
  margin-top: 18px;
  grid-template-columns: 1fr 72px 34px;
  gap: 9px;
  font-family: var(--mono);
}

.signal-row > span {
  color: #6a838d;
  font-size: 7px;
  letter-spacing: 0.06em;
}

.signal-row > div {
  height: 3px;
  background: rgba(107, 187, 202, 0.12);
}

.signal-row i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 0 6px rgba(82, 232, 255, 0.6);
  transition: width 130ms linear;
}

.signal-row > b {
  color: #9cc1cc;
  font-size: 8px;
  font-weight: 400;
  text-align: right;
}

.pose-readout {
  margin-top: 29px;
  padding: 15px;
  border: 1px solid var(--line);
  background: rgba(6, 23, 32, 0.45);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.pose-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #87a0a9;
  font: 8px var(--mono);
  letter-spacing: 0.1em;
}

.pose-head i {
  color: var(--green);
  font-style: normal;
}

.pose-visual {
  display: flex;
  align-items: center;
  gap: 16px;
}

.head-orbit {
  position: relative;
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  border: 1px solid rgba(82, 232, 255, 0.26);
  border-radius: 50%;
  background:
    linear-gradient(transparent calc(50% - .5px), rgba(82, 232, 255, 0.2) 50%, transparent calc(50% + .5px)),
    linear-gradient(90deg, transparent calc(50% - .5px), rgba(82, 232, 255, 0.2) 50%, transparent calc(50% + .5px));
}

.head-orbit::before {
  position: absolute;
  inset: 9px 18px;
  border: 1px solid rgba(82, 232, 255, 0.2);
  border-radius: 50%;
  content: "";
}

.head-orbit span {
  position: absolute;
  top: calc(50% - 3px);
  left: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  transition: transform 120ms linear;
}

.axis-values {
  flex: 1;
}

.axis-values p {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
  color: #66818b;
  font: 7px var(--mono);
}

.axis-values b {
  color: #b1d1d9;
  font-size: 8px;
  font-weight: 400;
}

.system-note {
  margin-top: 24px;
  padding-left: 13px;
  border-left: 1px solid var(--green);
}

.system-note span {
  color: var(--green);
  font: 7px var(--mono);
  letter-spacing: 0.12em;
}

.system-note p {
  margin: 7px 0 0;
  color: #718a94;
  font-size: 9px;
  line-height: 1.65;
}

.footer {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  border-top: 1px solid rgba(90, 192, 211, 0.1);
  color: #3f5963;
  font: 7px var(--mono);
  letter-spacing: 0.1em;
}

.toast {
  position: fixed;
  z-index: 30;
  bottom: 25px;
  left: 50%;
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 18px;
  border: 1px solid rgba(82, 232, 255, 0.35);
  background: rgba(3, 18, 26, 0.94);
  color: var(--cyan-soft);
  font-size: 10px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: 250ms;
  backdrop-filter: blur(14px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Result reveal sequence */
.result-reveal {
  position: relative;
  display: none;
  overflow: hidden;
  width: 100%;
  min-height: calc(100vh - 126px);
  grid-column: 1 / -1;
  background:
    radial-gradient(circle at 50% 46%, rgba(21, 113, 143, 0.22), transparent 35%),
    linear-gradient(145deg, rgba(3, 13, 20, 0.98), rgba(2, 7, 12, 0.96));
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
  cursor: pointer;
}

.result-reveal:focus-visible {
  outline: 1px solid rgba(82, 232, 255, 0.72);
  outline-offset: 4px;
}

.result-reveal::before,
.result-reveal::after {
  position: absolute;
  z-index: 2;
  left: 50%;
  content: "";
  transform: translateX(-50%);
}

.result-reveal::before {
  top: 0;
  width: 36%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 13px var(--cyan);
}

.result-reveal::after {
  bottom: 0;
  width: 18%;
  height: 1px;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.reveal-grid {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(82, 232, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 232, 255, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, #000, transparent 80%);
}

.app-shell.is-revealing {
  display: block;
  width: min(1320px, calc(100% - 56px));
}

.app-shell.is-revealing > .side-panel,
.app-shell.is-revealing > .scanner-column,
.app-shell.is-revealing > .result-dashboard {
  display: none;
}

.app-shell.is-revealing .result-reveal {
  display: block;
}

.reveal-step {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 35px;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translateY(18px) scale(0.985);
  filter: blur(5px);
}

.reveal-step.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  animation: reveal-step-in 580ms cubic-bezier(.17,.8,.24,1) both;
}

@keyframes reveal-step-in {
  from { opacity: 0; transform: translateY(18px) scale(.98); filter: blur(6px); }
}

.reveal-step > small {
  color: var(--cyan);
  font: 8px var(--mono);
  letter-spacing: 0.22em;
}

.reveal-step--complete {
  isolation: isolate;
}

.reveal-step--complete > *:not(.reveal-complete-fx) {
  position: relative;
  z-index: 2;
}

.reveal-complete-fx {
  position: absolute;
  z-index: 1;
  inset: 7% 5%;
  overflow: hidden;
  border: 1px solid rgba(82, 232, 255, 0.08);
  background:
    linear-gradient(90deg, transparent, rgba(82, 232, 255, 0.025), transparent),
    repeating-linear-gradient(0deg, rgba(82, 232, 255, 0.018) 0 1px, transparent 1px 5px);
  opacity: 0;
  pointer-events: none;
}

.reveal-step--complete.is-active .reveal-complete-fx {
  animation: complete-fx-in 420ms 80ms ease-out forwards;
}

.reveal-complete-fx::before {
  position: absolute;
  top: -12%;
  right: 0;
  left: 0;
  height: 9%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(82, 232, 255, 0.18), transparent);
  box-shadow: 0 0 18px rgba(82, 232, 255, 0.16);
}

.reveal-step--complete.is-active .reveal-complete-fx::before {
  animation: complete-scanline 1.8s 120ms cubic-bezier(.22,.7,.25,1) both;
}

.reveal-complete-fx::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    repeating-linear-gradient(90deg, transparent 0 11px, rgba(104, 246, 163, 0.08) 12px, transparent 13px 29px),
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(82, 232, 255, 0.05) 18px, transparent 19px 41px);
  mix-blend-mode: screen;
  opacity: 0;
}

.reveal-step--complete.is-active .reveal-complete-fx::after {
  animation: complete-noise 1.35s 260ms steps(7, end) both;
}

.reveal-complete-fx i {
  position: absolute;
  right: 8%;
  left: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(82, 232, 255, 0.52), transparent 72%);
  opacity: 0;
  transform: scaleX(0.2);
}

.reveal-complete-fx i:nth-child(1) { top: 24%; }
.reveal-complete-fx i:nth-child(2) { top: 51%; }
.reveal-complete-fx i:nth-child(3) { top: 76%; }

.reveal-step--complete.is-active .reveal-complete-fx i {
  animation: complete-data-line 720ms 360ms ease-out both;
}

.reveal-step--complete.is-active .reveal-complete-fx i:nth-child(2) { animation-delay: 520ms; }
.reveal-step--complete.is-active .reveal-complete-fx i:nth-child(3) { animation-delay: 680ms; }

@keyframes complete-fx-in {
  to { opacity: 1; }
}

@keyframes complete-scanline {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateY(1180%); opacity: 0; }
}

@keyframes complete-noise {
  0%, 100% { opacity: 0; transform: translate(0); }
  18% { opacity: 0.34; transform: translateX(-2px); }
  24% { opacity: 0.08; transform: translateX(3px); }
  48% { opacity: 0.2; transform: translateY(1px); }
  55% { opacity: 0; }
}

@keyframes complete-data-line {
  0% { opacity: 0; transform: translateX(-20%) scaleX(.2); }
  45% { opacity: .7; }
  100% { opacity: 0; transform: translateX(20%) scaleX(1); }
}

.reveal-complete-hex {
  position: relative;
  display: grid;
  width: 96px;
  height: 88px;
  margin-bottom: 22px;
  place-items: center;
  border: 1px solid var(--green);
  background: rgba(104, 246, 163, 0.08);
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
  filter: drop-shadow(0 0 16px rgba(104, 246, 163, 0.45));
}

.reveal-complete-hex::before {
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(82, 232, 255, 0.62);
  content: "";
  clip-path: inherit;
  animation: hex-spin 7s linear infinite;
}

.reveal-complete-hex span {
  color: var(--green);
  font: 700 32px var(--display);
}

.reveal-step--complete h1 {
  margin: 14px 0 10px;
  color: var(--cyan-soft);
  font: 500 clamp(46px, 6vw, 78px)/0.86 var(--display);
  letter-spacing: 0.12em;
}

.reveal-step--complete.is-active h1 {
  animation:
    complete-title-in 820ms 160ms cubic-bezier(.16,.8,.24,1) both,
    complete-title-glitch 360ms 780ms steps(2, end) both;
}

.reveal-step--complete h1 b {
  color: var(--green);
  font-weight: 700;
  text-shadow: 0 0 22px rgba(104, 246, 163, 0.4);
}

.reveal-complete-telemetry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
  padding: 7px 12px;
  border-top: 1px solid rgba(82, 232, 255, 0.14);
  border-bottom: 1px solid rgba(82, 232, 255, 0.08);
  color: #5e7d87;
  background: rgba(2, 12, 18, 0.56);
  font: 6px var(--mono);
  letter-spacing: 0.1em;
}

.reveal-complete-telemetry span {
  opacity: 0;
}

.reveal-complete-telemetry b {
  margin-right: 4px;
  color: var(--cyan);
  font-weight: 400;
}

.reveal-step--complete.is-active .reveal-complete-telemetry span {
  animation: complete-data-in 360ms 620ms ease-out forwards;
}

.reveal-step--complete.is-active .reveal-complete-telemetry span:nth-child(2) {
  animation-delay: 780ms;
}

.reveal-step--complete.is-active .reveal-complete-telemetry span:nth-child(3) {
  animation-delay: 940ms;
}

@keyframes complete-title-in {
  from { opacity: 0; transform: translateY(10px); letter-spacing: .2em; filter: blur(5px); }
}

@keyframes complete-title-glitch {
  0%, 100% { transform: translate(0); text-shadow: 0 0 22px rgba(82, 232, 255, .18); }
  22% { transform: translate(-2px, 1px) skewX(-1.5deg); text-shadow: 3px 0 rgba(82, 232, 255, .42), -3px 0 rgba(104, 246, 163, .3); }
  44% { transform: translate(3px, -1px) skewX(1deg); }
  68% { transform: translate(-1px); text-shadow: -2px 0 rgba(82, 232, 255, .3), 2px 0 rgba(104, 246, 163, .24); }
}

@keyframes complete-data-in {
  from { opacity: 0; transform: translateY(4px); filter: blur(2px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.reveal-step--complete p,
.reveal-step--radar > p {
  color: #6f8a95;
  font-size: 10px;
}

.reveal-step--university > p {
  margin: 18px 0 -4px;
  color: var(--white);
  font-size: clamp(19px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.reveal-university-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  color: var(--cyan-soft);
  font-family: var(--display);
}

.reveal-university-score b {
  min-width: 210px;
  font-size: clamp(118px, 18vw, 210px);
  line-height: 0.92;
  text-align: right;
  text-shadow: 0 0 35px rgba(82, 232, 255, 0.34);
}

.reveal-university-score span {
  color: var(--green);
  font-size: clamp(30px, 5vw, 58px);
}

.reveal-score-line {
  width: min(560px, 75vw);
  height: 3px;
  overflow: hidden;
  background: rgba(82, 232, 255, 0.1);
}

.reveal-step--university.is-active .reveal-score-line i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
  box-shadow: 0 0 13px var(--cyan);
  animation: reveal-line 1.25s 180ms ease-out forwards;
}

@keyframes reveal-line {
  to { width: 100%; }
}

.reveal-step--university em,
.reveal-step--course em {
  margin-top: 14px;
  color: var(--green);
  font: normal 8px var(--mono);
  letter-spacing: 0.17em;
}

.reveal-step--radar {
  width: min(780px, 88%);
  margin: auto;
  place-content: stretch;
  align-content: center;
}

.reveal-heading {
  display: flex;
  width: 100%;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.reveal-heading h2 {
  margin: 5px 0 0;
  font: 600 21px var(--display);
  letter-spacing: 0.08em;
}

.reveal-heading > span {
  color: var(--lime);
  font: 8px var(--mono);
}

.reveal-radar-wrap {
  width: 100%;
  height: min(410px, 55vh);
}

.reveal-step--radar > p {
  margin: 0;
}

.reveal-step--course > p {
  margin: 19px 0 18px;
  color: #8aa4ae;
  font-size: 13px;
}

.reveal-course-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.reveal-course-lockup > span {
  display: grid;
  width: 78px;
  height: 70px;
  place-items: center;
  border: 1px solid var(--lime);
  color: var(--lime);
  background: rgba(183, 255, 91, 0.06);
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
  font: 7px/1.4 var(--mono);
  letter-spacing: 0.12em;
  filter: drop-shadow(0 0 12px rgba(183, 255, 91, 0.35));
}

.reveal-course-lockup h1 {
  margin: 0;
  color: var(--cyan-soft);
  font-size: clamp(32px, 5.4vw, 70px);
  line-height: 1.2;
  text-shadow: 0 0 24px rgba(82, 232, 255, 0.25);
}

.reveal-course-score {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-top: 8px;
  color: var(--lime);
  font-family: var(--display);
}

.reveal-step--course.is-active .reveal-course-score {
  animation: course-score-lock 720ms 120ms ease-out both;
}

.reveal-course-score::after {
  position: absolute;
  right: 8%;
  bottom: -8px;
  left: 8%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
  box-shadow: 0 0 8px rgba(183, 255, 91, 0.45);
  transform: scaleX(0);
}

.reveal-step--course.is-active .reveal-course-score::after {
  animation: course-score-line 1.45s 160ms ease-out forwards;
}

@keyframes course-score-lock {
  from { opacity: 0; transform: translateY(8px) scale(.94); filter: blur(4px); }
}

@keyframes course-score-line {
  60%, 100% { transform: scaleX(1); }
}

.reveal-course-score b {
  font-size: clamp(66px, 9vw, 104px);
  line-height: 0.9;
  text-shadow: 0 0 22px rgba(183, 255, 91, 0.4);
}

.reveal-course-score span {
  font-size: 27px;
}

.reveal-progress {
  position: absolute;
  z-index: 5;
  bottom: 28px;
  left: 50%;
  display: flex;
  gap: 25px;
  transform: translateX(-50%);
}

.reveal-progress::before {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: 5px;
  left: 5px;
  height: 1px;
  content: "";
  background: rgba(82, 232, 255, 0.16);
}

.reveal-progress span {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(82, 232, 255, 0.35);
  background: var(--bg);
  transform: rotate(45deg);
  transition: 350ms;
}

.reveal-progress span.is-active {
  border-color: var(--lime);
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}

.reveal-progress span.is-complete {
  border-color: var(--cyan);
  background: var(--cyan);
}

.reveal-advance-hint {
  position: absolute;
  z-index: 5;
  bottom: 53px;
  left: 50%;
  padding: 5px 11px;
  border: 1px solid rgba(82, 232, 255, 0.14);
  color: rgba(150, 194, 205, 0.68);
  background: rgba(2, 10, 16, 0.72);
  font: 7px var(--mono);
  letter-spacing: 0.1em;
  white-space: nowrap;
  transform: translateX(-50%);
  animation: reveal-hint-pulse 2.2s ease-in-out infinite;
}

.reveal-advance-hint::before {
  margin-right: 7px;
  color: var(--cyan);
  content: "›";
}

.reveal-advance-hint--mobile {
  display: none;
}

@keyframes reveal-hint-pulse {
  50% { opacity: 0.52; }
}

.reveal-sequence-label {
  position: absolute;
  z-index: 4;
  right: 24px;
  bottom: 20px;
  color: #47636d;
  font: 7px var(--mono);
  letter-spacing: 0.1em;
}

/* Result dashboard */
.result-dashboard {
  display: none;
  width: 100%;
  padding: 36px 0 28px;
  grid-column: 1 / -1;
}

.app-shell.has-result {
  display: block;
  width: min(1260px, calc(100% - 56px));
}

.app-shell.has-result > .side-panel,
.app-shell.has-result > .scanner-column {
  display: none;
}

.app-shell.has-result .result-dashboard {
  display: block;
  animation: result-in 700ms cubic-bezier(.17,.8,.24,1) both;
}

@keyframes result-in {
  from { opacity: 0; transform: translateY(15px) scale(.99); filter: blur(5px); }
}

.result-topline,
.archive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.result-topline > div,
.archive-header > div:first-child {
  display: flex;
  align-items: center;
  gap: 13px;
}

.complete-check {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #021009;
  background: var(--green);
  font: 700 19px var(--display);
  clip-path: polygon(25% 4%, 75% 4%, 98% 50%, 75% 96%, 25% 96%, 2% 50%);
  filter: drop-shadow(0 0 8px rgba(104, 246, 163, 0.5));
}

.result-topline p,
.archive-header p {
  margin: 0;
  font-family: var(--display);
}

.result-topline small,
.archive-header small {
  display: block;
  color: var(--green);
  font-size: 9px;
  letter-spacing: 0.22em;
}

.result-topline p b,
.archive-header p b {
  display: block;
  margin-top: 2px;
  color: var(--cyan-soft);
  font-size: 22px;
  letter-spacing: 0.13em;
}

.result-topline > span {
  color: #56717c;
  font: 8px var(--mono);
  letter-spacing: 0.1em;
}

.result-grid {
  display: grid;
  grid-template-columns: 1.22fr 0.78fr;
  gap: 14px;
}

.glass-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(83, 201, 224, 0.18);
  background:
    linear-gradient(120deg, rgba(15, 50, 65, 0.4), rgba(5, 18, 27, 0.82) 55%),
    rgba(5, 17, 25, 0.75);
  clip-path: polygon(13px 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%, 0 13px);
  backdrop-filter: blur(14px);
}

.glass-panel::after {
  position: absolute;
  top: 0;
  left: 20px;
  width: 55px;
  height: 1px;
  content: "";
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.result-hero {
  min-height: 275px;
  padding: 29px 34px;
  background:
    radial-gradient(circle at 20% 28%, rgba(40, 178, 209, 0.18), transparent 33%),
    linear-gradient(120deg, rgba(11, 50, 65, 0.62), rgba(4, 15, 23, 0.85));
}

.result-kicker {
  color: var(--cyan);
  font: 8px var(--mono);
  letter-spacing: 0.16em;
}

.score-lockup {
  display: flex;
  align-items: center;
  gap: 29px;
  margin-top: 24px;
}

.score-number {
  display: flex;
  align-items: baseline;
  min-width: 145px;
  color: var(--cyan-soft);
  font-family: var(--display);
}

.score-number b {
  font-size: 92px;
  line-height: 0.8;
  text-shadow: 0 0 25px rgba(82, 232, 255, 0.25);
}

.score-number span {
  color: var(--green);
  font-size: 25px;
}

.stars {
  color: var(--lime);
  font-size: 14px;
  letter-spacing: 0.25em;
  text-shadow: 0 0 8px rgba(183, 255, 91, 0.38);
}

.score-lockup h1 {
  margin: 5px 0 3px;
  font-size: 27px;
}

.score-lockup p {
  margin: 0;
  color: #86a1ab;
  font-size: 10px;
  line-height: 1.7;
}

.department-seal {
  margin-top: 27px;
  padding: 13px 16px;
  border-left: 2px solid var(--green);
  background: linear-gradient(90deg, rgba(31, 123, 101, 0.15), transparent);
}

.department-seal span,
.department-seal small {
  display: block;
  color: #699189;
  font: 7px var(--mono);
  letter-spacing: 0.1em;
}

.department-seal b {
  display: block;
  margin: 3px 0 5px;
  font-size: 19px;
}

.best-course {
  min-height: 275px;
  padding: 28px 31px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(34, 111, 148, 0.23), transparent 40%),
    rgba(5, 17, 26, 0.86);
}

.corner-label {
  position: absolute;
  top: 14px;
  right: 17px;
  color: #55727d;
  font: 7px var(--mono);
  letter-spacing: 0.1em;
}

.hex-badge {
  display: grid;
  width: 64px;
  height: 58px;
  margin: 0 auto 11px;
  place-items: center;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
  background: rgba(82, 232, 255, 0.06);
  filter: drop-shadow(0 0 8px rgba(82, 232, 255, 0.3));
}

.hex-badge span {
  font: 7px/1.35 var(--mono);
  letter-spacing: 0.1em;
}

.best-course > small {
  color: #657f89;
  font: 7px var(--mono);
  letter-spacing: 0.14em;
}

.best-course h2 {
  margin: 8px 0 3px;
  color: var(--cyan-soft);
  font-size: 20px;
}

.best-score {
  display: flex;
  justify-content: center;
  align-items: baseline;
  color: var(--green);
  font-family: var(--display);
}

.best-score b {
  font-size: 50px;
  line-height: 1;
}

.best-score span {
  font-size: 16px;
}

.best-course p {
  max-width: 320px;
  margin: 10px auto 0;
  color: #819ca5;
  font-size: 9px;
  line-height: 1.75;
}

.course-panel,
.radar-panel {
  min-height: 310px;
  padding: 24px 27px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.section-heading small {
  display: block;
  color: var(--cyan);
  font: 7px var(--mono);
  letter-spacing: 0.16em;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: 17px;
}

.section-heading > span {
  color: #536f7b;
  font: 7px var(--mono);
  letter-spacing: 0.08em;
}

.course-bars {
  display: grid;
  gap: 17px;
  margin-top: 19px;
}

.course-row {
  position: relative;
}

.course-row.is-breakout .course-bar-head strong,
.course-row.is-breakout .course-bar-head b {
  color: var(--lime);
  text-shadow: 0 0 10px rgba(183, 255, 91, 0.48);
}

.course-row.is-breakout .course-bar-head > div::after {
  margin-left: 4px;
  padding: 2px 5px;
  border: 1px solid rgba(183, 255, 91, 0.5);
  color: var(--lime);
  content: "限界突破";
  font: 6px var(--mono);
  letter-spacing: 0.08em;
}

.course-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.course-bar-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.course-index {
  color: var(--cyan);
  font: 8px var(--mono);
}

.course-bar-head strong {
  font-size: 11px;
  font-weight: 600;
}

.course-bar-head b {
  color: var(--cyan-soft);
  font: 600 16px var(--display);
}

.course-bar-head b small {
  color: var(--green);
  font-size: 9px;
}

.course-track {
  position: relative;
  height: 5px;
  background: rgba(112, 185, 199, 0.09);
}

.course-track i {
  position: relative;
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
  box-shadow: 0 0 8px rgba(82, 232, 255, 0.35);
  animation: bar-grow 900ms 200ms ease-out forwards;
}

.course-row.is-breakout .course-track i {
  background: linear-gradient(90deg, var(--blue), var(--cyan) 70%, var(--lime));
  box-shadow: 0 0 13px rgba(183, 255, 91, 0.75);
}

.course-row.is-breakout .course-track i::after {
  position: absolute;
  top: 50%;
  right: -5px;
  width: 9px;
  height: 9px;
  content: "";
  background: var(--lime);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  filter: drop-shadow(0 0 6px var(--lime));
  transform: translateY(-50%);
}

@keyframes bar-grow {
  to { width: var(--score); }
}

.course-track::after {
  position: absolute;
  top: -2px;
  left: 80%;
  width: 1px;
  height: 9px;
  content: "";
  background: rgba(255, 255, 255, 0.16);
}

.chart-wrap {
  position: relative;
  height: 230px;
  margin-top: 5px;
}

.chart-wrap canvas,
.reveal-radar-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.share-panel {
  display: flex;
  min-height: 235px;
  align-items: center;
  gap: 27px;
  padding: 26px 32px;
  grid-column: 1 / -1;
}

.qr-wrap {
  display: grid;
  width: 168px;
  height: 168px;
  flex: 0 0 168px;
  place-items: center;
  padding: 11px;
  border: 1px solid rgba(82, 232, 255, 0.5);
  background: #efffff;
  box-shadow: 0 0 28px rgba(82, 232, 255, 0.16);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.qr-wrap img,
.qr-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.qr-fallback {
  color: #061119;
  font: 700 11px/1.6 var(--mono);
  text-align: center;
}

.share-copy small {
  color: var(--cyan);
  font: 7px var(--mono);
  letter-spacing: 0.18em;
}

.share-copy h2 {
  margin: 7px 0 8px;
  font-size: 23px;
  line-height: 1.35;
}

.share-copy p {
  max-width: 34em;
  margin: 0;
  color: #c6e8e7;
  font-size: 14px;
  line-height: 1.75;
}

.share-copy a {
  color: var(--cyan);
  font-size: 9px;
  text-decoration: none;
}

.share-copy a span {
  margin-left: 7px;
}

.expiry {
  margin-left: auto;
  padding-left: 28px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.expiry span {
  display: block;
  color: #5d7882;
  font: 7px var(--mono);
}

.expiry b {
  display: block;
  margin-top: 5px;
  color: var(--green);
  font: 500 25px var(--display);
  letter-spacing: 0.08em;
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
}

.save-status {
  color: #719184;
  font: 7px var(--mono);
  letter-spacing: 0.1em;
}

.save-status i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.result-wireframe {
  padding: 20px;
}

.result-wireframe-stage {
  position: relative;
  overflow: hidden;
  height: calc(100% - 48px);
  min-height: 210px;
  margin-top: 10px;
  border: 1px solid var(--line);
  background: radial-gradient(circle, rgba(22, 85, 104, 0.24), rgba(1, 7, 11, 0.82));
}

.result-wireframe-stage img,
.result-wireframe-stage canvas,
.result-wireframe-stage .snapshot-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.result-wireframe-stage img {
  object-fit: contain;
  filter: drop-shadow(0 0 7px rgba(82, 232, 255, 0.3));
}

.result-wireframe-stage > span {
  position: absolute;
  z-index: 2;
  right: 9px;
  bottom: 7px;
  color: #53717c;
  font: 6px var(--mono);
  letter-spacing: 0.08em;
}

@media (min-width: 821px) {
  .app-shell.has-result {
    width: min(1500px, calc(100% - 44px));
    min-height: calc(100vh - 126px);
  }

  .result-dashboard {
    min-height: calc(100vh - 126px);
    padding: 13px 0 9px;
  }

  .result-topline {
    min-height: 43px;
    margin-bottom: 9px;
    padding-bottom: 8px;
  }

  .result-topline .complete-check {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .result-topline p b {
    font-size: 18px;
  }

  .result-topline small {
    font-size: 7px;
  }

  .result-grid {
    height: calc(100vh - 251px);
    min-height: 438px;
    max-height: 570px;
    grid-template-areas:
      "wireframe hero radar"
      "best course share";
    grid-template-columns: .86fr .96fr 1.18fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .result-wireframe { grid-area: wireframe; }
  .result-hero { grid-area: hero; }
  .best-course { grid-area: best; }
  .result-grid > .course-panel { grid-area: course; }
  .result-grid > .radar-panel { grid-area: radar; }
  .share-panel { grid-area: share; }

  .result-grid > .glass-panel {
    min-height: 0;
  }

  .result-wireframe,
  .result-hero,
  .best-course,
  .result-grid > .course-panel,
  .result-grid > .radar-panel,
  .share-panel {
    padding: 15px 17px;
  }

  .result-grid > .radar-panel {
    padding: 8px 10px;
  }

  .result-grid > .radar-panel .section-heading {
    padding-bottom: 4px;
  }

  .result-wireframe .section-heading,
  .result-grid .section-heading {
    padding-bottom: 8px;
  }

  .result-grid .section-heading h2 {
    font-size: 14px;
  }

  .result-wireframe-stage {
    height: calc(100% - 37px);
    min-height: 0;
    margin-top: 7px;
  }

  .result-hero {
    background:
      radial-gradient(circle at 20% 28%, rgba(40, 178, 209, 0.18), transparent 33%),
      linear-gradient(120deg, rgba(11, 50, 65, 0.62), rgba(4, 15, 23, 0.85));
  }

  .score-lockup {
    gap: 17px;
    margin-top: 13px;
  }

  .score-number {
    min-width: 105px;
  }

  .score-number b {
    font-size: clamp(58px, 5.2vw, 78px);
  }

  .score-number span {
    font-size: 20px;
  }

  .stars {
    font-size: 10px;
  }

  .score-lockup h1 {
    margin-top: 3px;
    font-size: 21px;
  }

  .score-lockup p {
    font-size: 8px;
  }

  .department-seal {
    margin-top: 13px;
    padding: 9px 12px;
  }

  .department-seal b {
    font-size: 15px;
  }

  .hex-badge {
    width: 48px;
    height: 44px;
    margin-bottom: 6px;
  }

  .best-course > small {
    font-size: 6px;
  }

  .best-course h2 {
    margin-top: 6px;
    font-size: clamp(16px, 1.7vw, 21px);
  }

  .best-score b {
    font-size: 41px;
  }

  .best-course p {
    margin-top: 6px;
    font-size: 8px;
    line-height: 1.55;
  }

  .course-bars {
    gap: clamp(7px, 1.1vh, 12px);
    margin-top: 10px;
  }

  .course-bar-head {
    margin-bottom: 5px;
  }

  .course-bar-head strong {
    font-size: 9px;
  }

  .course-bar-head b {
    font-size: 14px;
  }

  .course-row.is-breakout .course-bar-head > div::after {
    font-size: 5px;
  }

  .result-grid .chart-wrap {
    height: calc(100% - 39px);
    min-height: 170px;
    margin-top: 0;
  }

  .result-grid > .radar-panel .chart-wrap {
    height: calc(100% - 28px);
    min-height: 182px;
  }

  .share-panel {
    display: grid;
    align-items: center;
    grid-template-columns: 116px 1fr;
    gap: 12px;
  }

  .share-panel .qr-wrap {
    width: 110px;
    height: 110px;
    flex-basis: 110px;
    padding: 7px;
  }

  .share-copy h2 {
    margin: 4px 0 5px;
    font-size: 17px;
  }

  .share-copy p {
    margin-bottom: 7px;
    font-size: 7px;
  }

  .share-copy a {
    font-size: 8px;
  }

  .expiry {
    position: absolute;
    right: 13px;
    bottom: 10px;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .expiry b {
    font-size: 16px;
  }

  .result-actions {
    min-height: 44px;
    margin-top: 7px;
  }

  .result-actions .secondary-button {
    min-height: 42px;
    padding: 0 13px;
  }

  .result-actions .secondary-button small {
    display: none;
  }
}

/* Standalone result */
.result-page-body {
  min-height: 100vh;
}

.standalone-result {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 82px);
  margin: 0 auto;
  padding: 44px 0;
}

.result-loading {
  display: grid;
  min-height: 60vh;
  place-content: center;
  justify-items: center;
}

.result-loading p {
  margin-top: 20px;
  color: var(--cyan);
  font: 8px var(--mono);
  letter-spacing: 0.19em;
}

.loader-hex {
  position: relative;
  width: 76px;
  height: 70px;
  border: 1px solid var(--cyan);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
  animation: hex-spin 3s linear infinite;
}

.loader-hex i,
.loader-hex span {
  position: absolute;
  inset: 11px;
  border: 1px dashed var(--green);
  clip-path: inherit;
}

.loader-hex span {
  inset: 27px;
  border: 0;
  background: var(--cyan);
}

.result-error {
  max-width: 620px;
  margin: 13vh auto 0;
  padding: 45px;
  border-left: 2px solid var(--danger);
  background: rgba(8, 20, 29, 0.65);
}

.error-code {
  color: var(--danger);
  font: 8px var(--mono);
  letter-spacing: 0.16em;
}

.result-error h1 {
  margin: 14px 0;
  font-size: 28px;
}

.result-error p {
  margin-bottom: 28px;
  color: #819aa4;
  font-size: 12px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 12px 16px;
  border: 1px solid rgba(82, 232, 255, 0.3);
  color: var(--cyan);
  font-size: 10px;
  text-decoration: none;
  transition: 180ms;
}

.archive-card {
  animation: result-in 600ms both;
}

.archive-meta {
  display: flex;
  gap: 22px;
  color: #5c7680;
  font: 7px var(--mono);
}

.archive-meta b {
  color: #9bbbc4;
  font-weight: 400;
}

.archive-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
}

.archive-wireframe,
.archive-university,
.archive-comment-panel,
.archive-qr-panel {
  padding: 25px;
}

.archive-wireframe .wireframe-snapshot {
  min-height: 285px;
  margin-top: 14px;
}

.archive-university {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 45%, rgba(40, 178, 209, 0.17), transparent 38%),
    rgba(5, 18, 27, 0.82);
}

.archive-university > small,
.archive-comment-panel > small,
.archive-qr-panel small {
  color: var(--cyan);
  font: 7px var(--mono);
  letter-spacing: 0.16em;
}

.archive-university h1 {
  margin: 9px 0 20px;
  font-size: clamp(24px, 3vw, 37px);
}

.archive-university > div {
  display: flex;
  align-items: baseline;
  color: var(--cyan-soft);
  font-family: var(--display);
}

.archive-university > div b {
  font-size: 88px;
  line-height: 0.9;
}

.archive-university > div span {
  color: var(--green);
  font-size: 24px;
}

.archive-university > div em {
  margin-left: 15px;
  color: var(--lime);
  font: normal 19px var(--sans);
}

.archive-university > p {
  max-width: 440px;
  margin: 19px 0 0;
  color: #829da7;
  font-size: 10px;
  line-height: 1.8;
}

.archive-comment-panel {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  justify-content: center;
}

.archive-comment-panel h2 {
  margin: 8px 0 16px;
  font-size: 22px;
}

.archive-comment-panel p {
  margin: 0;
  padding-left: 16px;
  border-left: 2px solid var(--green);
  color: #8ca7b1;
  font-size: 12px;
  line-height: 2;
}

.archive-qr-panel {
  display: flex;
  min-height: 210px;
  align-items: center;
  gap: 28px;
  grid-column: 1 / -1;
}

.archive-qr-panel .qr-wrap {
  width: 150px;
  height: 150px;
  flex-basis: 150px;
}

.archive-qr-panel h2 {
  margin: 7px 0;
  font-size: 23px;
}

.archive-qr-panel p {
  margin: 0 0 13px;
  color: #7e98a2;
  font-size: 10px;
}

.archive-qr-panel a {
  color: var(--cyan);
  font-size: 9px;
  text-decoration: none;
}

.archive-summary {
  display: grid;
  min-height: 310px;
  padding: 25px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(280px, .85fr) 1.15fr;
  gap: 32px;
}

.wireframe-snapshot {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border: 1px solid var(--line);
  background: radial-gradient(circle, rgba(22, 85, 104, 0.24), rgba(1, 7, 11, 0.78));
}

.wireframe-snapshot img,
.wireframe-snapshot canvas,
.snapshot-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wireframe-snapshot img {
  object-fit: contain;
  filter: drop-shadow(0 0 7px rgba(82, 232, 255, 0.28));
}

.snapshot-grid {
  background-image:
    linear-gradient(rgba(82, 232, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 232, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle, black, transparent 75%);
}

.wireframe-snapshot > span {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: #52707b;
  font: 6px var(--mono);
  letter-spacing: 0.1em;
}

.archive-score {
  align-self: center;
}

.archive-score > small {
  color: var(--cyan);
  font: 8px var(--mono);
  letter-spacing: 0.13em;
}

.archive-score h1 {
  margin: 8px 0 20px;
  font-size: clamp(24px, 3vw, 38px);
}

.archive-score > div {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--cyan-soft);
  font-family: var(--display);
}

.archive-score > div b {
  font-size: 78px;
  line-height: 1;
}

.archive-score > div span {
  color: var(--green);
  font-size: 22px;
}

.archive-score > div em {
  margin-left: 15px;
  color: var(--lime);
  font: normal 20px var(--sans);
}

.archive-score p {
  max-width: 550px;
  margin: 15px 0 0;
  color: #88a2ac;
  font-size: 11px;
  line-height: 1.9;
}

.archive-best {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(circle, rgba(36, 130, 159, 0.22), transparent 44%),
    rgba(6, 20, 29, 0.75);
}

.archive-best > span {
  color: var(--cyan);
  font: 8px var(--mono);
  letter-spacing: 0.16em;
}

.archive-best > small {
  margin-top: 10px;
  color: #728d97;
  font-size: 9px;
}

.archive-best h2 {
  margin: 13px 0 9px;
  font-size: 23px;
}

.archive-best > div {
  color: var(--green);
  font-family: var(--display);
}

.archive-best > div b {
  font-size: 70px;
  line-height: 1;
}

.archive-best > div span {
  font-size: 20px;
}

.archive-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.archive-footer p {
  color: #647f89;
  font-size: 8px;
}

.archive-footer p i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
}

.archive-diagnose-button {
  display: grid;
  min-width: 300px;
  min-height: 64px;
  padding: 11px 17px;
  border: 1px solid rgba(82, 232, 255, 0.5);
  grid-template-columns: 1fr auto;
  align-items: center;
  color: var(--cyan-soft);
  background:
    linear-gradient(90deg, rgba(24, 111, 145, 0.2), rgba(34, 162, 137, 0.11)),
    rgba(3, 16, 24, 0.88);
  box-shadow: inset 0 0 20px rgba(82, 232, 255, 0.04), 0 0 18px rgba(82, 232, 255, 0.08);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.archive-diagnose-button span {
  align-self: end;
  color: var(--green);
  font: 6px var(--mono);
  letter-spacing: 0.17em;
}

.archive-diagnose-button strong {
  align-self: start;
  margin-top: 2px;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.archive-diagnose-button > i {
  grid-row: 1 / 3;
  grid-column: 2;
  color: var(--lime);
  font: normal 22px var(--display);
  transition: transform 180ms ease;
}

.archive-diagnose-button:hover,
.archive-diagnose-button:focus-visible {
  border-color: var(--cyan);
  box-shadow: inset 0 0 26px rgba(82, 232, 255, 0.08), 0 0 24px rgba(82, 232, 255, 0.18);
  outline: none;
  transform: translateY(-2px);
}

.archive-diagnose-button:hover > i,
.archive-diagnose-button:focus-visible > i {
  transform: translateX(4px);
}

.archive-diagnose-button:active {
  transform: translateY(0) scale(0.985);
}

@media (max-width: 1120px) {
  .app-shell {
    width: min(900px, calc(100% - 40px));
    grid-template-columns: 170px minmax(500px, 1fr);
  }

  .side-panel--right {
    display: none;
  }

  .side-panel {
    min-height: 560px;
  }
}

@media (max-width: 820px) {
  .topbar {
    min-height: 68px;
    padding: 0 18px;
  }

  .top-status .session-id {
    display: none;
  }

  .top-status {
    gap: 12px;
  }

  .status-pill {
    display: none;
  }

  .app-shell {
    display: block;
    width: min(680px, calc(100% - 24px));
    min-height: calc(100vh - 110px);
  }

  .side-panel {
    display: none;
  }

  .scanner-column {
    padding-top: 21px;
  }

  .viewport {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .scanner-meta {
    padding: 0 13px;
  }

  .coord {
    display: none;
  }

  .scanner-actions {
    align-items: stretch;
  }

  .primary-button,
  .secondary-button {
    min-width: 0;
  }

  .primary-button {
    flex: 1.3;
  }

  .secondary-button {
    flex: 1;
  }

  .primary-button em {
    display: none;
  }

  .app-shell.has-result {
    width: min(680px, calc(100% - 24px));
  }

  .app-shell.is-revealing {
    width: min(680px, calc(100% - 24px));
  }

  .result-reveal {
    min-height: calc(100vh - 110px);
  }

  .reveal-step {
    padding: 24px 18px 62px;
  }

  .reveal-step--radar {
    width: 96%;
  }

  .reveal-radar-wrap {
    height: min(390px, 55vh);
  }

  .reveal-sequence-label {
    display: none;
  }

  .reveal-advance-hint--desktop {
    display: none;
  }

  .reveal-advance-hint--mobile {
    display: inline;
  }

  .result-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .share-panel,
  .archive-summary,
  .archive-qr-panel {
    grid-column: auto;
  }

  .result-hero,
  .best-course {
    min-height: auto;
  }

  .archive-summary {
    grid-template-columns: 1fr;
  }

  .archive-best,
  .archive-university,
  .archive-comment-panel,
  .archive-grid .course-panel,
  .archive-grid .radar-panel {
    min-height: auto;
  }

  .archive-wireframe .wireframe-snapshot {
    min-height: min(78vw, 430px);
  }

  .archive-header {
    align-items: flex-start;
  }

  .archive-meta {
    flex-direction: column;
    gap: 5px;
    text-align: right;
  }

  .footer span:nth-child(2) {
    display: none;
  }
}

@media (max-width: 560px) {
  .brand b {
    font-size: 20px;
  }

  .brand-mark {
    width: 30px;
    height: 34px;
  }

  .top-status time {
    font-size: 9px;
  }

  .viewport {
    aspect-ratio: 3 / 4;
  }

  #camera,
  #face-canvas {
    object-position: center;
  }

  .reticle {
    inset: 14px;
  }

  .center-message {
    width: 86%;
  }

  .is-tracking .center-message {
    top: 13%;
  }

  .face-guide {
    width: 58%;
  }

  .smile-meter {
    bottom: 18px;
    width: 83%;
  }

  .scanner-actions { flex-direction: row; gap: 8px; }
  .primary-button,
  .secondary-button {
    width: auto;
    min-height: 50px;
    flex: 1 1 0;
    justify-content: center;
    padding: 0 10px;
  }
  .primary-button b,
  .secondary-button b { font-size: 12px; letter-spacing: 0.06em; }
  .primary-button small,
  .secondary-button small,
  .scanner-actions .button-icon,
  .scanner-actions .play-icon { display: none; }

  .camera-help {
    line-height: 1.6;
  }

  .analysis-log {
    width: 260px;
  }

  .reveal-course-lockup {
    flex-direction: column;
    gap: 10px;
  }

  .reveal-course-lockup > span {
    width: 59px;
    height: 54px;
  }

  .reveal-course-lockup h1 {
    font-size: clamp(27px, 8.6vw, 39px);
  }

  .reveal-university-score b {
    min-width: 150px;
    font-size: 108px;
  }

  .reveal-heading h2 {
    font-size: 16px;
  }

  .reveal-complete-fx {
    inset: 4%;
  }

  .reveal-complete-telemetry {
    max-width: 310px;
    flex-wrap: wrap;
    gap: 5px 12px;
    margin-top: 10px;
    padding: 6px 9px;
    font-size: 5px;
  }

  .result-topline {
    align-items: flex-start;
  }

  .result-topline > span {
    max-width: 110px;
    line-height: 1.7;
    text-align: right;
  }

  .result-hero {
    padding: 25px 21px;
  }

  .score-lockup {
    align-items: flex-start;
    gap: 15px;
  }

  .score-number {
    min-width: 112px;
  }

  .score-number b {
    font-size: 69px;
  }

  .score-lockup h1 {
    font-size: 21px;
  }

  .share-panel {
    flex-wrap: wrap;
    justify-content: center;
    padding: 25px 20px;
  }

  .archive-qr-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .archive-qr-panel .qr-wrap {
    align-self: center;
  }

  .share-copy {
    flex: 1 1 150px;
  }

  .expiry {
    width: 100%;
    margin: 0;
    padding: 13px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .result-actions {
    align-items: flex-end;
  }

  .result-actions .secondary-button {
    width: auto;
  }

  .standalone-result {
    width: calc(100% - 24px);
    padding: 14px 0 24px;
  }

  .archive-header {
    display: block;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .archive-header p b {
    font-size: 18px;
    letter-spacing: 0.08em;
  }

  .archive-meta {
    display: grid;
    margin-top: 8px;
    grid-template-columns: 1fr 1fr;
    gap: 3px 10px;
    text-align: left;
  }

  .archive-meta span:first-child {
    grid-column: 1 / -1;
  }

  .archive-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
  }

  .archive-wireframe,
  .archive-grid > .course-panel,
  .archive-grid > .radar-panel,
  .archive-comment-panel {
    grid-column: 1 / -1;
  }

  .archive-grid > .glass-panel {
    padding: 13px;
  }

  .archive-wireframe .section-heading,
  .archive-grid .section-heading {
    padding-bottom: 8px;
  }

  .archive-wireframe .section-heading h2 {
    font-size: 14px;
  }

  .archive-wireframe .wireframe-snapshot {
    min-height: min(58vw, 260px);
    margin-top: 8px;
  }

  .archive-university,
  .archive-best {
    min-width: 0;
    min-height: 190px;
    padding: 13px 11px;
  }

  .archive-university h1 {
    margin: 6px 0 10px;
    font-size: 14px;
    line-height: 1.45;
  }

  .archive-university > div b {
    font-size: 48px;
  }

  .archive-university > div span {
    font-size: 15px;
  }

  .archive-university > div em {
    margin-left: 5px;
    font-size: 10px;
  }

  .archive-university > p {
    margin-top: 9px;
    font-size: 8px;
    line-height: 1.55;
  }

  .archive-best > span {
    font-size: 6px;
  }

  .archive-best > small {
    margin-top: 6px;
    font-size: 7px;
    line-height: 1.5;
  }

  .archive-best h2 {
    margin: 8px 0 5px;
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .archive-best > div b {
    font-size: 48px;
  }

  .archive-best > div span {
    font-size: 14px;
  }

  .archive-grid > .course-panel,
  .archive-grid > .radar-panel {
    min-height: 0;
  }

  #archive-course-bars {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 11px 12px;
    margin-top: 12px;
  }

  #archive-course-bars .course-bar-head {
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 5px;
  }

  #archive-course-bars .course-bar-head > div {
    display: block;
    min-width: 0;
  }

  #archive-course-bars .course-index {
    display: none;
  }

  #archive-course-bars .course-bar-head strong {
    display: block;
    font-size: 8px;
    line-height: 1.45;
  }

  #archive-course-bars .course-bar-head b {
    flex: 0 0 auto;
    font-size: 13px;
  }

  #archive-course-bars .course-row.is-breakout .course-bar-head > div::after {
    display: block;
    width: max-content;
    margin: 3px 0 0;
    padding: 1px 3px;
    font-size: 5px;
  }

  .archive-radar-panel .chart-wrap {
    height: 225px;
    margin-top: 1px;
  }

  .archive-comment-panel h2 {
    margin: 5px 0 9px;
    font-size: 16px;
  }

  .archive-comment-panel p {
    padding-left: 10px;
    font-size: 9px;
    line-height: 1.7;
  }

  .archive-score > div b {
    font-size: 62px;
  }

  .archive-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
    margin-top: 10px;
    padding-top: 10px;
  }

  .archive-footer p {
    margin: 0;
    font-size: 7px;
    line-height: 1.5;
  }

  .archive-diagnose-button {
    width: 100%;
    min-width: 0;
    min-height: 62px;
  }

  .archive-diagnose-button strong {
    font-size: 15px;
  }

  .footer {
    padding: 0 18px;
  }

  .footer span:last-child {
    display: none;
  }
}

@media (max-width: 340px) {
  .archive-radar-panel .chart-wrap {
    height: 240px;
  }
}

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

/* Public showcase navigation and local edit mode */
.showcase-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 24px;
}

.showcase-nav a {
  position: relative;
  padding: 9px 12px;
  border: 1px solid transparent;
  color: #7897a4;
  font: 700 8px var(--mono);
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: 180ms ease;
}

.showcase-nav a:hover,
.showcase-nav a:focus-visible,
.showcase-nav a.is-active {
  border-color: rgba(82, 232, 255, 0.24);
  color: var(--cyan-soft);
  background: rgba(82, 232, 255, 0.06);
}

.showcase-nav a.is-active::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 1px;
  content: "";
  background: var(--cyan);
  box-shadow: 0 0 9px var(--cyan);
}

.edit-mode-trigger {
  position: fixed;
  z-index: 46;
  right: 22px;
  bottom: 22px;
  display: flex;
  min-width: 176px;
  align-items: center;
  gap: 11px;
  padding: 11px 15px;
  overflow: hidden;
  border: 1px solid rgba(183, 255, 91, 0.62);
  color: var(--white);
  background: linear-gradient(135deg, rgba(9, 35, 42, 0.96), rgba(9, 20, 27, 0.98));
  box-shadow: 0 0 0 1px rgba(183, 255, 91, 0.08) inset, 0 0 22px rgba(183, 255, 91, 0.16);
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: 180ms ease;
}

.edit-mode-trigger::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 30%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(183, 255, 91, 0.18), transparent);
  animation: editor-trigger-scan 3.6s linear infinite;
}

@keyframes editor-trigger-scan {
  to { transform: translateX(520%); }
}

.edit-mode-trigger > i {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
}

.edit-mode-trigger > i::after {
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(183, 255, 91, 0.5);
  border-radius: 50%;
  content: "";
  animation: pulse 1.5s ease-out infinite;
}

.edit-mode-trigger span { display: grid; text-align: left; }
.edit-mode-trigger small { color: #82a08f; font: 6px var(--mono); letter-spacing: 0.16em; }
.edit-mode-trigger b { margin-top: 2px; color: var(--lime); font: 700 14px var(--display); letter-spacing: 0.14em; }
.edit-mode-trigger:hover,
.edit-mode-trigger:focus-visible { transform: translateY(-3px); background: linear-gradient(135deg, rgba(17, 55, 58, 0.98), rgba(9, 20, 27, 1)); }

.tech-page-trigger {
  position: fixed;
  z-index: 45;
  right: 22px;
  bottom: 88px;
  display: flex;
  min-width: 176px;
  min-height: 53px;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  overflow: hidden;
  border: 1px solid rgba(82, 232, 255, 0.62);
  color: var(--white);
  background: linear-gradient(135deg, rgba(7, 31, 43, 0.96), rgba(5, 16, 25, 0.98));
  box-shadow: 0 0 0 1px rgba(82, 232, 255, 0.08) inset, 0 0 22px rgba(82, 232, 255, 0.15);
  text-decoration: none;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: 180ms ease;
}

.tech-page-trigger::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 30%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(82, 232, 255, 0.2), transparent);
  animation: editor-trigger-scan 3.2s linear infinite;
}

.tech-page-trigger > i {
  position: relative;
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.tech-page-trigger > i::after {
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(82, 232, 255, 0.48);
  border-radius: 50%;
  content: "";
  animation: pulse 1.5s ease-out infinite;
}

.tech-page-trigger span { display: grid; flex: 1; text-align: left; }
.tech-page-trigger small { color: #7299a7; font: 6px var(--mono); letter-spacing: 0.1em; }
.tech-page-trigger b { margin-top: 2px; color: var(--cyan); font: 700 14px var(--display); letter-spacing: 0.14em; }
.tech-page-trigger em { position: relative; z-index: 2; color: var(--cyan); font: 400 13px var(--mono); }
.tech-page-trigger:hover,
.tech-page-trigger:focus-visible { transform: translateY(-3px); background: linear-gradient(135deg, rgba(10, 48, 62, 0.98), rgba(5, 18, 27, 1)); }

.public-tools-dock {
  position: fixed;
  z-index: 45;
  right: 22px;
  bottom: 22px;
  display: grid;
  grid-template-columns: repeat(2, 176px);
  gap: 10px;
}

.public-tools-dock .tech-page-trigger,
.public-tools-dock .edit-mode-trigger {
  position: relative;
  right: auto;
  bottom: auto;
  width: 100%;
  min-width: 0;
  min-height: 53px;
}

.lab-credit {
  position: fixed;
  z-index: 44;
  bottom: 22px;
  left: 22px;
  display: grid;
  min-width: 264px;
  min-height: 53px;
  grid-template-columns: auto 1fr auto;
  align-content: center;
  gap: 2px 10px;
  padding: 9px 13px;
  border: 1px solid rgba(82, 232, 255, 0.23);
  color: #9db5be;
  background: rgba(3, 15, 23, 0.88);
  box-shadow: 0 0 20px rgba(82, 232, 255, 0.07);
  text-decoration: none;
  backdrop-filter: blur(12px);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  transition: 180ms ease;
}

.lab-credit span {
  grid-row: 1 / 3;
  align-self: center;
  padding-right: 9px;
  border-right: 1px solid rgba(82, 232, 255, 0.2);
  color: var(--cyan);
  font: 700 7px var(--mono);
  letter-spacing: 0.12em;
}
.lab-credit b { font-size: 7px; font-weight: 500; letter-spacing: 0.03em; }
.lab-credit strong { color: var(--white); font-size: 12px; letter-spacing: 0.08em; }
.lab-credit em { grid-row: 1 / 3; grid-column: 3; align-self: center; color: var(--cyan); font: normal 12px var(--mono); }
.lab-credit:hover,
.lab-credit:focus-visible { border-color: rgba(82, 232, 255, 0.5); color: var(--cyan-soft); transform: translateY(-3px); }

@media (max-width: 1120px) {
  .public-tools-dock {
    position: static;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
  }
  .public-tools-dock .tech-page-trigger,
  .public-tools-dock .edit-mode-trigger {
    right: auto;
    bottom: auto;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 8px 11px;
  }
  .lab-credit {
    position: static;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    margin: 10px auto 0;
  }
}

.site-editor {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  width: min(540px, 100vw);
  height: 100svh;
  padding: 26px;
  overflow-y: auto;
  border-left: 1px solid rgba(82, 232, 255, 0.42);
  background:
    linear-gradient(rgba(82, 232, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 232, 255, 0.03) 1px, transparent 1px),
    rgba(3, 13, 20, 0.98);
  background-size: 28px 28px, 28px 28px, auto;
  box-shadow: -24px 0 64px rgba(0, 0, 0, 0.56);
  transform: translateX(104%);
  transition: transform 260ms cubic-bezier(.2,.8,.2,1);
}

.site-editor.is-open { transform: translateX(0); }
.site-editor__head { display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 17px; }
.site-editor__head small { color: var(--cyan); font: 7px var(--mono); letter-spacing: 0.18em; }
.site-editor__head h2 { margin: 5px 0 0; font: 700 29px var(--display); letter-spacing: 0.12em; }
.site-editor__head button { width: 38px; height: 38px; border: 1px solid var(--line); color: var(--cyan); background: rgba(82,232,255,.04); font-size: 23px; cursor: pointer; }
.site-editor__privacy { display: flex; align-items: flex-start; gap: 9px; margin: 18px 0; padding: 11px 12px; border: 1px solid rgba(104,246,163,.2); color: #a5c4bb; background: rgba(104,246,163,.045); font-size: 10px; line-height: 1.7; }
.site-editor__privacy i { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); }
.site-editor form { display: grid; gap: 11px; }
.site-editor form > label { display: grid; gap: 6px; }
.site-editor label > span { color: #75929e; font: 7px var(--mono); letter-spacing: .12em; }
.site-editor input,
.site-editor textarea { width: 100%; border: 1px solid rgba(82,232,255,.22); border-radius: 0; outline: none; padding: 10px 11px; color: var(--white); background: rgba(1,8,13,.86); font: 500 12px var(--sans); resize: vertical; }
.site-editor input:focus,
.site-editor textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(82,232,255,.08); }
.site-editor__colors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.site-editor__colors label { display: grid; gap: 6px; }
.site-editor input[type="color"] { height: 42px; padding: 5px; cursor: pointer; }
.site-editor__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 5px; }
.site-editor__actions button { min-height: 40px; border: 1px solid var(--line); color: #9ab6c1; background: rgba(82,232,255,.04); font: 700 8px var(--mono); letter-spacing: .08em; cursor: pointer; }
.site-editor__actions .site-editor__save { grid-column: 1 / -1; border-color: rgba(183,255,91,.5); color: var(--lime); background: rgba(183,255,91,.07); }
.site-editor output { padding-top: 8px; color: var(--green); font: 7px var(--mono); letter-spacing: .1em; }

.site-editor__section {
  overflow: hidden;
  border: 1px solid rgba(82, 232, 255, 0.16);
  background: rgba(3, 14, 21, 0.68);
}

.site-editor__section[open] { border-color: rgba(82, 232, 255, 0.3); }
.site-editor__section summary {
  display: grid;
  min-height: 62px;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(90deg, rgba(82, 232, 255, 0.045), transparent);
}
.site-editor__section summary::-webkit-details-marker { display: none; }
.site-editor__section summary > span { color: rgba(82, 232, 255, 0.48); font: 700 22px var(--display); }
.site-editor__section summary div { display: grid; gap: 4px; }
.site-editor__section summary b { font-size: 12px; letter-spacing: 0.06em; }
.site-editor__section summary small { color: #64808a; font-size: 8px; }
.site-editor__section summary > i { color: var(--cyan); font: normal 15px var(--mono); transition: transform 180ms ease; }
.site-editor__section[open] summary > i { transform: rotate(45deg); }
.site-editor__section-body { display: grid; gap: 14px; padding: 15px; border-top: 1px solid rgba(82, 232, 255, 0.11); }
.site-editor__section-body > label,
.site-editor__course-card > label,
.site-editor__number-pair > label { display: grid; gap: 6px; }

.site-editor__range-field > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.site-editor__range-field output { padding: 0; color: var(--lime); font: 700 9px var(--mono); }
.site-editor input[type="range"] {
  height: 22px;
  padding: 0;
  border: 0;
  accent-color: var(--cyan);
  background: transparent;
  box-shadow: none;
  cursor: ew-resize;
}
.site-editor input[type="range"]:focus { box-shadow: none; }
.site-editor__range-field > small,
.site-editor__field-note { margin: 0; color: #607b85; font-size: 8px; line-height: 1.65; }

.site-editor__number-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.site-editor__number-pair--breakout input { border-color: rgba(183, 255, 91, 0.32); color: var(--lime); }

.site-editor__course-card {
  display: grid;
  gap: 11px;
  padding: 13px;
  border: 1px solid rgba(82, 232, 255, 0.13);
  background: rgba(82, 232, 255, 0.025);
}
.site-editor__course-card > b { color: var(--cyan); font: 700 8px var(--mono); letter-spacing: 0.13em; }
.site-editor__course-card textarea { min-height: 68px; }

.site-editor__engine-preview {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(183, 255, 91, 0.2);
  background: rgba(183, 255, 91, 0.035);
}
.site-editor__engine-preview span { color: var(--lime); font: 7px var(--mono); letter-spacing: 0.12em; }
.site-editor__engine-preview b { color: #e4f7db; font-size: 11px; }
.site-editor__engine-preview small { color: #789174; font-size: 8px; }

.site-editor__trait-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.site-editor__trait-preview span { padding: 5px 7px; border: 1px solid rgba(82, 232, 255, 0.18); color: #a8c4cc; background: rgba(82, 232, 255, 0.035); font-size: 8px; }
.site-editor__trait-preview small { color: var(--danger); font-size: 8px; }

.site-editor__actions {
  position: sticky;
  z-index: 2;
  bottom: -26px;
  padding: 12px 0 26px;
  background: linear-gradient(transparent, rgba(3, 13, 20, 0.98) 18%);
}

/* Technology / research page */
.tech-page-body { overflow-y: auto; }
.tech-topbar { position: sticky; top: 0; }
.tech-showcase { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 62px 0 74px; }
.tech-hero { display: grid; min-height: 530px; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 64px; }
.tech-index,
.tech-section__heading small,
.tech-publish-section small { color: var(--cyan); font: 7px var(--mono); letter-spacing: .18em; }
.tech-hero__copy > p:first-of-type { margin: 18px 0 8px; color: #7898a4; font: 700 10px var(--mono); letter-spacing: .18em; }
.tech-hero h1 { margin: 0; font: 700 clamp(54px, 7.2vw, 102px)/.86 var(--display); letter-spacing: .01em; text-transform: uppercase; }
.tech-hero h1 span { color: transparent; -webkit-text-stroke: 1px rgba(180,245,255,.74); }
.tech-lead { max-width: 650px; margin: 28px 0 0; color: #9ab6c0; font-size: 14px; line-height: 2; }
.tech-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.tech-primary-link,
.tech-editor-callout { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 28px; padding: 0 18px; border: 1px solid rgba(82,232,255,.46); color: var(--white); background: rgba(82,232,255,.07); font: 700 10px var(--mono); letter-spacing: .08em; text-decoration: none; cursor: pointer; }
.tech-editor-callout { border-color: rgba(183,255,91,.42); color: var(--lime); background: rgba(183,255,91,.055); }
.tech-hero__visual { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid rgba(82,232,255,.2); background: radial-gradient(circle, rgba(82,232,255,.11), transparent 57%); clip-path: polygon(9% 0, 100% 0, 100% 91%, 91% 100%, 0 100%, 0 9%); }
.tech-face-grid { position: absolute; inset: 14%; filter: drop-shadow(0 0 7px rgba(82,232,255,.5)); }
.tech-face-grid i { position: absolute; inset: calc(var(--n, 0) * 5%); border: 1px solid rgba(82,232,255,calc(.42 - var(--n, 0) * .05)); border-radius: 48% 52% 43% 45%; clip-path: polygon(50% 0, 82% 12%, 98% 44%, 88% 80%, 50% 100%, 12% 80%, 2% 44%, 18% 12%); }
.tech-face-grid i:nth-child(1) { --n: 0; }
.tech-face-grid i:nth-child(2) { --n: 1; transform: rotate(30deg); }
.tech-face-grid i:nth-child(3) { --n: 2; transform: rotate(60deg); }
.tech-face-grid i:nth-child(4) { --n: 3; transform: rotate(90deg); }
.tech-face-grid i:nth-child(5) { --n: 4; transform: rotate(120deg); }
.tech-face-grid i:nth-child(6) { --n: 5; transform: rotate(150deg); }
.tech-scan-beam { position: absolute; right: 8%; left: 8%; height: 2px; background: var(--lime); box-shadow: 0 0 20px 4px rgba(183,255,91,.42); animation: tech-scan 3s ease-in-out infinite alternate; }
@keyframes tech-scan { from { top: 16%; } to { top: 84%; } }
.tech-hero__visual > span,
.tech-hero__visual > b { position: absolute; color: var(--cyan); font: 7px var(--mono); letter-spacing: .12em; }
.tech-hero__visual > span { top: 5%; left: 6%; }
.tech-hero__visual > b { right: 6%; bottom: 5%; color: var(--lime); }
.tech-trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0 84px; border: 1px solid var(--line); background: rgba(7,20,29,.66); }
.tech-trust-strip > div { display: grid; min-height: 82px; grid-template-columns: auto 1fr; align-content: center; gap: 3px 10px; padding: 15px 20px; border-right: 1px solid var(--line); }
.tech-trust-strip > div:last-child { border: 0; }
.tech-trust-strip i { grid-row: 1 / 3; width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); }
.tech-trust-strip span { color: #6f8d98; font: 6px var(--mono); letter-spacing: .12em; }
.tech-trust-strip b { color: #b7ccd3; font: 700 10px var(--mono); }
.tech-section { margin-top: 92px; }
.tech-section__heading { display: grid; grid-template-columns: 1fr minmax(280px, 440px); align-items: end; gap: 50px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.tech-section__heading h2,
.tech-publish-section h2 { margin: 7px 0 0; font: 600 clamp(31px,4vw,52px) var(--display); letter-spacing: .06em; }
.tech-section__heading > p { margin: 0; color: #78959f; font-size: 11px; line-height: 1.9; }
.architecture-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 30px; }
.architecture-flow article { min-height: 142px; padding: 18px; border: 1px solid var(--line); background: rgba(8,25,36,.6); }
.architecture-flow article span,
.tech-card-grid article > span,
.tech-data-notes article span,
.research-grid article > span { color: var(--cyan); font: 7px var(--mono); }
.architecture-flow article b { display: block; margin-top: 20px; font: 700 15px var(--mono); }
.architecture-flow article p { margin: 8px 0 0; color: #76919b; font-size: 9px; line-height: 1.7; }
.architecture-flow > i { color: var(--cyan); font-style: normal; }
.tech-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.tech-card-grid article { position: relative; min-height: 220px; padding: 22px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(10,31,42,.78), rgba(5,15,23,.72)); }
.tech-card-grid h3 { margin: 26px 0 10px; font: 600 21px var(--display); letter-spacing: .04em; }
.tech-card-grid p { margin: 0; color: #78949e; font-size: 10px; line-height: 1.85; }
.tech-card-grid article > b { position: absolute; right: 20px; bottom: 18px; color: var(--lime); font: 7px var(--mono); letter-spacing: .08em; }
.tech-data-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; margin-top: 24px; }
.tech-code-panel { border: 1px solid rgba(82,232,255,.24); background: #030b11; }
.tech-code-panel > div { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); color: #7896a2; font: 7px var(--mono); }
.tech-code-panel > div b { color: var(--green); }
.tech-code-panel pre { margin: 0; padding: 24px; overflow-x: auto; color: #b9e9ee; font: 11px/1.8 var(--mono); }
.tech-data-notes { display: grid; gap: 10px; }
.tech-data-notes article { padding: 17px 19px; border: 1px solid var(--line); background: rgba(8,24,34,.66); }
.tech-data-notes b { display: block; margin-top: 8px; color: var(--white); font-size: 13px; }
.tech-data-notes p { margin: 8px 0 0; color: #77929c; font-size: 9px; line-height: 1.75; }
.research-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 15px; margin-top: 24px; }
.research-grid article { padding: 28px; border: 1px solid var(--line); background: rgba(8,24,34,.7); }
.research-grid h3 { margin: 18px 0 12px; font: 600 24px var(--display); letter-spacing: .04em; }
.research-grid p,
.research-grid li { color: #7d99a3; font-size: 10px; line-height: 1.9; }
.research-main ul { display: grid; gap: 7px; margin: 18px 0 0; padding: 0; list-style: none; }
.research-main li::before { margin-right: 9px; color: var(--green); content: "✓"; }
.research-reference-card { border-color: rgba(183,255,91,.24) !important; }
.research-reference-card > span { color: var(--lime) !important; }
.research-reference-card a { display: flex; justify-content: space-between; margin-top: 9px; padding: 11px 12px; border: 1px solid rgba(183,255,91,.18); color: #b9cfb1; font: 700 8px var(--mono); text-decoration: none; }
.tech-publish-section { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding: 38px; border: 1px solid rgba(82,232,255,.3); background: linear-gradient(125deg, rgba(12,47,57,.66), rgba(5,15,22,.8)); }
.tech-publish-section > div { max-width: 760px; }
.tech-publish-section p { margin: 14px 0 0; color: #88a4ae; font-size: 11px; line-height: 1.9; }
.tech-publish-section > a { flex: 0 0 auto; padding: 15px 18px; border: 1px solid var(--cyan); color: var(--cyan-soft); font: 700 9px var(--mono); text-decoration: none; }
.tech-footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

@media (max-width: 980px) {
  .tech-hero { grid-template-columns: 1fr; padding-top: 20px; }
  .tech-hero__visual { width: min(520px, 100%); margin: 0 auto; }
  .tech-trust-strip { grid-template-columns: 1fr 1fr; }
  .tech-trust-strip > div:nth-child(2) { border-right: 0; }
  .tech-trust-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .architecture-flow { grid-template-columns: 1fr 1fr; }
  .architecture-flow > i { display: none; }
  .architecture-flow article:last-of-type { grid-column: 1 / -1; }
  .tech-card-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .showcase-nav { margin-right: 0; }
  .topbar .showcase-nav + .top-status { display: none; }
  .tech-showcase { width: min(680px, calc(100% - 24px)); padding-top: 35px; }
  .tech-hero { min-height: 0; gap: 34px; }
  .tech-section { margin-top: 65px; }
  .tech-section__heading { grid-template-columns: 1fr; gap: 15px; }
  .tech-data-grid,
  .research-grid { grid-template-columns: 1fr; }
  .tech-publish-section { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .topbar .brand small { display: none; }
  .showcase-nav a { padding: 8px 7px; font-size: 6px; }
  .edit-mode-trigger { right: 12px; bottom: 12px; min-width: 148px; padding: 9px 12px; }
  .edit-mode-trigger b { font-size: 12px; }
  .tech-page-trigger { right: 12px; bottom: 74px; min-width: 148px; min-height: 48px; padding: 8px 11px; }
  .tech-page-trigger b { font-size: 12px; }
  .public-tools-dock .tech-page-trigger,
  .public-tools-dock .edit-mode-trigger { min-width: 0; }
  .public-tools-dock .tech-page-trigger small,
  .public-tools-dock .edit-mode-trigger small { letter-spacing: 0.04em; }
  .lab-credit { padding: 8px 11px; }
  .site-editor { padding: 20px 16px; }
  .tech-hero h1 { font-size: clamp(48px, 18vw, 72px); }
  .tech-hero__actions { display: grid; }
  .tech-trust-strip,
  .tech-card-grid,
  .architecture-flow { grid-template-columns: 1fr; }
  .tech-trust-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .tech-trust-strip > div:last-child { border-bottom: 0; }
  .architecture-flow article:last-of-type { grid-column: auto; }
  .tech-code-panel pre { padding: 17px; font-size: 9px; }
  .tech-publish-section { padding: 25px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .edit-mode-trigger::after,
  .edit-mode-trigger > i::after,
  .tech-page-trigger::after,
  .tech-page-trigger > i::after,
  .tech-scan-beam {
    animation: none !important;
  }

  .site-editor,
  .edit-mode-trigger,
  .tech-page-trigger {
    transition: none !important;
  }
}
