/* Muji 暖灰 × Modern Algebra 结构线 */
:root {
  --bg: #f4f2ee;
  --panel: #ffffff;
  --panel2: #faf9f7;
  --text: #2b2b2b;
  --muted: #7a756e;
  --accent: #5c6b5a;
  --accent2: #8b6914;
  --good: #4a7c59;
  --warn: #a67c00;
  --bad: #b54a4a;
  --line: #e3dfd8;
  --guide: #6b6560;
  --struct: #1a1a1a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Helvetica Neue", "Noto Sans SC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 18px 52px;
}

header { text-align: center; margin-bottom: 22px; }
header h1 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: none;
  color: var(--struct);
}
header p {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 8px;
  letter-spacing: 0.04em;
}

.header-top {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.guide-toggle {
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--struct);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.45rem 1rem;
  cursor: pointer;
}

.guide-toggle:hover {
  border-color: var(--accent);
  background: var(--panel2);
}

.guide-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px 18px;
  margin-bottom: 16px;
  font-size: 0.86rem;
  color: var(--muted);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.main-panel > .guide-panel {
  margin-top: 12px;
}

.guide-current-goal {
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(124, 156, 255, 0.08);
  border: 1px solid rgba(124, 156, 255, 0.22);
  font-size: 0.84rem;
  color: var(--text);
}

.mandatory-empty {
  margin-top: 4px;
}

.mandatory-empty-note {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
}

.guide-panel.hidden { display: none; }

.guide-panel h2 {
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 600;
}

.guide-panel p {
  margin-bottom: 0.55rem;
}

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

.guide-panel strong { color: var(--text); }

.guide-rules-details {
  margin-top: 6px;
  font-size: 0.78rem;
  color: #888;
}

.guide-rules-details summary {
  cursor: pointer;
  list-style: none;
  color: #888;
  font-size: 0.8rem;
  line-height: 1.5;
  user-select: none;
}

.guide-rules-details summary::-webkit-details-marker {
  display: none;
}

.guide-rules-details[open] summary {
  margin-bottom: 8px;
}

.guide-rules-body {
  padding-top: 8px;
  border-top: 1px dashed rgba(154, 163, 181, 0.35);
}

.guide-rules-body p {
  color: #888;
  font-size: 0.78rem;
  line-height: 1.55;
}

.guide-rules-body strong {
  color: #999;
}

.guide-rules-body a {
  color: #9aa3b5;
}

.text-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.text-input-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 4.6rem;
}

