/* ============================================================
   读者页样式 · 深夜催眠主题 · 手机优先
   深蓝黑底 + 暖米色衬线文字 + 缓慢动效
   ============================================================ */

:root {
  color-scheme: dark;
  --night: #0b0e14;            /* 页面底色：深夜蓝黑 */
  --night-high: #10141d;       /* 略浅一度（渐变顶部） */
  --panel: #131824;            /* 卡片 / 聊天容器底 */
  --panel-soft: #171d2b;       /* 再浅一度（气泡、引用底） */
  --cream: #e8dcc3;            /* 正文暖米色（烛光感） */
  --cream-soft: #c3b697;       /* 次要文字 */
  --cream-faint: #8d8268;      /* 弱文字 */
  --gold: #c9a86a;             /* 低饱和暖金强调 */
  --gold-deep: #a88750;
  --gold-glow: rgba(201, 168, 106, .22);
  --line: rgba(232, 220, 195, .16);   /* 细边框 */
  --line-soft: rgba(232, 220, 195, .09);
  --bubble-me: rgba(201, 168, 106, .17);  /* 读者气泡底 */
  --danger: #cf8a7a;           /* 柔和暖红 */
  --serif: "Noto Serif SC", "Source Han Serif SC", "STSong", "Songti SC", "SimSun", serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  background-image: linear-gradient(180deg, var(--night-high) 0%, var(--night) 320px);
  color: var(--cream);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 2.05;
  min-height: 100vh;
}

.hidden { display: none !important; }

button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(201, 168, 106, .14);
}
button:disabled { cursor: default; }

img, video { color-scheme: dark; }

/* 呼吸光晕（继续/解锁类按钮共用） */
@keyframes breathGlow {
  0%, 100% { box-shadow: 0 0 6px 0 var(--gold-glow); opacity: .82; }
  50%      { box-shadow: 0 0 22px 4px var(--gold-glow); opacity: 1; }
}

/* 缓缓浮现 */
@keyframes slowRise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.fade-in { animation: slowRise 1.25s ease-out both; }

/* ---------------- 加载中 ---------------- */

.view-loading {
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--cream-faint);
  font-size: 15px;
  letter-spacing: .12em;
}
.loading-mark {
  font-size: 30px;
  color: var(--gold);
  opacity: .6;
  animation: breatheMark 2.4s ease-in-out infinite;
  margin-bottom: 8px;
}
@keyframes breatheMark {
  0%, 100% { opacity: .28; transform: scale(.96); }
  50%      { opacity: .8;  transform: scale(1.05); }
}

/* ---------------- 输码页 ---------------- */

.view-unlock {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.unlock-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .45);
  padding: 46px 30px 40px;
  text-align: center;
  animation: slowRise 1.1s ease-out both;
}

.unlock-deco {
  color: var(--gold);
  font-size: 26px;
  opacity: .7;
  margin-bottom: 16px;
}

/* 「你即将阅读《X》」抬头（带链接进入时） */
.unlock-meta {
  margin: 0 0 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
}
.unlock-meta-lead {
  color: var(--cream-faint);
  font-size: 13px;
  letter-spacing: .28em;
  text-indent: .28em;
  margin: 0 0 10px;
}
.unlock-meta-title {
  color: var(--cream);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.6;
  margin: 0;
}
.unlock-meta-title::before { content: "《"; color: var(--gold); }
.unlock-meta-title::after  { content: "》"; color: var(--gold); }
.unlock-meta-intro {
  color: var(--cream-soft);
  font-size: 14px;
  line-height: 1.9;
  margin: 10px 0 0;
  max-height: 5.7em;
  overflow: hidden;
}

.unlock-title {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.7;
  color: var(--cream);
  margin: 0 0 12px;
}

.unlock-sub {
  color: var(--cream-faint);
  font-size: 14px;
  letter-spacing: .06em;
  line-height: 1.9;
  margin: 0 0 32px;
}

.code-input {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  font-size: 19px;
  font-family: "Consolas", "Menlo", monospace;
  text-align: center;
  letter-spacing: .18em;
  color: var(--cream);
  background: var(--night);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color .3s, box-shadow .3s;
}
.code-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.code-input::placeholder {
  letter-spacing: .05em;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--cream-faint);
}

.btn-unlock {
  display: block;
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  font-size: 17px;
  letter-spacing: .4em;
  text-indent: .4em;
  color: var(--night);
  background: var(--gold);
  border: none;
  border-radius: 10px;
  transition: background .3s, transform .1s;
  animation: breathGlow 3.6s ease-in-out infinite;
}
.btn-unlock:not(:disabled):active { transform: scale(.98); background: var(--gold-deep); }
.btn-unlock:disabled { opacity: .55; animation: none; }

