/**
 * kotokoi.css — 設計系統 SSOT（v2 視覺定調版）
 * 方向：夜間・大人的沉浸感 — 深色電影感包框，讓場景圖的金光透出來。
 * 金琥珀 accent 只給「可互動」元素；明朝体只給場所名/場景標題；
 * 中文翻譯永遠是配角（小、淡、不搶日文的戲）。
 * 引擎 class 名凍結，本檔只做視覺，不要求引擎改 DOM。
 */

/* ===== tokens ===== */
:root {
  --bg-deep: #14100a;                 /* 暖黑（往琥珀色相偏，不是純黑） */
  --panel: rgba(18, 13, 7, 0.78);     /* 對話/區塊面板 */
  --panel-solid: #1d160c;
  --line: rgba(232, 190, 118, 0.22);  /* 金色 hairline */
  --line-strong: rgba(232, 190, 118, 0.55);
  --ink: #f4ecdf;                     /* 暖白內文 */
  --ink-strong: #fff8ec;
  --muted: #cdbfa6;                   /* 次要文字（對深底仍高對比） */
  --gold: #e8b45a;                    /* 夕陽金：互動/強調 */
  --gold-deep: #c2913c;
  --radius: 14px;
  --radius-sm: 10px;
  --font-ui: -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-display: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1); /* ease-out-quint */
}

/* ===== base ===== */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  /* 防止 iOS Safari 雙擊放大 + 滑動衝突 */
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  /* 防止橡皮筋 + 避免 PWA 內滑動干擾 */
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg-deep);
  min-height: 100vh;
  min-height: 100dvh;  /* 動態 viewport：手機地址列縮放時不會跳 */
  -webkit-font-smoothing: antialiased;
  /* 桌面 web 仍允許文字選取，但按鈕 / 互動元件不要有選取藍色 */
}
@supports (height: 100dvh) {
  body { min-height: 100dvh; }
}
/* 桌面 / 寬螢幕：bg 用 pseudo-element 蓋背景圖，body 自身透明避免蓋到 ::before */
@media (min-width: 600px) {
  body { background: rgba(20, 16, 10, 0.55); backdrop-filter: blur(2px); }
}

/* 場景背景：固定圖層（iOS 不支援 background-attachment:fixed，用 fixed 元素） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--scene-bg, url("../assets/bg/cafeteria.jpg")) center / cover no-repeat;
  filter: var(--bg-filter, brightness(1) sepia(0.05));
  transition: background-image 400ms ease, filter 600ms ease;
}
/* 上下暗角：讓 HUD 與底部操作區在圖上永遠可讀 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom,
      rgba(16, 11, 5, 0.86) 0%,
      rgba(16, 11, 5, 0.35) 22%,
      rgba(16, 11, 5, 0.28) 45%,
      rgba(16, 11, 5, 0.72) 72%,
      rgba(16, 11, 5, 0.93) 100%);
}

.container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 14px 14px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 1;
}
/* 桌機：內容容器也鎖進手機框寬（--frame），與背景/overlay 對齊，避免內容溢出框外
   造成背景只剩中間一條的條紋 bug（2026-07-06 修）。--frame 定義見「桌機機身鎖定」段。 */
@media (min-width: 720px) {
  .container { max-width: var(--frame); padding: 20px 18px calc(32px + env(safe-area-inset-bottom)); }
}
/* VN 場景模式：整頁鎖定，不捲動 */
.container.vn-mode { overflow: hidden; padding: 0; gap: 0; }

/* ===== 世界 HUD ===== */
.world-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--ink-strong);
}
.world-header small {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.lang-toggle {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}
.lang-toggle.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #241a0b;
}
.lang-toggle:active { transform: translateY(1px); }

/* ===== 場所名：這一屏的主角字 ===== */
.loc-title {
  margin: 26px 2px 10px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.1em;
  color: var(--ink-strong);
  text-shadow: 0 1px 14px rgba(10, 6, 2, 0.85);
  text-wrap: balance;
}
.loc-title .translation-text {
  display: block;
  margin-top: 6px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.28em;
  color: var(--muted);
  text-shadow: 0 1px 8px rgba(10, 6, 2, 0.9);
}

/* ===== 世界區塊面板（world-engine 的 .card 是「區塊」不是按鈕） ===== */
.card,
.menu-btn,
.nav-btn,
.scene-trigger,
.talk-opt,
.npc-chip,
.study-btn,
.vn-next,
.voice-btn,
.nb-entry,
.kana-cell,
input,
button {
  /* 防止 iOS Safari double-tap 縮放整個 viewport */
  touch-action: manipulation;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.card h3 {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--gold);
}
.card p { margin: 0; font-size: 14px; color: var(--muted); }
.card p .translation-text { margin-left: 8px; }

