﻿:root {
  --bg: #061121;
  --panel-bg: linear-gradient(180deg, rgba(12, 24, 46, 0.96), rgba(7, 17, 33, 0.94));
  --paper: rgba(11, 22, 43, 0.92);
  --paper-strong: #0c1a33;
  --ink: #f6f8fd;
  --ink-soft: #c1cadb;
  --line: rgba(236, 241, 250, 0.11);
  --accent: #e0c6a2;
  --accent-deep: #be9868;
  --accent-alt: #8eaebd;
  --accent-warm: #f6e8d5;
  --danger: #d17c87;
  --control-bg: #ffffff;
  --control-ink: #10141c;
  --control-line: #d3dae6;
  --shadow: 0 30px 72px rgba(1, 7, 18, 0.48);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(142, 174, 189, 0.16), transparent 26%),
    radial-gradient(circle at 87% 12%, rgba(224, 198, 162, 0.18), transparent 24%),
    radial-gradient(circle at 48% 100%, rgba(190, 152, 104, 0.08), transparent 30%),
    linear-gradient(180deg, #061121 0%, #09172d 42%, #06111f 100%);
  color: var(--ink);
  font-family: Aptos, "Segoe UI", "Trebuchet MS", sans-serif;
  line-height: 1.5;
  padding: 28px 22px 40px;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 150px 150px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 82%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a.button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #091321;
  cursor: pointer;
  padding: 0.82rem 1.2rem;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
}

button:hover,
a.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(217, 180, 107, 0.2);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button.ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

button.danger {
  background: linear-gradient(135deg, #b84d5c, var(--danger));
}

button.danger-soft {
  color: var(--danger);
  border-color: rgba(154, 57, 71, 0.24);
}

.rail-account {
  padding: 12px 0 4px;
  border-top: 1px solid var(--panel-line);
  margin-top: 8px;
}

.rail-account-signed-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rail-account-email {
  font-size: 0.75rem;
  opacity: 0.65;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.rail-account-hint {
  font-size: 0.75rem;
  opacity: 0.65;
  margin-bottom: 8px;
  margin-top: 8px;
}

.rail-signin-form {
  margin-top: 10px;
}

.rail-utilities {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 4px;
  border-top: 1px solid var(--panel-line);
  margin-top: 4px;
}

button.subtle-action {
  font-size: 0.75rem;
  padding: 5px 12px;
  opacity: 0.6;
  transition: opacity 0.15s;
}

button.subtle-action:hover {
  opacity: 1;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--control-line);
  background: var(--control-bg);
  color: var(--control-ink);
  border-radius: 16px;
  padding: 0.9rem 0.95rem;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  box-shadow: inset 0 1px 0 rgba(15, 23, 38, 0.04);
}

input::placeholder,
textarea::placeholder {
  color: #657187;
}

select,
option {
  color: var(--control-ink);
  background: var(--control-bg);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(217, 180, 107, 0.68);
  box-shadow: 0 0 0 4px rgba(217, 180, 107, 0.16);
  transform: translateY(-1px);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

h1,
h2,
h3 {
  font-family: "Aptos Display", Aptos, "Segoe UI", Arial, sans-serif;
  letter-spacing: -0.04em;
  margin: 0;
  font-weight: 700;
  text-wrap: balance;
}

p {
  margin: 0;
}

.is-hidden {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(26px);
  opacity: 0.82;
}

.ambient-one {
  width: 260px;
  height: 260px;
  background: rgba(217, 180, 107, 0.14);
  top: 84px;
  right: 11%;
}

.ambient-two {
  width: 340px;
  height: 340px;
  background: rgba(131, 191, 209, 0.14);
  bottom: 60px;
  left: 2%;
}

.hero,
.panel,
.footer-note {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero {
  border-radius: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 40px 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 60% 0%, rgba(224, 198, 162, 0.18), transparent 55%),
    radial-gradient(ellipse at 20% 100%, rgba(142, 174, 189, 0.13), transparent 50%),
    linear-gradient(160deg, rgba(13, 27, 51, 0.99), rgba(6, 17, 33, 0.98));
}

.hero::after {
  content: "";
  position: absolute;
  top: -96px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 220px;
  background: radial-gradient(ellipse, rgba(224, 198, 162, 0.10) 0%, rgba(224, 198, 162, 0) 70%);
  pointer-events: none;
}

.hero::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.panel {
  position: relative;
  overflow: hidden;
}

.eyebrow {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-size: 0.82rem;
}

.hero .eyebrow {
  font-size: clamp(2.6rem, 6vw, 5rem);
  letter-spacing: 0.05em;
  line-height: 1;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(1.02rem, 1.45vw, 1.24rem);
  max-width: 34ch;
  line-height: 1.32;
  font-weight: 500;
  color: rgba(238, 244, 255, 0.90);
}

.hero-lead {
  margin-top: 8px;
  max-width: 38ch;
  color: rgba(238, 244, 255, 0.55);
  font-size: 0.92rem;
}

.hero-support {
  margin-top: 16px;
  max-width: 38ch;
  color: rgba(238, 244, 255, 0.32);
  font-size: 0.875rem;
}

.hero-divider {
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 28px 0 24px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.hero-cta {
  margin-top: 6px;
  padding: 14px 28px;
  background: var(--accent);
  color: #061121;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: opacity 0.15s, transform 0.15s;
}

.hero-cta:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.hero-support {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 4px 0 0;
}

.signin-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.text-link {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.text-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

.signin-form {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signin-otp-hint {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  text-align: center;
}

.signin-back {
  font-size: 0.8rem;
  margin-top: 4px;
}

.unit-switch {
  display: inline-flex;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.unit-switch button {
  background: transparent;
  color: var(--ink-soft);
  box-shadow: none;
  padding-inline: 1rem;
}

.unit-switch button.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #091321;
}

.status-note {
  color: rgba(232, 239, 251, 0.76);
  max-width: 24ch;
  font-size: 0.9rem;
}

.workspace {
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(460px, 1fr);
  gap: 22px;
  align-items: start;
}

/* Admin page â€” completely separate from shopper layout */
#admin-page {
  display: none;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

body.is-admin-view #admin-page {
  display: flex;
}

body.is-admin-view .hero,
body.is-admin-view #main-layout,
body.is-admin-view #profile-checkin-panel,
body.is-admin-view #measurement-reminder-panel,
body.is-admin-view #app-footer {
  display: none !important;
}

.admin-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.is-admin-locked .admin-content {
  display: none !important;
}

body.is-help-view .workspace,
body.is-help-view #shop-sub-nav {
  display: none !important;
}

.help-page {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.help-newsletter {
  padding: 0 4px 18px;
}

/* â”€â”€ Help page: collapsible accordion sections â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.help-section {
  border-bottom: 1px solid var(--line);
}

.help-section:first-child {
  border-top: 1px solid var(--line);
}

.help-section > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 2px;
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  transition: opacity 0.15s;
}

.help-section > summary::-webkit-details-marker { display: none; }

.help-section > summary::after {
  content: "+";
  font-size: 1rem;
  color: var(--ink-soft);
  flex-shrink: 0;
  font-weight: 400;
  transition: transform 0.2s;
}

.help-section[open] > summary::after {
  content: "âˆ’";
}

.help-section > summary:hover { opacity: 0.75; }

.help-section-body {
  padding: 0 2px 20px;
}

.help-section-desc {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 16px;
  line-height: 1.55;
}

body.is-profiles-view .workspace {
  grid-template-columns: minmax(0, 1fr);
}

body.is-profiles-view #shop-main-stack {
  display: none !important;
}

body.is-measurements-view .workspace {
  grid-template-columns: minmax(0, 1fr);
}

body.is-measurements-view #shop-rail {
  display: none !important;
}

body.is-measurements-view .journey-panel,
body.is-measurements-view #shopping-step-panel,
body.is-measurements-view #advice-step-panel,
body.is-measurements-view .shop-sub-nav {
  display: none !important;
}

body.is-shop-view .workspace {
  grid-template-columns: minmax(0, 1fr);
}

body.is-shop-view #shop-rail {
  display: none !important;
}

body.is-shop-view .journey-panel,
body.is-shop-view #measurements-step-panel {
  display: none !important;
}


body.is-welcome-view .workspace,
body.is-welcome-view #profile-checkin-panel,
body.is-welcome-view #measurement-reminder-panel,
body.is-welcome-view #app-footer {
  display: none !important;
}

/* â”€â”€ Sidebar: core task focus â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* During measurements entry and brand selection, only show the    */
/* two primary task steps (Measurements + Find my size).           */
/* Secondary links (Manage profiles, Loved, Help) reappear on the  */
/* profiles, manage-profile, and help views.                       */
body.is-measurements-view .sidebar-secondary,
body.is-measurements-view .sidebar-divider,
body.is-shop-view .sidebar-secondary,
body.is-shop-view .sidebar-divider {
  display: none !important;
}

/* â”€â”€ Brand step: core flow only â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Hide the technical "Using profile size lane" readonly field     */
/* (profile context is already shown in the checkin strip above)  */
/* and the advanced "Found a specific item?" URL shortcut.         */
/* The form becomes: Brand â†’ Garment type â†’ Fit â†’ See my size.    */
#recommendation-form .readonly-field {
  display: none;
}

/* Brand select spans full width now its 2-col peer is hidden */
#recommendation-form > .field:first-child {
  grid-column: 1 / -1;
}

#rec-url-field {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.rec-url-in-advice {
  margin-top: 20px;
}

