:root {
  --bg: #efe8dc;
  --surface: #f8f3ea;
  --surface-strong: #fffdf8;
  --ink: #22251f;
  --muted: #655f56;
  --line: rgba(49, 67, 56, 0.18);
  --terracotta: #8d4937;
  --terracotta-dark: #703a2d;
  --sage: #a6b49b;
  --sage-dark: #314338;
  --shadow: 0 20px 50px rgba(63, 52, 40, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --focus: 0 0 0 4px rgba(141, 73, 55, 0.22);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 12%, rgba(166, 180, 155, 0.24), transparent 26rem),
    radial-gradient(circle at 8% 86%, rgba(141, 73, 55, 0.08), transparent 23rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.app-shell {
  min-height: 100svh;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}

.screen {
  width: 100%;
  min-height: calc(100svh - 20px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.welcome-screen {
  width: 100%;
}

.welcome-card {
  position: relative;
  min-height: calc(100svh - 20px);
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 48px 34px 56px;
  border: 3px solid #211f1b;
  border-radius: 27px;
  background: linear-gradient(158deg, #f8f0e5 0%, #f4ecdf 59%, #e5dbc9 100%);
  box-shadow: 0 14px 0 rgba(33, 31, 27, 0.08), 0 24px 54px rgba(63, 52, 40, 0.14);
}

.welcome-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 22% 27%, rgba(255, 255, 255, 0.72), transparent 25%), linear-gradient(120deg, transparent 0 55%, rgba(166, 180, 155, 0.15) 100%);
  pointer-events: none;
}

.welcome-copy {
  position: relative;
  z-index: 2;
  width: min(100%, 360px);
  margin-top: -28px;
  text-align: center;
}

.welcome-copy .eyebrow {
  margin-bottom: 18px;
  color: var(--sage-dark);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
}

.welcome-copy .brand-mark {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 1.2svh, 13px);
  margin: 0 auto 12px;
  color: var(--terracotta);
  font-size: clamp(0.72rem, 1.7svh, 1.02rem);
  letter-spacing: 0.2em;
}

.welcome-copy .brand-mark svg {
  width: clamp(20px, 3svh, 28px);
  height: clamp(20px, 3svh, 28px);
}

.welcome-copy h1 {
  margin-bottom: 24px;
  font-size: clamp(3rem, 9vw, 4.2rem);
  line-height: 1.02;
}

.welcome-copy .lead {
  margin: 0 auto 28px;
  max-width: 290px;
  font-size: 0.96rem;
  line-height: 1.75;
}

.welcome-copy .button {
  min-width: 196px;
  min-height: 52px;
  padding: 0 21px;
  border-radius: 10px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.welcome-copy .button svg {
  display: none;
}

.welcome-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.leaf-shadow {
  position: absolute;
  width: 300px;
  height: 145px;
  border-radius: 100% 0 100% 0;
  background: rgba(70, 87, 66, 0.16);
  filter: blur(10px);
  transform: rotate(-28deg);
}

.leaf-shadow-one {
  top: -23px;
  left: -100px;
}

.leaf-shadow-two {
  right: -120px;
  bottom: 20px;
  transform: rotate(24deg);
  opacity: 0.7;
}

.bottle {
  position: absolute;
  bottom: 26px;
  border: 2px solid rgba(33, 31, 27, 0.8);
  border-radius: 13px 13px 18px 18px;
  box-shadow: 10px 18px 20px rgba(33, 31, 27, 0.18);
}

.bottle::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 20%;
  width: 60%;
  height: 32px;
  border: 2px solid rgba(33, 31, 27, 0.8);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #201f1b;
}

.bottle::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  top: 46%;
  height: 23%;
  border-top: 1px solid rgba(141, 73, 55, 0.55);
  border-bottom: 1px solid rgba(141, 73, 55, 0.55);
  background: rgba(248, 243, 234, 0.75);
}

.bottle-amber {
  background: linear-gradient(108deg, #3b2118, #8c4a2e 52%, #3a2018);
}

.bottle-clear {
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.9), rgba(218, 207, 185, 0.75), rgba(255, 255, 255, 0.78));
}

.bottle-large {
  left: 34px;
  width: 82px;
  height: 182px;
}

.bottle-small {
  left: 130px;
  width: 49px;
  height: 109px;
  bottom: 22px;
}

.bottle-mini {
  right: 28px;
  width: 60px;
  height: 132px;
  bottom: 20px;
}

.welcome-card .language-note {
  position: absolute;
  z-index: 3;
  left: 22px;
  bottom: 17px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--terracotta);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.hero {
  flex: 1;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.04fr) minmax(280px, 0.96fr);
  gap: clamp(34px, 8vw, 96px);
  padding: 44px 0 24px;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--terracotta);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 590px;
  margin-bottom: 24px;
  font-size: clamp(3.1rem, 8vw, 6.4rem);
  line-height: 0.94;
}

h1 em {
  color: var(--terracotta);
  font-style: normal;
}

.lead {
  max-width: 520px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.7;
}

.trust-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.84rem;
}

.trust-line svg {
  flex: 0 0 auto;
}

.language-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 2px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.still-life {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 390px;
}

.still-life::before {
  content: "";
  position: absolute;
  width: min(100%, 380px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(166, 180, 155, 0.28);
}

.vessel {
  position: relative;
  width: min(54%, 180px);
  aspect-ratio: 0.66;
  border: 1px solid rgba(49, 67, 56, 0.25);
  border-radius: 28px 28px 38px 38px;
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.9), rgba(218, 208, 191, 0.72));
  box-shadow: 0 24px 35px rgba(49, 67, 56, 0.16);
}

.vessel::before {
  content: "";
  position: absolute;
  left: 17%;
  right: 17%;
  top: -13%;
  height: 16%;
  border-radius: 11px 11px 5px 5px;
  background: #314338;
}

.vessel::after {
  content: "MIA'S\A GARDEN";
  white-space: pre;
  position: absolute;
  inset: 37% 16% auto;
  padding: 18px 8px;
  border-top: 1px solid rgba(141, 73, 55, 0.36);
  border-bottom: 1px solid rgba(141, 73, 55, 0.36);
  color: var(--terracotta);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.72rem, 2vw, 1rem);
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-align: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 62px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: 17px;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button-primary {
  color: #fffdf8;
  background: var(--terracotta);
  box-shadow: 0 12px 24px rgba(141, 73, 55, 0.18);
  font-weight: 700;
}

