:root {
  color-scheme: dark;

  --space-deep: #09061d;
  --space-purple: #1d0b43;
  --space-blue: #071c45;
  --space-teal: #063b42;

  --neon-blue: #30d9ff;
  --neon-green: #6cff8d;
  --neon-purple: #a970ff;
  --neon-pink: #ff4fc8;
  --neon-orange: #ff8f3f;
  --neon-gold: #ffd766;

  --cream: #fff8ec;
  --cream-soft: #eee4f4;
  --ink: #221735;
  --ink-soft: #615570;

  --glass-light: rgba(255, 250, 255, 0.82);
  --glass-mid: rgba(243, 237, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.74);

  --radius-small: 14px;
  --radius-medium: 24px;
  --radius-large: 36px;

  --shadow:
    0 30px 100px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);

  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--space-deep);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang TC",
    "Noto Sans TC",
    "Microsoft JhengHei",
    sans-serif;
  line-height: 1.72;
  background: var(--space-deep);
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(48, 217, 255, 0.85);
  outline-offset: 4px;
}

.visual-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
  transform: translateZ(0);
  backface-visibility: hidden;
  background:
    linear-gradient(
      rgba(4, 2, 18, 0.42),
      rgba(4, 2, 18, 0.66)
    ),
    url("assets/background/body-juice-lab-background.webp")
      center / cover no-repeat,
    linear-gradient(
      145deg,
      #16082f 0%,
      #071b3d 53%,
      #070515 100%
    );
}

.neon-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(22px);
  opacity: 0.55;
}

.orb-one {
  width: 260px;
  height: 260px;
  left: -90px;
  top: 8%;
  background:
    radial-gradient(
      circle,
      rgba(255, 79, 200, 0.84),
      rgba(169, 112, 255, 0.08) 70%
    );
}

.orb-two {
  width: 320px;
  height: 320px;
  right: -130px;
  top: 30%;
  background:
    radial-gradient(
      circle,
      rgba(48, 217, 255, 0.72),
      rgba(6, 59, 66, 0.04) 70%
    );
}

.orb-three {
  width: 260px;
  height: 260px;
  left: 35%;
  bottom: -120px;
  background:
    radial-gradient(
      circle,
      rgba(108, 255, 141, 0.55),
      rgba(255, 143, 63, 0.05) 70%
    );
}

.fractal {
  position: absolute;
  display: block;
  width: 160px;
  aspect-ratio: 1;
  opacity: 0.3;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius:
    45% 55% 35% 65% /
    55% 38% 62% 45%;
  box-shadow:
    0 0 40px rgba(48, 217, 255, 0.28),
    inset 0 0 32px rgba(255, 79, 200, 0.2);
}

.fractal::before,
.fractal::after {
  content: "";
  position: absolute;
  inset: 17%;
  border: 2px solid rgba(108, 255, 141, 0.38);
  border-radius:
    50% 30% 60% 40% /
    33% 65% 35% 67%;
}

.fractal::after {
  inset: 34%;
  border-color: rgba(255, 215, 102, 0.43);
}

.fractal-one {
  left: 7%;
  top: 21%;
}

.fractal-two {
  right: 7%;
  top: 8%;
  width: 120px;
}

.fractal-three {
  right: 13%;
  bottom: 12%;
  width: 210px;
}

.floating-particle {
  position: absolute;
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-gold);
  box-shadow:
    0 0 16px var(--neon-gold),
    0 0 34px rgba(255, 215, 102, 0.6);
}

.particle-one {
  left: 35%;
  top: 14%;
}

.particle-two {
  right: 32%;
  top: 39%;
  background: var(--neon-blue);
  box-shadow:
    0 0 16px var(--neon-blue),
    0 0 32px rgba(48, 217, 255, 0.55);
}

.particle-three {
  left: 27%;
  top: 63%;
  background: var(--neon-pink);
  box-shadow:
    0 0 16px var(--neon-pink),
    0 0 32px rgba(255, 79, 200, 0.55);
}

.particle-four {
  right: 23%;
  bottom: 14%;
  background: var(--neon-green);
  box-shadow:
    0 0 16px var(--neon-green),
    0 0 32px rgba(108, 255, 141, 0.5);
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(100% - 28px, 820px);
  margin: 0 auto;
  padding:
    max(24px, env(safe-area-inset-top))
    0
    max(36px, env(safe-area-inset-bottom));
}

.brand-header {
  padding: 10px 4px 22px;
  color: var(--cream);
  text-align: center;
  text-shadow:
    0 2px 16px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(48, 217, 255, 0.28);
}