.unlock-error {
  min-height: 1.6em;
  margin: 14px 0 0;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.7;
}

/* ---------------- 链接无效 / 故事不存在 ---------------- */

.view-invalid {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}
.invalid-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: slowRise 1.1s ease-out both;
}
.invalid-deco {
  color: var(--gold);
  font-size: 30px;
  opacity: .55;
  margin-bottom: 20px;
  animation: breatheMark 2.4s ease-in-out infinite;
}
.invalid-text {
  color: var(--cream-soft);
  font-size: 16px;
  line-height: 2.0;
  letter-spacing: .06em;
  margin: 0;
}

/* ---------------- 阅读页框架 ---------------- */

.reader-top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 14, 20, .88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
  padding: 13px 56px;   /* 左右留出换卡密角标位置，标题仍视觉居中 */
}
.top-title {
  font-size: 13px;
  letter-spacing: .22em;
  color: var(--cream-faint);
}

/* 换卡密：顶栏右下角低存在感入口，不打扰阅读 */
.switch-card {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  min-height: 44px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--cream-faint);
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  opacity: .6;
  transition: opacity .3s, color .3s, border-color .3s;
}
.switch-card:active {
  opacity: 1;
  color: var(--gold);
  border-color: rgba(201, 168, 106, .4);
}
@media (hover: hover) {
  .switch-card:hover { opacity: 1; color: var(--cream-soft); }
}

.stream {
  max-width: 640px;
  margin: 0 auto;
  padding: 38px 22px 90px;
}

/* 翻页过渡：整页淡出 */
.page-leave {
  animation: pageFade .5s ease-in both;
  pointer-events: none;
}
@keyframes pageFade {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ---------------- 故事头 ---------------- */

.story-head { text-align: center; margin-bottom: 40px; }
.story-cover {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  filter: brightness(.88);
  margin-bottom: 22px;
}
.story-title {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.6;
  color: var(--cream);
  margin: 0 0 10px;
}
.story-intro {
  color: var(--cream-soft);
  font-size: 15px;
  line-height: 2.0;
  margin: 0 auto;
  max-width: 480px;
}
.story-ornament {
  color: var(--gold);
  opacity: .55;
  font-size: 18px;
  margin-top: 22px;
  letter-spacing: .5em;
  text-indent: .5em;
}

/* ---------------- 小说式内容流 ---------------- */

.item {
  margin-bottom: 2.6em;
  scroll-margin-top: 64px;
}

.node-text p {
  margin: 0 0 1.2em;
  font-size: 17px;
  line-height: 2.05;
  letter-spacing: .03em;
  text-align: justify;
  color: var(--cream);
}
.node-text p:last-child { margin-bottom: 0; }

.node-media { margin: 16px 0 6px; }
.node-media img,
.node-media video {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: #05070b;
  filter: brightness(.9);
}
.node-media audio {
  display: block;
  width: 100%;
  border-radius: 10px;
  background: var(--panel);
  padding: 6px;
}
.node-media .media-dark {
  background: var(--panel);
  border-radius: 12px;
  padding: 8px;
  border: 1px solid var(--line-soft);
}
.node-media .media-dark video { border: none; border-radius: 8px; }
.node-media .media-dark audio { padding: 0; border-radius: 6px; }

/* 题目节点：左侧一缕暖光 */
.item-question .node-text {
  border-left: 2px solid rgba(201, 168, 106, .55);
  padding-left: 16px;
}

/* ---------------- 轻点继续 ---------------- */

.continue-wrap { text-align: center; margin-top: 26px; }
.btn-continue {
  min-height: 48px;
  padding: 10px 38px;
  font-size: 16px;
  letter-spacing: .14em;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(201, 168, 106, .45);
  border-radius: 999px;
  transition: background .3s, border-color .3s;
  animation: breathGlow 3.6s ease-in-out infinite;
}
.btn-continue:not(:disabled):active {
  background: rgba(201, 168, 106, .14);
  border-color: var(--gold);
}
.btn-continue:disabled { opacity: .5; animation: none; }

/* ---------------- 选择题（幽灵按钮） ---------------- */

.options { margin-top: 20px; }

.opt {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-bottom: 12px;
  padding: 11px 18px;
  font-size: 16px;
  line-height: 1.8;
  text-align: left;
  color: var(--cream);
  background: transparent;
  border: 1px solid rgba(232, 220, 195, .28);
  border-radius: 12px;
  transition: border-color .3s, background .3s, box-shadow .3s, transform .1s;
  position: relative;
}
.opt:last-child { margin-bottom: 0; }
.opt:not(:disabled):active {
  transform: scale(.985);
  background: rgba(201, 168, 106, .12);
  border-color: rgba(201, 168, 106, .6);
  box-shadow: 0 0 18px 2px var(--gold-glow);
}

.opt-chosen {
  border-color: rgba(201, 168, 106, .7) !important;
  background: rgba(201, 168, 106, .13) !important;
  color: var(--gold);
}
.opt-chosen .opt-check {
  float: right;
  color: var(--gold);
  margin-left: 10px;
}
.opt-muted { opacity: .38; }
.opt:disabled { cursor: default; }

.answer-fallback {
  margin-top: 12px;
  color: var(--gold);
  font-size: 15px;
}

/* ---------------- 填空题 ---------------- */

.input-form { margin-top: 20px; }

.input-textarea {
  display: block;
  width: 100%;
  min-height: 110px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.9;
  color: var(--cream);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  resize: vertical;
  transition: border-color .3s, box-shadow .3s;
}
.input-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.input-textarea::placeholder { color: var(--cream-faint); }

.btn-submit {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  font-size: 16px;
  letter-spacing: .3em;
  text-indent: .3em;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(201, 168, 106, .5);
  border-radius: 12px;
  transition: background .3s, transform .1s;
}
.btn-submit:not(:disabled):active { background: rgba(201, 168, 106, .12); transform: scale(.99); }
.btn-submit:disabled { opacity: .5; }

.answer-quote {
  margin-top: 16px;
  padding: 12px 18px;
  background: var(--panel-soft);
  border-left: 2px solid rgba(201, 168, 106, .55);
  border-radius: 0 10px 10px 0;
  color: var(--cream-soft);
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}
.answer-quote::before {
  content: "你写下：";
  display: block;
  font-size: 13px;
  color: var(--cream-faint);
  margin-bottom: 4px;
}

/* ---------------- 聊天式区块 ---------------- */

.chat-block {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 18px 14px 16px;
  margin-bottom: 2.6em;
}

.chat-speaker {
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--cream-faint);
  margin: 10px 6px 4px;
}
.chat-speaker:first-child { margin-top: 0; }

