:root {
  --bg: #f8f1ea;
  --bg-deep: #eadacd;
  --paper: rgba(255, 251, 246, 0.84);
  --paper-strong: #fffaf4;
  --ink: #241a19;
  --muted: #6e5f5c;
  --line: rgba(36, 26, 25, 0.08);
  --accent: #c15a56;
  --accent-2: #da9669;
  --accent-3: #849179;
  --accent-soft: rgba(193, 90, 86, 0.12);
  --green-soft: rgba(132, 145, 121, 0.16);
  --gold-soft: rgba(218, 150, 105, 0.16);
  --shadow: 0 20px 46px rgba(97, 73, 64, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Noto Serif SC", serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(193, 90, 86, 0.15), transparent 24%),
    radial-gradient(circle at 86% 12%, rgba(132, 145, 121, 0.14), transparent 20%),
    radial-gradient(circle at 50% 110%, rgba(218, 150, 105, 0.16), transparent 32%),
    linear-gradient(180deg, #fdf8f3 0%, var(--bg) 42%, var(--bg-deep) 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  background: none;
}

.hidden {
  display: none !important;
}

.feedback-frame {
  display: none;
}

.app-shell {
  width: min(100%, 540px);
  margin: 0 auto;
  padding: 14px 12px calc(28px + var(--safe-bottom));
}

.screen {
  display: grid;
  gap: 16px;
}

.screen + .screen {
  margin-top: 16px;
}

.screen-hero {
  position: relative;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(14px);
  pointer-events: none;
}

.hero-orb-a {
  width: 180px;
  height: 180px;
  top: -30px;
  right: -40px;
  background: rgba(193, 90, 86, 0.18);
}

.hero-orb-b {
  width: 150px;
  height: 150px;
  left: -44px;
  bottom: 112px;
  background: rgba(132, 145, 121, 0.18);
}

.hero-card,
.panel,
.progress-card,
.question-card,
.intro-card {
  position: relative;
  background: var(--paper);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: var(--shadow);
}

.hero-card,
.panel {
  border-radius: var(--radius-xl);
  padding: 22px 16px;
}

.progress-card,
.question-card,
.intro-card {
  border-radius: var(--radius-lg);
  padding: 14px 13px;
}

.kicker,
.panel-tag,
.result-block span,
.question-meta,
.progress-top,
.hero-points article strong,
.meter-labels,
.mini-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kicker,
.panel-tag,
.question-meta,
.progress-top,
.meter-labels,
.mini-label {
  font-size: 0.72rem;
  color: var(--muted);
}

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

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", "Noto Serif SC", serif;
}

h1 {
  margin-top: 6px;
  font-size: clamp(2.55rem, 11.5vw, 4rem);
  line-height: 0.92;
}

h2 {
  font-size: clamp(1.95rem, 8vw, 2.8rem);
  line-height: 0.94;
}

h3 {
  margin-top: 10px;
  font-size: clamp(1.03rem, 4.35vw, 1.28rem);
  line-height: 1.42;
  text-align: justify;
  text-justify: inter-character;
}

.hero-lead {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.72;
  color: var(--muted);
  font-family: "Noto Serif SC", serif;
  font-weight: 500;
}

.hero-copy,
.intro-card p,
.field span,
.question-helper,
.result-block p,
.result-block li,
.result-hero,
.scene-body,
.route-card p {
  color: var(--muted);
  line-height: 1.8;
}

.field span,
.question-helper,
.field textarea,
.field textarea::placeholder,
.option-card strong,
.option-card span {
  font-size: 0.8rem;
  line-height: 1.62;
}

.field span,
.question-helper,
.field textarea::placeholder,
.option-card span {
  color: var(--muted);
}

.hero-copy {
  margin-top: 12px;
  font-size: 0.88rem;
  line-height: 1.68;
}

.hero-title-block {
  text-align: center;
}

.hero-family-label {
  color: var(--ink);
  font-family: "Noto Serif SC", serif;
  font-size: clamp(1.42rem, 6vw, 1.92rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.hero-title-divider {
  width: 72px;
  height: 1px;
  margin: 12px auto 10px;
  background: linear-gradient(90deg, transparent, rgba(36, 26, 25, 0.28), transparent);
}


.hero-value-card {
  margin-top: 16px;
  padding: 11px 12px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(193, 90, 86, 0.08), rgba(132, 145, 121, 0.08)),
    rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(36, 26, 25, 0.06);
}

.hero-value-list {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

.hero-value-list article {
  display: grid;
  gap: 4px;
}

.hero-value-list strong {
  font-size: 0.96rem;
}

.hero-value-list span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.58;
}

.hero-points {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.hero-points article {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(36, 26, 25, 0.06);
}

.hero-points article strong {
  font-size: 0.9rem;
  color: var(--muted);
  font-family: "Noto Serif SC", serif;
  font-weight: 500;
}

.hero-actions,
.result-actions,
.mobile-action-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-actions {
  margin-top: 20px;
}

.button {
  width: 100%;
  border-radius: 999px;
  padding: 14px 18px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff8f2;
}

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

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

.intro-stack {
  display: grid;
  gap: 12px;
}

.intro-card span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.intro-card h2 {
  margin-top: 12px;
  font-size: 1.7rem;
}

.panel-head,
.quiz-header,
.progress-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.panel-tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(36, 26, 25, 0.06);
}

.profile-form {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

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

.field input,
.field textarea,
.field select {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(36, 26, 25, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 14px 16px;
  outline: 0;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(193, 90, 86, 0.34);
  box-shadow: 0 0 0 4px rgba(193, 90, 86, 0.08);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(36, 26, 25, 0.08);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  cursor: pointer;
}

.chip.active {
  background: linear-gradient(135deg, var(--accent) 0%, #cc705d 100%);
  border-color: transparent;
  color: #fffaf3;
}

.text-button {
  color: var(--accent);
  padding: 0;
  cursor: pointer;
}

.progress-card {
  display: grid;
  gap: 10px;
}

.progress-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(36, 26, 25, 0.08);
}

.progress-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.question-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.34)),
    var(--paper);
}

.question-card::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(193, 90, 86, 0.12), transparent 72%);
  pointer-events: none;
}

