:root {
  --bg: #0b0f14;
  --bg-2: #121820;
  --steel: #2a3440;
  --ash: #8b96a5;
  --fog: #d5dde6;
  --violet: #8b5cf6;
  --violet-hot: #a78bfa;
  --accent: #8b5cf6;
  --accent-2: #c4b5fd;
  --neon: #a78bfa;
  --bone: #e8e4dc;
  --danger: #f43f5e;
  --ok: #34d399;
  --yandex: #FC3F1D;
  --tg: #229ED9;
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 2px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
.guidance { position:fixed; inset:0; z-index:10000; display:grid; place-items:center; padding:20px; background:rgba(5,8,12,.82); backdrop-filter:blur(14px); }
.guidance__panel { position:relative; width:min(440px,100%); padding:30px 24px 18px; text-align:center; background:linear-gradient(145deg,#151b24,#0b0f14); border:1px solid rgba(167,139,250,.4); border-radius:14px; box-shadow:0 24px 80px rgba(0,0,0,.7); }
.guidance__close { position:absolute; top:12px; right:14px; width:32px; height:32px; color:var(--ash); background:rgba(255,255,255,.06); border-radius:50%; font-size:22px; }
.guidance__progress { margin-bottom:18px; color:var(--ash); font:11px var(--font-mono); }
.guidance__kicker { margin:0 0 8px; color:var(--violet-hot); font-size:11px; letter-spacing:.12em; }
.guidance__title { margin:0; color:var(--bone); font:32px/1.05 var(--font-display); letter-spacing:.03em; }
.guidance__text { margin:14px 0 20px; color:var(--fog); font-size:14px; line-height:1.55; }
.guidance__primary,.guidance__channel { display:flex; align-items:center; justify-content:center; width:100%; min-height:46px; padding:12px 16px; border:0; border-radius:3px; color:#fff; font-weight:700; text-decoration:none; cursor:pointer; }
.guidance__primary { background:linear-gradient(135deg,var(--violet),#5b21b6); }
.guidance__channel { background:var(--tg); }
.guidance__next { margin-top:8px; padding:10px 18px; color:var(--accent-2); background:none; border:0; font-weight:700; cursor:pointer; }
.guidance__skip { margin-top:8px; padding:10px 18px; color:var(--ash); background:none; border:0; cursor:pointer; }
.guidance__dots { display:flex; justify-content:center; gap:5px; margin-top:8px; }
.guidance__dots i { width:6px; height:6px; border-radius:50%; background:var(--steel); }
.guidance__dots i.is-active { width:20px; border-radius:4px; background:var(--violet-hot); }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--fog);
  background:
    radial-gradient(1100px 560px at 85% -8%, rgba(139, 92, 246, 0.18), transparent 55%),
    radial-gradient(900px 500px at 8% 35%, rgba(168, 85, 247, 0.10), transparent 50%),
    radial-gradient(700px 420px at 55% 90%, rgba(99, 102, 241, 0.08), transparent 55%),
    linear-gradient(180deg, #090d12 0%, #10161d 52%, #0b0f14 100%);
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.045;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.accent-orb,
.violet-orb {
  pointer-events: none;
  position: fixed;
  width: 42vw;
  height: 42vw;
  right: -12vw;
  top: -12vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.22), rgba(168, 85, 247, 0.08), transparent 70%);
  filter: blur(42px);
  animation: orbPulse 9s ease-in-out infinite;
  z-index: 0;
}
@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}

.bone-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
}

.mono { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.04em; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(12, 13, 16, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.25);
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--bone);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.08em;
}
.brand-skull { width: 28px; height: 28px; color: var(--violet-hot); }
.topbar__nav {
  display: flex;
  gap: 1.25rem;
}
.topbar__nav a {
  color: var(--ash);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.topbar__nav a:hover,
.topbar__nav a.is-active { color: var(--violet-hot); }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--steel);
  color: var(--fog);
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  z-index: 2;
}

.view { position: relative; z-index: 2; display: none; padding: 1.5rem 1.25rem 4rem; }
.view--active, .view:not([hidden]) { display: block; }
.view[hidden] { display: none !important; }

.hero {
  max-width: var(--max);
  margin: 0 auto;
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}
.brand-hero {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7rem);
  line-height: 0.9;
  letter-spacing: 0.06em;
  color: var(--bone);
  text-shadow: 0 0 40px rgba(168, 85, 247, 0.45);
  animation: brandIn 1s ease-out;
}
@keyframes brandIn {
  from { opacity: 0; transform: translateY(24px) skewX(-4deg); }
  to { opacity: 1; transform: none; }
}
.hero__headline {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0.04em;
  color: var(--violet-hot);
  font-weight: 400;
}
.hero__lede {
  max-width: 34ch;
  color: var(--ash);
  font-size: 1.05rem;
  line-height: 1.55;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn,
.qty-btn,
.auth-tab,
.pay-method__opt {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn--neon {
  background: linear-gradient(135deg, #6d28d9, #8b5cf6 55%, #a78bfa);
  color: #0b0a12;
  font-weight: 700;
  box-shadow: 0 0 22px rgba(139, 92, 246, 0.35);
}
.btn--neon:hover { box-shadow: 0 0 32px rgba(167, 139, 250, 0.45); }
.btn--ghost {
  background: transparent;
  border-color: var(--steel);
  color: var(--fog);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--yandex {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: #fff;
  color: #111;
  border: 1px solid #e5e7eb;
  font-weight: 600;
  margin: 0.35rem 0 0.75rem;
}
.btn--yandex:hover { background: #f8fafc; transform: translateY(-1px); }
.btn-yandex__icon { display: grid; place-items: center; }

.input,
select.input,
textarea.input {
  font-size: 16px !important; /* prevent iOS zoom on focus */
}

.skull-stage { position: relative; display: grid; place-items: center; }
.skull-svg { width: min(100%, 380px); filter: drop-shadow(0 0 28px rgba(139, 92, 246, 0.45)); }
.skull-path {
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: drawSkull 2.4s ease forwards;
}
.skull-path.d1 { animation-delay: 0.25s; }
.skull-path.d2 { animation-delay: 0.5s; }
.skull-path.d3 { animation-delay: 0.75s; }
@keyframes drawSkull {
  to { stroke-dashoffset: 0; }
}
.scan-line {
  animation: scanY 2.8s ease-in-out infinite;
}
@keyframes scanY {
  0% { transform: translateY(40px); opacity: 0; }
  15% { opacity: 0.85; }
  85% { opacity: 0.85; }
  100% { transform: translateY(360px); opacity: 0; }
}
.float-chip {
  position: absolute;
  right: 8%;
  top: 18%;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(168, 85, 247, 0.5);
  background: rgba(20, 22, 28, 0.85);
  color: var(--violet-hot);
  animation: chipFloat 3.5s ease-in-out infinite;
}
@keyframes chipFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.08em;
  margin: 0 0 0.4rem;
  color: var(--bone);
}
.section-lede { color: var(--ash); margin: 0 0 1.5rem; max-width: 52ch; }

.wall, .scale {
  max-width: var(--max);
  margin: 4rem auto 0;
}
.wall__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 280px));
  gap: 0.75rem;
  justify-content: start;
}
.wall__card {
  margin: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: var(--bg-2);
  aspect-ratio: 4/5;
}
.wall__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.35) contrast(1.1);
  transition: transform 0.45s, filter 0.45s;
}
.wall__card:hover img {
  transform: scale(1.06);
  filter: grayscale(0) contrast(1.15);
}
.wall__card figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.55rem 0.7rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scale__chart {
  margin-bottom: 1.25rem;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background:
    radial-gradient(ellipse 65% 45% at 50% 8%, rgba(139, 92, 246, 0.14), transparent 58%),
    #050608;
  overflow: hidden;
  padding: 1.25rem 1rem 1.4rem;
}
/* Kill any leftover SVG face-grid styles if cached HTML appears */
.psl-grid,
.psl-cell,
.psl-face { display: none !important; }
.psl-chart {
  display: block;
  max-width: min(640px, 100%);
  margin: 0 auto;
}
.psl-chart img {
  display: block;
  width: 100%;
  height: auto;
  background: transparent;
  filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.22));
}
.scale__track {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
}
.scale__tier {
  padding: 0.7rem 0.45rem;
  background: var(--bg-2);
  border: 1px solid var(--steel);
  text-align: center;
}
.scale__tier span { display: block; color: var(--violet-hot); font-size: 0.72rem; }
.scale__tier em { font-style: normal; color: var(--ash); font-size: 0.75rem; }
.scale__tier--peak {
  border-color: var(--violet);
  box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.2);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