.brand-name,
.brand-location {
  margin: 0;
}

.brand-name {
  font-size: 0.96rem;
  font-weight: 760;
  letter-spacing: 0.15em;
}

.brand-location {
  margin-top: 4px;
  color: rgba(255, 248, 236, 0.7);
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
}

.glass-panel {
  min-height: 520px;
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-large);
  background:
    linear-gradient(
      145deg,
      rgba(255, 250, 255, 0.9),
      rgba(243, 237, 255, 0.78)
    );
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  color: #7048a4;
  font-size: 0.8rem;
  font-weight: 780;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.32;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.25rem);
  letter-spacing: -0.043em;
}

h1 span {
  display: block;
  margin-top: 8px;
  color: #554563;
  font-size: 0.52em;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0;
  font-size: clamp(1.65rem, 5vw, 2.45rem);
  letter-spacing: -0.025em;
}

h3 {
  margin: 26px 0 8px;
  font-size: 1.08rem;
}

.lead {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 2.7vw, 1.1rem);
}

.lead p {
  margin: 10px 0;
}

.quote-line {
  margin: 28px 0;
  padding: 17px 20px;
  border-left: 4px solid rgba(169, 112, 255, 0.72);
  border-radius:
    0
    var(--radius-small)
    var(--radius-small)
    0;
  color: #453751;
  background:
    linear-gradient(
      135deg,
      rgba(236, 220, 255, 0.56),
      rgba(215, 244, 255, 0.43)
    );
  font-weight: 680;
}

.disclaimer {
  margin: 22px 0 0;
  color: #72687a;
  font-size: 0.84rem;
}

.juice-roster {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid rgba(88, 54, 123, 0.17);
}

.roster-heading {
  max-width: 620px;
  margin-bottom: 16px;
}

.roster-heading h2 {
  font-size: clamp(1.35rem, 4vw, 1.8rem);
}

.roster-heading p:last-child {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.juice-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.juice-thumb {
  position: relative;
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: rgba(9, 6, 29, 0.92);
  box-shadow: 0 8px 20px rgba(25, 12, 44, 0.16);
}

.juice-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) brightness(0.88);
  transition:
    transform var(--transition),
    filter var(--transition);
}

.juice-thumb:hover img {
  transform: scale(1.05);
  filter: saturate(1.06) brightness(1);
}

.juice-thumb figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 16px 5px 5px;
  overflow: hidden;
  color: #fff8ec;
  font-size: 0.61rem;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(transparent, rgba(5, 3, 19, 0.92));
  text-shadow: 0 1px 5px #000;
}

.progress-wrap {
  margin-bottom: 32px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
  color: #76687f;
  font-size: 0.82rem;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(42, 24, 67, 0.12);
  box-shadow: inset 0 1px 4px rgba(31, 16, 55, 0.14);
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(
      90deg,
      var(--neon-purple),
      var(--neon-pink),
      var(--neon-blue),
      var(--neon-green)
    );
  box-shadow: 0 0 18px rgba(169, 112, 255, 0.52);
  transition: width 260ms ease;
}

.question-title {
  margin-bottom: 24px;
}

.answer-list {
  display: grid;
  gap: 13px;
}

