/* ================= Warm Storybook Paper Palette (V42 Pure Hardcover Book Aesthetic) ================= */
:root {
  --outer-bg: #ebe6dc;
  --paper-bg: #f8f5ef;
  --paper-card: #ffffff;
  --paper-soft: #f1ece2;
  --ink-main: #25221f;
  --ink-sub: #5c564e;
  --ink-muted: #8c8479;
  --line: rgba(45, 38, 30, 0.1);
  --accent: #4c7c91;
  --accent-soft: rgba(76, 124, 145, 0.11);
  --warm: #c57a49;
  --warm-soft: rgba(197, 122, 73, 0.12);
  --shadow-frame: 0 22px 60px rgba(42, 34, 24, 0.14);
  --shadow-card: 0 4px 16px rgba(42, 34, 24, 0.05);
  --prose-size: 16.5px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif;
  --sans: "PingFang SC", "Microsoft YaHei UI", "Segoe UI", system-ui, sans-serif;
}

body.font-sm { --prose-size: 15px; }
body.font-md { --prose-size: 16.5px; }
body.font-lg { --prose-size: 18.5px; }

body.world-jiangnan_paper {
  --outer-bg: #e9e4d7;
  --paper-bg: #f7f3ea;
  --paper-card: #fdfbf7;
  --paper-soft: #efe9dc;
  --accent: #477466;
  --accent-soft: rgba(71, 116, 102, 0.12);
  --warm: #b55442;
  --warm-soft: rgba(181, 84, 66, 0.11);
}

body.world-mist_paper {
  --outer-bg: #e7e7ec;
  --paper-bg: #f6f6f8;
  --paper-card: #ffffff;
  --paper-soft: #eceef2;
  --accent: #5e6d94;
  --accent-soft: rgba(94, 109, 148, 0.12);
  --warm: #b68049;
  --warm-soft: rgba(182, 128, 73, 0.12);
}

body[data-paper="night"] {
  --outer-bg: #161719;
  --paper-bg: #1e2022;
  --paper-card: #26292c;
  --paper-soft: #2c2f33;
  --ink-main: #ebe5dc;
  --ink-sub: #b5afa6;
  --ink-muted: #847f77;
  --line: rgba(240, 232, 220, 0.1);
  --accent: #7faec2;
  --accent-soft: rgba(127, 174, 194, 0.16);
  --warm: #dfa06e;
  --warm-soft: rgba(223, 160, 110, 0.16);
  --shadow-frame: 0 24px 70px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--outer-bg);
  color: var(--ink-main);
  font-family: var(--sans);
  overflow: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

.app-shell {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 14px;
}

