:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f1f5fb;
  --surface-dark: #07070a;
  --ink: #151827;
  --ink-soft: #586173;
  --muted: #758098;
  --line: #dde5f1;
  --teal: #13d6d8;
  --cyan: #48c9ff;
  --blue: #4b92ff;
  --purple: #9b5cff;
  --pink: #ff5ac8;
  --orange: #ffb84d;
  --green: #8de464;
  --gradient-brand: linear-gradient(115deg, var(--teal), var(--cyan) 36%, var(--blue) 64%, var(--purple));
  --gradient-rainbow: linear-gradient(115deg, var(--pink), var(--orange), var(--green), var(--teal), var(--cyan), var(--purple));
  --shadow: 0 24px 60px rgba(12, 25, 49, 0.12);
  --shadow-soft: 0 16px 40px rgba(12, 25, 49, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(72, 201, 255, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 90, 200, 0.06), transparent 20%),
    var(--bg);
  line-height: 1.6;
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 99;
  background: var(--gradient-rainbow);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.top-shell {
  position: relative;
  padding: 24px 0 42px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 90, 200, 0.15), transparent 22%),
    radial-gradient(circle at 85% 10%, rgba(72, 201, 255, 0.18), transparent 24%),
    radial-gradient(circle at 78% 72%, rgba(155, 92, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #020305 0%, #070912 58%, #0c1020 100%);
}
.top-shell::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(246, 247, 251, 0), var(--bg));
  pointer-events: none;
}
.compact-top-shell { padding-bottom: 20px; }

.site-header {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  min-height: 96px;
  padding: 16px 18px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}
.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 0 1 auto;
}
.brand img {
  width: clamp(230px, 28vw, 360px);
  height: auto;
}
.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex: 1 1 auto;
  min-width: 0;
}
.main-nav a,
.back-link,
.footer-links a {
  color: rgba(255, 255, 255, 0.84);
  font-weight: 700;
  transition: color 0.18s ease, opacity 0.18s ease;
}
.main-nav a:hover,
.back-link:hover,
.footer-links a:hover {
  color: #ffffff;
}
.back-link {
  white-space: nowrap;
}

.button {
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 30px rgba(52, 138, 255, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(52, 138, 255, 0.32);
  filter: saturate(1.08);
}
.button-small {
  min-height: 46px;
  padding: 0 18px;
  white-space: nowrap;
}
.button-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}
.questionnaire-card .button-secondary,
.result-actions .button-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.button-secondary:hover {
  box-shadow: none;
}
.button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(72, 201, 255, 0.35);
  outline-offset: 3px;
}

.hero {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 36px));
  margin: 22px auto 0;
  padding: clamp(28px, 5vw, 42px);
  min-height: 580px;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 42px;
  align-items: center;
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% auto auto -10%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,90,200,0.22), transparent 65%);
}
.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(72,201,255,0.18), transparent 62%);
}
.hero-copy, .hero-card {
  position: relative;
  z-index: 2;
}
.hero-copy h1,
.questionnaire-intro h1,
.legal-card h1 {
  margin: 0 0 20px;
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.hero-copy h1,
.questionnaire-intro h1 {
  color: #ffffff;
}
.hero-copy p {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 1.1rem;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--gradient-rainbow);
}
.gradient-text {
  color: transparent;
  background: var(--gradient-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 22px;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: rgba(255,255,255,0.78);
  font-weight: 700;
  font-size: 0.94rem;
}

.hero-card,
.questionnaire-card,
.result-card,
.legal-card,
.how-it-works,
.category-card,
.benefit-list > div,
.product-card {
  border-radius: 28px;
}
.hero-card,
.questionnaire-card,
.result-card,
.legal-card {
  position: relative;
  overflow: hidden;
}
.hero-card::before,
.questionnaire-card::before,
.result-card::before,
.legal-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--gradient-rainbow);
}
.hero-card {
  padding: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}
