/* ============================================================
   心岛 v1.0 · 舞台常驻样式（stage.css）
   ------------------------------------------------------------
   对应 01-运行素材与定位清单 §2「共同坐标系统」+ §4 船精灵 + §6 长文对话布局。

   核心约束：
   - .stage-box 是 contain 容器：按 2560×1440 源画布缩放，不裁切，不 cover
   - .stage-bg 是底图层；与热区、精灵共用同一缩放
   - 菜单/返回按钮在 body 顶层（不在 stage 内）
   - 灯池 / 尘 / 焦点高光只走 stage 内
   ============================================================ */

/* ===== 1. contain 容器 =====
   全屏 100vw × 100vh，背景用 contain 模式（不裁切）。
   内部坐标由 stage.js 计算 ox/oy/s，把源坐标转换为 CSS 像素。 */
.stage-box {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--ink-deeper, #1d262e);
  /* 让 contain 计算有基准：宽度全占，高度按宽度补 9/16 */
  display: block;
}

/* 底图：按 contain 模式铺，确保 2560×1440 全部可见，不被裁切 */
.stage-bg {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  pointer-events: none;
  user-select: none;
  /* 全屏共享 z-index：背景 0 */
  z-index: 0;
}

/* 底图 fallback（图片加载中/失败时显示的色） */
.stage-bg-fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #2a3640 0%, #1d262e 100%);
  z-index: -1;
}

/* 灯池（屏 3 用）：底图之上、画面之下 */
.stage-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* 海图 / 房间的"独立 UI 层"（在 stage-box 之外、但同 stacking context 之下，
   z 必须 > .stage-hot=5 才能点中按钮）
   position:fixed 是关键——只有 positioned 元素的 z-index 才生效。*/
.arch-side,
.lookout-actions,
.arrival-caption,
.voyage-caption,
.voyage-skip {
  position: fixed;
  z-index: 20;
}

/* 海图详情侧栏布局：右上 360 宽、上下留 80px */
.arch-side {
  right: 24px;
  top: 80px;
  bottom: 80px;
  width: 360px;
  max-width: 30vw;
  pointer-events: none;
  display: none;
}
.arch-side.is-shown { display: block; }
.arch-side > * { pointer-events: auto; }

/* ===== 2. 热区 =====
   透明，按钮本身体积就是热区。hover/focus 时出现蜜糖色边框 + 微缩放。 */
.stage-hot {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  z-index: 5;
  position: absolute;
  /* 默认完全透明。hover/focus 时给一圈虚线蜜糖色描边 */
  outline: none;
  box-shadow: inset 0 0 0 0 transparent;
  transition:
    box-shadow var(--t-quick, 180ms) var(--e-out, ease),
    transform var(--t-quick, 180ms) var(--e-out, ease);
  border-radius: 8px;
}
.stage-hot:hover,
.stage-hot:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(212, 165, 116, 0.85),
              0 0 12px 2px rgba(212, 165, 116, 0.35);
  transform: scale(1.015);
}
.stage-hot:focus-visible {
  outline: 2px dashed rgba(212, 165, 116, 0.95);
  outline-offset: 2px;
}
.stage-hot:active {
  transform: scale(0.985);
}

/* ===== 3. 精灵（alpha 透明合成） ===== */
.stage-sprite {
  z-index: 3;
  user-select: none;
  pointer-events: none;
  /* 边缘柔化：alpha 边用浏览器默认的 bilinear 即可，不要 pixelated */
  image-rendering: auto;
}

/* ===== 4. 角落菜单（菜单/返回按钮走 body 顶层）
   v1.0 改：移到屏幕左下角，避开右上 mute 与长文 toolbar 的"返回"按钮 */
.stage-menu-trigger {
  position: fixed;
  bottom: var(--sp-3, 16px);
  left: var(--sp-3, 16px);
  z-index: 90;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
  opacity: 0.55;
  transition: opacity var(--t-quick, 180ms) var(--e-out, ease);
}
.stage-menu-trigger:hover,
.stage-menu-trigger:focus-visible {
  opacity: 1;
  outline: none;
}
.stage-menu-trigger .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--air, #f7f1e3);
  border-radius: 1px;
  margin: 2px 0;
}