.book-frame {
  position: relative;
  width: min(440px, 100%);
  height: min(890px, 100%);
  background: var(--paper-bg);
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-frame);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (max-width: 520px) {
  .app-shell { padding: 0; }
  .book-frame {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
}

.view { display: none; flex-direction: column; height: 100%; width: 100%; overflow: hidden; }
.view.active { display: flex; }
.hidden { display: none !important; }

.kicker { display: block; font-size: 10px; letter-spacing: 2px; color: var(--accent); font-weight: 600; }

.soft-icon-btn {
  border: 1px solid var(--line);
  background: var(--paper-card);
  color: var(--ink-main);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.soft-icon-btn:hover { background: var(--paper-soft); }
.soft-icon-btn.playing { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.header-tools { display: flex; align-items: center; gap: 6px; }

.pill-switch {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
}
.switch-opt {
  border: none;
  background: transparent;
  color: var(--ink-sub);
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.switch-opt.active {
  background: var(--paper-card);
  color: var(--ink-main);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.ink-btn {
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.ink-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ink-btn.full { width: 100%; }
.ink-btn.compact { padding: 7px 18px; border-radius: 999px; }

.outline-ink-btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--paper-card);
  color: var(--ink-main);
  font-size: 13px;
  cursor: pointer;
}
.outline-ink-btn.full { width: 100%; }

.link-btn { border: none; background: transparent; color: var(--accent); font-size: 12px; cursor: pointer; padding: 4px 2px; }

/* ================= 1. Lobby ================= */
.lobby-header { padding: 20px 18px 14px; border-bottom: 1px solid var(--line); background: var(--paper-bg); flex-shrink: 0; }
.header-row { display: flex; justify-content: space-between; align-items: flex-start; }
.site-title { margin: 3px 0 0; font-family: var(--serif); font-size: 26px; font-weight: 700; letter-spacing: 1px; }
.site-sub { margin: 7px 0 12px; font-size: 12.5px; line-height: 1.55; color: var(--ink-sub); }
.narrator-strip { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-sub); }

.scroll-area { flex: 1; overflow-y: auto; padding: 16px 16px 28px; }
.section-block { margin-bottom: 22px; }
.section-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.section-label h2 { margin: 0; font-size: 14px; font-weight: 650; }
.section-label span { font-size: 11.5px; color: var(--ink-muted); }

.resume-stack { display: flex; flex-direction: column; gap: 8px; }
.resume-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.resume-row:hover { border-color: var(--accent); }
.resume-name { font-size: 14px; font-weight: 650; font-family: var(--serif); }
.resume-meta { font-size: 11.5px; color: var(--ink-sub); margin-top: 2px; }
.resume-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.mini-ghost-btn {
  border: 1px solid var(--line);
  background: var(--paper-bg);
  color: var(--ink-sub);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11.5px;
  cursor: pointer;
}
.mini-ghost-btn:hover { border-color: var(--accent); color: var(--accent); }
.mini-ghost-btn.danger:hover { border-color: #c75a4a; color: #c75a4a; }
.archive-toggle-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 13px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--paper-card);
  color: var(--ink-sub);
  font-size: 13px;
  cursor: pointer;
}
.archived-row { opacity: 0.86; }

.world-cards { display: flex; flex-direction: column; gap: 16px; }
.world-card {
  border-radius: 18px;
  overflow: hidden;
  background: var(--paper-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.world-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(42, 34, 24, 0.1); }
.world-art-box { position: relative; height: 175px; background-size: cover; background-position: center; background-color: var(--paper-soft); }
.world-tag {
  position: absolute;
  top: 11px;
  left: 11px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.88);
  color: #2b2622;
}
.world-card-content { padding: 14px 15px 15px; }
.world-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.world-card-head h3 { margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 700; }
.world-card-sub { margin: 6px 0 10px; font-size: 12.5px; line-height: 1.55; color: var(--ink-sub); }
.loc-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.loc-chip { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--paper-soft); color: var(--ink-sub); }
.enter-badge { font-size: 12px; font-weight: 600; padding: 6px 13px; border-radius: 999px; background: var(--accent); color: #fff; white-space: nowrap; }

.forge-banner { padding: 16px; border-radius: 18px; background: var(--paper-card); border: 1px dashed rgba(76, 124, 145, 0.35); }
.forge-tag { font-size: 11.5px; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.forge-banner h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 16.5px; }
.forge-banner p { margin: 0 0 12px; font-size: 12.5px; line-height: 1.55; color: var(--ink-sub); }

/* ================= 2. Slow-Breathing Prologue ================= */
.prologue-topbar { padding: 14px 16px 8px; display: flex; align-items: center; justify-content: space-between; }
.ghost-pill { border: 1px solid var(--line); background: var(--paper-card); color: var(--ink-sub); border-radius: 999px; padding: 6px 11px; font-size: 12px; cursor: pointer; }
.step-dots { display: flex; gap: 6px; }
.step-dot { width: 22px; height: 4px; border-radius: 999px; background: var(--line); transition: background 0.3s ease; }
.step-dot.active { background: var(--accent); }

.prologue-body { flex: 1; overflow-y: auto; padding: 6px 16px 26px; display: flex; flex-direction: column; gap: 14px; }
.prologue-art-wrap { margin: 0; position: relative; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-card); background: var(--paper-soft); }
.prologue-art { width: 100%; height: 210px; object-fit: cover; display: block; }
.prologue-caption { position: absolute; bottom: 10px; left: 12px; font-size: 11.5px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 252, 247, 0.88); color: #2c2620; }
.prologue-card { padding: 18px 17px 20px; border-radius: 18px; background: var(--paper-card); border: 1px solid var(--line); box-shadow: var(--shadow-card); animation: gentleIn 0.45s ease; }
@keyframes gentleIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.prologue-heading { font-size: 12px; letter-spacing: 2px; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.prologue-prose { margin: 0 0 18px; font-family: var(--serif); font-size: var(--prose-size); line-height: 1.94; color: var(--ink-main); white-space: pre-wrap; }
.prologue-question { font-size: 13.5px; font-weight: 600; color: var(--warm); margin-bottom: 10px; }
.prologue-options { display: flex; flex-direction: column; gap: 8px; }
.prologue-opt-btn { text-align: left; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper-bg); color: var(--ink-main); font-size: 13.5px; line-height: 1.45; cursor: pointer; }
.prologue-opt-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.prologue-custom-row { margin-top: 10px; display: flex; gap: 8px; }
.prologue-custom-row input { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--paper-bg); color: var(--ink-main); font-size: 13px; outline: none; }

