/* =========================================================
   《武道》固定背景试玩切片
   想改配色：先改 :root 里的变量。
   想改布局：先看 .game-grid / .narrative / .choice。
   ========================================================= */

:root {
  --ink: #0b1114;
  --ink-2: #101a1f;
  --ink-3: #17252b;
  --paper: #e9e0cf;
  --paper-2: #ded2bc;
  --paper-3: #d2c3a9;
  --text: #1d2527;
  --muted: #6f7d7c;
  --mist: #9fb2b2;
  --cinnabar: #a74336;
  --cinnabar-2: #c05a48;
  --gold: #b9975b;
  --line: rgba(233, 224, 207, 0.16);
  --line-dark: rgba(29, 37, 39, 0.18);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--paper);
  background-color: var(--ink);
  background-image:
    radial-gradient(ellipse at 18% 8%, rgba(87, 116, 116, 0.22), transparent 42%),
    radial-gradient(ellipse at 82% 88%, rgba(84, 58, 44, 0.2), transparent 46%),
    linear-gradient(145deg, #0a1114 0%, #0d171b 48%, #0a1114 100%);
  font-family: var(--sans);
  line-height: 1.7;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  background: radial-gradient(ellipse at center, transparent 54%, rgba(0, 0, 0, 0.42) 100%);
}

.rain {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image: repeating-linear-gradient(
    102deg,
    transparent 0 34px,
    rgba(182, 203, 202, 0.055) 35px 36px,
    transparent 37px 72px
  );
  animation: rain-drift 20s linear infinite;
}

@keyframes rain-drift {
  from {
    transform: translate3d(0, -4%, 0);
  }
  to {
    transform: translate3d(-4%, 8%, 0);
  }
}

::selection {
  background: rgba(167, 67, 54, 0.38);
  color: #fff8eb;
}

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

button {
  color: inherit;
}

a {
  color: var(--gold);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.slash {
  color: var(--cinnabar-2);
  font-weight: 400;
}

/* ---------- 按钮 ---------- */

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(233, 224, 207, 0.04);
  color: var(--paper);
  padding: 11px 17px;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, color 160ms ease;
}

.btn:hover:not(:disabled) {
  background: rgba(233, 224, 207, 0.1);
  border-color: rgba(233, 224, 207, 0.42);
  transform: translateY(-1px);
}

.btn:focus-visible,
.choice:focus-visible,
.identity-card:focus-visible,
.talent-card:focus-visible,
.combat-btn:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.btn.primary {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
  font-weight: 700;
}

.btn.primary:hover:not(:disabled) {
  background: #f5eddf;
  border-color: #f5eddf;
}

.btn.ghost {
  background: transparent;
}

.btn.danger {
  border-color: rgba(192, 90, 72, 0.6);
  color: #e7a79c;
}

.btn.small {
  padding: 7px 12px;
  font-size: 12px;
}

.btn.big {
  padding: 15px 28px;
  font-size: 16px;
}

/* ---------- 标题页 ---------- */

.start-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 0;
}

.start-brand,
.start-card,
.start-footer {
  width: min(780px, 100%);
}

.start-mist {
  position: absolute;
  inset: 6% -12% auto -12%;
  height: 56vh;
  background:
    radial-gradient(ellipse at 30% 48%, rgba(129, 156, 154, 0.18), transparent 58%),
    radial-gradient(ellipse at 70% 52%, rgba(129, 156, 154, 0.12), transparent 62%);
  filter: blur(22px);
  pointer-events: none;
}

.start-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--mist);
  margin-bottom: 26px;
}

.brand-mark,
.mini-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(233, 224, 207, 0.36);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1;
}

.brand-line {
  width: 38px;
  height: 1px;
  background: var(--line);
}

.brand-text {
  font-size: 11px;
  letter-spacing: 0.24em;
}