.bubble-row {
  display: flex;
  margin: 8px 0;
}
.bubble-row.left { justify-content: flex-start; }
.bubble-row.right { justify-content: flex-end; }

.bubble {
  max-width: 82%;
  padding: 9px 14px;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: .02em;
  word-break: break-word;
  white-space: pre-wrap;
}
.bubble-left {
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  color: var(--cream);
  border-radius: 4px 16px 16px 16px;
}
.bubble-right {
  background: var(--bubble-me);
  border: 1px solid rgba(201, 168, 106, .3);
  color: var(--cream);
  border-radius: 16px 4px 16px 16px;
}

/* 气泡弹出 */
@keyframes bubblePop {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.bubble-pop { animation: bubblePop .2s ease-out both; }

/* 媒体气泡 */
.bubble-media {
  padding: 6px;
  width: 82%;
}
.bubble-media img,
.bubble-media video {
  display: block;
  width: 100%;
  border-radius: 12px;
  background: #05070b;
  filter: brightness(.9);
}
.bubble-media audio {
  display: block;
  width: 100%;
  min-width: 200px;
}

/* 正在输入…（三点动画） */
.typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
  border-radius: 4px 16px 16px 16px;
  padding: 13px 16px;
  min-height: 20px;
}
.typing .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cream-faint);
  animation: typingDot 1.1s ease-in-out infinite;
}
.typing .dot:nth-child(2) { animation-delay: .18s; }
.typing .dot:nth-child(3) { animation-delay: .36s; }
@keyframes typingDot {
  0%, 60%, 100% { opacity: .3; transform: translateY(0); }
  30%           { opacity: 1;  transform: translateY(-3px); }
}