/* ================= 3. Pure Hardcover Book Roaming View ================= */
.roam-header { padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--paper-bg); flex-shrink: 0; }
.roam-nav { display: flex; align-items: center; gap: 9px; }
.roam-place-info { flex: 1; min-width: 0; }
.roam-title { font-family: var(--serif); font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roam-sub { font-size: 11.5px; color: var(--ink-sub); margin-top: 2px; }

.story-scroll { flex: 1; overflow-y: auto; padding: 14px 18px 28px; scroll-behavior: smooth; }

.scenic-banner { margin: 0 0 14px; position: relative; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-card); background: var(--paper-soft); }
.scenic-img { width: 100%; height: 152px; object-fit: cover; display: block; transition: opacity 0.5s ease; }
.scenic-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 13px 10px;
  background: linear-gradient(180deg, transparent, rgba(24, 21, 18, 0.72));
  color: #fdfaf5;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.scenic-badge { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; }
.scenic-tagline { font-size: 11px; opacity: 0.88; }

.world-event-note {
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 11px;
  background: var(--paper-soft);
  border-left: 2.5px solid var(--accent);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-sub);
}

.story-feed { display: flex; flex-direction: column; gap: 22px; }
.entry-unit { display: flex; flex-direction: column; gap: 12px; animation: gentleIn 0.35s ease; }

.entry-dateline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-muted);
}
.entry-dateline::before, .entry-dateline::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.branch-btn {
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 11px;
  cursor: pointer;
  padding: 1px 5px;
  border-radius: 6px;
}
.branch-btn:hover { background: var(--accent-soft); color: var(--accent); }

.player-trace {
  align-self: flex-end;
  max-width: 86%;
  padding: 8px 13px;
  border-radius: 14px 14px 4px 14px;
  background: var(--accent-soft);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-main);
}

/* Seamless Published-Novel Book Prose (NO weird chat boxes or circle letter avatars!) */
.prose-block {
  font-family: var(--serif);
  font-size: var(--prose-size);
  line-height: 1.95;
  color: var(--ink-main);
  letter-spacing: 0.2px;
}
.prose-block p {
  margin: 0 0 0.85em;
  text-indent: 2em;
}
.prose-block p:last-child { margin-bottom: 0; }

