.ps-dialog {
  width:min(880px,calc(100vw - 32px));
  max-height:calc(100dvh - 32px);
  box-sizing:border-box;
  padding:0;
  border:1px solid #837048;
  border-radius:16px;
  background:radial-gradient(ellipse at 50% 0,#302b20 0,transparent 55%),#141613;
  color:#eee7d9;
  box-shadow:0 28px 120px #000c;
}
.ps-dialog::backdrop { background:#050806dd;backdrop-filter:blur(5px) }
.ps-dialog header,.ps-dialog footer,.ps-actions { display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap }
.ps-journey-header { position:absolute;z-index:1;top:0;left:0;right:0;padding:18px 24px;background:linear-gradient(#080d12c9,transparent) }
.ps-journey-header .ps-eyebrow { color:#e7d7b4;text-shadow:0 1px 4px #000 }
.ps-journey-header button { background:#131b1dd9;border-color:#9d906680 }
.ps-scene-body { padding:28px 44px 36px }
.ps-dialog footer { margin-top:22px;border-top:1px solid #a78c5133;padding-top:22px }
.ps-dialog h2 { font-size:2rem;line-height:1.35;margin:12px 0 20px;font-weight:500;letter-spacing:-.025em;color:#f5e7c6 }
.ps-dialog h2:focus { outline:none }
.ps-eyebrow { color:#d4b374;font-size:.82rem;letter-spacing:.06em;margin:0 }
.ps-scene-text { font-size:1.07rem;line-height:1.95;color:#e0ddd0;max-width:65ch;margin:20px 0 }
.ps-invitation { line-height:1.8;color:#c5bfad }
.ps-route { display:flex;justify-content:space-between;align-items:center;gap:18px }
.ps-route-marks { display:flex;gap:8px }
.ps-route-marks i { width:6px;height:6px;transform:rotate(45deg);border:1px solid #8d805e }
.ps-route-marks .passed { background:#82704a }
.ps-route-marks .current { background:#f2d991;box-shadow:0 0 10px #e1ba5977 }
.ps-landscape { height:190px;overflow:hidden;background:linear-gradient(#141f2e,#596064);border-bottom:1px solid #ad965240 }
.ps-landscape svg { width:100%;height:100%;display:block }
.ps-moon { fill:#e6d7ac;opacity:.8 }
.ps-far-hills { fill:#343f49 }
.ps-near-hills { fill:#23302f }
.ps-road { fill:#aaa080;opacity:.46 }
.ps-ruin { fill:#192625 }
.ps-trees { fill:#101d1b;stroke:#101d1b;stroke-width:4 }
.ps-fire { fill:#efb96a;filter:drop-shadow(0 0 9px #ffc86f) }
.ps-embers { fill:none;stroke:#f3d397;stroke-width:2 }
.ps-landscape[data-scene="resources"],.ps-landscape[data-scene="gate"] { background:linear-gradient(#384858,#b6a182) }
.ps-landscape[data-scene="village"],.ps-landscape[data-scene="journey"] { background:linear-gradient(#354e58,#879989) }
.ps-landscape[data-scene="ruins"],.ps-landscape[data-scene="combat"],.ps-landscape[data-scene="tactics"] { background:linear-gradient(#17222d,#565b60) }
.ps-landscape[data-scene="scene"],.ps-landscape[data-scene="solution"] { background:linear-gradient(#353346,#936e5c) }
.ps-landscape[data-scene="identity"] { background:linear-gradient(#101626,#33414a) }
.ps-last-step { font-size:.85rem;color:#b8ad92;border-left:1px solid #8d7447;padding-left:12px;margin:12px 0 }
.ps-last-step p { margin:8px 0;line-height:1.7 }
.ps-dialog fieldset { border:0;padding:0;margin:26px 0 12px;min-width:0 }
.ps-prompt { color:#efdcac;font-size:1rem;line-height:1.65;margin-bottom:12px }
.ps-option { display:flex;gap:14px;align-items:center;min-height:var(--m-touch);box-sizing:border-box;padding:16px;margin:10px 0;border:1px solid #74705288;border-radius:7px;cursor:pointer;background:#ffffff04;font-size:1rem;line-height:1.65;transition:background-color .15s,border-color .15s }
.ps-option:hover { background:#bca46612;border-color:#a49268 }
.ps-option input { position:absolute;width:1px;height:1px;opacity:0 }
.ps-choice-number { flex:0 0 26px;height:26px;border:1px solid #877247;color:#bca875;border-radius:50%;display:grid;place-items:center;font-size:.8rem }
.ps-option:has(:checked) { border-color:#d4b374;background:#9f803625 }
.ps-option:has(:checked) .ps-choice-number { color:#171b17;background:#d4b374;border-color:#d4b374 }
.ps-option:focus-within { outline:2px solid #d4b374;outline-offset:3px }
.ps-echo { min-height:4.5rem;box-sizing:border-box;display:flex;align-items:center;color:#d4c49e;font-size:.95rem;line-height:1.8 }
.ps-echo p { border-left:2px solid #b69a5c;padding:6px 0 6px 16px;margin:8px 0;animation:ps-arrive .22s ease-out }
.ps-dialog input { accent-color:#d4b374 }
.ps-dialog button:disabled { opacity:.45;cursor:not-allowed }
.ps-result { line-height:1.65 }
.ps-result h3 { font-size:1.22rem;margin:22px 0 12px }
.ps-result h4 { margin:0;font-size:1rem }
.ps-goals,.ps-candidates { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));gap:12px;margin:16px 0 }
.ps-goal,.ps-candidate { border:1px solid #56534a;padding:16px;border-radius:9px;background:#ffffff04 }
.ps-goal.selected { border-color:#a28a58 }
.ps-goal label { display:flex;align-items:center;gap:9px;font-weight:700 }
.ps-goal p,.ps-candidate p { margin:10px 0;font-size:.91rem }
.ps-goal details { font-size:.84rem }
.ps-result ul { padding-left:22px }
.ps-result a,.ps-spells a { color:#e2c38a;text-underline-offset:3px }
.ps-preferences { padding:12px 0;border-bottom:1px solid #56534a }
.ps-journal { margin:0 0 28px;border:1px solid #8a744655;border-radius:8px;background:#b39c5907 }
.ps-journal summary { min-height:var(--m-touch);box-sizing:border-box;padding:14px 18px;color:#dbc592;cursor:pointer }
.ps-journal summary span { float:right;font-size:.85rem }
.ps-journal ol { list-style:none;padding:0 20px 4px 28px;margin:0 }
.ps-journal li { position:relative;border-left:1px solid #8e774a;padding:0 0 20px 20px }
.ps-journal li::before { content:'';position:absolute;left:-4px;top:8px;width:7px;height:7px;transform:rotate(45deg);background:#b9a06b }
.ps-journal strong { font-size:.85rem;color:#bda879;font-weight:500 }
.ps-journal p { margin:6px 0 0;font-size:.92rem;color:#d8d0be }
.ps-candidate-memory { margin:14px 0;padding:8px 0 8px 12px;border-left:2px solid #a78c51;color:#caba94;font-size:.87rem }
.ps-panel { padding:4px;line-height:1.6 }
.ps-panel .ps-actions { justify-content:flex-start;margin:20px 0 }
.ps-spells { display:grid;gap:12px;padding:0;list-style:none }
.ps-spells li { padding:14px;border:1px solid #56534a;border-radius:8px }
.ps-spells small { display:block;color:#bfb7a8 }
.ps-status { display:inline-block;margin-left:8px;padding:2px 7px;border-radius:5px;background:#383b36;font-size:.78rem }
.ps-launch { width:100%;margin-top:8px }
@keyframes ps-arrive { from { opacity:0;transform:translateY(4px) } to { opacity:1;transform:translateY(0) } }
@media(prefers-reduced-motion:reduce) { .ps-echo p { animation:none }.ps-option { transition:none } }
@media(max-width:620px) {
  .ps-dialog { width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:10px }
  .ps-journey-header { padding:12px 16px }
  .ps-landscape { height:145px }
  .ps-scene-body { padding:22px 20px 26px }
  .ps-dialog h2 { font-size:1.6rem }
  .ps-scene-text { font-size:1rem;line-height:1.85 }
  .ps-dialog footer { gap:8px }
  .ps-dialog footer button { flex:1;min-height:44px }
  .ps-dialog footer .primary { flex-basis:100% }
  .ps-goals,.ps-candidates { grid-template-columns:1fr }
  .ps-option { padding:14px 12px;gap:10px }
  .ps-route-marks { gap:6px }
}

/* 편집 대본의 줄바꿈은 장면·미리보기·결과 기록에서 같은 방식으로 읽는다. */
.ps-scene-body > h2, .ps-scene-text, .ps-invitation, .ps-scene-body > .hint, .ps-prompt, .ps-option > span, .ps-echo p, .ps-last-step p, .ps-journal li > strong, .ps-journal p, .ps-candidate-memory, .ps-goal li, .ps-preferences li { white-space:pre-line; overflow-wrap:anywhere; }