.rec-url-in-advice#rec-url-field {
  padding: 0;
  border: none;
  background: none;
  border-radius: 0;
  gap: 6px;
}

.rec-url-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.rec-url-in-advice input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 0.9rem;
}

.rec-url-in-advice input::placeholder {
  color: var(--ink-soft);
  opacity: 0.7;
}

.rec-url-in-advice .field-hint {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin: 0;
}

.recommendation-url-feedback.is-success {
  color: var(--accent-warm);
}

.shop-sub-nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  margin-bottom: 18px;
  width: fit-content;
}

.shop-sub-tab {
  position: relative;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: calc(var(--radius-md) - 3px);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 7px;
}

.shop-sub-tab:hover {
  color: var(--ink);
  background: rgba(255,255,255,0.05);
}

.shop-sub-tab.is-active {
  background: rgba(255,255,255,0.09);
  color: var(--ink);
  font-weight: 600;
}

.checkin-panel {
  margin-top: 12px;
}

.checkin-context-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.checkin-context-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

#profile-checkin-add {
  white-space: nowrap;
  padding: 0.5rem 0.9rem;
}

.checkin-context-copy {
  padding: 8px 12px 0;
}

.checkin-switch-btn {
  flex-shrink: 0;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 12px;
  opacity: 0.7;
}

.checkin-switch-btn:hover {
  opacity: 1;
}

.reminder-panel {
  margin-top: 12px;
  border-radius: 32px;
  padding: 18px 20px;
  background:
    linear-gradient(135deg, rgba(224, 198, 162, 0.14), rgba(142, 174, 189, 0.08)),
    var(--panel-bg);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.checkin-copy h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 8px;
}

.checkin-actions {
  margin-top: 12px;
}

.checkin-list {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.checkin-card {
  text-align: left;
  width: 100%;
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.95);
  color: #0d1320;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.checkin-card:hover {
  box-shadow: 0 18px 28px rgba(1, 7, 18, 0.18);
}

.checkin-card strong,
.checkin-card span,
.checkin-card small {
  display: block;
}

.checkin-card strong {
  font-size: 1rem;
}

.checkin-card span {
  color: #5f6c82;
  margin-top: 4px;
}