.stage-menu-panel {
  position: fixed;
  top: calc(var(--sp-3, 16px) + 44px);
  right: calc(var(--sp-3, 16px) + 8px);
  z-index: 95;
  min-width: 220px;
  max-width: 320px;
  background: var(--paper, #f7f1e3);
  color: var(--ink-deep, #3f4e5a);
  border: 1px solid var(--ink-shadow, rgba(0,0,0,0.18));
  border-radius: 4px;
  box-shadow: 0 8px 28px -4px rgba(0, 0, 0, 0.32);
  padding: 6px 0;
  font-family: var(--font-body, "Noto Serif SC", serif);
  font-size: 15px;
}
.stage-menu-panel[hidden] { display: none; }
.stage-menu-sep {
  height: 1px;
  background: var(--ink-shadow, rgba(0,0,0,0.12));
  margin: 6px 0;
}
.stage-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 16px;
  border: 0;
  background: transparent;
  color: var(--ink-deep, #3f4e5a);
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--t-quick, 180ms) var(--e-out, ease);
}
.stage-menu-item:hover,
.stage-menu-item:focus-visible {
  background: rgba(212, 165, 116, 0.18);
  outline: none;
}
.stage-menu-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--light, #d4a574);
  flex-shrink: 0;
  opacity: 0.45;
}
.stage-menu-item[aria-checked="true"] .stage-menu-item-dot { opacity: 1; }
.stage-menu-item-label { flex: 1; }
.stage-menu-item-state {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: var(--ink-shadow, rgba(0,0,0,0.55));
  letter-spacing: 0.04em;
}