/* 快捷回复气泡组 */
.chat-quick {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.quick-opt {
  min-height: 44px;
  max-width: 82%;
  padding: 9px 18px;
  font-size: 15.5px;
  line-height: 1.7;
  text-align: left;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(201, 168, 106, .45);
  border-radius: 16px 4px 16px 16px;
  transition: background .3s, box-shadow .3s, transform .1s;
}
.quick-opt:not(:disabled):active {
  transform: scale(.97);
  background: rgba(201, 168, 106, .13);
  box-shadow: 0 0 16px 2px var(--gold-glow);
}
.quick-opt:disabled { opacity: .45; }

/* 聊天输入条 */
.chat-inputbar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.chat-textarea {
  flex: 1;
  min-height: 44px;
  max-height: 130px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--cream);
  background: var(--night);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  resize: none;
  transition: border-color .3s, box-shadow .3s;
}
.chat-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.chat-textarea::placeholder { color: var(--cream-faint); }
.btn-send {
  min-width: 72px;
  min-height: 44px;
  padding: 9px 16px;
  font-size: 15px;
  letter-spacing: .12em;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(201, 168, 106, .5);
  border-radius: 14px;
  transition: background .3s, transform .1s;
}
.btn-send:not(:disabled):active { background: rgba(201, 168, 106, .12); transform: scale(.97); }
.btn-send:disabled { opacity: .45; }

/* 聊天内重试控件 */
.chat-retry-wrap { text-align: center; margin-top: 14px; }
.btn-chat-retry {
  min-height: 44px;
  padding: 9px 32px;
  font-size: 15px;
  letter-spacing: .14em;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(201, 168, 106, .45);
  border-radius: 999px;
  transition: background .3s;
  animation: breathGlow 3.6s ease-in-out infinite;
}
.btn-chat-retry:not(:disabled):active { background: rgba(201, 168, 106, .13); }
.btn-chat-retry:disabled { opacity: .5; animation: none; }

/* ---------------- 完结区 ---------------- */

.end-card {
  text-align: center;
  margin-top: 52px;
  padding-top: 38px;
  border-top: 1px solid var(--line-soft);
}
.end-text {
  text-align: justify;
  margin-bottom: 26px;
}
.end-text p {
  margin: 0 0 1.2em;
  font-size: 17px;
  line-height: 2.05;
  letter-spacing: .03em;
  color: var(--cream);
}
.end-text p:last-child { margin-bottom: 0; }
.end-deco {
  color: var(--gold);
  opacity: .65;
  font-size: 24px;
  letter-spacing: .3em;
  text-indent: .3em;
}
.end-card.end-has-text.fade-in .end-deco { animation: slowRise 1.2s ease-out .9s both; }

/* ---------------- 轻提示 ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 100;
  max-width: 86vw;
  padding: 10px 22px;
  background: rgba(23, 29, 43, .96);
  border: 1px solid var(--line-soft);
  color: var(--cream);
  font-size: 14px;
  line-height: 1.7;
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  animation: slowRise .35s ease-out both;
  word-break: break-word;
}
.toast-err { color: var(--danger); }

/* ---------------- 书架（通用卡：验证后自选故事） ---------------- */

.view-shelf {
  min-height: 100vh;
  padding: 0 0 90px;
}

.shelf-head {
  position: relative;
  text-align: center;
  padding: 52px 60px 26px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 30px;
  animation: slowRise 1.1s ease-out both;
}
.shelf-deco {
  color: var(--gold);
  font-size: 26px;
  opacity: .7;
  margin-bottom: 14px;
}
.shelf-title {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: .18em;
  text-indent: .18em;
  color: var(--cream);
  margin: 0 0 10px;
}
.shelf-sub {
  color: var(--cream-faint);
  font-size: 14px;
  letter-spacing: .08em;
  line-height: 1.9;
  margin: 0;
}

/* 书架换卡密：右上角低存在感入口 */
.shelf-switch {
  position: absolute;
  top: 16px;
  right: 14px;
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--cream-faint);
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  opacity: .7;
  transition: opacity .3s, color .3s, border-color .3s;
}
.shelf-switch:active { opacity: 1; color: var(--gold); border-color: rgba(201, 168, 106, .4); }
@media (hover: hover) {
  .shelf-switch:hover { opacity: 1; color: var(--cream-soft); }
}

.shelf-grid {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* 故事卡片：封面 + 标题 + 简介，整卡可点 */
.shelf-card {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  color: var(--cream);
  transition: border-color .3s, background .3s, box-shadow .3s, transform .1s;
}
.shelf-card:not(:disabled):active {
  transform: scale(.99);
  border-color: rgba(201, 168, 106, .5);
  background: var(--panel-soft);
  box-shadow: 0 0 18px 2px var(--gold-glow);
}
.shelf-card:disabled { opacity: .5; cursor: default; }
@media (hover: hover) {
  .shelf-card:not(:disabled):hover { border-color: rgba(201, 168, 106, .4); }
}

.shelf-cover {
  flex: 0 0 84px;
  width: 84px;
  height: 112px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: #05070b;
}
.shelf-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.88);
}
.shelf-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--panel-soft), var(--night));
}
.shelf-cover-mark { color: var(--gold); opacity: .5; font-size: 26px; }

