/* 《告别东北》——主样式（融合 UI 设计稿） */
:root {
  /* 主色调：东北冬日 · 枯草·雪·煤烟·暖灯 */
  --col-paper:        #f0ead8;
  --col-paper-warm:   #e8dfc8;
  --col-paper-dark:   #d5c9b0;
  --col-ink:          #1c1810;
  --col-ink-soft:     #4a3f2f;
  --col-ink-faint:    #8c7a5e;
  --col-snow:         #f7f3ec;
  --col-coal:         #2a2218;
  --col-rust:         #8b3a1e;
  --col-rust-dim:     #a04c2e;
  --col-ice:          #7fa3b5;
  --col-ice-pale:     #b8ced9;
  --col-khaki:        #9b8e6e;
  --col-hearth:       #c4692a;
  --font-display:     'ZCOOL XiaoWei', 'Noto Serif SC', serif;
  --font-body:        'Noto Serif SC', serif;
  --font-brush:       'Ma Shan Zheng', cursive;
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --ease-ink:   cubic-bezier(0.25, 0.1, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #1a1410;
  font-family: var(--font-body);
  color: var(--col-ink);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  display: flex;
  justify-content: center;
}

.hidden { display: none !important; }

#app {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  position: relative;
}

.portrait-container {
  min-height: 100vh;
  padding: clamp(0.75rem, 4vw, 1.5rem);
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
}
@media (min-width: 768px) {
  .portrait-container {
    max-width: 440px;
    box-shadow: 0 0 0 1px rgba(155,142,110,0.15), 0 20px 60px rgba(0,0,0,0.4);
  }
}

/* ========== 封面 / 标题画面 ========== */
#title-screen.cover {
  min-height: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  background-color: #1c1810;
}

.paper {
  background-color: var(--col-paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
#title-screen.cover { background: #1c1810; background-image: none; }

.cover-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(127,163,181,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(139,58,30,0.08) 0%, transparent 60%),
    #1c1810;
  z-index: 0;
}

.cover-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.015) 3px, rgba(255,255,255,0.015) 4px);
  z-index: 1;
}

.cover-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.cover-frame {
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(127,163,181,0.2);
  border-radius: var(--radius-md);
  pointer-events: none;
  z-index: 2;
}
.cover-frame::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(127,163,181,0.08);
  border-radius: 4px;
}

.corner { position: absolute; width: 18px; height: 18px; border-color: rgba(127,163,181,0.45); border-style: solid; }
.corner.tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.corner.tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.corner.bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.corner.br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.cover-eyebrow {
  font-size: 11px;
  letter-spacing: 0.5em;
  color: var(--col-ice-pale);
  opacity: 0.6;
  text-transform: uppercase;
}

.cover-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 700;
  color: var(--col-paper);
  line-height: 1;
  letter-spacing: 0.12em;
  text-shadow: 0 0 60px rgba(127,163,181,0.3), 2px 3px 0 rgba(0,0,0,0.6);
  margin: 0;
}

.cover-divider {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--col-ice-pale), transparent);
  opacity: 0.4;
}

.cover-sub {
  font-size: 13px;
  color: var(--col-ice-pale);
  opacity: 0.5;
  letter-spacing: 0.3em;
  margin: 0;
}

.cover-desc {
  font-size: 14px;
  color: rgba(240,234,216,0.6);
  line-height: 2;
  text-align: center;
  max-width: 300px;
  letter-spacing: 0.06em;
  margin: 0;
}

.btn-start {
  margin-top: 12px;
  padding: 14px 48px;
  background: transparent;
  border: 1px solid var(--col-ice-pale);
  border-radius: 2px;
  color: var(--col-paper);
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.4em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-ink);
  font-weight: 400;
}
.btn-start::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--col-ice);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-ink);
  z-index: -1;
}
.btn-start:hover {
  color: var(--col-coal);
  border-color: var(--col-ice);
  letter-spacing: 0.5em;
}
.btn-start:hover::before { transform: scaleX(1); }

.btn-start-outline {
  margin-top: 0.5rem;
  opacity: 0.85;
}
.btn-start-outline:hover { opacity: 1; }