.checkin-card small {
  color: #275b7a;
  margin-top: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.main-stack,
.rail {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.welcome-page {
  margin-top: 24px;
  border-radius: 34px;
  padding: 28px;
}

.admin-auth {
  margin-top: 24px;
  border-radius: 34px;
  padding: 28px;
}

.welcome-profile-list {
  display: grid;
  gap: 18px;
}

.welcome-tagline {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--accent-warm);
  margin: 0 0 22px;
  line-height: 1.5;
  opacity: 0.88;
}

.lane-overview {
  margin-bottom: 20px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.lane-overview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.welcome-card {
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.welcome-measurements {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.welcome-measurements-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.welcome-measurements-header .guide-kicker {
  margin-bottom: 0;
}

.unit-toggle-row {
  display: flex;
  gap: 6px;
}

.unit-pill {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.unit-pill.is-active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.welcome-measurement-grid {
  margin-top: 14px;
}

.welcome-measurement-card {
  cursor: default;
}

.compact-button {
  padding: 0.6rem 0.9rem;
}

.panel {
  border-radius: var(--radius-xl);
  padding: 24px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-heading.small {
  margin-bottom: 16px;
}

.panel-copy {
  color: var(--ink-soft);
  margin-top: 6px;
}

.journey-panel {
  padding-bottom: 14px;
}

.journey-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.journey-step {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  text-align: left;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #eef4ff;
  box-shadow: none;
  opacity: 0.5;
  transition: opacity 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.journey-step:hover {
  opacity: 0.75;
  border-color: rgba(224, 198, 162, 0.2);
}

.journey-step.is-active {
  opacity: 1;
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(224, 198, 162, 0.14), rgba(142, 174, 189, 0.06));
  box-shadow: 0 0 0 3px rgba(224, 198, 162, 0.15), 0 4px 16px rgba(0,0,0,0.18);
}

.journey-step.is-complete {
  opacity: 0.7;
  border-color: rgba(224, 198, 162, 0.25);
  background: rgba(224, 198, 162, 0.05);
}

.journey-step:focus-visible {
  outline: none;
  border-color: rgba(217, 180, 107, 0.82);
  box-shadow: 0 0 0 4px rgba(217, 180, 107, 0.16);
}

.journey-step:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.journey-step-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink-soft);
  font-weight: 800;
  flex-shrink: 0;
  font-size: 0.9rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.journey-step.is-active .journey-step-number {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  box-shadow: 0 2px 8px rgba(224, 198, 162, 0.4);
}

.journey-step.is-complete .journey-step-number {
  background: rgba(224, 198, 162, 0.18);
  border-color: rgba(224, 198, 162, 0.35);
  color: var(--accent);
}

.journey-step-copy {
  display: grid;
  gap: 4px;
}

.journey-step-copy strong {
  font-size: 0.92rem;
  color: #ffffff;
}

.journey-step.is-active .journey-step-copy strong {
  color: #ffffff;
}

.journey-step-copy small {
  color: var(--ink-soft);
  font-size: 0.74rem;
}

.card-list {
  display: grid;
  gap: 14px;
}

.share-import-card {
  margin-top: 12px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.share-import-card textarea {
  min-height: 120px;
}

.compact .select-card {
  padding-block: 14px;
}

.select-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.select-card:hover,
.select-card.is-selected {
  transform: translateY(-2px);
  border-color: rgba(224, 198, 162, 0.4);
  box-shadow: 0 20px 32px rgba(1, 7, 18, 0.22);
}

.select-card.empty-card {
  cursor: default;
}

.select-card.empty-card:hover {
  transform: none;
  box-shadow: none;
}

.select-card:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: rgba(217, 180, 107, 0.82);
  box-shadow: 0 0 0 4px rgba(217, 180, 107, 0.18), 0 20px 32px rgba(1, 7, 18, 0.22);
}

.card-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.card-title strong {
  font-size: 1rem;
  color: #ffffff;
}

.card-meta {
  color: var(--ink-soft);
  margin-top: 6px;
  font-size: 0.94rem;
}

.card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.card-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.card-action-btn {
  font-size: 0.82rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
}

.card-wishlist-btn {
  color: var(--accent);
  opacity: 0.85;
}

.card-wishlist-btn:hover {
  opacity: 1;
}

.mini-tag,
.tag,
.chart-pill,
.signal-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.84rem;
  white-space: nowrap;
}

.mini-tag {
  background: rgba(142, 174, 189, 0.14);
  color: #e6f2f7;
}

.tag {
  background: rgba(224, 198, 162, 0.16);
  color: var(--accent-warm);
}

.tag.subtle {
  background: rgba(142, 174, 189, 0.14);
  color: #e6f2f7;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rec-grid {
  margin-bottom: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: #e2ebfb;
  font-size: 0.93rem;
}

.readonly-value {
  width: 100%;
  border: 1px solid rgba(224, 198, 162, 0.26);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-radius: 16px;
  padding: 0.9rem 0.95rem;
  min-height: 54px;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.field-hint {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.profile-unit-setting {
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.unit-setting-label {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-unit-setting .field-hint {
  max-width: 42ch;
}

.full-span {
  grid-column: 1 / -1;
}

.share-advice-section {
  margin-top: 24px;
  padding: 20px 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.share-advice-section .guide-kicker {
  margin-bottom: 4px;
}

.share-form-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.share-form-row input {
  flex: 1;
  min-width: 0;
}

.share-form-row button {
  flex-shrink: 0;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.step-actions .helper {
  margin: 0;
  max-width: 54ch;
}

.missing-brand-details {
  margin-top: 14px;
}

.missing-brand-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: 0.93rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  opacity: 1;
  transition: opacity 0.15s;
  user-select: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.missing-brand-toggle:hover {
  opacity: 1;
}

.missing-brand-toggle::-webkit-details-marker,
.missing-brand-toggle::marker {
  display: none;
}

.missing-brand-toggle::after {
  content: "â†“";
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.missing-brand-details[open] .missing-brand-toggle::after {
  transform: rotate(180deg);
}

.missing-brand-details[open] .missing-brand-toggle {
  opacity: 1;
}

.missing-brand-card {
  margin-top: 12px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.measurements-block {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.measure-guide-details {
  margin-bottom: 12px;
}

.measure-guide-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 6px 0;
  user-select: none;
  list-style: none;
}

.measure-guide-summary::-webkit-details-marker {
  display: none;
}

.measure-guide-summary::before {
  content: "â–¸";
  font-size: 0.75em;
  transition: transform 0.15s;
}

.measure-guide-details[open] .measure-guide-summary::before {
  transform: rotate(90deg);
}

.measure-guide-details .measure-guide {
  margin-top: 10px;
}

.measure-guide {
  display: grid;
  grid-template-columns: minmax(250px, 0.95fr) minmax(240px, 1.05fr);
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(14, 28, 52, 0.98), rgba(7, 17, 33, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.measure-guide-stage {
  display: grid;
  gap: 12px;
}

.guide-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide-tab {
  background: rgba(255, 255, 255, 0.06);
  color: #e2ebfb;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
  padding: 0.65rem 0.95rem;
}

.guide-tab.is-active {
  background: rgba(224, 198, 162, 0.16);
  color: var(--accent-warm);
  border-color: rgba(224, 198, 162, 0.28);
}

.guide-visual {
  min-height: 320px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top, rgba(224, 198, 162, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(234, 240, 248, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  padding: 14px;
}

.guide-visual svg {
  width: min(100%, 332px);
  height: auto;
}

.measure-guide-copy {
  display: grid;
  gap: 12px;
  align-content: start;
}

.guide-start-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.guide-kicker {
  color: var(--accent-warm);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-start-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(238, 244, 255, 0.84);
}

.guide-start-list li + li,
.guide-step-list li + li {
  margin-top: 8px;
}

.measure-guide-copy h4 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.3rem;
  margin: 0;
  color: #ffffff;
}

.guide-placement {
  color: var(--accent-warm);
  font-weight: 700;
}

.guide-step-list {
  margin: 0;
  padding-left: 20px;
  color: rgba(232, 239, 251, 0.78);
}

.guide-hotspot {
  cursor: pointer;
}

.guide-hotspot .guide-callout {
  transition: transform 180ms ease, filter 180ms ease;
}

.guide-hotspot:hover .guide-callout,
.guide-hotspot.is-active .guide-callout {
  transform: translateY(-1px);
  filter: drop-shadow(0 10px 18px rgba(8, 17, 33, 0.16));
}

.guide-hotspot:focus-visible {
  outline: none;
}

.guide-hotspot:focus-visible .guide-callout {
  transform: translateY(-1px);
  filter: drop-shadow(0 10px 18px rgba(8, 17, 33, 0.16));
  stroke: rgba(217, 180, 107, 0.92);
  stroke-width: 2;
}

.guide-hotspot:focus-visible circle:first-of-type {
  fill: #c59a5d;
}

.guide-hotspot:focus-visible circle:last-of-type {
  stroke: rgba(217, 180, 107, 0.62);
}

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

.measurement-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.measurement-card:hover,
.measurement-card.is-active {
  transform: translateY(-1px);
  border-color: rgba(142, 174, 189, 0.34);
  box-shadow: 0 16px 24px rgba(1, 7, 18, 0.2);
}

.measurement-card label {
  display: grid;
  gap: 6px;
}

.measurement-card strong {
  font-size: 0.95rem;
  color: #ffffff;
}

.measurement-card small {
  color: var(--ink-soft);
}

.measurement-card input {
  cursor: text;
}

.unit-toggle-link {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--accent);
  opacity: 0.7;
  text-decoration: none;
  text-align: left;
  padding: 0;
}

.unit-toggle-link:hover {
  opacity: 1;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.result-card {
  border-radius: 28px;
  padding: 22px;
  min-height: 192px;
  background:
    radial-gradient(circle at top right, rgba(224, 198, 162, 0.14), transparent 30%),
    linear-gradient(155deg, rgba(14, 28, 52, 0.98), rgba(7, 18, 35, 0.96));
  border: 1px solid var(--line);
}

.result-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(217, 180, 107, 0.16);
}

.recommendation-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.context-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.context-card span {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.context-card strong {
  display: block;
  margin-top: 6px;
  color: #ffffff;
  font-size: 1rem;
}

.empty-state {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ink-soft);
}

.result-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.result-hero h3 {
  font-size: clamp(2rem, 3vw, 2.9rem);
  line-height: 0.95;
  margin-top: 5px;
}

.support-line {
  margin-top: 14px;
  font-size: 1rem;
  color: rgba(245, 248, 255, 0.92);
}

.support-callout {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--accent-warm);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.detail-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.detail-item span {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.detail-item strong {
  display: block;
  font-size: 1.15rem;
  margin-top: 4px;
  color: #ffffff;
}

.request-list {
  display: grid;
  gap: 12px;
}

.request-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.request-item.is-available {
  border-color: rgba(142, 174, 189, 0.34);
  background: linear-gradient(135deg, rgba(142, 174, 189, 0.1), rgba(255, 255, 255, 0.04));
}

.request-item.is-empty {
  display: block;
}

.request-copy {
  min-width: 0;
}

.request-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.request-item small {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
}

.request-item p {
  margin-top: 6px;
}

.request-remove {
  flex-shrink: 0;
  padding-inline: 0.95rem;
}

.request-open {
  padding-inline: 0.95rem;
}

.breakdown-card,
.spec-block {
  margin-top: 18px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.breakdown-title {
  color: #ffffff;
  font-weight: 700;
}

.breakdown-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
}

.breakdown-list li + li {
  margin-top: 8px;
}

.spec-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.spec-header h4 {
  margin-top: 4px;
  font-size: 1.1rem;
  color: #ffffff;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.spec-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(8, 18, 35, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.spec-item span,
.spec-item small,
.spec-item p {
  display: block;
}

.spec-item span {
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.spec-item strong {
  display: block;
  margin-top: 5px;
  color: #ffffff;
  font-size: 1rem;
}

.spec-item small {
  margin-top: 5px;
  color: rgba(232, 239, 251, 0.78);
}

.spec-item p {
  margin-top: 8px;
  color: var(--accent-warm);
  font-size: 0.9rem;
}

.spec-item.spec-room {
  border-color: rgba(142, 174, 189, 0.24);
}

.spec-item.spec-close {
  border-color: rgba(224, 198, 162, 0.34);
}

.spec-item.spec-over {
  border-color: rgba(209, 124, 135, 0.34);
}

.insight-list {
  margin: 18px 0 0;
  padding: 0 0 0 20px;
  color: var(--ink-soft);
}

.pill-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pill-row.wrap {
  flex-wrap: wrap;
}

.chart-pill,
.signal-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.chart-pill.is-selected,
.signal-pill.is-active {
  background: rgba(224, 198, 162, 0.14);
  color: var(--accent-warm);
  border-color: rgba(224, 198, 162, 0.3);
}

.helper {
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.import-block {
  margin: 20px 0 18px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.import-block input[type="file"] {
  padding: 0.72rem 0.8rem;
}

.helper.status-error {
  color: var(--danger);
}

.helper.status-success {
  color: #eef7fb;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.size-table th,
.size-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(30, 42, 69, 0.07);
  vertical-align: top;
}

.size-table th {
  color: var(--ink-soft);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
}

.size-table td input {
  min-width: 82px;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
}

.size-table td.actions {
  width: 88px;
}

.size-table tr:last-child td {
  border-bottom: 0;
}

.size-table button {
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(204, 116, 130, 0.24);
  color: var(--danger);
  box-shadow: none;
}

.confidence-chip {
  background: rgba(224, 198, 162, 0.16);
  color: #fff2cf;
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  font-size: 0.84rem;
}

.muted {
  color: var(--ink-soft);
}

.footer-note {
  margin-top: 24px;
  padding: 18px 22px;
  border-radius: 22px;
  color: var(--ink-soft);
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--ink-soft);
  opacity: 0.8;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.privacy-badge {
  /* Hidden everywhere except the welcome/login screen (see body.is-welcome-view rule below) */
  display: none;
  position: fixed;
  bottom: 18px;
  right: 18px;
  /* Must sit above .bottom-nav (z-index 1000) and all standard page content */
  z-index: 1001;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 22px;
  background: rgba(224, 198, 162, 0.14);
  border: 1px solid rgba(224, 198, 162, 0.45);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.04em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.privacy-badge:hover,
.privacy-badge:focus-visible {
  background: rgba(224, 198, 162, 0.24);
  border-color: rgba(224, 198, 162, 0.7);
  color: var(--accent-warm);
  outline: 2px solid rgba(224, 198, 162, 0.4);
  outline-offset: 2px;
}

/* Badge is rendered inside the JS login overlay (#veya-login-overlay) — no CSS
   show/hide rules needed here. The .privacy-badge in HTML is kept as a DOM
   anchor only and remains hidden. */

/* On mobile, add bottom padding so the footer clears the fixed bottom nav bar
   (~60 px tall) and is fully readable. */
@media (max-width: 767px) {
  .footer-note {
    margin-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}

/* Privacy links — Help page and Measurements panel */
.help-privacy-link,
.panel-privacy-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 10px 0;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.7;
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease;
}
.help-privacy-link:hover,
.help-privacy-link:focus-visible,
.panel-privacy-link:hover,
.panel-privacy-link:focus-visible {
  opacity: 1;
}
.help-privacy-link {
  margin-top: 8px;
  padding-left: 4px;
}
.panel-privacy-link {
  display: block;
  margin-top: 16px;
}

.reveal {
  animation: fade-up 560ms ease both;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1220px) {
  .workspace {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  }

}

.measurement-help-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

#shop-main-stack > .panel {
  padding: 22px;
}

#shop-main-stack > .panel .panel-heading {
  gap: 14px;
  margin-bottom: 14px;
}

#measurements-step-panel .step-actions,
#shopping-step-panel .step-actions {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

#measurements-step-panel .step-actions {
  justify-content: flex-end;
}

#shopping-step-panel .step-actions {
  justify-content: flex-end;
}

#back-to-measurements {
  margin-right: auto;
}

#go-to-shopping,
#go-to-advice {
  min-width: 180px;
}

.unit-switch {
  gap: 4px;
  padding: 4px;
}

.unit-switch button {
  padding-inline: 0.82rem;
  padding-block: 0.42rem;
  min-height: 34px;
  font-size: 0.82rem;
}

@media (max-width: 920px) {
  body {
    padding: 20px 14px 28px;
  }

  .hero {
    padding: 22px 20px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .measurement-grid,
  .measure-guide,
  .recommendation-context,
  .journey-stepper,
  .detail-grid,
  .spec-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .profile-unit-setting {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .step-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .step-actions .helper {
    max-width: none;
  }

  .step-actions button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .panel,
  .hero {
    border-radius: 24px;
    padding: 18px;
  }

  .panel-heading,
  .result-hero,
  .spec-header,
  .request-item {
    flex-direction: column;
  }

  .request-remove {
    width: 100%;
  }

  .request-actions {
    width: 100%;
  }

  .action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .action-row button {
    width: 100%;
  }

  .unit-switch {
    width: 100%;
    justify-content: space-between;
  }

  .unit-switch button {
    flex: 1;
  }
}

/* â”€â”€ Newsletter signup â”€â”€ */

.newsletter-signup {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  width: 100%;
  max-width: 480px;
  text-align: center;
}

.newsletter-label {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.newsletter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.newsletter-row input[type="email"],
.newsletter-row input[type="text"] {
  flex: 1;
  min-width: 180px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 0.9rem;
}

.newsletter-row input[type="email"]::placeholder,
.newsletter-row input[type="text"]::placeholder {
  color: var(--ink-soft);
  opacity: 0.5;
}

.newsletter-row input[type="email"]:focus,
.newsletter-row input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

.newsletter-row button {
  background: var(--accent);
  color: #061121;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.newsletter-row button:hover {
  opacity: 0.88;
}

.newsletter-row button:disabled {
  opacity: 0.55;
  cursor: default;
}

.newsletter-status {
  margin: 8px 0 0;
  font-size: 0.82rem;
}

.newsletter-status.status-success {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(224, 198, 162, 0.12);
  border: 1px solid rgba(224, 198, 162, 0.3);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 12px;
}

.newsletter-status.status-error {
  color: #e07a7a;
}

/* â”€â”€ Height ft/in inputs â”€â”€ */

.height-ftin-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.height-ftin-inputs input {
  width: 60px;
  text-align: center;
}

.ftin-sep {
  color: var(--ink-soft);
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* â”€â”€ Page navigation â”€â”€ */

.page-nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  margin-bottom: 18px;
  width: fit-content;
}

.page-tab {
  position: relative;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: calc(var(--radius-lg) - 4px);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 7px;
}

.page-tab:hover {
  color: var(--ink);
  background: rgba(255,255,255,0.06);
}

.page-tab.is-active {
  background: rgba(255,255,255,0.10);
  color: var(--ink);
}

.tab-count {
  background: var(--accent);
  color: #061121;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 99px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* â”€â”€ Legacy nav (always hidden â€” replaced by sidebar) â”€â”€ */

#page-nav,
#shop-sub-nav {
  display: none !important;
}

/* â”€â”€ Main layout (sidebar + content) â”€â”€ */

.main-layout {
  display: grid;
  grid-template-columns: 188px 1fr;
  gap: 0 20px;
  align-items: start;
}

.app-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  padding: 9px 12px;
  border-radius: calc(var(--radius-lg) - 6px);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sidebar-item svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
}

.sidebar-item:hover svg {
  opacity: 1;
}

.sidebar-item.is-active {
  background: rgba(224, 198, 162, 0.12);
  color: var(--accent);
}

.sidebar-item.is-active svg {
  opacity: 1;
  stroke: var(--accent);
}

.sidebar-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 4px;
}

.sidebar-item.sidebar-secondary {
  font-size: 0.8rem;
  opacity: 0.7;
}

.sidebar-item.sidebar-secondary.is-active {
  opacity: 1;
}

body.is-home-view .sidebar-secondary,
body.is-measurements-view .sidebar-secondary,
body.is-shop-view .sidebar-secondary,
body.is-home-view .sidebar-divider,
body.is-measurements-view .sidebar-divider,
body.is-shop-view .sidebar-divider {
  display: flex !important;
}

body.is-home-view .sidebar-divider,
body.is-measurements-view .sidebar-divider,
body.is-shop-view .sidebar-divider {
  display: block !important;
  height: 1px;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.home-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-panel {
  display: grid;
  gap: 18px;
}

.home-profile-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(224, 198, 162, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.home-profile-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.home-profile-row h3 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-actions .ghost {
  background: rgba(255, 255, 255, 0.04);
}

@media (min-width: 921px) {
  body {
    padding-top: 18px;
  }

  .hero {
    padding: 18px 30px 14px;
    border-radius: 28px;
  }

  .hero::after {
    top: -118px;
    width: 380px;
    height: 170px;
  }

  .hero .eyebrow {
    font-size: clamp(2.15rem, 4.4vw, 3.8rem);
    margin-bottom: 6px;
  }

  .hero h1 {
    font-size: clamp(0.98rem, 1.1vw, 1.12rem);
    line-height: 1.25;
    max-width: 40ch;
  }

  .hero-lead {
    margin-top: 4px;
    max-width: 42ch;
    font-size: 0.86rem;
  }

  .hero-actions {
    gap: 6px;
    margin-top: 8px;
  }

  .hero-support {
    margin-top: 0;
    font-size: 0.84rem;
  }

  .main-layout {
    gap: 0 16px;
  }

  .main-content {
    gap: 12px;
  }

  .main-stack,
  .rail {
    gap: 14px;
  }

  .journey-panel {
    padding-bottom: 10px;
  }

  #shop-main-stack > .panel {
    padding: 18px 20px;
  }

  #shop-main-stack > .panel .panel-heading {
    gap: 12px;
    margin-bottom: 12px;
  }

  #measurements-step-panel .profile-unit-setting {
    width: fit-content;
    margin: -4px 0 10px auto;
    padding: 4px 8px;
    gap: 8px;
    background: rgba(255, 255, 255, 0.035);
  }

  #measurements-step-panel .unit-setting-label {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
  }

  #measurements-step-panel .unit-switch {
    gap: 3px;
    padding: 3px;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.08);
  }

  #measurements-step-panel .unit-switch button {
    min-height: 30px;
    padding: 0.32rem 0.7rem;
    font-size: 0.76rem;
  }

  #measurements-step-panel .measurement-grid {
    gap: 10px;
  }

  #measurements-step-panel .measurement-card {
    padding: 12px;
    border-radius: 16px;
  }

  #measurements-step-panel .measurement-card label {
    gap: 5px;
  }

  #measurements-step-panel .measurement-card strong {
    font-size: 0.92rem;
  }

  #measurements-step-panel .measurement-card small {
    font-size: 0.8rem;
  }

  #measurements-step-panel .measurement-help-row {
    gap: 10px;
    margin-top: 8px;
  }

  #measurements-step-panel .step-actions {
    margin-top: 14px;
    padding-top: 12px;
  }

  #go-to-shopping,
  #go-to-advice {
    min-width: 168px;
  }
}

@media (max-width: 640px) {
  .main-layout {
    grid-template-columns: 1fr;
    gap: 12px 0;
  }

  .app-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    border-radius: var(--radius-md);
    padding: 6px;
    gap: 2px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.13);
  }

  .sidebar-item {
    flex: 1 1 auto;
    justify-content: center;
    font-size: 0.8rem;
    padding: 7px 8px;
    gap: 6px;
    color: var(--ink);
  }

  .sidebar-item svg {
    display: none;
  }

  .sidebar-divider {
    display: none;
  }

  .sidebar-item.sidebar-secondary {
    font-size: 0.8rem;
    opacity: 1;
  }

  .home-profile-row {
    flex-direction: column;
  }

  .home-actions {
    flex-direction: column;
  }
}