.shelf-card-body {
  flex: 1;
  min-width: 0;
  padding: 4px 2px;
  display: flex;
  flex-direction: column;
}
.shelf-card-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.5;
  color: var(--cream);
  margin: 0 0 8px;
}
.shelf-card-intro {
  color: var(--cream-soft);
  font-size: 14px;
  line-height: 1.75;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* 书架空状态 / 加载失败 */
.shelf-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--cream-faint);
  font-size: 15px;
  line-height: 2.0;
  letter-spacing: .06em;
  padding: 40px 10px;
}
.shelf-empty-line { margin: 0 0 16px; }
.btn-shelf-retry {
  min-height: 44px;
  padding: 9px 28px;
  font-size: 15px;
  letter-spacing: .14em;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(201, 168, 106, .45);
  border-radius: 999px;
  transition: background .3s;
}
.btn-shelf-retry:active { background: rgba(201, 168, 106, .13); }

/* 阅读页「返回书架」：顶栏左上角，仅通用卡读者显示 */
.back-shelf {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  min-height: 44px;
  padding: 0 12px 0 10px;
  display: inline-flex;
  align-items: center;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--cream-faint);
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  opacity: .6;
  transition: opacity .3s, color .3s, border-color .3s;
}
.back-shelf::before { content: "\2190\00a0"; }
.back-shelf:active { opacity: 1; color: var(--gold); border-color: rgba(201, 168, 106, .4); }
@media (hover: hover) {
  .back-shelf:hover { opacity: 1; color: var(--cream-soft); }
}

/* ---------------- 桌面端微调 ---------------- */

@media (min-width: 700px) {
  .stream { padding: 48px 24px 110px; }
  .story-title { font-size: 30px; }
  .unlock-card { padding: 54px 44px 46px; }
  .bubble, .bubble-media { max-width: 74%; }
  .shelf-grid { grid-template-columns: 1fr 1fr; gap: 18px; padding: 0 24px; }
  .shelf-title { font-size: 28px; }
}

/* ---------------- 动效降级 ---------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .fade-in, .bubble-pop, .page-leave, .unlock-card,
  .invalid-card, .invalid-deco { animation: none !important; }
  .typing { display: none !important; }
}

/* ============================================================
   夜语 App 壳 · 底部导航 · 迷你条 · 音频播放器 · 聊天板块（v5）
   沿用既有深夜主题变量（--night/--cream/--gold 一挂）
   ============================================================ */

:root {
  --nav-h: 56px;
  --mini-h: 60px;
}

/* ---------------- 卡密门品牌 / 链接无效入口 ---------------- */

.gate-brand {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .55em;
  text-indent: .55em;
  color: var(--gold);
  opacity: .92;
  margin: 2px 0 20px;
}

.btn-invalid-enter {
  margin-top: 30px;
  min-height: 44px;
  padding: 9px 28px;
  font-size: 14px;
  letter-spacing: .14em;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(201, 168, 106, .45);
  border-radius: 999px;
  transition: background .3s;
}
.btn-invalid-enter:active { background: rgba(201, 168, 106, .13); }
@media (hover: hover) {
  .btn-invalid-enter:hover { border-color: rgba(201, 168, 106, .6); }
}

/* ---------------- 壳骨架 ---------------- */

.shell { min-height: 100vh; }
#night-audio { display: none; }