.panel { max-width: var(--max); margin: 0 auto; }
.upload {
  padding: 0;
  border: 1px dashed rgba(168, 85, 247, 0.45);
  background: rgba(20, 22, 28, 0.7);
  text-align: center;
  overflow: hidden;
}
.upload--solo {
  border-style: solid;
  border-color: rgba(168, 85, 247, 0.35);
}
.upload__hint { color: var(--ash); margin-top: 0.75rem; }
.upload__frame {
  padding: 0;
  border: none;
  background: transparent;
}
.upload__frame--solo { padding: 0; }
.upload-stage {
  position: relative;
  width: 100%;
  min-height: min(72vh, 560px);
  aspect-ratio: 3 / 4;
  max-height: min(78vh, 720px);
  background:
    radial-gradient(ellipse at 50% 35%, rgba(139, 92, 246, 0.14), transparent 55%),
    rgba(8, 9, 12, 0.92);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-stage.is-filled { cursor: default; }
.upload-stage__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}
.upload-stage__empty {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1.5rem;
  pointer-events: none;
}
.upload-stage.is-filled .upload-stage__empty { display: none; }
.upload-stage__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  letter-spacing: 0.06em;
  color: var(--bone);
  text-shadow: 0 0 24px rgba(168, 85, 247, 0.45);
}
.upload-stage__hint {
  margin: 0;
  color: var(--violet-hot);
  font-size: 0.78rem;
}
.upload-stage__meta {
  margin: 0.35rem 0 0;
  color: var(--ash);
  font-size: 0.68rem;
  opacity: 0.85;
}
.upload-stage__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.85rem 0.75rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent, rgba(8, 9, 12, 0.92) 40%);
}
.upload-stage__bar .btn { flex: 1 1 140px; max-width: 220px; }
.upload__actions--solo {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 0.75rem 1rem;
}
.upload--solo.is-filled .upload__actions--solo,
.upload-stage.is-filled ~ .upload__actions--solo {
  display: none;
}
.upload__actions {
  justify-content: center;
}
#start-analyze-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.error { color: var(--danger); margin-top: 0.75rem; padding: 0 0.75rem 0.75rem; }
.preview { margin-top: 1rem; max-width: 320px; }
.preview img { width: 100%; border: 1px solid var(--steel); display: block; }
.preview__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.banner {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  border: 1px solid var(--steel);
}
.banner--warn {
  color: #fde68a;
  background: rgba(120, 53, 15, 0.35);
  border-color: rgba(245, 158, 11, 0.45);
}

.progress { margin-top: 1.5rem; }
.progress__bar {
  height: 6px;
  background: var(--steel);
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7c3aed, #e9d5ff);
  transition: width 0.35s ease;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.7);
}
.progress__stages {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.progress__stages li {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--steel);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ash);
}
.progress__stages li.done { border-color: var(--ok); color: var(--ok); }
.progress__stages li.active { border-color: var(--violet-hot); color: var(--violet-hot); }

.results { margin-top: 2rem; }
.results__hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: end;
  padding: 1.25rem;
  background: var(--bg-2);
  border: 1px solid rgba(139, 92, 246, 0.35);
}
.results__rank {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 0.9;
  margin: 0;
  color: var(--violet-hot);
}
.results__tier { margin: 0.25rem 0 0; color: var(--bone); font-size: 1.2rem; }
.results__meter-track {
  position: relative;
  height: 10px;
  background: linear-gradient(90deg, #4c0519, #7c3aed, #e9d5ff);
  border-radius: 999px;
  margin-top: 1rem;
}
.results__meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
  transition: width 0.8s ease;
}
.results__meter-pin {
  position: absolute;
  top: -6px;
  width: 4px;
  height: 22px;
  background: #fff;
  left: 0%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px #fff;
  transition: left 0.8s ease;
}
/* Labels sit on the 0–10 score axis (same mapping as pctFromRank).
   Equal flex spacing made LTN/MTN look like HTN/Chad. */