/* 在場角色 */
.npc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(232, 180, 90, 0.10);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink-strong);
}
.npc-chip::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px rgba(232, 180, 90, 0.9);
}

/* 事件觸發：整屏最亮的可點物 */
.scene-trigger {
  position: relative;
  margin-top: 2px;
  padding: 14px 40px 14px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-deep);
  background: linear-gradient(135deg, rgba(232, 180, 90, 0.18), rgba(232, 180, 90, 0.06));
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-strong);
  cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.scene-trigger::after {
  content: "▸";
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 18px;
}
.scene-trigger:active { transform: scale(0.985); }
.scene-trigger .translation-text {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
}
.scene-trigger + .scene-trigger { margin-top: 8px; }

/* 移動/一般操作 */
.nav-btn {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 244, 224, 0.045);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.nav-btn:active { transform: scale(0.985); background: rgba(232, 180, 90, 0.12); }
.nav-btn + .nav-btn { margin-top: 8px; }
.nav-btn .translation-text { margin-left: 8px; font-size: 11.5px; }
.nav-btn small { color: var(--muted); font-size: 12px; margin-left: 6px; }

/* ===== 場景（scene-engine） ===== */
.scene-title {
  margin: 18px 2px 2px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-strong);
  text-shadow: 0 1px 12px rgba(10, 6, 2, 0.85);
  text-wrap: balance;
}
.scene-title + .translation-text {
  margin: 0 2px 8px;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-shadow: 0 1px 8px rgba(10, 6, 2, 0.9);
}

/* 情境敘述 */
.scene-text {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: rgba(16, 11, 5, 0.55);
  border: 1px solid rgba(232, 190, 118, 0.12);
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--ink);
  text-wrap: pretty;
}

/* 台詞框（VN 對話盒） */
.response-box {
  position: relative;
  margin-top: 6px;
  padding: 16px 16px 14px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: rise 260ms var(--ease);
  font-size: 16px;
  line-height: 2.0;
}
.speaker {
  display: inline-block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold);
}

/* 翻譯（全域配角規則；body 沒有 show-zh 就整批隱藏） */
.translation-text {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 5px;
}
body:not(.show-zh) .translation-text { display: none; }

/* ===== 選擇卡片：本作的核心 UI ===== */
.choice-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.choice-container .card {
  cursor: pointer;
  padding: 13px 15px;
  background: rgba(24, 17, 9, 0.88);
  border: 1px solid var(--line);
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease), transform 160ms var(--ease);
}
.choice-container .card:active {
  transform: scale(0.985);
  border-color: var(--gold);
  background: rgba(232, 180, 90, 0.13);
}
.choice-container .card .scene-text {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-strong);
  animation: none;
}
.card-label {
  display: inline-block;
  margin-bottom: 7px;
  padding: 2.5px 9px;
  border-radius: 5px;
  background: rgba(232, 180, 90, 0.14);
  border: 1px solid var(--line-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold);
}
.card.disabled, .card:disabled {
  opacity: 0.38;
  pointer-events: none;
  filter: saturate(0.4);
}

/* ===== 語音鈕 ===== */
.voice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  margin-left: 8px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(232, 180, 90, 0.10);
  color: var(--gold);
  font-size: 13px;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color 160ms var(--ease), transform 160ms var(--ease);
}
.voice-btn:active { transform: scale(0.92); }
.voice-btn.playing { background: var(--gold); color: #241a0b; }
.voice-btn:disabled { opacity: 0.35; pointer-events: none; }

/* ===== 言葉ノート toast ===== */
.notebook-toast {
  position: fixed;
  left: 50%;
  /* 2026-07-06：改釘頂部——原本 bottom 定位會壓在 VN 對話框/つづく條上重疊 */
  top: calc(16px + env(safe-area-inset-top));
  transform: translateX(-50%);
  transition: top 200ms var(--ease), opacity 300ms ease;
  z-index: 90;
  max-width: min(340px, calc(var(--frame) - 24px));
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(20, 14, 6, 0.94);
  border: 1px solid var(--gold-deep);
  color: var(--ink-strong);
  font-size: 13.5px;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.45);
  animation: rise 260ms var(--ease);
}

/* ===== furigana ===== */
ruby rt {
  font-size: 0.5em;
  color: var(--muted);
  letter-spacing: 0;
}