.insert-slip {
  margin: 4px 4px;
  padding: 12px 15px;
  border-radius: 10px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warm);
  box-shadow: var(--shadow-card);
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.78;
  color: var(--ink-main);
}
.insert-slip-title {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 650;
  color: var(--warm);
  margin-bottom: 5px;
  letter-spacing: 0.6px;
}

.discovery-strip { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
.discovery-note { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: var(--warm-soft); color: var(--warm); }

.gentle-loading {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-sub);
}
.breathe-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: breathe 1.3s infinite ease-in-out; }
@keyframes breathe { 0%, 100% { transform: scale(0.75); opacity: 0.35; } 50% { transform: scale(1.2); opacity: 1; } }

/* ================= Bottom Roaming Composer ================= */
.roam-composer { flex-shrink: 0; padding: 10px 14px 14px; background: var(--paper-card); border-top: 1px solid var(--line); }
.armed-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; margin-bottom: 8px; border-radius: 10px; background: var(--warm-soft); color: var(--warm); font-size: 12px; }
.composer-bar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.soft-tabs { display: flex; gap: 6px; }
.soft-tab { border: 1px solid var(--line); background: var(--paper-bg); color: var(--ink-sub); border-radius: 999px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.soft-tab.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.map-pill-btn { border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }

.ideas-list { display: flex; flex-direction: column; gap: 7px; }
.idea-btn { position: relative; text-align: left; width: 100%; padding: 10px 34px 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper-bg); color: var(--ink-main); font-size: 13.5px; line-height: 1.45; cursor: pointer; }
.idea-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.idea-tweak { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: transparent; color: var(--ink-muted); cursor: pointer; font-size: 13px; padding: 4px; }

.write-box textarea, #forge-idea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper-bg);
  color: var(--ink-main);
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.55;
  resize: none;
  outline: none;
}
.write-box textarea:focus, #forge-idea:focus { border-color: var(--accent); }
.write-footer { margin-top: 7px; display: flex; align-items: center; justify-content: space-between; }

/* ================= Sheets / Dossier / Map ================= */
.sheet-mask { position: absolute; inset: 0; z-index: 40; background: rgba(24, 21, 18, 0.42); backdrop-filter: blur(4px); display: flex; align-items: flex-end; }
.sheet-card { width: 100%; max-height: 82%; background: var(--paper-bg); border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; overflow: hidden; animation: slideUp 0.22s ease; }
.sheet-card.tall { max-height: 90%; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0.7; } to { transform: translateY(0); opacity: 1; } }
.sheet-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; background: var(--paper-card); }
.sheet-head h3 { margin: 0; font-family: var(--serif); font-size: 16.5px; }
.sheet-desc { margin: 3px 0 0; font-size: 11.5px; color: var(--ink-sub); }
.close-btn { border: 1px solid var(--line); background: var(--paper-bg); color: var(--ink-sub); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; flex-shrink: 0; }
.sheet-tabbar { display: flex; border-bottom: 1px solid var(--line); background: var(--paper-card); }
.sheet-tab { flex: 1; border: none; background: transparent; color: var(--ink-sub); padding: 10px 6px; font-size: 12.5px; cursor: pointer; }
.sheet-tab.active { color: var(--accent); border-bottom: 2px solid var(--accent); font-weight: 600; }
.sheet-scroll { padding: 14px 16px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 11px; }

.map-card { display: flex; gap: 12px; padding: 11px; border-radius: 14px; background: var(--paper-card); border: 1px solid var(--line); box-shadow: var(--shadow-card); cursor: pointer; }
.map-card:hover { border-color: var(--accent); }
.map-card.here { border-color: var(--accent); background: var(--accent-soft); }
.map-thumb { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--paper-soft); flex-shrink: 0; }
.map-info { flex: 1; min-width: 0; }
.map-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.map-name { font-family: var(--serif); font-size: 15px; font-weight: 700; }
.heat-tag { font-size: 10.5px; padding: 2px 7px; border-radius: 999px; background: var(--paper-soft); color: var(--ink-sub); }
.heat-tag.lively { background: var(--warm-soft); color: var(--warm); }
.heat-tag.stirring { background: var(--accent-soft); color: var(--accent); }
.map-tagline { font-size: 11.5px; color: var(--ink-sub); margin-top: 3px; }
.map-rumor { margin-top: 6px; font-size: 12px; line-height: 1.45; color: var(--ink-main); font-family: var(--serif); }