.snow-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}
.snowflake {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255,255,255,0.7);
  border-radius: 50%;
  animation: snowfall linear infinite;
}
.snowflake:nth-child(1)  { left: 10%; animation-duration: 8s;  animation-delay: 0s;  width:1px; height:1px; opacity:0.4; }
.snowflake:nth-child(2)  { left: 25%; animation-duration: 11s; animation-delay: 2s;  opacity:0.6; }
.snowflake:nth-child(3)  { left: 40%; animation-duration: 9s;  animation-delay: 0.5s; width:3px; height:3px; opacity:0.3; }
.snowflake:nth-child(4)  { left: 55%; animation-duration: 13s; animation-delay: 3s;  opacity:0.5; }
.snowflake:nth-child(5)  { left: 70%; animation-duration: 10s; animation-delay: 1s;  width:1px; height:1px; opacity:0.4; }
.snowflake:nth-child(6)  { left: 82%; animation-duration: 12s; animation-delay: 4s;  opacity:0.6; }
.snowflake:nth-child(7)  { left: 90%; animation-duration: 8.5s; animation-delay:1.5s; width:2px; height:2px; opacity:0.3; }
.snowflake:nth-child(8)  { left: 5%;  animation-duration: 14s; animation-delay: 5s;  opacity:0.5; }
@keyframes snowfall {
  from { transform: translateY(-20px) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  to   { transform: translateY(calc(100vh + 20px)) translateX(20px); opacity: 0; }
}

/* ========== 游戏主界面 · 叙事节点 ========== */
#game-screen { max-width: 720px; margin: 0 auto; }

.game-node {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.statusbar {
  background: var(--col-coal);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.statusbar-title {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--col-khaki);
  letter-spacing: 0.25em;
  opacity: 0.8;
}

.statusbar-actions { display: flex; gap: 8px; }

.btn-icon {
  background: transparent;
  border: 1px solid rgba(155,142,110,0.3);
  border-radius: var(--radius-sm);
  color: var(--col-khaki);
  font-size: 11px;
  padding: 8px 12px;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: all 0.25s;
  min-height: 44px;
  font-family: inherit;
}
.btn-icon:hover {
  background: rgba(155,142,110,0.15);
  border-color: rgba(155,142,110,0.6);
}

.game-layout .illustration-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  max-height: 280px;
  background: linear-gradient(160deg, #0e1620 0%, #182030 30%, #0a0e14 70%, #141010 100%);
  overflow: hidden;
}

.game-layout .illustration {
  width: 100%;
  height: 100%;
  position: relative;
  background: var(--col-coal);
}

.game-layout .illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.illustration-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--col-ink-faint);
  text-align: center;
  background: var(--col-coal);
}
.illustration-placeholder:empty { display: none; }

.illustration-hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.illustration-hotspots .hotspot {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s, box-shadow 0.2s;
}
.illustration-hotspots .hotspot:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 2px rgba(127,163,181,0.5);
}

.node-body {
  background: var(--col-paper);
  padding: 28px 24px 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

.story-text.node-text {
  font-size: 15px;
  line-height: 2.1;
  color: var(--col-ink);
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  white-space: pre-line;
}

/* 场景内交互（与场景互动）· 沿用 interact-btn 风格 */
.scene-interactions-wrap {
  margin-top: 0;
  padding: 0 24px 8px;
  background: var(--col-paper);
}
.scene-interactions-wrap.hidden { display: none !important; }

/* Plan 9 十步解谜扩展 */
.step-progress-wrap {
  margin-top: 0;
  padding: 0 24px 12px;
}
.step-progress-wrap.hidden { display: none !important; }
.step-progress-label {
  font-size: 12px;
  color: var(--col-ink-faint);
  letter-spacing: 0.1em;
  margin: 0 0 8px 0;
}
.step-action-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scene-interactions-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--col-ink-faint);
  margin: 0 0 8px;
}
.scene-interactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.interaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--col-paper-warm);
  border: 1px solid var(--col-paper-dark);
  border-radius: 2px;
  color: var(--col-ink-soft);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s var(--ease-ink);
  font-weight: 400;
}
.interaction-btn:hover {
  background: var(--col-paper-dark);
  color: var(--col-ink);
  border-color: var(--col-khaki);
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choice-btn {
  width: 100%;
  text-align: left;
  padding: 14px 20px;
  background: transparent;
  border: 1px solid var(--col-paper-dark);
  border-radius: 2px;
  color: var(--col-ink-soft);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.35s var(--ease-ink);
  font-weight: 400;
}
.choice-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--col-rust);
  transform: scaleY(0);
  transition: transform 0.3s var(--ease-ink);
}
.choice-btn:hover {
  background: var(--col-paper-warm);
  border-color: var(--col-khaki);
  color: var(--col-ink);
  padding-left: 24px;
}
.choice-btn:hover::before { transform: scaleY(1); }