/* ===== motion ===== */
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.scene-text, .choice-container .card { animation: rise 240ms var(--ease); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ===== 標題畫面 ===== */
.title-screen {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 20px 0 calc(40px + env(safe-area-inset-bottom));
}
.title-logo {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--ink-strong);
  text-shadow: 0 2px 24px rgba(10, 6, 2, 0.9);
  line-height: 1.05;
}
@media (min-width: 720px) {
  .title-logo { font-size: 56px; }
}
.title-sub {
  font-size: 12px;
  letter-spacing: 0.42em;
  color: var(--gold);
  margin-bottom: 24px;
  text-shadow: 0 1px 10px rgba(10, 6, 2, 0.9);
}
.menu-btn {
  display: block;
  width: 240px;
  padding: 14px 18px;
  margin: 5px 0;
  border-radius: 999px;
  border: 1px solid var(--gold-deep);
  background: rgba(20, 14, 6, 0.82);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-strong);
  cursor: pointer;
  transition: background-color 180ms var(--ease), transform 160ms var(--ease);
}
.menu-btn:active { transform: scale(0.97); background: rgba(232, 180, 90, 0.16); }
.menu-btn:disabled { opacity: 0.35; pointer-events: none; }

/* ===== 角色建立 ===== */
.cc-panel { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.cc-input {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(20, 14, 6, 0.85);
  color: var(--ink-strong);
  font-family: var(--font-ui);
  font-size: 17px;
  letter-spacing: 0.06em;
  outline: none;
}
.cc-input:focus { border-color: var(--gold); }
.card.selected {
  border-color: var(--gold);
  background: rgba(232, 180, 90, 0.14);
}

/* ===== 言葉ノート面板 ===== */
.nb-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(8, 5, 2, 0.72);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.nb-panel {
  width: 100%;
  max-width: 400px;
  max-height: 76vh;
  overflow-y: auto;
  padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: var(--panel-solid);
  border-top: 1px solid var(--gold-deep);
  animation: rise 240ms var(--ease);
}
.nb-panel h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.14em;
  color: var(--gold);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nb-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}
.nb-entry {
  padding: 11px 2px;
  border-bottom: 1px solid rgba(232, 190, 118, 0.12);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink);
}
.nb-entry:last-child { border-bottom: 0; }
.nb-entry .nb-day { float: right; font-size: 11px; color: var(--muted); }

/* ===== VN 舞台（手機遊戲框架：一次一個畫面、點擊推進） ===== */
.vn-chip {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--ink-strong);
  white-space: nowrap;
}
.vn-chip .translation-text { margin-left: 8px; font-size: 10.5px; }

.vn-stage {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 400px;
  padding: 10px 12px calc(16px + env(safe-area-inset-bottom));
  z-index: 5;
  max-height: 28vh;     /* 限制高度：給立繪留 62vh 空間 */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 720px) {
  /* 桌機也鎖進手機框寬（原本 720px 會讓對話框/つづく條衝出框外） */
  .vn-stage { max-width: var(--frame); padding: 14px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 30vh; }
}

.vn-box {
  position: relative;
  padding: 15px 16px 22px;
  border-radius: var(--radius);
  background: rgba(16, 11, 5, 0.90);
  border: 1px solid var(--line-strong);
  cursor: pointer;
  min-height: 108px;
  animation: rise 220ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.vn-box .scene-text {
  padding: 0; border: 0; background: transparent;
  font-size: 16.5px; line-height: 1.95; color: var(--ink-strong);
  animation: none;
}
.vn-box .translation-text {
  display: block;       /* 2026-07-06：明確 block，避免某些 inline 渲染導致 margin-top 失效 */
  margin-top: 14px;     /* 原本 7px，中文字 x-height 較大黏在一起；拉到 14px 確保視覺分離 */
  line-height: 1.6;
}

.vn-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.vn-head .speaker { margin-bottom: 0; font-size: 14px; }
.portrait {
  width: 52px; height: 52px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  background: var(--panel-solid);
}

.vn-next {
  position: absolute;
  right: 14px; bottom: 8px;
  color: var(--gold);
  font-size: 12px;
  animation: bob 1.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(3px); opacity: .5; } }

.vn-stage .choice-container { gap: 8px; margin-top: 0; }
.vn-stage .choice-container .card { padding: 10px 13px; animation: rise 220ms var(--ease); }
.vn-stage .choice-container .card .scene-text { font-size: 15px; line-height: 1.7; }

.card-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.register-hint { font-size: 10.5px; color: var(--muted); margin: 2px 0 6px; letter-spacing: 0.02em; }