.results__meter-labels {
  position: relative;
  height: 1.05rem;
  margin-top: 0.5rem;
  color: var(--ash);
  font-size: 0.62rem;
}
.results__meter-labels span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}
.results__meter-labels span:nth-child(1) { left: 22%; }  /* SUB3 ~2.2 */
.results__meter-labels span:nth-child(2) { left: 52.5%; } /* LTN ~5.25 */
.results__meter-labels span:nth-child(3) { left: 70%; }  /* HTN ~7.0 */
.results__meter-labels span:nth-child(4) { left: 82.5%; } /* CHAD ~8.25 */
.results__meter-labels span:nth-child(5) { left: 95%; }  /* ADAM ~9.5 */
.results__impression {
  margin: 0.65rem 0;
  line-height: 1.45;
  color: var(--fog);
  white-space: pre-wrap;
  font-size: 0.88rem;
  max-height: 4.2em;
  overflow: hidden;
}
.results__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.5rem;
}
.results__cols ul { padding-left: 1rem; color: var(--ash); font-size: 0.82rem; margin: 0.25rem 0; }
.results__cols h3 { margin: 0 0 0.35rem; font-size: 0.85rem; }
.results__overlays {
  display: none; /* dump removed — per-metric carousel only */
}
.results__overlays img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--steel);
}
.results__overview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin: 0.65rem 0;
  align-items: start;
}
.results__table-wrap,
.results__radar-wrap {
  background: rgba(16, 18, 24, 0.7);
  border: 1px solid var(--steel);
  padding: 0.55rem 0.65rem;
  width: 100%;
  box-sizing: border-box;
}
.results__table-wrap h3,
.results__radar-wrap h3 {
  margin: 0 0 0.35rem;
  color: var(--violet-hot);
  font-size: 0.68rem;
}
.metrics-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.metrics-table th,
.metrics-table td {
  text-align: left;
  padding: 0.32rem 0.2rem;
  border-bottom: 1px solid rgba(42, 46, 56, 0.9);
  line-height: 1.3;
  vertical-align: middle;
}
.metrics-table th {
  color: var(--ash);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
}
.metrics-table th:first-child,
.metrics-table td.metrics-name {
  width: 42%;
}
.metrics-table th:nth-child(2),
.metrics-table td.metrics-score {
  width: 58%;
}
.metrics-table .col-fix { width: 0; }
.metrics-name {
  color: #e8eaed;
  font-weight: 500;
  padding-right: 0.45rem !important;
  word-break: break-word;
}
.metrics-score__row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
}
.metrics-score__num {
  flex: 0 0 2.6em;
  font-size: 0.72rem;
  color: var(--ash);
  text-align: right;
}
.metrics-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
}
.metrics-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.5rem 0.55rem;
  border: 1px solid rgba(42, 46, 56, 0.95);
  border-radius: 8px;
  background: rgba(10, 12, 16, 0.65);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  box-sizing: border-box;
}
.metrics-item:hover {
  border-color: rgba(167, 139, 250, 0.45);
}
.metrics-item__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.metrics-item__name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e8eaed;
  line-height: 1.25;
}
.metrics-item__score {
  flex: 0 0 auto;
  font-size: 0.78rem;
  color: var(--ash);
}
.metrics-bar--rect {
  width: 100%;
  height: 12px;
  border-radius: 3px;
  background: rgba(42, 46, 56, 0.95);
  overflow: hidden;
}
.metrics-bar--rect .metrics-bar__fill {
  border-radius: 3px;
  height: 100%;
}
.metrics-bar__fill--bad {
  background: #ef4444;
}
.metrics-bar__fill--mid {
  background: #eab308;
}
.metrics-bar__fill--good {
  background: #22c55e;
}
.results__radar-stage {
  width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
}
#result-radar {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  margin: 0 auto;
}
.results__hero {
  display: grid;
  grid-template-columns: minmax(88px, 120px) 1fr;
  gap: 0.75rem 1rem;
  align-items: end;
  margin: 0.35rem 0 0.5rem;
}
.results__hero .results__meter-wrap {
  grid-column: 1 / -1;
}
.results__photo {
  margin: 0;
  position: relative;
}
.results__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--steel);
  background: #0a0b0e;
}
.results__photo figcaption {
  margin-top: 0.25rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--ash);
}
.results__table-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.results__table-head h3 { margin: 0; }
.results__table-photo,
.results__radar-photo {
  margin: 0;
  display: none;
}
.results__table-photo img,
.results__radar-photo img {
  display: none;
}
.results__radar-photo {
  display: none;
}
.results__radar-photo img {
  display: none;
}
.metric-subject-img {
  display: block;
  max-width: min(100%, 280px);
  max-height: 320px;
  width: auto;
  height: auto;
  object-fit: cover;
  margin: 0.75rem 0;
  border: 1px solid var(--steel);
}
.tt-slide--score {
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  align-items: stretch;
  text-align: left;
  padding: 0 !important;
  overflow: hidden;
  min-height: min(70vh, 560px);
}
.tt-slide__photo-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: min(38vh, 280px);
  background: #07080a;
}
.tt-slide__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tt-slide__photo-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(8, 9, 12, 0.92) 100%);
  pointer-events: none;
}
.tt-slide__score-body {
  position: relative;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem 2.1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0.15rem;
  background: #07080a;
}
.tt-slide--score .tt-slide__brand {
  position: static;
  margin: 0 0 0.2rem;
  text-align: left;
  letter-spacing: 0.18em;
}
.tt-slide--score .tt-slide__kicker {
  margin: 0;
  text-align: left;
}
.tt-slide--score .tt-slide__rank {
  margin: 0.1rem 0 0;
  text-align: left;
  font-size: clamp(2.8rem, 14vw, 4.4rem);
}
.tt-slide--score .tt-slide__tier {
  margin: 0.1rem 0 0.55rem;
  text-align: left;
}
.tt-slide--score .tt-slide__meter {
  width: 100%;
  max-width: none;
}
.tt-slide--score .tt-slide__hint {
  text-align: left;
  margin-top: 0.55rem;
}
.tt-slide--score .results__meter-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.15rem;
  height: auto;
  margin-top: 0.4rem;
  position: static;
}
.tt-slide--score .results__meter-labels span {
  position: static;
  transform: none;
  flex: 1 1 0;
  text-align: center;
  font-size: clamp(0.52rem, 2.4vw, 0.68rem);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.tt-slide--score .results__meter-labels span:first-child { text-align: left; }
.tt-slide--score .results__meter-labels span:last-child { text-align: right; }
@media (max-width: 520px) {
  .tt-slide--score {
    min-height: min(72vh, 560px);
  }
  .tt-slide__photo-wrap {
    min-height: min(42vh, 300px);
  }
  .results__hero {
    grid-template-columns: 96px 1fr;
  }
}
.results__rank {
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  line-height: 0.95;
  margin: 0;
}
.results__tier {
  margin: 0.15rem 0 0.35rem;
  font-size: 1rem;
}
.results__meter { margin-top: 0.35rem; }
.trait-card { padding: 0.5rem 0.65rem !important; }
.trait-card {
  background: rgba(16, 18, 24, 0.55);
  border: 1px solid var(--steel);
  padding: 0.85rem 1rem;
}
.metric-carousel {
  margin: 1.25rem 0;
  border: 1px solid var(--steel);
  padding: 0.85rem;
  background: rgba(16, 18, 24, 0.55);
}
.metric-carousel__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.metric-overlay-img {
  display: block;
  max-width: min(100%, 360px);
  margin: 0.75rem 0;
  border: 1px solid var(--steel);
}
.results__side {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 2px solid var(--violet);
  color: var(--ash);
  line-height: 1.55;
}
.lang-switch {
  display: inline-flex;
  gap: 0.2rem;
  border: 1px solid var(--steel);
  padding: 0.15rem;
}
.lang-btn {
  background: transparent;
  border: 0;
  color: var(--ash);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.45rem;
  cursor: pointer;
}
.lang-btn.is-active {
  color: var(--bone);
  background: rgba(168, 85, 247, 0.25);
}
.pkg-grid {
  display: grid;
  gap: 0.55rem;
}
.pkg-grid .pkg {
  display: grid;
  gap: 0.2rem;
  text-align: left;
  width: 100%;
  cursor: pointer;
  background: rgba(16, 18, 24, 0.7);
  border: 1px solid var(--steel);
  color: inherit;
  padding: 0.7rem 0.8rem;
}
.pkg-grid .pkg em {
  font-style: normal;
  color: var(--ash);
  font-size: 0.78rem;
}
.pkg-grid .pkg.is-selected,
.pkg-grid .pkg:hover {
  border-color: var(--violet-hot);
}
.pay-methods { margin-top: 0.85rem; }
.form-label {
  display: grid;
  gap: 0.35rem;
  margin: 0.55rem 0;
  font-size: 0.85rem;
  color: var(--ash);
}
.upload__btns { justify-content: center; flex-wrap: wrap; }
.muted { color: var(--ash); opacity: 0.85; }
@media (max-width: 820px) {
  .results__overview { grid-template-columns: 1fr; }
}
.metric-card {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--steel);
  background: rgba(20, 22, 28, 0.65);
}
.metric-card h4 {
  margin: 0 0 0.35rem;
  color: var(--violet-hot);
  font-family: var(--font-mono);
}
.metric-card .score {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--bone);
}
.metric-card p {
  white-space: pre-wrap;
  line-height: 1.6;
  color: var(--ash);
  font-size: 0.95rem;
}
.metric-card details { margin-top: 0.75rem; }
.metric-card summary { cursor: pointer; color: var(--violet-hot); }
.metric-clinical {
  display: grid;
  gap: 1rem;
  margin-top: 0.85rem;
}
.metric-text-block h5 {
  margin: 0 0 0.4rem;
  color: var(--violet-hot);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.metric-text-block p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.65;
  color: var(--fog);
  font-size: 0.95rem;
}
.metric-text-fallback {
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.75rem;
  border-left: 2px solid var(--violet);
  color: var(--ash);
  font-size: 0.88rem;
  line-height: 1.5;
}