/* ========== 解谜布局 ========== */
.puzzle-layout {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.puzzle-layout.hidden { display: none !important; }

.puzzle-img-area {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(180deg, #1a0a04 0%, #2e1508 50%, #1a0a04 100%);
  overflow: hidden;
}

.puzzle-illustration {
  width: 100%;
  height: 100%;
  position: relative;
}
.puzzle-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.puzzle-body {
  padding: 24px 28px;
  background: var(--col-paper);
}

.puzzle-text {
  font-size: 15px;
  color: var(--col-ink);
  margin-bottom: 12px;
  line-height: 1.8;
}

.puzzle-hint {
  font-size: 13px;
  color: var(--col-ink-soft);
  line-height: 1.9;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}

.puzzle-clue-btn { margin-bottom: 16px; }

.freq-control-wrap {
  margin-top: 16px;
}
.radio-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--col-ink-faint);
  margin-bottom: 8px;
}
.freq-control {
  display: flex;
  align-items: stretch;
  margin-bottom: 16px;
  border: 1px solid var(--col-paper-dark);
  border-radius: 2px;
  overflow: hidden;
}
.freq-btn {
  background: var(--col-paper-warm);
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 16px;
  color: var(--col-ink-soft);
  transition: all 0.2s;
  font-family: inherit;
}
.freq-btn:hover { background: var(--col-paper-dark); color: var(--col-ink); }
.freq-display {
  flex: 1;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 20px;
  color: var(--col-ink);
  padding: 10px;
  background: var(--col-snow);
  letter-spacing: 0.1em;
  min-width: 5ch;
}
.freq-unit {
  padding: 10px 14px;
  background: var(--col-paper-warm);
  font-size: 11px;
  color: var(--col-ink-faint);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
}

.btn-confirm {
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(155,142,110,0.4);
  border-radius: 2px;
  color: var(--col-khaki);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.3em;
  cursor: pointer;
  transition: all 0.3s var(--ease-ink);
  font-weight: 400;
}
.btn-confirm:hover {
  background: rgba(155,142,110,0.1);
  border-color: var(--col-khaki);
  color: var(--col-paper);
}

.puzzle-feedback {
  font-size: 13px;
  margin-top: 12px;
  min-height: 1.4em;
  color: var(--col-ink-soft);
}
.puzzle-feedback.success { color: var(--col-ice); }
.puzzle-feedback.error { color: var(--col-rust-dim); }