/* ===== 5. 长文阅读版（屏 5）===== */
.longread {
  /* 屏 5 整体在 body 顶层；不参与 stage 缩放 */
  position: fixed;             /* v1.0.20（2026-09-14）：fixed 锁住 viewport，避免 body 整体滚动 */
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(220px, 28%) 1fr;
  grid-template-rows: 100vh;   /* v1.0.20（2026-09-14）：关键——不写会被 content 撑出 100vh */
  background: var(--ink-deeper, #1d262e);
  color: var(--paper, #f7f1e3);
  font-family: var(--font-body, "Noto Serif SC", serif);
  overflow: hidden;             /* 防止任何子项溢出撑大 */
}
.longread.is-mob {
  /* 窄窗口：角色区域收到顶部，主体占满 */
  grid-template-columns: 1fr;
  grid-template-rows: 120px 1fr;
}

/* 左：苍鹭陪伴区。B07 底图天然含苍鹭在左，不再叠加立绘/切换。 */
.longread-side {
  position: relative;
  overflow: hidden;
}
.longread-side-bg {
  position: absolute;
  inset: 0;
  background-image: var(--side-bg);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: cover;       /* 左陪伴区里底图裁切 OK（苍鹭在左） */
  opacity: 0.92;
}
.longread-side-name {
  position: absolute;
  left: 16px;
  top: 14px;
  font-family: var(--font-display, "ZCOOL KuaiLe", sans-serif);
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--paper, #f7f1e3);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  z-index: 2;
}
.longread-side-mood {
  position: absolute;
  left: 16px;
  top: 40px;
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--light-rim, #c69b6c);
  z-index: 2;
}

/* 右：阅读 + 输入区（占主要面积） */
.longread-main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;            /* v1.0.20（2026-09-14）：grid 子项允许收缩，让 history 内部滚动 */
  overflow: hidden;
  background: var(--paper, #f7f1e3);
  color: var(--ink-deep, #3f4e5a);
}

.longread-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 64px 10px 18px;   /* 右侧 64px 留出 mute 按钮空间 */
  border-bottom: 1px solid rgba(63, 78, 90, 0.15);
  background: var(--paper, #f7f1e3);
  flex-shrink: 0;
  position: relative;             /* 创建 stacking context，避免被 mute 拦截 */
  z-index: 100;                   /* 高于 .stage-menu-trigger (z=90) 和 .mute (z=80) */
}
.longread-toolbar-title {
  font-family: var(--font-display, "ZCOOL KuaiLe", sans-serif);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--ink-deep, #3f4e5a);
  flex: 1;
}
.longread-toolbar-session {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-shadow, rgba(0,0,0,0.55));
}
.longread-toolbar button {
  border: 0;
  background: transparent;
  color: var(--ink-deep, #3f4e5a);
  font-family: var(--font-body, "Noto Serif SC", serif);
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--t-quick, 180ms) var(--e-out, ease);
}
.longread-toolbar button:hover,
.longread-toolbar button:focus-visible {
  background: rgba(212, 165, 116, 0.22);
  outline: none;
}

.longread-history {
  /* 单一滚动容器：所有历史消息都在这里 */
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  /* v1.0.20（2026-09-14）：padding 8% → 28px，紧凑不留大空白 */
  padding: 24px 28px 12px 28px;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-shadow, rgba(0,0,0,0.18)) transparent;
  background: var(--paper, #f7f1e3);
}
.longread-history::-webkit-scrollbar { width: 8px; }
.longread-history::-webkit-scrollbar-track { background: transparent; }
.longread-history::-webkit-scrollbar-thumb { background: var(--ink-shadow, rgba(0,0,0,0.18)); border-radius: 0; }

/* 消息块：一条回复 = 一个块，内部保留自然段。
   v1.0.20（2026-09-14）：横向 flex 气泡式——苍鹭左头像 + 右气泡；玩家右对齐无头像。
   v1.0.20+（2026-09-14）：取消 max-width 1200 居中 + auto 边距，改为填满主区
                       （history 已自带 28px 水平 padding 作安全边距）。 */
.msg-block {
  margin: 0 0 22px 0;           /* 不再 auto 居中，左右贴齐 history padding */
  max-width: 100%;
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
}
.msg-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--ink-deeper, #1d262e);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 1px solid rgba(212, 165, 116, 0.45);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.msg-avatar.is-empty {          /* 玩家对话占位，保持对齐 */
  background-color: transparent;
  background-image: none;
  border: 1px dashed rgba(122, 138, 107, 0.35);
  box-shadow: none;
}
.msg-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.msg-block .msg-author {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-shadow, rgba(0,0,0,0.55));
  text-transform: uppercase;
}
.msg-block .msg-body {
  font-family: var(--font-body, "Noto Serif SC", serif);
  font-weight: 400;
  /* 字号由 .longread 的 --read-fs 控制（默认 20） */
  font-size: var(--read-fs, 20px);
  line-height: var(--read-lh, 1.75);
  letter-spacing: 0.01em;
  color: var(--ink-deep, #3f4e5a);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.msg-block .msg-body p {
  margin: 0 0 0.85em 0;
}
.msg-block .msg-body p:last-child { margin-bottom: 0; }
.msg-block.is-heron .msg-author { color: var(--light, #d4a574); }
.msg-block.is-mine { justify-content: flex-end; }    /* 玩家：无头像，气泡推到右 */
.msg-block.is-mine .msg-text { max-width: 80%; }     /* 玩家气泡：70% → 80%（v1.0.20 玩家反馈"挤在右边太窄"，
                                                          适当放宽，但仍保留右对齐 + 不要长回复横跨全屏） */
.msg-block.is-mine .msg-author { color: var(--moss, #7a8a6b); text-align: right; }
.msg-block.is-mine .msg-body { text-align: right; }

/* 危机气泡：纸底但加一道蜜糖边 + 蜜糖色电话 */
.msg-block.is-crisis { border-left: 3px solid var(--light, #d4a574); padding-left: 14px; }
.msg-block .crisis-call {
  color: var(--light, #d4a574);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dashed var(--light, #d4a574);
  padding: 0 2px;
}
.msg-block .crisis-call:hover { background: rgba(212, 165, 116, 0.18); }

/* 打字光标 */
.msg-block .caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--light, #d4a574);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: longread-caret 900ms steps(2) infinite;
}
@keyframes longread-caret {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .msg-block .caret { animation: none; }
}

/* 思考中指示（三个小点） */
.msg-block.is-thinking .msg-body {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 22px;
  letter-spacing: 0.4em;
  color: var(--light, #d4a574);
}
.msg-block.is-thinking .msg-body i {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  animation: longread-dot 1.2s infinite ease-in-out;
}
.msg-block.is-thinking .msg-body i:nth-child(2) { animation-delay: 0.15s; }
.msg-block.is-thinking .msg-body i:nth-child(3) { animation-delay: 0.3s; }
@keyframes longread-dot {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30%           { opacity: 1;    transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  .msg-block.is-thinking .msg-body i { animation: none; opacity: 0.6; }
}

/* 错误反馈块 */
.msg-block.is-error .msg-body {
  color: #8a3a2e;
  border-left: 3px solid #8a3a2e;
  padding-left: 10px;
}
.msg-block.is-error .msg-author { color: #8a3a2e; }
.msg-block.is-error .msg-retry {
  margin-top: 6px;
  font-size: 13px;
  color: var(--light, #d4a574);
  background: transparent;
  border: 0;
  border-bottom: 1px dashed currentColor;
  padding: 0;
  cursor: pointer;
  align-self: flex-start;
}

/* 回到最新按钮：只在用户上滚过才出现 */
.longread-jump {
  position: absolute;
  right: 24px;
  bottom: 92px;       /* 输入框上方 */
  z-index: 4;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--ink-shadow, rgba(0,0,0,0.25));
  background: var(--paper, #f7f1e3);
  color: var(--ink-deep, #3f4e5a);
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  transition: transform var(--t-quick, 180ms) var(--e-out, ease),
              opacity var(--t-quick, 180ms) var(--e-out, ease);
  opacity: 0;
  pointer-events: none;
}
.longread-jump[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}
.longread-jump:hover { transform: translateY(-2px); }

/* 输入区（固定底部） */
.longread-input {
  flex-shrink: 0;
  border-top: 1px solid rgba(63, 78, 90, 0.18);
  background: var(--paper, #f7f1e3);
  padding: 12px 8% 14px 8%;
}
.longread-input-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  /* v1.0.20（2026-09-14）：去掉 max-width 720 + auto 居中，让 textarea 填满左边直到发送/结束按钮
     水平留白交给外层 .longread-input 的 8% padding 控制 */
  max-width: none;
  margin: 0;
}
.longread-input textarea {
  flex: 1;
  resize: none;
  min-height: 40px;
  max-height: 220px;
  border: 1px solid rgba(63, 78, 90, 0.25);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--font-body, "Noto Serif SC", serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-deep, #3f4e5a);
  outline: none;
  transition: border-color var(--t-quick, 180ms) var(--e-out, ease),
              background var(--t-quick, 180ms) var(--e-out, ease);
}
.longread-input textarea:focus-visible {
  border-color: var(--light, #d4a574);
  background: rgba(255, 255, 255, 0.85);
}
.longread-input textarea::placeholder {
  color: var(--ink-shadow, rgba(0,0,0,0.45));
}
.longread-send {
  flex-shrink: 0;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--light, #d4a574);
  color: var(--ink, #1d262e);
  font-family: var(--font-body, "Noto Serif SC", serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background var(--t-quick, 180ms) var(--e-out, ease),
              opacity var(--t-quick, 180ms) var(--e-out, ease);
}
.longread-send:hover,
.longread-send:focus-visible {
  background: #e6b687;
  outline: none;
}
.longread-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 结束这次咨询按钮：ghost 样式，靠右，与发送按钮间距大，避免误触
   屏 5 长文对话 · v1.0.20（2026-09-14）：为恢复心岛章节生成链路加入 */
.longread-end {
  flex-shrink: 0;
  height: 40px;
  padding: 0 18px;
  margin-left: 36px;             /* 与发送按钮间距大，避免误触 */
  border: 1px solid var(--mid, #a8b5bc);
  border-radius: 6px;
  background: transparent;        /* ghost：和主操作按钮区分 */
  color: var(--ink-deep, #3f4e5a);
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--t-quick, 180ms) var(--e-out, ease),
              color var(--t-quick, 180ms) var(--e-out, ease),
              border-color var(--t-quick, 180ms) var(--e-out, ease);
}
.longread-end:hover,
.longread-end:focus-visible {
  background: var(--mid, #a8b5bc);
  color: var(--paper, #f7f1e3);
  border-color: var(--mid, #a8b5bc);
  outline: none;
}
.longread-end:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.longread-input-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-shadow, rgba(0,0,0,0.45));
  text-align: right;
  /* v1.0.20（2026-09-14）：跟 .longread-input-row 一起去掉 720px 限，让提示文字也对齐输入框右边缘 */
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
.longread-input-error {
  margin-top: 6px;
  font-size: 13px;
  color: #8a3a2e;
  text-align: left;
  /* v1.0.20（2026-09-14）：同上，跟随输入框填满 */
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  display: none;
}
.longread-input-error[data-show="true"] { display: block; }

/* 窄窗口：左右栏折叠为上下 */
@media (max-width: 820px) {
  .longread { grid-template-columns: 1fr; grid-template-rows: 110px 1fr; }
  .longread-side { min-height: 110px; }
  .longread-side-bg { background-position: left top; background-size: cover; }
  .longread-history { padding: 18px 16px 12px 16px; }
  .longread-input { padding: 10px 16px 12px 16px; }
  .msg-block { max-width: 100%; }
}

/* ===== 6. 屏 3 灯池（可选柔和环境光） ===== */
.lamp-pool {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    circle 6% at 30% 56%,
    rgba(247, 220, 168, 0.32) 0%,
    rgba(247, 220, 168, 0.18) 40%,
    transparent 72%
  );
  opacity: 0;
  transition: opacity 1200ms ease;
}
.lamp-pool.is-on { opacity: 1; }

/* ===== 7. 提示气泡（hover/focus 标签） ===== */
.hot-label {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  font-family: var(--font-body, "Noto Serif SC", serif);
  font-size: 14px;
  color: var(--paper, #f7f1e3);
  background: rgba(29, 38, 46, 0.78);
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity var(--t-quick, 180ms) var(--e-out, ease),
              transform var(--t-quick, 180ms) var(--e-out, ease);
}
.hot-label.is-shown { opacity: 1; transform: translateY(0); }

/* ===== 8. 海图详情侧栏 ===== */
.arch-side-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(247, 241, 227, 0.96);
  color: var(--ink-deep, #3f4e5a);
  padding: 22px 24px;
  border-radius: 8px;
  box-shadow: 0 12px 32px -6px rgba(0, 0, 0, 0.4);
  font-family: var(--font-body, "Noto Serif SC", serif);
  height: 100%;
  overflow-y: auto;
}
.arch-side-eyebrow {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-shadow, rgba(0, 0, 0, 0.55));
  margin: 0;
}
.arch-side-title {
  font-family: var(--font-display, "ZCOOL KuaiLe", sans-serif);
  font-size: 28px;
  letter-spacing: 0.06em;
  margin: 0;
  color: var(--ink, #1d262e);
}
.arch-side-sub {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  color: var(--ink-shadow, rgba(0, 0, 0, 0.7));
}
.arch-side-facts {
  list-style: none;
  margin: 4px 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.arch-side-facts li {
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 12px;
  background: rgba(212, 165, 116, 0.1);
  border-left: 2px solid var(--light, #d4a574);
  border-radius: 2px;
}
.arch-side-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.arch-btn {
  flex: 1;
  padding: 10px 16px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-deep, #3f4e5a);
  font-family: var(--font-body, "Noto Serif SC", serif);
  font-size: 15px;
  letter-spacing: 0.08em;
  cursor: pointer;
  border: 1px solid var(--ink-shadow, rgba(0, 0, 0, 0.25));
  transition: background var(--t-quick, 180ms) var(--e-out, ease);
}
.arch-btn:hover,
.arch-btn:focus-visible {
  background: rgba(212, 165, 116, 0.18);
  outline: none;
}
.arch-btn--primary {
  background: var(--light, #d4a574);
  border-color: var(--light, #d4a574);
  color: var(--ink, #1d262e);
  font-weight: 500;
}
.arch-btn--primary:hover,
.arch-btn--primary:focus-visible {
  background: #e6b687;
}
.arch-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