.input {
  width: 100%;
  margin: 0.35rem 0 0.75rem;
  padding: 0.65rem 0.75rem;
  background: #0a0b0e;
  border: 1px solid var(--steel);
  color: var(--fog);
  font-family: var(--font-body);
  border-radius: var(--radius);
}
label { display: block; font-size: 0.85rem; color: var(--ash); }

.academy__toolbar {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.academy__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}
.guide-card {
  padding: 1rem;
  border: 1px solid var(--steel);
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}
.guide-card:hover { border-color: var(--violet); transform: translateY(-2px); }
.guide-card.locked { opacity: 0.75; }
.guide-card h4 { margin: 0 0 0.35rem; color: var(--bone); font-size: 1rem; }
.guide-card p { margin: 0; color: var(--ash); font-size: 0.85rem; }
.badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.15rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  border: 1px solid var(--violet);
  color: var(--violet-hot);
}
.badge--free { border-color: var(--ok); color: var(--ok); }
.academy__reader {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: var(--bg-2);
  scroll-margin-top: 5rem;
}
.academy__grid[hidden],
.academy__toolbar[hidden],
.academy__stats[hidden],
.academy__reader[hidden],
.academy__status[hidden],
.academy__lock[hidden],
#view-academy .section-head[hidden] {
  display: none !important;
}
.academy__body {
  white-space: pre-wrap;
  line-height: 1.7;
  color: var(--fog);
}
.academy__lock {
  margin-top: 1rem;
  padding: 1.25rem;
  border: 1px dashed var(--violet);
  text-align: center;
}

.cal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.cal-card {
  padding: 1.1rem;
  border: 1px solid var(--steel);
  background: rgba(20, 22, 28, 0.75);
}
.cal-card h3 { margin-top: 0; color: var(--bone); }
.diary-list { list-style: none; padding: 0; margin: 0.75rem 0; max-height: 220px; overflow: auto; }
.diary-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--steel);
  font-size: 0.85rem;
  color: var(--ash);
}
.meal-result { margin-top: 0.75rem; color: var(--fog); font-size: 0.9rem; white-space: pre-wrap; }
.file-btn { margin-top: 0.5rem; }

.profile-card {
  padding: 1.25rem;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: var(--bg-2);
  max-width: 560px;
}
.prof-history { margin: 1rem 0; }
.profile-payments { display: grid; gap: 0.55rem; margin-top: 0.9rem; }
.payment-row { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.8rem; padding: 0.7rem 0; border-top: 1px solid rgba(255,255,255,.1); }
.payment-row strong { color: var(--violet-hot); }
.payment-row__meta { grid-column: 1 / -1; font-size: .72rem; opacity: .65; }
.payment-notice { position: fixed; z-index: 100; top: 5rem; right: 1rem; max-width: min(28rem, calc(100vw - 2rem)); padding: .9rem 1rem; border: 1px solid rgba(167,139,250,.55); background: rgba(12,12,18,.96); color: #f5f3ff; box-shadow: 0 12px 35px rgba(0,0,0,.35); }
.payment-notice.is-pending { border-color: rgba(250,204,21,.55); }
.payment-notice.is-success { border-color: rgba(74,222,128,.65); }
.prof-history div {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--steel);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.upsell {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--steel);
}

.footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 1.25rem 3rem;
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid rgba(139, 92, 246, 0.15);
  color: var(--ash);
  font-size: 0.85rem;
  background: rgba(10, 11, 14, 0.9);
}
.footer a { color: var(--violet-hot); }
.footer__tg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--steel);
  color: var(--bone);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.footer__tg:hover {
  border-color: var(--violet-hot);
  color: var(--violet-hot);
  transform: translateY(-2px);
}

/* ——— Pricing squares ——— */
.pricing {
  padding: 3rem 1.25rem 4rem;
  max-width: var(--max);
  margin: 0 auto;
}
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}
.plan-square {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 210px;
  padding: 1.1rem 1rem 1rem;
  border: 1px solid var(--steel);
  background:
    linear-gradient(160deg, rgba(20, 22, 28, 0.95), rgba(12, 13, 16, 0.9)),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 6px,
      rgba(139, 92, 246, 0.03) 6px,
      rgba(139, 92, 246, 0.03) 7px
    );
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  color: inherit;
  font: inherit;
}
.plan-square:hover,
.plan-square.is-current {
  border-color: var(--violet-hot);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.plan-square--hot {
  border-color: rgba(168, 85, 247, 0.55);
}
.plan-square__tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--violet-hot);
  text-transform: uppercase;
}
.plan-square__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--bone);
  line-height: 1;
}
.plan-square__price {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--fog);
}
.plan-square__blurb {
  margin: 0;
  color: var(--ash);
  font-size: 0.84rem;
  line-height: 1.35;
  flex: 1;
}
.plan-square__current {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--violet);
  color: var(--violet-hot);
}
.plan-square__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}
.plan-square__actions .btn {
  font-size: 0.75rem;
  padding: 0.4rem 0.65rem;
}
.pricing__addon {
  margin-top: 1.25rem;
}
.pricing-scan {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  border: 1px dashed rgba(139, 92, 246, 0.45);
  background: rgba(20, 22, 28, 0.7);
}
.pricing-scan__kicker {
  margin: 0 0 0.25rem;
  color: var(--violet-hot);
  letter-spacing: 0.14em;
  font-size: 0.68rem;
}
.pricing-scan h3 {
  margin: 0;
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
}
.pricing-scan__copy p:last-child {
  margin: 0.35rem 0 0;
  color: var(--ash);
  max-width: 42ch;
  font-size: 0.88rem;
}
.pricing-scan__buy {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.pricing-scan__price {
  color: var(--violet-hot);
  font-size: 1.1rem;
}
.qty-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--steel);
  padding: 0.25rem 0.4rem;
}
.qty-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--steel);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.qty-btn:hover { border-color: var(--violet-hot); color: var(--violet-hot); }
.pricing__pay-status { margin-top: 0.75rem; min-height: 1.2em; color: var(--ash); }

