:root {
  --ink: #20302b;
  --muted: #69756f;
  --paper: #f4f0e8;
  --card: rgba(255, 253, 248, 0.92);
  --line: rgba(32, 48, 43, 0.13);
  --forest: #28594c;
  --forest-dark: #183d34;
  --sage: #91aa9d;
  --peach: #e7a77f;
  --gold: #c9a654;
  --shadow: 0 24px 80px rgba(42, 52, 47, 0.11);
  font-family: Inter, "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

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

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(40, 89, 76, 0.24);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(2px);
  opacity: .55;
  z-index: -1;
}

.ambient-one {
  width: 470px;
  height: 470px;
  top: -230px;
  right: -90px;
  background: radial-gradient(circle, rgba(231,167,127,.38), transparent 70%);
}

.ambient-two {
  width: 520px;
  height: 520px;
  bottom: -340px;
  left: -180px;
  background: radial-gradient(circle, rgba(105,154,135,.35), transparent 70%);
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .04em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--forest);
  border-radius: 50%;
  color: var(--forest);
  font-size: 22px;
}

.session-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sage);
}

.app-shell {
  width: min(1040px, calc(100% - 32px));
  min-height: calc(100vh - 142px);
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 40px 0;
}

footer {
  min-height: 70px;
  border-top: 1px solid var(--line);
  padding: 22px clamp(20px, 5vw, 72px);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

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

h1 {
  margin: 18px 0 18px;
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -.045em;
}

h2 {
  margin-bottom: 12px;
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -.025em;
}

h3 { font-size: 16px; }

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.hero-card, .panel {
  border: 1px solid rgba(255,255,255,.7);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  border-radius: 28px;
}

.hero-card { padding: 32px; }

.sound-orbit {
  position: relative;
  width: 210px;
  height: 210px;
  display: grid;
  place-items: center;
  margin: 0 auto 30px;
}

.sound-orbit::before, .sound-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(40,89,76,.22);
  inset: 8px;
}

.sound-orbit::after {
  inset: 35px;
  border-color: rgba(231,167,127,.5);
}

.sound-core {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: var(--forest);
  box-shadow: 0 12px 35px rgba(40,89,76,.25);
  font-size: 30px;
}

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

.fact {
  padding: 15px 8px;
  text-align: center;
  background: rgba(40,89,76,.045);
  border-radius: 14px;
}

.fact strong { display: block; margin-bottom: 5px; }
.fact small { color: var(--muted); }

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  cursor: pointer;
  font-weight: 700;
  transition: transform .2s, background .2s, opacity .2s;
}

.button:hover { transform: translateY(-2px); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button.primary { color: white; background: var(--forest); }
.button.primary:hover { background: var(--forest-dark); }
.button.secondary { color: var(--forest); background: rgba(40,89,76,.08); }
.button.ghost { color: var(--muted); background: transparent; border: 1px solid var(--line); }
.button.wide { width: 100%; }

.panel {
  width: min(820px, 100%);
  margin: auto;
  padding: clamp(24px, 5vw, 52px);
}

.step-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.step-count {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
}

.progress {
  width: 180px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(40,89,76,.09);
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--forest);
  transition: width .35s;
}

.callout {
  padding: 18px 20px;
  margin: 22px 0;
  border-left: 3px solid var(--gold);
  border-radius: 0 14px 14px 0;
  background: rgba(201,166,84,.10);
  color: #5e542f;
  line-height: 1.65;
}

.check-row, .radio-card {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 16px 18px;
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  cursor: pointer;
  line-height: 1.55;
}

.check-row input, .radio-card input { margin-top: 4px; accent-color: var(--forest); }
.check-row small { display: block; color: var(--muted); margin-top: 3px; }

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

.field { display: grid; gap: 8px; }
.field > span { font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.75);
  padding: 13px 14px;
  color: var(--ink);
}

.field textarea { min-height: 90px; resize: vertical; }

.section-rule { height: 1px; background: var(--line); margin: 28px 0; }
.section-label { margin-bottom: 16px; color: var(--forest); font-size: 13px; font-weight: 800; letter-spacing: .08em; }

.device-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.camera-box {
  min-height: 240px;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #20302b;
  color: white;
  display: grid;
  place-items: center;
}

