/* Dark fairytale game stage. All functional labels remain live, readable HTML. */
body[data-world="true"]{background:#111c18;color:#ede4cf;--ink:#ede4cf;--muted:#c4b99c;--line:#b69a6255;--green:#c3ad73;--red:#d98c71;--paper:#1e2b24;--sheet:#18271f;min-height:100dvh}
body[data-world="true"]{background-image:linear-gradient(#07100b22,#09130c44),url('./assets/ui/battle-stage-v4.webp');background-position:center;background-size:cover;background-attachment:fixed;background-repeat:no-repeat}
body[data-world="true"] .card-art{background:#e8e0c0}
body[data-world="true"] .card-art img,body[data-world="true"] .path-portrait{mix-blend-mode:normal}
body[data-world="true"] .topbar{height:72px;max-width:none;padding:10px 28px;border-bottom:1px solid #b69a6266;background:linear-gradient(#101b18f5,#101b18dc);box-shadow:0 5px 24px #0008;gap:28px}
body[data-world="true"] .wordmark{font-family:var(--serif);color:#e8d4a4;text-shadow:1px 2px #000;font-size:23px}
body[data-world="true"] .wordmark span{color:#c6b88f}
body[data-world="true"] .tools{gap:8px}
body[data-world="true"] .tools button{border:1px solid #aa8d5755;background:#111d17aa;border-radius:3px;padding:8px 11px;color:#e7d9b9;font-size:11px;box-shadow:inset 0 0 0 1px #0006}
body[data-world="true"] .tools button:hover{border-color:#e2c38a;background:#324237}
body[data-world="true"] .life-stats{gap:22px;flex:1;justify-content:center}
body[data-world="true"] .health{width:190px;max-width:230px;padding:8px 12px;background:#0e1711;border:1px solid #a58a50;box-shadow:inset 0 0 0 3px #28372b,0 2px 8px #0008}
body[data-world="true"] .health>span{font-size:11px;color:#e6d9bd}
body[data-world="true"] .health .meter{height:7px;background:#060d08;border:1px solid #bca16c77;margin-top:6px}
body[data-world="true"] .health .meter i{background:linear-gradient(90deg,#6f2826,#c47f5a)}
body[data-world="true"] .age b{font-size:29px;color:#dfc896}
body[data-world="true"] .age span{color:#c5b58e}
body[data-world="true"] .primary{background:linear-gradient(#863d32,#51231f);color:#fff0cb;border:1px solid #d0a777;box-shadow:inset 0 0 0 3px #2d1d18,0 4px 10px #0007;text-shadow:0 1px #000;letter-spacing:.01em}
body[data-world="true"] .primary:hover{background:linear-gradient(#a34e3c,#753127);transform:translateY(-2px)}
body[data-world="true"] :focus-visible{outline:3px solid #f2d593;outline-offset:4px}
body[data-world="true"] .game-layout{max-width:1600px;padding:28px;gap:26px}
body[data-world="true"] .paper{background:linear-gradient(135deg,#203126f7,#111f18f5);border:1px solid #b69a62;box-shadow:inset 0 0 0 4px #17231a,inset 0 0 0 5px #7e6b4055,0 18px 60px #0009}
body[data-world="true"] .scene h1{color:#e7d4a6;text-shadow:0 3px 12px #000}
body[data-world="true"] .scene-lead{color:#c7bea7}
body[data-world="true"] .path{background:#0c1913c9;border:1px solid #9f885d;box-shadow:inset 0 0 0 3px #b6a16d16,0 8px 16px #0005}
body[data-world="true"] .path:hover{background:#304334;border-color:#ead0a0}
body[data-world="true"] .path-portrait{filter:drop-shadow(0 10px 8px #000a)}
body[data-world="true"] .path-kind,body[data-world="true"] .path-number{color:#d6bd89}
body[data-world="true"] .journey-detail{color:#d6c8aa;background:#101d15d9;padding:12px;border:1px solid #a08a5144}
body[data-world="true"] .save-state{color:#c4b99c;font-size:10px}
body[data-world="true"] .action-receipt{background:#102019e8;border:1px solid #b69b60;border-left:3px solid #d6b56c;box-shadow:0 10px 20px #0007,inset 0 0 18px #0006;color:#f2e5c5}
body[data-world="true"] .card{--ink:#263b33;--muted:#54604c;--line:#75684955;--green:#315e49;--red:#923b2c;background:linear-gradient(130deg,#ede4cf,#d9c9a3);color:#263b33;border:2px solid #8c754c;border-top:4px solid var(--card-accent);border-radius:9px 9px 6px 6px;box-shadow:inset 0 0 0 2px #f8edcf,0 7px 16px #0009}
body[data-world="true"] .card-cost{box-shadow:0 0 0 2px #e7cc91,0 0 0 3px #776447,0 2px 4px #0005;background:radial-gradient(circle at 35% 25%,#bc7d50,#702d28);color:#fff0d0}
body[data-world="true"] .card-art{border:1px solid #7c6a49;box-shadow:inset 0 0 5px #0005;border-radius:3px}
body[data-world="true"] .card-name{color:#23382d}
body[data-world="true"] .card-flavor{color:#4c5848}
body[data-world="true"] .card-live{color:#6c3024}
body[data-world="true"] dialog{background:#18271f;border:1px solid #c5a974;color:#eee0bc;box-shadow:inset 0 0 0 4px #0d1711,0 20px 80px #000c}
body[data-world="true"] .catalogue-search input{background:#0c1912;color:#f2e5c5;border-color:#a8915c}
body[data-world="true"] .catalogue-filters button,body[data-world="true"] .motion-choices button{border-color:#998555;color:#e6d4ad;background:#0e1b13}
body[data-world="true"] .catalogue-filters [aria-pressed="true"],body[data-world="true"] .motion-choices [aria-pressed="true"]{background:#b9a16a;color:#101e16}
body[data-world="true"] .preview-notice{font-size:10px;text-align:center;background:#442c20;color:#e9d3a3;padding:4px}
/* Wide battle is a stage with a shared card table, not a content column. */
body[data-screen="battle"] .game-layout.in-battle{display:block;position:relative;max-width:1600px;margin:auto;padding:12px 24px 18px}
body[data-screen="battle"] .journey{position:absolute;left:24px;top:92px;width:205px;gap:12px;z-index:3;border:0;padding:0}
body[data-screen="battle"] .journey .action-receipt{padding:16px 14px;max-height:290px;overflow:auto}
body[data-screen="battle"] .journey-detail{font-size:10px;padding:8px}
body[data-screen="battle"] .save-state{display:none}
body[data-screen="battle"] .battle-heading{justify-content:center;position:relative;text-align:center;min-height:65px;padding:0 230px;margin:0}
body[data-screen="battle"] .battle-heading h1{font:700 30px/1.25 var(--serif);letter-spacing:-1px;color:#e9d4a4;text-shadow:0 3px 10px #000;margin:3px 0}
body[data-screen="battle"] .battle-heading .eyebrow{color:#c8ad77;font-size:10px;letter-spacing:.12em;margin:0}
body[data-screen="battle"] .battle-heading p:not(.eyebrow){font-size:11px;color:#d2c5a9;margin:5px 0 0}
body[data-screen="battle"] .turn-chip{position:absolute;right:8px;top:0;border:1px solid #b1945a;padding:8px 20px;background:#15261ccc;color:#ddc38e;font:24px var(--serif)}
body[data-screen="battle"] .battle-table{display:grid;grid-template-columns:1fr 1.25fr 200px;align-items:end;gap:18px;margin:0 0 0 218px;min-height:280px;padding:0 10px 10px;position:relative}
body[data-screen="battle"] .player-note{border:0;background:none;transform:none;box-shadow:none;padding:0;text-align:center;display:flex;flex-direction:column;align-items:center;align-self:end;position:relative;min-width:0}
body[data-screen="battle"] .citizen-sprite{display:block;object-fit:contain;height:224px;width:160px;filter:drop-shadow(6px 9px 7px #000a)}
body[data-screen="battle"] .player-note>.eyebrow{display:block;color:#e6d2a5;font-size:11px;margin:0 0 5px}
body[data-screen="battle"] .player-note dl{background:#12231de8;border:1px solid #ae955f;display:flex;gap:10px;flex-wrap:wrap;justify-content:center;padding:5px 12px;box-shadow:0 3px 8px #0008;margin:0;max-width:230px}
body[data-screen="battle"] .player-note dl div{border:0;padding:0;display:flex;align-items:center;gap:7px}
body[data-screen="battle"] .player-note dt{font-size:10px;color:#dccca9;max-width:100px;line-height:1.5}
body[data-screen="battle"] .player-note dd{font-size:23px;color:#e9dcbb;margin:0}
body[data-screen="battle"] .enemy-object{align-self:end;min-height:0;width:100%;display:flex;flex-direction:column;align-items:center}
body[data-screen="battle"] .enemy-art.generated-enemy{zoom:1!important;transform:none;width:240px;height:224px;margin:0;filter:drop-shadow(8px 12px 7px #000b)}
body[data-screen="battle"] .enemy-art.generated-enemy img{width:100%;height:100%;object-fit:contain}
body[data-screen="battle"] .enemy-health{width:min(260px,100%);margin:0;padding:8px 10px;background:#161c16eb;border:1px solid #b39862;box-shadow:0 3px 8px #0009}
body[data-screen="battle"] .enemy-health>span{color:#e9d9ba;font-size:11px}
body[data-screen="battle"] .enemy-health b{font-size:15px;color:#fff0cc}
body[data-screen="battle"] .enemy-health .meter{height:8px;background:#0b100c;border:1px solid #9d724d88;margin-top:6px}
body[data-screen="battle"] .enemy-health .meter i{background:linear-gradient(90deg,#6b2727,#c66549)}
body[data-screen="battle"] .status-tags{margin-top:5px}
body[data-screen="battle"] .status-tags:empty{display:none}
body[data-screen="battle"] .status-tags span{background:#172a20;color:#ead4a5;border-color:#b69a62}
body[data-screen="battle"] .intent-note{align-self:center;transform:none;min-height:208px;box-sizing:border-box;border:0;box-shadow:none;background:url('./assets/ui/hud-panel-v4.webp') center/100% 100% no-repeat;padding:35px 23px 25px;color:#f1dfb8;text-align:center}
body[data-screen="battle"] .intent-note>.eyebrow{font-size:10px;color:#dcc391;margin:0}
body[data-screen="battle"] .intent-note>strong{font-size:17px;display:block;margin:8px 0;color:#eadabb}
body[data-screen="battle"] .intent-note strong b{display:block;font:700 42px/1.1 var(--serif);color:#e7b087;margin:5px 0}
body[data-screen="battle"] .intent-note p{font-size:11px;color:#d7bd8a;margin:6px 0}
body[data-screen="battle"] .intent-note small{font-size:11px;color:#efe1c5;line-height:1.6;display:block}
body[data-screen="battle"] .intent-foot{display:none}
body[data-screen="battle"] .hand-toolbar{margin:14px 0 0;padding:8px 20px;min-height:56px;border-top:1px solid #c0a46988;border-bottom:1px solid #c0a46944;background:linear-gradient(90deg,#10231df5,#182d22ed,#10231df5);box-shadow:0 -8px 25px #0006;gap:20px;position:relative;z-index:4}
body[data-screen="battle"] .time-resource>b{width:45px;height:45px;border-radius:50%;border:2px solid #c4aa70;background:radial-gradient(circle at 35% 25%,#d4ad67,#72522e 55%,#352b21);box-shadow:0 0 0 3px #18271f,0 0 0 4px #ad8b56,inset 0 0 0 3px #ad8954;color:#fff1c6;font:700 30px var(--serif);text-shadow:0 2px 2px #000}
body[data-screen="battle"] .time-resource>span{color:#ecdbb9;font-size:12px}
body[data-screen="battle"] .time-resource small{color:#c5b68e;font-size:9px}
body[data-screen="battle"] .pile-buttons{margin:auto;gap:12px}
body[data-screen="battle"] .pile-buttons button{border:1px solid #a28b5355;border-radius:3px;background:#0a1812;padding:7px 10px;color:#dbc79e;font-size:10px}
body[data-screen="battle"] .pile-buttons b{color:#fff1ce;font-size:15px}
body[data-screen="battle"] .end-turn{margin-left:auto;padding:12px 24px;font:700 14px var(--serif)}
body[data-screen="battle"] .hand{margin:0;padding:20px 20px 14px;display:flex;justify-content:center;align-items:stretch;gap:13px;min-height:260px;overflow-x:auto;overflow-y:visible;background:linear-gradient(#10170f55,#080e0bd9);scroll-padding:20px}
body[data-screen="battle"] .hand .card{flex:0 0 166px;width:166px;min-width:166px;min-height:242px;height:auto;padding:10px;transform:rotate(var(--tilt));transition:transform 160ms ease,box-shadow 160ms ease;position:relative}
body[data-screen="battle"] .hand .card:hover,body[data-screen="battle"] .hand .card:focus-visible{transform:translateY(-12px) rotate(0);box-shadow:0 0 0 2px #e4c484,0 14px 20px #000a;z-index:6}
body[data-screen="battle"] .hand .card-art{height:78px;margin:7px 0}
body[data-screen="battle"] .hand .card-name{font:700 15px/1.45 var(--serif);margin-bottom:5px}
body[data-screen="battle"] .hand .card-text{font-size:11px;line-height:1.55}
body[data-screen="battle"] .hand .card-live{font-size:10px}
body[data-screen="battle"] .hand .card-flavor{display:none}
body[data-screen="battle"] .hand .card-top{min-height:24px}
body[data-screen="battle"] .hand .card-kind{font-size:9px}
body[data-screen="battle"] .battle-footer{padding:7px 15px;margin:0;background:#0b1511d9;color:#c9b98f}
body[data-screen="battle"] .battle-log{color:#ddcba5}
/* Home and intermissions share the same illustrated world. */
body[data-screen="battle"] .hand{justify-content:safe center}
@media(max-width:1050px){body[data-screen="battle"] .hand{justify-content:flex-start}}
body[data-world="true"] .title-screen{background:linear-gradient(90deg,#0b1814e6 5%,#0b181444 65%);max-width:none;min-height:calc(100dvh - 72px)}
body[data-world="true"] .title-copy h1{color:#ead4a0;text-shadow:2px 4px 18px #000}
body[data-world="true"] .title-copy .eyebrow,body[data-world="true"] .title-description{color:#e3d1a6}
body[data-world="true"] .city-art{opacity:.75;filter:sepia(.25) brightness(.7);mix-blend-mode:screen;mask-image:radial-gradient(ellipse,#000 30%,transparent 70%)}
body[data-world="true"] .title-footer{color:#c6b68e;border-color:#ad8f5655}
body[data-world="true"] .title-small,body[data-world="true"] .play-note{color:#d4c3a1}
body[data-world="true"] .choice-list button:hover:not(:disabled){background:#314333}
body[data-world="true"] .lesson-example,body[data-world="true"] .learn-stage{color:#263b33}
@media(min-width:1450px){body[data-screen="battle"] .battle-table{min-height:330px}body[data-screen="battle"] .citizen-sprite{height:270px;width:180px}body[data-screen="battle"] .enemy-art.generated-enemy{height:270px;width:285px}body[data-screen="battle"] .hand .card{flex-basis:183px;width:183px;min-height:275px}body[data-screen="battle"] .hand .card-art{height:96px}}
@media(max-width:1050px){body[data-world="true"] .topbar{padding:10px 16px;gap:12px}body[data-world="true"] .tools button{padding:7px;font-size:10px}body[data-screen="battle"] .journey{width:170px;left:16px}body[data-screen="battle"] .battle-table{margin-left:175px;grid-template-columns:1fr 1.2fr 170px;gap:10px}body[data-screen="battle"] .battle-heading{padding:0 180px}body[data-screen="battle"] .citizen-sprite{width:130px;height:210px}body[data-screen="battle"] .enemy-art.generated-enemy{width:190px;height:210px}body[data-screen="battle"] .hand{justify-content:flex-start}body[data-screen="battle"] .intent-note{padding:32px 20px 24px}body[data-screen="battle"] .pile-buttons{gap:6px}}
@media(max-width:800px){body[data-world="true"] .topbar{height:auto;min-height:80px;flex-wrap:wrap}body[data-world="true"] .life-stats{order:3;width:100%;padding-top:7px;border:0}body[data-world="true"] .health{flex:1;max-width:none}body[data-world="true"] .game-layout{padding:16px}body[data-screen="battle"] .game-layout.in-battle{padding:12px}body[data-screen="battle"] .journey{position:relative;inset:auto;width:auto;margin:0 0 14px;display:block}body[data-screen="battle"] .journey .action-receipt{max-height:none;padding:12px 15px}body[data-screen="battle"] .journey-detail{display:none}body[data-screen="battle"] .battle-heading{padding:0 65px 0 0;text-align:left;min-height:70px}body[data-screen="battle"] .battle-heading h1{font-size:26px}body[data-screen="battle"] .turn-chip{right:0;padding:6px 10px;font-size:20px}body[data-screen="battle"] .battle-table{margin:0;grid-template-columns:.8fr 1fr 150px;gap:6px;min-height:245px;padding:0 0 12px}body[data-screen="battle"] .citizen-sprite{height:180px;width:120px}body[data-screen="battle"] .player-note{grid-column:auto;order:0}body[data-screen="battle"] .player-note dl{padding:5px;gap:5px}body[data-screen="battle"] .player-note dt{font-size:9px}body[data-screen="battle"] .player-note dd{font-size:18px}body[data-screen="battle"] .enemy-art.generated-enemy{width:180px;height:190px}body[data-screen="battle"] .intent-note{min-height:190px;padding:28px 17px 22px}body[data-screen="battle"] .intent-note strong b{font-size:33px}body[data-screen="battle"] .intent-note>strong{font-size:14px}body[data-screen="battle"] .hand-toolbar{padding:10px;flex-wrap:wrap;gap:12px}body[data-screen="battle"] .pile-buttons{order:3;width:100%;justify-content:center}body[data-screen="battle"] .hand{margin:0 -12px;padding:20px 15px;gap:12px}body[data-screen="battle"] .hand .card{min-height:265px;flex-basis:170px;width:170px}body[data-screen="battle"] .hand .card-text{font-size:12px}body[data-screen="battle"] .hand .card-art{height:85px}}
@media(max-width:520px){body[data-world="true"] .wordmark{font-size:20px}body[data-world="true"] .topbar .tools{gap:5px}body[data-world="true"] .tools button{font-size:9px;padding:5px 6px}body[data-screen="battle"] .battle-table{grid-template-columns:1fr 1fr;min-height:0;padding-top:8px;gap:12px}body[data-screen="battle"] .intent-note{grid-column:1/-1;grid-row:1;min-height:0;padding:12px 20px;background:#15251fed;border:1px solid #ae955f;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left}body[data-screen="battle"] .intent-note>.eyebrow{max-width:44px;font-size:9px}body[data-screen="battle"] .intent-note>strong{font-size:12px;margin:0;white-space:nowrap}body[data-screen="battle"] .intent-note strong b{display:inline;font-size:26px;margin-left:7px}body[data-screen="battle"] .intent-note p{display:none}body[data-screen="battle"] .intent-note small{font-size:10px;max-width:105px}body[data-screen="battle"] .citizen-sprite{height:180px;width:125px}body[data-screen="battle"] .enemy-art.generated-enemy{height:180px;width:180px}body[data-screen="battle"] .enemy-health>span{font-size:10px}body[data-screen="battle"] .player-note dl{min-height:39px;align-items:center}body[data-screen="battle"] .hand-toolbar{margin-top:8px}body[data-screen="battle"] .end-turn{padding:12px 17px}body[data-screen="battle"] .hand .card:hover{transform:rotate(0)}}
@media(min-width:801px) and (max-height:800px){
 body[data-screen="battle"] .topbar{height:62px;min-height:62px}
 body[data-screen="battle"] .game-layout.in-battle{padding-top:8px;padding-bottom:8px}
 body[data-screen="battle"] .battle-heading{min-height:55px}
 body[data-screen="battle"] .battle-heading h1{font-size:26px}
 body[data-screen="battle"] .battle-table{min-height:215px;padding-bottom:5px}
 body[data-screen="battle"] .citizen-sprite{height:155px;width:120px}
 body[data-screen="battle"] .enemy-art.generated-enemy{height:165px;width:200px}
 body[data-screen="battle"] .intent-note{min-height:182px;padding:29px 22px 20px}
 body[data-screen="battle"] .intent-note strong b{font-size:34px}
 body[data-screen="battle"] .journey{top:68px;gap:6px}
 body[data-screen="battle"] .journey .action-receipt{max-height:220px;padding:10px 12px}
 body[data-screen="battle"] .action-receipt>strong{font-size:13px;margin:4px 0 8px}
 body[data-screen="battle"] .receipt-row{margin:5px 0}
 body[data-screen="battle"] .receipt-row.main b{font-size:28px}
 body[data-screen="battle"] .receipt-note{margin-top:5px;font-size:10px}
 body[data-screen="battle"] .journey-detail{padding:5px 8px}
 body[data-screen="battle"] .hand-toolbar{margin-top:8px;padding:7px 16px;min-height:54px}
 body[data-screen="battle"] .time-resource>b{width:37px;height:37px;font-size:26px}
 body[data-screen="battle"] .hand{min-height:240px;padding-top:16px;padding-bottom:9px}
 body[data-screen="battle"] .hand .card{min-height:215px;padding:9px}
 body[data-screen="battle"] .hand .card-art{height:65px;flex-basis:65px;margin:5px 0}
 body[data-screen="battle"] .hand .card-name{font-size:14px}
 body[data-screen="battle"] .hand .card-text{font-size:11px}
 body[data-screen="battle"] .battle-footer{padding:5px 12px}
}
/* Intent belongs to its enemy, on every screen size. */
body[data-screen="battle"] .battle-table{grid-template-columns:1fr 1.25fr;align-items:end;padding-top:5px}
body[data-screen="battle"] .enemy-object>.intent-note{position:relative;align-self:center;display:block;grid-column:auto;grid-row:auto;width:240px;max-width:100%;min-height:0;margin:0 0 10px;padding:10px 14px;text-align:center;background:linear-gradient(#26372a,#14231a);border:1px solid #bda370;box-shadow:inset 0 0 0 2px #0d1a13,0 4px 10px #0008;transform:none}
body[data-screen="battle"] .enemy-object>.intent-note:after{content:"";position:absolute;bottom:-6px;left:calc(50% - 5px);width:10px;height:10px;transform:rotate(45deg);background:#14231a;border-right:1px solid #bda370;border-bottom:1px solid #bda370}
body[data-screen="battle"] .enemy-object>.intent-note>.eyebrow{display:block;max-width:none;font-size:9px;margin:0 0 3px}
body[data-screen="battle"] .enemy-object>.intent-note>strong{display:block;font-size:14px;margin:0;white-space:normal}
body[data-screen="battle"] .enemy-object>.intent-note strong b{display:inline;font:700 28px/1.1 var(--serif);margin-left:7px}
body[data-screen="battle"] .enemy-object>.intent-note small{max-width:none;font-size:10px;line-height:1.5;margin-top:4px}
body[data-screen="battle"] .enemy-object>.intent-note p,body[data-screen="battle"] .enemy-object>.intent-note .intent-foot{display:none}
@media(min-width:801px) and (max-height:800px){body[data-screen="battle"] .enemy-art.generated-enemy{height:125px}body[data-screen="battle"] .enemy-object>.intent-note{padding:6px 12px;margin-bottom:7px}body[data-screen="battle"] .enemy-object>.intent-note strong b{font-size:24px}body[data-screen="battle"] .battle-table{min-height:245px}}
@media(max-width:800px){body[data-screen="battle"] .battle-table{grid-template-columns:1fr 1fr;gap:12px}body[data-screen="battle"] .enemy-object>.intent-note{width:210px;padding:9px 10px}body[data-screen="battle"] .enemy-art.generated-enemy{max-width:100%}body[data-screen="battle"] .enemy-object{min-width:0}}
@media(min-width:801px) and (min-height:801px) and (max-height:1000px){body[data-screen="battle"] .enemy-art.generated-enemy{height:170px}body[data-screen="battle"] .citizen-sprite{height:190px}}
/* Combat is a shared stage: no journal/sidebar or permanent narration. */
body[data-world="true"] .game-layout{display:block;max-width:1180px;margin:auto}
body[data-world="true"] .topbar{justify-content:space-between}
body[data-world="true"] .life-stats{flex:0 1 auto;justify-content:flex-start}
body[data-screen="battle"] .battle-table{margin-left:0;grid-template-columns:1fr 1fr;max-width:920px;margin-right:auto;margin-left:auto}
body[data-screen="battle"] .battle-heading{padding-left:100px;padding-right:100px}
body[data-screen="battle"] .time-resource{min-width:46px}
body[data-world="true"] .map-scene{max-width:980px;margin:auto}
body[data-world="true"] .branch-intro{font-size:15px;line-height:1.95;max-width:780px;border-left:2px solid #b69a62;padding-left:20px;margin:22px 0 30px}
body[data-world="true"] .branch-story{display:block;font-size:13px;line-height:1.85;color:#e0d2b5;margin:16px 0;max-width:42em}
body[data-world="true"] .path-options{margin-top:22px}
body[data-world="true"] .path-portrait.place-art{object-fit:cover;height:155px;border:1px solid #b39c6255;border-radius:3px;filter:none}
body[data-world="true"] .choice-art{width:115px;height:86px;object-fit:cover;border:1px solid #9c8658;flex-shrink:0;border-radius:3px}
body[data-world="true"] .choice-list button{gap:20px}
body[data-world="true"] .choice-list button>span{flex:1}
body[data-world="true"] .camp-choice-art{width:100%;height:125px;object-fit:cover;margin:0 0 18px;border:1px solid #9c8658}
body[data-world="true"] #toast{z-index:100;background:#12251af5;color:#f0dfba;border:1px solid #b79a60;max-width:min(800px,calc(100vw - 28px));font-size:12px;box-shadow:0 4px 20px #0009;bottom:12px;padding:10px 16px;pointer-events:none;max-height:130px;overflow:auto}
body[data-action-busy="true"] .hand .card{cursor:wait;pointer-events:none}
body[data-action-busy="true"] .end-turn{cursor:wait;filter:saturate(.5)}
body[data-action-busy="true"] .hand .card:hover{transform:rotate(var(--tilt));box-shadow:inset 0 0 0 2px #f8edcf,0 7px 16px #0009}
body[data-screen="battle"] .enemy-art,body[data-screen="battle"] .player-note{position:relative;overflow:visible}
.impact-number{position:absolute;top:28%;left:50%;transform:translate(-50%,-50%);z-index:15;pointer-events:none;white-space:nowrap;font:700 30px/1.2 var(--serif);color:#ffdfb3;text-shadow:0 2px 2px #000,2px 0 2px #491b15,-2px 0 2px #491b15;animation:damage-float 600ms ease-out forwards}
.impact-number.guard,.impact-number.heal,.impact-number.effect{color:#d1f0c2;font-size:22px}
.impact-number.fatigue{color:#ddd2e9;font-size:22px}
body[data-screen="battle"] .enemy-hit{animation:enemy-impact 190ms ease-out!important}
body[data-screen="battle"] .player-hit{animation:player-impact 190ms ease-out!important}
body[data-screen="battle"] .guard-flash{animation:guard-impact 190ms ease-out!important}
body[data-screen="battle"] .strike-right{animation:strike-right 280ms ease-in-out!important}
body[data-screen="battle"] .strike-left{animation:strike-left 280ms ease-in-out!important}
body[data-screen="battle"] .defeated{animation:defeat-out 190ms ease-in forwards!important}
body[data-screen="battle"] .hand .card.card-committed{animation:commit-card 140ms ease-in forwards!important}
@keyframes commit-card{to{translate:0 -18px;opacity:.3}}
@keyframes strike-right{40%{translate:14px -2px}100%{translate:0}}
@keyframes strike-left{40%{translate:-14px -2px}100%{translate:0}}
@keyframes enemy-impact{0%{translate:0}25%{translate:10px -2px;filter:brightness(1.9) sepia(.45) drop-shadow(0 0 8px #ef9b67)}60%{translate:-4px 0}100%{translate:0}}
@keyframes player-impact{0%{translate:0}25%{translate:-10px -2px;filter:brightness(1.8) sepia(.5) drop-shadow(0 0 8px #db6554)}60%{translate:4px 0}100%{translate:0}}
@keyframes guard-impact{45%{filter:brightness(1.5) drop-shadow(0 0 10px #a9d2a1)}}
@keyframes damage-float{0%{opacity:0;translate:0 8px;scale:.8}20%{opacity:1;scale:1.15}70%{opacity:1}100%{opacity:0;translate:0 -40px;scale:1}}
@keyframes defeat-out{to{opacity:0;translate:0 10px;filter:grayscale(1)}}
@media(max-width:800px){body[data-screen="battle"] .battle-table{margin:0;gap:16px}body[data-screen="battle"] .battle-heading{padding:0 65px 0 0}body[data-world="true"] .branch-intro{font-size:13px;padding-left:13px}body[data-world="true"] .branch-story{font-size:12px}body[data-world="true"] .choice-art{width:80px;height:75px}body[data-world="true"] .choice-list button{gap:13px}body[data-world="true"] .camp-choice-art{width:70px;height:85px;grid-row:1/4;margin:0}body[data-world="true"] .camp-options button{grid-template-columns:70px 1fr}}
@media(prefers-reduced-motion:reduce){.impact-number,.enemy-hit,.player-hit,.guard-flash,.strike-right,.strike-left,.defeated,.card-committed{animation:none!important}}
.item-bar{display:flex;gap:7px;max-width:1200px;margin:0 auto;padding:5px 20px;position:relative;z-index:12}
.item-token{position:relative;width:52px;height:52px;padding:2px;border:1px solid #897345;background:#29271fc9;border-radius:50%;cursor:pointer;box-shadow:inset 0 0 8px #0008}
.item-token img{width:46px;height:46px;object-fit:contain;transition:transform .14s ease}
.item-token:hover img,.item-token:focus-visible img{transform:translateY(-3px)}
.item-token:focus-visible{outline:2px solid #e3c782;outline-offset:3px}
.item-tooltip{display:none;position:absolute;left:0;top:58px;width:min(290px,calc(100vw - 40px));padding:16px;text-align:left;background:#25251f;border:1px solid #b2965f;box-shadow:0 8px 24px #0009;color:#f1e3c7;z-index:100;cursor:default}
.item-token:hover .item-tooltip,.item-token:focus-visible .item-tooltip,.item-token[aria-expanded="true"] .item-tooltip{display:block}
.item-tooltip strong,.item-catalogue strong{display:block;font-size:17px;color:#f0d49a}
.item-effect{display:block;font-size:14px;line-height:1.65;margin:8px 0;color:#f0eadc}
.item-tooltip em,.item-catalogue em,.item-story{display:block;font-size:12px;line-height:1.6;color:#c0b097;font-style:normal}
.item-catalogue{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.item-catalogue article{display:flex;gap:12px;padding:16px;background:#25251f;border:1px solid #796745}
.item-catalogue img{width:80px;height:80px;object-fit:contain;flex-shrink:0}
.item-catalogue small{display:block;margin-top:9px;color:#b3b39d;font-size:11px}
.possessions{display:flex;align-items:center;max-width:1200px;margin:auto;gap:12px}.possessions .item-bar{margin:0;flex-shrink:0}
.status-icons,.life-icons{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}.life-icons{justify-content:flex-start}
.status-icon{position:relative;display:flex;align-items:center;justify-content:center;width:40px;height:36px;border:1px solid #73826a;background:#23352c;border-radius:6px;padding:4px;cursor:help;color:#fff}
.status-icon img{width:24px;height:24px}.status-icon b{position:absolute;bottom:-4px;right:-3px;background:#1a211b;border:1px solid #aeb18c;border-radius:6px;min-width:16px;font-size:12px;text-align:center;padding:0 2px}.status-icon.negative{background:#522d2d;border-color:#d17a65}
.status-icon:focus-visible{outline:2px solid #ffe3a0;outline-offset:3px}.status-arrive{animation:status-pop .25s ease-out}
.status-tooltip{display:none;position:absolute;z-index:120;top:40px;left:0;width:230px;padding:12px;text-align:left;white-space:normal;background:#222a22;color:#eee3cd;border:1px solid #b49b6b;font-size:12px;line-height:1.6;box-shadow:0 6px 18px #0009}.status-tooltip strong{display:block;color:#f2d28b;margin-bottom:5px}.status-icon:hover .status-tooltip,.status-icon:focus-visible .status-tooltip{display:block}.status-icon:hover,.status-icon:focus-visible{z-index:125}
.life-management button img{vertical-align:middle}
@media(max-width:600px){.status-tooltip{position:fixed;top:140px;left:12px;width:calc(100vw - 24px);max-width:300px}}
@keyframes status-pop{from{transform:scale(.78);filter:brightness(2)}to{transform:scale(1);filter:brightness(1)}}
.impact-number img{width:26px;height:26px;vertical-align:middle;margin-right:4px}
.enemy-line{display:flex;justify-content:center;align-items:flex-end;gap:12px;min-width:0;width:100%}.enemy-line>.enemy-object{flex:1;min-width:0;max-width:360px}
.enemy-select{padding:0;background:none;border:0;color:#e5d8bc;width:100%;cursor:crosshair}.enemy-select>span{display:block;font-size:12px}.enemy-select:focus-visible{outline:2px solid #e9c878}.selected-target .enemy-select{filter:drop-shadow(0 0 5px #e7bf60)}
.selected-target .enemy-select>span:before{content:'대상 · ';color:#f8d78a}.resolved{opacity:.25;filter:grayscale(1)}
body[data-world="true"] .multi-table{grid-template-columns:30% 1fr;gap:12px}body[data-world="true"] .group-enemy .enemy-art{height:210px;width:100%;min-height:0}body[data-world="true"] .group-enemy .enemy-art img{width:100%;height:100%;object-fit:contain}
body[data-world="true"] .enemy-line .intent-note{position:relative;left:auto;top:auto;transform:none;width:auto;min-width:0;max-width:100%;margin:0 0 6px;padding:8px 12px}.enemy-line .intent-note strong{font-size:17px}.enemy-line .intent-note small{display:block;font-size:11px}
.character-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.character-list button{display:grid;grid-template-columns:80px 1fr;text-align:left;gap:8px;padding:14px;background:#272820;border:1px solid #8c7650;color:#f0dfba}.character-list img{grid-row:1/4;object-fit:contain}.character-list span{font-size:13px}.character-list small{font-size:11px;color:#c6ae7b}.character-list button:disabled{opacity:.45}
.life-management{margin-top:18px;padding:16px;border:1px solid #8c7650}.life-management summary{cursor:pointer;color:#e8d29d}.life-management button{padding:12px;margin:6px;background:#30392d;color:#f1e8d5;border:1px solid #84936e}.life-management p{font-size:13px}
@media(max-width:600px){.possessions{gap:4px;flex-wrap:wrap}.life-icons{padding:0 12px 6px}.status-icon{width:32px;height:30px}.status-icon img{width:20px;height:20px}.character-list{grid-template-columns:1fr}.enemy-line{gap:5px}body[data-world="true"] .group-enemy .enemy-art{height:135px}body[data-world="true"] .battle-table.multi-table{grid-template-columns:24% 1fr;gap:4px}.enemy-select>span{font-size:10px}.enemy-line .intent-note strong{font-size:13px}.enemy-line .intent-note small{font-size:9px}body[data-world="true"] .enemy-line .intent-note{padding:5px}.enemy-health{font-size:11px}}
@media(prefers-reduced-motion:reduce){.status-arrive{animation:none}.item-token img{transition:none}}
body[data-world="true"] .choice-art.relic-icon{width:100px;height:100px;object-fit:contain;background:none}
@media(max-width:600px){.item-bar{padding:4px 12px;gap:5px}.item-token{width:44px;height:44px}.item-token img{width:38px;height:38px}.item-tooltip{position:fixed;top:122px;left:14px;width:calc(100vw - 28px);max-width:330px}.item-catalogue{grid-template-columns:1fr}.item-catalogue article{padding:12px}.item-catalogue img{width:64px;height:64px}}

/* Crisis rules: one-line rule before and during a fight, rule actions, boxed cards */
body[data-screen="battle"] .crisis-line{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:8px;margin:4px auto 0;padding:5px 14px;max-width:640px;font-size:12px;line-height:1.45;color:#efe1c5;background:#15251fcc;border:1px solid #ae955f88;border-radius:999px}
body[data-screen="battle"] .crisis-line img{flex:none;filter:drop-shadow(0 0 2px #000)}
body[data-screen="battle"] .crisis-action{display:inline-flex;align-items:center;gap:6px;padding:9px 14px;font:700 12px var(--serif);color:#f1dfb8;background:linear-gradient(#3b5a46,#1e3328);border:1px solid #bda370;border-radius:6px;box-shadow:inset 0 0 0 2px #0d1a13,0 3px 8px #0007;cursor:pointer}
body[data-screen="battle"] .crisis-action:disabled{opacity:.45;cursor:not-allowed}
body[data-world="true"] .card.boxed{filter:saturate(.3) brightness(.8)}
body[data-world="true"] .card.boxed .card-boxed{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%) rotate(-8deg);padding:4px 12px;font:700 15px var(--serif);color:#2a1d12;background:#d8b27a;border:2px dashed #6b4a2a;box-shadow:0 3px 8px #0008;z-index:3;white-space:nowrap}
body[data-world="true"] .branch-rule{display:flex;align-items:center;gap:6px;margin-top:6px;font-size:12px;color:#e9d4a4}
.chapter-rule{display:flex;align-items:center;gap:8px;margin:10px 0 0;padding:8px 12px;font-size:13px;line-height:1.45;color:#efe1c5;background:#15251f;border:1px solid #ae955f66;border-radius:8px}