.plan-detail {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.plan-detail[hidden] { display: none !important; }
.plan-detail__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 10, 0.72);
}
.plan-detail__panel {
  position: relative;
  width: min(440px, 100%);
  padding: 1.4rem 1.3rem 1.2rem;
  border: 1px solid var(--steel);
  background: linear-gradient(180deg, #161821, #0e1015);
}
.plan-detail__close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  border: 0;
  background: transparent;
  color: var(--ash);
  font-size: 1.4rem;
  cursor: pointer;
}
.plan-detail__kicker {
  margin: 0;
  color: var(--violet-hot);
  letter-spacing: 0.12em;
  font-size: 0.68rem;
}
.plan-detail__panel h2 {
  margin: 0.35rem 0;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--bone);
  letter-spacing: 0.04em;
}
.plan-detail__blurb { color: var(--ash); margin: 0 0 0.75rem; }
.plan-detail__price {
  margin: 0.75rem 0;
  color: var(--violet-hot);
  font-size: 1.05rem;
}
.plan-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--violet);
  color: var(--violet-hot);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}
.profile-upgrade-cta {
  margin-top: 0;
  display: flex;
  width: 100%;
  justify-content: center;
}
.guide-card .badge--plus {
  border-color: var(--ok);
  color: var(--ok);
}

@media (max-width: 900px) {
  .pricing__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .pricing__grid { grid-template-columns: 1fr; }
  .pricing-scan__buy { width: 100%; }
}

.muted { color: var(--ash); opacity: 0.85; }


/* ——— denser redesign layer ——— */
.grid-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(192, 132, 252, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192, 132, 252, 0.35) 1px, transparent 1px);
  background-size: 48px 48px;
}
.topbar__meta {
  color: var(--violet-hot);
  font-size: 0.7rem;
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 0.3rem 0.55rem;
}
.section-head { margin-bottom: 1.25rem; }
.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.stat-pill {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(20, 22, 28, 0.85);
  min-width: 7rem;
}
.stat-pill strong { color: var(--bone); font-size: 0.95rem; }
.stat-pill .mono { color: var(--violet-hot); font-size: 0.65rem; }
.float-chip--2 { left: 6%; right: auto; top: 62%; animation-delay: 0.8s; }

.wall__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.wall__card figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.wall__card figcaption em {
  font-style: normal;
  color: var(--violet-hot);
  font-size: 0.62rem;
  opacity: 0.85;
}
.wall__card--graphic {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(168, 85, 247, 0.28), transparent 50%),
    linear-gradient(160deg, #12141a, #0a0b0e 70%);
  color: var(--violet-hot);
}
.wall__card--xullo { color: #e9d5ff; }
.wall__card--jordan {
  background:
    radial-gradient(circle at 70% 30%, rgba(244, 63, 94, 0.2), transparent 45%),
    linear-gradient(160deg, #16121c, #0a0b0e);
}
.wall__card--bone { color: var(--bone); }
.wall__glyph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.wall__glyph svg { width: min(58%, 140px); color: inherit; filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.45)); }
.wall__neon-type {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 0.92;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--bone);
  text-shadow: 0 0 18px rgba(168, 85, 247, 0.65);
}
.wall__neon-type--sm { font-size: clamp(1.4rem, 3vw, 2rem); }
.wall__neon-sub { margin-top: 0.5rem; color: var(--violet-hot); text-align: center; }

.upload__frame {
  padding: 0;
  border: none;
  background: transparent;
}
.results__col {
  padding: 1rem;
  border: 1px solid var(--steel);
  background: rgba(20, 22, 28, 0.7);
}
.results__col h3 { margin: 0 0 0.5rem; color: var(--violet-hot); font-family: var(--font-mono); font-size: 0.85rem; }

.academy__stats, .profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.stat-tile {
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(139, 92, 246, 0.28);
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.08), transparent 60%),
    var(--bg-2);
}
.stat-tile .mono { display: block; color: var(--ash); font-size: 0.65rem; margin-bottom: 0.25rem; }
.stat-tile strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--bone);
  letter-spacing: 0.04em;
}
.academy__toolbar { grid-template-columns: 1fr 180px 160px; }
.academy__status { color: var(--ash); margin: 0 0 0.75rem; min-height: 1.2em; }
.academy__reader-meta { color: var(--violet-hot); margin: 0.75rem 0 0.35rem; }
.lock-badge {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--violet);
  color: var(--violet-hot);
}
.guide-card {
  position: relative;
  min-height: 132px;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.07), transparent 40%),
    var(--bg-2);
}
.guide-card .badge { position: absolute; right: 0.75rem; bottom: 0.75rem; }

.cal-hero {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background:
    radial-gradient(ellipse 50% 80% at 0% 50%, rgba(139, 92, 246, 0.18), transparent 55%),
    var(--bg-2);
}
.cal-hero__kcal {
  margin: 0.15rem 0;
  font-family: var(--font-display);
  font-size: 3.2rem;
  line-height: 0.95;
  color: var(--violet-hot);
}
.macro-rings { display: flex; gap: 0.75rem; justify-content: center; }
.ring {
  position: relative;
  width: 80px;
  text-align: center;
}
.ring svg { width: 80px; height: 80px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #2a2e38; stroke-width: 7; }
.ring-fg {
  fill: none;
  stroke: #a855f7;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 201;
  stroke-dashoffset: 201;
  transition: stroke-dashoffset 0.7s ease;
}
.ring[data-macro="f"] .ring-fg { stroke: #c084fc; }
.ring[data-macro="c"] .ring-fg { stroke: #7c3aed; }
.ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  color: var(--bone);
  font-size: 0.85rem;
  padding-bottom: 0.9rem;
}
.ring em {
  display: block;
  margin-top: -0.35rem;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ash);
}
.cal-presets { display: flex; flex-direction: column; gap: 0.35rem; }
.preset-chip {
  background: transparent;
  border: 1px solid var(--steel);
  color: var(--fog);
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-align: left;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.preset-chip:hover, .preset-chip.is-active {
  border-color: var(--violet);
  color: var(--violet-hot);
  background: rgba(139, 92, 246, 0.12);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
}
.macro-bars { display: grid; gap: 0.55rem; margin: 0.75rem 0; }
.macro-bar {
  display: grid;
  grid-template-columns: 28px 1fr 52px;
  gap: 0.45rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ash);
}
.macro-bar i {
  display: block;
  height: 8px;
  background: #1a1d24;
  border: 1px solid var(--steel);
}
.macro-bar i b {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7c3aed, #c084fc);
  transition: width 0.6s ease;
}
.tip-list { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--ash); font-size: 0.88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.week-summary { margin: 0.5rem 0; color: var(--violet-hot); }
.cal-nums { font-size: 0.9rem; line-height: 1.5; }
.muted { color: var(--ash); opacity: 0.8; }

.profile-dash { display: grid; gap: 1rem; }
.profile-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem;
  border: 1px solid rgba(139, 92, 246, 0.4);
  background:
    radial-gradient(ellipse 40% 80% at 0% 50%, rgba(139, 92, 246, 0.2), transparent 55%),
    var(--bg-2);
}
.avatar-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 210deg, #7c3aed, #e9d5ff, #7c3aed);
  animation: spinSlow 12s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }
