/* ==========================================================================
   生日计划问卷 · 样式
   字体、颜色、布局都集中在这里，方便整体换肤。
   ========================================================================== */

:root {
  --paper: #f4efe6;
  --paper-deep: #ece4d5;
  --card: #fffdf9;
  --card-soft: #fbf6ed;
  --ink: #24211c;
  --ink-soft: #5d574c;
  --muted: #8d8578;
  --line: rgba(36, 33, 28, 0.13);
  --line-strong: rgba(36, 33, 28, 0.26);
  --forest: #1f4b3f;
  --forest-deep: #14352c;
  --forest-soft: rgba(31, 75, 63, 0.08);
  --apricot: #dd9560;
  --apricot-soft: #f3d7bd;
  --danger: #a23b2c;
  --danger-soft: rgba(162, 59, 44, 0.08);
  --radius-lg: 32px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 30px 80px rgba(61, 50, 33, 0.1);
  --shadow-soft: 0 14px 40px rgba(61, 50, 33, 0.08);
  --serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", "Noto Serif CJK SC",
    "Source Han Serif SC", serif;
  --sans: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Consolas", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(900px 620px at 92% -8%, rgba(221, 149, 96, 0.24), transparent 62%),
    radial-gradient(820px 640px at -8% 22%, rgba(31, 75, 63, 0.1), transparent 58%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: #fff;
  background: var(--forest);
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

button {
  border: none;
}

a {
  color: inherit;
}

svg {
  display: block;
}

[hidden] {
  display: none !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;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--forest);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

.page-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}

.ambient-a {
  top: 16%;
  right: -140px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(31, 75, 63, 0.12);
}

.ambient-a::after {
  content: "";
  position: absolute;
  inset: 44px;
  border: 1px solid rgba(31, 75, 63, 0.09);
  border-radius: 50%;
}

.ambient-b {
  left: -90px;
  bottom: 8%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(221, 149, 96, 0.13), transparent 68%);
}