.camera-box video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.camera-placeholder { padding: 24px; text-align: center; color: rgba(255,255,255,.72); }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(40,89,76,.08);
  color: var(--forest);
  font-size: 12px;
  font-weight: 700;
}

.status-pill.demo { background: rgba(231,167,127,.16); color: #955837; }
.device-list { display: grid; gap: 12px; }
.device-item { padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.device-item strong { display: block; margin-bottom: 6px; }
.device-item small { color: var(--muted); line-height: 1.5; }

.trial-shell { width: min(900px, 100%); margin: auto; }
.trial-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.trial-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.label-banner {
  padding: 20px 34px;
  color: white;
  background: var(--forest);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
}

.label-banner.ai { background: #42566e; }
.label-banner strong { font-size: 20px; letter-spacing: .02em; }
.player { padding: clamp(30px, 6vw, 70px); text-align: center; }

.source-announcement {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 680px;
  margin: 0 auto 30px;
  padding: 25px 30px;
  border: 3px solid var(--forest);
  border-radius: 22px;
  text-align: left;
  background: rgba(40,89,76,.065);
}

.source-announcement.ai {
  border-color: #42566e;
  background: rgba(66,86,110,.08);
}

.source-seal {
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--forest);
  font: 800 28px/1 system-ui;
}

.source-announcement.ai .source-seal { background: #42566e; }
.source-announcement span { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.source-announcement h2 { margin: 6px 0; font: 700 clamp(24px, 4vw, 36px)/1.2 "Songti SC", serif; }
.source-announcement p { margin: 0; color: var(--muted); }
.wave {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 18px auto 30px;
}

.wave i {
  width: 4px;
  height: 20px;
  border-radius: 999px;
  background: var(--forest);
  opacity: .25;
}

.wave.playing i { animation: dance .85s ease-in-out infinite alternate; opacity: .75; }
.wave i:nth-child(3n) { animation-delay: -.35s; }
.wave i:nth-child(4n) { animation-delay: -.65s; }
@keyframes dance { to { height: var(--h, 75px); } }

.timer { font-variant-numeric: tabular-nums; color: var(--muted); }
.trial-camera {
  width: 154px;
  position: relative;
  margin: 18px auto 24px;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.95);
  border-radius: 16px;
  background: #20302b;
  box-shadow: 0 10px 30px rgba(32,48,43,.18);
}

.trial-camera video {
  display: block;
  width: 100%;
  height: 108px;
  object-fit: cover;
  transform: scaleX(-1);
}

.trial-camera span {
  display: block;
  padding: 7px 5px;
  color: rgba(255,255,255,.88);
  background: #20302b;
  font-size: 10px;
  letter-spacing: .04em;
}

.rating-panel { width: min(900px, 100%); margin: auto; }
.scale-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.scale-question { font-weight: 700; }
.scale-value { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.scale-field input { grid-column: 1 / -1; width: 100%; accent-color: var(--forest); }
.scale-anchors { grid-column: 1 / -1; display: flex; justify-content: space-between; color: var(--muted); }
.unanswered input { opacity: .5; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.choice-grid .radio-card { margin: 0; justify-content: center; align-items: center; }
.error { margin-top: 14px; color: #a04436; font-size: 13px; }

.result-hero { text-align: center; }
.completion-mark {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  color: white;
  background: var(--forest);
  border-radius: 50%;
  font-size: 32px;
}

.result-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 28px 0; }
.result-stat { padding: 18px; border-radius: 15px; background: rgba(40,89,76,.055); text-align: center; }
.result-stat strong { display: block; font-size: 24px; margin-bottom: 5px; }
.result-stat small { color: var(--muted); }
.privacy-note { font-size: 12px; color: var(--muted); line-height: 1.6; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 30px; }
  .hero-card { display: none; }
  .session-meta #save-state, .session-meta .dot { display: none; }
  .grid-2, .grid-3, .device-layout { grid-template-columns: 1fr; }
  .facts, .result-grid { grid-template-columns: 1fr; }
  .panel { border-radius: 22px; }
  .choice-grid { grid-template-columns: 1fr; }
  footer { gap: 10px; flex-direction: column; }
}