.question-meta {
  margin-bottom: 4px;
}

.question-helper {
  margin-top: 12px;
  font-weight: 500;
}

.option-list {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.option-card {
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border-radius: 18px;
  border: 1px solid rgba(36, 26, 25, 0.06);
  background: rgba(255, 255, 255, 0.74);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.option-card strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.94rem;
  line-height: 1.44;
}

.option-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.option-card.active {
  border-color: rgba(193, 90, 86, 0.18);
  background:
    linear-gradient(180deg, rgba(193, 90, 86, 0.12), rgba(255, 255, 255, 0.84)),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 22px rgba(193, 90, 86, 0.08);
}

.note-field {
  margin-top: 14px;
}

.mobile-action-bar {
  position: sticky;
  bottom: 0;
  padding: 12px 0 calc(12px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(248, 241, 234, 0), rgba(248, 241, 234, 0.92) 28%, rgba(248, 241, 234, 1) 100%);
}

.result-panel {
  gap: 12px;
}

.feedback-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(36, 26, 25, 0.06);
}

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

.feedback-head strong {
  display: block;
  margin-top: 4px;
  font-size: 0.95rem;
}

.feedback-pill {
  flex: none;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(36, 26, 25, 0.06);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.feedback-form {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.feedback-question {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.feedback-ratings {
  display: grid;
  gap: 8px;
}

.feedback-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(36, 26, 25, 0.08);
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

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

.feedback-rating:has(input:checked) {
  border-color: rgba(193, 90, 86, 0.24);
  background: rgba(193, 90, 86, 0.06);
}

.feedback-rating input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.feedback-rating span {
  font-size: 0.84rem;
  color: var(--ink);
}

.feedback-reason {
  margin-top: 2px;
}

.feedback-reason span {
  font-size: 0.76rem;
}

.feedback-status {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.result-hero {
  margin-top: 10px;
  padding: 12px 12px 11px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(193, 90, 86, 0.08), rgba(132, 145, 121, 0.08)),
    rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(36, 26, 25, 0.06);
}

.visual-explainer {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.58;
}

.result-visual-card,
.scene-card,
.route-card,
.result-block {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(36, 26, 25, 0.06);
}

.result-visual-card,
.scene-card,
.route-card,
.result-block {
  padding: 14px;
}

.result-visual-card,
.result-grid,
.route-stack {
  margin-top: 10px;
}

.meter-stack {
  margin-top: 10px;
  display: grid;
  gap: 7px;
}

.meter-card {
  padding: 9px 11px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(36, 26, 25, 0.05);
}

.meter-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 0.84rem;
}

.meter-head strong {
  font-weight: 600;
  font-size: 0.84rem;
}

.meter-track {
  margin-top: 7px;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(36, 26, 25, 0.08);
}

.meter-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
}

.meter-a i {
  background: linear-gradient(90deg, #c55a57, #de8a79);
}

.meter-b i {
  background: linear-gradient(90deg, #6f8d72, #9fba9d);
}

.meter-c i {
  background: linear-gradient(90deg, #d89a4d, #efc184);
}

.meter-d i {
  background: linear-gradient(90deg, #5b87c8, #8fb2e5);
}

.meter-e i {
  background: linear-gradient(90deg, #8b6cc9, #b59ae7);
}

.meter-labels {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
}

.meter-copy {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.scene-card {
  margin-top: 10px;
  background:
    linear-gradient(135deg, rgba(218, 150, 105, 0.12), rgba(193, 90, 86, 0.08)),
    rgba(255, 255, 255, 0.68);
}

.scene-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scene-tag {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(36, 26, 25, 0.06);
  font-size: 0.76rem;
}

.scene-body {
  margin-top: 7px;
  font-size: 0.82rem;
  line-height: 1.62;
}

.result-grid {
  display: grid;
  gap: 10px;
}

.result-block span {
  color: var(--accent);
  font-size: 0.78rem;
}

.result-block p,
.result-block ul {
  margin-top: 8px;
  font-size: 0.84rem;
  line-height: 1.66;
}

.result-block ul {
  padding-left: 18px;
}

.route-stack {
  display: grid;
  gap: 10px;
}

.route-section {
  margin-top: 10px;
}

.route-card {
  position: relative;
  overflow: hidden;
}

.route-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.route-card strong {
  display: block;
  padding-left: 10px;
  font-size: 0.84rem;
}

.route-card p {
  margin-top: 7px;
  padding-left: 10px;
  font-size: 0.8rem;
  line-height: 1.56;
}

@media (min-width: 760px) {
  .app-shell {
    width: min(100%, 560px);
    padding: 20px 16px 40px;
  }

  .hero-card,
  .panel {
    padding: 26px 20px;
  }

  .progress-card,
  .question-card,
  .intro-card {
    padding: 18px 16px;
  }
}