/* 板块容器：隐藏板块 display:none，互不影响；书架/阅读视图沿用既有 class */
.story-shelf {
  min-height: 60vh;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
body.mini-on .story-shelf {
  padding-bottom: calc(72px + var(--mini-h) + env(safe-area-inset-bottom));
}
body.mini-on .stream { padding-bottom: calc(96px + var(--mini-h)); }

/* ---------------- 底部固定导航 ---------------- */

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: flex;
  background: rgba(11, 14, 20, .94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-soft);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-btn {
  position: relative;
  flex: 1 1 0;
  min-height: var(--nav-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 0 5px;
  color: var(--cream-faint);
  background: transparent;
  border: none;
  transition: color .3s;
}
.nav-ico { width: 24px; height: 24px; display: block; }
.nav-label { font-size: 11px; letter-spacing: .16em; text-indent: .16em; }
.nav-btn.is-active { color: var(--gold); }
.nav-btn:active { color: var(--cream-soft); }
.companion-unread-badge {
  position: absolute;
  top: 5px;
  left: calc(50% + 8px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid #0b0e14;
  border-radius: 9px;
  color: #fff;
  background: #d94b4b;
  font: 600 10px/13px sans-serif;
  text-align: center;
  letter-spacing: 0;
  box-sizing: border-box;
  pointer-events: none;
}
@media (hover: hover) {
  .nav-btn:not(.is-active):hover { color: var(--cream-soft); }
}

/* ---------------- 播放/暂停图标切换（迷你条 + 大按钮共用） ---------------- */

.ico { display: inline-flex; align-items: center; justify-content: center; }
.ico svg { width: 100%; height: 100%; display: block; }
.mini-play .ico-pause,
.ap-play .ico-pause { display: none; }
.mini-play.is-playing .ico-play,
.ap-play.is-playing .ico-play { display: none; }
.mini-play.is-playing .ico-pause,
.ap-play.is-playing .ico-pause { display: inline-flex; }

/* ---------------- 全局迷你播放条 ---------------- */

.mini-bar {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--mini-h);
  padding: 0 12px;
  background: rgba(19, 24, 36, .97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-soft);
}
.mini-open {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 0;
  text-align: left;
  color: var(--cream);
  background: transparent;
  border: none;
}
.mini-cover {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: #05070b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mini-cover-img { width: 100%; height: 100%; object-fit: cover; }
.mini-cover-mark { color: var(--gold); opacity: .5; font-size: 18px; }
.mini-text { flex: 1; min-width: 0; }
.mini-title {
  font-size: 14px;
  color: var(--cream);
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-play {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(201, 168, 106, .4);
  border-radius: 999px;
  transition: background .3s;
}
.mini-play .ico { width: 20px; height: 20px; }
.mini-play:active { background: rgba(201, 168, 106, .14); }

/* ---------------- 音频列表 ---------------- */

.audio-list { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
body.mini-on .audio-list { padding-bottom: calc(72px + var(--mini-h) + env(safe-area-inset-bottom)); }

.audio-head {
  text-align: center;
  padding: 48px 24px 22px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 24px;
  animation: slowRise 1.1s ease-out both;
}
.audio-head-deco { color: var(--gold); font-size: 26px; opacity: .7; margin-bottom: 14px; }
.audio-head-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: .18em;
  text-indent: .18em;
  color: var(--cream);
  margin: 0 0 10px;
}
.audio-head-sub { color: var(--cream-faint); font-size: 14px; letter-spacing: .08em; margin: 0; }

.audio-grid {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.audio-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  text-align: left;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  color: var(--cream);
  transition: border-color .3s, background .3s, box-shadow .3s, transform .1s;
}
.audio-row:active {
  transform: scale(.99);
  border-color: rgba(201, 168, 106, .5);
  background: var(--panel-soft);
  box-shadow: 0 0 18px 2px var(--gold-glow);
}
@media (hover: hover) {
  .audio-row:hover { border-color: rgba(201, 168, 106, .4); }
}
.audio-cover {
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: #05070b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.audio-cover img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.9); }
.audio-cover-empty { background: linear-gradient(160deg, var(--panel-soft), var(--night)); }
.audio-cover-mark { color: var(--gold); opacity: .5; font-size: 22px; }
.audio-row-body { flex: 1; min-width: 0; }
.audio-row-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.4;
  margin: 0 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.audio-row-meta { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--cream-faint); }
.audio-dur { letter-spacing: .05em; font-variant-numeric: tabular-nums; }
.audio-mark { color: var(--cream-soft); }
.audio-mark.is-finished { color: var(--gold); }
.audio-row-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.audio-tag {
  font-size: 11px;
  color: var(--cream-faint);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 2px 9px;
  letter-spacing: .05em;
}

.audio-empty {
  text-align: center;
  color: var(--cream-faint);
  font-size: 15px;
  line-height: 2.0;
  letter-spacing: .06em;
  padding: 42px 20px;
}
.audio-empty-line { margin: 0 0 16px; }

/* ---------------- 音频播放视图 ---------------- */

.audio-play {
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 24px calc(80px + env(safe-area-inset-bottom));
  text-align: center;
}
body.mini-on .audio-play { padding-bottom: calc(80px + var(--mini-h) + env(safe-area-inset-bottom)); }

.ap-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  margin-bottom: 4px;
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--cream-faint);
  background: transparent;
  border: none;
}
.ap-back:active { color: var(--gold); }
@media (hover: hover) { .ap-back:hover { color: var(--cream-soft); } }

.ap-cover {
  width: min(72vw, 300px);
  height: min(72vw, 300px);
  margin: 8px auto 26px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, var(--panel-soft), var(--night));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .5);
}
.ap-cover-img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.92); }
.ap-cover-mark { color: var(--gold); opacity: .5; font-size: 62px; }

