/* The game is a single illustrated spread. The journal opens on a separate page. */
:root {
  --harbor-ink:#283b36;
  --harbor-paper:#faf3df;
  --harbor-border:#c8bea3;
  --harbor-accent:#86432e;
  --harbor-serif:"Songti SC","STZhongsong","Noto Serif CJK SC",SimSun,serif;
}
body { background:#182f33; background-image:linear-gradient(165deg,#274446 0,#192f33 50%,#15282d 100%); background-attachment:fixed; }
.harbor-bar { width:min(100% - 64px,1040px); max-width:none; height:78px; margin:0 auto; padding:0; display:flex; justify-content:space-between; align-items:center; }
.harbor-bar .brand { color:#f8edcd; font:700 23px/1.3 var(--harbor-serif); letter-spacing:.09em; gap:10px; }
.harbor-bar .brand-emblem { width:34px; height:34px; border:1px solid #d1b47a; border-radius:50%; background:none; box-shadow:none; transform:none; }
.harbor-bar .brand-emblem .game-icon { width:24px; height:24px; transform:none; }
.journal-toggle { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:0 4px 0 12px; font-size:14px; color:#f2e7c9; background:none; border:0; }
.journal-toggle:hover { color:#ffd196; }
.journal-toggle .game-icon { width:18px; height:18px; }
.scene-game { width:min(100% - 64px,1040px); max-width:none; margin:0 auto; padding:0 0 32px; color:var(--harbor-ink); }
.stage-frame { position:relative; border:1px solid #9c9b7e; border-radius:12px; overflow:hidden; background:var(--harbor-paper); box-shadow:0 10px 30px #0816194d; }
.scene-illustration,.stage-window { position:relative; }
.stage-window { isolation:isolate; height:clamp(260px,46vh,445px); overflow:hidden; background:#37565b; }
.stage-window>img { display:block; width:100%; height:100%; object-fit:cover; object-position:50% 52%; }
.stage-opening { height:clamp(275px,47vh,450px); }
.stage-light { position:absolute; inset:0; pointer-events:none; background:linear-gradient(180deg,#11201e44,transparent 38%,transparent 60%,#15272166); }
.stage-night>img { filter:brightness(.78) saturate(.85); }
.stage-evening .stage-light { background:linear-gradient(155deg,#522b202d,transparent 58%,#33271977); }
.stage-opening .stage-light { background:linear-gradient(0deg,#1d2e2acc,transparent 58%); }
.scene-stamp,.stage-caption,.arrival-title,.pocket-hud { position:absolute; z-index:1; color:#fff2cc; }
.scene-stamp { top:20px; left:24px; display:flex; align-items:center; gap:10px; padding:7px 11px; border:1px solid #d4c4a37a; border-radius:4px; background:#233733e8; }
.scene-stamp>strong { font:700 17px/1.3 var(--harbor-serif); letter-spacing:.04em; }
.scene-stamp>span { display:flex; gap:5px; align-items:center; border-left:1px solid #a1ab9480; padding-left:10px; color:#e5ddc6; font-size:12px; font-variant-numeric:tabular-nums; }
.scene-stamp .game-icon,.stage-caption .game-icon { width:15px; height:15px; }
.stage-caption { left:25px; bottom:16px; display:flex; align-items:center; gap:6px; padding:5px 8px; border-radius:3px; background:#24362edd; font-size:12px; line-height:1.4; }
.pocket-hud { top:16px; right:22px; }
.pocket-hud>button { display:flex; align-items:center; gap:7px; min-height:44px; padding:5px 10px; background:#273a31eb; color:#fff0c5; border:1px solid #d4c4a377; border-radius:5px; }
.pocket-hud strong { font:650 15px/1.2 "Segoe UI","Microsoft YaHei UI",sans-serif; }
.pocket-hud .game-icon { width:17px; height:17px; color:#eec278; }
.pocket-hud>button>span { color:#e3d6b0; font-size:17px; }
.pocket-concern { position:absolute; top:calc(100% + 3px); right:0; padding:3px 6px; border-radius:3px; background:#6f392b; color:#fff2d8; font-size:11px; line-height:1.5; white-space:nowrap; }
.stage-caption::before { content:""; width:15px; height:1px; background:#d3b77e; }
.arrival-title { left:clamp(24px,5vw,64px); bottom:clamp(22px,4.5vh,46px); text-shadow:0 2px 9px #1a302a7a; }
.arrival-title span { display:block; margin-bottom:8px; color:#ffe6b5; font:650 14px/1.4 "Microsoft YaHei UI",sans-serif; letter-spacing:.09em; }
.arrival-title h1 { margin:0; font:700 clamp(36px,5.4vw,65px)/1.12 var(--harbor-serif); letter-spacing:.07em; color:#fff1cf; }
.stage-paper,.arrival-paper { position:relative; padding:clamp(22px,3vw,35px) clamp(22px,5vw,60px) clamp(22px,3vw,35px); background:var(--harbor-paper); border-top:3px solid #a99a76; }
.stage-paper::before,.arrival-paper::before { content:""; position:absolute; left:0; right:0; top:3px; height:1px; background:#c9bfa54d; pointer-events:none; }
.scene-game h1.dialogue-title,.scene-game .life-detail h1,.ending-card h1 { margin:0; color:var(--harbor-ink); font:700 clamp(24px,3vw,36px)/1.35 var(--harbor-serif); letter-spacing:.025em; }
.scene-game h1:focus:not(:focus-visible),.scene-game h2:focus:not(:focus-visible) { outline:none; }
.scene-kicker { margin:0 0 6px; color:var(--harbor-accent); font-size:12px; line-height:1.55; letter-spacing:.09em; font-weight:700; }
.dialogue-text,.review-description { max-width:55em; margin:7px 0 0; color:#4e5447; font-size:16px; line-height:1.75; overflow-wrap:anywhere; }
.stage-choices { margin:20px 0 0; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr)); gap:10px; }
.stage-choice { display:flex; align-items:center; justify-content:center; gap:10px; min-height:48px; padding:10px 13px; border:1px solid #bcb19a; border-radius:6px; background:#fcf8ec; color:#32443b; box-shadow:0 2px 0 #cfc1a5; text-align:center; font-size:15px; font-weight:600; line-height:1.45; transition:background .15s,border .15s,transform .15s; }
.stage-choice>span { display:grid; gap:2px; }
.stage-choice .game-icon { width:22px; height:22px; }
.stage-choice strong { font-weight:650; }
.stage-choice small { color:#686d59; font-size:11px; font-weight:500; }
.stage-choice.lead-choice,.arrival-start.primary { color:#fff4d4; border-color:#305449; background:#35594b; box-shadow:0 2px 0 #264538; }
.stage-choice.lead-choice small { color:#e3e7cc; }
.stage-choice:hover:not(:disabled),.origin-tab:hover:not(:disabled) { background:#eee5cc; border-color:#877d65; }
.stage-choice.lead-choice:hover:not(:disabled),.arrival-start.primary:hover:not(:disabled) { background:#446d59; }
.stage-choice:active:not(:disabled) { transform:translateY(2px); box-shadow:none; }
.stage-choice.irreversible { background:#8c4233; border-color:#733829; }
.stage-choice.irreversible:hover:not(:disabled) { background:#9e503e; }
.stage-choice:disabled,.origin-tab:disabled { opacity:.66; }
.other-choice { background:transparent; box-shadow:none; border-style:dashed; color:#59634f; }
.scene-links,.management-actions { display:flex; gap:7px 22px; align-items:flex-start; flex-wrap:wrap; }
.scene-links { margin-top:7px; }
.scene-link,.scene-back,.scene-disclosure>summary { display:inline-flex; align-items:center; min-height:44px; padding:6px 0; color:#57654f; border:0; background:none; font-size:13px; line-height:1.5; text-align:left; cursor:pointer; }
.scene-link:hover:not(:disabled),.scene-back:hover,.scene-disclosure>summary:hover { color:#934928; text-decoration:underline; text-underline-offset:4px; }
.scene-link:disabled { opacity:.65; cursor:default; }
.scene-back { margin:0 0 6px; }
.scene-disclosure>summary { list-style:none; }
.scene-disclosure>summary::-webkit-details-marker { display:none; }
.scene-disclosure>summary::after { content:"⌄"; margin:0 0 2px 7px; }
.scene-disclosure[open]>summary::after { content:"⌃"; }
.scene-disclosure .stage-choices { margin:0 0 8px; }
.other-pending { display:grid; }
.receipt-strip { display:flex; gap:12px; align-items:baseline; padding:0 0 12px; margin:0 0 14px; border-bottom:1px solid #cbbd9e; color:#555d4e; font-size:13px; line-height:1.6; }
.receipt-strip small { color:#706649; font-size:11px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.arrival-paper { display:flex; justify-content:space-between; align-items:center; gap:24px; }
.origin-tabs { display:flex; flex-wrap:wrap; gap:5px 13px; margin:1px 0 10px; }
.origin-tab { display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:4px 0; background:none; border:0; border-bottom:2px solid transparent; color:#676b59; font-size:14px; }
.origin-tab[aria-pressed="true"] { color:#254739; border-bottom-color:#52745d; font-weight:700; }
.origin-tab .game-icon { width:17px; height:17px; }
.origin-balance h2 { margin:0; font:700 clamp(21px,2.8vw,32px)/1.4 var(--harbor-serif); color:var(--harbor-ink); }
.origin-balance h2 strong { font-family:Georgia,"Songti SC",serif; font-variant-numeric:lining-nums; }
.origin-balance p { margin:4px 0 0; font-size:14px; line-height:1.6; color:#606653; }
.arrival-start.primary { display:inline-flex; align-items:center; justify-content:space-between; gap:30px; min-height:49px; min-width:152px; border-radius:6px; font-size:16px; padding:12px 20px; white-space:nowrap; }
.arrival-actions { display:grid; gap:4px; justify-items:stretch; }
.street-sample-link { display:inline-flex; align-items:center; min-height:36px; color:#435c4c; font-size:13px; text-underline-offset:3px; }
.scene-game .composer { background:none; border:0; margin:0; padding:0; box-shadow:none; }
.scene-review .review-description { font-size:15px; margin-top:10px; }
.scene-review .review-terms { display:flex; align-items:center; flex-wrap:wrap; gap:5px 18px; padding:12px 0; color:#4c5e49; font-size:13px; line-height:1.65; border-bottom:1px solid #ccbea0; }
.review-terms .game-icon { width:15px; height:15px; }
.scene-review .review-buttons { display:flex; gap:10px; margin-top:15px; }
.review-buttons .stage-choice { min-width:114px; }
.review-steps ol { margin:0 0 10px; padding-left:20px; color:#53604e; font-size:13px; line-height:1.8; }
.arrange-heading { display:flex; gap:12px; justify-content:space-between; align-items:center; }
.directory-select { display:flex; align-items:center; gap:12px; margin:10px 0 12px; color:#59624f; font-size:13px; }
.directory-select select { height:42px; min-width:140px; width:auto; padding:4px 10px; color:#33483e; background:#fcf8ec; border:1px solid #b8ad91; border-radius:5px; }
.activity-directory .activity-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.activity-directory .activity-option,.activity-directory .stage-choice { position:relative; min-height:54px; padding:9px 24px 9px 12px; color:#35493f; text-align:left; background:#fdf8e9; border:1px solid #c9bea4; border-radius:5px; box-shadow:none; }
.activity-directory .activity-option { display:grid; grid-template-columns:1fr; }
.activity-directory .activity-option strong { color:#35493f; font-weight:650; font-size:14px; }
.activity-directory .activity-option span,.activity-directory .activity-option small { color:#636955; font-size:12px; }
.activity-directory .activity-option>b { position:absolute; right:10px; top:50%; transform:translateY(-50%); font-size:0; }
.activity-directory .activity-option>b::after { content:"›"; font-size:17px; }
.activity-directory .stage-choice { justify-content:flex-start; }
.activity-directory .stage-choice .game-icon { width:17px; height:17px; }
.activity-directory .activity-option:hover,.activity-directory .stage-choice:hover { background:#f0ead6; }
.time-skip { margin-top:12px; border-top:1px solid #cec2a6; }
.write-action form { display:grid; gap:9px; margin-top:13px; }
.write-action form label { color:#5d6553; font-size:13px; }
.scene-game #action-input { min-height:70px; border:1px solid #bbad91; border-radius:5px; padding:11px; background:#fffdf4; color:var(--harbor-ink); font-size:16px; }
.scene-game .act-button { justify-self:start; min-height:44px; margin:0; background:#35594b; border:1px solid #305449; border-radius:5px; color:#fff1d1; box-shadow:0 2px 0 #244637; }
.scene-game .life-detail { position:static; width:100%; max-width:780px; margin:0 auto; padding:20px clamp(20px,4vw,48px) 32px; background:var(--harbor-paper); color:var(--harbor-ink); border:1px solid #aeaa8b; border-radius:10px; box-shadow:0 6px 20px #1023234d; }
.scene-game .life-detail .detail-view>h1 { font-family:var(--harbor-serif); font-size:29px; }
.notebook-pages { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin:16px 0; border-top:1px solid #ccbea1; }
.notebook-pages button { display:flex; align-items:center; gap:10px; min-height:52px; padding:10px 12px 10px 2px; color:#354a3c; background:none; border:0; border-bottom:1px solid #ccbea1; text-align:left; font-size:15px; }
.notebook-pages button:hover { background:#eee8d1; }
.notebook-pages .game-icon { width:19px; height:19px; color:#7a7454; }
.notebook-pages button>span { margin-left:auto; color:#776e51; }
.save-options { margin-top:12px; border-top:1px solid #c8bca0; }
.role-line { margin:7px 0 18px; color:#636d59; }
.status-page .body-meters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin:12px 0 24px; }
.status-page .meter>div { display:flex; align-items:center; justify-content:space-between; gap:3px; margin-bottom:5px; color:#4d5a47; font-size:13px; }
.status-page .meter small { color:#757863; }
.status-page progress { display:block; width:100%; height:7px; }
.pocket-balance,.condition-row { display:flex; flex-wrap:wrap; gap:10px; align-items:center; padding:15px 0 8px; border-top:1px solid #c7bca1; font-size:15px; }
.pocket-balance .game-icon { color:#7f7050; }
.condition-row p { margin:0; font-size:13px; }
.scene-game .error { margin:12px 0 0; padding:8px 10px; border-left:3px solid #a25239; color:#7e392b; background:#f5e5cb; line-height:1.65; }
.ending-card { border:1px solid #adab8f; background:var(--harbor-paper); }
.ending-art { background:linear-gradient(0deg,#29423f99,transparent),url('/assets/scenes/harbor-bus.webp') center 54%/cover; }
.ending-summary { color:#344c40; }
@media(max-width:720px) {
  .harbor-bar,.scene-game { width:calc(100% - 28px); }
  .harbor-bar { height:63px; }
  .harbor-bar .brand { font-size:20px; }
  .stage-window { height:clamp(220px,39svh,350px); }
  .stage-opening { height:clamp(240px,43svh,370px); }
  .stage-paper,.arrival-paper { padding:21px 20px 23px; }
  .arrival-paper { flex-wrap:wrap; gap:18px; }
  .stage-choices { margin-top:16px; gap:7px; }
  .scene-stamp { top:12px; left:13px; }
  .pocket-hud { top:9px; right:12px; }
  .stage-caption { left:13px; bottom:11px; }
  .dialogue-text { font-size:15px; }
  .scene-game .life-detail { padding:13px 19px 22px; }
}
@media(max-width:520px) {
  .harbor-bar,.scene-game { width:calc(100% - 20px); }
  .harbor-bar { padding:0 4px; height:55px; }
  .harbor-bar .brand { font-size:18px; gap:7px; }
  .harbor-bar .brand-emblem { width:29px; height:29px; }
  .journal-toggle { gap:6px; font-size:13px; }
  .stage-frame { border-radius:8px; }
  .scene-stamp { gap:6px; padding:6px 7px; }
  .scene-stamp>strong { font-size:14px; }
  .scene-stamp>span { font-size:10px; padding-left:6px; }
  .scene-stamp .game-icon { width:12px; height:12px; }
  .pocket-hud>button { font-size:12px; min-height:38px; padding:4px 7px; gap:4px; }
  .pocket-hud strong { font-size:12px; }
  .pocket-hud .game-icon { width:15px; height:15px; }
  .pocket-hud { top:10px; }
  .stage-paper,.arrival-paper { padding:17px 15px 19px; }
  .arrival-title { left:17px; bottom:19px; }
  .arrival-start.primary { width:100%; min-height:46px; }
  .arrival-actions { width:100%; }
  .origin-tabs { gap:11px; }
  .origin-tab { font-size:13px; gap:4px; }
  .origin-tab .game-icon { width:14px; height:14px; }
  .stage-choices { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .stage-choices .stage-choice:only-child { grid-column:1/-1; }
  .daily-choices .other-choice { grid-column:1/-1; min-height:44px; border:0; box-shadow:none; }
  .stage-choice { min-height:46px; padding:8px; gap:6px; font-size:14px; }
  .stage-choice .game-icon { width:17px; height:17px; }
  .receipt-strip { display:block; margin-bottom:12px; padding-bottom:8px; }
  .receipt-strip small { display:block; margin-bottom:2px; }
  .scene-links { column-gap:16px; }
  .activity-directory .activity-options { grid-template-columns:1fr; }
  .scene-game .life-detail { padding:10px 15px 18px; }
  .status-page .body-meters { grid-template-columns:1fr; gap:9px; }
  .status-page .meter>div { min-height:24px; }
}
@media(max-width:355px) {
  .origin-tabs { gap:5px; }
  .origin-tab .game-icon,.scene-stamp .game-icon { display:none; }
  .stage-choices { grid-template-columns:1fr; }
}
@media(prefers-reduced-motion:reduce) {
  .stage-choice,.arrival-start.primary { transition:none; }
  .stage-choice:active:not(:disabled) { transform:none; }
}