.tutorial-tip {
  margin-bottom: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(232, 180, 90, 0.16);
  border: 1px solid var(--gold-deep);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-strong);
}

.vn-end-btn { text-align: center; border-color: var(--gold-deep); background: rgba(232, 180, 90, 0.14); }

@media (prefers-reduced-motion: reduce) { .vn-next { animation: none; } }

/* ===== 站姿立繪 ===== */
.vn-sprite {
  position: fixed;
  right: max(0px, calc(50% - 220px));
  bottom: 28vh;  /* 浮在對話框上方（避免被對話框遮住） */
  width: min(58vw, 320px);
  max-height: 62vh;
  object-fit: contain;
  object-position: bottom right;
  z-index: 2;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, black 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 78%, transparent 100%);
  filter: drop-shadow(0 6px 24px rgba(10, 6, 2, 0.6));
  border-radius: 18px 0 0 0;
}
.vn-sprite.visible { opacity: 1; transform: translateY(0); }

/* ===== 逐句學習 ===== */
.study-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px; height: 30px;
  margin-left: 8px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(232, 180, 90, 0.10);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 14px;
  cursor: pointer;
}
.study-btn:active { background: var(--gold); color: #241a0b; }

.study-panel-overlay {
  position: fixed; inset: 0; z-index: 75;
  background: rgba(8, 5, 2, 0.72);
  display: flex; align-items: flex-end; justify-content: center;
}
.study-panel {
  width: 100%; max-width: 400px;
  max-height: 70vh; overflow-y: auto;
  padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: var(--panel-solid);
  border-top: 1px solid var(--gold-deep);
  animation: rise 220ms var(--ease);
}
.study-title {
  font-family: var(--font-display);
  font-size: 16px; letter-spacing: 0.05em;
  color: var(--gold); margin-bottom: 12px;
}
.study-word {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px solid rgba(232, 190, 118, 0.12);
  font-size: 16px; color: var(--ink-strong);
}
.study-word b { font-weight: 600; }
.study-reading { font-size: 12px; color: var(--gold); }
.study-zh { font-size: 13px; color: var(--muted); margin-left: auto; }
.study-grammar {
  margin-top: 12px; padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: rgba(232, 180, 90, 0.10);
  border: 1px solid var(--line);
  font-size: 13.5px; line-height: 1.8; color: var(--ink);
}
.study-grammar b { color: var(--gold); }
.study-note {
  margin-top: 10px;
  font-size: 12.5px; line-height: 1.8; color: var(--muted);
}

/* ===== Study-Usage「這個句子能用在哪裡」段（Phase 3.5 rewrite — 2026-07-05） ===== */
/* 設計哲學：給具體的曖昧場景 + 那個場景下會聽到的日文句子 + 中文 */
/* 不是 meta 解釋，而是「這個字串到這句話，在什麼時候用、怎麼用」 */
.study-usage {
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 2px solid rgba(232, 190, 118, 0.45);
  border-radius: 4px;
  background: rgba(232, 180, 90, 0.04);
}
.study-usage-head {
  font-size: 12.5px;
  color: var(--gold);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  font-weight: 600;
}
.study-usage-row {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(232, 190, 118, 0.18);
}
.study-usage-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.study-usage-context {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.study-usage-line-ja {
  font-size: 15px;
  color: var(--ink-strong);
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  font-family: var(--font-display);
}
.study-usage-line-zh {
  font-size: 13px;
  color: var(--ink);
  opacity: 0.85;
  line-height: 1.6;
}
.study-usage-meta {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--gold-deep);
  opacity: 0.8;
  letter-spacing: 0.02em;
}

/* ===== Word-Popup Usage（與 study-panel 共用視覺，但框線更細） ===== */
.wp-usage {
  border-left: 2px solid rgba(232, 190, 118, 0.45);
  background: rgba(232, 180, 90, 0.04);
  border-radius: 4px;
  padding: 10px 12px;
}
.wp-usage-row {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(232, 190, 118, 0.18);
}
.wp-usage-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.wp-usage-context {
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 3px;
}
.wp-usage-line-ja {
  font-size: 15px;
  color: var(--ink-strong);
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.wp-usage-line-zh {
  font-size: 12.5px;
  color: var(--ink);
  opacity: 0.85;
}
.wp-usage-meta {
  margin-top: 3px;
  font-size: 11px;
  color: var(--gold-deep);
  opacity: 0.8;
}

/* 捏角聲線選擇 */
.cc-voice-row { display: flex; gap: 10px; }
.cc-voice-row .card { flex: 1; text-align: center; }

/* ===== 五十音練習 ===== */
.kana-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(10, 6, 2, 0.94);
  display: flex; align-items: center; justify-content: center;
}
.kana-panel {
  width: 100%; max-width: 400px; max-height: 92vh; overflow-y: auto;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
}
.kana-header {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-display); font-size: 20px; letter-spacing: 0.14em;
  color: var(--gold); margin-bottom: 10px;
}
.kana-header .translation-text { margin-left: 8px; font-size: 11px; }
.kana-progress { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.kana-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 14px; }
.kana-sep { grid-column: 1 / -1; height: 8px; }
.kana-cell {
  aspect-ratio: 1; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(255, 244, 224, 0.05); border: 1px solid var(--line);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.kana-cell b { font-size: 21px; font-weight: 600; color: var(--ink-strong); }
.kana-cell small { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.kana-cell.good { border-color: var(--gold); background: rgba(232, 180, 90, 0.14); }
.kana-cell.seen { border-color: var(--line-strong); }
.kana-cell.empty { background: transparent; border: 0; pointer-events: none; }
.kana-cell:active { background: rgba(232, 180, 90, 0.22); }
.kana-question { text-align: center; margin: 22px 0; }
.kana-big { font-family: var(--font-display); font-size: 64px; color: var(--ink-strong); }
.kana-play {
  padding: 12px 26px; border-radius: 999px;
  border: 1px solid var(--gold-deep); background: rgba(232, 180, 90, 0.14);
  color: var(--gold); font-size: 16px; cursor: pointer;
}
.kana-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kana-option {
  padding: 18px 0; text-align: center; font-size: 24px;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: rgba(255, 244, 224, 0.05); color: var(--ink-strong); cursor: pointer;
}
.kana-option.right { border-color: #7ec97e; background: rgba(126, 201, 126, 0.18); }
.kana-option.wrong { border-color: #d96a6a; background: rgba(217, 106, 106, 0.18); }

/* ===== マイルーム（空間視角） ===== */
.room-overlay {
  position: fixed; inset: 0; z-index: 55;
  background: #0d0906 url("../assets/bg/room.jpg") center / cover no-repeat;
}
.room-overlay::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(13,9,6,0.55) 0%, rgba(13,9,6,0) 22%, rgba(13,9,6,0) 70%, rgba(13,9,6,0.4) 100%);
  pointer-events: none;
}
.room-view { position: absolute; inset: 0; }
.room-chip { z-index: 12; }
.room-hotspot {
  position: absolute; transform: translate(-50%, -50%); z-index: 8;
  padding: 8px 13px; border-radius: 999px;
  background: rgba(16, 11, 5, 0.82); border: 1px solid var(--gold-deep);
  color: var(--ink-strong); font-size: 13.5px; font-weight: 600;
  cursor: pointer; text-align: center;
}
.room-hotspot .translation-text { display: block; font-size: 10px; margin-top: 1px; }
.room-marker {
  position: absolute; z-index: 6;
  width: 26px; height: 26px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #ffe9bd, var(--gold) 60%, var(--gold-deep));
  border: 2px solid #fff8ec;
  box-shadow: 0 0 18px rgba(232, 180, 90, 0.9), 0 6px 10px rgba(0,0,0,0.5);
  transition: left 600ms var(--ease), top 600ms var(--ease);
}
.room-marker::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 44px; height: 44px; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(232, 180, 90, 0.5);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse { 0% { opacity: .8; scale: .6; } 100% { opacity: 0; scale: 1.25; } }

/* ===== 校園地圖 ===== */
.map-overlay {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(10, 6, 2, 0.9);
  display: flex; align-items: center; justify-content: center;
}
.map-panel { width: 100%; max-width: 400px; padding: 18px 16px; }
.map-board {
  position: relative; width: 100%; aspect-ratio: 1 / 1.05;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 30% 25%, rgba(232, 180, 90, 0.08), transparent 45%),
    radial-gradient(circle at 72% 78%, rgba(232, 180, 90, 0.07), transparent 40%),
    var(--panel-solid);
  border: 1px solid var(--line);
}
.map-node {
  position: absolute; transform: translate(-50%, -50%);
  padding: 9px 14px; border-radius: 12px; text-align: center;
  background: rgba(16, 11, 5, 0.9); border: 1px solid var(--line-strong);
  cursor: pointer; min-width: 84px;
}
.map-node b { font-size: 14px; color: var(--ink-strong); letter-spacing: 0.06em; }
.map-node .translation-text { display: block; font-size: 10px; margin-top: 1px; }
.map-node.current { border-color: var(--gold); background: rgba(232, 180, 90, 0.18); pointer-events: none; }
.map-node.closed { opacity: 0.4; pointer-events: none; }

/* ===== 桌機機身鎖定：整個遊戲鎖在置中的手機直立框，框外純黑 ===== */
:root { --frame: min(100vw, 430px); }
html { background: #050403; }
/* 桌機：在手機框兩側畫細邊＋外陰影，讓置中的框讀起來像一支立著的手機、而非孤零零一條內容 */
@media (min-width: 720px) {
  html::after {
    content: ""; position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
    width: var(--frame); pointer-events: none; z-index: 200;
    border-left: 1px solid rgba(232, 180, 90, 0.18);
    border-right: 1px solid rgba(232, 180, 90, 0.18);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7), 0 8px 80px 24px rgba(0, 0, 0, 0.85);
  }
}
body::before, body::after {
  left: 50%; right: auto; transform: translateX(-50%);
  width: var(--frame);
}
.nb-overlay, .study-panel-overlay, .kana-overlay, .room-overlay, .map-overlay {
  left: 50%; right: auto; transform: translateX(-50%);
  width: var(--frame);
}
/* 立繪置中站姿（在對話框後方、居中） */
.vn-sprite {
  left: 50%; right: auto;
  width: min(94%, 400px); max-height: 78vh;
  object-position: bottom center;
  border-radius: 0;
  transform: translate(-50%, 10px);
}
.vn-sprite.visible { transform: translate(-50%, 0); }

/* ===== 自由對話 talk ===== */
.talk-overlay {
  position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--frame); z-index: 65;
  background: var(--scene-bg, #0d0906) center / cover no-repeat, #0d0906;
}
.talk-overlay::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,6,2,0.55) 0%, rgba(10,6,2,0.15) 30%, rgba(10,6,2,0.35) 55%, rgba(10,6,2,0.9) 100%);
}
.talk-sprite { z-index: 1; }
.talk-rel {
  position: absolute; top: calc(14px + env(safe-area-inset-top)); left: 14px; right: 14px;
  display: flex; align-items: center; gap: 10px; z-index: 3;
  padding: 8px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: var(--font-display); color: var(--ink-strong); font-size: 14px;
}
.talk-hearts { color: var(--gold); letter-spacing: 2px; font-size: 12px; }
.talk-rel .translation-text { margin-left: auto; }
.talk-box {
  position: absolute; left: 12px; right: 12px; bottom: 220px; z-index: 3;
}
.talk-menu {
  position: absolute; left: 12px; right: 12px; bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 3; display: flex; flex-direction: column; gap: 12px;
  max-height: calc(100vh - 360px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.talk-opt {
  padding: 12px 15px; border-radius: var(--radius-sm);
  background: rgba(24,17,9,0.92); border: 1px solid var(--line-strong);
  color: var(--ink-strong); font-size: 15px; cursor: pointer;
}
.talk-opt:active { background: rgba(232,180,90,0.15); }
.talk-opt.locked { opacity: 0.55; cursor: not-allowed; border-color: var(--line); }
.talk-opt .translation-text { margin-left: 8px; }
.talk-lock { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }

/* 可講話的角色膠囊 */
.npc-chip.talkable { cursor: pointer; }
.npc-chip.talkable:active { background: rgba(232,180,90,0.22); }
.chip-say { margin-left: 8px; font-size: 11px; color: var(--gold); border: 1px solid var(--line-strong); border-radius: 6px; padding: 1px 6px; }

/* ===== 換裝/持ち物 ===== */
.outfit-swatch { display: inline-block; width: 20px; height: 20px; border-radius: 5px; vertical-align: middle; margin-right: 8px; border: 1px solid var(--line-strong); }
.outfit-row.selected { border-left: 0; background: rgba(232,180,90,0.10); }

/* ===== 時間過場動畫 ===== */
.time-transition {
  position: fixed; inset: 0; z-index: 100;
  background: #000; opacity: 0;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 500ms ease;
}
.time-transition.show { opacity: 1; }
.time-card {
  font-family: var(--font-display); font-size: 30px; letter-spacing: 0.16em;
  color: var(--ink-strong); opacity: 0; transform: translateY(8px);
  transition: opacity 500ms ease, transform 500ms var(--ease);
}
.time-card.show { opacity: 1; transform: translateY(0); }

/* ===== 大地圖底圖 ===== */
.map-board {
  background: #050403 url("../assets/bg/campus-map.jpg") center / cover no-repeat !important;
}
.map-board::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  background: rgba(10,6,2,0.35);
}
.map-node { z-index: 2; }

/* ===== 連絡先／朋友名單 ===== */
.friend-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 4px; border-bottom: 1px solid rgba(232,190,118,0.12);
  cursor: pointer;
}
.friend-face { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line-strong); flex-shrink: 0; }
.friend-face.nofc { background: var(--panel-solid); }
.friend-info { display: flex; flex-direction: column; gap: 2px; }
.friend-info b { font-size: 15px; color: var(--ink-strong); }
.friend-hearts { color: var(--gold); letter-spacing: 2px; font-size: 11px; }
.friend-hearts.big { font-size: 16px; letter-spacing: 3px; }
.friend-badge { margin-left: auto; color: #7ec9a0; font-size: 12px; }
.friend-profile { text-align: center; padding: 12px 0 4px; }
.friend-portrait { width: 120px; height: 120px; border-radius: 16px; object-fit: cover; border: 1px solid var(--line-strong); }
.friend-profile .friend-hearts { display: block; margin-top: 10px; }

/* ===== LINE 訊息 ===== */
.msg-overlay {
  position: fixed; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: var(--frame, min(100vw,430px)); z-index: 68;
  background: var(--panel-solid);
  display: flex; flex-direction: column;
}
.msg-head {
  display: flex; align-items: center; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-size: 17px; color: var(--ink-strong);
}
.msg-head .translation-text { color: #7ec9a0; }
.msg-head .nb-close { margin-left: auto; }
.msg-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg-bubble {
  max-width: 78%; padding: 10px 13px; border-radius: 14px;
  font-size: 15px; line-height: 1.6;
}
.msg-bubble.them { align-self: flex-start; background: rgba(255,244,224,0.08); border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg-bubble.me { align-self: flex-end; background: #6b7a3f; color: #fff8ec; border-top-right-radius: 4px; }
.msg-bubble.me .translation-text { color: rgba(255,248,236,0.7); }
.msg-bubble .translation-text { display: block; margin-top: 3px; font-size: 11px; }
.msg-bubble.new { border-color: var(--gold-deep); }
.msg-note { text-align: center; color: var(--muted); font-size: 12.5px; padding: 12px; }
.msg-note .translation-text { display: block; margin-top: 3px; }
.msg-replies { padding: 10px 14px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); }
.msg-reply {
  padding: 10px 13px; border-radius: var(--radius-sm);
  background: rgba(24,17,9,0.92); border: 1px solid var(--line-strong);
  font-size: 15px; color: var(--ink-strong); cursor: pointer;
}
.msg-reply .card-label { margin-right: 8px; }
.msg-reply .translation-text { margin-left: 8px; }
.msg-reply.locked { opacity: 0.5; cursor: not-allowed; }

/* ===== Auth Modal (Phase 1) ===== */
.auth-modal {
  position: fixed; inset: 0;
  z-index: 100;
  background: radial-gradient(ellipse at center, rgba(208,161,95,0.06) 0%, rgba(11,15,20,0.96) 70%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
}
.auth-modal.hidden { display: none; }
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--panel-solid, rgba(24,17,9,0.96));
  border: 1px solid var(--line-strong, #6b7a3f);
  border-radius: 18px;
  padding: 28px 24px 22px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.auth-title { text-align: center; margin-bottom: 22px; }
.auth-logo {
  font-family: var(--font-display, "Hiragino Mincho", serif);
  font-size: 32px;
  letter-spacing: 4px;
  color: var(--gold-deep, #d0a15f);
  margin-bottom: 4px;
}
.auth-sub {
  font-size: 12px;
  color: var(--muted, #a89878);
  letter-spacing: 1px;
}
.auth-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line, #3a3022);
  margin-bottom: 18px;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--muted, #a89878);
  font-size: 14px;
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}
.auth-tab.active {
  color: var(--gold-deep, #d0a15f);
  border-bottom-color: var(--gold-deep, #d0a15f);
}
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 12px;
  color: var(--muted, #a89878);
  letter-spacing: 0.5px;
}
.auth-input {
  background: rgba(255,244,224,0.04);
  border: 1px solid var(--line, #3a3022);
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 15px;
  color: var(--ink-strong, #fff8ec);
  font-family: var(--font-body, -apple-system, "Hiragino Sans", sans-serif);
  transition: border-color 0.15s;
}
.auth-input:focus {
  outline: none;
  border-color: var(--gold-deep, #d0a15f);
}
.auth-error {
  color: #d96565;
  font-size: 13px;
  padding: 6px 0;
  display: none;
}
.auth-error:empty { display: none; }
.auth-submit {
  margin-top: 6px;
  background: var(--gold-deep, #d0a15f);
  color: #1a1208;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.auth-submit:hover { opacity: 0.92; }
.auth-submit:active { transform: scale(0.98); }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-footer {
  margin-top: 16px;
  text-align: center;
  color: var(--muted, #a89878);
  opacity: 0.7;
}
.auth-switch { display: flex; flex-direction: column; gap: 10px; }
.auth-switch.hidden { display: none; }
.auth-switch-title {
  font-size: 13px;
  color: var(--muted, #a89878);
  text-align: center;
  margin-bottom: 6px;
}
.auth-user-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 280px; overflow-y: auto;
}
.auth-user-btn {
  background: rgba(255,244,224,0.04);
  border: 1px solid var(--line, #3a3022);
  border-radius: 10px;
  padding: 12px;
  color: var(--ink-strong, #fff8ec);
  font-size: 15px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
}
.auth-user-btn:hover { border-color: var(--gold-deep, #d0a15f); }
.auth-link {
  background: transparent;
  border: none;
  color: var(--gold-deep, #d0a15f);
  font-size: 13px;
  cursor: pointer;
  padding: 8px;
  margin-top: 4px;
  text-decoration: underline;
}

/* ===== Word-Click Learning (Phase 3 - 2026-07-05) ===== */
.word-click {
  cursor: pointer;
  border-bottom: 1px dotted rgba(208, 161, 95, 0.6);
  padding: 1px 2px;
  border-radius: 3px;
  transition: background-color 0.15s, border-color 0.15s;
  display: inline-block;
}
.word-click:hover {
  background-color: rgba(208, 161, 95, 0.18);
  border-bottom-color: rgba(208, 161, 95, 1);
}
.word-click:focus {
  outline: 2px solid var(--gold-deep, #d0a15f);
  outline-offset: 2px;
}

.word-popup-overlay {
  position: fixed; inset: 0;
  z-index: 90;
  background: radial-gradient(ellipse at center, rgba(208,161,95,0.08) 0%, rgba(11,15,20,0.96) 70%);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.word-popup-overlay.hidden { display: none; }
.word-popup-card {
  width: 100%; max-width: 380px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--panel-solid, rgba(24,17,9,0.96));
  border: 1px solid var(--line-strong, #6b7a3f);
  border-radius: 18px;
  padding: 22px 22px 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-strong, #fff8ec);
}
.wp-head {
  border-bottom: 1px solid var(--line, #3a3022);
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.wp-word {
  font-size: 22px;
  font-weight: 600;
  color: var(--gold-deep, #d0a15f);
  letter-spacing: 1px;
}
.wp-zh {
  font-size: 13px;
  color: var(--muted, #a89878);
  margin-top: 2px;
}
.wp-pos {
  font-size: 11.5px;
  color: var(--muted, #a89878);
  margin-top: 4px;
  opacity: 0.8;
}
.wp-section {
  margin-bottom: 14px;
}
.wp-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-deep, #d0a15f);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.wp-section-body { font-size: 13.5px; }
.wp-row {
  display: flex;
  margin-bottom: 3px;
}
.wp-key {
  color: var(--muted, #a89878);
  min-width: 56px;
  flex-shrink: 0;
  font-size: 12px;
}
.wp-val { color: var(--ink-strong, #fff8ec); }
.wp-example-ja {
  font-size: 16px;
  color: var(--gold-deep, #d0a15f);
  margin-bottom: 4px;
  font-weight: 500;
}
.wp-example-zh {
  font-size: 13px;
  color: var(--ink-strong, #fff8ec);
  opacity: 0.85;
}
.wp-metaphor-text {
  font-size: 13.5px;
  color: var(--ink-strong, #fff8ec);
  line-height: 1.6;
}
.wp-meta {
  font-size: 11.5px;
  color: var(--muted, #a89878);
  opacity: 0.7;
  margin-top: 4px;
  font-style: italic;
}
.wp-foot {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line, #3a3022);
}
.wp-btn {
  flex: 1;
  padding: 11px;
  border: 1px solid var(--line, #3a3022);
  border-radius: 10px;
  background: rgba(255,244,224,0.04);
  color: var(--ink-strong, #fff8ec);
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.wp-btn:hover { opacity: 0.85; }
.wp-btn-record {
  background: var(--gold-deep, #d0a15f);
  color: #1a1208;
  font-weight: 600;
  border-color: var(--gold-deep, #d0a15f);
}
.wp-btn-record:disabled { opacity: 0.6; cursor: default; }