.answer-button {
  width: 100%;
  padding: 17px 18px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 19px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  background:
    linear-gradient(
      145deg,
      rgba(255, 253, 255, 0.78),
      rgba(235, 226, 247, 0.58)
    );
  box-shadow:
    0 10px 24px rgba(44, 23, 71, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
}

.answer-button:hover {
  transform: translateY(-2px);
  border-color: rgba(169, 112, 255, 0.62);
  box-shadow:
    0 14px 30px rgba(44, 23, 71, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.answer-button.is-selected {
  border-color: rgba(119, 69, 174, 0.86);
  background:
    linear-gradient(
      135deg,
      rgba(232, 210, 255, 0.9),
      rgba(217, 247, 255, 0.74)
    );
  box-shadow:
    0 13px 31px rgba(80, 38, 124, 0.16),
    inset 0 0 0 2px rgba(119, 69, 174, 0.13);
}

.answer-label {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 9px;
  border-radius: 50%;
  color: #694a84;
  background: rgba(255, 255, 255, 0.68);
  font-weight: 800;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.start-browser-note {
  width: min(100%, 620px);
  margin: 12px auto 20px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  color: #4d3b61;
  background: rgba(255, 255, 255, 0.58);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.6;
  text-align: center;
}

.navigation-row {
  justify-content: space-between;
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform var(--transition),
    opacity var(--transition),
    box-shadow var(--transition);
}

.primary-button {
  border: 1px solid rgba(78, 44, 126, 0.27);
  color: #fff;
  background:
    linear-gradient(
      135deg,
      #7146a2,
      #d342a1 55%,
      #168fb3
    );
  box-shadow:
    0 12px 27px rgba(73, 31, 112, 0.29),
    0 0 22px rgba(255, 79, 200, 0.13);
}

.secondary-button {
  border: 1px solid rgba(112, 72, 164, 0.34);
  color: var(--ink);
  background: rgba(255, 252, 255, 0.67);
}

.text-button {
  border: 0;
  color: var(--ink-soft);
  background: transparent;
}

.primary-button:hover,
.secondary-button:hover,
.text-button:hover {
  transform: translateY(-2px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.juice-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 440px);
  min-height: 390px;
  margin: 4px auto 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 38px;
  background:
    radial-gradient(
      circle at 50% 36%,
      rgba(255, 255, 255, 0.54),
      rgba(120, 72, 172, 0.22) 46%,
      rgba(14, 9, 41, 0.8) 100%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    0 22px 60px rgba(34, 17, 60, 0.23);
}

.juice-stage::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 280px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius:
    48% 52% 45% 55% /
    58% 58% 42% 42%;
  box-shadow:
    0 0 55px rgba(48, 217, 255, 0.3),
    inset 0 0 40px rgba(255, 79, 200, 0.23);
}

.result-image {
  position: relative;
  z-index: 2;
  display: block;
  width: min(86%, 360px);
  max-height: 350px;
  object-fit: contain;
  filter:
    drop-shadow(0 30px 25px rgba(0, 0, 0, 0.4));
}

.juice-placeholder {
  --juice-a: #ffd766;
  --juice-b: #ff9a3f;
  --juice-c: #fff7c7;

  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  width: 210px;
  height: 280px;
  padding: 18px;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius:
    45% 55% 36% 64% /
    56% 56% 44% 44%;
  color: rgba(42, 26, 54, 0.8);
  text-align: center;
  background:
    repeating-radial-gradient(
      circle at 40% 36%,
      rgba(255, 255, 255, 0.18) 0,
      rgba(255, 255, 255, 0.18) 3px,
      transparent 3px,
      transparent 12px
    ),
    radial-gradient(
      circle at 36% 24%,
      rgba(255, 255, 255, 0.9),
      transparent 28%
    ),
    linear-gradient(
      150deg,
      var(--juice-a),
      var(--juice-b) 58%,
      var(--juice-c)
    );
  box-shadow:
    0 30px 58px rgba(0, 0, 0, 0.34),
    0 0 45px var(--juice-a),
    inset 17px 15px 28px rgba(255, 255, 255, 0.28),
    inset -17px -20px 34px rgba(45, 24, 61, 0.14);
  animation: none;
}

.placeholder-emoji {
  display: block;
  margin-bottom: 8px;
  font-size: 4.3rem;
}

.color-badge {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.76rem;
  background: rgba(12, 8, 29, 0.48);
  backdrop-filter: blur(12px);
}

.result-name {
  text-align: center;
}

.fruit-meta {
  margin: 9px 0 0;
  color: var(--ink-soft);
  text-align: center;
}

.flavor-profile {
  display: grid;
  gap: 13px;
  margin-top: 27px;
}

.flavor-profile article {
  padding: 17px 18px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-medium);
  background: rgba(255, 253, 255, 0.5);
}

.flavor-profile h3 {
  margin-top: 0;
}

.flavor-profile p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.result-section {
  margin-top: 28px;
}

.result-section p {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.strength-list {
  padding-left: 1.25rem;
  color: var(--ink-soft);
}

.strength-list li {
  margin: 5px 0;
}

.balance-card,
.oya-note,
.nearby-result,
.health-disclaimer {
  margin-top: 20px;
  padding: 19px 20px;
  border-radius: var(--radius-medium);
}

.balance-card {
  border: 1px solid rgba(48, 217, 255, 0.45);
  background:
    linear-gradient(
      135deg,
      rgba(211, 247, 255, 0.5),
      rgba(229, 214, 255, 0.5)
    );
}

.oya-note {
  border: 1px solid rgba(255, 79, 200, 0.4);
  background:
    linear-gradient(
      135deg,
      rgba(255, 221, 244, 0.51),
      rgba(255, 239, 210, 0.43)
    );
}

.nearby-result {
  color: var(--ink-soft);
  background: rgba(255, 253, 255, 0.5);
}

.health-disclaimer {
  border: 1px solid rgba(112, 72, 164, 0.38);
  background: rgba(247, 241, 255, 0.62);
}

.health-disclaimer h3 {
  margin-top: 0;
}

.health-disclaimer p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.cta-grid {
  display: grid;
  gap: 13px;
  margin-top: 28px;
}

.cta-card {
  padding: 19px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-medium);
  background: rgba(255, 253, 255, 0.48);
}

.cta-card h3 {
  margin-top: 0;
}

.cta-card p {
  margin: 5px 0 16px;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.cta-card .button-note {
  margin: 8px 4px 14px;
  color: #5e506d;
  font-size: 0.94rem;
  line-height: 1.55;
  text-align: left;
}

.cta-card button,
.cta-card a {
  width: 100%;
  margin-top: 8px;
}

.cta-pending {
  cursor: help;
  opacity: 0.78;
}

.site-footer {
  padding: 25px 12px 4px;
  color: rgba(255, 248, 236, 0.7);
  text-align: center;
  font-size: 0.77rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.site-footer p {
  margin: 3px 0;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  width: min(calc(100% - 32px), 470px);
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  color: var(--ink);
  text-align: center;
  background: rgba(251, 246, 255, 0.95);
  box-shadow:
    0 16px 42px rgba(26, 12, 50, 0.38),
    0 0 25px rgba(48, 217, 255, 0.18);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.noscript-message {
  max-width: 600px;
  margin: 40px auto;
  padding: 24px;
  color: var(--cream);
  text-align: center;
}

@media (min-width: 700px) {
  .flavor-profile {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .site-shell {
    width: min(100% - 18px, 820px);
  }

  .glass-panel {
    min-height: 480px;
    padding: 23px 19px;
    border-radius: 27px;
  }

  .action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button,
  .text-button {
    width: 100%;
  }

  .juice-stage {
    min-height: 320px;
  }

  .juice-placeholder {
    width: 170px;
    height: 230px;
  }

  .placeholder-emoji {
    font-size: 3.5rem;
  }

  .juice-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .juice-thumb {
    border-radius: 10px;
  }

  .juice-thumb figcaption {
    display: none;
  }

  body[data-page="quiz"] .site-shell {
    display: grid;
    place-items: center;
    width: min(100% - 12px, 820px);
    min-height: 100dvh;
    padding:
      max(6px, env(safe-area-inset-top))
      0
      max(6px, env(safe-area-inset-bottom));
  }

  body[data-page="quiz"] .brand-header,
  body[data-page="quiz"] .site-footer,
  body[data-page="quiz"] .eyebrow {
    display: none;
  }

  body[data-page="quiz"] .glass-panel {
    width: 100%;
    min-height: 0;
    padding: 14px;
    border-radius: 22px;
  }

  body[data-page="quiz"] .progress-wrap {
    margin-bottom: 10px;
  }

  body[data-page="quiz"] .progress-meta {
    margin-bottom: 5px;
    font-size: 0.72rem;
  }

  body[data-page="quiz"] .progress-track {
    height: 6px;
  }

  body[data-page="quiz"] .question-title {
    margin-bottom: 12px;
    font-size: clamp(1.32rem, 5.9vw, 1.62rem);
    line-height: 1.3;
  }

  body[data-page="quiz"] .answer-list {
    gap: 8px;
  }

  body[data-page="quiz"] .answer-button {
    min-height: 53px;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 1.06rem;
    line-height: 1.45;
  }

  body[data-page="quiz"] .answer-label {
    width: 25px;
    height: 25px;
  }

  body[data-page="quiz"] .action-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
  }

  body[data-page="quiz"] .primary-button,
  body[data-page="quiz"] .secondary-button {
    min-height: 46px;
    padding: 9px;
  }
}

@media (max-width: 520px) and (max-height: 720px) {
  body[data-page="quiz"] .glass-panel {
    padding: 11px 13px;
    border-radius: 19px;
  }

  body[data-page="quiz"] .progress-wrap {
    margin-bottom: 7px;
  }

  body[data-page="quiz"] .question-title {
    margin-bottom: 8px;
    font-size: 1.28rem;
    line-height: 1.3;
  }

  body[data-page="quiz"] .answer-list {
    gap: 6px;
  }

  body[data-page="quiz"] .answer-button {
    min-height: 51px;
    padding: 10px 12px;
    font-size: 1.02rem;
    line-height: 1.42;
  }

  body[data-page="quiz"] .action-row {
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