.hero-card-top,
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.mini-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.score {
  padding: 7px 12px;
  border-radius: 999px;
  background: #e7fbfc;
  color: #138d9e;
  font-size: 0.8rem;
  font-weight: 800;
}
.recommendation-visual {
  height: 176px;
  margin: 26px 0;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 5.8rem;
  background: linear-gradient(135deg, #eef9ff, #fdf0ff);
}
.hero-card h2 {
  margin: 0 0 8px;
  font-size: 1.65rem;
}
.hero-card p { color: var(--ink-soft); }
.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.mini-stats div {
  padding: 12px;
  border-radius: 16px;
  text-align: center;
  background: var(--surface-soft);
}
.mini-stats strong,
.mini-stats span {
  display: block;
}
.mini-stats span {
  color: var(--muted);
  font-size: 0.76rem;
}

.section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto 96px;
}
.section-heading {
  max-width: 740px;
  margin-bottom: 34px;
}
.section-heading h2,
.benefit-copy h2,
.result-main h3,
.result-side h3,
.product-section h3,
.legal-card h2 {
  margin: 0 0 12px;
}
.section-heading h2,
.benefit-copy h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.section-heading p,
.benefit-copy p,
.legal-card p,
.legal-card li {
  color: var(--ink-soft);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.category-card {
  min-height: 310px;
  padding: 26px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.category-card.featured {
  color: #fff;
  border: 0;
  background: linear-gradient(145deg, #0b1020, #14172b 28%, #1f1551 58%, #149fb0 100%);
}
.category-card.muted {
  opacity: 0.8;
}
.category-icon {
  margin-bottom: 18px;
  font-size: 2.6rem;
}
.category-status {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.category-status.upcoming {
  background: #eefaff;
  color: #1793aa;
}
.category-card h3 {
  margin: 6px 0 8px;
  font-size: 1.36rem;
}
.category-card p {
  opacity: 0.84;
}
.card-link {
  margin-top: auto;
  font-weight: 800;
}

.how-it-works {
  padding: clamp(26px, 5vw, 56px);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow-soft);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.steps article { padding: 10px; }
.steps article > span,
.benefit-list > div > span {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--gradient-brand);
  font-weight: 900;
}
.steps h3 { margin: 18px 0 8px; }
.steps p { color: var(--ink-soft); }

.benefits {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 52px;
  align-items: center;
}
.benefit-list {
  display: grid;
  gap: 14px;
}
.benefit-list > div {
  display: flex;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow-soft);
}
.benefit-list p { margin: 0; }

.questionnaire-page .questionnaire-intro {
  position: relative;
  z-index: 2;
  width: min(940px, calc(100% - 36px));
  margin: 22px auto 0;
  padding: 34px 28px 68px;
  text-align: center;
}
.questionnaire-intro p {
  max-width: 760px;
  margin: 0 auto;
  color: rgba(255,255,255,0.74);
  font-size: 1.05rem;
}
.form-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.88);
  font-size: 0.86rem;
  font-weight: 800;
}
.questionnaire-shell,
.legal-shell {
  width: min(1020px, calc(100% - 28px));
  margin: -18px auto 88px;
  position: relative;
  z-index: 3;
}
.questionnaire-card,
.result-card,
.legal-card {
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.98);
  box-shadow: var(--shadow);
}
.legal-card h1 {
  color: var(--ink);
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}
.legal-card h2 {
  margin-top: 28px;
  font-size: 1.2rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.form-field {
  display: grid;
  gap: 8px;
}
.form-field.full {
  grid-column: 1 / -1;
}
.form-field label {
  font-weight: 800;
  color: var(--ink);
}
.form-field label span {
  display: block;
  color: #149fb0;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.form-field small {
  color: var(--muted);
  line-height: 1.45;
}
.select-wrap,
.number-wrap {
  position: relative;
}
.select-wrap::after {
  content: "⌄";
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.2rem;
  pointer-events: none;
}
select,
input[type="number"] {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
  color: var(--ink);
}
select {
  appearance: none;
  padding-right: 44px;
}
input[type="number"] {
  padding-right: 66px;
}
.number-unit {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 800;
}
.form-message {
  min-height: 1.5em;
  margin-top: 14px;
  color: #bd3d53;
  font-weight: 700;
}
.question-actions,
.result-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.result-card {
  margin-top: 22px;
}
.result-header h2 {
  margin: 8px 0 10px;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
}
.result-header p {
  margin: 0;
  color: var(--ink-soft);
}
.result-score {
  width: 112px;
  height: 112px;
  flex: 0 0 auto;
  border-radius: 28px;
  display: grid;
  place-items: center;
  text-align: center;
  background: linear-gradient(145deg, #eef9ff, #fdf2ff);
}
.result-score strong {
  display: block;
  font-size: 1.6rem;
}
.result-score span {
  color: var(--muted);
  font-size: 0.82rem;
}
.result-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  margin: 28px 0;
}
.result-main,
.result-side {
  padding: 24px;
  border-radius: 24px;
  background: var(--surface-soft);
}
.result-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  background: linear-gradient(135deg, #ffffff, #eef9ff);
}
.result-main ul {
  margin: 0;
  padding-left: 18px;
}
.result-main li,
.care-item span,
.product-card p {
  color: var(--ink-soft);
}
.care-plan {
  display: grid;
  gap: 14px;
}
.care-item {
  display: grid;
  gap: 4px;
}
.quantity-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 26px;
}
.quantity-banner > div {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(145deg, #101425, #202545 70%, #149fb0 140%);
  color: #fff;
}
.quantity-banner strong,
.quantity-banner span {
  display: block;
}
.quantity-banner strong {
  font-size: 1.35rem;
}
.quantity-banner span {
  font-size: 0.86rem;
  opacity: 0.74;
}
.product-section {
  padding: 28px;
  border-radius: 26px;
  background: #f8fbff;
  border: 1px solid var(--line);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.product-card {
  padding: 22px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.product-card span:first-child {
  font-size: 2rem;
}
.product-card h4 {
  margin: 12px 0 8px;
  font-size: 1.05rem;
}
.product-card p {
  min-height: 92px;
}
.product-card a {
  color: #138d9e;
  font-weight: 800;
}

.site-footer {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 46px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.footer-brand {
  width: min(280px, 100%);
  margin-bottom: 10px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
}
.site-footer .footer-links a {
  color: var(--ink);
}
.affiliate-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.8rem;
}
.small-footer {
  margin-top: 24px;
}

@media (max-width: 1100px) {
  .hero,
  .benefits,
  .result-grid { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
  .hero-card { max-width: 560px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .steps,
  .product-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .site-header {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
  .main-nav {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    gap: 14px 20px;
  }
  .hero { padding: 28px 22px; }
  .hero-actions .button { width: 100%; }
  .form-grid,
  .quantity-banner { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
}

@media (max-width: 680px) {
  .top-shell { padding-top: 14px; }
  .site-header,
  .hero,
  .section,
  .site-footer,
  .questionnaire-intro,
  .questionnaire-shell,
  .legal-shell { width: calc(100% - 20px); }
  .site-header {
    min-height: 0;
    padding: 14px;
    border-radius: 22px;
  }
  .brand img { width: min(100%, 270px); }
  .site-header > .button-small { width: 100%; }
  .hero {
    margin-top: 14px;
    border-radius: 24px;
  }
  .hero-copy h1,
  .questionnaire-intro h1 { font-size: 2.35rem; }
  .trust-row,
  .footer-links { gap: 10px; }
  .category-grid,
  .steps,
  .product-grid,
  .result-grid { grid-template-columns: 1fr; }
  .category-card { min-height: 0; }
  .questionnaire-shell,
  .legal-shell { margin-top: -8px; margin-bottom: 70px; }
  .questionnaire-card,
  .result-card,
  .legal-card,
  .product-section,
  .result-main,
  .result-side { padding: 22px 18px; }
  .result-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .result-score {
    width: 94px;
    height: 94px;
    border-radius: 24px;
  }
  .site-footer {
    grid-template-columns: 1fr;
  }
}

@media print {
  .top-shell,
  .questionnaire-intro,
  .questionnaire-card,
  .site-footer,
  .result-actions { display: none !important; }
  body { background: #fff; }
  body::before { display: none; }
  .questionnaire-shell { width: 100%; margin: 0; }
  .result-card { box-shadow: none; border: 0; }
}

/* Version 4: Rasen-Bildanalyse */
.service-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.service-option {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 92px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.service-option:hover {
  transform: translateY(-2px);
  border-color: rgba(72, 201, 255, 0.6);
  box-shadow: var(--shadow);
}
.service-option.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(145deg, #0e1222, #23284b 66%, #149fb0 150%);
}
.service-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #edfaff, #fff0fb);
  font-size: 1.65rem;
}
.service-option strong,
.service-option small {
  display: block;
}
.service-option strong {
  line-height: 1.25;
}
.service-option small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}
.service-option.active small {
  color: rgba(255, 255, 255, 0.68);
}

.analysis-form {
  overflow: visible;
}
.analysis-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.analysis-section-heading.form-heading {
  margin-top: 40px;
}
.analysis-section-heading h2 {
  margin: 0 0 4px;
  font-size: 1.45rem;
}
.analysis-section-heading p {
  margin: 0;
  color: var(--ink-soft);
}
.step-badge {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--gradient-brand);
  font-weight: 900;
}
.upload-zone {
  position: relative;
  min-height: 230px;
  padding: 34px 22px;
  border: 2px dashed #b8c8db;
  border-radius: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(145deg, #f7fbff, #fff8fd);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.upload-zone:hover,
.upload-zone.dragging {
  border-color: var(--cyan);
  background: linear-gradient(145deg, #eefbff, #fff0fa);
  transform: translateY(-2px);
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.upload-zone strong,
.upload-zone span {
  pointer-events: none;
}
.upload-zone strong {
  font-size: 1.12rem;
}
.upload-zone span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}
.upload-icon {
  width: 68px;
  height: 68px;
  margin-bottom: 14px;
  border-radius: 21px;
  display: grid;
  place-items: center;
  background: var(--gradient-brand);
  box-shadow: 0 12px 30px rgba(52, 138, 255, 0.22);
  font-size: 2rem;
  pointer-events: none;
}
.photo-guidance {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 14px 2px 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 700;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.photo-preview {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.photo-preview img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.photo-preview figcaption {
  padding: 10px 14px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 800;
}
.photo-preview button {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(6, 8, 15, 0.78);
  font-size: 1.35rem;
  line-height: 1;
}
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  resize: vertical;
  background: var(--surface-soft);
  color: var(--ink);
}
textarea:focus-visible {
  outline: 3px solid rgba(72, 201, 255, 0.35);
  outline-offset: 3px;
}
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fbff;
  color: var(--ink-soft);
  font-size: 0.9rem;
  cursor: pointer;
}
.consent-row input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: #149fb0;
}
.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}
.analysis-loading {
  margin-top: 20px;
  padding: 46px 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  text-align: center;
  background: #fff;
  box-shadow: var(--shadow);
}
.analysis-loading h2 {
  margin: 18px 0 6px;
}
.analysis-loading p {
  margin: 0;
  color: var(--ink-soft);
}
.loading-spinner {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border: 5px solid #e7edf5;
  border-top-color: var(--cyan);
  border-right-color: var(--purple);
  border-radius: 50%;
  animation: quamaro-spin 0.9s linear infinite;
}
@keyframes quamaro-spin {
  to { transform: rotate(360deg); }
}
.analysis-result {
  margin-top: 20px;
}
.confidence-score strong {
  max-width: 86px;
  font-size: 1.18rem;
  line-height: 1.1;
}
.analysis-notice {
  margin: 24px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--orange);
  border-radius: 0 16px 16px 0;
  background: #fff8e9;
  color: #675332;
}
.cause-list {
  display: grid;
  gap: 12px;
}
.cause-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.cause-item > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.cause-item p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.certainty {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eefaff;
  color: #138d9e;
  font-size: 0.7rem;
  font-weight: 800;
}
.strategy-card {
  margin: 26px 0;
  padding: 25px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(72, 201, 255, 0.22), transparent 28%),
    linear-gradient(145deg, #0b1020, #24294d 70%, #58237b 140%);
}
.strategy-card h3 {
  margin: 8px 0 6px;
  font-size: 1.45rem;
}
.strategy-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}
.action-plan-section {
  margin: 34px 0;
}
.action-plan-section > h3 {
  margin: 0 0 18px;
  font-size: 1.55rem;
}
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.timeline-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
}
.timeline-grid article > span {
  display: inline-flex;
  margin-bottom: 10px;
  color: #138d9e;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.timeline-grid ul,
.detail-panel ul {
  margin: 0;
  padding-left: 18px;
}
.timeline-grid li,
.detail-panel li {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.analysis-details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0;
}
.detail-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f8fbff;
}
.detail-panel h3 {
  margin: 0 0 12px;
  font-size: 1.02rem;
}
.warning-panel {
  background: #fff9ed;
}
.analysisSubmit:disabled,
.button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

@media (max-width: 980px) {
  .timeline-grid,
  .analysis-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .service-switch,
  .preview-grid,
  .timeline-grid,
  .analysis-details-grid {
    grid-template-columns: 1fr;
  }
  .service-option {
    min-height: 0;
  }
  .upload-zone {
    min-height: 210px;
    padding: 28px 16px;
  }
  .photo-guidance {
    display: grid;
  }
  .cause-item > div {
    display: grid;
  }
  .certainty {
    justify-self: start;
  }
}

@media print {
  .service-switch,
  .analysis-form,
  .analysis-loading {
    display: none !important;
  }
}