.avatar-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0c0d10;
  color: var(--violet-hot);
  font-size: 1.4rem;
  animation: spinSlow 12s linear infinite reverse;
}
.profile-hero__copy h3 {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.06em;
  color: var(--bone);
}
.badge-row { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.tier-badge, .pro-badge, .plan-badge {
  padding: 0.2rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  border: 1px solid var(--steel);
}
.tier-badge { color: var(--violet-hot); border-color: var(--violet); }
.pro-badge { color: var(--ok); border-color: var(--ok); }
.pro-badge.is-free { color: var(--ash); border-color: var(--steel); }
.plan-badge {
  color: var(--violet-hot);
  border-color: var(--violet);
}
.plan-badge.is-free {
  color: var(--ash);
  border-color: var(--steel);
}
.profile-hero__actions { display: flex; flex-direction: column; gap: 0.4rem; }
.profile-hero__actions .btn { width: 100%; }
.profile-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}
.profile-card { max-width: none; }
.pkg-list { display: grid; gap: 0.45rem; }
.pkg {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--steel);
  background: #0a0b0e;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.pkg--hot {
  border-color: var(--violet);
  box-shadow: inset 0 0 18px rgba(139, 92, 246, 0.15);
}
.prof-history {
  margin-top: 0.75rem;
  max-height: 220px;
  overflow: auto;
}
.prof-history .hist-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--steel);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.hist-row strong { color: var(--violet-hot); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 1rem; }
  .wall__grid { grid-template-columns: repeat(2, 1fr); }
  .scale__track { grid-template-columns: repeat(2, 1fr); }
  .scale__chart { padding: 0.75rem 0.5rem 0.9rem; }
  .psl-chart { max-width: 100%; }
  .results__hero, .results__cols, .cal-grid, .academy__toolbar,
  .cal-hero, .profile-hero, .profile-grid, .form-grid, .academy__stats, .profile-stats {
    grid-template-columns: 1fr;
  }
  .topbar__meta { display: none; }
  .macro-rings { justify-content: flex-start; flex-wrap: wrap; }
  .cal-presets { flex-direction: row; flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; }
  .topbar__nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    background: rgba(18, 20, 26, 0.98);
    border-bottom: 1px solid var(--steel);
    padding: 0.35rem 0;
    z-index: 61;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  }
  .topbar__nav a {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid rgba(42, 46, 56, 0.65);
  }
  .topbar__nav a:last-child { border-bottom: none; }
  .topbar__nav.is-open { display: flex; }
}

/* ——— AI Chat (website) ——— */
.chat-panel { max-width: 720px; }
.ai-chat-drawer--page {
  display: flex;
  flex-direction: column;
  min-height: 62vh;
  border: 1px solid var(--steel);
  background: linear-gradient(180deg, #16181f 0%, #101218 100%);
  overflow: hidden;
}
.ai-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--steel);
  background: rgba(139, 92, 246, 0.06);
}
.ai-chat-bot-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--violet-hot);
  background: rgba(139, 92, 246, 0.12);
  border: 1.5px solid rgba(168, 85, 247, 0.45);
}
.ai-chat-header-info { flex: 1; min-width: 0; }
.ai-chat-hdr-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.02em;
}
.ai-chat-hdr-sub {
  font-size: 0.75rem;
  color: var(--ash);
  margin-top: 2px;
}
.ai-chat-scope {
  margin: 10px 16px 0;
  padding: 10px 12px;
  background: rgba(139, 92, 246, 0.07);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-left: 3px solid var(--violet);
  font-size: 0.78rem;
  color: var(--fog);
  line-height: 1.45;
}
.ai-chat-scope strong { color: var(--violet-hot); }
.ai-chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  max-height: 48vh;
}
.ai-msg {
  max-width: 82%;
  font-size: 0.9rem;
  line-height: 1.55;
  padding: 11px 14px;
  word-break: break-word;
}
.ai-msg-bot {
  background: rgba(255, 255, 255, 0.04);
  color: var(--fog);
  border-radius: 4px 14px 14px 14px;
  align-self: flex-start;
  border: 1px solid var(--steel);
}
.ai-msg-user {
  background: rgba(139, 92, 246, 0.14);
  color: var(--bone);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 14px 4px 14px 14px;
  align-self: flex-end;
}
.ai-msg-typing { opacity: 0.6; font-style: italic; }
.ai-chat-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--steel);
  background: rgba(0, 0, 0, 0.35);
}
.ai-chat-input-row input {
  flex: 1;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--steel);
  border-radius: 22px;
  font-size: 0.9rem;
  color: var(--fog);
  outline: none;
  font-family: var(--font-body);
}
.ai-chat-input-row input:focus {
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}
.ai-chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
}
.ai-chat-send-btn:disabled { opacity: 0.45; pointer-events: none; }
.ai-chat-send-btn:active { transform: scale(0.9); }

/* ——— Scan stage (TikTok-style) ——— */
.scan-stage {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
  padding: 0.5rem 0 1rem;
}
.scan-frame {
  position: relative;
  width: min(88vw, 360px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: #050607;
  box-shadow: 0 0 36px rgba(139, 92, 246, 0.1);
}
.scan-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Keep face fully readable under the mesh */
  filter: none;
}
.scan-frame__mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.scan-frame__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 38%, rgba(167, 139, 250, 0.06), transparent 58%),
    linear-gradient(180deg, transparent 72%, rgba(0, 0, 0, 0.28));
  animation: scanGlow 3.2s ease-in-out infinite;
}
@keyframes scanGlow {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.85; }
}
.scan-frame__hud {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0.7rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(196, 181, 253, 0.85);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent);
}
.scan-label {
  margin: 1.1rem 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 6vw, 2rem);
  letter-spacing: 0.28em;
  color: #fff;
  text-indent: 0.28em;
}
.scan-bar {
  height: 4px;
  border-radius: 99px;
  background: #2a2e38;
  overflow: hidden;
  margin: 0 auto;
  width: min(88vw, 360px);
}
.scan-bar__fill {
  height: 100%;
  width: 0%;
  background: #fff;
  transition: width 0.35s ease;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}
.scan-status {
  margin: 0.65rem 0 0;
  color: var(--ash);
  font-size: 0.78rem;
}
.scan-live { margin: 0.25rem 0 0; min-height: 1.1em; }