/* â”€â”€ Wishlist page â”€â”€ */

.wishlist-page {
  max-width: 1200px;
  margin: 0 auto;
}

.wishlist-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 860px) {
  .wishlist-layout {
    grid-template-columns: 1fr;
  }
  .wishlist-add-panel {
    position: static;
  }
  .wishlist-items-panel {
    padding-bottom: 32px;
  }
}

.wishlist-add-panel {
  position: sticky;
  top: 20px;
}

.price-input-row {
  display: flex;
  gap: 8px;
}

.price-input-row select {
  width: auto;
  flex-shrink: 0;
}

.price-input-row input {
  flex: 1;
}

.ghost-select {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 0.85rem;
  cursor: pointer;
}

.wishlist-items-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wishlist-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wishlist-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wishlist-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.wishlist-brand {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
}

.wishlist-item-name {
  margin: 4px 0 2px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.wishlist-profile-tag {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.wishlist-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wishlist-original-price {
  color: var(--ink-soft);
  text-decoration: line-through;
  font-size: 0.9rem;
}

.wishlist-arrow {
  color: var(--ink-soft);
}

.wishlist-target-price {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wishlist-discount-tag {
  background: rgba(224, 198, 162, 0.15);
  color: var(--accent);
  border-radius: 99px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.wishlist-no-price {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.wishlist-notes {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
}

.wishlist-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.wishlist-date {
  font-size: 0.75rem;
  color: var(--ink-soft);
  opacity: 0.6;
  margin-left: auto;
}

.wishlist-remove {
  flex-shrink: 0;
  padding: 4px 8px;
  font-size: 0.8rem;
}

.wishlist-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.wishlist-mark-purchased {
  flex-shrink: 0;
  padding: 4px 8px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.wishlist-mark-purchased:hover {
  color: #2a9d5c;
}

.wishlist-card.is-purchased {
  opacity: 0.75;
  border-color: #2a9d5c44;
  background: color-mix(in srgb, var(--paper) 94%, #2a9d5c);
}

.wishlist-card.is-purchased .wishlist-item-name {
  text-decoration: line-through;
  text-decoration-color: #2a9d5c88;
}

.wishlist-card.is-purchased .wishlist-mark-purchased {
  color: #2a9d5c;
  font-weight: 700;
}

.wishlist-purchased-badge {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2a9d5c;
}

.wishlist-empty {
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
}

.small-action {
  font-size: 0.8rem;
  padding: 5px 12px;
}

.muted {
  color: var(--ink-soft);
}

.wishlist-notify-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(224, 198, 162, 0.07);
  border: 1px solid rgba(224, 198, 162, 0.18);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 4px;
}

.wishlist-notify-row .helper {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.wishlist-notify-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  background: rgba(224, 198, 162, 0.1);
  border: 1px solid rgba(224, 198, 162, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 4px;
}

.notify-icon {
  font-size: 0.9rem;
}

.field-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--surface2);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: middle;
}

.outbound-cta-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 24px;
}

.outbound-cta-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 28px;
  background: var(--accent);
  color: #061121;
  border: none;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}

/* â”€â”€ Result extras disclosure (full analysis) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.result-extras {
  margin-top: 18px;
}

.result-extras > summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--ink-soft);
  padding: 6px 0;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.result-extras > summary::-webkit-details-marker {
  display: none;
}

.result-extras > summary::before {
  content: "\203A";
  display: inline-block;
  transition: transform 0.18s;
}

.result-extras[open] > summary::before {
  transform: rotate(90deg);
}

.result-extras > summary:hover {
  color: var(--ink);
}

.outbound-cta-link::after {
  content: "â†—";
  font-size: 0.9em;
}

.outbound-cta-link:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.outbound-cta-no-url {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0;
  text-align: center;
  padding: 14px 20px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.post-result-upsell {
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2, rgba(255,255,255,0.03));
}

.post-result-upsell .eyebrow {
  margin-bottom: 4px;
}

.post-result-upsell .panel-copy {
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.secondary-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.secondary-actions button {
  font-size: 0.82rem;
  opacity: 0.78;
  padding: 8px 16px;
}

.secondary-actions button:hover {
  opacity: 1;
}

.affiliate-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.affiliate-section-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.click-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.click-log-table th {
  text-align: left;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}

.click-log-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--ink);
  vertical-align: middle;
}

.click-log-table tr:last-child td {
  border-bottom: none;
}

.click-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.click-type-affiliate {
  background: rgba(224, 198, 162, 0.18);
  color: var(--accent-warm);
  border: 1px solid rgba(224, 198, 162, 0.3);
}

.click-type-standard {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.click-type-fallback {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.click-type-none {
  background: rgba(255, 80, 80, 0.07);
  color: var(--danger, #e05050);
  border: 1px solid rgba(255, 80, 80, 0.2);
}

.panel-compact {
  font-size: 0.88rem;
}

.panel-compact .panel-heading {
  padding-bottom: 10px;
}

/* Affiliate links as an embedded sub-feature */
.affiliate-sub {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

.affiliate-sub-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.affiliate-sub-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  white-space: nowrap;
}

.affiliate-link-search-inline {
  width: 90px !important;
  min-width: 0;
  font-size: 0.81rem !important;
  padding: 4px 8px !important;
  height: auto !important;
}

.affiliate-garment-filter-inline {
  font-size: 0.81rem !important;
  padding: 4px 8px !important;
  height: auto !important;
  max-width: 100px;
}

.subtle-btn {
  font-size: 0.8rem !important;
  padding: 4px 10px !important;
  margin-left: auto;
}

.affiliate-sub-form {
  padding: 10px 0 4px;
}

.affiliate-sub-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.affiliate-sub-form-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.form-grid-compact {
  gap: 8px;
}

.form-grid-compact .field span {
  font-size: 0.8rem;
}

.form-grid-compact input,
.form-grid-compact select {
  font-size: 0.85rem;
  padding: 6px 10px;
}

.affiliate-links-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.affiliate-links-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.affiliate-links-table th {
  text-align: left;
  padding: 5px 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.affiliate-links-table td {
  padding: 7px 8px;
  font-size: 0.83rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.affiliate-links-table tbody tr:last-child td {
  border-bottom: none;
}

.affiliate-link-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  white-space: nowrap;
}

.status-active {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(80, 180, 120, 0.12);
  color: #5db87c;
  border: 1px solid rgba(80, 180, 120, 0.25);
}

.status-inactive {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-field span {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* â”€â”€ Admin entry link â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.admin-entry-link {
  font-size: 0.75rem;
  color: var(--ink-soft);
  text-decoration: none;
  opacity: 0.55;
}
.admin-entry-link:hover {
  opacity: 0.9;
}

/* â”€â”€ Profile meta collapsible â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.profile-meta-details {
  margin-bottom: 0;
}
.profile-meta-summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--ink-soft);
  padding: 10px 0 6px;
  user-select: none;
}
.profile-meta-summary::-webkit-details-marker { display: none; }
.profile-meta-summary::before {
  content: "â€º";
  display: inline-block;
  margin-right: 5px;
  transition: transform 0.18s;
}
.profile-meta-details[open] .profile-meta-summary::before {
  transform: rotate(90deg);
}
.profile-meta-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 8px;
}

.profile-meta-inner .field span {
  font-weight: 600;
}

.profile-meta-inner .field-hint {
  line-height: 1.45;
}

.profile-meta-inner .action-row {
  margin-top: 0;
}

.profile-notes-details {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 8px;
}

.profile-notes-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  user-select: none;
}

.profile-notes-summary::-webkit-details-marker {
  display: none;
}

.profile-notes-summary::before {
  content: ">";
  display: inline-block;
  margin-right: 6px;
  color: var(--ink-soft);
  transition: transform 0.18s;
}

.profile-notes-details[open] .profile-notes-summary::before {
  transform: rotate(90deg);
}

.profile-notes-status {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(224, 198, 162, 0.28);
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--sand);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.profile-notes-field {
  padding-top: 10px;
}

/* â”€â”€ Hide full measurement guide (DOM kept for JS) â”€â”€â”€â”€â”€â”€ */
.measure-guide-hidden {
  display: none !important;
}

/* â”€â”€ Measurement secondary fields hidden by default â”€â”€â”€â”€â”€ */
.measurement-grid:not(.show-all) .measurement-card[data-secondary] {
  display: none;
}

/* ── Denim fit measurement fields (separate toggle) ─────── */
.measurement-grid:not(.show-denim) .measurement-card[data-denim] {
  display: none;
}
.denim-measurements-toggle-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  margin-top: 4px;
  flex-wrap: wrap;
}
.denim-toggle-btn {
  font-size: 0.82rem;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.denim-toggle-btn:hover {
  opacity: 0.75;
}
.denim-toggle-hint {
  font-size: 0.75rem;
  color: var(--ink-soft);
}
.mid-waist-note {
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin-top: 6px;
  line-height: 1.3;
}

/* â”€â”€ Measurement help row (More / How to measure) â”€â”€â”€â”€â”€â”€â”€ */
.measurement-help-row {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}
.measurement-help-row .text-link {
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.measurement-help-row .text-link:hover {
  color: var(--ink);
}

/* â”€â”€ Measurement help modal â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.measurement-help-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 17, 33, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 20px;
}
.measurement-help-modal.is-hidden {
  display: none;
}
.measurement-help-modal-inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.measurement-help-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.measurement-help-modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
.modal-close-btn {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}
.modal-close-btn:hover {
  color: var(--ink);
  background: rgba(255,255,255,0.06);
}
.measure-help-list {
  margin: 18px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.measure-help-item dt {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 3px;
}
.measure-help-item dd {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* â”€â”€ Result secondary row (Save to Loved + Back) â”€â”€â”€â”€â”€â”€â”€ */
.result-secondary-row {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
}
.result-secondary-row .ghost {
  font-size: 0.85rem;
  padding: 8px 14px;
}
.result-secondary-row .ghost.subtle-action {
  opacity: 0.72;
}
.result-secondary-row .ghost.subtle-action:hover {
  opacity: 1;
}
/* "Save to Loved" as a genuinely secondary text action */
#save-item-to-wishlist {
  font-size: 0.82rem;
  color: var(--ink-soft);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,0.2);
}
#save-item-to-wishlist:hover {
  color: var(--ink);
  text-decoration-color: rgba(255,255,255,0.5);
}

/* Populated result-card: step up the visual weight as the payoff */
.result-card:not(.empty-state) {
  border-color: rgba(217, 180, 107, 0.22);
  background:
    radial-gradient(circle at top right, rgba(224, 198, 162, 0.2), transparent 35%),
    linear-gradient(155deg, rgba(14, 28, 52, 0.99), rgba(7, 18, 35, 0.97));
  box-shadow: 0 4px 32px rgba(0,0,0,0.28), 0 0 0 1px rgba(217,180,107,0.1);
}

/* â”€â”€ Check-in name indicator â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.checkin-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

/* â”€â”€ Modal new content elements â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.modal-intro-copy {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 16px;
  line-height: 1.55;
}
.measure-help-reassurance {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 14px 0 0;
  font-style: italic;
}
.measure-help-actions {
  margin-top: 20px;
}
.measure-help-actions .primary {
  width: 100%;
}

/* â”€â”€ Simplified unit setting label â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.unit-setting-label {
  font-size: 0.82rem;
  color: var(--ink-soft);
  flex-shrink: 0;
}

/* â”€â”€ Brand request inline link â”€â”€â”€ */
.brand-request-cta {
  margin-top: 6px;
}

.brand-request-cta .text-link {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.42);
}

.brand-request-cta .text-link:hover {
  color: rgba(255, 255, 255, 0.75);
}

/* â”€â”€ Hide profile-meta-details in measurements-only view â”€ */
body.is-measurements-view .profile-meta-details {
  display: none !important;
}

/* â”€â”€ Profiles view: pure switcher â€” hide the inline editor, management actions, and import tools â”€ */
body.is-profiles-view .profile-meta-details {
  display: none !important;
}

body.is-profiles-view .missing-brand-details {
  display: none !important;
}

/* â”€â”€ Manage-profile view: dedicated full profile editor â”€ */
body.is-manage-profile-view .workspace {
  grid-template-columns: minmax(0, 1fr);
}

body.is-manage-profile-view #shop-main-stack {
  display: none !important;
}

body.is-manage-profile-view #profile-list {
  display: none !important;
}

body.is-manage-profile-view #new-profile {
  display: none !important;
}