.ap-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: .06em;
  line-height: 1.5;
  margin: 0 0 8px;
}
.ap-loop {
  display: inline-block;
  font-size: 11px;
  color: var(--gold);
  border: 1px solid rgba(201, 168, 106, .4);
  border-radius: 999px;
  padding: 2px 12px;
  letter-spacing: .1em;
  margin-bottom: 12px;
}
.ap-intro {
  color: var(--cream-soft);
  font-size: 14px;
  line-height: 1.9;
  margin: 0 auto 14px;
  max-width: 420px;
}
.ap-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 18px; }

.ap-progress { margin: 12px 0 4px; }
.ap-seek {
  width: 100%;
  height: 26px;
  accent-color: var(--gold);
  cursor: pointer;
  background: transparent;
}
.ap-seek::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: rgba(232, 220, 195, .18); }
.ap-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}
.ap-seek::-moz-range-track { height: 4px; border-radius: 999px; background: rgba(232, 220, 195, .18); }
.ap-seek::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--gold); }
.ap-seek::-moz-range-thumb { width: 16px; height: 16px; border: none; border-radius: 50%; background: var(--gold); }
.ap-time {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--cream-faint);
  letter-spacing: .05em;
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
}

.ap-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin: 24px 0 10px;
}
.ap-skip {
  position: relative;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream-soft);
  background: transparent;
  border: none;
  transition: color .3s;
}
.ap-skip .ico { width: 32px; height: 32px; }
.ap-skip-num {
  position: absolute;
  top: 53%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.ap-skip:active { color: var(--gold); }
.ap-play {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--night);
  background: var(--gold);
  border: none;
  box-shadow: 0 0 26px var(--gold-glow);
  transition: background .3s, transform .1s;
}
.ap-play .ico { width: 32px; height: 32px; }
.ap-play:active { background: var(--gold-deep); transform: scale(.97); }