.button-primary:hover {
  background: var(--terracotta-dark);
  box-shadow: 0 15px 28px rgba(141, 73, 55, 0.24);
}

.button-secondary {
  color: var(--sage-dark);
  background: transparent;
  border-color: var(--line);
  font-weight: 650;
}

.button-secondary:hover {
  border-color: var(--sage-dark);
  background: rgba(248, 243, 234, 0.66);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.screen-heading {
  padding: 28px 0 26px;
}

.screen-heading h2 {
  max-width: 680px;
  margin-bottom: 14px;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1;
}

.screen-heading p {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 14px 0 30px;
}

.product-card {
  position: relative;
  min-height: 270px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: rgba(248, 243, 234, 0.72);
  box-shadow: 0 10px 25px rgba(63, 52, 40, 0.06);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.product-card:hover {
  border-color: rgba(141, 73, 55, 0.48);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product-card[aria-pressed="true"] {
  border-color: var(--terracotta);
  background: var(--surface-strong);
  box-shadow: 0 0 0 3px rgba(141, 73, 55, 0.13), var(--shadow);
}

.product-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 26px;
  border-radius: 50%;
  color: var(--terracotta);
  background: rgba(166, 180, 155, 0.26);
}

.product-icon svg {
  width: 28px;
  height: 28px;
}

.product-card h3 {
  margin-bottom: 10px;
  font-size: 1.7rem;
  line-height: 1.1;
}

.product-card p {
  margin-bottom: 17px;
  color: var(--muted);
  line-height: 1.55;
}

.product-focus {
  margin-bottom: 0;
  color: var(--sage-dark) !important;
  font-size: 0.84rem;
  font-weight: 650;
}

.selection-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 0 14px;
}

.selection-status {
  min-height: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.next-step {
  flex: 1;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.next-step .eyebrow {
  margin-bottom: 18px;
}

.next-step h2 {
  max-width: 700px;
  margin: 0 auto 18px;
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1;
}

.next-step p {
  max-width: 580px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.next-step-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-note {
  padding: 22px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 760px) {
  .app-shell {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  .screen {
    min-height: calc(100svh - 20px);
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 54px;
  }

  .still-life {
    order: -1;
    min-height: 250px;
  }

  .still-life::before {
    width: min(78vw, 300px);
  }

  .vessel {
    width: min(36vw, 126px);
  }

  h1 {
    font-size: clamp(3.2rem, 17vw, 5rem);
  }

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

  .selection-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .selection-footer .button {
    width: 100%;
  }
}

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

/* Guest journey screens: quiet apothecary kiosk treatment */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid rgba(49, 67, 56, 0.14);
  border-radius: 18px;
  background: rgba(49, 67, 56, 0.12);
}

.feature-strip > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 9px;
  padding: 13px 12px;
  background: rgba(248, 243, 234, 0.66);
}

.feature-strip span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  color: var(--sage-dark);
}

.feature-strip svg {
  width: 24px;
  height: 24px;
}

.feature-strip strong,
.feature-strip small {
  display: block;
  text-align: left;
}

.feature-strip strong {
  color: var(--ink);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.feature-strip small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.selection-screen,
.journey-screen,
.matching-screen {
  width: 100%;
  min-height: calc(100svh - 20px);
  padding: 30px 32px 25px;
  border: 3px solid #211f1b;
  border-radius: 27px;
  background: rgba(248, 243, 234, 0.8);
  box-shadow: 0 14px 0 rgba(33, 31, 27, 0.08), 0 24px 54px rgba(63, 52, 40, 0.14);
}

.selection-screen {
  display: flex;
  flex-direction: column;
}

.journey-screen {
  display: flex;
  flex-direction: column;
}

.selection-heading {
  margin: 0 auto;
  padding: 24px 0 18px;
  text-align: center;
}

.selection-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.8vw, 2.45rem);
  line-height: 1.12;
}

.selection-heading-rule {
  display: block;
  width: 30px;
  height: 2px;
  margin: 16px auto 0;
  background: var(--terracotta);
  opacity: 0.64;
}

.selection-screen .product-grid {
  gap: 12px;
  margin: 8px 0 18px;
}

.selection-screen .product-card {
  min-height: 350px;
  padding: 18px 12px 20px;
  border-color: rgba(49, 67, 56, 0.12);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.54);
  box-shadow: 0 6px 18px rgba(63, 52, 40, 0.04);
  text-align: center;
}

.selection-screen .product-card:hover {
  border-color: rgba(141, 73, 55, 0.5);
  box-shadow: 0 10px 21px rgba(63, 52, 40, 0.1);
}

.selection-screen .product-card[aria-pressed="true"] {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(141, 73, 55, 0.13), 0 10px 24px rgba(63, 52, 40, 0.1);
}

.product-art {
  display: grid;
  place-items: center;
  height: 158px;
  margin-bottom: 9px;
}

.product-art svg {
  width: 120px;
  height: 130px;
}

.selection-screen .product-card h3 {
  margin: 0 auto 14px;
  max-width: 160px;
  font-size: 1.18rem;
  line-height: 1.15;
}