/* ——— TT result deck ——— */
.tt-deck {
  position: relative;
  max-width: 420px;
  width: 100%;
  margin: 0 auto 1.75rem;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: #07080a;
  border-radius: 16px;
  touch-action: pan-y;
}
.tt-deck__track {
  display: flex;
  width: 100%;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.tt-slide {
  flex: 0 0 100%;
  min-height: min(58vh, 420px);
  padding: 0.85rem 0.9rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse 70% 50% at 50% 20%, rgba(139, 92, 246, 0.18), transparent 60%),
    #07080a;
}
.tt-slide__brand {
  position: absolute;
  top: 0.55rem;
  left: 0;
  right: 0;
  margin: 0;
  color: var(--violet-hot);
  letter-spacing: 0.2em;
  font-size: 0.62rem;
}
.tt-slide { position: relative; }
.tt-slide__kicker {
  margin: 0;
  color: var(--ash);
  letter-spacing: 0.16em;
  font-size: 0.65rem;
}
.tt-slide__rank {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 16vw, 5rem);
  line-height: 0.9;
  color: #fff;
  letter-spacing: 0.02em;
  text-shadow: 0 0 40px rgba(168, 85, 247, 0.45);
}
.tt-slide__tier {
  margin: 0.2rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 4vw, 1.45rem);
  letter-spacing: 0.12em;
  color: var(--violet-hot);
}
.tt-slide__meter {
  width: 100%;
  max-width: 260px;
}
.tt-slide__hint {
  margin: 0.7rem 0 0;
  color: var(--ash);
  opacity: 0.7;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}
.tt-slide__title {
  margin: 0.25rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: var(--ok);
}
.tt-slide__title--weak { color: var(--danger); margin-top: 0.65rem; }
.tt-slide__list {
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  max-width: 300px;
  text-align: left;
}
.tt-slide__list li {
  padding: 0.32rem 0.5rem;
  margin-bottom: 0.22rem;
  border: 1px solid rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.06);
  font-size: 0.78rem;
  color: var(--bone);
  line-height: 1.3;
}
.tt-slide__list--weak li {
  border-color: rgba(244, 63, 94, 0.28);
  background: rgba(244, 63, 94, 0.07);
}
.tt-slide__impression {
  margin: 0.35rem 0 0.55rem;
  max-width: 300px;
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--fog);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tt-slide__bonesoft {
  margin: 0 0 0.75rem;
  color: var(--violet-hot);
  font-size: 0.75rem;
}
.tt-slide__cta {
  margin: 0;
  color: var(--ash);
  letter-spacing: 0.12em;
  font-size: 0.75rem;
}
.tt-deck__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.85rem;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  z-index: 2;
}
.tt-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
}
.tt-dot.is-active {
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#admin-panel {
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: inset 0 0 24px rgba(52, 211, 153, 0.08);
}
#account-card {
  border-color: rgba(168, 85, 247, 0.45);
  order: -1;
}
#account-status, #admin-status {
  margin-top: 0.65rem;
  min-height: 1.2em;
  word-break: break-word;
  color: var(--fog);
}
.profile-grid #account-card {
  grid-column: 1 / -1;
}

/* ——— Mobile hardening ——— */
@media (max-width: 900px) {
  .view { padding: 1rem 0.85rem 5.5rem; }
  .section-title { font-size: clamp(1.8rem, 9vw, 2.6rem); }
  .section-lede { font-size: 0.92rem; }
  .profile-hero {
    grid-template-columns: 1fr !important;
    justify-items: center;
    text-align: center;
    gap: 0.9rem;
    padding: 1rem;
  }
  .profile-hero__copy { width: 100%; }
  .profile-hero__actions {
    width: 100%;
    flex-direction: column;
  }
  .profile-hero__actions .btn { width: 100%; }
  .profile-hero__copy h3 { font-size: 1.55rem; }
  .avatar-ring { width: 76px; height: 76px; }
  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem;
  }
  .stat-tile {
    min-width: 0;
    padding: 0.65rem 0.5rem;
  }
  .stat-tile strong {
    font-size: 1.05rem;
    word-break: break-word;
  }
  .profile-grid { grid-template-columns: 1fr !important; gap: 0.75rem; }
  .cal-card { padding: 0.9rem; overflow: hidden; }
  .pkg { flex-wrap: wrap; gap: 0.35rem; font-size: 0.72rem; }
  .prof-history .hist-row {
    grid-template-columns: 48px 1fr;
    font-size: 0.72rem;
  }
  .prof-history .hist-row span:last-child {
    grid-column: 1 / -1;
    opacity: 0.7;
  }
  #rank-chart { width: 100% !important; max-width: 100%; height: auto !important; }
  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; }
  .input, .form-label { max-width: 100%; }
  .form-label { display: block; margin-top: 0.55rem; }
  .upload-slot__frame { aspect-ratio: 1 / 1; max-height: 52vw; }
  .upload-stage {
    min-height: min(68vh, 640px);
    max-height: none;
    aspect-ratio: auto;
    height: min(72vh, 680px);
  }
  .results__overview {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .metrics-table { font-size: 0.68rem; }
  .metrics-table .col-fix,
  .metrics-table td:nth-child(3),
  .metrics-table th:nth-child(3) { display: none; }
  .metric-carousel { margin-top: 0.75rem; }
  .metric-overlay-img { max-width: 100%; height: auto; }
  .topbar { padding: 0.7rem 0.85rem; gap: 0.5rem; }
  .brand-mark span { font-size: 1.15rem; }
  .tt-slide { min-height: min(52vh, 380px); padding: 0.75rem 0.75rem 1.85rem; }
  .tt-slide--score { min-height: min(72vh, 560px); padding: 0 !important; }
  .results__hero { margin-top: 0.25rem; }
  .results__cols { grid-template-columns: 1fr 1fr; gap: 0.4rem; }
}

@media (max-width: 420px) {
  .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .scan-label { letter-spacing: 0.18em; font-size: 1.25rem; }
  .tt-slide__rank { font-size: clamp(2.6rem, 18vw, 3.4rem); }
  .tt-slide--score .results__meter-labels span {
    font-size: 0.5rem;
    letter-spacing: 0;
  }
}