.ap-sleep {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.ap-sleep-label {
  display: block;
  font-size: 12px;
  color: var(--cream-faint);
  letter-spacing: .18em;
  text-indent: .18em;
  margin-bottom: 14px;
}
.ap-sleep-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.ap-sleep-btn {
  min-height: 44px;
  min-width: 58px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--cream-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color .3s, border-color .3s, background .3s;
}
.ap-sleep-btn.is-active {
  color: var(--gold);
  border-color: rgba(201, 168, 106, .6);
  background: rgba(201, 168, 106, .1);
}
.ap-sleep-btn:active { background: rgba(201, 168, 106, .12); }
.ap-sleep-cd {
  display: block;
  margin-top: 12px;
  min-height: 1.3em;
  font-size: 13px;
  color: var(--gold);
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
}

/* ---------------- AI 伴侣板块 ---------------- */

#board-chat {
  position: relative;
  height: calc(100vh - var(--nav-h) - env(safe-area-inset-bottom));
  height: calc(100dvh - var(--nav-h) - env(safe-area-inset-bottom));
}
body.mini-on #board-chat {
  height: calc(100vh - var(--nav-h) - var(--mini-h) - env(safe-area-inset-bottom));
  height: calc(100dvh - var(--nav-h) - var(--mini-h) - env(safe-area-inset-bottom));
}
.companion-shell {
  width: min(100%, 760px);
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  background: rgba(11, 14, 20, .7);
}
.companion-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-height: 66px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(16, 20, 29, .96);
}
.companion-persona {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.companion-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201, 168, 106, .42);
  border-radius: 50%;
  color: var(--gold);
  background: var(--panel);
  font-size: 16px;
}
.companion-persona-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.companion-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--cream);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}
.companion-status { color: var(--cream-faint); font-size: 11px; letter-spacing: 0; }
.companion-status.is-online { color: #8fb7a3; }
.companion-conversation { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.companion-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 16px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(232, 220, 195, .18) transparent;
}
.companion-message-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0 0 14px;
}
.companion-message-row.is-user { justify-content: flex-end; }
.companion-message-bubble {
  max-width: min(82%, 560px);
  padding: 10px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--cream);
  background: var(--panel-soft);
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.companion-message-row.is-user .companion-message-bubble {
  color: #f0e6d2;
  background: var(--bubble-me);
  border-color: rgba(201, 168, 106, .24);
}
.companion-message-time {
  display: block;
  margin-top: 3px;
  color: var(--cream-faint);
  font-family: sans-serif;
  font-size: 10px;
  line-height: 1.2;
}
.companion-message-row.is-user .companion-message-time { text-align: right; }
.companion-message-bubble.is-streaming::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 1em;
  margin-left: 4px;
  vertical-align: -.15em;
  background: var(--gold);
  animation: companionBlink 1s steps(1) infinite;
}
@keyframes companionBlink { 50% { opacity: 0; } }
.companion-empty {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.companion-empty-deco {
  color: var(--gold);
  font-size: 30px;
  opacity: .55;
  margin-bottom: 18px;
  animation: breatheMark 2.4s ease-in-out infinite;
}
.companion-empty-text {
  color: var(--cream-faint);
  font-size: 15px;
  letter-spacing: .08em;
  line-height: 2;
  margin: 0;
}
.companion-inline-empty {
  padding: 46px 18px;
  color: var(--cream-faint);
  text-align: center;
  font-size: 14px;
  letter-spacing: 0;
}
.companion-compose {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: end;
  gap: 9px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-soft);
  background: rgba(16, 20, 29, .97);
}
.companion-input {
  display: block;
  width: 100%;
  min-height: 44px;
  max-height: 132px;
  resize: none;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--cream);
  background: var(--panel);
  font: 15px/1.55 var(--serif);
  letter-spacing: 0;
}
.companion-input:focus { border-color: rgba(201, 168, 106, .55); }
.companion-input::placeholder { color: var(--cream-faint); }
.companion-input:disabled { opacity: .55; }
.companion-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201, 168, 106, .42);
  color: var(--gold);
  background: transparent;
}
.companion-send { width: 44px; height: 44px; border-radius: 50%; }
.companion-send svg { width: 20px; height: 20px; }
.companion-send:disabled { opacity: .35; }
.companion-error {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  border-top: 1px solid rgba(207, 138, 122, .24);
  color: var(--danger);
  background: rgba(207, 138, 122, .08);
  font-size: 12px;
  line-height: 1.5;
}
.companion-error button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(207, 138, 122, .38);
  border-radius: 6px;
  color: var(--danger);
  background: transparent;
}
.companion-outline-btn {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 14px;
}
.companion-outline-btn { margin-top: 15px; color: var(--gold); border: 1px solid rgba(201, 168, 106, .42); background: transparent; }
/* ---------------- 桌面端微调（音频 / 伴侣） ---------------- */

@media (min-width: 700px) {
  .audio-head-title { font-size: 27px; }
  .ap-cover { width: 300px; height: 300px; }
  .companion-head { padding-left: 20px; padding-right: 20px; }
  .companion-messages { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 430px) {
  .companion-head { padding: 8px 10px; }
  .companion-persona { min-height: 40px; }
  .companion-message-bubble { max-width: 88%; }
}

/* ============================================================
   form 整页分页（对标问卷 · page_mode=form）
   复用 --night/--cream/--gold 与既有 .item/.options/.input-form 风格
   ============================================================ */

/* 页顶进度条（按页） */
.form-progress { margin: 0 0 30px; }
.form-progress-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(232, 220, 195, .14);
  overflow: hidden;
}
.form-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
  box-shadow: 0 0 8px var(--gold-glow);
  transition: width .5s ease;
}
.form-progress-text {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--cream-faint);
  font-variant-numeric: tabular-nums;
}

/* 页底单一主按钮：提交并继续 / 继续 */
.form-footer { margin-top: 40px; text-align: center; }
.btn-form-next {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px 38px;
  font-size: 17px;
  letter-spacing: .4em;
  text-indent: .4em;
  color: var(--night);
  background: var(--gold);
  border: none;
  border-radius: 12px;
  transition: background .3s, transform .1s;
  animation: breathGlow 3.6s ease-in-out infinite;
}
.btn-form-next:not(:disabled):active { transform: scale(.99); background: var(--gold-deep); }
.btn-form-next:disabled { opacity: .55; animation: none; }

/* 必答未作答：暖红提示 */
.form-unanswered .node-text {
  border-left-color: var(--danger);
}
.form-unanswered .options,
.form-unanswered .input-form {
  outline: 1px solid rgba(207, 138, 122, .5);
  outline-offset: 6px;
  border-radius: 12px;
}