body.is-manage-profile-view .missing-brand-details {
  display: block !important;
}

body.is-manage-profile-view .profile-meta-details {
  display: block !important;
}

/* â”€â”€ Add another item prompt â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* The add-prompt is hidden by default at the ID level â€” no class is required
   to keep it hidden. This means ANY version of app.js that only manipulates
   the is-hidden class cannot inadvertently show this element; it can only be
   shown by new JS that explicitly adds the is-ready class. */
#add-another-item-prompt {
  display: none !important;
}

/* Only show when new JS confirms a real recommendation exists. */
#add-another-item-prompt.is-ready {
  display: flex !important;
}

.add-item-prompt {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.add-item-hint {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin: 0;
}

/* Backstop: when the result card is in its empty/placeholder state the prompt
   must never be visible regardless of JS class state. */
#recommendation-result.empty-state ~ #add-another-item-prompt {
  display: none !important;
}

/* â”€â”€ Extra item cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#extra-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

#extra-items-list:empty {
  margin-top: 0;
}

.extra-item-card {
  padding: 20px 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.extra-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.extra-item-remove {
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.15);
  transition: color 0.15s;
}

.extra-item-remove:hover {
  color: var(--ink);
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.extra-item-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.extra-item-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

.extra-item-result {
  margin-top: 4px;
}

.extra-item-result .result-card {
  border-color: rgba(217, 180, 107, 0.18);
  background:
    radial-gradient(circle at top right, rgba(224, 198, 162, 0.16), transparent 30%),
    linear-gradient(155deg, rgba(14, 28, 52, 0.98), rgba(7, 18, 35, 0.96));
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 540px) {
  .extra-item-form {
    grid-template-columns: 1fr;
  }
}

body.is-manage-profile-view .profile-meta-summary {
  display: none !important;
}

body.is-manage-profile-view .profile-meta-inner {
  display: flex !important;
}

body.is-manage-profile-view #back-to-profiles {
  display: inline-flex !important;
}

body.is-profiles-view #back-to-shop {
  display: inline-flex !important;
}

.checkin-manage-link {
  display: block;
  margin-top: 10px;
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.6;
}

.checkin-manage-link:hover {
  opacity: 1;
}

/* â”€â”€ Rail heading actions row â”€ */
.rail-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* â”€â”€ Lightweight profile indicator in the measurement step â”€ */
.recommendation-profile-chip,
.profile-indicator {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 12px;
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.recommendation-profile-name,
.profile-indicator-name {
  font-size: 0.8rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.recommendation-profile-name strong,
.profile-indicator-name strong {
  color: var(--ink);
  font-weight: 600;
}

.recommendation-profile-actions,
.profile-indicator-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.recommendation-profile-btn,
.profile-indicator-btn {
  font-size: 0.76rem;
  color: var(--accent);
  opacity: 0.92;
  text-decoration: none;
  padding: 0;
}

.recommendation-profile-btn:hover,
.profile-indicator-btn:hover {
  color: var(--accent-warm);
  opacity: 1;
}

.profile-indicator {
  align-items: flex-start;
  justify-content: space-between;
  border-radius: 20px;
  padding: 10px 14px;
}

.profile-indicator-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profile-indicator-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-warm);
}