/* ——— Paywall modal ——— */
.paywall {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.paywall[hidden] { display: none !important; }
.paywall__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.78);
  backdrop-filter: blur(6px);
}
.paywall__panel {
  position: relative;
  width: min(420px, 100%);
  background: linear-gradient(165deg, #12141c 0%, #0a0b10 100%);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 16px;
  padding: 1.25rem 1.15rem 1.1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}
.paywall__close {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  border: none;
  background: transparent;
  color: var(--ash);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.paywall__kicker {
  margin: 0;
  color: var(--violet-hot);
  letter-spacing: 0.18em;
  font-size: 0.68rem;
}
.paywall__title {
  margin: 0.35rem 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.06em;
  color: #fff;
}
.paywall__lede {
  margin: 0 0 0.9rem;
  color: var(--fog);
  font-size: 0.92rem;
  line-height: 1.4;
}
.paywall__offers {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.paywall-offer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  text-align: left;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(16, 18, 24, 0.9);
  color: var(--bone);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.paywall-offer:hover,
.paywall-offer.is-selected {
  border-color: rgba(168, 85, 247, 0.85);
  background: rgba(88, 40, 140, 0.22);
}
.paywall-offer strong {
  font-size: 1.05rem;
}
.paywall-offer em {
  font-style: normal;
  color: var(--ash);
  font-size: 0.78rem;
}
.paywall-offer__price {
  color: var(--violet-hot);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
.paywall__methods {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(42, 46, 56, 0.9);
}
.paywall__methods-label {
  margin: 0 0 0.55rem;
  color: var(--fog);
  font-size: 0.78rem;
}
.paywall__status {
  margin: 0.55rem 0 0;
  min-height: 1.1em;
  color: var(--fog);
  font-size: 0.75rem;
  word-break: break-word;
}
/* Never let .btn display rules un-hide the admin stub */
#paywall-stub[hidden] {
  display: none !important;
}

/* ——— Payment method picker ——— */
.pay-method {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.pay-method[hidden] { display: none !important; }
.pay-method__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.78);
  backdrop-filter: blur(6px);
}
.pay-method__panel {
  position: relative;
  width: min(420px, 100%);
  background: linear-gradient(165deg, #12141c 0%, #0a0b10 100%);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 16px 16px 0 0;
  padding: 1.25rem 1.15rem calc(1.15rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.55);
  max-height: min(88vh, 560px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 640px) {
  .pay-method {
    align-items: center;
    padding: 1rem;
  }
  .pay-method__panel {
    border-radius: 16px;
    padding-bottom: 1.15rem;
  }
}
.pay-method__close {
  position: absolute;
  top: 0.45rem;
  right: 0.55rem;
  border: none;
  background: transparent;
  color: var(--ash);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.pay-method__kicker {
  margin: 0 0 0.35rem;
  color: var(--violet-hot);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}
.pay-method__panel h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: 0.04em;
  color: var(--bone);
}
.pay-method__lede {
  margin: 0 0 1rem;
  color: var(--ash);
  font-size: 0.92rem;
}
.pay-method__list {
  display: grid;
  gap: 0.65rem;
}
.pay-method__opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  width: 100%;
  padding: 0.95rem 1rem;
  text-align: left;
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 12px;
  background: rgba(20, 22, 28, 0.9);
  color: var(--fog);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.pay-method__opt:hover:not(:disabled),
.pay-method__opt:focus-visible:not(:disabled) {
  border-color: var(--violet-hot);
  background: rgba(139, 92, 246, 0.12);
}
.pay-method__opt--soon,
.pay-method__opt:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: var(--steel);
}
.pay-method__opt-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}
.pay-method__opt-title strong {
  font-size: 1.05rem;
  color: var(--bone);
}
.pay-method__badge {
  margin-left: auto;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(52, 211, 153, 0.55);
  color: var(--ok);
  border-radius: 999px;
}
.pay-method__badge--soon {
  border-color: rgba(245, 158, 11, 0.55);
  color: #fbbf24;
}
.pay-method__opt-hint {
  color: var(--ash);
  font-size: 0.72rem;
}
.pay-method__cancel {
  width: 100%;
  margin-top: 0.85rem;
}
.pay-method__status {
  margin: 0.65rem 0 0;
  min-height: 1.1em;
  font-size: 0.75rem;
  color: var(--fog);
  word-break: break-word;
}

/* ——— Adaptive + perf hardening ——— */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}
.bone-canvas { max-width: none; height: 100%; }

@media (max-width: 900px) {
  .violet-orb,
  .grid-overlay,
  .noise {
    display: none !important;
  }
  .topbar {
    backdrop-filter: none;
    background: rgba(12, 13, 16, 0.98);
  }
  .hero__cta .btn,
  .pricing-scan__buy .btn {
    width: 100%;
  }
  .pricing-scan {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .plan-square__actions {
    flex-direction: column;
  }
  .plan-square__actions .btn { width: 100%; }
  .plan-detail__panel,
  .paywall__panel {
    width: min(100%, 100vw - 1.5rem);
    max-height: min(90vh, 640px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .scale__track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }
  .wall__grid { grid-template-columns: 1fr 1fr; }
  .results__cols { grid-template-columns: 1fr; }
  .footer {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 520px) {
  .wall__grid { grid-template-columns: 1fr; }
  .hero__stats { width: 100%; }
  .stat-pill { flex: 1 1 calc(50% - 0.35rem); min-width: 0; }
  .brand-hero { font-size: clamp(2.6rem, 14vw, 3.8rem); }
  .results__hero {
    grid-template-columns: 1fr !important;
    justify-items: start;
  }
  .tt-slide__rank { font-size: clamp(2.8rem, 16vw, 3.6rem); }
  .metrics-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .violet-orb,
  .bone-canvas,
  .noise { display: none !important; }
}

.results__pdf-wrap {
  margin: 1.25rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}
.results__pdf-wrap .btn {
  min-width: min(88vw, 280px);
}
#download-pdf-status {
  font-size: 0.72rem;
}

.topbar__cta {
  margin-left: 0.35rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  white-space: nowrap;
}
.admin-sep {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 1rem 0;
}
.admin-promo-list {
  max-height: 160px;
  overflow: auto;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  white-space: pre-wrap;
}

.auth-sheet { max-width: 420px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 0.75rem 0 1rem;
}
.auth-tab {
  border: 1px solid var(--steel);
  background: transparent;
  color: var(--ash);
  padding: 0.55rem 0.4rem;
  font: inherit;
  cursor: pointer;
}
.auth-tab.is-active {
  border-color: var(--violet-hot);
  color: var(--fog);
  background: rgba(139, 92, 246, 0.12);
}
.auth-or {
  text-align: center;
  color: var(--ash);
  margin: 0.2rem 0 0.75rem;
}
.auth-actions { margin-top: 0.75rem; }
.auth-status { min-height: 1.2em; margin-top: 0.75rem; }
.auth-hint { margin-top: 0.55rem; font-size: 0.75rem; line-height: 1.35; }
.auth-steps {
  display: flex;
  gap: 0.65rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.85rem;
  color: var(--ash);
  font-size: 0.72rem;
}
.auth-steps li.is-active { color: var(--violet-hot); }

.channel-promo {
  position: fixed;
  z-index: 80;
  width: min(92vw, 340px);
  padding: 1rem 1rem 1.1rem;
  border: 1px solid rgba(139, 92, 246, 0.4);
  background: rgba(12, 18, 24, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}
.channel-promo__close {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  border: 0;
  background: transparent;
  color: var(--ash);
  font-size: 1.35rem;
  cursor: pointer;
  line-height: 1;
}
.channel-promo__kicker {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.72rem;
}
.channel-promo__text {
  margin: 0 0 0.85rem;
  line-height: 1.4;
  font-size: 0.95rem;
}
.footer__tg svg { display: block; }
.brand-skull { color: var(--accent); }
.skull-svg { filter: drop-shadow(0 0 24px rgba(139, 92, 246, 0.35)); }