/* --------------------------------------------------------------------------
   顶栏 / 页脚
   -------------------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--forest);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.55);
}

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

.brand-copy strong {
  display: block;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.brand-copy small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.26em;
}

.header-meta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.5);
  backdrop-filter: blur(8px);
}

.header-meta .dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 3px rgba(31, 75, 63, 0.12);
}

.site-main,
.admin-main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
}

.site-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 40px 64px;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 40px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  border-top: 1px solid var(--line);
}

.site-footer span {
  margin: 0 8px;
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   通用元素
   -------------------------------------------------------------------------- */

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.btn .arrow {
  font-size: 17px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.btn-primary {
  color: #fff;
  background: var(--forest);
  box-shadow: 0 12px 26px rgba(31, 75, 63, 0.18);
}

.btn-primary:hover {
  background: var(--forest-deep);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(31, 75, 63, 0.24);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  color: var(--ink-soft);
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(36, 33, 28, 0.05);
}

.btn-outline {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(255, 253, 249, 0.5);
}

.btn-outline:hover {
  background: var(--card);
  border-color: var(--ink-soft);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 10px 16px;
  font-size: 12px;
}

.btn-lg {
  width: 100%;
  margin-top: 28px;
  padding: 17px 26px;
  font-size: 15px;
}

.btn[disabled],
.btn.is-loading {
  cursor: wait;
  opacity: 0.62;
  transform: none;
  box-shadow: none;
}

.btn.is-loading .arrow {
  display: none;
}

.btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-outline.is-loading::after {
  border-color: rgba(31, 75, 63, 0.2);
  border-top-color: var(--forest);
}

.spinner {
  display: block;
  width: 26px;
  height: 26px;
  margin: 0 auto 14px;
  border: 2px solid rgba(31, 75, 63, 0.14);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-state {
  display: grid;
  place-items: center;
  min-height: 52vh;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.noscript-note {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 50;
  padding: 16px 20px;
  text-align: center;
  color: #fff;
  background: var(--forest);
  border-radius: 16px;
}

/* --------------------------------------------------------------------------
   封面
   -------------------------------------------------------------------------- */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  align-items: center;
  gap: clamp(40px, 7vw, 92px);
  min-height: clamp(560px, calc(100vh - 250px), 780px);
  padding: 28px 0 58px;
}

.intro-copy {
  animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.intro-title {
  max-width: 9.5em;
  margin: 24px 0 26px;
  font-family: var(--serif);
  font-size: clamp(48px, 6.2vw, 88px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.intro-title .accent {
  position: relative;
  z-index: 0;
  color: var(--forest);
  white-space: nowrap;
}

.intro-title .accent::after {
  content: "";
  position: absolute;
  left: 2%;
  right: -2%;
  bottom: 0.02em;
  height: 0.13em;
  border-radius: 999px;
  background: var(--apricot);
  opacity: 0.55;
  z-index: -1;
}

.lede {
  max-width: 34em;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.95;
}

.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 32px;
}

.meta-chips li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  color: var(--ink-soft);
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.42);
}

.meta-chips svg {
  width: 13px;
  height: 13px;
  color: var(--forest);
}

.intro-note {
  max-width: 35em;
  margin-top: 40px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
  border-left: 2px solid var(--apricot);
}

.start-card {
  position: relative;
  padding: 36px;
  border: 1px solid rgba(36, 33, 28, 0.12);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(251, 246, 237, 0.94)),
    var(--card-soft);
  box-shadow: var(--shadow-card);
  transform: rotate(0.6deg);
  animation: fade-up 0.7s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.start-card::before {
  content: "";
  position: absolute;
  inset: 9px;
  pointer-events: none;
  border: 1px solid rgba(36, 33, 28, 0.07);
  border-radius: 25px;
}

.start-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.stamp {
  position: relative;
  display: grid;
  place-content: center;
  width: 86px;
  height: 86px;
  color: var(--forest);
  text-align: center;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
  border: 1px solid var(--forest);
  border-radius: 50%;
  background: rgba(31, 75, 63, 0.03);
  transform: rotate(-8deg);
}

.stamp::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(31, 75, 63, 0.32);
  border-radius: 50%;
}

.stamp small {
  display: block;
  margin-top: 5px;
  font-family: var(--sans);
  font-size: 7px;
  letter-spacing: 0.22em;
}

.edition {
  padding-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
  letter-spacing: 0.18em;
  text-align: right;
}

.start-card h2 {
  margin: 32px 0 10px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.start-card > p {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.85;
}

.start-notice {
  margin-top: 18px;
  padding: 12px 14px;
  color: #6d4122;
  font-size: 11px;
  line-height: 1.8;
  border-left: 3px solid var(--apricot);
  border-radius: 0 10px 10px 0;
  background: rgba(221, 149, 96, 0.13);
}

.start-card .btn-lg {
  margin-top: 18px;
}

.draft-note {
  margin-top: 14px;
  padding: 9px 12px;
  color: #7a4a24;
  font-size: 11px;
  line-height: 1.6;
  border-radius: 10px;
  background: rgba(221, 149, 96, 0.13);
}

.link-btn {
  margin-left: 4px;
  padding: 0;
  color: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  background: transparent;
  cursor: pointer;
}

.card-rule {
  height: 1px;
  margin: 24px 0 16px;
  background: var(--line);
}

.privacy-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.privacy-line svg {
  width: 13px;
  height: 13px;
  margin-top: 2px;
  flex: none;
}

/* --------------------------------------------------------------------------
   答题界面
   -------------------------------------------------------------------------- */

.answer-stage {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: start;
  gap: clamp(36px, 6vw, 72px);
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 0 44px;
}

.progress-rail {
  position: sticky;
  top: 112px;
  padding-top: 30px;
  animation: fade-up 0.5s ease both;
}

.part-name {
  margin-top: 15px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.45;
}

.progress-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 18px 0;
  font-family: var(--serif);
  font-size: 58px;
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.progress-count .total {
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0;
}

.progress-segments {
  display: flex;
  gap: 5px;
  margin: 26px 0;
}

.progress-segment {
  height: 4px;
  flex: 1;
  border-radius: 99px;
  background: rgba(36, 33, 28, 0.11);
  transition: background-color 0.3s ease;
}

.progress-segment.is-done {
  background: var(--forest);
}

.progress-segment.is-now {
  background: var(--apricot);
}

.progress-copy {
  max-width: 16em;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}

.rail-quote {
  margin-top: 56px;
  padding-top: 22px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.9;
  border-top: 1px solid var(--line);
}

.question-card {
  display: flex;
  flex-direction: column;
  min-height: 540px;
  padding: 46px 50px 34px;
  border: 1px solid rgba(36, 33, 28, 0.11);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.88);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.question-section {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.question-section span {
  padding: 3px 8px;
  color: var(--forest);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border: 1px solid rgba(31, 75, 63, 0.2);
  border-radius: 999px;
  background: rgba(31, 75, 63, 0.05);
}

.question-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.question-number {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.required-badge {
  padding: 5px 10px;
  color: #7e481f;
  font-size: 9px;
  letter-spacing: 0.08em;
  border: 1px solid rgba(221, 149, 96, 0.35);
  border-radius: 999px;
  background: rgba(221, 149, 96, 0.14);
}

.required-badge.is-optional {
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
}

.question-title {
  max-width: 19em;
  margin: 20px 0 12px;
  font-family: var(--serif);
  font-size: clamp(28px, 3.1vw, 39px);
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: -0.03em;
}

.question-desc {
  max-width: 36em;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
}

#answerForm {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.field {
  flex: 1;
  margin-top: 4px;
}

.text-input,
.text-area {
  width: 100%;
  padding: 16px 18px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: none;
  background: rgba(255, 255, 255, 0.6);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.text-input::placeholder,
.text-area::placeholder {
  color: #b1a99b;
}

.text-input:focus,
.text-area:focus {
  border-color: var(--forest);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31, 75, 63, 0.09);
}

.text-area {
  min-height: 156px;
  resize: vertical;
}

.text-input.is-underline,
.text-area.is-underline {
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
}

.text-area.is-underline {
  min-height: 120px;
}

.text-input.is-underline:focus,
.text-area.is-underline:focus {
  border-bottom-color: var(--forest);
  background: transparent;
  box-shadow: none;
}

.field.is-invalid .text-input,
.field.is-invalid .text-area {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(162, 59, 44, 0.06);
}

.char-count {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-align: right;
}

.char-count.is-near {
  color: #a5622c;
}

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

.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 62px;
  padding: 14px 17px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.option:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(61, 50, 33, 0.06);
}

.option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.option:has(input:focus-visible) {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

.option-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: none;
  border: 1.5px solid rgba(36, 33, 28, 0.28);
  border-radius: 50%;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.option-mark::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform 0.18s ease;
}

.option-check .option-mark {
  border-radius: 5px;
}

.option-check .option-mark::after {
  width: 9px;
  height: 5px;
  margin-top: -2px;
  border: 0;
  border-left: 1.8px solid #fff;
  border-bottom: 1.8px solid #fff;
  border-radius: 0;
  background: transparent;
  transform: rotate(-45deg) scale(0);
}

.option.is-checked {
  color: #fff;
  border-color: var(--forest);
  background: var(--forest);
  box-shadow: 0 12px 26px rgba(31, 75, 63, 0.2);
}

.option.is-checked .option-mark {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.14);
}

.option.is-checked:not(.option-check) .option-mark::after {
  transform: scale(1);
}

.option.is-checked.option-check .option-mark::after {
  transform: rotate(-45deg) scale(1);
}

.option-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.option-key {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 9px;
  font-weight: 600;
  border-radius: 50%;
  background: rgba(36, 33, 28, 0.06);
}

.option-label {
  flex: 1 1 0;
  min-width: 0;
}

.option.is-checked .option-key {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.option-badge {
  margin-left: auto;
  padding: 3px 8px;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border-radius: 999px;
  background: #c6542f;
  box-shadow: 0 3px 8px rgba(198, 84, 47, 0.22);
}

.option.is-checked .option-badge {
  color: #6d3517;
  background: var(--apricot-soft);
}

.option-extra {
  margin-top: 12px;
  padding: 14px 16px 12px;
  border: 1px solid rgba(31, 75, 63, 0.16);
  border-radius: 14px;
  background: rgba(31, 75, 63, 0.035);
}

.option-extra-label {
  display: block;
  margin-bottom: 4px;
  color: var(--forest);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.option-extra-hint {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.underline-input {
  padding: 8px 2px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
}

.underline-input:focus {
  border-color: var(--forest);
  box-shadow: none;
}

.option.is-disabled {
  cursor: not-allowed;
  opacity: 0.4;
  transform: none;
  box-shadow: none;
}

.option.is-disabled:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.rating-group {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 6px;
}

.rating-btn {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 76px;
  min-width: 52px;
  height: 72px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.rating-btn small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.rating-btn:hover {
  border-color: var(--line-strong);
  background: #fff;
  transform: translateY(-2px);
}

.rating-btn.is-active {
  color: #fff;
  border-color: var(--forest);
  background: var(--forest);
  box-shadow: 0 12px 24px rgba(31, 75, 63, 0.2);
  transform: translateY(-3px);
}

.rating-btn.is-active small {
  color: rgba(255, 255, 255, 0.65);
}

.rating-scale {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}

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

.computed-item {
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.65), rgba(31, 75, 63, 0.035)),
    var(--card-soft);
}

.computed-item > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.computed-item strong {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

.computed-item em {
  margin-left: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.computed-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.required-badge.is-computed {
  color: var(--forest);
  border-color: rgba(31, 75, 63, 0.24);
  background: rgba(31, 75, 63, 0.06);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.actions .btn-primary {
  min-width: 132px;
}

.actions-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.btn-skip {
  padding: 11px 17px;
  color: var(--muted);
  font-size: 12px;
  border-color: var(--line);
  background: transparent;
}

.btn-skip:hover {
  color: var(--ink-soft);
  border-color: var(--line-strong);
  background: rgba(36, 33, 28, 0.04);
}

.field-error,
.submit-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 13px;
  color: var(--danger);
  font-size: 11px;
  line-height: 1.6;
  border: 1px solid rgba(162, 59, 44, 0.18);
  border-radius: 10px;
  background: var(--danger-soft);
}

.field-error::before {
  content: "!";
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 1px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  background: var(--danger);
}

.submit-error {
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 0;
  padding: 12px 14px;
  font-size: 12px;
}

.submit-error button {
  flex: none;
  color: var(--danger);
  font-size: 11px;
  text-decoration: underline;
  background: transparent;
  cursor: pointer;
}

.autosave-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-align: right;
}

.shake {
  animation: shake 0.4s ease;
}

/* --------------------------------------------------------------------------
   成功页
   -------------------------------------------------------------------------- */

.notice-stage {
  display: grid;
  place-items: center;
  min-height: clamp(540px, calc(100vh - 250px), 760px);
  padding: 34px 0 56px;
}

.notice-card {
  width: 100%;
  max-width: 660px;
  padding: 46px 48px 44px;
  text-align: center;
  border: 1px solid rgba(36, 33, 28, 0.11);
  border-radius: 32px;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.notice-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 22px;
  color: var(--forest);
  border: 1px solid rgba(31, 75, 63, 0.2);
  border-radius: 50%;
  background: rgba(31, 75, 63, 0.05);
}

.notice-mark svg {
  width: 28px;
  height: 28px;
}

.notice-card .eyebrow {
  justify-content: center;
}

.notice-card h1 {
  margin: 14px 0 22px;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.notice-message {
  padding: 22px 24px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 2;
  text-align: left;
  border-left: 3px solid var(--apricot);
  border-radius: 0 14px 14px 0;
  background: rgba(221, 149, 96, 0.09);
}

.notice-card .btn {
  margin-top: 28px;
}

.success-stage {
  display: grid;
  place-items: center;
  min-height: clamp(540px, calc(100vh - 250px), 760px);
  padding: 32px 0 56px;
}

.success-card {
  position: relative;
  width: 100%;
  max-width: 660px;
  padding: 58px 54px 48px;
  overflow: hidden;
  text-align: center;
  border: 1px solid rgba(36, 33, 28, 0.11);
  border-radius: 36px;
  background: rgba(255, 253, 249, 0.9);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  animation: card-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.success-card::before {
  content: "";
  position: absolute;
  top: -160px;
  left: 50%;
  width: 420px;
  height: 300px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(221, 149, 96, 0.2), transparent 68%);
  transform: translateX(-50%);
}

.success-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 0 auto 24px;
  color: #fff;
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 10px rgba(31, 75, 63, 0.07);
  animation: pop 0.55s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.success-mark svg {
  width: 28px;
  height: 28px;
}

.success-card .eyebrow {
  justify-content: center;
}

.success-card h1 {
  margin: 15px 0 14px;
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.success-lede {
  max-width: 28em;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.95;
}

.receipt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
  padding: 14px 18px;
  text-align: left;
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.5);
}

.receipt span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.receipt strong {
  flex: 1;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.03em;
}

.copy-btn {
  padding: 5px 10px;
  color: var(--forest);
  font-size: 10px;
  border: 1px solid rgba(31, 75, 63, 0.22);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.copy-btn:hover {
  color: #fff;
  background: var(--forest);
}

.receipt-hint {
  margin-top: 9px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.reward-card {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 420px;
  margin: 26px auto 0;
  padding: 14px 18px;
  text-align: left;
  border: 1px solid rgba(221, 149, 96, 0.42);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(221, 149, 96, 0.16), rgba(255, 253, 249, 0.9));
}

.reward-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  color: #8a4a1e;
  border-radius: 50%;
  background: var(--apricot-soft);
}

.reward-icon svg {
  width: 23px;
  height: 23px;
}

.reward-copy span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.reward-copy strong {
  display: block;
  margin-top: 3px;
  color: #6d3517;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 32px;
}

/* --------------------------------------------------------------------------
   错误页
   -------------------------------------------------------------------------- */

.error-state {
  display: grid;
  place-items: center;
  min-height: 55vh;
  padding: 30px 0;
}

.error-card {
  max-width: 480px;
  padding: 42px 38px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.error-code {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--apricot);
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1;
}

.error-card h1 {
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
}

.error-card p {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   管理后台 · 登录
   -------------------------------------------------------------------------- */

.login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 34px;
}

.login-shell {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  width: 100%;
  max-width: 950px;
  overflow: hidden;
  border: 1px solid rgba(36, 33, 28, 0.12);
  border-radius: 34px;
  background: var(--card);
  box-shadow: 0 40px 110px rgba(45, 38, 27, 0.16);
  animation: card-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 590px;
  padding: 44px 46px;
  overflow: hidden;
  color: #f7f0e4;
  background:
    radial-gradient(500px 300px at 110% 0%, rgba(221, 149, 96, 0.32), transparent 62%),
    linear-gradient(150deg, #245445, #123027 78%);
}

.login-art::before {
  content: "";
  position: absolute;
  right: -150px;
  bottom: -190px;
  width: 470px;
  height: 470px;
  border: 1px solid rgba(247, 240, 228, 0.12);
  border-radius: 50%;
}

.login-art::after {
  content: "";
  position: absolute;
  right: -85px;
  bottom: -125px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(247, 240, 228, 0.09);
  border-radius: 50%;
}

.login-art .brand {
  position: relative;
  z-index: 1;
  color: #f7f0e4;
}

.login-art .brand-mark {
  color: #f7f0e4;
  border-color: rgba(247, 240, 228, 0.28);
  background: rgba(247, 240, 228, 0.07);
}

.login-art .brand-copy small {
  color: rgba(247, 240, 228, 0.55);
}

.art-body {
  position: relative;
  z-index: 1;
  margin: 50px 0;
}

.art-body .eyebrow {
  color: var(--apricot-soft);
}

.art-body h1 {
  max-width: 8em;
  margin: 20px 0 18px;
  font-family: var(--serif);
  font-size: clamp(38px, 4.5vw, 54px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.art-body p {
  max-width: 25em;
  color: rgba(247, 240, 228, 0.62);
  font-size: 12px;
  line-height: 1.9;
}

.art-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  color: rgba(247, 240, 228, 0.42);
  font-size: 9px;
  letter-spacing: 0.14em;
  border-top: 1px solid rgba(247, 240, 228, 0.14);
}

.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 50px 48px;
}

.login-form .eyebrow {
  margin-bottom: 18px;
}

.login-form h2 {
  margin-bottom: 9px;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.login-intro {
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.admin-input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.6);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.admin-input:focus {
  border-color: var(--forest);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31, 75, 63, 0.09);
}

.login-form .btn {
  width: 100%;
  margin-top: 18px;
  padding: 15px 20px;
}

.login-error {
  margin-top: 14px;
  padding: 10px 12px;
  color: var(--danger);
  font-size: 11px;
  line-height: 1.6;
  border: 1px solid rgba(162, 59, 44, 0.18);
  border-radius: 9px;
  background: var(--danger-soft);
}

.login-hint {
  margin-top: 22px;
  padding-top: 18px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.8;
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   管理后台 · 仪表盘
   -------------------------------------------------------------------------- */

.admin-shell {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 40px 72px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(42px, 6vw, 72px);
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  color: var(--forest);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  border: 1px solid rgba(31, 75, 63, 0.18);
  border-radius: 999px;
  background: rgba(31, 75, 63, 0.06);
}

.admin-chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--forest);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.5);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--card);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.admin-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.admin-hero h1 {
  margin: 13px 0 8px;
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.admin-hero p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-actions .btn {
  flex: 0 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 20px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 253, 249, 0.58);
  backdrop-filter: blur(8px);
}

.stat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-label svg {
  width: 13px;
  height: 13px;
  opacity: 0.55;
}

.stat-value {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.stat-value-sm {
  font-size: 30px;
}

.stat-foot {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.55);
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  max-width: 380px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(36, 33, 28, 0.045);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.search-wrap:focus-within {
  border-color: rgba(31, 75, 63, 0.28);
  background: #fff;
}

.search-wrap svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--muted);
}

.search-input {
  width: 100%;
  padding: 2px 0;
  font-size: 12px;
  border: 0;
  outline: none;
  background: transparent;
}

.search-input::placeholder {
  color: var(--muted);
}

.toolbar-count {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.list-head {
  display: grid;
  grid-template-columns: 150px minmax(0, 1.25fr) minmax(0, 0.9fr) 80px 28px;
  gap: 16px;
  padding: 12px 22px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.response-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1.25fr) minmax(0, 0.9fr) 80px 28px;
  gap: 16px;
  align-items: center;
  width: 100%;
  margin-bottom: 8px;
  padding: 15px 22px;
  text-align: left;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.56);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.response-row:hover {
  border-color: var(--line-strong);
  background: var(--card);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(61, 50, 33, 0.07);
}

.time-cell strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.time-cell span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  color: #7c451f;
  font-family: var(--serif);
  font-size: 15px;
  border-radius: 50%;
  background: var(--apricot-soft);
}

.person-copy {
  min-width: 0;
}

.person-name {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-id {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-cell {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.answer-chip {
  max-width: 150px;
  padding: 4px 8px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(31, 75, 63, 0.06);
}

.duration-cell {
  color: var(--ink-soft);
  font-size: 11px;
  white-space: nowrap;
}

.duration-cell span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.arrow-cell {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.arrow-cell svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.response-row:hover .arrow-cell svg {
  transform: translateX(3px);
  color: var(--forest);
}

.empty-state {
  padding: 76px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  background: rgba(255, 253, 249, 0.4);
}

.empty-orbit {
  position: relative;
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.empty-orbit::before,
.empty-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.empty-orbit::before {
  inset: 15px;
  border: 1px dashed rgba(31, 75, 63, 0.3);
}

.empty-orbit::after {
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  background: var(--apricot);
  transform: translate(-50%, -50%);
}

.empty-state h2 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
}

.empty-state p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.empty-state .empty-action {
  margin-top: 18px;
}

.admin-loading {
  display: grid;
  place-items: center;
  min-height: 55vh;
}

/* --------------------------------------------------------------------------
   管理后台 · 详情弹窗
   -------------------------------------------------------------------------- */

.detail-dialog {
  width: calc(100% - 32px);
  max-width: 760px;
  max-height: 86vh;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid rgba(36, 33, 28, 0.12);
  border-radius: 25px;
  background: var(--card);
  box-shadow: 0 40px 110px rgba(25, 30, 26, 0.3);
}

.detail-dialog::backdrop {
  background: rgba(20, 30, 26, 0.5);
  backdrop-filter: blur(4px);
}

.detail-dialog[open] {
  animation: card-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: 86vh;
  padding: 30px 34px 34px;
}

.detail-list {
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
}

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

.dialog-head h2 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.dialog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 8px;
}

.meta-pill {
  padding: 5px 9px;
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: 0.03em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(36, 33, 28, 0.03);
}

.meta-pill.is-code {
  font-family: var(--mono);
}

.detail-item {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.detail-q {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.detail-q-index {
  color: var(--apricot);
  font-family: var(--serif);
  font-size: 12px;
}

.detail-a {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-a.is-empty {
  color: var(--muted);
  font-size: 12px;
}

.detail-a .answer-chip {
  display: inline-block;
  margin: 0 5px 5px 0;
  padding: 5px 10px;
  font-size: 11px;
  white-space: normal;
}

.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   轻提示
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 80;
  padding: 11px 18px;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.04em;
  border-radius: 999px;
  background: var(--forest-deep);
  box-shadow: 0 12px 30px rgba(20, 53, 44, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --------------------------------------------------------------------------
   动画
   -------------------------------------------------------------------------- */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pop {
  0% {
    opacity: 0;
    transform: scale(0.55);
  }
  70% {
    transform: scale(1.06);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-3px);
  }
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1020px) {
  .intro {
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    gap: 40px;
  }

  .start-card {
    padding: 30px;
  }

  .answer-stage {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 34px;
  }

  .question-card {
    padding: 40px 38px 30px;
  }

  .list-head,
  .response-row {
    grid-template-columns: 132px minmax(0, 1.2fr) minmax(0, 0.8fr) 70px 24px;
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .intro {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 20px;
  }

  .intro-title {
    max-width: 11em;
  }

  .start-card {
    max-width: 560px;
    transform: none;
  }

  .answer-stage {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 12px;
  }

  .progress-rail {
    position: static;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 4px 20px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 253, 249, 0.48);
  }

  .progress-rail .eyebrow {
    display: none;
  }

  .part-name {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 14px;
  }

  .progress-count {
    grid-column: 1;
    grid-row: 1 / span 3;
    margin: 0;
    font-size: 38px;
  }

  .progress-segments {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
  }

  .progress-copy {
    grid-column: 2;
    grid-row: 3;
    max-width: none;
    font-size: 10px;
  }

  .rail-quote {
    display: none;
  }

  .question-card {
    min-height: 0;
  }

  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-shell {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .login-art {
    padding: 36px;
    min-height: 540px;
  }

  .login-form {
    padding: 40px 34px;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 20px 22px;
  }

  .site-main {
    padding: 8px 22px 48px;
  }

  .site-footer {
    padding: 20px 22px 28px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .intro {
    padding-bottom: 36px;
  }

  .intro-title {
    margin: 20px 0 22px;
    font-size: clamp(42px, 12vw, 62px);
  }

  .lede {
    font-size: 14px;
  }

  .intro-note {
    margin-top: 30px;
  }

  .question-card {
    padding: 28px 22px 24px;
    border-radius: 24px;
  }

  .question-title {
    margin-top: 16px;
    font-size: clamp(25px, 7vw, 32px);
  }

  .question-desc {
    margin-bottom: 24px;
  }

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

  .option {
    min-height: 56px;
  }

  .actions {
    margin-top: 26px;
  }

  .actions-right {
    flex: 1;
  }

  .actions .btn-primary {
    flex: 1;
  }

  .actions .btn-ghost {
    padding-inline: 14px;
  }

  .btn-skip {
    padding: 11px 12px;
    font-size: 11px;
  }

  .question-section {
    margin-bottom: 14px;
  }

  .notice-card {
    padding: 36px 24px 32px;
    border-radius: 24px;
  }

  .notice-message {
    padding: 16px 16px;
    font-size: 13px;
    line-height: 1.9;
  }

  .computed-item {
    padding: 16px 14px;
  }

  .computed-item strong {
    font-size: 34px;
  }

  .success-card {
    padding: 44px 24px 38px;
    border-radius: 26px;
  }

  .receipt {
    flex-wrap: wrap;
  }

  .receipt strong {
    order: 3;
    flex-basis: 100%;
  }

  .login-screen {
    padding: 18px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .login-art {
    min-height: 0;
    padding: 28px 30px;
  }

  .art-body {
    margin: 32px 0 24px;
  }

  .art-body h1 {
    max-width: 10em;
    font-size: 34px;
  }

  .art-body p {
    display: none;
  }

  .art-meta {
    padding-top: 14px;
  }

  .login-form {
    padding: 32px 28px 34px;
  }

  .admin-shell {
    padding: 20px 22px 56px;
  }

  .admin-header {
    margin-bottom: 40px;
  }

  .admin-header .admin-chip {
    display: none;
  }

  .admin-hero h1 {
    font-size: 44px;
  }

  .admin-actions {
    width: 100%;
  }

  .admin-actions .btn {
    flex: 1;
  }

  .list-head {
    display: none;
  }

  .response-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px 14px;
    padding: 16px 17px;
  }

  .time-cell {
    grid-column: 1;
    grid-row: 1;
  }

  .person-cell {
    grid-column: 1;
    grid-row: 2;
  }

  .preview-cell {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .duration-cell {
    display: none;
  }

  .arrow-cell {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .search-wrap {
    max-width: none;
  }

  .toolbar-count {
    padding-left: 2px;
  }

  .dialog-inner {
    padding: 24px 20px 26px;
  }

  .dialog-head h2 {
    font-size: 25px;
  }
}

@media (max-width: 520px) {
  .header-meta {
    display: none;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .intro-title {
    font-size: 42px;
  }

  .meta-chips {
    gap: 6px;
  }

  .meta-chips li {
    padding: 7px 10px;
    font-size: 10px;
  }

  .start-card {
    padding: 26px;
  }

  .stamp {
    width: 74px;
    height: 74px;
    font-size: 26px;
  }

  .start-card h2 {
    margin-top: 26px;
    font-size: 25px;
  }

  .question-card {
    padding: 25px 18px 21px;
  }

  .question-top {
    gap: 8px;
  }

  .rating-btn {
    height: 62px;
    font-size: 21px;
    border-radius: 12px;
  }

  .rating-scale {
    font-size: 9px;
  }

  .actions {
    gap: 8px;
  }

  .actions .btn {
    padding: 12px 16px;
    font-size: 12px;
  }

  .stats-grid {
    gap: 8px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 30px;
  }

  .admin-actions .btn {
    padding: 11px 14px;
    font-size: 12px;
  }

  .admin-hero h1 {
    font-size: 38px;
  }

  .login-art {
    padding: 24px;
  }

  .login-form {
    padding: 28px 22px 30px;
  }

  .login-form h2 {
    font-size: 28px;
  }
}

@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;
  }
}