.selection-screen .product-card p {
  max-width: 155px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.selection-footer {
  gap: 12px;
}

.selection-footer .selection-status {
  font-size: 0.76rem;
}

.selection-footer .button {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.back-button {
  align-self: flex-start;
  min-height: 40px;
  padding: 0 2px;
  border: 0;
  box-shadow: none;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.back-button:hover {
  background: transparent;
  box-shadow: none;
}

.back-button svg {
  width: 17px;
  height: 17px;
}

.journey-screen .brand-mark {
  justify-content: center;
  margin-bottom: 10px;
  font-size: 0.63rem;
  letter-spacing: 0.17em;
}

.journey-screen .brand-mark svg {
  width: 18px;
  height: 18px;
}

.progress-wrap {
  position: relative;
  padding: 12px 8px 0;
  text-align: center;
}

.progress-line {
  position: absolute;
  top: 25px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: #d3cdbf;
}

.progress-dots {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
}

.progress-dot {
  width: 12px;
  height: 12px;
  border: 1px solid #d3cdbf;
  border-radius: 50%;
  background: #f4eee4;
}

.progress-dot.is-active {
  border-color: var(--sage-dark);
  background: var(--sage-dark);
}

.progress-dot.is-complete {
  background: var(--sage-dark);
}

.question-counter {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.67rem;
  letter-spacing: 0.1em;
}

.question-heading {
  max-width: 680px;
  margin: 0 auto 28px;
  text-align: center;
}

.question-heading h2 {
  margin-bottom: 10px;
  font-size: clamp(1.85rem, 3.8vw, 2.5rem);
  line-height: 1.15;
}

.question-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.question-content {
  width: min(100%, 900px);
  margin: 21px auto 0;
}

.options-list {
  display: grid;
  gap: 9px;
  width: min(100%, 820px);
  max-width: min(100%, 820px);
  margin: 0 auto;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: clamp(58px, 6.2svh, 92px);
  padding: 13px 20px;
  border: 1px solid rgba(49, 67, 56, 0.13);
  border-radius: 9px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.58);
  cursor: pointer;
  text-align: left;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.option-card:hover {
  border-color: rgba(141, 73, 55, 0.42);
  background: var(--surface-strong);
}

.option-card.is-selected {
  border-color: var(--sage-dark);
  background: rgba(218, 227, 211, 0.48);
  box-shadow: 0 0 0 2px rgba(49, 67, 56, 0.1);
}

.option-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  color: var(--sage-dark);
}

.option-symbol svg {
  width: 28px;
  height: 28px;
}

.option-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.option-copy strong {
  font-size: 0.92rem;
  font-weight: 650;
}

.option-copy small {
  color: var(--muted);
  font-size: 0.72rem;
}

.checkbox-mark {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  margin-left: auto;
  flex: 0 0 auto;
  border: 1px solid rgba(49, 67, 56, 0.28);
  border-radius: 4px;
  color: #fffdf8;
  background: transparent;
}

.is-selected .checkbox-mark {
  border-color: var(--sage-dark);
  background: var(--sage-dark);
}

.checkbox-mark svg {
  width: 15px;
  height: 15px;
}

.notes-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.option-card-visual {
  min-height: clamp(175px, 17svh, 245px);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 11px;
  padding: 14px 10px;
  text-align: center;
}

.option-card-visual .option-copy {
  justify-items: center;
}

.option-card-visual .checkbox-mark {
  position: absolute;
  margin: 0;
  transform: translate(65px, -78px);
}

.note-visual {
  display: grid;
  place-items: center;
  width: clamp(82px, 8svh, 116px);
  height: clamp(82px, 8svh, 116px);
  border: 4px solid rgba(255, 253, 248, 0.86);
  border-radius: 50%;
  box-shadow: 0 4px 9px rgba(63, 52, 40, 0.16);
  color: rgba(255, 253, 248, 0.86);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.note-floral { background: radial-gradient(circle at 35% 28%, #f5baa7, #a4494d 48%, #61704b); }
.note-citrus { background: radial-gradient(circle at 35% 30%, #ffe28d, #ee941f 52%, #a65b24); }
.note-fresh { background: radial-gradient(circle at 38% 28%, #d2e4c4, #66885c 55%, #2d533c); }
.note-herbal { background: radial-gradient(circle at 38% 28%, #cbdba4, #69874d 52%, #385a40); }
.note-woody-earthy { background: radial-gradient(circle at 38% 28%, #dbc195, #866243 53%, #453327); }
.note-warm-resinous { background: radial-gradient(circle at 38% 28%, #f2c56f, #a96028 52%, #6a3426); }
.note-woody { background: radial-gradient(circle at 38% 28%, #d3bd91, #876946 53%, #493629); }
.note-warm { background: radial-gradient(circle at 38% 28%, #f4c979, #b87332 52%, #6f3928); }

.question-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  width: min(100%, 820px);
  max-width: 820px;
  margin: auto auto 0;
  padding-top: 24px;
}

.question-actions.single-choice-actions {
  justify-content: flex-start;
}

.question-actions .button-primary {
  min-height: 46px;
  border-radius: 9px;
  font-size: 0.76rem;
}

.matching-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.matching-screen h2 {
  margin: 15px 0 14px;
  font-size: clamp(2.2rem, 6vw, 3.9rem);
  line-height: 1.05;
}

.matching-screen h2 em {
  color: var(--terracotta);
  font-style: normal;
}

.matching-screen p {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.9rem;
}

.matching-visual {
  display: grid;
  place-items: center;
  width: 122px;
  height: 122px;
  margin-bottom: 25px;
  border: 1px solid rgba(49, 67, 56, 0.22);
  border-radius: 50%;
  color: var(--sage-dark);
  background: radial-gradient(circle, rgba(166, 180, 155, 0.23), transparent 65%);
}

.matching-visual svg {
  width: 63px;
  height: 63px;
}

.matching-loader {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.matching-loader span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage-dark);
  animation: matching-pulse 900ms ease-in-out infinite alternate;
}

.matching-loader span:nth-child(2) { animation-delay: 120ms; }
.matching-loader span:nth-child(3) { animation-delay: 240ms; }
.matching-loader span:nth-child(4) { animation-delay: 360ms; }
.matching-loader span:nth-child(5) { animation-delay: 480ms; }

@keyframes matching-pulse {
  to { transform: translateY(-8px); opacity: 0.4; }
}

.top-matches-heading {
  padding: 25px 0 19px;
  text-align: center;
}

.top-matches-heading h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.7vw, 2.35rem);
  line-height: 1.14;
}

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

.match-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 9px 8px 11px;
  border: 1px solid rgba(49, 67, 56, 0.13);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.67);
}

.match-card:hover {
  border-color: rgba(141, 73, 55, 0.42);
  box-shadow: 0 8px 20px rgba(63, 52, 40, 0.09);
  transform: translateY(-1px);
}

.match-rank {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fffdf8;
  background: var(--sage-dark);
  font-size: 0.7rem;
  font-weight: 700;
}

.blend-visual {
  position: relative;
  overflow: hidden;
  height: 122px;
  margin: -9px -8px 9px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(140deg, color-mix(in srgb, var(--blend-one), white 78%), color-mix(in srgb, var(--blend-three), white 65%));
}

.blend-bottle {
  position: absolute;
  bottom: -7px;
  left: 50%;
  width: 48px;
  height: 93px;
  border: 1px solid rgba(38, 33, 27, 0.75);
  border-radius: 9px 9px 12px 12px;
  background: linear-gradient(100deg, #33241c, var(--blend-one), #38231b);
  box-shadow: 8px 8px 12px rgba(38, 33, 27, 0.16);
  transform: translateX(-50%);
}

.blend-bottle::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 10px;
  right: 10px;
  height: 16px;
  border-radius: 4px 4px 0 0;
  background: #2d2c27;
}

.blend-bottle::after {
  content: "";
  position: absolute;
  top: 42%;
  left: 7px;
  right: 7px;
  height: 18px;
  border-top: 1px solid rgba(255, 253, 248, 0.5);
  border-bottom: 1px solid rgba(255, 253, 248, 0.5);
  background: rgba(248, 243, 234, 0.74);
}

.blend-leaf,
.blend-fruit {
  position: absolute;
  border-radius: 100% 0 100% 0;
  background: var(--blend-three);
  opacity: 0.85;
  transform: rotate(-32deg);
}

.blend-leaf { left: 12%; bottom: 20px; width: 30px; height: 62px; }
.blend-fruit { right: 14%; bottom: 16px; width: 36px; height: 36px; border-radius: 50%; background: var(--blend-two); }

.blend-visual-detail {
  height: 176px;
  margin: 0;
  border-radius: 17px;
}

.blend-visual-detail .blend-bottle { width: 70px; height: 134px; }
.blend-visual-detail .blend-bottle::before { top: -19px; left: 14px; right: 14px; height: 21px; }
.blend-visual-detail .blend-bottle::after { left: 10px; right: 10px; }
.blend-visual-detail .blend-leaf { width: 43px; height: 83px; }
.blend-visual-detail .blend-fruit { width: 48px; height: 48px; }

.match-card-copy h3 {
  min-height: 2.25em;
  margin: 0 0 4px;
  font-size: 1.02rem;
  line-height: 1.1;
}

.match-card-copy p,
.match-card-copy small {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.4;
}

.match-card-copy small {
  min-height: 2.8em;
  margin-top: 5px;
  color: var(--sage-dark);
  font-size: 0.58rem;
}

.recommendations-button {
  align-self: center;
  width: min(100%, 430px);
  min-height: 45px;
  border-radius: 9px;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.results-back-button {
  margin-top: auto;
}

/* Keep the two product choices side by side on the portrait kiosk screen. */
@media (max-width: 760px) {
  .selection-screen .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.detail-topbar {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(49, 67, 56, 0.16);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.icon-button:hover { background: rgba(255, 253, 248, 0.7); }
.icon-button svg { width: 18px; height: 18px; }

.detail-hero {
  margin: 0;
}

.detail-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(220px, 1.1fr);
  align-items: center;
  gap: 16px;
  margin: 9px 0 16px;
}

.detail-heading { text-align: left; }
.detail-heading h2 { margin: 0 0 7px; font-size: clamp(2rem, 5vw, 3.15rem); line-height: 1; }
.detail-heading p { max-width: 300px; margin: 0; color: var(--muted); font-size: 0.78rem; line-height: 1.55; }
.detail-heading .detail-category { margin-bottom: 17px; color: var(--ink); font-size: 0.82rem; }

.detail-section {
  padding: 15px 0 0;
}

.detail-recipe-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(180px, 0.95fr);
  gap: 20px;
  border-top: 1px solid rgba(49, 67, 56, 0.12);
}

.detail-ratio-section {
  padding-left: 20px;
  border-left: 1px solid rgba(49, 67, 56, 0.12);
}

.detail-benefits-section {
  padding-top: 16px;
}

.section-label {
  margin-bottom: 12px;
  color: var(--sage-dark);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.benefit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  text-align: left;
}

.benefit span { display: none; }
.benefit small { color: var(--muted); font-size: 0.6rem; line-height: 1.35; }
.benefit small::before { content: "•"; margin-right: 7px; color: var(--terracotta-dark); }

.ratio-display {
  margin: -4px 0 13px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.1rem;
  letter-spacing: 0.18em;
  text-align: center;
}

.oil-list { display: grid; gap: 5px; }
.oil-row { display: flex; justify-content: space-between; padding: 4px 0; color: var(--muted); font-size: 0.68rem; }
.oil-row::before { content: "♢"; margin-right: 7px; color: var(--sage-dark); }
.oil-row span { flex: 1; }
.oil-row strong { color: var(--ink); font-weight: 650; }
.dilution-note { margin: 10px 0 0; color: var(--muted); font-size: 0.66rem; text-align: center; }

.detail-actions {
  display: grid;
  gap: 9px;
  margin-top: auto;
  padding-top: 22px;
}

.detail-actions .button { min-height: 44px; border-radius: 9px; font-size: 0.7rem; text-transform: uppercase; }

/* Guest kiosk sizing follows the available iPad viewport instead of one fixed type scale. */
@media (min-width: 561px) {
  .selection-screen,
  .journey-screen,
  .matching-screen {
    padding: clamp(22px, 3.4svh, 42px) clamp(22px, 3.4svw, 44px) clamp(18px, 2.8svh, 34px);
    border-width: clamp(2px, 0.22svw, 3px);
    border-radius: clamp(20px, 2.2svw, 28px);
  }

  .welcome-card {
    padding: clamp(30px, 5svh, 72px) clamp(24px, 4svw, 60px) clamp(36px, 5.5svh, 82px);
    border-width: clamp(2px, 0.22svw, 3px);
    border-radius: clamp(20px, 2.2svw, 28px);
  }

  .welcome-copy {
    width: min(100%, clamp(300px, 31svw, 440px));
    margin-top: clamp(-44px, -3.2svh, -20px);
  }

  .welcome-copy .eyebrow {
    margin-bottom: clamp(12px, 1.8svh, 20px);
    font-size: clamp(0.58rem, 1.1svh, 0.78rem);
  }

  .welcome-copy h1 {
    margin-bottom: clamp(18px, 2.8svh, 30px);
    font-size: clamp(2.6rem, 8svh, 5.4rem);
  }

  .welcome-copy .lead {
    margin-bottom: clamp(20px, 3.2svh, 36px);
    font-size: clamp(0.78rem, 1.55svh, 1.1rem);
  }

  .welcome-copy .button {
    min-width: clamp(168px, 17svw, 230px);
    min-height: clamp(44px, 5.8svh, 64px);
    padding-inline: clamp(16px, 1.8svw, 24px);
    font-size: clamp(0.64rem, 1.15svh, 0.82rem);
  }

  .selection-heading,
  .top-matches-heading {
    padding-top: clamp(16px, 2.7svh, 30px);
    padding-bottom: clamp(12px, 2.2svh, 24px);
  }

  .selection-heading h2,
  .top-matches-heading h2 {
    font-size: clamp(1.65rem, 4.1svh, 3rem);
  }

  .selection-heading-rule {
    width: clamp(24px, 2.7svw, 34px);
    height: clamp(1px, 0.18svh, 2px);
    margin-top: clamp(12px, 1.8svh, 19px);
  }

  .selection-screen .product-grid {
    width: min(100%, clamp(620px, 62svw, 860px));
    margin: clamp(8px, 1.3svh, 16px) auto clamp(14px, 2svh, 24px);
    gap: clamp(10px, 1.2svw, 16px);
  }

  .selection-screen .product-card {
    min-height: clamp(280px, 35svh, 520px);
    padding: clamp(14px, 1.8svh, 22px) clamp(10px, 1.2svw, 16px) clamp(18px, 2.3svh, 28px);
    border-radius: clamp(10px, 1svw, 15px);
  }

  .selection-screen .product-art {
    height: clamp(130px, 18svh, 230px);
    margin-bottom: clamp(7px, 1svh, 12px);
  }

  .selection-screen .product-art svg {
    width: clamp(96px, 8svw, 150px);
    height: clamp(108px, 15svh, 190px);
  }

  .selection-screen .product-card h3 {
    margin-bottom: clamp(10px, 1.8svh, 18px);
    max-width: clamp(140px, 14svw, 190px);
    font-size: clamp(1rem, 2.2svh, 1.45rem);
  }

  .selection-screen .product-card p {
    max-width: clamp(140px, 14svw, 190px);
    font-size: clamp(0.64rem, 1.25svh, 0.88rem);
  }

  .selection-actions {
    min-height: clamp(36px, 4.5svh, 50px);
  }

  .journey-screen .progress-wrap {
    padding-top: clamp(8px, 1.4svh, 18px);
  }

  .journey-screen .progress-line {
    top: clamp(20px, 2.8svh, 30px);
  }

  .journey-screen .progress-dot {
    width: clamp(10px, 1.1svh, 14px);
    height: clamp(10px, 1.1svh, 14px);
  }

  .question-counter {
    margin-top: clamp(8px, 1.2svh, 13px);
    font-size: clamp(0.62rem, 1.1svh, 0.82rem);
  }

  .question-content {
    margin-top: clamp(14px, 2.8svh, 32px);
  }

  .question-heading {
    margin-bottom: clamp(18px, 2.7svh, 32px);
  }

  .question-heading h2 {
    margin-bottom: clamp(8px, 1.2svh, 13px);
    font-size: clamp(1.65rem, 4.1svh, 3rem);
  }

  .question-heading p {
    font-size: clamp(0.7rem, 1.35svh, 0.94rem);
  }

  .options-list,
  .question-actions {
    width: min(100%, clamp(680px, 69svw, 920px));
    max-width: min(100%, clamp(680px, 69svw, 920px));
  }

  .options-list {
    gap: clamp(8px, 1.05svh, 15px);
  }

  .option-card {
    min-height: clamp(56px, 6.2svh, 96px);
    padding: clamp(11px, 1.55svh, 18px) clamp(16px, 1.9svw, 24px);
    border-radius: clamp(8px, 0.9svw, 12px);
  }

  .option-card .option-copy strong {
    font-size: clamp(0.8rem, 1.65svh, 1.08rem);
  }

  .option-card .option-copy small {
    font-size: clamp(0.66rem, 1.2svh, 0.82rem);
  }

  .option-symbol {
    width: clamp(32px, 3.5svw, 42px);
    height: clamp(32px, 3.5svw, 42px);
  }

  .option-symbol svg {
    width: clamp(25px, 2.5svw, 32px);
    height: clamp(25px, 2.5svw, 32px);
  }

  .checkbox-mark {
    width: clamp(23px, 2.6svw, 31px);
    height: clamp(23px, 2.6svw, 31px);
  }

  .notes-grid {
    gap: clamp(10px, 1.5svw, 18px);
  }

  .option-card-visual {
    min-height: clamp(160px, 17svh, 250px);
    gap: clamp(8px, 1.3svh, 14px);
    padding: clamp(10px, 1.6svh, 18px) clamp(8px, 1svw, 14px);
  }

  .option-card-visual .checkbox-mark {
    transform: translate(clamp(52px, 5.3svw, 72px), clamp(-92px, -8svh, -62px));
  }

  .note-visual {
    width: clamp(78px, 8svh, 122px);
    height: clamp(78px, 8svh, 122px);
    font-size: clamp(1.25rem, 2.3svh, 1.8rem);
  }

  .question-actions {
    gap: clamp(12px, 1.6svw, 20px);
    padding-top: clamp(18px, 2.5svh, 28px);
  }

  .question-actions .button-primary,
  .question-actions .back-button {
    min-height: clamp(42px, 5.3svh, 60px);
    font-size: clamp(0.66rem, 1.2svh, 0.84rem);
  }

  .matches-grid {
    gap: clamp(9px, 1.35svw, 18px);
  }

  .match-card {
    min-height: clamp(350px, 40svh, 640px);
    padding: clamp(8px, 1svh, 14px) clamp(7px, 0.8svw, 12px) clamp(9px, 1.2svh, 16px);
    border-radius: clamp(11px, 1.2svw, 17px);
  }

  .blend-visual {
    height: clamp(136px, 19svh, 282px);
    margin: clamp(-14px, -1svh, -8px) clamp(-12px, -0.8svw, -7px) clamp(9px, 1.2svh, 16px);
    border-radius: clamp(10px, 1.1svw, 16px) clamp(10px, 1.1svw, 16px) 0 0;
  }

  .blend-bottle {
    width: clamp(42px, 4.1svw, 64px);
    height: clamp(82px, 11.5svh, 156px);
  }

  .match-rank {
    top: clamp(7px, 0.8svh, 11px);
    left: clamp(7px, 0.7svw, 11px);
    width: clamp(22px, 2.6svw, 31px);
    height: clamp(22px, 2.6svw, 31px);
    font-size: clamp(0.64rem, 1.15svh, 0.84rem);
  }

  .match-card-copy h3 {
    font-size: clamp(0.9rem, 2.1svh, 1.35rem);
  }

  .match-card-copy p {
    font-size: clamp(0.62rem, 1.25svh, 0.82rem);
  }

  .match-card-copy small {
    font-size: clamp(0.54rem, 1.05svh, 0.72rem);
  }

  .recommendations-button {
    width: min(100%, clamp(300px, 42svw, 560px));
    margin-top: clamp(24px, 4.2svh, 56px);
    min-height: clamp(42px, 5.2svh, 60px);
    font-size: clamp(0.62rem, 1.15svh, 0.8rem);
    text-transform: uppercase;
  }

  .results-back-button {
    font-size: clamp(0.62rem, 1.1svh, 0.8rem);
  }

  .detail-topbar {
    grid-template-columns: clamp(34px, 4svw, 48px) 1fr clamp(34px, 4svw, 48px);
    font-size: clamp(0.6rem, 1.1svh, 0.8rem);
  }

  .icon-button {
    width: clamp(32px, 4svw, 44px);
    height: clamp(32px, 4svw, 44px);
  }

  .detail-hero-layout {
    gap: clamp(12px, 1.8svw, 26px);
    margin-top: clamp(8px, 1.3svh, 16px);
    margin-bottom: clamp(12px, 2svh, 24px);
  }

  .detail-heading h2 {
    margin-bottom: clamp(6px, 0.9svh, 10px);
    font-size: clamp(1.85rem, 5.5svh, 3.7rem);
  }

  .detail-heading .detail-category,
  .detail-heading p {
    font-size: clamp(0.68rem, 1.4svh, 0.94rem);
  }

  .detail-heading .detail-category {
    margin-bottom: clamp(12px, 2svh, 22px);
  }

  .blend-visual-detail {
    height: clamp(150px, 21svh, 290px);
    border-radius: clamp(14px, 1.6svw, 21px);
  }

  .blend-visual-detail .blend-bottle {
    width: clamp(58px, 5.8svw, 88px);
    height: clamp(112px, 16svh, 210px);
  }

  .blend-visual-detail .blend-leaf {
    width: clamp(38px, 3.8svw, 56px);
    height: clamp(72px, 9.5svh, 112px);
  }

  .blend-visual-detail .blend-fruit {
    width: clamp(42px, 4.2svw, 62px);
    height: clamp(42px, 4.2svw, 62px);
  }

  .detail-recipe-grid {
    gap: clamp(14px, 2svw, 28px);
  }

  .detail-ratio-section {
    padding-left: clamp(14px, 1.8svw, 24px);
  }

  .section-label {
    margin-bottom: clamp(9px, 1.3svh, 15px);
    font-size: clamp(0.58rem, 1.05svh, 0.76rem);
  }

  .oil-list {
    gap: clamp(4px, 0.7svh, 8px);
  }

  .oil-row,
  .benefit small,
  .dilution-note {
    font-size: clamp(0.6rem, 1.2svh, 0.82rem);
  }

  .ratio-display {
    margin-bottom: clamp(10px, 1.8svh, 18px);
    font-size: clamp(1.8rem, 4.6svh, 3.2rem);
  }

  .detail-benefits-section {
    padding-top: clamp(13px, 2svh, 22px);
  }

  .detail-actions {
    gap: clamp(7px, 1svh, 12px);
    padding-top: clamp(18px, 2.6svh, 30px);
  }

  .detail-actions .button {
    min-height: clamp(42px, 5.1svh, 60px);
    font-size: clamp(0.62rem, 1.1svh, 0.8rem);
  }
}

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(36, 33, 28, 0.48);
  backdrop-filter: blur(3px);
}

.reset-modal {
  width: min(100%, 430px);
  padding: 28px 25px 23px;
  border: 1px solid rgba(49, 67, 56, 0.15);
  border-radius: 19px;
  background: var(--surface-strong);
  box-shadow: 0 24px 55px rgba(36, 33, 28, 0.22);
  text-align: center;
}

.modal-loader {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin: 0 auto 14px;
  border: 1px solid rgba(49, 67, 56, 0.25);
  border-radius: 50%;
  color: var(--sage-dark);
}

.modal-loader svg { width: 25px; height: 25px; }
.reset-modal h2 { margin: 0 0 10px; font-size: 2rem; }
.reset-modal p { margin: 0 auto 21px; max-width: 300px; color: var(--muted); font-size: 0.8rem; line-height: 1.6; }
.reset-modal .button { width: 100%; min-height: 44px; margin-top: 9px; border-radius: 9px; font-size: 0.7rem; text-transform: uppercase; }

.shake { animation: shake 320ms ease-in-out; }

@keyframes shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@media (max-width: 560px) {
  .feature-strip { grid-template-columns: 1fr; }
  .feature-strip > div { grid-template-columns: auto 1fr; }
  .selection-screen,
  .journey-screen,
  .matching-screen { padding-left: 20px; padding-right: 20px; }
  .selection-screen .product-grid { grid-template-columns: 1fr 1fr; }
  .selection-screen .product-card { min-height: 280px; }
  .product-art { height: 125px; }
  .product-art svg { width: 105px; height: 115px; }
  .selection-screen .product-card h3 { font-size: 1.05rem; }
  .selection-screen .product-card p { font-size: 0.66rem; }
  .selection-footer { align-items: stretch; flex-direction: column; }
  .selection-footer .button-primary { width: 100%; }
  .question-actions { flex-wrap: wrap; }
  .question-actions .button-primary { flex: 1; }
  .notes-grid { grid-template-columns: repeat(2, 1fr); }
  .matches-grid { grid-template-columns: 1fr; }
  .match-card { display: grid; grid-template-columns: 104px 1fr; column-gap: 12px; padding: 8px; }
  .match-card .blend-visual { grid-row: span 3; width: 104px; height: 122px; margin: -8px 0 -8px -8px; border-radius: 12px 0 0 12px; }
  .match-card .match-rank { left: 80px; }
}

/* Hidden staff panel: intentionally separate from the guest-facing journey. */
.brand-mark {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.admin-screen {
  width: min(100%, 1120px);
  min-height: calc(100svh - 20px);
  margin: 0 auto;
  padding: 28px 32px 34px;
  border: 1px solid rgba(49, 67, 56, 0.15);
  border-radius: 26px;
  background: rgba(248, 243, 234, 0.86);
  box-shadow: 0 18px 48px rgba(63, 52, 40, 0.12);
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.admin-toolbar .button {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 0.61rem;
  text-transform: uppercase;
}

.admin-import-label { position: relative; cursor: pointer; }
.admin-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

.admin-header h1 {
  margin: 4px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  font-weight: 400;
  line-height: 1;
}

.admin-exit {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.admin-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  padding: 18px 0 25px;
}

.admin-nav-button {
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid rgba(49, 67, 56, 0.16);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.56);
  cursor: pointer;
  font-size: 0.68rem;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.admin-nav-button:hover,
.admin-nav-button.is-active {
  border-color: var(--sage-dark);
  color: #fffdf8;
  background: var(--sage-dark);
}

.admin-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.admin-section-heading > div:first-child { min-width: 0; }
.admin-section-actions { flex: 0 0 auto; }
.admin-section-actions .admin-edit-button { min-height: 36px; padding: 0 12px; border-radius: 8px; font-size: 0.62rem; }

.admin-section-heading h2 {
  margin: 3px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 400;
  line-height: 1.08;
}

.admin-section-heading p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 13px;
}

.admin-stat,
.admin-info-card,
.admin-record {
  border: 1px solid rgba(49, 67, 56, 0.13);
  border-radius: 13px;
  background: rgba(255, 253, 248, 0.66);
}

.admin-stat {
  display: grid;
  gap: 3px;
  padding: 15px 13px;
}

.admin-stat strong {
  color: var(--sage-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 400;
}

.admin-stat span,
.admin-stat small,
.admin-record small,
.admin-question-row small {
  color: var(--muted);
  font-size: 0.68rem;
}

.admin-stat small { font-size: 0.61rem; }

.admin-info-card {
  margin-top: 13px;
  padding: 16px;
}

.admin-info-card > strong { font-size: 0.85rem; }
.admin-info-card > p { margin: 7px 0 0; color: var(--muted); font-size: 0.7rem; }

.admin-notice {
  margin: -7px 0 15px;
  padding: 10px 12px;
  border: 1px solid rgba(141, 73, 55, 0.2);
  border-radius: 9px;
  color: var(--terracotta-dark);
  background: rgba(141, 73, 55, 0.08);
  font-size: 0.7rem;
}

.admin-source-list {
  display: grid;
  gap: 7px;
}

.admin-source-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(49, 67, 56, 0.1);
  font-size: 0.7rem;
}

.admin-source-list div:last-child { padding-bottom: 0; border-bottom: 0; }
.admin-source-list small { color: var(--muted); font-size: 0.64rem; }

.admin-record-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.admin-record { padding: 14px; }

.admin-record-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-record-top > div { display: grid; gap: 4px; }
.admin-record p { margin: 11px 0; color: var(--muted); font-size: 0.7rem; line-height: 1.5; }

.admin-record-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.admin-toggle {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(141, 73, 55, 0.25);
  border-radius: 6px;
  color: var(--terracotta-dark);
  background: transparent;
  cursor: pointer;
  font-size: 0.58rem;
  text-transform: uppercase;
}

.admin-toggle:hover,
.admin-toggle.is-on:hover {
  color: #fffdf8;
  background: var(--terracotta);
}

.admin-edit-button {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(49, 67, 56, 0.2);
  border-radius: 6px;
  color: var(--sage-dark);
  background: transparent;
  cursor: pointer;
  font-size: 0.58rem;
  text-transform: uppercase;
}

.admin-edit-button:hover { color: #fffdf8; background: var(--sage-dark); }

.admin-edit-form {
  display: grid;
  gap: 13px;
  margin: 0 0 14px;
  padding: 17px;
  border: 1px solid rgba(141, 73, 55, 0.28);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.82);
}

.admin-edit-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-edit-heading h3 { margin: 2px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; font-weight: 400; }
.admin-edit-form label { display: grid; gap: 6px; color: var(--muted); font-size: 0.64rem; font-weight: 650; text-transform: uppercase; }
.admin-edit-form label small { font-size: 0.58rem; font-weight: 400; text-transform: none; }
.admin-edit-form input,
.admin-edit-form textarea { width: 100%; padding: 10px 11px; border: 1px solid rgba(49, 67, 56, 0.2); border-radius: 8px; color: var(--ink); background: #fffdf8; font: inherit; font-size: 0.75rem; font-weight: 400; text-transform: none; }
.admin-edit-form textarea { resize: vertical; line-height: 1.45; }
.admin-edit-form input:focus,
.admin-edit-form textarea:focus { outline: none; box-shadow: var(--focus); }

.admin-form-help { margin: -2px 0 0; color: var(--muted); font-size: 0.68rem; line-height: 1.55; }
.admin-checkbox-field { display: flex !important; align-items: center; gap: 8px !important; align-self: end; min-height: 38px; color: var(--ink) !important; text-transform: none !important; }
.admin-checkbox-field input { width: 17px; height: 17px; margin: 0; padding: 0; accent-color: var(--sage-dark); }

.admin-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.admin-edit-oils { display: grid; gap: 7px; padding-top: 3px; }
.admin-edit-oils > .section-label { margin: 0 0 2px; }
.admin-edit-oils label { display: grid; grid-template-columns: 1fr 76px 16px; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid rgba(49, 67, 56, 0.1); color: var(--ink); font-size: 0.7rem; font-weight: 500; text-transform: none; }
.admin-edit-oils label input { padding: 7px 8px; text-align: right; }
.admin-edit-oils label b { color: var(--muted); font-size: 0.7rem; }
.admin-edit-oils label > span { display: grid; gap: 5px; color: var(--ink); }
.admin-edit-oils label select { width: 100%; min-height: 34px; padding: 0 8px; border: 1px solid rgba(49, 67, 56, 0.2); border-radius: 7px; color: var(--ink); background: #fffdf8; font: inherit; font-size: 0.7rem; text-transform: none; }
.admin-edit-oils label select:focus { outline: none; box-shadow: var(--focus); }
.admin-edit-actions { display: flex; justify-content: flex-end; gap: 8px; }
.admin-edit-actions .button { min-height: 38px; padding: 0 13px; border-radius: 8px; font-size: 0.62rem; text-transform: uppercase; }

.status-pill {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--sage-dark);
  background: rgba(166, 180, 155, 0.3);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill.is-off { color: var(--terracotta-dark); background: rgba(141, 73, 55, 0.12); }

.tag-row,
.admin-oil-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span,
.admin-oil-list span {
  padding: 5px 7px;
  border: 1px solid rgba(49, 67, 56, 0.12);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.62rem;
}

.admin-oil-list span strong { color: var(--ink); font-weight: 650; }

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

.admin-question-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 7px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(49, 67, 56, 0.1);
}

.admin-question-row:last-of-type { border-bottom: 0; }
.admin-question-row > span { color: var(--terracotta); font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; }
.admin-question-row div { display: grid; gap: 4px; }
.admin-question-row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.admin-question-row-actions .admin-edit-button { min-height: 24px; font-size: 0.56rem; }
.admin-rule-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(49, 67, 56, 0.12); color: var(--muted); font-size: 0.64rem; line-height: 1.6; }
.admin-card-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.admin-card-actions button { min-height: 30px; }
.admin-inline-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-inline-heading .section-label { margin: 0; }
.admin-question-fieldset { display: grid; gap: 10px; margin: 0; padding: 13px; border: 1px solid rgba(49, 67, 56, 0.13); border-radius: 11px; }
.admin-question-fieldset legend { padding: 0 5px; color: var(--sage-dark); font-size: 0.66rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.admin-option-editor { display: grid; gap: 7px; padding-top: 10px; border-top: 1px solid rgba(49, 67, 56, 0.11); }
.admin-option-editor > .section-label { margin-bottom: 1px; }
.admin-scoring-note { margin: -2px 0 0; color: var(--muted); font-size: 0.68rem; line-height: 1.55; }
.admin-scoring-note strong { color: var(--ink); font-weight: 700; }
.admin-edit-form select { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid rgba(49, 67, 56, 0.2); border-radius: 8px; color: var(--ink); background: #fffdf8; font: inherit; font-size: 0.75rem; }
.admin-edit-form select:focus { outline: none; box-shadow: var(--focus); }
.admin-score-group { display: grid; gap: 0; padding-top: 4px; }
.admin-score-group > .section-label { margin-bottom: 5px; }
.admin-score-row { display: grid !important; grid-template-columns: minmax(170px, 0.8fr) minmax(0, 1.2fr); align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(49, 67, 56, 0.1); color: var(--ink) !important; font-size: 0.7rem !important; font-weight: 550 !important; text-transform: none !important; }
.admin-score-row:last-child { border-bottom: 0; }
.admin-score-row span { display: grid; gap: 3px; }
.admin-score-row small { color: var(--muted); font-size: 0.6rem; font-weight: 400; text-transform: none; }
.admin-score-row input { padding: 8px 9px; font-size: 0.68rem; }
.admin-new-option-row { display: grid; gap: 9px; padding: 10px; border: 1px solid rgba(49, 67, 56, 0.11); border-radius: 9px; background: rgba(248, 243, 234, 0.48); }
.admin-new-option-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--sage-dark); font-size: 0.68rem; }
.admin-remove-button { padding: 0; border: 0; color: var(--terracotta-dark); background: transparent; cursor: pointer; font-size: 0.58rem; text-transform: uppercase; }
.admin-remove-button:hover { text-decoration: underline; }

.admin-pin-modal {
  width: min(100%, 380px);
  padding: 28px 25px 23px;
  border: 1px solid rgba(49, 67, 56, 0.15);
  border-radius: 19px;
  background: var(--surface-strong);
  box-shadow: 0 24px 55px rgba(36, 33, 28, 0.22);
  text-align: center;
}

.admin-pin-modal h2 { margin: 0 0 10px; font-size: 2rem; }
.admin-pin-modal p { margin: 0 auto 17px; color: var(--muted); font-size: 0.8rem; line-height: 1.6; }
.admin-pin-input { width: 100%; min-height: 50px; margin-bottom: 6px; padding: 0 14px; border: 1px solid rgba(49, 67, 56, 0.22); border-radius: 9px; color: var(--ink); background: #fffdf8; font-size: 1.15rem; letter-spacing: 0.28em; text-align: center; }
.admin-pin-input:focus { outline: none; box-shadow: var(--focus); }
.admin-pin-modal .button { width: 100%; min-height: 44px; margin-top: 9px; border-radius: 9px; font-size: 0.7rem; text-transform: uppercase; }
.admin-pin-error { margin: 5px 0 0 !important; color: var(--terracotta-dark) !important; font-size: 0.68rem !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
  .admin-screen { padding: 22px 20px 26px; }
  .admin-section-heading { align-items: flex-start; flex-direction: column; }
  .admin-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-stat-grid,
  .admin-record-list,
  .admin-engine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-score-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .admin-header { align-items: stretch; flex-direction: column; }
  .admin-exit { align-self: flex-start; }
  .admin-stat-grid,
  .admin-record-list,
  .admin-engine-grid { grid-template-columns: 1fr; }
}