/* ========== 结局画面 ========== */
.ending-page {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.ending-img-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(180deg, #0d1420 0%, #152035 30%, #8a9aaa 30%, #a0b0be 45%, #6a7a8a 45%, #0a0e14 100%);
  overflow: hidden;
}
.ending-img-wrap .illustration {
  width: 100%;
  height: 100%;
  position: relative;
}
.ending-img-wrap .illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ending-body {
  background: linear-gradient(180deg, #0d1420 0%, #08100d 100%);
  padding: 32px 24px;
}

.ending-text {
  font-size: 15px;
  color: rgba(240,234,216,0.65);
  line-height: 2.2;
  letter-spacing: 0.08em;
  margin-bottom: 32px;
  font-weight: 300;
  white-space: pre-line;
}

.ending-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ending-actions .btn-primary,
.ending-actions .btn-secondary {
  padding: 12px 24px;
  background: transparent;
  border: 1px solid rgba(155,142,110,0.3);
  border-radius: 2px;
  color: var(--col-khaki);
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 400;
}
.ending-actions .btn-primary:hover,
.ending-actions .btn-secondary:hover {
  background: rgba(155,142,110,0.1);
  border-color: rgba(155,142,110,0.6);
  color: var(--col-paper);
}

#btn-ending-coda.btn-primary,
.ending-actions .btn-ending-continue {
  background: var(--col-rust);
  border-color: transparent;
  color: var(--col-paper);
}
#btn-ending-coda.btn-primary:hover,
.ending-actions .btn-ending-continue:hover {
  background: var(--col-rust-dim);
  box-shadow: 0 0 20px rgba(139,58,30,0.3);
}

/* ========== 弹层 · 回忆图鉴 / 道具 / 线索 ========== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(18,14,10,0.95);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: clamp(0.75rem, 4vw, 1rem);
  padding-bottom: max(clamp(0.75rem, 4vw, 1rem), env(safe-area-inset-bottom));
  overflow-y: auto;
}

.gallery-overlay .gallery-modal {
  background: rgba(26,22,18,0.98);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid rgba(155,142,110,0.15);
  max-width: 560px;
  width: 100%;
  max-height: min(85vh, 85dvh);
  overflow-y: auto;
  margin: auto;
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.gallery-title {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--col-paper);
  letter-spacing: 0.25em;
  margin: 0;
}

.btn-close.gallery-close {
  background: transparent;
  border: 1px solid rgba(155,142,110,0.3);
  border-radius: var(--radius-sm);
  color: var(--col-khaki);
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.25s;
  font-family: inherit;
}
.btn-close.gallery-close:hover {
  border-color: var(--col-rust);
  color: var(--col-rust-dim);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.gallery-item {
  aspect-ratio: 3/4;
  background: var(--col-paper-warm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--col-paper-dark);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all 0.3s var(--ease-ink);
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.gallery-item .thumb {
  width: 100%;
  height: 65%;
  background: linear-gradient(160deg, #1a3550 0%, #0d2035 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-item .thumb .no-image {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--col-ink-faint);
}

.gallery-item .name {
  padding: 8px 10px;
  font-size: 11px;
  color: var(--col-ink);
  line-height: 1.5;
  letter-spacing: 0.06em;
}

.gallery-item.locked {
  background: rgba(155,142,110,0.05);
  border-color: rgba(155,142,110,0.12);
  cursor: default;
}
.gallery-item.locked:hover { transform: none; box-shadow: none; }
.gallery-item.locked .thumb { background: #0f0d0a; filter: brightness(0.6); }
.gallery-item.locked .name { color: rgba(155,142,110,0.4); }

.gallery-section-title {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--col-khaki);
  opacity: 0.7;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gallery-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(155,142,110,0.2);
}

.gallery-items-wrap { padding: 0; }
.gallery-items-wrap.hidden { display: none !important; }

.gallery-items-list.item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gallery-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(155,142,110,0.06);
  border: 1px solid rgba(155,142,110,0.15);
  border-radius: var(--radius-sm);
  cursor: default;
  flex-wrap: wrap;
}

.gallery-item-name {
  font-size: 13px;
  color: var(--col-paper);
  letter-spacing: 0.08em;
  flex: 1;
}

.gallery-item-call {
  background: none;
  border: none;
  color: var(--col-ice-pale);
  font-size: 11px;
  letter-spacing: 0.06em;
  font-style: italic;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
}
.gallery-item-call:hover { text-decoration: underline; }

/* ========== 道具弹窗 ========== */
.item-popup-modal.modal-backdrop {
  background: rgba(10,8,5,0.95);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(155,142,110,0.12);
  max-width: 360px;
  width: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.item-popup-image.modal-item-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #1a2e1a 0%, #0d150d 100%);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-popup-image.modal-item-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.item-popup-image .illustration-placeholder {
  font-size: 0.8rem;
  color: var(--col-ink-faint);
}

.modal-item-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--col-ice);
  border: 1px solid rgba(127,163,181,0.4);
  padding: 2px 8px;
  border-radius: 2px;
}

.item-popup-name.modal-item-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--col-paper);
  letter-spacing: 0.15em;
  margin: 0 0 8px;
}

.item-popup-desc.modal-item-text {
  font-size: 13px;
  color: var(--col-khaki);
  line-height: 1.9;
  letter-spacing: 0.06em;
  opacity: 0.85;
  margin: 0 0 16px;
}

/* ========== 线索弹窗 ========== */
.clue-modal.modal-backdrop {
  max-width: 420px;
}
.clue-title {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--col-paper);
  letter-spacing: 0.15em;
  margin: 0 0 12px;
}
.clue-text {
  font-size: 13px;
  color: var(--col-khaki);
  line-height: 1.9;
  margin: 0 0 16px;
}

/* ========== 提示条 ========== */
.fragment-toast {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--col-paper-warm);
  border: 1px solid var(--col-paper-dark);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 13px;
  color: var(--col-ink);
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  animation: toast-in 0.3s var(--ease-ink);
  max-width: min(90vw, 360px);
}
.fragment-toast .fragment-toast-label {
  color: var(--col-ink-faint);
  margin-right: 0.35rem;
}

.interaction-toast {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--col-paper-warm);
  border: 1px solid var(--col-paper-dark);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-size: 13px;
  color: var(--col-ink);
  z-index: 60;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  animation: toast-in 0.25s var(--ease-ink);
  max-width: min(90vw, 360px);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ========== 响应式 ========== */
@media (max-width: 599px) {
  .game-layout .illustration-wrap { max-height: 240px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