.paper-item-card { padding: 12px 13px; border-radius: 13px; background: var(--paper-card); border: 1px solid var(--line); }
.paper-item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.paper-item-title { font-size: 14px; font-weight: 650; }
.paper-item-text { margin: 5px 0 0; font-size: 12.5px; line-height: 1.58; color: var(--ink-sub); }

.npc-dossier-card {
  display: flex;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 14px;
  background: var(--paper-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.npc-portrait-img {
  width: 66px;
  height: 66px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.npc-influence-box {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-main);
}
.npc-influence-box div { margin-bottom: 3px; }
.inf-label { color: var(--warm); font-weight: 600; }

.menu-group { padding: 12px; border-radius: 13px; background: var(--paper-card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.menu-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; gap: 10px; }
.menu-note { font-size: 12px; color: var(--ink-muted); line-height: 1.5; margin: 0; }

.form-label { font-size: 12.5px; color: var(--ink-sub); font-weight: 600; }
.sample-row { display: flex; flex-wrap: wrap; gap: 6px; }
.sample-pill { border: 1px solid var(--line); background: var(--paper-card); color: var(--ink-sub); border-radius: 999px; padding: 5px 10px; font-size: 11.5px; cursor: pointer; }
.sample-pill:hover { border-color: var(--accent); color: var(--accent); }
.theme-pick-row { display: flex; flex-direction: column; gap: 7px; }
.theme-opt { text-align: left; border: 1px solid var(--line); background: var(--paper-card); color: var(--ink-main); border-radius: 10px; padding: 9px 11px; font-size: 12.5px; cursor: pointer; }
.theme-opt.active { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-sub); }
.soft-notice { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; }

.opening-loader { position: absolute; inset: 0; z-index: 55; background: rgba(248, 245, 239, 0.92); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 24px; }
body[data-paper="night"] .opening-loader { background: rgba(26, 28, 30, 0.92); }
.loader-paper { text-align: center; max-width: 300px; }
.loader-ripple { width: 38px; height: 38px; margin: 0 auto 14px; border-radius: 50%; border: 2px solid var(--accent); animation: breathe 1.4s infinite ease-in-out; }
.loader-paper h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 17px; }
.loader-paper p { margin: 0; font-size: 12.5px; color: var(--ink-sub); line-height: 1.55; }

.sim-panel { width: 360px; height: min(890px, 100%); background: var(--paper-bg); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-frame); display: flex; flex-direction: column; overflow: hidden; }
@media (max-width: 880px) { .sim-panel { position: fixed; inset: 14px; width: auto; height: auto; z-index: 65; } }
.empty-tip { text-align: center; padding: 24px 12px; font-size: 13px; color: var(--ink-muted); }

/* Private Study Passcode Gate */
.gate-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px 20px; }
.gate-card { width: 100%; max-width: 330px; padding: 28px 22px; border-radius: 18px; background: var(--paper-card); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(42, 34, 24, 0.08); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.gate-title { margin: 2px 0 0; font-family: var(--serif); font-size: 26px; letter-spacing: 2px; color: var(--ink-main); }
.gate-desc { margin: 0 0 6px; font-size: 13px; line-height: 1.6; color: var(--ink-sub); }
.gate-input { width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper-bg); color: var(--ink-main); font-size: 15px; text-align: center; outline: none; }
.gate-input:focus { border-color: var(--accent); }
.gate-error { font-size: 12.5px; color: #b54a3b; min-height: 18px; }