.profile-indicator-name {
  font-size: 0.96rem;
  color: var(--ink);
  white-space: normal;
}

.profile-indicator-meta {
  font-size: 0.76rem;
  color: var(--ink-soft);
}

.profile-indicator-links {
  justify-content: flex-end;
}

#recommendation-profile-label {
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  white-space: normal;
}

@media (max-width: 620px) {
  .recommendation-profile-chip,
  .profile-indicator {
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%;
    margin-top: 4px;
  }

  .recommendation-profile-name,
  .profile-indicator-name {
    font-size: 0.78rem;
  }

  .profile-indicator-copy,
  .profile-indicator-links {
    width: 100%;
  }
}
.split-size-callout {
  border-left: 3px solid var(--color-border-warning, #ef9f27);
  padding-left: 12px;
  color: var(--color-text-warning, #854f0b);
  font-size: 0.9rem;
  margin-top: 8px;
}
.measurement-tip-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(99, 179, 237, 0.08);
  border: 1px solid rgba(99, 179, 237, 0.25);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--color-text-secondary);
}
.measurement-tip-notice p {
  margin: 0;
  flex: 1;
}
.measurement-tip-notice-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  opacity: 0.55;
  font-size: 1rem;
  line-height: 1;
  padding: 0 2px;
  margin-top: 1px;
}
.measurement-tip-notice-dismiss:hover {
  opacity: 1;
}
.hm-baby-block {
  margin-bottom: 0;
  border-radius: 12px 12px 0 0;
}
/* Warm amber tone — friendly informational, not an error */
.zara-kids-notice {
  background: rgba(224, 198, 162, 0.08);
  border-color: rgba(224, 198, 162, 0.3);
  color: var(--color-text-primary);
  gap: 0;
  flex-direction: column;
}
.zara-kids-notice p {
  margin: 0 0 6px;
}
.zara-kids-notice p:last-child {
  margin-bottom: 0;
  color: var(--color-text-secondary);
}
.measurement-tip-go-btn {
  display: block;
  width: 100%;
  margin-top: 0;
  padding: 11px 16px;
  background: var(--color-text-primary);
  color: var(--color-background-primary);
  border: none;
  border-radius: 0 0 12px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}
