/* Story panels use existing local portraits; combat remains server driven behind the modal. */
.story-dialog{width:min(690px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 28px);margin:auto;padding:0;border:1px solid #aa9562;border-radius:14px;background:#f0ead8;color:#263f38;box-shadow:0 18px 90px #051b21aa;font-family:inherit;overflow:hidden}
.story-dialog::backdrop{background:#071d29a6;backdrop-filter:blur(3px)}
.story-shell{max-height:calc(100dvh - 30px);display:flex;flex-direction:column;min-height:0;background:linear-gradient(140deg,#fdf8e8,#e1e9d7)}
.story-header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:23px 26px 19px;border-bottom:1px solid #b8bf9b;background:linear-gradient(110deg,#274c43,#496c56);color:#fff6d4}
.story-kicker{font-size:11px;font-weight:700;letter-spacing:1.4px;color:#d2ddbd;display:block;margin-bottom:7px}
.story-header h2{font-size:27px;line-height:1.3;letter-spacing:2px;margin:0;color:#fff6d4;font-family:KaiTi,'DFKai-SB',serif}
.story-close{border:1px solid #b0bd9166;background:#c7d1a81c;color:#fff6d4;border-radius:50%;width:36px;height:36px;min-width:36px;font-size:27px;line-height:1;cursor:pointer}
.story-content{overflow:auto;overscroll-behavior:contain;min-height:0;padding:24px 26px;scrollbar-color:#9cae8b transparent}
.story-scene{display:grid;grid-template-columns:190px minmax(0,1fr);gap:25px;min-height:300px}
.story-portrait-wrap{position:relative;border-radius:90px 90px 9px 9px;background:radial-gradient(ellipse at center,#ecf6df,#9bb293 75%);overflow:hidden;min-height:300px;border:1px solid #a6b18b;align-self:stretch}
.story-portrait{position:absolute;width:100%;height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 8px 10px #264c3655)}
.story-portrait-caption{position:absolute;left:0;right:0;bottom:0;padding:12px 4px;text-align:center;font-size:12px;letter-spacing:4px;color:#f1ebce;background:linear-gradient(transparent,#264638e8);font-family:KaiTi,'DFKai-SB',serif}
.story-dialogue{display:flex;flex-direction:column;padding-top:10px;position:relative;min-width:0}
.story-line-index{position:absolute;right:0;top:0;font-size:11px;color:#697d68;font-variant-numeric:tabular-nums}
.story-speaker{font-size:19px;margin:17px 0 15px;line-height:1.5;color:#345845;font-family:KaiTi,'DFKai-SB',serif}
.story-line{font-size:16px;line-height:1.95;letter-spacing:.4px;margin:0 0 24px;white-space:pre-wrap;overflow-wrap:anywhere;color:#334b3d;flex:1}
.story-objective{border-top:1px solid #b9c4a7;padding-top:14px}
.story-objective>span{font-size:11px;color:#786134;font-weight:700;letter-spacing:1px}
.story-objective p{font-size:12px;line-height:1.65;color:#5d6f54;margin:5px 0 0;overflow-wrap:anywhere}
.story-footer{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px;padding:18px 26px;background:#d7e0c8;border-top:1px solid #b7c39f}
.story-secondary,.story-primary{display:flex;gap:11px;align-items:center;flex-wrap:wrap}
.story-button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:10px 17px;border:1px solid #ae9052;border-radius:6px;background:linear-gradient(#e3ca84,#c3a660);color:#493c1b;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.story-button.subtle{border-color:#809778;background:#e6ead9;color:#415b3d}
.story-text-button{background:none;border:0;color:#5a6b51;font-size:12px;cursor:pointer;min-height:36px;padding:6px 0;text-decoration:underline;text-underline-offset:4px}
.story-dialog button:focus-visible{outline:3px solid #277777;outline-offset:3px}
.story-dialog button:disabled{opacity:.5;cursor:wait}
.story-dialog .story-scene-link:disabled{cursor:not-allowed}
.story-error{margin:0;padding:12px 26px;color:#8e352b;font-size:13px;line-height:1.7;background:#f5e2ce;border-top:1px solid #d8ae85}
.story-error[hidden]{display:none}
.story-summary{font-size:13px;line-height:1.8;margin:0 0 19px;color:#667657}
.story-chapters{list-style:none;margin:0;padding:0;display:grid;gap:11px}
.story-chapters>li{padding:13px 15px;border:1px solid #bec8ad;border-radius:7px;background:#f6f7e8}
.story-chapter-heading{display:flex;gap:11px;align-items:center;margin-bottom:10px}
.story-chapter-heading>span{font-family:Georgia,serif;font-size:22px;color:#a0884b}
.story-chapter-heading h3{font-size:15px;color:#39573d;margin:0;line-height:1.5}
.story-scene-links{display:flex;gap:10px}
.story-scene-link{display:flex;justify-content:space-between;gap:16px;align-items:center;min-width:0;flex:1;padding:10px 12px;background:#dde8ce;border:1px solid #b7c6a4;border-radius:5px;color:#415934;cursor:pointer}
.story-scene-link span{font-size:12px}.story-scene-link b{font-size:11px;font-weight:600;color:#8b6825}.story-scene-link.is-read b{color:#567657}
.story-note{font-size:11px;color:#627454;line-height:1.7}
.story-quest-card{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px;margin:0 0 20px;background:linear-gradient(105deg,#dae7cc,#f1edcf);border:1px solid #b2bd8e;border-radius:8px;color:#3f5b39}
.story-quest-kicker{font-size:10px;letter-spacing:1px;color:#6f7650}.story-quest-card h3{font-family:KaiTi,'DFKai-SB',serif;font-size:21px;margin:5px 0;color:#405936}.story-quest-card p{font-size:12px;margin:0;color:#657450}.story-quest-card .btn{min-height:42px;white-space:nowrap}
@media(max-width:600px){.story-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 18px);border-radius:10px}.story-shell{max-height:calc(100dvh - 20px)}.story-header{padding:17px 18px 15px}.story-header h2{font-size:24px}.story-content{padding:18px}.story-scene{grid-template-columns:96px minmax(0,1fr);gap:15px;min-height:260px}.story-portrait-wrap{min-height:230px}.story-portrait-caption{font-size:10px;letter-spacing:1px;padding:13px 2px 8px}.story-portrait{width:145%;max-width:none;left:-22.5%;object-fit:contain}.story-speaker{font-size:18px;margin:13px 0 9px}.story-line{font-size:14px;line-height:1.85;letter-spacing:0;margin-bottom:17px}.story-objective p{font-size:11px}.story-footer{padding:13px 18px;gap:8px;flex-direction:column;align-items:stretch}.story-primary{justify-content:stretch}.story-primary .story-button{flex:1;font-size:12px;padding:10px 7px}.story-secondary{justify-content:space-between;gap:12px}.story-text-button{font-size:11px}.story-quest-card{padding:13px;gap:8px}.story-quest-card h3{font-size:18px}.story-quest-card .btn{font-size:11px;padding:8px}.story-chapters>li{padding:11px}.story-chapter-heading h3{font-size:13px}.story-scene-link{padding:10px;gap:6px}.story-kicker{font-size:10px;letter-spacing:.6px}.story-error{padding:10px 18px;font-size:12px}}
@media(max-height:550px){.story-header{padding:11px 18px}.story-content{padding:14px 18px}.story-scene{min-height:160px;grid-template-columns:100px minmax(0,1fr)}.story-portrait-wrap{min-height:160px}.story-footer{padding:8px 18px}.story-line{font-size:14px;line-height:1.7;margin-bottom:12px}.story-objective{padding-top:8px}.story-speaker{margin:12px 0 6px}.story-primary .story-button{min-height:36px}.story-secondary .story-text-button{min-height:28px}}

/* P7b.1 main-quest steps (server data); the quest panel is light, so the steps use dark text */
.quest-steps{list-style:none;margin:6px 0;padding:0;display:grid;gap:4px}
.quest-steps li{display:grid;grid-template-columns:18px 1fr;column-gap:6px;align-items:baseline;color:#6f7d74}
.quest-steps li.done{color:#2f6b4c}
.quest-steps li.active{color:#1f2d25;font-weight:600}
.quest-steps li small{grid-column:2;color:#4f5e55;font-weight:400}
.quest-step-mark{text-align:center}
.quest-where,.quest-claim-state{color:#7a5a1c;font-size:12px}
.quest-lock{color:#9b3b2b}