.input-char-counter {
  position: absolute;
  right: 10px;
  bottom: 9px;
  font-size: 0.68rem;
  color: var(--muted);
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.bar-fill.speech { background: linear-gradient(90deg, #f59e0b, #fcd34d); }
.bar-fill.meeting { background: linear-gradient(90deg, #0d9488, #5eead4); }
.bar-fill.appearance { background: linear-gradient(90deg, #ec4899, #f9a8d4); }
.bar-fill.discipline { background: linear-gradient(90deg, #475569, #94a3b8); }
.bar-fill.team { background: linear-gradient(90deg, #059669, #6ee7b7); }

.hud {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
}

.stat-card.full { grid-column: 1 / -1; }

.stat-label {
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.bar-track {
  height: 8px;
  background: var(--panel2);
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.35s ease;
}

.bar-fill.ap { background: #8b6914; }
.bar-fill.ability { background: #5c6b5a; }
.bar-fill.rep-pos { background: var(--good); }
.bar-fill.rep-neg { background: var(--bad); }
.bar-fill.stress { background: linear-gradient(90deg, #c4a035, #b54a4a); }
.bar-fill.progress { background: #4a5568; }
.bar-fill.guide { background: #8a8580; }

.stat-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 5px;
}

.mandatory-panel {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 0.84rem;
  color: var(--text);
}

.guide-toggle.guide-toggle-has-mandatory {
  border-color: rgba(252, 211, 77, 0.75);
  background: rgba(252, 211, 77, 0.12);
  color: var(--text);
}

.guide-mandatory-section {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(252, 211, 77, 0.45);
  border-radius: 6px;
  background: rgba(252, 211, 77, 0.08);
}

.guide-mandatory-section[hidden] {
  display: none !important;
}

.guide-mandatory-section .mandatory-prep-btn {
  margin-top: 6px;
}

.stimulus-submit-row {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.survey-submit-msg.success {
  color: #2d6a4f;
  font-size: 0.88rem;
}

.survey-submit-msg.error {
  color: var(--warn, #b45309);
  font-size: 0.88rem;
}

.mandatory-prep-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  text-align: left;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.mandatory-prep-btn:hover {
  background: var(--panel2);
}

.mandatory-prep-btn .mandatory-note {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  opacity: 0.75;
}

.mandatory-item {
  display: inline-block;
  margin-left: 8px;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
}

.mandatory-prep {
  margin: 6px 0 2px;
  font-size: 0.85rem;
  color: var(--text);
}

.mandatory-note {
  display: block;
  font-size: 0.78rem;
  opacity: 0.85;
  margin-top: 2px;
  color: var(--muted);
}

.mandatory-intro {
  margin: 8px 0 6px;
  padding: 8px 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text);
  background: rgba(0, 0, 0, 0.18);
  border-left: 3px solid rgba(252, 211, 77, 0.65);
  border-radius: 4px;
}

.scene-stage.map-settlement-mode .scene-overlay-pins,
.scene-stage.map-settlement-mode .scene-overlay-bar {
  display: none !important;
}

.map-settlement-wrap {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(8, 10, 18, 0.62);
}

.map-settlement-card {
  width: min(100%, 440px);
  max-height: min(88vh, 560px);
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  font-size: 0.88rem;
  line-height: 1.55;
}

.map-settlement-card .system-line {
  display: block;
  margin-bottom: 8px;
}

.map-settlement-actions {
  margin-top: 14px;
}

.map-settlement-actions .btn-secondary {
  width: 100%;
}

.awareness-panel {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 0.84rem;
}

.awareness-panel[hidden],
.awareness-panel.hidden {
  display: none !important;
}

.awareness-panel strong {
  color: var(--struct);
  letter-spacing: 0.04em;
}

.awareness-input-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: stretch;
}

.awareness-input-row .text-input-wrap input {
  min-width: 0;
  padding: 8px 10px;
  padding-right: 4.6rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

.awareness-input-row input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
}

.awareness-note {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.awareness-note.err {
  color: #f87171;
}

.awareness-note.ok {
  color: #86efac;
}

.awareness-guide {
  margin: 8px 0 0;
  line-height: 1.5;
  color: var(--muted);
}

.awareness-prompts {
  margin: 10px 0 0;
  padding-left: 1.1rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text);
}

.awareness-prompts li {
  margin-bottom: 6px;
}

.awareness-ready {
  color: #86efac;
}

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

.awareness-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.awareness-hint {
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
}

.awareness-hint:hover {
  border-color: var(--accent);
  color: var(--text);
}

.boot-error-banner {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid #f87171;
  background: rgba(248, 113, 113, 0.12);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.55;
}

.boot-error-banner a {
  color: var(--accent);
}

.main-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px;
  min-height: 320px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.tag-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
  margin-bottom: 14px;
}

.tag-row-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.tag-row .guide-toggle {
  flex-shrink: 0;
  margin-left: auto;
  align-self: center;
}

.tag {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--panel2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.tag.female { color: #8b5a5a; border-color: #dcc8c8; background: #faf7f7; }
.tag.male { color: #4a5568; border-color: #c8cdd4; background: #f7f8fa; }

.story-text .system {
  color: var(--struct);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.story-text {
  font-size: 0.95rem;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  padding: 11px 14px;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  transition: background 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--struct);
  color: #fff;
}

.btn-primary:hover { background: #333; }

.btn-secondary {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-secondary:hover { border-color: var(--struct); }

.action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.action-btn {
  text-align: left;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
}

.action-btn:hover { border-color: var(--guide); }

.action-btn .ab-icon { font-size: 1.2rem; margin-right: 6px; }
.action-btn strong { display: block; font-size: 0.92rem; }
.action-btn .ab-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
  font-weight: normal;
}

.log-box {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
  max-height: 120px;
  overflow-y: auto;
}

.guigui-note {
  background: rgba(109, 40, 217, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.intro-tap-catcher {
  position: absolute;
  inset: 0;
  z-index: 6;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.intro-continue {
  position: absolute;
  right: 14px;
  bottom: 10px;
  z-index: 8;
  margin: 0;
  padding: 6px 2px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.65);
  pointer-events: auto;
}

.intro-continue:hover {
  color: #fff;
  text-decoration: underline;
}

.intro-continue-dialogue {
  position: static;
  display: block;
  margin: 12px 0 0 auto;
  width: fit-content;
  text-shadow: none;
  color: var(--guide);
}

.intro-continue-dialogue:hover {
  color: var(--accent);
}

.intro-guigui-slot {
  position: absolute;
  left: 50%;
  top: 38%;
  z-index: 5;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.scene-stage.intro-map .scene-caption {
  top: 14%;
  max-width: min(92%, 28rem);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.55;
  padding: 10px 14px;
  background: rgba(12, 14, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.world-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--muted);
}

.world-footer a { color: var(--accent); }

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
}

.footer-row > :not([hidden]) ~ :not([hidden])::before {
  content: "·";
  margin: 0 0.45em;
  color: var(--muted);
  pointer-events: none;
}

.hud-details {
  margin-bottom: 16px;
}

.hud-summary {
  display: none;
  list-style: none;
  cursor: pointer;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  margin-bottom: 8px;
}

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

.hud-summary::after {
  content: " ▾";
  opacity: 0.65;
}

.hud-details[open] .hud-summary::after {
  content: " ▴";
}

.scene-overlay-status {
  display: none;
  flex: 0 0 auto;
  width: 100%;
  pointer-events: none;
}

.scene-overlay-status .map-ap-badge {
  position: static;
  width: 100%;
  max-width: none;
}

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}

.preview-bar {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.preview-bar.dev-visible {
  display: flex;
}

.preview-bar-label {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.1em;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.preview-btn {
  color: var(--struct);
  font-size: 0.78rem;
}

.preview-note {
  font-size: 0.82rem;
  color: var(--warn);
  margin: 0 0 12px;
  padding: 8px 10px;
  background: var(--panel2);
  border-left: 3px solid var(--warn);
  border-radius: 0 4px 4px 0;
}

/* 城市俯瞰地图 */
.city-map-photo {
  position: relative;
  background: linear-gradient(165deg, #1a2236 0%, #2a3348 45%, #12151f 100%);
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.city-map-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #1a2230;
  transition: filter 0.45s ease;
}

/* 时段滤镜：仅在回退到默认 city-skyline 底图时由 JS 加上 .map-time-filtered */
.city-map-photo.map-time-midday .city-map-img.map-time-filtered {
  filter: brightness(1.06) saturate(1.18) sepia(0.14) hue-rotate(4deg);
}

.city-map-photo.map-time-sunset .city-map-img.map-time-filtered {
  filter: brightness(0.92) saturate(1.28) sepia(0.38) hue-rotate(-10deg);
}

.city-map-photo.map-time-night .city-map-img.map-time-filtered {
  filter: brightness(0.52) saturate(0.78) sepia(0.08) hue-rotate(12deg) contrast(1.08);
}

.city-map-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 17, 23, 0.05) 0%, rgba(15, 17, 23, 0.35) 100%);
  pointer-events: none;
  z-index: 1;
  transition: background 0.45s ease;
}

.city-map-photo.map-time-midday .city-map-vignette {
  background: linear-gradient(180deg, rgba(255, 220, 160, 0.06) 0%, rgba(15, 17, 23, 0.28) 100%);
}

.city-map-photo.map-time-sunset .city-map-vignette {
  background: linear-gradient(180deg, rgba(255, 140, 60, 0.1) 0%, rgba(40, 20, 30, 0.42) 100%);
}

.city-map-photo.map-time-night .city-map-vignette {
  background: linear-gradient(180deg, rgba(30, 40, 80, 0.15) 0%, rgba(8, 10, 20, 0.55) 100%);
}

.map-ap-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(252, 211, 77, 0.45);
  background: rgba(20, 24, 36, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.map-ap-label {
  font-size: 0.68rem;
  color: rgba(252, 211, 77, 0.95);
  letter-spacing: 0.08em;
}

.map-ap-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.map-ap-sep {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 2px;
}

.map-photo-hint {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--muted);
}

.map-photo-hint code {
  font-size: 0.7rem;
  color: var(--accent);
}

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  min-width: 64px;
  max-width: 100px;
  padding: 5px 8px;
  text-align: center;
  font: inherit;
  color: #fff;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(20, 24, 36, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.15s ease, border-color 0.15s, background 0.15s;
}

.map-pin:hover {
  transform: translate(-50%, -50%) scale(1.06);
  border-color: rgba(167, 139, 250, 0.75);
  background: rgba(30, 34, 52, 0.58);
}

.map-pin-label {
  display: block;
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.map-pin-hint {
  display: block;
  margin-top: 2px;
  font-size: 0.58rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.3;
}

/* 场景顶部背景图 */
.scene-hero {
  position: relative;
  width: 100%;
  max-height: 180px;
  margin-bottom: 14px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, #1e2438 0%, #2a3348 50%, #12151f 100%);
}

.scene-hero-img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.scene-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 17, 23, 0.05) 0%, rgba(15, 17, 23, 0.42) 100%);
  pointer-events: none;
}

.scene-hero-fallback {
  height: 120px;
  background: linear-gradient(145deg, #1e2438 0%, #2a3348 50%, #12151f 100%);
}

/* 场景视口：大图 + 可选下半对白 */
.scene-viewport {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 12px;
  padding-bottom: var(--keyboard-inset, 0);
  transition: padding-bottom 0.2s ease;
}

.scene-viewport.hidden,
.story-text.hidden,
#actions.hidden {
  display: none !important;
}

.scene-viewport .scene-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 0;
  flex-shrink: 0;
}

@keyframes skin-swap-flash {
  0% {
    filter: none;
  }
  18% {
    filter: hue-rotate(95deg) saturate(1.35) brightness(1.08);
  }
  45% {
    filter: hue-rotate(180deg) saturate(1.2) brightness(0.95);
  }
  100% {
    filter: none;
  }
}

.scene-viewport.skin-swap-flash {
  animation: skin-swap-flash 1.35s ease-out;
}

.scene-viewport.skin-swap-flash-first .scene-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(200, 160, 255, 0.35), transparent 65%);
  animation: skin-swap-glow 1.35s ease-out;
}

@keyframes skin-swap-glow {
  0% {
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.skin-swap-banner {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 6;
  font-size: clamp(1.2rem, 4.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
  padding: 14px 22px;
  background: rgba(12, 14, 22, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  pointer-events: none;
  white-space: nowrap;
}

.scene-viewport.has-dialogue .scene-stage,
.scene-viewport.has-player-input .scene-stage {
  aspect-ratio: 16 / 10;
  max-height: 48vh;
}

.scene-stage-fallback {
  background: linear-gradient(145deg, #1e2438 0%, #2a3348 50%, #12151f 100%);
}

.scene-stage-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  pointer-events: none;
}

.scene-caption {
  position: absolute;
  top: 52px;
  right: 12px;
  left: 12px;
  z-index: 2;
  margin: 0 auto;
  max-width: min(96%, 36rem);
  padding: 10px 14px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  background: rgba(12, 14, 22, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  pointer-events: none;
  text-align: center;
  white-space: pre-wrap;
}

.scene-caption.hidden {
  display: none;
}

.scene-stage-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  padding: 10px 12px 14px;
  gap: 8px;
  pointer-events: none;
}

.scene-overlay-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-overlay-pins .map-pin {
  pointer-events: auto;
}

.scene-overlay-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  pointer-events: auto;
}

.scene-overlay-btn {
  font: inherit;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(20, 24, 36, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  max-width: 100%;
}

.scene-overlay-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(167, 139, 250, 0.75);
  background: rgba(30, 34, 52, 0.72);
}

.scene-overlay-btn.btn-primary-style {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(88, 68, 180, 0.45);
}

.scene-overlay-btn .choice-hint {
  color: rgba(255, 255, 255, 0.75);
}

.scene-overlay-rebel {
  width: 100%;
  pointer-events: auto;
  padding: 8px;
  border-radius: 12px;
  background: rgba(12, 14, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.dialogue-panel {
  flex: 0 0 auto;
  min-height: 92px;
  max-height: 34vh;
  padding: 16px 18px 18px;
  background: linear-gradient(180deg, #2d2248 0%, #1e1835 100%);
  border: 2px solid rgba(251, 191, 36, 0.55);
  border-radius: 0;
  border-top: 3px solid rgba(251, 191, 36, 0.85);
  overflow-y: auto;
  box-shadow:
    0 -4px 24px rgba(167, 139, 250, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dialogue-panel::before {
  content: "剧情";
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(251, 191, 36, 0.9);
  margin-bottom: 8px;
}

.guigui-scene-float {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.55));
}

.guigui-scene-float.hidden {
  display: none;
}

.mandatory-guigui-hint {
  margin: 8px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(109, 40, 217, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.35);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text);
}

.mandatory-guigui-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--guide);
  margin-right: 6px;
}

.player-input-panel {
  flex: 0 0 auto;
  padding: 12px 14px 14px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-top: 1px dashed rgba(154, 163, 181, 0.45);
  border-radius: 0 0 16px 16px;
}

.player-input-panel.hidden {
  display: none;
}

.player-input-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.scene-viewport.has-dialogue .scene-stage,
.scene-viewport.has-player-input .scene-stage {
  border-radius: 16px 16px 0 0;
}

.scene-viewport.has-player-input:not(.has-dialogue) .scene-stage {
  border-radius: 16px 16px 0 0;
}

.scene-viewport:not(.has-dialogue):not(.has-player-input) .scene-stage {
  border-radius: 16px;
}

.dialogue-panel.hidden {
  display: none;
}

.dialogue-speaker {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fcd34d;
  margin-bottom: 8px;
  letter-spacing: 0.06em;
}

.dialogue-text {
  font-size: 1rem;
  line-height: 1.6;
  color: #f8fafc;
  white-space: pre-wrap;
}

/* 旧抽象地图（保留兼容） */
.city-map {
  position: relative;
  min-height: 240px;
  margin-top: 12px;
  border-radius: 14px;
  background: linear-gradient(165deg, #1a2236 0%, #12151f 100%);
  border: 1px solid var(--line);
}

.city-map.compact { min-height: 200px; }

.map-zone {
  position: absolute;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  border-radius: 12px;
  padding: 12px;
  min-width: 88px;
  text-align: center;
  border: 2px solid transparent;
  transition: transform 0.15s;
}

.map-zone .zone-icon { display: block; font-size: 1.6rem; }
.map-zone .zone-name { display: block; font-weight: 700; font-size: 0.9rem; margin-top: 2px; }

.map-zone:hover { transform: scale(1.05); }

.choice-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: normal;
  margin-top: 4px;
}

.outcome-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 10, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.outcome-panel[hidden] {
  display: none !important;
}

.outcome-inner {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.outcome-title {
  font-size: 0.82rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.outcome-section {
  margin-bottom: 14px;
}

.outcome-section h3 {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 6px;
}

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

.outcome-stat {
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--panel2);
  border: 1px solid var(--line);
}

.outcome-stat.positive { color: var(--good); border-color: rgba(110, 231, 183, 0.35); }
.outcome-stat.negative { color: var(--bad); border-color: rgba(251, 113, 133, 0.35); }
.outcome-stat.neutral { color: var(--muted); }

.outcome-reaction {
  background: rgba(124, 156, 255, 0.1);
  border: 1px solid rgba(124, 156, 255, 0.28);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.outcome-skin-lore {
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.32);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.outcome-skin-lore .guigui-note {
  margin-top: 10px;
  margin-bottom: 0;
}

.scene-action-list .btn-primary {
  margin-bottom: 4px;
}

.identity-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.identity-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.identity-field-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.identity-field-row input {
  flex: 1;
  min-width: 0;
}

.btn-random {
  flex-shrink: 0;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-random:hover {
  color: var(--text);
  border-color: var(--guide);
  background: var(--panel2);
}

.identity-field input {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.identity-field input:focus {
  outline: none;
  border-color: var(--accent);
}

.identity-hint {
  font-size: 0.72rem;
  color: var(--muted);
  font-style: normal;
}

.rebel-beat {
  background: rgba(124, 156, 255, 0.08);
  border: 1px solid rgba(124, 156, 255, 0.28);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.rebel-beat .system-line {
  color: var(--accent);
  font-size: 0.82rem;
  margin-bottom: 8px;
  display: block;
}

.rebel-input {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: stretch;
}

.rebel-input .text-input-wrap input,
.rebel-input input {
  flex: 1;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  padding-right: 4.6rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.rebel-input input:focus,
.rebel-input .text-input-wrap input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-danger {
  background: #3f1d2a;
  color: var(--accent2);
  border: 1px solid #5c3d4a;
}

.btn-danger:hover {
  filter: brightness(1.08);
}

.rebel-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.rebel-hint {
  font-family: inherit;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid #5c3d4a;
  background: rgba(63, 29, 42, 0.55);
  color: var(--accent2);
  cursor: pointer;
}

.rebel-hint:hover {
  border-color: var(--accent2);
  filter: brightness(1.08);
}

.rebel-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
  min-height: 1.1em;
}

.rebel-note.err {
  color: var(--bad);
}

.rebel-note.ok {
  color: var(--good);
}

.outcome-glitch {
  margin: 10px 0;
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--muted);
  border-left: 3px solid var(--warn);
  background: var(--panel2);
}

.file-protocol-banner {
  background: #a67c00;
  color: #fff;
  padding: 12px 16px;
  font-size: 0.84rem;
  text-align: center;
  margin-bottom: 12px;
}

.file-protocol-banner a { color: #fff; }
.file-protocol-banner code { background: rgba(0,0,0,0.15); padding: 2px 6px; }

.outcome-meta {
  font-size: 0.78rem;
  color: var(--guide);
  margin-bottom: 12px;
}

.outcome-panel .btn-primary {
  width: 100%;
  margin-top: 4px;
}

.outcome-reaction-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin: -6px 0 8px;
}

.outcome-inner .player-input-inner {
  margin: 0 0 14px;
  padding: 0;
  background: none;
  border: none;
}

.outcome-inner .player-input-inner .rebel-input {
  margin-top: 0;
}

.hub-actions {
  margin-top: 10px;
}

.map-zone.home {
  left: 8%; top: 18%;
  background: linear-gradient(145deg, rgba(110, 231, 183, 0.22), rgba(30, 40, 50, 0.9));
  border-color: rgba(110, 231, 183, 0.4);
}

.map-zone.company {
  right: 8%; top: 14%;
  background: linear-gradient(145deg, rgba(124, 156, 255, 0.25), rgba(30, 40, 55, 0.92));
  border-color: rgba(124, 156, 255, 0.4);
}

.map-zone.mall {
  left: 34%; bottom: 12%;
  background: linear-gradient(145deg, rgba(255, 143, 171, 0.25), rgba(40, 30, 40, 0.92));
  border-color: rgba(255, 143, 171, 0.4);
}

/* 旧多页场景兼容 */
.world-wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }
.scene-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.breadcrumb { font-size: 0.78rem; color: var(--muted); }
.breadcrumb a { color: var(--accent); text-decoration: none; }

.btn {
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--text);
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--struct);
  border-color: var(--struct);
  color: #fff;
}

.action-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 12px;
}

.action-card:hover { border-color: var(--guide); }

@media (max-width: 560px) {
  .map-zone { min-width: 72px; padding: 8px; }
}

/* 玩前 / 玩后问卷 */
.survey-note {
  font-size: 0.88rem;
  color: var(--muted);
  background: var(--panel2);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.survey-block { margin-bottom: 1.1rem; }
.survey-options label {
  display: inline-block;
  margin-right: 1rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  background: var(--panel2);
}
.survey-options label.selected {
  border-color: var(--guide);
  background: rgba(109, 40, 217, 0.18);
}
.survey-options input { margin-right: 0.5rem; }
.likert-legend {
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--panel2);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
}
.likert-item { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.likert-item:last-child { border-bottom: none; }
.likert-q { font-size: 0.92rem; margin-bottom: 0.5rem; line-height: 1.55; }
.likert-scale { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.likert-scale label {
  flex: 1 1 auto;
  min-width: 2.4rem;
  text-align: center;
  padding: 0.45rem 0.2rem;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  background: var(--panel2);
}
.likert-scale label.selected {
  border-color: var(--guide);
  background: rgba(109, 40, 217, 0.18);
  font-weight: 600;
}
.likert-scale input { position: absolute; opacity: 0; pointer-events: none; }
.likert-hint {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.35rem;
}
.stimulus-material {
  font-size: 0.8rem;
  line-height: 1.28;
  background: var(--panel2);
  border-radius: 8px;
  padding: 6px 8px;
  margin: 0.25rem 0 0.35rem;
}
.stimulus-section + .stimulus-section {
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--line);
}
.stimulus-section h4 { font-size: 0.76rem; color: var(--guide); margin-bottom: 0.25rem; }
.stimulus-line { display: block; margin-top: 0.2rem; }
.stimulus-feeling label {
  display: block;
  margin: 0.35rem 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  background: var(--panel2);
}
.stimulus-feeling label.selected {
  border-color: var(--guide);
  background: rgba(109, 40, 217, 0.14);
}
.survey-open {
  width: 100%;
  font-family: inherit;
  font-size: 0.92rem;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel2);
  color: var(--text);
  resize: vertical;
  min-height: 72px;
  margin-top: 0.5rem;
}
.equality-slider-block {
  margin-top: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.equality-slider { width: 100%; accent-color: var(--guide); }
.equality-slider-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.55rem;
}
.equality-slider-value { font-weight: 600; color: var(--guide); font-size: 1.05rem; }

/* 手机端 · 用户版 */
@media (max-width: 520px) {
  .wrap {
    padding:
      calc(12px + env(safe-area-inset-top, 0))
      calc(12px + env(safe-area-inset-right, 0))
      calc(40px + env(safe-area-inset-bottom, 0))
      calc(12px + env(safe-area-inset-left, 0));
  }

  header h1 {
    font-size: 1.12rem;
    letter-spacing: 0.06em;
  }

  header p {
    font-size: 0.78rem;
    line-height: 1.5;
  }

  body {
    overflow-x: hidden;
  }

  .hud-details {
    margin-bottom: 10px;
  }

  .hud-summary {
    display: block;
  }

  .hud-details:not([open]) .hud {
    display: none;
  }

  .hud {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 0;
  }

  .stat-card {
    padding: 6px 8px;
  }

  .stat-card.full {
    grid-column: 1 / -1;
  }

  .stat-label {
    font-size: 0.6rem;
    margin-bottom: 4px;
    letter-spacing: 0.04em;
  }

  .bar-track {
    height: 6px;
  }

  .stat-sub {
    display: none;
  }

  .tag-row {
    gap: 8px;
    row-gap: 8px;
    margin-bottom: 10px;
  }

  .tag-row-tags {
    gap: 8px;
    row-gap: 8px;
  }

  .tag-row .guide-toggle {
    font-size: 0.68rem;
    padding: 4px 10px;
    white-space: nowrap;
  }

  .tag {
    font-size: 0.68rem;
    padding: 4px 10px;
    line-height: 1.4;
    flex: 0 1 auto;
    max-width: calc(50% - 4px);
  }

  .main-panel {
    padding: 14px 12px;
    min-height: 0;
  }

  .scene-viewport .scene-stage {
    aspect-ratio: 4 / 5;
    min-height: 260px;
  }

  .scene-viewport.has-dialogue .scene-stage,
  .scene-viewport.has-player-input .scene-stage {
    max-height: 38vh;
    aspect-ratio: 16 / 11;
    min-height: 200px;
  }

  .scene-stage-badge {
    display: none;
  }

  .scene-overlay-status {
    display: block;
    order: 0;
  }

  .scene-overlay-status .map-ap-badge {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
  }

  .scene-overlay-status .map-ap-label {
    font-size: 0.64rem;
  }

  .scene-overlay-status .map-ap-value {
    font-size: 1.05rem;
  }

  .scene-stage-overlay {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    gap: 12px;
    padding:
      8px
      calc(8px + env(safe-area-inset-right, 0))
      calc(10px + env(safe-area-inset-bottom, 0))
      calc(8px + env(safe-area-inset-left, 0));
  }

  .scene-overlay-pins {
    position: relative;
    inset: auto;
    order: 1;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    pointer-events: none;
  }

  .scene-overlay-pins .map-pin {
    position: relative;
    left: auto !important;
    top: auto !important;
    transform: none;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 52px;
    padding: 10px 8px;
    pointer-events: auto;
  }

  .scene-overlay-pins .map-pin:hover {
    transform: none;
  }

  .map-pin-label {
    font-size: 0.82rem;
  }

  .map-pin-hint {
    font-size: 0.62rem;
    margin-top: 3px;
  }

  .scene-overlay-bar {
    order: 2;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .scene-overlay-btn {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
  }

  .city-map-photo .scene-caption {
    display: none;
  }

  .skin-swap-banner {
    top: 38%;
    font-size: 1rem;
    white-space: normal;
    text-align: center;
    max-width: 88%;
  }

  .dialogue-panel {
    padding: 12px 14px;
    max-height: 34vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dialogue-text {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .awareness-input-row,
  .rebel-input {
    flex-direction: column;
    align-items: stretch;
  }

  .rebel-input input,
  .awareness-input-row input {
    min-height: 44px;
    font-size: 16px;
  }

  .likert-scale label {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .world-footer {
    font-size: 0.76rem;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .guide-panel {
    font-size: 0.82rem;
  }
}

@media (min-width: 521px) {
  .hud-details .hud {
    display: grid !important;
  }

  .hud-summary {
    display: none !important;
  }
}

/* —— 知情同意第一屏 —— */
html.consent-pending {
  overflow: hidden;
}

.consent-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background: var(--bg);
}

.consent-gate[hidden] {
  display: none !important;
}

.consent-card {
  width: 100%;
  max-width: 520px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 24px 24px;
  box-shadow: 0 8px 32px rgba(43, 43, 43, 0.06);
}

.consent-card h1 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--struct);
  margin-bottom: 12px;
  letter-spacing: 0.06em;
}

.consent-lead {
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.65;
}

.consent-list {
  margin: 0 0 16px 1.1rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text);
}

.consent-list li {
  margin-bottom: 10px;
}

.consent-list strong {
  color: var(--struct);
  font-weight: 600;
}

.consent-foot {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.55;
}

.consent-agree-btn {
  width: 100%;
  max-width: 280px;
  display: block;
  margin: 0 auto;
}