.measurement-tip-go-btn:hover {
  opacity: 0.85;
}
/* ── Gender toggle ─────────────────────────────────── */
.gender-toggle-section {
  margin-bottom: 1.25rem;
}

.gender-toggle-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  margin-bottom: 0.6rem;
}

.gender-toggle {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gender-toggle-btn {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.gender-toggle-btn:hover {
  border-color: var(--accent, #555);
  background: rgba(255, 255, 255, 0.1);
}

.gender-toggle-btn.is-active {
  background: var(--accent, #222);
  border-color: var(--accent, #222);
  color: var(--accent-contrast, #fff);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.home-gender-toggle,
.shop-gender-toggle {
  margin-bottom: 1.25rem;
}

/* ── Bottom navigation (mobile only) ────────────────────────────── */
.bottom-nav {
  display: none;
}

@media (max-width: 767px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /* Solid dark background — matches app theme, no transparency */
    background: #061121;
    /* Shadow above to separate from scrolling content */
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.55);
    /* Android safe-area: sits above system nav buttons */
    padding: 6px 0 max(10px, env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: center;
    /* Smooth hide/show on scroll */
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }

  /* Slides fully off-screen when user scrolls down */
  .bottom-nav.is-scrolled-down {
    transform: translateY(110%);
  }

  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 12px;
    min-width: 44px;
    min-height: 44px;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    font-size: 10px;
    line-height: 1;
    transition: color 0.15s ease;
  }

  .bottom-nav-item.is-active {
    color: var(--color-text-primary);
  }

  .bottom-nav-item svg {
    flex-shrink: 0;
  }

  /* Hide sidebar on mobile */
  .app-sidebar {
    display: none !important;
  }

  /* Add bottom padding to main content so it doesn't hide behind nav */
  .main-content {
    padding-bottom: 80px;
  }
}
/* ── Brand request inline form ─────────────────────────── */
#brand-request-inline-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand-request-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-size: 0.875rem;
  outline: none;
}

.brand-request-field input:focus {
  border-color: rgba(255, 255, 255, 0.45);
}

.brand-request-field input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

#brand-request-submit {
  align-self: flex-start;
  padding: 7px 16px;
  font-size: 0.875rem;
}

#brand-request-confirmation {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

/* ─── Body Scan Overlay ─────────────────────────────────────────────────── */

#body-scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: linear-gradient(180deg, rgba(6, 17, 33, 0.99) 0%, rgba(4, 12, 24, 0.99) 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#body-scan-overlay.is-hidden {
  display: none;
}

.scan-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
  flex-shrink: 0;
  padding: 0;
}

.scan-close-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--ink);
}

/* ─── Scan Screens ─────────────────────────────────────────────────────── */

.scan-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.scan-screen-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
  padding: 52px 24px 28px;
}

/* ─── Coming Soon Screen ──────────────────────────────────────────────── */

.scan-coming-soon-inner {
  gap: 20px;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 64px;
}

.scan-coming-soon-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 4px;
}

.scan-coming-soon-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

.scan-coming-soon-body {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
  max-width: 340px;
}

.scan-coming-soon-sub {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: -4px 0 0;
  opacity: 0.7;
}

/* ─── Guidance Screen ──────────────────────────────────────────────────── */

.scan-guidance-inner {
  gap: 20px;
  justify-content: flex-start;
}

.scan-guidance-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ink);
}

.scan-guidance-subtitle {
  color: var(--ink-soft);
  margin: 0 0 4px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.scan-guidance-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scan-guidance-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.scan-guidance-step-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(224, 198, 162, 0.1);
  border: 1px solid rgba(224, 198, 162, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 1px;
}

.scan-guidance-step strong {
  display: block;
  color: var(--ink);
  font-size: 0.875rem;
  margin-bottom: 1px;
}

.scan-consent-gate {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(224, 198, 162, 0.06);
  border: 1px solid rgba(224, 198, 162, 0.18);
  border-radius: var(--radius-md);
  padding: 13px 15px;
}

.scan-consent-checkbox {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 3px;
  accent-color: var(--accent);
  cursor: pointer;
}

.scan-consent-label {
  font-size: 0.83rem;
  color: var(--ink-soft);
  line-height: 1.5;
  cursor: pointer;
}

/* ─── Scan Actions ─────────────────────────────────────────────────────── */

.scan-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  padding: 16px 24px 28px;
}

.scan-primary-btn {
  width: 100%;
  max-width: 340px;
  padding: 14px 28px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #10141c;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: opacity 150ms ease, transform 100ms ease;
  line-height: 1.2;
}

.scan-primary-btn:hover {
  opacity: 0.88;
}

.scan-primary-btn:active {
  transform: scale(0.98);
}

.scan-primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.scan-skip-manual {
  font-size: 0.83rem;
  opacity: 0.75;
}

.scan-error-msg {
  background: rgba(209, 124, 135, 0.12);
  border: 1px solid rgba(209, 124, 135, 0.28);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.83rem;
  margin: 0;
  line-height: 1.5;
}

/* ─── Camera Screen ────────────────────────────────────────────────────── */

#scan-screen-camera {
  overflow: hidden;
  position: relative;
}

.scan-camera-area {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  min-height: 0;
}

#scan-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scan-pose-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.scan-silhouette {
  height: 78%;
  max-height: 460px;
  width: auto;
  opacity: 0.6;
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(224, 198, 162, 0.35));
}

.scan-camera-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 10px 16px 14px;
  font-size: 0.8rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
}

#scan-screen-camera .scan-actions {
  flex-shrink: 0;
  background: rgba(6, 17, 33, 0.98);
  padding-top: 18px;
}

.scan-capture-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50px;
  color: var(--ink);
  padding: 10px 24px 10px 14px;
  font-size: 0.94rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms ease;
}

.scan-capture-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.scan-capture-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

/* ─── Processing Screen ────────────────────────────────────────────────── */

.scan-processing-inner {
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
}

.scan-spinner {
  width: 46px;
  height: 46px;
  border: 3px solid rgba(224, 198, 162, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: scan-spin 0.9s linear infinite;
}

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

.scan-processing-copy {
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin: 0;
}

/* ─── Confirmation Screen ──────────────────────────────────────────────── */

.scan-confirm-inner {
  padding-top: 54px;
  gap: 18px;
}

.scan-confirm-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.scan-confirm-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ink);
}

.scan-confirm-copy {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.scan-rescan-btn {
  flex-shrink: 0;
  font-size: 0.8rem;
  padding: 6px 12px;
  white-space: nowrap;
}

.scan-confirm-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scan-confirm-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 13px 13px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.scan-confirm-card.is-camera-sourced {
  border-color: rgba(224, 198, 162, 0.22);
}

.scan-confirm-card-label {
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}

.scan-camera-badge {
  font-size: 0.67rem;
  background: rgba(224, 198, 162, 0.12);
  border: 1px solid rgba(224, 198, 162, 0.22);
  color: var(--accent);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}

/* Confidence badges: colour-coded per extraction quality */
.scan-confidence-badge {
  font-size: 0.67rem;
  border-radius: 3px;
  padding: 1px 6px;
  white-space: nowrap;
  font-weight: 500;
}
.scan-confidence-badge.good {
  background: rgba(76, 175, 128, 0.11);
  border: 1px solid rgba(76, 175, 128, 0.24);
  color: #6ec99a;
}
.scan-confidence-badge.check {
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.22);
  color: #f0b340;
}

/* Beta notice — appears on every guidance screen variant */
/* BETA NOTICE — remove when measurement accuracy is validated above ±2cm threshold */
.scan-beta-notice {
  background: rgba(96, 165, 250, 0.07);
  border: 1px solid rgba(96, 165, 250, 0.17);
  border-radius: var(--radius-md, 10px);
  padding: 11px 14px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-top: 6px;
}

/* Subtle tip above Save button on the confirmation screen */
/* BETA NOTICE — remove when measurement accuracy is validated above ±2cm threshold */
.scan-confirm-tip {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.36);
  line-height: 1.5;
  margin: 12px 0 6px;
  text-align: center;
}

.scan-confirm-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 500;
  padding: 4px 0;
  width: 100%;
  outline: none;
  transition: border-color 150ms ease;
  font-family: inherit;
}

.scan-confirm-input:focus {
  border-bottom-color: var(--accent);
}

.scan-confirm-input::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

.scan-confirm-unit {
  font-size: 0.72rem;
  color: var(--ink-soft);
  opacity: 0.65;
}

.scan-save-actions {
  padding-bottom: 40px;
}

/* ─── Scan Entry CTA (in measurements panel) ───────────────────────────── */

#scan-entry-area:not(.is-hidden) {
  display: flex;
  justify-content: flex-end;
  margin-top: -10px;
  margin-bottom: 6px;
}