.start-card {
  width: min(780px, 100%);
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(233, 224, 207, 0.055), transparent 38%),
    rgba(11, 17, 20, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  animation: rise 700ms ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(64px, 12vw, 108px);
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  color: #f1e8d8;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}

.subtitle {
  margin: 18px 0 22px;
  color: var(--cinnabar-2);
  font-family: var(--serif);
  font-size: clamp(19px, 2.8vw, 28px);
  font-weight: 400;
  letter-spacing: 0.08em;
}

.intro {
  max-width: 620px;
  color: #c8d0ca;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.95;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 26px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.meta-row span + span::before {
  content: "·";
  margin-right: 18px;
  color: rgba(233, 224, 207, 0.3);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.save-hint {
  margin: 14px 0 0;
  color: var(--gold);
  font-size: 12px;
}

.notice {
  margin: 24px 0 0;
  color: #7f8f8b;
  font-size: 12px;
  line-height: 1.8;
}

.start-footer {
  margin-top: 18px;
  color: #687674;
  font-size: 11px;
  letter-spacing: 0.12em;
}

/* ---------- 角色创建 ---------- */

.creation-shell {
  padding: 26px 0 56px;
}

.creation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.creation-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.creation-main {
  margin-top: 8px;
}

.create-section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px 14px;
  align-items: start;
  margin-bottom: 18px;
}

.section-head .step {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(185, 151, 91, 0.45);
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.section-head h2 {
  margin: 1px 0 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.section-head p {
  grid-column: 2;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.section-head > .btn {
  grid-column: 3;
  grid-row: 1;
}

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

.identity-card {
  appearance: none;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(233, 224, 207, 0.035);
  padding: 18px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.identity-card:hover {
  border-color: rgba(233, 224, 207, 0.4);
  background: rgba(233, 224, 207, 0.065);
  transform: translateY(-2px);
}

.identity-card.selected {
  border-color: var(--gold);
  background: rgba(185, 151, 91, 0.11);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.card-head strong {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
}

.card-head em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.identity-card .tagline {
  display: block;
  margin-top: 2px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 13px;
}

.identity-card .card-desc,
.talent-card .card-desc {
  display: block;
  margin: 10px 0 12px;
  color: #aebbb6;
  font-size: 13px;
  line-height: 1.75;
}

.talent-card .card-desc {
  margin: 8px 0 0;
  color: #aab7b2;
  font-size: 12px;
  line-height: 1.7;
}

.mini-attrs {
  display: block;
  color: #7f908c;
  font-size: 11px;
  letter-spacing: 0.02em;
}

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

.talent-card {
  position: relative;
  appearance: none;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(233, 224, 207, 0.035);
  padding: 16px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.talent-card:hover {
  border-color: rgba(233, 224, 207, 0.4);
  background: rgba(233, 224, 207, 0.06);
  transform: translateY(-2px);
}

.talent-card.selected {
  border-color: var(--gold);
  background: rgba(185, 151, 91, 0.1);
}

.talent-card .rarity {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.talent-card strong {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
}

.rarity-玄 {
  border-color: rgba(111, 158, 190, 0.4) !important;
}
.rarity-玄 .rarity {
  color: #8db9d6;
}
.rarity-地 {
  border-color: rgba(164, 129, 190, 0.42) !important;
}
.rarity-地 .rarity {
  color: #c4a4db;
}
.rarity-黄 {
  border-color: rgba(133, 166, 116, 0.32) !important;
}
.rarity-黄 .rarity {
  color: #a8c596;
}
.rarity-凡 .rarity {
  color: #899590;
}

.attr-list {
  max-width: 680px;
  border-top: 1px solid var(--line);
}

.attr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.attr-row > span:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.attr-row b {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.attr-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.attr-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.attr-controls button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
}

.attr-controls button:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}

.attr-controls button:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.attr-controls b {
  min-width: 22px;
  text-align: center;
}

.points {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.points b {
  color: var(--gold);
}

.name-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  max-width: 460px;
}

.name-row label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

input,
textarea,
select {
  border: 1px solid var(--line);
  background: rgba(233, 224, 207, 0.05);
  color: var(--paper);
  border-radius: 2px;
  padding: 10px 12px;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
}

.name-row input {
  width: 100%;
}

.create-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 0;
}

.create-actions .muted {
  margin: 0;
  font-size: 12px;
}

/* ---------- 游戏主界面 ---------- */

.game-shell {
  padding-bottom: 40px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 16, 19, 0.82);
  backdrop-filter: blur(10px);
}

.top-left,
.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-mark {
  width: 28px;
  height: 28px;
  font-size: 14px;
}

.top-chapter {
  color: #a8b5b0;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.save-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7f9b8e;
  box-shadow: 0 0 10px rgba(127, 155, 142, 0.65);
}

.save-text {
  color: #6e807b;
  font-size: 11px;
}

.game-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  grid-template-areas: "side main";
  gap: 26px;
  padding: 26px 0;
  align-items: start;
}

.main-col {
  min-width: 0;
  grid-area: main;
}

.scene-head {
  margin-bottom: 16px;
}

.scene-location {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.scene-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.scene-time {
  margin: 6px 0 0;
  color: #7f908c;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.narrative {
  position: relative;
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid rgba(233, 224, 207, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(180deg, #eee7d9 0%, #e4dac7 100%);
  color: var(--text);
  box-shadow: var(--shadow);
  font-family: var(--serif);
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 2;
  animation: page-in 420ms ease both;
}

.narrative::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(29, 37, 39, 0.1);
  pointer-events: none;
}

.narrative p {
  margin: 0 0 1.08em;
}

.narrative p:last-child {
  margin-bottom: 0;
}

.narrative strong {
  color: #7f2e26;
  font-weight: 700;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.choices {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.choice {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(233, 224, 207, 0.035);
  padding: 15px 16px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.choice:hover {
  border-color: rgba(185, 151, 91, 0.6);
  background: rgba(233, 224, 207, 0.075);
  transform: translateX(3px);
}

.choice-key {
  color: var(--cinnabar-2);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
}

.choice-text {
  color: #d6d9cf;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.75;
}

.free-box {
  margin-top: 14px;
  border: 1px dashed rgba(233, 224, 207, 0.22);
  background: rgba(233, 224, 207, 0.025);
  padding: 12px 14px;
}

.free-box summary {
  color: #b6c0ba;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.free-note {
  margin: 8px 0;
  color: #72827e;
  font-size: 11px;
}

.free-box textarea {
  width: 100%;
  resize: vertical;
  min-height: 72px;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.7;
}

.free-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.kbd {
  color: #697a76;
  font-size: 10px;
  letter-spacing: 0.05em;
}

/* ---------- 侧栏 ---------- */

.side-col {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 70px;
  grid-area: side;
}

.side-card {
  border: 1px solid var(--line);
  background: rgba(16, 26, 31, 0.74);
  padding: 17px;
  backdrop-filter: blur(5px);
}

.player-card {
  background:
    linear-gradient(135deg, rgba(185, 151, 91, 0.1), transparent 50%),
    rgba(16, 26, 31, 0.86);
}

.player-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.player-sub {
  margin: 4px 0 16px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 12px;
}

.stat-block {
  margin-bottom: 12px;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: #9eaca7;
  font-size: 11px;
}

.stat-line b {
  color: #d9ded5;
  font-weight: 500;
}

.bar {
  height: 5px;
  margin-top: 4px;
  background: rgba(233, 224, 207, 0.1);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  transition: width 260ms ease;
}

.bar.hp i {
  background: linear-gradient(90deg, #8c3d34, #c05a48);
}

.bar.st i {
  background: linear-gradient(90deg, #6f7f57, #a8b87f);
}

.bar.poise i {
  background: linear-gradient(90deg, #6e7f8d, #9bb4c2);
}

.bar.enemy i {
  background: linear-gradient(90deg, #7c2e27, #c05a48);
}

.talent-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.talent-line .rarity {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  font-size: 10px;
}

.talent-desc {
  margin: 8px 0 0;
  color: #91a09b;
  font-size: 11px;
  line-height: 1.7;
}

.hint-btn {
  width: 100%;
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.hint-btn span {
  color: var(--muted);
  font-size: 10px;
}

.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.side-title h3 {
  margin: 0;
  color: #d6d9cf;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.side-title span {
  color: var(--muted);
  font-size: 10px;
}

.clue-list,
.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow: auto;
}

.clue-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid rgba(233, 224, 207, 0.08);
  color: #a8b5b0;
  font-size: 11px;
  line-height: 1.65;
}

.clue-list li:first-child {
  border-top: 0;
}

.clue-list li .clue-index {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.clue-list li .clue-text {
  min-width: 0;
  color: #a8b5b0;
  font-size: 11px;
  letter-spacing: 0;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.clue-list li .clue-text .text-hint {
  color: #d8c08c;
  text-decoration-color: var(--gold);
}

.clue-list li.empty,
.item-list li.empty {
  display: block;
  color: #687874;
  font-size: 11px;
}

.item-list li {
  padding: 6px 0;
  border-top: 1px solid rgba(233, 224, 207, 0.08);
  color: #a8b5b0;
  font-size: 11px;
}

.item-list li:first-child {
  border-top: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chips span {
  border: 1px solid rgba(233, 224, 207, 0.16);
  padding: 4px 8px;
  color: #9eaca7;
  font-size: 10px;
  line-height: 1.4;
}

.status-card .muted {
  margin: 12px 0 0;
}

/* ---------- 战斗 ---------- */

.combat-panel {
  border: 1px solid rgba(192, 90, 72, 0.32);
  background:
    linear-gradient(160deg, rgba(167, 67, 54, 0.1), transparent 46%),
    rgba(16, 26, 31, 0.78);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--shadow);
}

.enemy-block {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.enemy-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.enemy-title h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.enemy-title span {
  color: #c78d80;
  font-size: 11px;
}

.combat-log {
  max-height: 260px;
  overflow: auto;
  margin: 16px 0;
  padding: 2px 0 2px 14px;
  border-left: 2px solid rgba(192, 90, 72, 0.5);
}

.combat-log p {
  margin: 0 0 9px;
  color: #b9c2bc;
  font-size: 13px;
  line-height: 1.75;
}

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

.combat-btn {
  appearance: none;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(233, 224, 207, 0.035);
  padding: 12px 13px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 2px 8px;
  transition: border-color 160ms ease, background 160ms ease;
}

.combat-btn:hover {
  border-color: rgba(192, 90, 72, 0.7);
  background: rgba(192, 90, 72, 0.09);
}

.combat-btn b {
  grid-row: span 2;
  color: var(--cinnabar-2);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
}

.combat-btn span {
  color: #e0e2d8;
  font-size: 14px;
}

.combat-btn em {
  color: #7e8e89;
  font-size: 10px;
  font-style: normal;
  line-height: 1.5;
}

.combat-btn.danger {
  border-color: rgba(192, 90, 72, 0.32);
}

.combat-note {
  margin: 14px 0 0;
}

/* ---------- 结局 ---------- */

.ending-shell {
  padding: 26px 0 60px;
}

.ending-card {
  max-width: 900px;
  margin: 22px auto 0;
  padding: clamp(26px, 5vw, 54px);
  border: 1px solid rgba(233, 224, 207, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(180deg, #eee7d9 0%, #e1d6c2 100%);
  color: var(--text);
  box-shadow: var(--shadow);
}

.ending-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 8vw, 72px);
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.1;
}

.ending-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 18px 0 24px;
  padding: 10px 0;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  color: #6b7776;
  font-size: 11px;
}

.ending-meta span + span::before {
  content: "·";
  margin-right: 16px;
  color: rgba(29, 37, 39, 0.32);
}

.ending-text {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 2;
}

.ending-text p {
  margin-bottom: 1em;
}

.ending-stats {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line-dark);
}

.ending-stats h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.ending-stats .chips span {
  border-color: rgba(29, 37, 39, 0.18);
  color: #5e6a68;
}

.feedback-card {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
}

.feedback-card .section-head .step {
  border-color: rgba(29, 37, 39, 0.28);
  color: #7b5b38;
}

.feedback-card .section-head h2 {
  color: var(--text);
}

.feedback-card .section-head p {
  color: #6b7776;
}

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

.feedback-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(29, 37, 39, 0.12);
  color: #4e5a58;
  font-size: 12px;
}

.feedback-row.full {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.feedback-row select {
  min-width: 72px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.34);
  border-color: rgba(29, 37, 39, 0.2);
}

.feedback-row textarea {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.34);
  border-color: rgba(29, 37, 39, 0.2);
  font-family: var(--serif);
  font-size: 13px;
  resize: vertical;
}

.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.feedback-card .btn {
  color: var(--text);
  border-color: rgba(29, 37, 39, 0.24);
}

.feedback-card .btn.primary {
  color: var(--paper);
  background: #263235;
  border-color: #263235;
}

.feedback-card .btn.ghost {
  background: transparent;
}

.feedback-card .notice {
  color: #6b7776;
}

/* ---------- 覆盖层 / 弹窗 ---------- */

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 20px;
  place-items: center;
  background: rgba(4, 8, 10, 0.72);
  backdrop-filter: blur(8px);
}

.overlay.open {
  display: grid;
}

.modal {
  width: min(640px, 100%);
  max-height: 86vh;
  overflow: auto;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(233, 224, 207, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(180deg, #eee7d9 0%, #e2d8c5 100%);
  color: var(--text);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
  animation: pop 220ms ease both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}

.result-text,
.hint-text {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.95;
  margin-bottom: 22px;
}

.result-text p,
.hint-text p {
  margin-bottom: 1em;
}

.result-text strong,
.hint-text strong {
  color: #7f2e26;
}

.menu-modal {
  display: grid;
  gap: 8px;
}

.menu-modal h2 {
  margin-bottom: 0;
}

.menu-modal .btn {
  color: var(--text);
  border-color: rgba(29, 37, 39, 0.24);
  text-align: left;
}

.menu-modal .btn.primary {
  color: var(--paper);
  background: #263235;
  border-color: #263235;
}

.menu-modal .btn.ghost {
  background: transparent;
}

.menu-modal .btn.danger {
  color: #8b332a;
  border-color: rgba(139, 51, 42, 0.4);
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 16px;
  border: 1px solid rgba(29, 37, 39, 0.2);
  background: var(--paper);
  color: var(--text);
  font-size: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

/* ---------- 页脚 ---------- */

.game-footer {
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  color: #63736f;
  font-size: 10px;
  letter-spacing: 0.06em;
}

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

@media (max-width: 980px) {
  .game-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "side";
  }

  .side-col {
    position: static;
    grid-template-columns: 1fr;
    grid-area: side;
  }

  .side-card {
    margin: 0;
  }

  .clue-list {
    max-height: 220px;
  }

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

@media (max-width: 720px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .start-card {
    padding: 26px 22px;
  }

  .title {
    font-size: 64px;
  }

  .subtitle {
    font-size: 20px;
  }

  .intro {
    font-size: 15px;
  }

  .creation-head {
    flex-wrap: wrap;
  }

  .identity-grid,
  .talent-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    grid-template-columns: auto 1fr;
  }

  .section-head > .btn {
    grid-column: 2;
    grid-row: auto;
    justify-self: start;
    margin-top: 6px;
  }

  .create-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .create-actions .btn {
    width: 100%;
  }

  .topbar {
    padding: 9px 0;
  }

  .save-text {
    display: none;
  }

  .narrative {
    padding: 22px 19px;
    font-size: 16px;
    line-height: 1.95;
  }

  .choice {
    grid-template-columns: 28px 1fr;
    padding: 13px;
  }

  .choice-text {
    font-size: 15px;
  }

  .combat-actions {
    grid-template-columns: 1fr;
  }

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

  .ending-card {
    padding: 24px 18px;
  }

  .ending-meta span + span::before {
    margin-right: 10px;
  }

  .meta-row span + span::before {
    margin-right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .rain {
    display: none;
  }
}

/* ---------- 文本提示 / 背包 / 作弊菜单 ---------- */

.text-hint {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--cinnabar-2);
  text-underline-offset: 3px;
}

.narrative .text-hint {
  color: #7f2e26;
  background: linear-gradient(transparent 62%, rgba(185, 151, 91, 0.28) 62%);
}

.choice .text-hint,
.combat-log .text-hint {
  color: var(--gold);
}

.bag-card .bag-meta {
  margin: 0 0 8px;
  color: #8fa09a;
  font-size: 11px;
  line-height: 1.6;
}

.bag-card .bag-meta b.bad {
  color: #d38b7d;
  font-weight: 500;
}

.bar.bag i {
  background: linear-gradient(90deg, #6c7f68, #a6b58a);
}

.bag-list {
  max-height: 180px;
}

.bag-list li.wet {
  color: #d1a396;
}

.bag-list li.wet em {
  color: #d38b7d;
  font-size: 9px;
  font-style: normal;
  margin-left: 4px;
}

.cheat-modal {
  display: grid;
  gap: 4px;
}

.cheat-modal h2 {
  margin-bottom: 4px;
}

.cheat-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(29, 37, 39, 0.14);
}

.cheat-row b {
  display: block;
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.cheat-row p {
  max-width: 430px;
  margin: 4px 0 0;
  color: #6b7776;
  font-size: 12px;
  line-height: 1.7;
}

.cheat-switch {
  flex: 0 0 auto;
  min-width: 58px;
  height: 34px;
  border: 1px solid rgba(29, 37, 39, 0.28);
  background: transparent;
  color: #6b7776;
  cursor: pointer;
  font-size: 12px;
}

.cheat-switch.on {
  background: #2d3a35;
  border-color: #2d3a35;
  color: var(--paper);
}

.cheat-modal .btn {
  color: var(--text);
  border-color: rgba(29, 37, 39, 0.24);
  text-align: left;
}

.cheat-modal .btn.primary {
  color: var(--paper);
  background: #263235;
  border-color: #263235;
}

.bag-modal h2 {
  font-size: 26px;
}

.bag-modal p {
  font-size: 14px;
  line-height: 1.85;
}

.bag-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 12px;
}

.bag-modal .btn {
  color: var(--text);
  border-color: rgba(29, 37, 39, 0.24);
}

.bag-modal .btn.primary {
  color: var(--paper);
  background: #263235;
  border-color: #263235;
}

.bag-modal .muted {
  color: #6b7776;
}

@media (max-width: 720px) {
  .cheat-row {
    gap: 10px;
  }

  .cheat-row p {
    font-size: 11px;
  }

  .bag-actions .btn {
    width: 100%;
  }
}

/* ---------- 四步创建 / 更明显的按钮 ---------- */

.btn {
  background: rgba(233, 224, 207, 0.1);
  border-color: rgba(233, 224, 207, 0.34);
}

.btn:hover:not(:disabled) {
  background: rgba(233, 224, 207, 0.18);
  border-color: rgba(233, 224, 207, 0.58);
}

.choice {
  background: rgba(233, 224, 207, 0.075);
  border-color: rgba(233, 224, 207, 0.26);
}

.choice:hover {
  background: rgba(233, 224, 207, 0.15);
  border-color: rgba(185, 151, 91, 0.78);
}

.identity-card,
.talent-card {
  background: rgba(233, 224, 207, 0.055);
}

.identity-card.selected,
.talent-card.selected {
  background: rgba(185, 151, 91, 0.15);
}

.combat-btn {
  background: rgba(233, 224, 207, 0.075);
  border-color: rgba(233, 224, 207, 0.24);
}

.combat-btn:hover {
  background: rgba(192, 90, 72, 0.15);
}

.creation-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.creation-step {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid transparent;
  color: #6e807b;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.creation-step b {
  color: #8fa09a;
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 500;
}

.creation-step.active {
  border-color: rgba(185, 151, 91, 0.55);
  background: rgba(185, 151, 91, 0.09);
  color: var(--paper);
}

.creation-step.active b {
  color: var(--gold);
}

.creation-step.done {
  color: #8fa09a;
}

.creation-step.done b {
  color: #6c7f68;
}

.creation-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.clue-badge {
  display: inline-block;
  margin: 8px 0 0;
  padding: 2px 7px;
  border: 1px solid rgba(233, 224, 207, 0.18);
  color: #9eaca7;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.clue-badge.clue-1 {
  border-color: rgba(192, 90, 72, 0.5);
  color: #d38b7d;
}

.clue-badge.clue-2 {
  border-color: rgba(185, 151, 91, 0.5);
  color: var(--gold);
}

.clue-badge.clue-3 {
  border-color: rgba(111, 158, 190, 0.5);
  color: #9dc5dc;
}

.balance-note {
  display: block;
  margin-top: 8px;
  color: #8fa09a;
  font-size: 11px;
  line-height: 1.6;
}

.creation-summary {
  display: grid;
  gap: 8px;
  margin: 4px 0 18px;
  padding: 16px;
  border: 1px solid rgba(233, 224, 207, 0.18);
  background: rgba(233, 224, 207, 0.04);
}

.creation-summary > div {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(233, 224, 207, 0.08);
}

.creation-summary > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.creation-summary span {
  color: var(--muted);
  font-size: 11px;
}

.creation-summary b {
  color: #d6d9cf;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.creation-summary em {
  color: var(--gold);
  font-size: 11px;
  font-style: normal;
}

.clue-quality {
  margin: -8px 0 12px;
  color: #8fa09a;
  font-size: 10px;
  line-height: 1.6;
}

.name-row .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .creation-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .creation-nav .btn {
    width: 100%;
  }

  .creation-summary > div {
    grid-template-columns: 44px 1fr;
  }

  .creation-summary em {
    grid-column: 2;
  }
}

/* ---------- 过往经历 / 重置 ---------- */

.history-modal {
  width: min(760px, 100%);
}

.history-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  max-height: 58vh;
  overflow: auto;
  padding-right: 4px;
}

.history-chapter {
  margin: 12px 0 2px;
  color: #7b5b38;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.history-node {
  border: 1px solid rgba(29, 37, 39, 0.16);
  background: rgba(255, 255, 255, 0.18);
}

.history-node summary {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.history-node summary::-webkit-details-marker {
  display: none;
}

.history-index {
  color: var(--cinnabar);
  font-family: var(--serif);
  font-size: 11px;
}

.history-node summary b {
  color: #263235;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
}

.history-node summary em {
  color: #7a8580;
  font-size: 10px;
  font-style: normal;
}

.history-node[open] summary {
  border-bottom: 1px solid rgba(29, 37, 39, 0.12);
}

.history-body {
  padding: 9px 12px 11px;
}

.history-body p {
  margin: 0 0 6px;
  color: #56615e;
  font-size: 11px;
  line-height: 1.7;
}

.history-body p:last-child {
  margin-bottom: 0;
}

.history-body p span {
  display: inline-block;
  min-width: 34px;
  color: #8a6b45;
  font-size: 10px;
}

.reset-warning {
  margin: 14px 0;
  padding: 12px;
  border-left: 3px solid var(--cinnabar);
  background: rgba(167, 67, 54, 0.08);
  color: #7f2e26;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.8;
}

@media (max-width: 720px) {
  .history-row {
    grid-template-columns: 1fr;
  }

  .history-row > .btn {
    justify-self: end;
  }

  .history-node summary {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .history-node summary em {
    grid-column: 2;
  }
}

/* ---------- AI 叙事状态 ---------- */

.ai-status {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-left: 2px solid var(--gold);
  background: rgba(185, 151, 91, 0.12);
  color: #6b5a3e;
  font-size: 11px;
  line-height: 1.6;
}

.ai-loading h2 {
  margin-bottom: 8px;
}

.ai-loading .muted {
  color: #6b7776;
}

.ai-result .eyebrow {
  color: #7b5b38;
}

@media (max-width: 720px) {
  .ai-status {
    font-size: 10px;
  }
}

/* 所有浅色弹窗里的普通按钮都用深色文字，避免“看不见” */
.modal .btn {
  color: var(--text);
  border-color: rgba(29, 37, 39, 0.24);
}

.modal .btn.primary {
  color: var(--paper);
  background: #263235;
  border-color: #263235;
}

.modal .btn.danger {
  color: #8b332a;
  border-color: rgba(139, 51, 42, 0.42);
}

/* ---------- 首次画风设置 / 大厅设置 ---------- */

.style-shell {
  padding: 26px 0 60px;
}

.style-main {
  max-width: 760px;
  margin: 0 auto;
}

.style-intro {
  margin: 18px 0;
  color: #aebbb6;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.9;
}

.style-form {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(233, 224, 207, 0.04);
}

.style-options {
  display: grid;
  gap: 8px;
}

.style-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(233, 224, 207, 0.1);
  cursor: pointer;
}

.style-check input {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  accent-color: var(--gold);
}

.style-check span {
  display: grid;
  gap: 2px;
}

.style-check b {
  color: #d6d9cf;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.style-check em {
  color: #8fa09a;
  font-size: 11px;
  font-style: normal;
  line-height: 1.6;
}

.style-custom {
  display: grid;
  gap: 6px;
}

.style-custom > span,
.style-scope > span {
  color: #aebbb6;
  font-size: 12px;
}

.style-custom textarea {
  width: 100%;
  resize: vertical;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.7;
}

.style-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  padding-top: 4px;
}

.style-scope label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #c8d0ca;
  font-size: 12px;
  cursor: pointer;
}

.style-scope input {
  accent-color: var(--gold);
}

.style-notice {
  margin: 0;
  color: var(--gold);
  font-size: 11px;
  line-height: 1.7;
}

.style-modal {
  width: min(680px, 100%);
}

.style-modal h2 {
  margin-bottom: 6px;
}

.style-status {
  margin: 14px 0;
  padding: 9px 11px;
  border-left: 2px solid var(--gold);
  background: rgba(185, 151, 91, 0.12);
  color: #6b5a3e;
  font-size: 11px;
}

.style-modal .style-form {
  border-color: rgba(29, 37, 39, 0.16);
  background: rgba(255, 255, 255, 0.16);
}

.style-modal .style-check {
  border-color: rgba(29, 37, 39, 0.12);
}

.style-modal .style-check b {
  color: #263235;
}

.style-modal .style-check em,
.style-modal .style-custom > span,
.style-modal .style-scope > span,
.style-modal .style-scope label {
  color: #5f6b68;
}

.style-modal .style-custom textarea {
  color: var(--text);
  background: rgba(255, 255, 255, 0.34);
  border-color: rgba(29, 37, 39, 0.2);
}

.style-modal .style-notice {
  color: #7b5b38;
}

/* ---------- 反馈气泡 / 面板 ---------- */

.feedback-bubble {
  position: fixed;
  top: 46%;
  right: 0;
  z-index: 45;
  width: 34px;
  height: 96px;
  border: 1px solid rgba(29, 37, 39, 0.28);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: var(--paper);
  color: #263235;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.12em;
  writing-mode: vertical-rl;
  cursor: pointer;
  box-shadow: -8px 8px 28px rgba(0, 0, 0, 0.25);
}

.feedback-bubble:hover {
  background: #f5eddf;
}

.feedback-panel {
  position: fixed;
  right: 18px;
  bottom: 76px;
  z-index: 70;
  display: none;
  width: min(360px, calc(100vw - 36px));
  max-height: 78vh;
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(29, 37, 39, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 40%),
    linear-gradient(180deg, #eee7d9 0%, #e2d8c5 100%);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.feedback-panel.open {
  display: block;
}

.feedback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.feedback-head b {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

.feedback-head button {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(29, 37, 39, 0.24);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
}

.feedback-field {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}

.feedback-field > span {
  color: #6b7776;
  font-size: 11px;
}

.feedback-field select,
.feedback-field textarea {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.34);
  border-color: rgba(29, 37, 39, 0.2);
  font-family: var(--serif);
  font-size: 13px;
}

.feedback-shot-preview {
  display: none;
  margin: 8px 0;
  border: 1px solid rgba(29, 37, 39, 0.18);
}

.feedback-shot-preview.show {
  display: block;
}

.feedback-shot-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.feedback-panel .btn {
  color: var(--text);
  border-color: rgba(29, 37, 39, 0.24);
}

.feedback-panel .btn.primary {
  color: var(--paper);
  background: #263235;
  border-color: #263235;
}

.feedback-note {
  margin: 12px 0 0;
  color: #6b7776;
  font-size: 10px;
  line-height: 1.7;
}

@media (max-width: 720px) {
  .feedback-bubble {
    top: auto;
    bottom: 16px;
    right: 12px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    writing-mode: horizontal-tb;
    letter-spacing: 0;
  }

  .feedback-panel {
    right: 12px;
    bottom: 70px;
    width: calc(100vw - 24px);
  }

  .style-form {
    padding: 16px;
  }

  .style-scope {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
@media (max-width: 720px) {
  .game-shell,
  .creation-shell,
  .ending-shell,
  .style-shell,
  .start-shell {
    padding-bottom: 82px;
  }
}

.style-head-note {
  align-self: center;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

@media (max-width: 720px) {
  .style-head-note {
    display: none;
  }
}

/* 画风勾选框：不要依赖系统主题，保证亮度和可读性 */
.style-check input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border: 1px solid rgba(185, 151, 91, 0.86);
  background: rgba(0, 0, 0, 0.08);
  position: relative;
  cursor: pointer;
}

.style-check input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
}

.style-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #1b2223;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.style-modal .style-check input[type="checkbox"] {
  background: rgba(255, 255, 255, 0.28);
}

.style-modal .style-check input[type="checkbox"]:checked {
  background: #8a683a;
  border-color: #8a683a;
}

.style-modal .style-check input[type="checkbox"]:checked::after {
  border-color: #f2eadb;
}

body.capture-mode *,
body.capture-mode *::before,
body.capture-mode *::after {
  animation: none !important;
  transition: none !important;
}

@media (min-width: 721px) and (max-width: 1279px) {
  body {
    padding-right: 40px;
  }

  .feedback-bubble {
    right: 0;
  }

  .feedback-panel {
    right: 52px;
  }
}

/* ---------- 时间块 / 逐句对话 ---------- */

.scene-time-card {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-top: 12px;
  padding: 10px 13px;
  border-left: 2px solid var(--gold);
  background: rgba(185, 151, 91, 0.09);
}

.scene-time-card span {
  color: #8d7a56;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.scene-time-card b {
  color: #d6c8ac;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
}

.scene-time-card em {
  color: #7f908c;
  font-size: 10px;
  font-style: normal;
}

.dialogue-stage {
  cursor: pointer;
  padding-bottom: 18px;
}

.dialogue-stage.complete {
  cursor: default;
}

.beat {
  margin: 0 0 16px;
}

.beat.future {
  display: none;
}

.beat.narrator {
  max-width: 88%;
  margin-right: auto;
  margin-left: auto;
  color: #4d5a57;
  font-family: var(--serif);
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 2;
  text-align: center;
}

.beat.narrator p {
  margin: 0;
}

.beat.npc,
.beat.player {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.beat.player {
  flex-direction: row;
  justify-content: flex-end;
}

.avatar {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(29, 37, 39, 0.28);
  border-radius: 50%;
  background: #cfc5b2;
  box-shadow: 0 3px 10px rgba(29, 37, 39, 0.18);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  color: #f2eadb;
  background: var(--avatar-color, #6f7d78);
  font-family: var(--serif);
  font-size: 20px;
}

.bubble {
  max-width: min(78%, 560px);
  padding: 9px 12px 10px;
  border: 1px solid rgba(29, 37, 39, 0.16);
  border-radius: 2px 10px 10px 10px;
  background: rgba(255, 255, 255, 0.34);
  color: #2b3535;
}

.beat.player .bubble {
  border-color: rgba(38, 50, 53, 0.26);
  border-radius: 10px 2px 10px 10px;
  background: #263235;
  color: #f0e7d6;
}

.speaker-name {
  display: block;
  margin-bottom: 3px;
  color: #8a6b45;
  font-family: var(--serif);
  font-size: 11px;
}

.beat.player .speaker-name {
  color: #d8c08c;
  text-align: right;
}

.bubble p {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.9;
}

.beat.player .bubble p {
  color: #f0e7d6;
}

.narrative-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(29, 37, 39, 0.12);
  color: #8b7a60;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.narrative-next {
  color: #7b5b38;
}

.narrative-count {
  color: #9b8b70;
}

.choice-wrap.is-hidden {
  display: none;
}

@media (max-width: 720px) {
  .beat.narrator {
    max-width: 100%;
    font-size: 15px;
  }

  .avatar {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
  }

  .bubble {
    max-width: calc(100% - 52px);
  }

  .bubble p {
    font-size: 14px;
  }

  .scene-time-card {
    padding: 8px 10px;
  }
}

.history-time {
  grid-column: 2;
  color: #8b7a60;
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.03em;
}

/* ---------- 人物素材卡 ---------- */

.person-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.person-chip {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  color: #a8b5b0;
  font-size: 9px;
  text-align: center;
}

.person-chip img,
.person-fallback {
  display: grid;
  width: 42px;
  height: 42px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(233, 224, 207, 0.22);
  border-radius: 50%;
  background: #263235;
  color: #e9e0cf;
  font-family: var(--serif);
  font-size: 16px;
  object-fit: cover;
}

.person-chip img {
  display: block;
}

.person-chip b {
  max-width: 100%;
  overflow: hidden;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-note {
  margin: 10px 0 0;
  color: #65736e;
  font-size: 9px;
  line-height: 1.5;
  word-break: break-all;
}

@media (max-width: 720px) {
  .person-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .person-chip img,
  .person-fallback {
    width: 36px;
    height: 36px;
  }
}

/* 对话页不使用整块入场动画，避免首帧透明/截图空白 */
.narrative.dialogue-stage {
  animation: none;
  opacity: 1;
  transform: none;
}

/* 保证逐句展示时后续气泡不会提前出现 */
.beat.future {
  display: none !important;
}
.result-player {
  margin: 10px 0 18px;
}

.result-modal .result-player .bubble {
  max-width: 86%;
}
.result-kicker {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.result-stage .narrative-footer {
  gap: 12px;
}

.result-stage .narrative-footer .btn {
  margin-left: auto;
}

/* 区域地图 */
.map-modal {
  width: min(900px, calc(100vw - 32px));
  max-height: 94vh;
  overflow: auto;
}

.map-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.map-head h2 {
  margin: 2px 0 0;
}

.map-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(190, 175, 140, 0.3);
  background: #d8d0bd;
}

.map-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-title-overlay {
  position: absolute;
  top: 18px;
  left: 22px;
  z-index: 3;
  color: #2f3a38;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  letter-spacing: 0.2em;
  text-shadow: 0 1px 0 rgba(255, 248, 225, 0.8);
  pointer-events: none;
}

.map-labels {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.map-label {
  position: absolute;
  transform: translate(-50%, -50%);
  max-width: 118px;
  padding: 5px 9px;
  border: 1px solid rgba(51, 63, 57, 0.65);
  border-radius: 999px;
  background: rgba(244, 236, 215, 0.92);
  color: #2d3832;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.map-label:hover,
.map-label.current {
  background: #2f4439;
  color: #f4ecd7;
  border-color: #2f4439;
}

.map-player {
  position: absolute;
  z-index: 6;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}

.map-player i {
  width: 12px;
  height: 12px;
  border: 2px solid #f6edcf;
  border-radius: 50%;
  background: #b23a32;
  box-shadow: 0 0 0 3px rgba(178, 58, 50, 0.25);
}

.map-player b {
  color: #5b231f;
  font-size: 0.7rem;
  text-shadow: 0 1px 0 rgba(255, 248, 225, 0.8);
}

.map-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.map-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 68% 35%, rgba(58, 83, 75, 0.14), transparent 32%),
    linear-gradient(135deg, #d9d0ba, #c8c3ae);
  overflow: hidden;
}

.map-fallback-title {
  position: absolute;
  top: 20px;
  left: 24px;
  color: #33413a;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 2.2rem;
  letter-spacing: 0.2em;
}

.map-river {
  position: absolute;
  left: -15%;
  bottom: 18%;
  width: 130%;
  height: 24%;
  transform: rotate(-14deg);
  background: rgba(66, 103, 106, 0.28);
  border-top: 1px solid rgba(55, 89, 91, 0.35);
  border-bottom: 1px solid rgba(55, 89, 91, 0.35);
}

.map-road {
  position: absolute;
  background: rgba(112, 94, 65, 0.25);
  height: 10px;
  border-radius: 999px;
}

.road-a { top: 46%; left: 12%; width: 76%; transform: rotate(17deg); }
.road-b { top: 22%; left: 50%; width: 56%; transform: rotate(76deg); }

/* 任务 */
.quest-modal {
  width: min(680px, calc(100vw - 32px));
  max-height: 90vh;
  overflow: auto;
}

.quest-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.quest-main b { display: block; margin-bottom: 5px; }
.quest-main p { margin: 0 0 6px; color: var(--ink-soft); font-size: 0.9rem; }
.quest-place { color: var(--muted); font-size: 0.76rem; }
.quest-status { font-size: 0.75rem; color: var(--gold); white-space: nowrap; }
.quest-status.done { color: var(--muted); }
.quest-status.active { color: #9cc7a5; }
.location-quests { margin: 14px 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.location-quests p { display: flex; justify-content: space-between; margin: 6px 0; }
.location-quests span { color: var(--muted); font-size: 0.8rem; }

@media (max-width: 720px) {
  .map-label { font-size: 0.7rem; padding: 4px 7px; max-width: 92px; }
  .quest-row { grid-template-columns: 1fr auto; }
  .quest-row .btn { grid-column: 1 / -1; width: 100%; }
}
.map-lore {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.map-lore summary {
  color: var(--gold);
  cursor: pointer;
}

.map-lore p {
  margin: 8px 0 0;
  line-height: 1.8;
}

/* ---------- 新战斗页 ---------- */
.combat-shell .combat-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 0 60px;
}

.combat-arena {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  background: rgba(18, 24, 24, 0.5);
}

.combat-side {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.player-side {
  justify-content: flex-end;
}

.player-side .combat-side-data {
  text-align: right;
}

.combat-avatar {
  display: grid;
  flex: 0 0 82px;
  width: 82px;
  height: 82px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(218, 198, 150, 0.44);
  border-radius: 50%;
  background: #a08c69;
  color: #f2eadb;
  font-family: var(--serif);
  font-size: 28px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.combat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.combat-avatar.enemy {
  background: #4b4138;
  color: #e0c9a1;
}

.combat-side-data {
  min-width: 0;
  flex: 1;
}

.combat-side-data .eyebrow {
  margin: 0 0 2px;
}

.combat-side-data h1 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  font-weight: 500;
  color: #e7d7b5;
}

.combat-stat {
  margin: 7px 0;
}

.combat-stat-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
}

.player-side .combat-stat-head {
  flex-direction: row-reverse;
}

.combat-stat-head b {
  color: #c9b892;
  font-weight: 500;
}

.combat-bar {
  height: 7px;
  margin-top: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
}

.combat-bar i {
  display: block;
  height: 100%;
  background: #b4584a;
  transition: width 0.3s ease;
}

.combat-bar.stamina i { background: #9f9a62; }
.combat-bar.poise i { background: #6d8d89; }

.combat-gear-line {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.6;
}

.combat-log {
  margin: 18px 0;
  padding: 20px 24px;
  min-height: 150px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(29, 37, 39, 0.12);
  background: #e5ddca;
  color: #2b3535;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.95;
}

.combat-log-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #8a6b45;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.combat-log p {
  margin: 0 0 5px;
}

.combat-control {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.combat-turn {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 0.84rem;
}

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

.combat-btn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1px 10px;
  align-items: center;
  padding: 11px 14px;
  border: 1px solid rgba(190, 175, 140, 0.28);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.combat-btn b {
  grid-row: 1 / 3;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 500;
}

.combat-btn span {
  font-family: var(--serif);
  font-size: 1rem;
}

.combat-btn em {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
}

.combat-btn:hover,
.combat-btn.selected {
  border-color: var(--gold);
  background: rgba(185, 151, 91, 0.1);
}

.combat-btn.commit {
  border-color: rgba(185, 151, 91, 0.5);
}

.combat-btn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.combat-loadout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.combat-loadout-block {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.combat-loadout-block h3 {
  margin: 0 0 10px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 500;
}

.combat-loadout-label {
  margin: 8px 0 6px;
  color: var(--muted);
  font-size: 0.7rem;
}

.combat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.combat-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  padding: 5px 8px 5px 5px;
  border: 1px solid rgba(190, 175, 140, 0.22);
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.78rem;
  cursor: pointer;
}

.combat-option img,
.combat-item img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 24px;
}

.combat-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combat-option em {
  color: var(--gold);
  font-size: 0.65rem;
  font-style: normal;
}

.combat-option:hover,
.combat-option.selected {
  border-color: var(--gold);
  color: var(--ink);
  background: rgba(185, 151, 91, 0.1);
}

.combat-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.combat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(190, 175, 140, 0.18);
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
}

.combat-item span {
  flex: 1;
  font-size: 0.8rem;
}

.combat-item em {
  color: var(--gold);
  font-size: 0.72rem;
  font-style: normal;
}

.combat-item:hover {
  border-color: var(--gold);
}

.combat-item.depleted {
  opacity: 0.35;
  cursor: not-allowed;
}

.combat-note-small {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.6;
}

@media (max-width: 820px) {
  .combat-main { padding-top: 16px; }
  .combat-arena { flex-direction: column; gap: 16px; }
  .player-side { width: 100%; }
  .combat-avatar { flex-basis: 62px; width: 62px; height: 62px; font-size: 22px; }
  .combat-actions { grid-template-columns: 1fr; }
  .combat-loadout { grid-template-columns: 1fr; }
  .combat-turn { flex-direction: column; gap: 3px; }
}
.player-side .avatar {
  flex: 0 0 82px;
  width: 82px;
  height: 82px;
  border-color: rgba(218, 198, 150, 0.44);
}

@media (max-width: 820px) {
  .player-side .avatar {
    flex-basis: 62px;
    width: 62px;
    height: 62px;
  }
}

/* ---------- 区域事件 / 见闻 / 出城 ---------- */
.region-card .region-event-title {
  margin: 10px 0 4px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1rem;
}

.region-event-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.75;
}

.region-deadline {
  margin: 8px 0 10px;
  color: #c6a66a;
  font-size: 0.75rem;
}

.ambient-line {
  display: grid;
  gap: 2px;
  margin: 10px 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.ambient-line b {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 500;
}

.ambient-line span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.65;
}

.region-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ambient-modal,
.exit-modal {
  width: min(720px, calc(100vw - 32px));
  max-height: 90vh;
  overflow: auto;
}

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

.ambient-detail b {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-family: var(--serif);
}

.ambient-detail p {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.75;
}

.exit-plan {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  opacity: 0.72;
}

.exit-plan.unlocked {
  opacity: 1;
}

.exit-plan b {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
}

.exit-plan p {
  margin: 4px 0 5px;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.exit-place {
  color: var(--muted);
  font-size: 0.74rem;
}

.exit-fake {
  color: #b35b4c;
  font-size: 0.74rem;
  font-style: normal;
  margin-left: 6px;
}

.exit-locked {
  color: var(--muted);
  font-size: 0.75rem;
}

/* ---------- 经营界面 ---------- */
.shop-modal {
  width: min(820px, calc(100vw - 32px));
  max-height: 92vh;
  overflow: auto;
}

.shop-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.shop-owner .avatar {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
}

.shop-head h2 {
  margin: 2px 0 5px;
}

.shop-line {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.7;
}

.shop-head .btn {
  margin-left: auto;
}

.shop-notice {
  margin: 10px 0;
  padding: 8px 10px;
  border-left: 2px solid var(--gold);
  background: rgba(185, 151, 91, 0.1);
  color: #d5c29d;
  font-size: 0.84rem;
}

.shop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 10px 0 14px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
}

.shop-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 16px;
}

.shop-block {
  min-width: 0;
  margin-bottom: 14px;
}

.shop-block h3 {
  margin: 0 0 8px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 0.96rem;
  font-weight: 500;
}

.shop-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid rgba(190, 175, 140, 0.15);
}

.shop-item img,
.shop-glyph {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  object-fit: contain;
  border: 1px solid rgba(190, 175, 140, 0.2);
  color: var(--gold);
  font-family: var(--serif);
}

.shop-item-main {
  flex: 1;
  min-width: 0;
}

.shop-item-main b {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 0.86rem;
  font-weight: 500;
}

.shop-item-main small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.55;
  text-overflow: ellipsis;
}

.shop-item-buy {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.shop-item-buy span {
  color: var(--gold);
  font-size: 0.76rem;
}

.shop-item-buy em {
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
}

.shop-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.shop-favor-hint {
  color: var(--gold);
  font-size: 0.76rem;
}

@media (max-width: 720px) {
  .shop-columns { grid-template-columns: 1fr; }
  .shop-item-buy em { display: none; }
  .exit-plan { grid-template-columns: 1fr; }
  .exit-plan .btn, .exit-locked { justify-self: start; }
}
.exit-top-button {
  display: none !important;
}

body.exit-quest-known .exit-top-button {
  display: inline-block !important;
}
.ambient-notice-modal {
  animation: none;
  opacity: 1;
  transform: none;
}
