/* Final text scale and illustrated battle chrome, after responsive scene rules. */
button:not(.soul-card):not(.reference-hit):not(.board-hit){min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;line-height:1.35}
button:is(.btn,.seal-action,.text-link,.quiet-control){padding:9px 17px;min-height:36px}
button:is(.icon-btn,.tab){flex-shrink:0;overflow-wrap:normal}
button.ref-floor{overflow-wrap:normal}
/* Keep both the return arrow and label inside the painted plate's safe area. */
.scene-topbar button.brand{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:110px;min-height:34px;padding:6px 18px;gap:6px;font-size:14px;line-height:1;white-space:nowrap;overflow-wrap:normal}
.scene-topbar button.brand>span:last-child{display:block;white-space:nowrap;line-height:1.2}
.scene-topbar button.brand .return-arrow{display:block;flex:0 0 12px;font-size:24px;line-height:20px;text-align:center}
@media(max-height:550px) and (orientation:landscape){.scene-topbar button.brand{min-width:100px;min-height:32px;padding:5px 16px;font-size:12px;gap:5px}.scene-topbar button.brand .return-arrow{font-size:22px}}
.modal{width:min(840px,94vw);padding:20px;overflow-x:hidden}
.modal p,.modal li{font-size:13px;line-height:1.75;word-break:keep-all;overflow-wrap:anywhere}
.modal-header h2{min-width:0;font-size:20px;line-height:1.35;word-break:keep-all}
.modal-header .icon-btn{width:34px;height:34px;flex-shrink:0}
.modal-actions{flex-wrap:wrap;gap:9px}
.modal-actions>button{flex:1 1 140px}
.framed-card-preview{align-items:center;gap:24px;min-width:0}
.framed-card-preview>.soul-card{width:min(43dvh,260px);flex:0 0 auto;max-height:70dvh}
.framed-card-preview>.card-lore{width:100%;max-width:420px;min-width:0;max-height:65dvh;overflow-y:auto;padding-right:10px;scrollbar-width:thin;scrollbar-color:#b5a17d66 transparent}
.card-lore p{margin:5px 0 16px}
.card-lore h3{font:700 15px 'Noto Serif KR',serif;color:#e9ce92;margin:14px 0 4px}
.card-lore .lore-origin{color:#d5bf8d;font-size:14px;margin-top:0}
.lore-origin small{display:block;font-size:11px;color:#abc0c8;margin-top:5px}
.card-lore dl{font-size:12px;line-height:1.6}
.card-lore dt{color:#d8caa9;margin-top:9px}.card-lore dd{margin:3px 0;color:#b4c3c8}
.lore-source{font-size:11px;color:#99cedf;display:block;margin:15px 0}
.archive-notes p,.written-skill p,.written-ultimate p{font-size:12px;line-height:1.7}
.book-tabs .text-link,.archive-footnotes .text-link,.card-context-actions .text-link{font-size:12px}
.scene-heading{gap:14px}.scene-heading h1{line-height:1.2;font-size:30px}.scene-heading .book-tabs{flex-wrap:wrap}
.reference-storage-copy{position:absolute;left:53%;top:11%;width:44%;height:80%;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;background:url('./assets/panteon-logo.webp?v=20261028-panteon153-v17') left top/100% 1400% no-repeat;color:#f0ede0;font:700 1.65cqw/1.05 'Noto Serif KR',serif;text-align:left;padding-left:3%;text-shadow:0 1px 3px #000}
.reference-storage-copy b{font-weight:700;font-size:2.05cqw;line-height:1.35}.reference-storage-copy small{font:500 .83cqw/1.5 'Noto Sans KR',sans-serif;color:#b4d9ed;margin-top:3%}
.world-battle .battle-top{gap:9px;padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right));background:none}
.world-battle .battle-title,.world-battle .wave-label{font-size:12px;text-shadow:0 1px 4px #000}
.world-battle .battle-top .icon-btn,.world-battle .battle-top .tab{width:32px;height:32px;min-height:32px;font-size:15px;padding:0}
.world-battle .core-bar,.world-battle .core-bar i{border:0;border-radius:0;background:url('./assets/battle-ornaments-v1.webp?v=20261028-panteon153-v17') 35.06% 75.62%/398.65% 739.17% no-repeat;box-shadow:none}
.world-battle .core-bar{height:24px;max-width:155px}.world-battle .core-bar i{filter:saturate(2) brightness(1.8)}.world-battle .core-danger i{filter:sepia(1) saturate(5)}
.world-battle .core-bar span{font-size:11px;line-height:24px;text-shadow:0 1px 2px #000}
.world-battle #battle-unit{top:61%;left:1.5%;width:150px;max-height:115px;padding:12px 14px;background:url('./assets/battle-ornaments-v1.webp?v=20261028-panteon153-v17') .61% 83.2%/389.89% 354.8% no-repeat;font-size:11px;line-height:1.5}
.world-battle .unit-actions{gap:3px}.world-battle .unit-actions .text-link{padding:6px 10px;font-size:11px;min-height:32px}
.world-battle .battle-count:not(.secondary-count){right:1.5%;bottom:26%;width:130px}
.world-battle .battle-count strong{font-size:30px;line-height:1.1}.world-battle .battle-count span{font-size:12px}#mana-earning{font-size:10px;min-height:26px;margin-top:4px;line-height:1.3}
.world-battle .start-defense{right:1.5%;bottom:38%;width:130px;font-size:15px;padding:10px 16px;min-height:46px}
.world-battle .global-btn{right:1.5%;top:29%;width:130px;height:105px;padding:12px 14px;justify-content:flex-end}
.world-battle .global-btn .ultimate-name{font-size:12px;line-height:1.25;width:100%;max-width:100%;word-break:keep-all}
.world-battle .global-btn small{font-size:10px;line-height:1.4;white-space:normal;margin-top:4px}
.world-battle .spell-sigil,.world-battle .global-btn.ready .spell-sigil{position:absolute;left:36%;top:4%;width:28%;height:32%;font-size:21px;line-height:1.2;background:url('./assets/battle-ornaments-v1.webp?v=20261028-panteon153-v17') .6% 14.08%/398.65% 227.44% no-repeat;border:0;border-radius:0;box-shadow:none}
.world-battle .battle-guide{bottom:29%;left:24%;right:24%;font-size:11px;line-height:1.4}
.world-battle .draft-inline{bottom:3px;left:50%;width:68%;max-width:600px;height:124px}
.world-battle .battle-deck-mini{height:109px;padding:6px 0 0;gap:3px;overflow:visible}
.world-battle .battle-deck-mini .soul-card{width:64px;flex:0 0 64px;margin-left:0;transform:rotate(-2deg)}
.world-battle .battle-deck-label{font-size:11px}.world-battle .battle-deck-label span{font-size:10px}
.world-battle .potion b{background:none;font-size:12px;text-shadow:0 1px 3px #000}
.world-battle .potion small,.satchel-toggle>span:last-child{font-size:11px}
@media(max-height:450px) and (orientation:landscape){.modal{padding:14px 20px;max-height:94dvh}.modal-header{margin-bottom:9px}.modal-header h2{font-size:18px}.modal p,.modal li{font-size:12px}.framed-card-preview>.card-lore{max-height:67dvh}.scene-heading h1{font-size:26px}.archive-stage{top:103px;bottom:125px}.archive-shelf{height:116px}.world-battle .battle-guide{bottom:32%;left:25%;right:25%;font-size:10px}.world-battle .draft-inline{height:115px;bottom:2px}.world-battle .battle-deck-mini{height:100px}.world-battle .battle-deck-mini .soul-card{width:clamp(43px,7.25vw,61px);flex-basis:clamp(43px,7.25vw,61px)}.world-battle .battle-count:not(.secondary-count){bottom:14%}.world-battle #battle-unit{top:61%;width:142px;font-size:10px}.world-battle .global-btn{top:30%;height:104px}.world-battle .start-defense{bottom:42%}}
@media(orientation:portrait){.framed-card-preview{flex-direction:column;gap:15px}.framed-card-preview>.soul-card{width:min(40vw,210px);flex-basis:auto}.framed-card-preview>.card-lore{max-width:100%;max-height:36dvh}.world-battle .draft-inline{width:78%;left:50%}.world-battle .battle-deck-mini{gap:0}.world-battle .battle-deck-mini .soul-card{width:45px;flex-basis:45px;margin-left:-8px}.world-battle .battle-title{font-size:10px}.world-battle .battle-guide{font-size:10px}.world-battle .global-btn{width:100px;right:0}.world-battle .battle-count:not(.secondary-count){width:100px;right:0}.world-battle #battle-unit{width:113px;font-size:10px}.world-battle .start-defense{width:105px}.scene-heading h1{font-size:22px}}
.world-battle .core-bar span{inset:0;width:100%;display:grid;place-items:center}
.world-battle .unit-actions .text-link{flex:1;white-space:nowrap;padding:5px 6px;font-size:10px}
.world-battle #battle-unit{width:155px}
@media(orientation:portrait){.world-battle #battle-unit{width:120px}.world-battle .unit-actions{flex-wrap:wrap}.world-battle .unit-actions .text-link{flex-basis:100%}}

.world-battle .core-bar{width:min(15vw,155px);flex:0 0 min(15vw,155px);margin-left:0}.world-battle .battle-top{gap:6px}.world-battle .battle-title{max-width:19vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.world-battle .wave-label{white-space:nowrap}
@media(max-width:700px) and (orientation:landscape){.world-battle .battle-title,.world-battle .wave-label{font-size:10px}.world-battle .battle-top{gap:5px}.world-battle .battle-count:not(.secondary-count){width:108px}.world-battle .global-btn{width:110px}.world-battle .battle-guide{font-size:10px;left:24%;right:23%}.world-battle #battle-unit{width:137px}.world-battle .battle-deck-label span{font-size:9px}}