.scan-entry-compact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 7px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(224, 198, 162, 0.22);
  background: rgba(224, 198, 162, 0.06);
  cursor: pointer;
  text-align: left;
  transition: background 150ms ease, border-color 150ms ease;
}

.scan-entry-compact-btn:hover {
  background: rgba(224, 198, 162, 0.13);
  border-color: rgba(224, 198, 162, 0.36);
}

.scan-entry-compact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(224, 198, 162, 0.1);
  color: var(--accent);
  flex-shrink: 0;
}

.scan-entry-compact-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.scan-entry-compact-text strong {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.scan-entry-compact-text small {
  font-size: 0.7rem;
  color: var(--accent);
  opacity: 0.72;
  line-height: 1.2;
}

.scan-entry-baby-note {
  font-size: 0.81rem;
  color: var(--ink-soft);
  margin: 0 0 4px;
  line-height: 1.5;
}

.scan-entry-baby-note .text-link {
  font-size: 0.81rem;
}

/* ─── Self-scan: mode selector ─────────────────────────────────────────── */

.scan-mode-selector {
  margin-bottom: 4px;
}

.scan-mode-question {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 10px;
  font-weight: 500;
}

.scan-mode-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.scan-mode-btn {
  flex: 1;
  min-width: 140px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-soft);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.scan-mode-btn:hover {
  border-color: rgba(224, 198, 162, 0.4);
  background: rgba(224, 198, 162, 0.06);
  color: var(--ink);
}

.scan-mode-btn.is-active {
  border-color: var(--accent);
  background: rgba(224, 198, 162, 0.1);
  color: var(--ink);
}

.scan-self-scan-tip {
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: rgba(224, 198, 162, 0.06);
  border: 1px solid rgba(224, 198, 162, 0.15);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin: 8px 0 0;
  line-height: 1.5;
}

/* ─── Privacy note (always static HTML, never injected by JS) ────────── */

.scan-privacy-note {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.38);
  text-align: center;
  margin: 0;
  padding: 0 8px;
  line-height: 1.5;
}

/* ─── Self-scan: camera facing toggle ──────────────────────────────────── */

.scan-camera-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 50px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  padding: 6px 16px;
  cursor: pointer;
  margin: 8px auto 0;
  transition: background 150ms ease, color 150ms ease;
}

.scan-camera-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--ink);
}

/* ─── Self-scan: countdown duration chips ──────────────────────────────── */

.scan-countdown-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 0 0;
}

.scan-countdown-chips-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.38);
}

.scan-countdown-chip {
  padding: 4px 12px;
  border-radius: 50px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-soft);
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.scan-countdown-chip:hover {
  border-color: rgba(224, 198, 162, 0.4);
  color: var(--ink);
}

.scan-countdown-chip.is-active {
  border-color: var(--accent);
  background: rgba(224, 198, 162, 0.12);
  color: var(--ink);
  font-weight: 600;
}

/* ─── Self-scan: countdown display (readable from 2 metres) ─────────────── */

.scan-countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 4px 32px rgba(0, 0, 0, 0.7), 0 0 60px rgba(0, 0, 0, 0.5);
  letter-spacing: -0.04em;
  line-height: 1;
  z-index: 20;
  pointer-events: none;
  user-select: none;
}

/* ─── Self-scan: shutter flash ───────────────────────────────────────────── */

.scan-shutter-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
}

.scan-shutter-flash.is-flashing {
  animation: scanFlash 350ms ease-out forwards;
}

@keyframes scanFlash {
  0%   { opacity: 0.85; }
  100% { opacity: 0; }
}

/* ─── Self-scan: front photo saved message ───────────────────────────────── */

.scan-front-saved-msg {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(6, 17, 33, 0.93);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  line-height: 1.4;
  z-index: 15;
  border-top: 1px solid var(--line);
}

.scan-front-saved-tick {
  font-size: 1.4rem;
  color: #4caf80;
  flex-shrink: 0;
}

/* ─── Side pose briefing (guidance screen) ──────────────────────────────── */

.scan-side-brief {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 4px;
}

.scan-side-brief-heading {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
}

.scan-side-brief-body {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.scan-side-silhouette {
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.65;
  margin-top: 2px;
}

.scan-side-brief-intro {
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 10px;
}

.scan-side-brief-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.scan-side-brief-steps li {
  font-size: 0.81rem;
  color: var(--ink-soft);
  line-height: 1.45;
  padding-left: 14px;
  position: relative;
}

.scan-side-brief-steps li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--accent);
  opacity: 0.7;
}

/* ─── Turn-to-side overlay ──────────────────────────────────────────────── */

.scan-turn-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(6, 17, 33, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-turn-overlay.is-hidden {
  display: none;
}

.scan-turn-overlay-inner {
  text-align: center;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.scan-turn-tick {
  font-size: 4rem;
  color: #4caf80;
  line-height: 1;
}

.scan-turn-title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.1;
}

.scan-turn-arrow {
  color: var(--accent);
  animation: scanTurnArrow 1.1s ease-in-out infinite;
}

@keyframes scanTurnArrow {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50%       { transform: rotate(18deg) scale(1.08); }
}

.scan-turn-instruction {
  font-size: 3rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  margin: 0;
}

/* ─── Confirmation: empty-state banner ──────────────────────────────────── */

.scan-empty-banner {
  background: rgba(224, 198, 162, 0.07);
  border: 1px solid rgba(224, 198, 162, 0.2);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 4px;
}

.scan-empty-banner.is-hidden {
  display: none;
}

/* ─── Confirmation: per-field measurement hint ──────────────────────────── */

.scan-field-hint {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.38);
  line-height: 1.4;
  margin: 2px 0 0;
}

.scan-field-hint.is-hidden {
  display: none;
}

/* ─── Confirmation: measuring tape tip ──────────────────────────────────── */

.scan-tape-tip {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.38);
  text-align: center;
  padding: 4px 16px 0;
  line-height: 1.5;
  margin: 0;
}

.scan-tape-tip.is-hidden {
  display: none;
}

/* ─── Audio toggle button ───────────────────────────────────────────────── */

.scan-audio-toggle-btn {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 50px;
  color: var(--ink-soft);
  font-size: 0.85rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 150ms ease;
  line-height: 1;
}

.scan-audio-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ─── Block scroll while scan is open ─────────────────────────────────── */

body.is-scan-open {
  overflow: hidden;
}

/* ─── Mobile adjustments ───────────────────────────────────────────────── */

@media (max-width: 640px) {
  .scan-confirm-header {
    flex-direction: column;
    gap: 8px;
  }

  .scan-rescan-btn {
    align-self: flex-start;
  }

  .scan-screen-inner {
    padding: 48px 18px 24px;
  }

  .scan-countdown {
    font-size: 7rem;
  }

  .scan-mode-btns {
    flex-direction: column;
  }
}

/* ─── DIAGNOSTIC v300: on-screen log panel + side fallback button ───────────
   TODO: REMOVE this entire block (and the matching HTML in index.html and all
   _scanDiag* / _scheduleSideFallback calls in app.js) after real-device
   debugging of the side-photo capture issue is complete.
   ─────────────────────────────────────────────────────────────────────────── */
.scan-diag-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 130px;
  background: rgba(0, 0, 0, 0.80);
  display: flex;
  flex-direction: column;
  z-index: 20;
  pointer-events: auto;
}
.scan-diag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.50);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  flex-shrink: 0;
}
.scan-diag-title {
  font-family: monospace;
  font-size: 9px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.scan-diag-copy-btn {
  font-family: monospace;
  font-size: 9px;
  color: #7ecfff;
  background: none;
  border: 1px solid rgba(126, 207, 255, 0.35);
  border-radius: 3px;
  padding: 1px 7px;
  cursor: pointer;
  line-height: 1.5;
}
.scan-diag-entries {
  overflow-y: auto;
  flex: 1;
  padding: 3px 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.scan-diag-entry {
  display: flex;
  gap: 6px;
  font-family: monospace;
  font-size: 10px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-all;
}
.scan-diag-entry-t  { color: #555; flex-shrink: 0; min-width: 54px; }
.scan-diag-entry-msg { color: #d0d0d0; }
.scan-diag-entry--warn .scan-diag-entry-msg { color: #ffcc44; }
.scan-diag-entry--err  .scan-diag-entry-msg { color: #ff6666; }

/* DIAGNOSTIC v300: side photo manual fallback button */
.scan-side-fallback-btn {
  position: absolute;
  bottom: 145px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  padding: 18px 32px;
  background: rgba(210, 45, 45, 0.93);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
  animation: scan-fallback-pulse 1.8s ease-in-out infinite;
}
.scan-side-fallback-btn:active { background: rgba(170, 25, 25, 0.97); transform: translateX(-50%) scale(0.97); }
@keyframes scan-fallback-pulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(0,0,0,0.55), 0 0 0 0px rgba(210,45,45,0.55); }
  55%       { box-shadow: 0 4px 24px rgba(0,0,0,0.55), 0 0 0 14px rgba(210,45,45,0); }
}
