:root{color-scheme:dark;--text:#f5f1e6;--muted:#b4b2aa;--gold:#f0d477;--green:#a7db64;--edge:#666460;--tier:#dfddd4;--black:#171716;--panel:#353533}
*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:#242422;color:var(--text);font:14px/1.45 'Arial','Microsoft YaHei',sans-serif}button,select,input{font:inherit;color:inherit}button{min-height:40px;padding:8px 14px;border:3px solid var(--black);border-radius:3px;background:#4c4b47;box-shadow:0 2px 0 #151514;cursor:pointer;font-weight:700}button:hover:not(:disabled){background:#65635c;border-color:#e6dfc8}button:active:not(:disabled){transform:translateY(1px);box-shadow:none}button:focus-visible,summary:focus-visible{outline:3px solid #f2dc80;outline-offset:2px}button:disabled{opacity:.38;cursor:default}button.primary{background:#a6ce61;color:#202519;border-color:#1d2417;font-size:17px}button.primary:hover{background:#c2e58a}i{font-style:normal;color:#83827a}h1,h2,h3,h4,p{margin-top:0}h2{font-size:30px;line-height:1.1;margin-bottom:14px}h3{font-size:17px}small{font-size:11px}progress{appearance:none;border:2px solid #1d1c19;background:#3e352d;overflow:hidden}progress::-webkit-progress-bar{background:#3e352d}progress::-webkit-progress-value{background:#ca3c33}progress::-moz-progress-bar{background:#ca3c33}
.main{width:min(1320px,calc(100% - 32px));margin:auto;padding:12px 0}.header,.brand,.tools{display:flex;align-items:center;gap:10px}.header{justify-content:space-between;margin-bottom:10px}.brand img{width:34px;height:34px}.brand h1{font-size:20px;letter-spacing:1px;margin:0}.brand p{font-size:9px;color:var(--muted);margin:0}.brand p span{margin-left:6px}.tools button{min-height:30px;font-size:11px;padding:3px 10px;border-width:2px}.build{font-size:10px;color:var(--muted)}.arena-wrap{position:relative;border:3px solid var(--black);background:#969180;overflow:hidden}.canvas-holder{position:relative}canvas{display:block;width:100%;height:auto;aspect-ratio:16/9;touch-action:none}.hud{position:absolute;inset:14px 16px auto;z-index:2;pointer-events:none;height:100px;font-weight:900;text-shadow:2px 2px #24221f}.metric{display:none}.hud > .metric:first-child{display:block;position:absolute;left:50%;top:2px;transform:translateX(-50%);text-align:center}.hud > .metric:first-child .label{display:none}.hud > .metric:first-child strong{font-size:22px}.metric.timer{display:block;position:absolute;left:50%;top:30px;transform:translateX(-50%);text-align:center}.timer .label{display:none}.timer strong{font-size:32px}.timer.urgent strong{color:#fb6551}.metric.health{display:block;position:absolute;left:0;top:0;width:25%;max-width:300px}.health .label{display:none}.health strong{position:absolute;top:3px;left:0;right:0;text-align:center;font-size:18px}.health progress{width:100%;height:34px;display:block;border:3px solid #171716;border-radius:1px}.metric.experience{display:block;position:absolute;top:38px;left:0;width:25%;max-width:300px}.experience progress{position:absolute;top:0;left:0;width:100%;height:21px}.experience progress::-webkit-progress-value{background:#91bce2}.experience progress::-moz-progress-bar{background:#91bce2}.experience .label{position:relative;z-index:1;display:block;text-align:center;font-size:12px;line-height:21px}.experience strong{display:none}.metric.paper{display:flex;align-items:center;gap:10px;position:absolute;left:0;top:64px;color:var(--green)}.paper .label{font-size:11px}.paper strong{font-size:25px}.paper strong::before{content:'▤ ';font-size:22px}.character-hud{position:absolute;right:14px;top:15px;z-index:2;display:flex;align-items:center;gap:6px;font-size:11px;text-shadow:1px 1px #111}.character-hud img{width:32px;height:32px;object-fit:contain}.character-hud #characterName,.character-hud #skillBadge,.character-hud #specialItems,#hudWeapons{display:none}.test-badge{display:inline-block;color:#efcf6b;background:#33322c;border:2px solid #171716;padding:2px 5px;font-size:9px;font-weight:800;letter-spacing:1px}.boss-hud{position:absolute;left:30%;right:30%;bottom:50px;z-index:2;display:flex;gap:15px}.boss-hud label{display:grid;flex:1;font-size:10px;color:#f7e4d3}.boss-hud progress{width:100%;height:12px}.arena-foot{background:#30302d;display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:36px;padding:3px 12px;color:var(--muted);font-size:10px}.quiet{background:none;box-shadow:none;border:0;font-size:11px;min-height:28px;padding:2px 4px}.touch-tip,.controller{display:none}.controller{position:relative;flex:0 0 auto;width:70px;height:70px;border:3px solid #d4cdb299;border-radius:50%;background:#36352d;place-items:center;touch-action:none;user-select:none}.thumb{width:29px;height:29px;border:2px solid #181816;border-radius:50%;background:#c1bdab;pointer-events:none}.banner{position:absolute;z-index:3;top:23%;left:50%;transform:translateX(-50%);background:#34332f;border:3px solid #171716;padding:10px 25px;font-size:24px;font-weight:900;white-space:nowrap;pointer-events:none}
.modal-layer{position:absolute;z-index:4;inset:0;display:grid;place-items:center;padding:18px;background:#242421c9}.modal{width:min(520px,100%);max-height:100%;overflow:auto;background:var(--panel);border:4px solid #171716;border-radius:3px;padding:24px;box-shadow:0 5px 0 #151514}.modal p{color:var(--muted);font-size:13px;margin-bottom:12px}.modal>button{width:100%}.eyebrow{color:#b9b6aa;font-size:10px;font-weight:800;letter-spacing:1.5px;margin-bottom:5px}.modal-layer:has(.with-stats){position:fixed;z-index:10;background:#262624fa}.modal-layer .modal.with-stats{width:min(1240px,100%);max-height:calc(100dvh - 36px);display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:25px;padding:24px;background:#343432;box-shadow:none}.modal-main{min-width:0}.modal-main>.test-badge{float:right;margin:0 0 5px 8px}.shop-top{display:flex;align-items:center;gap:25px;margin-bottom:20px;clear:both}.shop-top h2{margin:0;font-size:32px;letter-spacing:1px}.shop-wallet{display:flex;align-items:center;flex-wrap:wrap;gap:5px 8px;color:var(--green);margin-right:auto}.shop-wallet>span{font-size:32px}.shop-wallet>b{font-size:32px;line-height:1}.shop-wallet small{flex-basis:100%;font-size:9px;letter-spacing:1px;padding-left:2px}.reroll{min-width:135px;display:grid;gap:3px}.reroll b{font-size:15px}.reroll span{color:var(--green);font-size:11px}.offer-grid,.upgrade-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.offer,.upgrade,.gear-slot{--tier:#dfddd4;border:3px solid var(--tier);border-radius:2px;background:#43433f}.tier-2{--tier:#73b2ec}.tier-3{--tier:#b98ae9}.tier-4{--tier:#ef6861}.offer{display:flex;flex-direction:column;min-width:0;padding:12px 10px 0;position:relative;min-height:305px}.offer.locked{border-style:double;border-width:4px;padding:11px 9px 0}.offer.empty{border-color:#55544e;background:#2d2d2a;justify-content:center;text-align:center;color:#85847c}.offer-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.offer-icon{height:54px;width:62px;display:grid;place-items:center;font-size:35px;color:var(--green)}.weapon-icon{object-fit:contain;vertical-align:middle;width:32px;height:24px}.offer-icon .weapon-icon{width:62px;height:52px}.tier-tag{color:var(--tier);font-size:11px;font-weight:900;white-space:nowrap}.offer .category{font-size:9px;color:#b7b3a8;letter-spacing:1px}.offer>strong{font-size:18px;color:var(--tier);line-height:1.2;margin:4px 0}.offer>small{font-size:10px;color:#c3beb1}.offer>p{font-size:12px;line-height:1.6;margin:12px 0;flex:1}.offer-preview{font-size:10px;margin:5px 0 9px;color:#d1cdbd}.offer-preview summary{cursor:pointer}.offer-actions{display:grid;gap:5px;margin:8px -10px 0}.offer-actions button{width:100%;border-width:2px;border-color:#1c1c19;border-radius:0;box-shadow:none;min-height:38px}.offer-actions [data-action=buy]{background:#a8cd65;color:#1d2818;font-size:20px;font-weight:900}.offer-actions [data-action=lock]{background:#343430;color:#bdb9aa;min-height:30px;font-size:11px;border-bottom:0}.offer-actions [aria-pressed=true]{color:#f3d67c;background:#504b35}.offer.locked .offer-actions{margin-inline:-9px}.equipment-heading{display:flex;justify-content:space-between;align-items:center;margin-top:24px}.equipment-heading h3{margin:0 0 7px;letter-spacing:1px}.equipment-heading h3 small{font-weight:400;color:#aaa79b}.equipment-heading>span{font-size:10px;color:var(--muted)}.gear-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.gear-slot{min-width:0;position:relative;background:#292926}.gear-slot button{width:100%;height:92px;padding:8px 3px 6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:none;border:0;box-shadow:none}.gear-slot .weapon-icon{width:56px;height:37px;margin-bottom:2px}.gear-slot span{font-size:11px;white-space:nowrap}.gear-slot b{position:absolute;right:4px;top:2px;font-size:10px;color:var(--tier)}.gear-slot.empty{border-color:#53524b;color:#77766e;display:flex;flex-direction:column;align-items:center;justify-content:center}.gear-slot.empty>span{font-size:26px}.gear-slot.empty small{font-size:8px;letter-spacing:1px}.shop-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:22px}.shop-bottom span{font-size:11px;color:var(--muted)}.shop-bottom .primary{min-width:190px;min-height:48px}.action-row,.weapon-actions{display:flex;gap:10px;flex-wrap:wrap;margin:15px 0}.weapon-actions{border-top:2px solid #5b5950;padding-top:10px;margin-bottom:0}.weapon-actions button{flex:1}.weapon-actions button:last-child{color:#e8ce83}
.stats-panel{background:#2b2b28;border:2px solid #1c1c19;padding:14px 13px;min-width:0;align-self:start;position:sticky;top:0;max-height:calc(100dvh - 88px);overflow:auto}.stats-disclosure{display:contents}.stats-summary{display:none}.stats-content h3{display:flex;align-items:center;justify-content:space-between;margin:0 0 8px;font-size:15px;letter-spacing:.5px}.stats-content h4{font-size:9px;color:#aaa79c;margin:10px 0 3px;letter-spacing:1px}.stats-content section{border-top:1px solid #4b4a43;padding-top:1px}.stat-row{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:26px;font-size:12px}.stat-row>span{display:flex;align-items:center;gap:5px}.stat-row strong{color:#f0ead7;white-space:nowrap;font-size:12px}.stat-active-effects{margin:-1px 0 5px 21px;color:#a7db64;font-size:10px;line-height:1.3}.modal .stat-help-button,.modal .info-lang{min-width:19px;min-height:19px;padding:0 3px;font-size:10px;border-width:1px;box-shadow:none;background:#3e3d37;color:#a6a293}.modal .stat-help-button{border-radius:50%}.stat-help{background:#1f1f1c;border:1px solid #88806c;padding:8px;margin:4px 0}.stats-content .stat-help p{font-size:11px;margin:0}.stat-help details{font-size:10px;color:#c5c0aa;margin-top:6px}.run-readouts,.loadout-readouts{border-top:1px solid #4b4a43;margin-top:10px;padding-top:8px;font-size:10px;color:#bab6a8}.run-readouts summary,.loadout-readouts summary{cursor:pointer;font-weight:bold}.loadout-readouts ol{padding-left:18px;font-size:10px}.loadout-readouts p{font-size:10px}.stat-preview{display:grid;gap:3px;font-size:10px;color:#b8d394}.upgrade{padding:15px 12px;display:flex;flex-direction:column;text-align:left;gap:12px;min-height:270px;box-shadow:0 3px 0 #171716}.upgrade>strong{font-size:18px;color:var(--tier)}.upgrade>strong>span{display:block;font-size:34px;margin:8px 0}.upgrade>b{font-size:29px;color:var(--green)}.upgrade-values{display:grid;gap:5px;font-weight:400;font-size:11px}.upgrade-values>span{display:flex;justify-content:space-between}.upgrade>.stat-preview{font-weight:400;border-top:1px solid #646156;padding-top:8px;max-height:100px;overflow:auto}.summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.summary>div{padding:10px;background:#282825;border:2px solid #171716}.summary b,.summary span{display:block}.summary b{color:#e6d591}.summary span{font-size:10px;color:var(--muted)}.gear-line{overflow-wrap:anywhere}
.weapon-info-toggle{font-size:10px;padding:3px 5px;min-height:26px;border-width:1px;box-shadow:none}.weapon-detail{position:fixed;z-index:11;width:min(330px,100%);max-height:calc(100dvh - 24px);overflow:auto;padding:13px;border:3px solid #bfb6a0;border-radius:2px;background:#2e2e2a;color:#f4f0e5;box-shadow:0 4px 0 #151514}.weapon-detail.inline{position:static;width:100%!important;max-height:440px;margin-top:10px}.weapon-detail header{display:flex;justify-content:space-between;gap:10px}.weapon-detail header h3{font-size:17px;margin:0}.weapon-detail header small{color:#b5b1a5;font-size:10px}.info-close{min-height:25px;padding:2px 7px;border-width:1px}.weapon-detail-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:12px 0}.weapon-detail-columns>section+section{border-left:1px solid #5c594f;padding-left:15px}.weapon-detail h4,.weapon-detail footer b{font-size:10px;color:#e0cc8c;margin:7px 0}.weapon-detail dl{margin:0}.weapon-detail dl>div{display:flex;justify-content:space-between;align-items:baseline;gap:6px;margin-bottom:5px;font-size:11px}.weapon-detail dt{color:#b8b5a9}.weapon-detail dd{margin:0;text-align:right}.weapon-detail .key-stat{border-bottom:1px solid #5c594f;padding-bottom:5px;font-weight:bold}.weapon-detail .gain{color:#aedb77}.weapon-detail .loss{color:#ed8b78}.weapon-detail footer,.life-steal-heading{border-top:1px solid #5c594f;padding-top:6px}.modal .weapon-detail p{font-size:10px;margin:4px 0}
.sell-dialog{width:min(440px,calc(100% - 28px));padding:25px;text-align:center;background:#363530;color:var(--text);border:4px solid #171716;border-radius:3px}.sell-dialog::backdrop{background:#171715df}.sell-dialog h2{font-size:25px}.sell-weapon{display:flex;align-items:center;justify-content:center;gap:8px}.sell-quote{font-size:25px;color:var(--green);font-weight:900}#sellHint{font-size:11px;color:var(--muted)}.sell-dialog .action-row{justify-content:center}.hold-sale{position:relative;overflow:hidden;border-color:#c7b367;touch-action:none;user-select:none;-webkit-touch-callout:none}.hold-sale::before{content:'';position:absolute;inset:0;background:#7e913b;transform:scaleX(var(--hold-progress,0));transform-origin:left;pointer-events:none}.hold-sale span{position:relative}
.bonus-heading{text-align:center}.cache-chest{display:block;width:100px;height:67px;margin:auto}.cache-lid{transform-origin:50% 48%;transform:rotate(-12deg) translate(-3px,-8px)}[data-mode=bonus-opening] .cache-lid{animation:cache-lid .85s ease-in-out both}.cache-instruction{text-align:center}.bonus-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.bonus-card{border-color:var(--card-color);background:#3b3b37;display:flex;flex-direction:column;align-items:center;padding:16px 10px;gap:12px;animation:cache-card .3s calc(var(--card-order)*.09s) both}.bonus-card.relic{background:#4d2e2a;border-color:#ef6861;box-shadow:inset 0 4px #8b463b}.bonus-card img{width:80px;height:80px;object-fit:contain}.bonus-card strong{color:var(--card-color);font-size:16px}.bonus-card span{font-size:10px;font-weight:400}.bonus-card small{font-size:9px;color:var(--card-color)}.reward-stage{text-align:center}.reward-art{position:relative;width:140px;height:140px;margin:20px auto}.reward-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.reward-in{animation:cache-card .6s .25s both}.reward-out{animation:cache-out .4s both}.cache-reward-icon{display:grid;place-items:center;width:120px;height:120px;margin:20px auto;background:#292925;border:4px solid #b7a66b;font-size:65px;color:var(--gold)}[data-screen=cache-reward] .modal-main{text-align:center}[data-screen=cache-reward] .action-row{justify-content:center}.test-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.test-actions button{font-size:11px}.wave-select{margin-top:15px;padding-top:10px;border-top:2px solid #55534a}.wave-select summary{font-size:12px;font-weight:800;cursor:pointer;color:#e4d69b}.wave-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:10px 0}.wave-grid button{padding:4px;min-height:33px}.wave-grid [aria-pressed=true]{background:#c8d98c;color:#24281a}.test-options{display:flex;flex-wrap:wrap;gap:10px}.test-options label{display:grid;font-size:10px;gap:3px}select,input{background:#292925;border:2px solid #777267;padding:6px;max-width:100%;min-height:35px}.spawn-debug{border:2px solid #151514;background:#30302b;padding:10px;margin-top:10px;font-size:11px}.spawn-debug summary{cursor:pointer;font-weight:bold}.spawn-debug p{color:#b5b0a0}.spawn-debug form{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px}.spawn-debug input{width:110px}.spawn-history{max-height:230px;overflow:auto}.spawn-history table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}.spawn-history th,.spawn-history td{border-bottom:1px solid #55534b;padding:4px 8px}
@keyframes cache-lid{from,35%{transform:none}to{transform:rotate(-12deg) translate(-3px,-8px)}}@keyframes cache-card{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}@keyframes cache-out{to{opacity:0;transform:scale(.8)}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;scroll-behavior:auto!important}.reward-out{display:none}}
@media(max-width:1100px){.modal-layer .modal.with-stats{grid-template-columns:minmax(0,1fr) 230px;gap:16px;padding:16px}.offer-grid,.upgrade-grid{gap:8px}.offer{padding:9px 7px 0}.offer>strong{font-size:16px}.offer-actions{margin-inline:-7px}.offer>p{font-size:11px}.shop-top{gap:15px}.stat-row{font-size:11px}}
@media(max-width:800px){.main{width:calc(100% - 12px);padding-top:6px}.brand p span,.build{display:none}.tools{gap:5px}.header{gap:5px}.tools button{padding-inline:6px}.modal-layer{position:fixed;z-index:10;padding:8px}.modal-layer .modal.with-stats{display:flex;flex-direction:column;width:100%;max-height:calc(100dvh - 16px);gap:12px;padding:14px}.stats-panel{order:-1;position:static;max-height:none;width:100%;padding:8px 10px}.stats-disclosure{display:block}.stats-summary{display:flex;justify-content:space-between;gap:8px;font-size:11px;cursor:pointer}.stats-summary b::after{content:' ▾'}.stats-disclosure:not([open])>.stats-content{display:none}.stats-content{max-height:38dvh;overflow:auto;padding:8px 0}.offer-grid,.upgrade-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.offer{min-height:270px;padding:12px 10px 0}.offer>p{font-size:12px}.offer-actions{margin-inline:-10px}.gear-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.gear-slot button{height:90px}.shop-top{gap:12px;margin-bottom:14px}.shop-top h2{font-size:24px}.shop-wallet>b{font-size:25px}.reroll{min-width:105px;padding:7px}.reroll b{font-size:12px}.shop-wallet>span{font-size:24px}.shop-bottom{margin-top:15px}.shop-bottom .primary{min-width:155px;font-size:14px}.modal .stat-help-button{min-width:28px;min-height:28px}.stat-row{min-height:33px;font-size:12px}.upgrade{min-height:250px}.bonus-grid{gap:6px}.bonus-card{padding:12px 5px;gap:8px}.bonus-card img{width:60px;height:60px}.bonus-card strong{font-size:12px}.bonus-card span{font-size:9px}.summary{grid-template-columns:repeat(2,minmax(0,1fr))}.hud{inset:8px 8px auto}.metric.health,.metric.experience{width:30%}.health strong{font-size:12px;top:1px}.health progress{height:24px}.metric.experience{top:27px}.experience progress{height:17px}.experience .label{line-height:17px;font-size:9px}.metric.paper{top:45px;gap:5px}.paper strong{font-size:17px}.paper .label{font-size:7px}.hud > .metric:first-child strong{font-size:14px}.metric.timer{top:19px}.timer strong{font-size:22px}.character-hud{top:8px;right:7px;gap:2px}.character-hud img{width:24px;height:24px}.character-hud .test-badge{font-size:7px;padding:1px 3px}.arena-foot{font-size:8px;gap:4px;padding:3px 5px;flex-wrap:wrap}.banner{font-size:16px;padding:7px 12px;max-width:95%;white-space:normal}.weapon-detail-columns{gap:8px}.weapon-detail dl>div{font-size:10px}}
@media(max-width:600px){.header .brand img{width:28px;height:28px}.brand h1{font-size:17px}}
@media(orientation:landscape) and (max-height:540px){.modal-layer .modal.with-stats{max-height:calc(100dvh - 12px)}.offer-grid,.upgrade-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.offer{min-height:270px}.gear-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.stats-content{max-height:55dvh}}
.owned-items{margin-top:12px;color:#bdb8a8;font-size:10px}.owned-items summary{cursor:pointer;letter-spacing:1px}.owned-items summary b{color:#e3d5a3;margin-left:5px}.owned-items>div{display:flex;flex-wrap:wrap;gap:7px;padding:7px 0}.owned-items>div>span{background:#292925;border:1px solid #555147;padding:5px;font-size:10px}
@media(max-width:800px){
 .modal.with-stats .stats-panel,.modal.with-stats .modal-main{flex-shrink:0}
 .shop-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
 .shop-top h2{white-space:nowrap}.shop-wallet{margin:0;justify-content:flex-end}
 .shop-wallet small{flex-basis:auto}.shop-top>.reroll{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:12px;min-height:40px}
}
.offer-class{display:block;color:#b8b5a8;font-size:10px;margin-bottom:10px}.offer-values{display:grid;gap:6px;font-size:13px}.offer-values>span{display:flex;justify-content:space-between}.offer-values b{color:#dedbc9}
@media(min-width:801px) and (max-height:800px){.modal-layer .modal.with-stats{padding:16px}.shop-top{margin-bottom:12px}.offer{min-height:270px;padding-top:8px}.offer-icon,.offer-icon .weapon-icon{height:40px}.offer-top{margin-bottom:3px}.offer>p{margin:8px 0}.equipment-heading{margin-top:16px}.gear-slot button{height:76px}.shop-bottom{margin-top:14px}.shop-bottom .primary{min-height:40px}.stat-row{min-height:23px}.stats-content h4{margin-top:7px}.stats-panel{padding:10px}.owned-items{margin-top:8px}}
@media(min-width:801px) and (max-height:740px){.offer-actions button{padding:4px 6px;line-height:1.15}.offer>p{margin:5px 0}.offer-icon,.offer-icon .weapon-icon{height:36px}.gear-slot button{height:72px}.shop-bottom{margin-top:10px}}

/* Event Cache: the first three cards form the team route. */
.event-heading{text-align:center}
.event-icon{width:68px;height:68px;object-fit:contain}
.event-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.event-card{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;padding:12px 8px;text-align:center;color:var(--text);background:#41413c;border:2px solid var(--card-color);border-radius:3px}
.event-card>img{width:82px;height:82px;object-fit:contain}
.event-card>small:first-child{color:var(--card-color);font-weight:bold}
.event-card>strong{font-size:16px}
.event-card>b,.event-card>span,.event-detail{font-size:11px}
.event-card[aria-pressed=true]{outline:3px solid #fff3b4;outline-offset:2px;background:#4f4f44}
.event-detail{visibility:hidden;color:#f1dfad;min-height:3em}
.event-card:hover .event-detail,.event-card:focus-visible .event-detail,.event-card[aria-pressed=true] .event-detail{visibility:visible}
.event-confirm{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:14px;font-weight:bold}
.team-info{display:flex;align-items:center;gap:8px}
.team-info img{width:36px;height:36px;object-fit:contain}
@media(max-width:700px){
  .event-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .event-card>img{width:63px;height:63px}
  .event-detail{visibility:visible}
}

/* Profession selection. */
.modal-layer[data-mode=profession] .modal {width:min(1100px,100%); padding:22px;}
.profession-heading {display:flex;align-items:start;justify-content:space-between;gap:12px;}
.profession-heading h2 {margin:.25em 0 .45em;}
.profession-layout {display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,.38fr);gap:16px;}
.profession-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;align-content:start;}
.profession-card {min-width:0;min-height:105px;display:grid;justify-items:center;align-content:center;gap:4px;padding:9px 4px;text-align:center;background:#383831;border:2px solid #4e4e43;overflow-wrap:anywhere;}
.profession-card[aria-pressed=true] {border-color:var(--profession-accent);background:#48483e;box-shadow:inset 0 0 0 1px var(--profession-accent);}
.profession-card .profession-icon-glyph {font-size:22px;font-style:normal;line-height:1;color:var(--profession-accent);}
.profession-card .profession-icon-image {width:32px;height:32px;object-fit:contain;display:block;}
.profession-detail-heading{display:flex;align-items:flex-start;gap:10px}.profession-detail-heading>div{min-width:0;flex:1}.profession-detail-icon{width:42px;height:42px;object-fit:contain;flex:0 0 42px}.profession-detail-icon.profession-icon-glyph{font-size:34px;line-height:1;text-align:center}
.profession-hud-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex:0 0 20px}.profession-hud-icon .profession-icon-image{width:20px;height:20px;object-fit:contain}.profession-hud-icon .profession-icon-glyph{font-size:16px;line-height:1}
.profession-debug-identity{display:flex;align-items:center;gap:8px;margin:6px 0 10px}.profession-debug-identity .profession-debug-icon{width:30px;height:30px;object-fit:contain}.profession-debug-identity .profession-icon-glyph{font-size:24px;line-height:1}
.profession-card strong {font-size:13px;}
.profession-card small {font-size:11px;color:#dedac8;}
.profession-details {min-width:0;background:#292923;padding:13px;border:2px solid #1c1c18;}
.profession-details h3 {margin:.35em 0;}
.profession-details p {margin:.55em 0;}
.profession-details ul {padding-left:1.25em;margin:.65em 0;font-size:12px;line-height:1.55;}
.profession-details .negative {color:#f5a69a;}
.profession-details .positive {color:#c4e38d;}
.profession-footer {margin-top:12px;}
.profession-readout {font-weight:bold;color:#d4e8a3!important;}
#professionName {font-size:10px;color:#dbedb7;}
#professionDebugValues {white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;}
@media(max-width:800px){
 .modal-layer[data-mode=profession] .modal {padding:12px;max-height:calc(100dvh - 16px);}
 .profession-layout {grid-template-columns:minmax(0,1fr);gap:10px;}
 .profession-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
 .profession-card {min-height:60px;gap:2px;padding:5px 3px;}
 .profession-card .profession-icon-glyph {font-size:17px;}
 .profession-card .profession-icon-image {width:26px;height:26px;}
}

.weapon-class-tags{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.weapon-class-tag{display:inline-flex;align-items:center;gap:3px;max-width:100%;padding:1px 4px;border:1px solid #676453;border-radius:2px;background:#37372e;color:#e7dcae;font-size:10px;line-height:1.25}
.weapon-class-tag>[aria-hidden]{color:#b9d88d}
.weapon-identity{display:flex;flex-wrap:wrap;gap:3px 10px;margin:5px 0;color:#ccc8ba;font-size:11px}
.weapon-identity b{color:#f0ead7}
.gear-classes{display:flex;justify-content:center;flex-wrap:wrap;gap:2px}
.gear-slot .gear-classes .weapon-class-tag{font-size:9px;padding:0 2px}
.weapon-sets{margin-top:11px}
.weapon-sets h4{margin:0 0 5px;color:#e0cc8c;font-size:10px;letter-spacing:.7px}
.weapon-set-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,132px),1fr));gap:6px}
.weapon-set-card{display:grid;align-content:start;gap:4px;min-width:0;padding:7px 8px;border:1px solid #656151;background:#282824;font-size:11px}
.weapon-set-card>div{display:flex;justify-content:space-between;align-items:center;gap:5px}
.weapon-set-stages{list-style:none;display:grid;gap:2px;margin:2px 0 0;padding:0}
.weapon-set-stages li{display:grid;grid-template-columns:2.5ch minmax(0,1fr) auto;gap:6px;align-items:baseline;padding:4px 5px;border-left:2px solid transparent;line-height:1.35;color:#c8c4b7;overflow-wrap:anywhere}
.weapon-set-stages .weapon-set-count{font-variant-numeric:tabular-nums}
.weapon-set-stages .is-reached{color:#d4e5b8}
.weapon-set-stages [aria-current=step]{background:#3c482f;border-left-color:#b9d88d;color:#e7facb;font-weight:800}
.weapon-set-stages li>b{font-size:9px;white-space:nowrap}
.weapon-detail:not(.inline) .weapon-set-grid{grid-template-columns:1fr}
.weapon-set-card small,.weapon-set-shop{color:#ccc8ba;font-size:10px}
.weapon-set-card progress{width:100%;height:5px;accent-color:#b9d88d}
.weapon-set-shop{margin-top:6px}
.weapon-set-shop summary{cursor:pointer}
#elementalDebugValues { white-space:pre-wrap; }

#engineeringDebug pre { white-space: pre-wrap; overflow-wrap: anywhere; }
#engineeringDebug .engineering-list { max-height: 18rem; overflow: auto; }
#engineeringDebug table { width: 100%; }

#shopCacheDebug pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.debug-shop-pools { font-size: .75rem; color: var(--muted, #9ca8ae); }

.modal-layer[data-mode=starter] .modal{width:min(860px,100%)}
.starter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0}
.starter-card{min-width:0;min-height:126px;display:grid;align-content:center;justify-items:start;gap:5px;text-align:left;padding:12px;background:#383831;border:2px solid #5a594a}
.starter-card img{width:48px;height:48px;object-fit:contain}
.starter-card strong{color:#fff1c5}
.starter-card small,.starter-values{font-size:12px;color:#ddd8c5}
.starter-card[aria-pressed=true]{outline:2px solid #d3e99a;outline-offset:1px;background:#4b513a}
.profession-footer{display:flex;flex-wrap:wrap;gap:8px}
.summon-box.inline{grid-column:1 / -1;flex-basis:100%;box-sizing:border-box}
.summon-detail header{display:flex;align-items:center;gap:9px}
.summon-detail header img{width:42px;height:42px;object-fit:contain}
.summon-detail header button{margin-left:auto;align-self:flex-start}
.summon-detail h3,.summon-detail h4{margin:0}
.summon-detail h4{margin-top:9px;color:#e5e8b0}
.summon-detail p{margin:6px 0;line-height:1.4}
.summon-detail dl{display:grid;gap:4px;margin:9px 0}
.summon-detail dl div{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.2fr);gap:8px;border-bottom:1px solid #535346;padding-bottom:4px}
.summon-detail dd{margin:0;color:#d7edb2;overflow-wrap:anywhere}
.summon-detail .summon-sources{color:#cfc9ad}
.owned-items{padding:9px 10px;border:1px solid #6b6655;background:#302f29}
.owned-items summary{font-size:13px;color:#f1e8c6;font-weight:800}
.owned-items-list{align-items:stretch}
.owned-item{max-width:100%}
.owned-item-button{display:flex;align-items:center;gap:5px;text-align:left;min-width:0;padding:4px 7px;font-size:11px;overflow-wrap:anywhere}
.owned-item-button small{color:#d4cba7;white-space:nowrap}
.owned-items-list>.weapon-detail.inline{flex:0 0 100%;box-sizing:border-box}
.owned-items .owned-empty,.owned-items .owned-collection{margin:2px 0;font-size:11px}
.owned-stamps{margin-top:6px}.owned-stamp{display:flex;align-items:center;gap:5px;min-height:30px;padding:3px 6px;border:1px solid #756f5d;background:#292925;color:#e8dfc6;font-size:10px}.owned-stamp .held-stamp{width:28px;height:28px;padding:2px;box-sizing:border-box;background:#efe4cc;border:1px solid #bcae90}
.tb-reward-notice{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 12px;padding:9px 12px;border:1px solid #9d9064;background:#3e3c2e}
.tb-reward-notice span{display:block;margin-top:3px;color:#ded4b1;font-size:12px}
.tb-reward-notice p{flex-basis:100%;margin:0}
.tb-claim-status,.tb-receipt{color:#d3e8a8}
.tb-confirm{max-width:100%}
@media(max-width:700px){
 .starter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .starter-card{min-height:110px;padding:8px}
 .starter-card img{width:37px;height:37px}
 .summon-box.inline{width:100%;max-width:none}
}

.modal-layer[data-mode=starter] .modal{width:min(1040px,100%)}
.starter-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.starter-card{min-height:110px;gap:4px;padding:8px}
.starter-card img{width:41px;height:38px}
.starter-card .starter-special{color:#b7dda4;line-height:1.3}
.starter-details{margin:12px 0;border:1px solid #646953;background:#2e3129;padding:10px}
.starter-details h3,.starter-details h4{margin:4px 0}
.starter-details dl{margin:4px 0}
.starter-details dl>div{display:flex;justify-content:space-between;gap:6px;padding:2px 0;font-size:12px}
.starter-details dd{margin:0;text-align:right}
.starter-actions{position:sticky;bottom:0;z-index:1;background:#383833;padding:8px 0}
@media(max-width:840px){.starter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:575px){.starter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.item-effect-lines{list-style:none;padding:0;margin:6px 0;display:grid;gap:3px;font-size:.84rem;line-height:1.35}
.item-effect-lines .gain{color:#c7e69f}
.item-effect-lines .loss{color:#ffc0ae}
.item-effect-special{color:#e7ddb4}
.item-detail header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.item-detail h3{margin:0;color:#fff1c5}
.item-detail p{font-size:.8rem;color:#c9c5b3}
.offer-description{font-size:.84rem;margin:5px 0}

/* Keep equipped weapon actions visible while the stat body scrolls. */
.weapon-detail:has(>.weapon-detail-scroll){display:flex;flex-direction:column;overflow:hidden;max-height:min(440px,calc(100dvh - 32px))}.weapon-detail-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;padding-inline-end:5px}.weapon-action-bar{margin:8px 0;padding-bottom:6px;border-bottom:1px solid #5c594f}.weapon-action-bar .weapon-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0}.weapon-action-bar .weapon-actions button{min-height:44px;min-width:0;white-space:normal;overflow-wrap:anywhere}.weapon-action-bar .weapon-actions button:disabled{opacity:.7}.weapon-action-bar p{color:#d7cdb6}
@media(max-width:420px){.weapon-action-bar .weapon-actions button{padding-inline:6px;font-size:12px}}

.item-test-dialog {
  width: min(900px, calc(100vw - 24px));
  max-height: min(90dvh, 780px);
  padding: 0;
  color: #f4f1eb;
  background: #252525;
  border: 2px solid #0b0b0b;
  border-radius: 10px;
  box-shadow: 0 16px 50px #000b;
}
.item-test-dialog::backdrop { background: #000b; }
.item-test-header, .item-test-filters, .item-test-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}
.item-test-header {
  position: sticky;
  top: 0;
  z-index: 1;
  align-items: center;
  justify-content: space-between;
  background: #303030;
  border-bottom: 2px solid #171717;
  padding: 12px 16px;
}
.item-test-header h2, .item-test-details h3, .item-test-cache h3 { margin: 0; }
.item-test-body { padding: 14px 16px; }
.item-test-filters label, .item-test-actions label { display: grid; gap: 4px; }
.item-test-filters label:first-child { flex: 1; }
.item-test-dialog input, .item-test-dialog select {
  min-height: 44px;
  min-width: 0;
  color: inherit;
  background: #191919;
  border: 1px solid #858585;
  border-radius: 5px;
  padding: 6px 9px;
  font: inherit;
}
.item-test-dialog button { min-height: 44px; }
.item-test-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.item-test-list, .item-test-details, .item-test-cache {
  border: 1px solid #565656;
  border-radius: 6px;
  padding: 8px;
}
.item-test-list { max-height: 280px; overflow: auto; }
.item-test-list button { width: 100%; margin-bottom: 4px; text-align: left; overflow-wrap: anywhere; }
.item-test-list button[aria-pressed="true"] { border-color: #f9d67b; background: #4a4231; }
.item-test-cache { margin-top: 12px; }
.item-test-body p { margin: 7px 0; }
#itemTestWarning { color: #ffd17c; }
#itemTestStatus { min-height: 1.4em; color: #b5dfa3; }
@media (max-width: 640px) {
  .item-test-grid { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .item-test-list { max-height: 125px; }
  .item-test-header, .item-test-body { padding: 9px; }
  .item-test-header h2 { font-size: 1.1rem; }
  .item-test-actions { gap: 5px; }
}

/* V0.9.6.5: screen-space damage feedback, never captures pointer input */
.low-health-effect{position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden}
.low-health-effect[hidden]{display:none!important}
.low-health-pulse,.damage-flash{position:absolute;inset:0;pointer-events:none}
.low-health-pulse{opacity:var(--low-alpha,0);background:radial-gradient(ellipse at center,transparent 24%,rgba(69,0,0,.20) 49%,rgba(90,0,0,.85) 84%,rgba(86,0,0,1) 100%)}
.damage-flash{opacity:var(--hurt-alpha,0);background:radial-gradient(ellipse at center,rgba(8,0,0,.16),rgba(47,0,0,.46) 65%,rgba(80,0,0,.82) 100%)}
/* Original-inspired Danger selection: three panels, distinct selectable ranks */
.modal-layer[data-mode=danger] .modal{width:min(1110px,100%);padding:24px}
.danger-layout{display:grid;grid-template-columns:1.6fr .82fr 1fr;gap:12px;min-height:315px}
.danger-layout>section{border:2px solid #2d302c;border-radius:8px;padding:14px;background:#24342c;min-width:0}
.danger-character{text-align:center}.danger-character h3{font-size:26px}.danger-avatar{margin:14px auto;width:130px;height:135px;background:#4a6259;border:4px solid #12241d;border-radius:10px;display:grid;place-items:center;font-size:90px}
.danger-weapon{display:grid;align-content:start;justify-items:center;gap:12px;text-align:center;background:#1b2320!important}.danger-weapon img{width:100px;height:100px;object-fit:contain}.danger-weapon strong{font-size:19px}
.danger-description{border-color:#aa8d32!important;background:#2b2b23!important}.danger-description h3{color:#edd570;font-size:23px;margin:4px 0 16px}.danger-description li{padding:5px 0;font-size:14px}.danger-description ul{padding-left:20px}
.danger-symbol{font-size:60px;font-weight:1000;color:#e5d269;text-shadow:2px 2px #000}
.danger-selector{display:flex;gap:7px;justify-content:center;align-items:center;margin:16px auto}
.danger-option,.danger-locked{display:grid;place-items:center;width:66px;height:65px;flex-shrink:0;font-weight:1000;font-size:44px;color:#161b16;text-shadow:1px 1px #f5d672,-1px -1px #f5d672;border-radius:8px;background:#8b887d;border:2px solid #45423c}
.danger-1{background-color:#418da0}.danger-2{background-color:#74669d}.danger-3{background-color:#9a5651}.danger-4{background-color:#9c814a}.danger-5{background-color:#696b4b}.danger-option[aria-pressed=true]{outline:3px solid #f4da67;outline-offset:2px}.danger-option:disabled{filter:grayscale(1);opacity:.32}.danger-locked{font-size:30px;background:#29372f;opacity:.55}.danger-footer{justify-content:space-between}
/* Custom loadouts live in their own modal; never alter the gameplay interface */
.custom-build-dialog{width:min(1040px,calc(100vw - 20px));max-height:93dvh;overflow:auto;background:#302f2a;color:#eeeada;border:3px solid #aaa06d;border-radius:14px;padding:16px 20px;box-shadow:0 22px 70px #000a}
.custom-build-dialog::backdrop{background:#101412df}.custom-header{display:flex;justify-content:space-between;align-items:start;gap:16px}.custom-header h2{margin:4px 0 12px}.custom-header>button{font-size:25px;min-width:42px}.custom-header small{color:#ead187}
.custom-steps{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.custom-steps button{flex:1;font-size:13px;padding:10px 6px;min-width:135px}.custom-steps [aria-current=step]{background:#6c7041;color:#fff2cc;border-color:#dfc46e}
.custom-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:15px}.custom-summary>div{display:grid;gap:6px;background:#242925;border:1px solid #5b624e;padding:9px;min-width:0}.custom-summary small{font-size:10px;color:#b8b5a1;overflow-wrap:anywhere}.custom-summary strong{font-size:12px}.custom-summary-icon{width:30px;height:30px;object-fit:contain}.custom-summary .profession-icon-glyph{font-size:24px;line-height:1}.custom-content{border:1px solid #6c6659;padding:12px;max-height:43dvh;min-height:250px;overflow-y:auto}
.custom-professions,.custom-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.custom-professions button,.custom-grid button{display:grid;gap:5px;justify-items:start;text-align:left;padding:10px;min-height:70px;overflow-wrap:anywhere}.custom-professions button .custom-profession-icon{width:30px;height:30px;object-fit:contain}.custom-professions button .profession-icon-glyph{font-size:22px;line-height:1}.custom-professions button small,.custom-grid button small{color:#c5bfae;font-size:10px}.custom-professions button[aria-pressed=true]{border-color:#f1d078;background:#464b36}
.custom-controls,.custom-run-controls{display:flex;gap:12px;flex-wrap:wrap;margin:9px 0 12px}.custom-controls label,.custom-run-controls label{display:grid;gap:4px;font-size:12px}.custom-controls input,.custom-run-controls input{min-width:160px}.custom-picked{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}.custom-picked span{display:flex;align-items:center;gap:6px;border:1px solid #b2a874;background:#484632;padding:4px 8px;border-radius:6px;font-size:12px}.custom-picked button{min-width:25px;min-height:25px;padding:2px 5px}.custom-item-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.custom-enemy-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.custom-item-count{margin-bottom:8px;color:#e8ce83;font-size:11px}
.custom-preview{color:#c5eece;font-size:12px}.custom-status{min-height:21px;color:#ffce8b;font-size:12px}.custom-footer{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:12px}.custom-footer button{min-height:40px}.custom-spacer{flex:1}.custom-hint{color:#aeb3a6;font-size:12px}
@media(max-width:800px){.danger-layout{grid-template-columns:1fr 1fr;min-height:unset}.danger-description{grid-column:1/-1}.danger-selector{gap:4px}.danger-option,.danger-locked{width:41px;height:43px;font-size:24px}.danger-character h3{font-size:20px}.danger-avatar{width:90px;height:90px;font-size:55px}.custom-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.custom-professions,.custom-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.custom-item-grid,.custom-enemy-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.custom-build-dialog{padding:12px;max-height:97dvh}.custom-content{max-height:48dvh}}
@media(prefers-reduced-motion:reduce){.low-health-pulse,.damage-flash{animation:none!important;transition:none!important}}

.danger-avatar img{height:115px;max-width:100%;object-fit:contain;image-rendering:pixelated}.danger-profession-stats{text-align:left;font-size:13px;color:#b9e9a9;line-height:1.6;list-style:none;padding:0 12px}
@media(max-width:800px){.danger-avatar img{height:75px}.danger-profession-stats{font-size:10px}}


/* V0.9.6.7 · Travel Bug offers, reward processing, and compact HUD */
/* V0.9.6.8 · Enemy visual overhaul is loaded from local sprite assets. */
.tb-offer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}
.tb-mission-card{border:2px solid #8b9b9b;background:#333734;color:#f3eedf;display:flex;flex-direction:column;align-items:center;padding:16px 10px;gap:8px;min-width:0;min-height:280px;transition:background .18s,border .18s}
.tb-mission-card:hover,.tb-mission-card:focus-visible{background:#45514b;border-color:#d3e3b8}
.tb-mission-card img{height:100px;width:100px;object-fit:contain}
.tb-mission-card strong{font-size:14px}.tb-mission-card span{font-size:13px;text-align:center}.tb-mission-card b{font-size:25px;color:#e9d99e}
.tb-mission-card small{color:#aaa99c;font-size:10px;letter-spacing:1px}
.tb-mission-card .tb-mission-hint{color:#d9d7c5;letter-spacing:0;font-size:11px}.tb-mission-card em{font-size:13px;color:#a6d795;font-style:normal;text-align:center}
.tb-reward-tag{display:block;width:100px;height:120px;object-fit:contain;margin:0 auto 8px}
.tb-reward-list{display:grid;gap:12px;margin:14px 0}.tb-reward-item{display:flex;align-items:center;justify-content:space-between;gap:18px;border:2px solid #595950;padding:12px;background:#343631}
.tb-reward-item>div:first-child{min-width:0;flex:1}.tb-reward-item .action-row{flex-shrink:1;margin:0}.tb-reward-item h3{margin:4px 0;color:#e7dba9}.tb-reward-item small{color:#bbb}.tb-reward-item .action-row button{min-height:43px}
/* V0.9.10.20: the mission gets its own row below the wave and countdown.
   Keep the objective truncatable, never the numerical progress. */
.tb-hud{position:absolute;z-index:4;left:50%;top:94px;transform:translateX(-50%);box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:8px;max-width:min(360px,35%);min-width:0;border:2px solid #adb3aa;border-radius:4px;background:rgba(20,25,23,.9);color:#e4e6d4;padding:5px 10px;pointer-events:none;font-size:12px;line-height:1.25;white-space:nowrap;text-shadow:0 1px 2px #000}
.tb-hud[hidden]{display:none}
.tb-hud-task{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
.tb-hud-count{flex:none;color:#f8e8ae;font-variant-numeric:tabular-nums;font-size:12px}
.modal-layer[data-mode=tb-offer] .modal{max-width:950px;width:min(950px,100%)}
.modal-layer[data-mode=tb-reward] .modal{max-width:840px;width:min(840px,100%)}
@media(max-width:760px){.tb-offer-grid{grid-template-columns:1fr;gap:8px}.tb-mission-card{display:grid;grid-template-columns:64px 1fr auto;min-height:85px;gap:3px 8px;text-align:left}.tb-mission-card img{width:56px;height:66px;grid-row:span 4}.tb-mission-card strong,.tb-mission-card span,.tb-mission-card small,.tb-mission-card em{grid-column:2}.tb-mission-card b{grid-column:3;grid-row:2;align-self:center;font-size:22px}.tb-reward-item{display:block}.tb-reward-item .action-row{margin-top:12px}.tb-hud{top:78px;left:50%;transform:translateX(-50%);max-width:min(340px,35%);font-size:10px;padding:4px 6px;gap:5px}.tb-hud-count{font-size:10px}}


/* V0.9.7.0 · Test-only enemy injection controls */
.enemy-test-dialog{width:min(620px,calc(100vw - 20px));max-height:90dvh;overflow:auto;background:#302f2a;color:#eeeada;border:3px solid #aaa06d;border-radius:12px;padding:18px 20px;box-shadow:0 22px 70px #000a}
.enemy-test-dialog::backdrop{background:#101412df}
.enemy-test-header{display:flex;justify-content:space-between;align-items:start;gap:14px}
.enemy-test-header small{color:#ead187;font-size:10px;font-weight:800;letter-spacing:1.3px}
.enemy-test-header h2{margin:4px 0 8px;font-size:24px}
.enemy-test-header>button{font-size:24px;min-width:42px}
.enemy-test-note,.enemy-test-meta{color:#b8b5a1;font-size:12px;line-height:1.55}
.enemy-test-controls{display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:12px;margin:16px 0 10px}
.enemy-test-controls label{display:grid;gap:5px;font-size:12px}
.enemy-test-controls select,.enemy-test-controls input{width:100%;min-width:0;min-height:42px}
.enemy-test-status{min-height:28px;margin:12px 0;color:#c6e8a8;font-size:12px}
.enemy-test-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.enemy-test-actions button{min-height:42px}
@media(max-width:640px){.enemy-test-dialog{padding:12px;width:calc(100vw - 16px)}.enemy-test-header h2{font-size:20px}.enemy-test-controls{grid-template-columns:minmax(0,1fr) 90px;gap:8px}.custom-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* V0.9.7.1 · Enemy animation preview (test-only) */
.enemy-animation-dialog{width:min(760px,calc(100vw - 20px));max-height:92dvh;overflow:auto;background:#302f2a;color:#eeeada;border:3px solid #8d86aa;border-radius:14px;padding:18px 20px;box-shadow:0 22px 70px #000a}
.enemy-animation-dialog::backdrop{background:#101412e8}
.enemy-animation-header{display:flex;justify-content:space-between;align-items:start;gap:14px;margin-bottom:14px}
.enemy-animation-header small{color:#c4b4f0;font-size:10px;font-weight:800;letter-spacing:1.3px}
.enemy-animation-header h2{margin:4px 0 8px;font-size:22px}
.enemy-animation-header>button{font-size:24px;min-width:42px}
.enemy-animation-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,.9fr);gap:16px;align-items:start}
.enemy-animation-stage{min-width:0;display:grid;justify-items:center;gap:8px}
#enemyAnimationCanvas{display:block;width:min(100%,320px);height:auto;aspect-ratio:1;border:1px solid #77766d;border-radius:12px;background-color:#e8e7e1;background-image:linear-gradient(45deg,#d8d7d0 25%,transparent 25%),linear-gradient(-45deg,#d8d7d0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#d8d7d0 75%),linear-gradient(-45deg,transparent 75%,#d8d7d0 75%);background-size:24px 24px;background-position:0 0,0 12px,12px -12px,-12px 0}
#enemyAnimationCaption{margin:0;color:#e6d8a6;font-size:12px;text-align:center}
.enemy-animation-controls{display:grid;gap:10px;min-width:0}
.enemy-animation-controls>label{display:grid;gap:5px;font-size:12px}
.enemy-animation-controls select{width:100%;min-width:0;min-height:42px}
.enemy-animation-label{font-size:11px;color:#c9c3ae;font-weight:800;letter-spacing:.5px}
.enemy-animation-states,.enemy-animation-playback,.enemy-animation-speeds,.enemy-animation-enemies{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.enemy-animation-playback{grid-template-columns:repeat(3,minmax(0,1fr))}.enemy-animation-enemies button{min-height:40px;padding:6px;font-size:11px}
.enemy-animation-speeds{grid-template-columns:repeat(4,minmax(0,1fr))}
.enemy-animation-controls button{min-height:38px;padding:7px 8px;font-size:11px}
.enemy-animation-controls button.active{background:#65578b;border-color:#c9b8f5;color:#fff}
.enemy-animation-note{margin:4px 0 0;color:#b8b5a1;font-size:11px;line-height:1.55}
@media(max-width:640px){.enemy-animation-dialog{padding:12px;width:calc(100vw - 16px)}.enemy-animation-header h2{font-size:18px}.enemy-animation-layout{grid-template-columns:1fr}.enemy-animation-stage{order:0}.enemy-animation-controls{order:1}.enemy-animation-states{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* V0.9.7.7 — profession starter inventory and exact user icon assets */
.profession-detail-heading{overflow:visible;position:relative}
.profession-detail-heading>.profession-detail-portrait{min-width:0;flex:0 0 68px;display:flex;flex-direction:column;align-items:center;gap:8px;position:relative;overflow:visible}
.profession-detail-heading>.profession-detail-copy{min-width:0;flex:1}
.profession-detail-icon{width:56px;height:56px;flex:0 0 56px;object-fit:contain}
.profession-detail-icon.profession-icon-glyph{font-size:38px;line-height:1;text-align:center}
.profession-starter-items{display:flex;flex-direction:column;align-items:center;gap:4px;width:100%}
.profession-starter-label{font-size:8px;line-height:1.1;letter-spacing:.8px;color:#bcb8a8;text-align:center}
.profession-starter-item-wrap{position:relative;display:flex;justify-content:center;align-items:center}
.profession-starter-item{display:grid;justify-items:center;gap:2px;min-width:0;min-height:0;padding:4px 3px;background:#34362f;border:1px solid #77715c;border-radius:5px;box-shadow:none}
.profession-starter-item:hover:not(:disabled){background:#45483b;border-color:#e6d58c;box-shadow:0 0 0 1px #e6d58c}
.profession-starter-item img{width:40px;height:40px;object-fit:contain}
.profession-starter-item span{max-width:62px;color:#eee8d4;font-size:9px;line-height:1.1;white-space:normal;text-align:center}
.profession-starter-tooltip{display:none;position:absolute;left:0;top:calc(100% + 7px);width:270px;max-width:calc(100vw - 48px);z-index:30;padding:10px;background:#20211e;border:2px solid #c8b56f;border-radius:4px;box-shadow:0 8px 24px #000b;color:#f1eddf;text-align:left}
.profession-starter-item-wrap:hover .profession-starter-tooltip,.profession-starter-item-wrap:focus-within .profession-starter-tooltip{display:block}
.profession-starter-tooltip>header{display:flex;align-items:center;gap:8px;margin-bottom:7px}
.profession-starter-tooltip>header img{width:38px;height:38px;object-fit:contain;flex:0 0 38px}
.profession-starter-tooltip>header div{display:grid;gap:2px;min-width:0}
.profession-starter-tooltip>header strong{font-size:13px;color:#fff1c5}
.profession-starter-tooltip>header small{font-size:10px;color:#c9c3ae}
.profession-starter-tooltip .item-effect-lines{margin:6px 0}
.profession-starter-tooltip>p{font-size:10px;line-height:1.45;color:#c9c5b3;margin:7px 0 0}
.profession-readout{display:flex;align-items:center;gap:7px}
.stats-profession-icon{width:20px;height:20px;object-fit:contain;flex:0 0 20px}
.stats-profession-icon-glyph{display:inline-flex;width:20px;height:20px;align-items:center;justify-content:center;font-size:17px;line-height:1;flex:0 0 20px}
@media(max-width:800px){
 .profession-detail-heading>.profession-detail-portrait{flex-basis:62px}
 .profession-detail-icon{width:50px;height:50px;flex-basis:50px}
 .profession-starter-item img{width:36px;height:36px}
 .profession-starter-tooltip{left:0;top:auto;bottom:calc(100% + 7px);width:min(270px,calc(100vw - 48px))}
}


/* V0.9.7.8 — detailed profession / weapon / Danger pre-run review */
.modal-layer[data-mode=danger] .modal{
  width:min(1360px,100%);
  max-height:calc(100dvh - 28px);
  overflow-y:auto;
  padding:20px;
}
.danger-layout{
  display:grid;
  grid-template-columns:minmax(0,1.02fr) minmax(0,1.16fr) minmax(0,.92fr);
  align-items:stretch;
  gap:10px;
  min-height:0;
}
.danger-layout>section{
  min-width:0;
  min-height:390px;
  max-height:min(54dvh,520px);
  overflow:auto;
  overscroll-behavior:contain;
  border:2px solid #2d302c;
  border-radius:8px;
  padding:12px;
  background:#24342c;
  scrollbar-width:thin;
}
.danger-panel-kicker{
  margin:0 0 8px;
  color:#b6c6ad;
  font-size:10px;
  font-weight:900;
  letter-spacing:1.2px;
}
.danger-profession .danger-profession-details{
  margin:0;
  padding:8px 0 0;
  border:0;
  border-top:1px solid #59675b;
  background:transparent;
}
.danger-profession-details .profession-detail-heading{gap:9px}
.danger-profession-details .profession-detail-portrait{flex-basis:64px}
.danger-profession-details .profession-detail-icon{width:54px;height:54px;flex-basis:54px}
.danger-profession-details .profession-detail-copy>small{font-size:9px;color:#aebcae}
.danger-profession-details h3{font-size:19px;line-height:1.2;margin:3px 0 7px}
.danger-profession-details p{font-size:11px;line-height:1.45;color:#e0e6d9;margin:6px 0}
.danger-profession-details ul{font-size:11px;line-height:1.45;padding-left:15px;margin:7px 0}
.danger-profession-details li{margin:3px 0}
.danger-profession-details .profession-starter-item img{width:34px;height:34px}
.danger-profession-details .profession-starter-item span{font-size:8px}
.danger-profession-details .profession-starter-label{font-size:7px}
.danger-profession-details .profession-starter-tooltip{width:250px;max-width:calc(100vw - 48px)}
.danger-weapon{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  text-align:left;
  background:#1b2320!important;
}
.danger-weapon-banner{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px;
  background:#303b35;
  border:1px solid #536359;
  border-radius:5px;
}
.danger-weapon-banner .weapon-icon{width:68px;height:58px;object-fit:contain;flex:0 0 68px}
.danger-weapon-banner>div{display:grid;gap:4px;min-width:0}
.danger-weapon-banner strong{font-size:17px;color:#fff0c1;overflow-wrap:anywhere}
.danger-weapon-banner small{font-size:10px;color:#c6d0c4}
.danger-weapon-banner .weapon-class-tag{font-size:10px;padding:2px 5px}
.danger-weapon-detail{
  position:static!important;
  width:100%!important;
  max-width:none!important;
  max-height:none!important;
  overflow:visible!important;
  margin:0!important;
  padding:8px 0 0!important;
  border:0!important;
  border-top:1px solid #536359!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#f4f0e5;
}
.danger-weapon-detail header h3{font-size:15px}
.danger-weapon-detail header small{font-size:9px}
.danger-weapon-detail .weapon-identity{font-size:10px;gap:7px;flex-wrap:wrap}
.danger-weapon-detail .weapon-class-tags{display:flex;flex-wrap:wrap;gap:4px}
.danger-weapon-detail .weapon-class-tag{font-size:9px;padding:2px 5px}
.danger-weapon-detail .weapon-detail-columns{grid-template-columns:1fr;gap:8px;margin:8px 0}
.danger-weapon-detail .weapon-detail-columns>section+section{
  border-left:0;
  border-top:1px solid #5c594f;
  padding:8px 0 0;
}
.danger-weapon-detail h4{font-size:9px;margin:6px 0 4px}
.danger-weapon-detail dl>div{font-size:10px;gap:5px;margin-bottom:4px}
.danger-weapon-detail dd{overflow-wrap:anywhere}
.danger-weapon-detail .weapon-set-grid{grid-template-columns:1fr}
.danger-weapon-detail .weapon-set-card{padding:5px}
.danger-weapon-detail .weapon-detail-note{font-size:9px}
.danger-description{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  border-color:#aa8d32!important;
  background:#2b2b23!important;
}
.danger-rank-row{display:flex;align-items:center;gap:12px;margin:2px 0 12px}
.danger-symbol{font-size:58px;line-height:1;font-weight:1000;color:#e5d269;text-shadow:2px 2px #000;flex:0 0 auto}
.danger-rank-row>div{min-width:0}
.danger-description h3{color:#edd570;font-size:21px;margin:0 0 4px}
.danger-rank-row small{font-size:10px;color:#d5cda9}
.danger-description ul{padding-left:18px;margin:0 0 12px}
.danger-description li{padding:4px 0;font-size:12px;line-height:1.4}
.danger-reward{
  margin-top:auto;
  padding:10px;
  border-top:1px solid #756a3e;
  background:#343125;
  display:grid;
  gap:5px;
}
.danger-reward small{font-size:9px;font-weight:900;letter-spacing:1px;color:#e5d18a}
.danger-reward strong{font-size:12px;line-height:1.45;color:#ffe17b}
.danger-selector{display:flex;gap:7px;justify-content:center;align-items:center;margin:14px auto}
.danger-footer{justify-content:space-between;margin:10px 0 0}
@media(max-width:1050px){
  .modal-layer[data-mode=danger] .modal{width:min(900px,calc(100vw - 24px));padding:16px}
  .danger-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .danger-layout>.danger-description{grid-column:1/-1;max-height:none;min-height:unset}
  .danger-layout>section{max-height:48dvh}
}
@media(max-width:680px){
  .modal-layer[data-mode=danger] .modal{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);padding:11px}
  .danger-layout{grid-template-columns:minmax(0,1fr);gap:8px}
  .danger-layout>section,
  .danger-layout>.danger-description{min-height:unset;max-height:none;overflow:visible;padding:10px}
  .danger-profession-details .profession-detail-portrait{flex-basis:58px}
  .danger-profession-details .profession-detail-icon{width:48px;height:48px;flex-basis:48px}
  .danger-profession-details h3{font-size:17px}
  .danger-profession-details .profession-starter-tooltip{left:0;top:calc(100% + 6px);bottom:auto}
  .danger-weapon-banner .weapon-icon{width:54px;height:48px;flex-basis:54px}
  .danger-weapon-detail .weapon-detail-columns{grid-template-columns:1fr;gap:8px}
  .danger-weapon-detail .weapon-detail-columns>section+section{border-top:1px solid #5c594f;border-left:0;padding:8px 0 0}
  .danger-symbol{font-size:44px}
  .danger-description h3{font-size:18px}
  .danger-selector{gap:4px;flex-wrap:nowrap;margin:10px auto}
  .danger-option,.danger-locked{width:clamp(34px,9vw,44px);height:42px;font-size:24px}
  .danger-footer{position:static;bottom:auto;background:#383833;padding:8px 0}
  .danger-footer button{flex:1;min-width:0;font-size:12px;padding:8px 5px}
}

/* Keep the two footer actions inside the modal's content box. */
.modal-layer[data-mode=danger] .danger-footer{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.modal-layer[data-mode=danger] .danger-footer button{
  min-width:0;
  max-width:48%;
  white-space:normal;
  overflow-wrap:anywhere;
  line-height:1.25;
}
.modal-layer[data-mode=danger] .danger-footer .primary{margin-left:auto}
@media(max-width:680px){
  .modal-layer[data-mode=danger] .danger-footer button{max-width:none}
}

.danger-weapon-stats{
  display:flex;
  flex-direction:column;
  gap:5px;
  padding-top:2px;
}
.danger-weapon-stats>div{
  display:grid;
  grid-template-columns:58px minmax(0,1fr);
  align-items:baseline;
  gap:7px;
  min-width:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
.danger-weapon-stats small{
  color:#c5cfbf;
  font-size:12px;
  letter-spacing:0;
}
.danger-weapon-stats strong{
  color:#f2e6b8;
  font-size:12px;
  line-height:1.4;
  font-weight:500;
  overflow-wrap:anywhere;
}
.danger-weapon-stats .wide{
  display:grid;
  grid-template-columns:1fr;
  gap:2px;
  margin-top:2px;
}
.danger-weapon-stats .wide strong{font-size:11px;font-weight:500}
@media(max-width:680px){
  .danger-weapon-stats>div{grid-template-columns:55px minmax(0,1fr)}
  .danger-weapon-stats small,.danger-weapon-stats strong{font-size:11px}
  .modal-layer[data-mode=danger] .danger-footer{position:static;bottom:auto}
}

/* Item artwork across the shop, inventory and testing menus. */
.item-icon{width:32px;height:32px;object-fit:contain;vertical-align:middle;flex:none}
.offer-icon .item-icon{width:auto;height:100%;max-height:52px;aspect-ratio:1}
.cache-reward-icon .item-icon{width:92px;height:92px}
.item-title,#itemTestSelected,.stats-item-list li{display:flex;align-items:center;gap:8px}
.item-title .item-icon,#itemTestSelected .item-icon{width:42px;height:42px}
.stats-item-list{display:grid;gap:3px;list-style:none;padding:0}
.stats-item-list .item-icon,.owned-items .item-icon,.custom-picked .item-icon{width:24px;height:24px;margin-right:4px}
.item-test-list button{display:flex;align-items:center;gap:7px}
.custom-item-grid button{grid-template-columns:36px minmax(0,1fr);align-items:center}
.custom-item-grid .item-icon{grid-row:span 3;width:36px;height:36px}
.custom-item-grid button>small{grid-column:2}

.earth-reward-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.earth-option{display:grid;justify-items:center;align-content:center;gap:6px;min-height:118px;padding:9px 5px;border:2px solid #73b2ec;background:#343d3e;color:#f2eacb;overflow-wrap:anywhere}
.earth-option:hover,.earth-option:focus-visible{background:#435352;border-color:#cce3fa}
.earth-option-icon{font-size:26px;line-height:1}
.earth-option b{font-size:12px;color:#c9e8aa}
@media(max-width:460px){.earth-reward-grid{grid-template-columns:1fr}.earth-option{grid-template-columns:28px minmax(0,1fr) auto;min-height:48px;justify-items:start;padding:7px 8px}.earth-option-icon{font-size:20px}}
.weapon-model-preview{display:grid;place-items:center;min-height:108px;margin:8px 0;border-radius:9px;background:radial-gradient(ellipse at center,#405556,#253637 72%)}
.weapon-model-preview img{display:block;width:min(100%,270px);height:128px;object-fit:contain}
.weapon-tier-comparison{margin:10px 0}
.weapon-tier-comparison ul{list-style:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:8px 0;padding:0}
.weapon-tier-comparison li{min-width:0;display:grid;align-content:start;gap:5px;padding:5px;border:1px solid #637576;border-radius:6px}
.weapon-tier-comparison li img{width:100%;height:42px;object-fit:contain}
.weapon-tier-comparison li small{font-size:11px;overflow-wrap:anywhere}
@media(max-width:540px){.weapon-tier-comparison ul{grid-template-columns:repeat(2,minmax(0,1fr))}}

[hidden].companion-hud,.companion-hud [hidden],.review-cast[hidden],.kevin-hud[hidden],.companion-test[hidden]{display:none}
.companion-test{display:flex;align-items:center;gap:5px}
.companion-test select{min-height:44px;touch-action:manipulation}
@media(max-width:700px){.event-grid{grid-template-columns:1fr}.event-card{display:grid;grid-template-columns:52px 1fr;text-align:left;gap:4px 12px}.event-card img{grid-column:1;grid-row:1/5;width:50px;height:50px}.event-card>small,.event-card>strong,.event-card>b,.event-card>span{grid-column:2}}

/* Battle readouts share the Log Paper anchor without affecting canvas flow. */
.companion-hud{position:absolute;z-index:3;top:var(--companion-top,105px);left:max(var(--companion-left,8px),env(safe-area-inset-left));display:grid;justify-items:start;gap:6px;max-width:calc(100% - 16px);max-height:var(--companion-height,330px);pointer-events:none;color:#f4eddb}
.companion-hud>*{min-width:0;pointer-events:auto}
.review-hud{position:relative;min-height:0}
.review-skills{display:grid;gap:2px;grid-template-columns:var(--review-size,30px);max-height:var(--companion-height,330px);overflow:auto;scrollbar-width:none}
.review-skill{display:grid;place-items:center;width:100%;height:var(--review-size,30px);min-height:0;padding:1px;background:#24372ff5;border:1px solid #668170;border-radius:5px;touch-action:manipulation;outline-offset:-2px}
.review-skill img{display:block;width:100%;height:100%;object-fit:contain;min-height:0}
.review-skill[data-state=used]{border-color:#697775;background:#303838}
.review-skill[data-state=used] img{filter:grayscale(1);opacity:.58}
.review-skill[data-state=casting]{border-color:var(--skill-color);box-shadow:inset 0 0 0 1px var(--skill-color);background:#46533b}
.review-skill:hover,.review-skill:focus-visible{outline:2px solid #f9efbd}
.review-help,.review-readout{position:absolute;left:calc(100% + 6px);width:max-content;max-width:min(230px,63vw);font-size:11px;line-height:1.3;pointer-events:none}
.review-help{z-index:1;padding:6px 8px;border:1px solid #a8c39d;border-radius:6px;background:#1c2d25;color:#fff9e9}
.review-readout{top:0;display:grid;gap:3px}
.review-status{display:grid;justify-items:start;gap:3px}
.review-status span,#reviewFeedback:not(:empty){display:flex;align-items:center;gap:4px;padding:2px 5px;background:#202d2bf2;border-radius:4px;color:#f4eddb}
.review-status img{width:16px;height:16px}
.review-cast{position:absolute;z-index:2;transform:translate(-50%,-100%);display:grid;grid-template-columns:24px auto;align-items:center;gap:4px 6px;border:1px solid #b7ee87;background:#14231bf0;color:#fff8db;border-radius:6px;padding:4px 7px;font-size:clamp(9px,1.2vw,14px);white-space:nowrap;pointer-events:none}
.review-cast img{width:22px;height:22px}.review-cast progress{grid-column:1/-1;width:100%;height:4px;accent-color:#b7ee87}
.kevin-hud{color:#f4eddb;background:#202d2b;border:1px solid #52665b;border-radius:8px;padding:7px 12px;margin:5px 0}
.turret-hud{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:3px 8px;max-width:min(239px,calc(100vw - 35px));padding:4px 7px;border:1px solid #dccb79;border-radius:7px;background:#24352cf5;box-shadow:0 2px 8px #1118;color:#f7eab5;font-size:11px}
.turret-heading{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px}
.turret-heading b{font-size:17px;color:#fff0a3;line-height:1}
.turret-next{display:flex;align-items:center;gap:4px}
.turret-next img{width:25px;height:25px}
.turret-hud button{min-height:36px;padding:4px 6px;white-space:nowrap;touch-action:manipulation}
.turret-hud [role=status]{grid-column:1/-1;color:#ffd5a8}.turret-hud [role=status]:empty{display:none}
@media(pointer:coarse){.turret-hud button{min-height:44px}}
/* TB progress stays centered in its reserved row, independent of companion HUD. */

.arena-test-info{background:#28332e;color:#eee8ce;padding:5px 12px;font-size:12px}
.test-options input[type=number]{max-width:11rem}

.pause-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:12px;margin-bottom:14px}
.pause-companion{min-width:0;padding:10px 12px;border:1px solid #65715b;border-radius:6px;background:#292e27}
.pause-companion h3{margin:0 0 5px;color:#e5d6ad;font-size:.85rem}
.pause-companion p{margin:5px 0 0;font-size:.83rem;overflow-wrap:anywhere}
.pause-companion-body{display:flex;align-items:center;gap:8px}
.companion-portrait{width:62px;height:62px;object-fit:contain;flex:none}
.companion-weapon{display:flex;align-items:center;gap:6px;font-size:.82rem;color:#ebd79e}
.companion-weapon .weapon-icon{width:36px;height:27px;object-fit:contain}
.companion-values{color:#b9dd9b}
.pause-review{margin-top:8px;font-size:.82rem}
.pause-review ul{padding-inline-start:17px}
@media(max-width:650px){.pause-overview{grid-template-columns:minmax(0,1fr);gap:8px}.pause-companion{padding:8px}.companion-portrait{width:50px;height:50px}}

.field-companion-hud{width:min(260px,66vw);padding:6px 9px;border:1px solid #75806a;border-radius:4px;background:#222923ed;color:#efe3b7;font-size:clamp(10px,1.8vw,13px);line-height:1.4;overflow-wrap:anywhere}
.dectopus-hud{display:grid;gap:4px;width:min(220px,64vw);padding:5px 7px;border:1px solid #54858b9c;border-radius:6px;background:rgba(5,20,27,.66);box-shadow:0 2px 8px #0004;color:#e7f2ec;font-size:clamp(9px,1.55vw,12px);line-height:1.25;backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.dectopus-heading{display:flex;align-items:center;gap:6px;min-width:0}
.dectopus-heading img{width:24px;height:24px;object-fit:contain;flex:none}
.dectopus-heading strong{flex:1;min-width:0;color:#e6b56c;font-size:1.05em;letter-spacing:.02em}
.dectopus-heading span{color:#b6d0cc;font-variant-numeric:tabular-nums}
.dectopus-hud button{min-height:34px;padding:4px 7px;border:1px solid #79a9a8a8;border-radius:5px;background:rgba(17,57,63,.62);color:#f5ead2;font-size:inherit;font-weight:700;touch-action:manipulation}
.dectopus-hud button:disabled{opacity:.58;color:#b9c4be}
.dectopus-status{min-height:1.2em;color:#c8ded6;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.dectopus-progress{width:100%;height:4px;border:0;border-radius:4px;accent-color:#d99a52;opacity:.78}
@media(pointer:coarse){.dectopus-hud button{min-height:44px}}
@media(max-width:650px){.dectopus-hud{width:min(190px,55vw);gap:3px;padding:4px 5px;background:rgba(5,20,27,.58);font-size:10px}.dectopus-heading img{width:21px;height:21px}.dectopus-hud button{min-height:44px;padding:4px 5px}}

.you7n-hud{display:grid;gap:3px;width:min(270px,62vw);padding:6px 8px;max-height:var(--companion-height,330px);overflow:auto;border:1px solid #648d88;border-radius:4px;background:#202e2af5;color:#f5edda;font-size:clamp(10px,1.8vw,13px);line-height:1.25;overflow-wrap:anywhere;overscroll-behavior:contain}
.you7n-hud strong{color:#9cf5e4}
.you7n-meter{display:flex;align-items:center;gap:6px}
.you7n-meter progress{min-width:24px;flex:1;height:9px;accent-color:#6be9d1}
.you7n-hud summary{cursor:pointer;color:#d0eee5}
.you7n-hud details span{display:block;padding:4px 0}
.you7n-toast{padding:3px 0;color:#aff9e5;font-weight:800}
.you7n-history{margin-top:6px;color:#cbefdf;font-size:.82rem}
.you7n-history summary{cursor:pointer}
.you7n-history ol{margin:5px 0 3px;padding-left:22px;max-height:140px;overflow:auto}
@media(max-width:650px){.you7n-hud{gap:2px;width:min(216px,57vw);padding:4px 5px;font-size:10px}.you7n-meter progress{height:7px}}

/* V0.9.10.7: two-companion party readout and independent pause details */
.party-hud{position:absolute;right:12px;top:102px;z-index:8;max-width:44%;padding:5px 9px;border-radius:9px;background:#161d25db;color:#d6ecfa;font-weight:700;font-size:12px;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.event-party-card{padding:10px 0;border-top:1px solid #657a8844}
.event-party-card:first-of-type{border-top:0}
@media(max-width:620px){.party-hud{font-size:10px;top:88px;right:5px;max-width:55%}}

.hud-resources { display:contents; }
.arena-wrap { --hud-edge:8px; }
.companion-hud { left:var(--hud-edge); }

/* V0.9.10.14: approved icons. All assets are transparent and share a fixed optical grid. */
.stat-icon{display:inline-block;width:18px;height:18px;object-fit:contain;vertical-align:middle;flex:0 0 auto}
.upgrade strong{display:flex;align-items:center;justify-content:center;gap:5px;flex-wrap:wrap}
.upgrade-icon-wrap{width:27px;height:27px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 27px}
.upgrade-icon-wrap .stat-icon{width:26px;height:26px}
.stat-name{display:inline-flex;align-items:center;gap:5px;min-width:0}
.stat-row .stat-name .stat-icon{width:16px;height:16px}
.stats-core>span>.stat-icon{width:14px;height:14px;margin-right:3px}
.stats-summary>span .stat-icon{width:13px;height:13px;vertical-align:-2px}
.logpaper-icon{display:inline-block;width:21px;height:21px;object-fit:contain;vertical-align:middle;flex:0 0 auto}
.paper strong::before{content:none!important}
.paper .logpaper-icon{width:22px;height:22px}
.shop-wallet>span{display:inline-flex;align-items:center;justify-content:center}
.shop-wallet .logpaper-icon{width:30px;height:30px}
.offer-actions [data-action="buy"],.phone-offer-actions [data-action="buy"]{display:flex;align-items:center;justify-content:center;gap:5px}
.offer-actions [data-action="buy"] .logpaper-icon{width:21px;height:21px}
.phone-offer-actions [data-action="buy"] .logpaper-icon{width:15px;height:15px}


/* V0.9.10.15: level-up header layout only. The legacy .upgrade>strong>span
   block/margin rule was positioning PNG icons below their stat names. */
.upgrade > strong.upgrade-title {
  display:flex; align-items:center; justify-content:flex-start; gap:8px;
  flex-wrap:nowrap; min-width:0; line-height:1.25;
}
.upgrade > strong.upgrade-title > .upgrade-icon-wrap {
  display:inline-flex; width:27px; height:27px; flex:0 0 27px;
  margin:0; font-size:inherit; align-items:center; justify-content:center;
}
.upgrade > strong.upgrade-title > .upgrade-stat-name {
  display:block; flex:1 1 auto; min-width:0; margin:0;
  font-size:inherit; font-weight:inherit; white-space:normal;
  overflow-wrap:anywhere;
}
.upgrade > strong.upgrade-title > .upgrade-icon-wrap .stat-icon {
  display:block; width:26px; height:26px; margin:0;
}


/* V0.9.10.27.1: centered Event Cache; bilingual switch beside Settings on all layouts. */
.event-heading{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;text-align:center}
.event-heading>.eyebrow,.event-heading>h2,.event-heading>p{width:100%;margin:0;text-align:center}
.event-heading>.event-icon{display:block;margin:0 auto;width:68px;height:68px;object-fit:contain}
.event-confirm{justify-content:center;flex-direction:column;text-align:center}
.event-confirm>span{text-align:center}
.desktop-locale{display:flex;align-items:center;gap:5px}
.desktop-options{position:relative;display:flex;align-items:center}
.desktop-settings{position:absolute;z-index:20;right:0;top:calc(100% + 5px);display:grid;grid-template-columns:auto minmax(110px,1fr);align-items:center;gap:7px;padding:9px;border:2px solid #858771;background:#242620;box-shadow:0 4px 0 #171713}
.desktop-settings label{font-size:11px;color:#eee8d2}
.desktop-settings select{min-height:34px}
.language-switch{min-width:42px;min-height:34px;padding:4px 8px;border:2px solid #8d9a7d;border-radius:3px;background:#33443a;color:#f4f1dc;font-weight:800}
[data-ui-mode=desktop][data-immersive=true] .desktop-locale{display:none}
@media(max-width:700px){.event-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* V0.9.10.27.3 — Brotato-inspired three-category codex and consistent Settings control. */
.main-menu-actions{display:flex;flex-direction:column;align-items:stretch;gap:9px;width:min(330px,100%);margin:18px auto 4px}
.main-menu-actions>button{width:100%;min-height:46px}
.main-menu-actions .codex-menu-button{background:#42443c;border-color:#171716;color:#f4f0df;font-size:15px;letter-spacing:.5px}
.main-menu-actions .codex-menu-button:hover{background:#5a5d50;border-color:#e6dfc8}
.desktop-options>summary{display:grid;place-items:center;list-style:none;width:30px;min-width:30px;height:30px;min-height:30px;padding:0;border:2px solid var(--black);border-radius:3px;background:#4c4b47;color:var(--text);font-size:15px;line-height:1;box-shadow:0 2px 0 #151514;cursor:pointer}
.desktop-options>summary::-webkit-details-marker{display:none}
.desktop-options>summary:hover,.desktop-options[open]>summary{background:#65635c;border-color:#e6dfc8}
.desktop-locale{gap:4px}
.language-switch{min-width:42px;min-height:30px;padding:3px 8px;border:2px solid var(--black);border-radius:3px;background:#4c4b47;color:var(--text);font-size:11px;box-shadow:0 2px 0 #151514}
.language-switch:hover{background:#65635c;border-color:#e6dfc8}
.codex-dialog{width:min(1240px,calc(100vw - 28px));height:min(820px,calc(100dvh - 28px));max-width:none;max-height:none;padding:0;overflow:hidden;border:4px solid #171716;border-radius:12px;background:#343832;color:#f5f1e6;box-shadow:0 7px 0 #151514}
.codex-dialog::backdrop{background:#101412df}
.codex-shell{display:flex;flex-direction:column;gap:10px;width:100%;height:100%;min-height:0;padding:14px;background:linear-gradient(145deg,#3d4138,#30352e)}
.codex-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto;padding:2px 2px 7px;border-bottom:3px solid #171716}
.codex-eyebrow{font-size:9px;font-weight:900;letter-spacing:2px;color:#c7c39f}
.codex-header h2{margin:2px 0 0;font-size:clamp(22px,3vw,32px);letter-spacing:1px}
.codex-header-actions{display:flex;align-items:center;gap:12px}
.codex-progress{font-size:12px;color:#d8d3b6;font-weight:800;white-space:nowrap}
.codex-header-actions button{width:38px;min-width:38px;height:38px;min-height:38px;padding:0;font-size:25px;line-height:1}
.codex-tabs{display:flex;align-items:stretch;gap:7px;flex:0 0 auto}
.codex-tabs button{flex:1;min-width:0;min-height:46px;padding:6px 10px;border:3px solid #171716;border-radius:8px 8px 3px 3px;background:#292b26;color:#e7e3d4;box-shadow:0 3px 0 #151514;font-size:14px;font-weight:900}
.codex-tabs button[aria-selected=true]{background:#648d50;color:#fff;border-color:#171716;transform:translateY(2px);box-shadow:0 1px 0 #151514}
.codex-content{display:grid;grid-template-columns:minmax(0,1.16fr) minmax(310px,.84fr);gap:11px;flex:1;min-height:0}
.codex-list-panel,.codex-detail{min-width:0;min-height:0;border:3px solid #171716;border-radius:8px;background:#292e28;box-shadow:inset 0 1px 0 #77786b}
.codex-list-panel{display:flex;flex-direction:column;overflow:hidden;container-type:inline-size}
.codex-list-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:36px;padding:5px 10px;background:#20241f;border-bottom:2px solid #171716}
.codex-list-heading strong{font-size:13px;letter-spacing:.5px}
.codex-list-heading span{font-size:11px;color:#c8c39f;font-variant-numeric:tabular-nums}
.codex-grid{--codex-columns:7;--codex-gap:7px;--codex-pad:9px;--codex-row:calc((100cqw - 60px) / 7);display:grid;grid-template-columns:repeat(var(--codex-columns),minmax(0,1fr));grid-auto-rows:var(--codex-row);align-content:start;gap:var(--codex-gap);min-height:0;overflow:auto;overscroll-behavior:contain;padding:var(--codex-pad)}
.codex-entry{display:grid;place-items:center;width:100%;height:100%;min-width:0;min-height:0;aspect-ratio:1;padding:5px;border:2px solid #171716;border-radius:6px;background:#41463c;box-shadow:0 2px 0 #171716;transition:background .12s,border-color .12s}
.codex-entry:hover{background:#555b4b;border-color:#aaa98d}
.codex-entry.is-selected{border-color:#e6d88d;outline:2px solid #e6d88d;outline-offset:1px;background:#505747}
.codex-entry .codex-art{display:block;width:100%;height:100%;max-width:68px;max-height:68px;object-fit:contain;object-position:center;pointer-events:none}
.codex-entry.is-locked .codex-art{filter:brightness(0) saturate(0);opacity:.92}
.codex-entry.is-locked{background:#373b34}
.codex-detail{overflow:auto;overscroll-behavior:contain;padding:14px;background:linear-gradient(155deg,#3a4238,#2c332d)}
.codex-empty-detail,.codex-locked-detail{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100%;text-align:center;padding:16px}
.codex-empty-detail{color:#b8b7a9}
.codex-detail-art{display:grid;place-items:center;width:138px;height:138px;margin:0 auto 13px;border:4px solid #171716;border-radius:13px;background:#42473e;box-shadow:0 4px 0 #171716}
.codex-detail-art .codex-art{width:82%;height:82%;object-fit:contain}
.codex-locked-detail .codex-silhouette{filter:brightness(0) saturate(0);opacity:.9}
.codex-locked-detail h3{margin:3px 0 8px;font-size:22px}
.codex-locked-detail p{max-width:330px;margin:0 0 12px;color:#d0cbb7;font-size:13px;line-height:1.6}
.codex-locked-detail small{color:#a8b99b;font-size:11px}
.codex-detail-hero{display:flex;align-items:center;gap:13px;min-height:116px;padding-bottom:12px;border-bottom:2px solid #171716}
.codex-detail-hero>.codex-art{flex:0 0 112px;width:112px;height:112px;object-fit:contain;padding:7px;border:3px solid #171716;border-radius:9px;background:#444a3e}
.codex-detail-hero h3{margin:4px 0;font-size:clamp(18px,2.1vw,25px);line-height:1.12;overflow-wrap:anywhere}
.codex-detail-hero small{color:#d4c995;font-size:11px}
.codex-detail-kicker{font-size:10px;font-weight:900;letter-spacing:1.5px;color:#c7d9a4}
.codex-detail-body{padding-top:12px}
.codex-detail-body .item-effect-lines{padding-left:19px;margin:0 0 12px}
.codex-detail-body .item-effect-lines li{margin:7px 0;font-size:13px;line-height:1.45}
.codex-limit-note{font-size:11px;color:#bdbba9}
.codex-companion-description{margin:0;color:#e3dfd1;font-size:13px;line-height:1.75;white-space:normal}
.codex-melos-skills{margin-top:13px;padding-top:10px;border-top:1px solid #666b5d}
.codex-melos-skills h4{margin:0 0 8px;color:#e1d7b0;font-size:12px;letter-spacing:.5px}
.codex-melos-skills ul{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;margin:0;padding:0;list-style:none}
.codex-melos-skills li{display:grid;grid-template-columns:34px minmax(0,1fr);gap:8px;align-items:start;padding:6px;background:#292f29;border:1px solid #51594d;border-radius:5px}
.codex-melos-skills li>img{width:30px;height:30px;object-fit:contain}
.codex-melos-skills li strong{display:block;color:#f0e8cf;font-size:11px;line-height:1.3}
.codex-melos-skills li small{display:block;margin-top:1px;color:#bcb9a7;font-size:9px}
.codex-melos-skills li p{margin:3px 0 0;color:#d5d2c4;font-size:10px;line-height:1.4}
.codex-weapon-unlocked{min-width:0}
.codex-weapon-unlocked>header{display:flex;align-items:center;gap:10px;padding-bottom:8px;border-bottom:2px solid #171716}
.codex-weapon-unlocked>header h3{margin:0;font-size:20px}
.codex-weapon-unlocked .weapon-model-preview{display:grid;place-items:center;min-height:82px;margin:8px 0;background:#252a24;border:2px solid #171716;border-radius:6px}
.codex-weapon-unlocked .weapon-model-preview img{width:130px;height:72px;object-fit:contain}
.codex-weapon-unlocked .weapon-tier-comparison{margin:8px 0;padding:7px;background:#252a24;border:1px solid #56594d;border-radius:5px}
.codex-weapon-unlocked .weapon-tier-comparison>summary{cursor:pointer;font-weight:800;font-size:12px}
.codex-weapon-unlocked .weapon-tier-comparison ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;padding:0;list-style:none}
.codex-weapon-unlocked .weapon-tier-comparison li{min-width:0;padding:5px;background:#363b32;font-size:10px}
.codex-weapon-unlocked .weapon-tier-comparison .weapon-tier-option{padding:0;border:0;background:none}
.weapon-tier-option>button{display:grid;align-content:start;gap:5px;width:100%;height:100%;min-width:0;padding:6px;text-align:start;font:inherit;color:inherit;background:#363b32;border:1px solid #637576;border-radius:6px;cursor:pointer}
.weapon-tier-option>button:hover{background:#424a3b}
.weapon-tier-option>button[aria-pressed="true"]{background:#4c503e;border-color:#e5d08c;box-shadow:inset 0 0 0 1px #e5d08c}
.weapon-tier-option>button:focus-visible{outline:2px solid #ffecaf;outline-offset:2px}
.codex-weapon-unlocked .weapon-tier-comparison li img{display:block;width:52px;height:32px;object-fit:contain}
.codex-weapon-unlocked .weapon-detail-columns{display:block;text-align:left}
.codex-weapon-unlocked .weapon-detail-columns>section{margin:9px 0;text-align:left}
.codex-weapon-unlocked .weapon-detail-columns dl{margin:0;text-align:left}
.codex-weapon-unlocked .weapon-detail-columns dl>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);justify-content:start;align-items:baseline;gap:10px;padding:4px 0;border-bottom:1px solid #55594f;font-size:11px;text-align:left}
.codex-weapon-unlocked .weapon-detail-columns dt{min-width:0;color:#d1cebf;text-align:left;justify-self:start;overflow-wrap:anywhere}
.codex-weapon-unlocked .weapon-detail-columns dd{min-width:0;margin:0;text-align:left;justify-self:start;overflow-wrap:anywhere}
.codex-weapon-unlocked .weapon-detail-columns>section+section{border-left:0;padding-left:0}
.codex-weapon-unlocked .weapon-detail-columns h4,.codex-weapon-unlocked .weapon-detail-columns dl{text-align:left}
.codex-weapon-unlocked .weapon-detail-columns h4{margin:8px 0 4px;font-size:11px}
.codex-weapon-unlocked .weapon-detail-note{font-size:10px;color:#bdbba9}
@media(max-width:800px){
  .codex-dialog{width:calc(100vw - 12px);height:calc(100dvh - 12px);border-width:3px;border-radius:8px}
  .codex-shell{gap:7px;padding:8px}
  .codex-header{padding-bottom:5px}
  .codex-header h2{font-size:21px}
  .codex-progress{font-size:10px}
  .codex-header-actions{gap:6px}
  .codex-header-actions button{width:36px;min-width:36px;height:36px;min-height:36px}
  .codex-tabs{gap:4px}
  .codex-tabs button{min-height:42px;padding:4px 3px;font-size:12px}
  .codex-content{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:6px}
  .codex-grid{--codex-columns:5;--codex-gap:4px;--codex-pad:5px;--codex-row:calc((100cqw - 26px) / 5)}
  .codex-entry{padding:3px;border-radius:4px}
  .codex-detail{padding:8px}
  .codex-detail-art{width:90px;height:90px;margin-bottom:8px}
  .codex-detail-hero{gap:7px;min-height:76px;padding-bottom:7px}
  .codex-detail-hero>.codex-art{flex-basis:72px;width:72px;height:72px;padding:4px}
  .codex-detail-hero h3{font-size:16px}
  .codex-detail-kicker{font-size:8px}
  .codex-locked-detail h3{font-size:17px}
  .codex-locked-detail p,.codex-companion-description{font-size:11px;line-height:1.45}
  .codex-melos-skills{margin-top:8px;padding-top:6px}.codex-melos-skills h4{font-size:10px;margin-bottom:5px}.codex-melos-skills ul{gap:4px}.codex-melos-skills li{grid-template-columns:27px minmax(0,1fr);gap:6px;padding:4px}.codex-melos-skills li>img{width:24px;height:24px}.codex-melos-skills li strong{font-size:9px}.codex-melos-skills li small{font-size:8px}.codex-melos-skills li p{font-size:9px;line-height:1.3}
  .codex-detail-body{padding-top:7px}
  .codex-detail-body .item-effect-lines li{font-size:10px;margin:5px 0}
  .codex-weapon-unlocked>header h3{font-size:15px}
  .codex-weapon-unlocked .weapon-model-preview{min-height:56px}
  .codex-weapon-unlocked .weapon-model-preview img{height:50px}
  .codex-weapon-unlocked .weapon-detail-columns dl>div{font-size:9px}
}
@media(max-width:480px){
  .codex-content{grid-template-columns:minmax(0,1fr) minmax(0,.92fr)}
  .codex-grid{--codex-columns:4;--codex-row:calc((100cqw - 22px) / 4)}
  .codex-progress{max-width:110px;white-space:normal;text-align:right}
}

/* V0.9.10.27.4 — wave restart actions. */
.pause-actions{display:flex;align-items:stretch;gap:8px;flex-wrap:wrap}
.pause-actions button{flex:1 1 130px;min-width:0;white-space:normal}
@media(max-width:650px){.pause-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.pause-actions button{width:100%;min-height:42px;padding:7px 6px;font-size:12px}.pause-actions #resumeBtn{grid-column:1/-1}}

/* V0.9.10.27.4 — desktop immersive uses the full content viewport with no top letterbox. */
@supports(height:100dvh){html[data-ui-mode=desktop][data-immersive=true] .main{top:0;height:var(--mobile-vh,100dvh);}}
html[data-ui-mode=desktop][data-immersive=true] .main{top:0;}

.player-account-menu{width:min(330px,100%);margin:12px auto 0;text-align:center;color:var(--muted)}
.player-account-menu p{margin:3px 0 7px}
.player-account-menu p:empty{display:none}
.player-account-menu button{min-height:40px;width:100%;margin-top:3px}
.player-account-dialog{width:min(460px,calc(100% - 24px));max-height:calc(100dvh - 24px);margin:auto;overflow:auto;padding:clamp(12px,4vw,22px);background:var(--panel);color:var(--text);border:4px solid var(--black);border-radius:3px}
.player-account-dialog::backdrop{background:#161714df}
.player-account-dialog h2{margin:0 0 8px}
.player-account-dialog p{margin:6px 0;color:var(--muted)}
.player-account-dialog form{display:grid;gap:6px;margin-top:10px}
#playerAccountId{width:100%;font-size:16px}
#playerAccountConfirmRow{display:flex;align-items:center;gap:8px}
#playerAccountConfirm{min-height:0;width:18px;height:18px;flex:none}
#playerAccountRisk,#playerAccountError,#playerAccountMemory{color:var(--gold)}
#playerAccountError:empty{display:none}
.player-account-dialog .action-row{margin:12px 0 0}
#playerAccountActions{display:contents}
.player-account-dialog [hidden]{display:none!important}

.hud-resources { --zau-shield-height:18px; }
.zau-shield-hud { position:relative; height:var(--zau-shield-height); width:100%; }
.health .zau-shield-hud progress {
  height:100%; width:100%; margin:0; border:2px solid #171716;
  accent-color:#ffcc33; appearance:none; background:#3a2e20;
}
.zau-shield-hud progress::-webkit-progress-bar { background:#3a2e20; }
.zau-shield-hud progress::-webkit-progress-value { background:#ffcc33; }
.zau-shield-hud progress::-moz-progress-bar { background:#ffcc33; }
.zau-shield-hud span {
  position:absolute; inset:0; display:grid; place-items:center;
  color:#fff4bd; font-size:12px; line-height:1; text-shadow:1px 1px #382a19,-1px -1px #382a19;
}
:root:not([data-compact-hud=true]) .has-zau-shield :is(.experience,.paper) { translate:0 var(--zau-shield-height); }
@media(max-width:800px) {
  .hud-resources { --zau-shield-height:14px; }
  .zau-shield-hud span { font-size:10px; }
}

.fuji-hud{display:grid;gap:3px;border-color:#9b7ec4;background:#211b34ed;font-variant-numeric:tabular-nums}
.fuji-hud>strong{color:#f4dfac}
.fuji-hud>progress{display:block;width:100%;height:8px;border:0;border-radius:4px;accent-color:#c4a3f4}
.fuji-hud>progress::-webkit-progress-bar{background:#3b2d52;border-radius:4px}
.fuji-hud>progress::-webkit-progress-value{background:#c4a3f4;border-radius:4px}
.fuji-hud>progress::-moz-progress-bar{background:#c4a3f4;border-radius:4px}

.codex-entry .codex-stamp-art,.codex-stamp-art{display:grid;place-items:center;color:#ecd695;font-size:clamp(21px,4vw,52px)}
 .codex-stamp-art.codex-silhouette{color:#77786d}
/* Five fixed columns. Every entry and paper mount has an explicit square box;
   the ink is contained inside it and never controls the card's intrinsic height. */
#codexDialog[data-category="stamps"] .codex-grid{
  --codex-columns:5;grid-template-columns:repeat(5,minmax(0,1fr));
  --stamp-gap:clamp(4px,1cqw,10px);--stamp-pad:clamp(6px,1.5cqw,14px);
  --stamp-cell:calc((100cqw - var(--stamp-pad) - var(--stamp-pad) - var(--stamp-gap) - var(--stamp-gap) - var(--stamp-gap) - var(--stamp-gap)) / 5);
  grid-auto-rows:var(--stamp-cell);gap:var(--stamp-gap);padding:var(--stamp-pad);align-items:start;
}
#codexDialog[data-category="stamps"] .codex-entry{
  display:grid;place-items:center;width:100%;height:100%;min-width:0;min-height:0;
  aspect-ratio:1;padding:3px;box-sizing:border-box;border:1px solid transparent;border-radius:3px;
  background:transparent;box-shadow:none;outline-offset:0;overflow:hidden;
}
#codexDialog[data-category="stamps"] .codex-entry:hover{background:#535a4c}
#codexDialog[data-category="stamps"] .codex-entry.is-selected{background:#535a4c;border-color:#bfae7d;outline:1px solid #bfae7d}
.stamp-paper{
  display:grid;place-items:center;position:relative;flex:none;
  width:100%;height:100%;min-width:0;min-height:0;aspect-ratio:1;box-sizing:border-box;overflow:hidden;
  isolation:isolate;background-color:#efe4cc;
  /* CSS-only perforation dots: no external mask/SVG can hide the paper or its image. */
  background-image:
    radial-gradient(circle at 5px 0,#343832 2px,transparent 2.35px),
    radial-gradient(circle at 5px 7px,#343832 2px,transparent 2.35px),
    radial-gradient(circle at 0 5px,#343832 2px,transparent 2.35px),
    radial-gradient(circle at 7px 5px,#343832 2px,transparent 2.35px),
    linear-gradient(135deg,#f7f0df 0%,#e9ddc5 100%);
  background-size:10px 7px,10px 7px,7px 10px,7px 10px,100% 100%;
  background-position:0 0,0 100%,0 0,100% 0,0 0;
  background-repeat:repeat-x,repeat-x,repeat-y,repeat-y,no-repeat;
}
.stamp-paper.is-undiscovered{
  background-color:#3b423a;
  background-image:
    radial-gradient(circle at 5px 0,#292f29 2px,transparent 2.35px),
    radial-gradient(circle at 5px 7px,#292f29 2px,transparent 2.35px),
    radial-gradient(circle at 0 5px,#292f29 2px,transparent 2.35px),
    radial-gradient(circle at 7px 5px,#292f29 2px,transparent 2.35px),
    linear-gradient(135deg,#454c43 0%,#363d35 100%);
  background-size:10px 7px,10px 7px,7px 10px,7px 10px,100% 100%;
  background-position:0 0,0 100%,0 0,100% 0,0 0;
  background-repeat:repeat-x,repeat-x,repeat-y,repeat-y,no-repeat;
}
.stamp-paper.is-undiscovered::before{border-color:#737a6a55}
.stamp-paper::before{content:"";position:absolute;z-index:0;inset:9%;border:1px solid #bcae9080;pointer-events:none}
.stamp-ink{
  position:absolute;z-index:1;inset:10%;display:block;width:80%;height:80%;max-width:80%;max-height:80%;
  object-fit:contain;object-position:center;pointer-events:none;
}
/* Portrait Venus artwork gets a slightly larger contain box, never a crop. */
.stamp-paper.is-venus .stamp-ink{inset:8%;width:84%;height:84%;max-width:84%;max-height:84%;object-fit:contain}
#codexDialog[data-category="stamps"] .codex-entry .stamp-paper{width:100%;height:100%;min-width:0;min-height:0}
/* Stamp details use a compact vertical stack: title first, artwork below. */
#codexDialog[data-category="stamps"] .codex-stamp-detail{display:grid;grid-template-rows:auto auto 1fr;align-content:start;gap:10px;min-width:0}
#codexDialog[data-category="stamps"] .codex-stamp-detail-heading{min-width:0;padding-bottom:10px;border-bottom:2px solid #171716}
#codexDialog[data-category="stamps"] .codex-stamp-detail-heading h3{margin:4px 0 0;font-size:clamp(18px,2vw,24px);line-height:1.15;overflow-wrap:anywhere}
#codexDialog[data-category="stamps"] .codex-stamp-detail-art{display:grid;place-items:center;width:min(100%,286px);aspect-ratio:1;margin:0 auto;min-width:0}
#codexDialog[data-category="stamps"] .codex-stamp-detail-art .stamp-paper{width:100%;height:100%}
#codexDialog[data-category="stamps"] .codex-stamp-detail .codex-detail-body{min-width:0;padding-top:2px}
@media(max-width:600px){
  /* Give the five-column stamp album the full dialog width on phones; keep details below it. */
  #codexDialog[data-category="stamps"] .codex-content{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(108px,26%);}
  #codexDialog[data-category="stamps"] .codex-grid{--stamp-gap:3px;--stamp-pad:5px}
  #codexDialog[data-category="stamps"] .codex-entry{padding:2px}
  #codexDialog[data-category="stamps"] .codex-detail{padding:7px}
  #codexDialog[data-category="stamps"] .codex-stamp-detail{gap:5px}
  #codexDialog[data-category="stamps"] .codex-stamp-detail-heading{padding-bottom:5px}
  #codexDialog[data-category="stamps"] .codex-stamp-detail-heading h3{font-size:15px}
  #codexDialog[data-category="stamps"] .codex-stamp-detail-art{width:min(100%,161px)}
  #codexDialog[data-category="stamps"] .codex-stamp-detail .codex-detail-body{padding-top:0}
}
.final-coordinates-dialog{width:min(420px,calc(100% - 32px));padding:24px;background:#232621;color:#f4f0df;border:2px solid #a99359;border-radius:9px;text-align:center}
.final-coordinates-dialog::backdrop{background:#10130fcc}
#finalCoordinatesValue{color:#f8d987;font-size:clamp(14px,4.4vw,22px);white-space:nowrap;font-variant-numeric:tabular-nums}
.main-menu-actions #finalCoordinatesBtn:disabled{opacity:.65;cursor:not-allowed}

.stamp-choice-grid,.custom-stamps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.stamp-choice-grid button,.custom-stamps button{padding:12px;white-space:normal;text-align:center}
.stamp-choice-grid button{display:grid;grid-template-rows:auto auto 1fr;align-content:start;justify-items:center;gap:6px}
.stamp-choice-grid .stamp-choice-paper{display:block;position:relative;width:min(100%,112px);height:auto;aspect-ratio:1;margin:0 auto 3px}
.stamp-choice-grid .stamp-choice-paper .stamp-ink{position:absolute;inset:10%;width:80%;height:80%;max-width:80%;max-height:80%;margin:0;object-fit:contain;object-position:center}
.stamp-choice-grid .stamp-choice-paper.is-venus .stamp-ink{inset:8%;width:84%;height:84%;max-width:84%;max-height:84%;margin:0;object-fit:contain}
.stamp-choice-grid button>strong{display:block;line-height:1.2}
.stamp-choice-grid button>p{margin:0;line-height:1.3}
.stamp-choice-grid img,.custom-stamps img{display:block;width:100%;height:110px;object-fit:contain;margin:auto}
.custom-stamps button[aria-pressed=true]{border-color:#eed78f;background:#46583f}
/* Venus is a companion-style active skill, anchored with the other active skills. */
.venus-hud{position:relative;width:min(220px,64vw);border-color:#cfad84;background:rgba(46,29,48,.82)}
.venus-heading img{padding:2px;background:#f2e8d5;border:1px solid #a89479;border-radius:5px}
.venus-heading strong{color:#ffe7c4}
.venus-heading span{color:#ffe9ba;font-weight:800}
#venusSkill{width:100%;background:rgba(105,56,80,.75);border-color:#dcb5b5;color:#fff0da}
#venusSkill:not(:disabled):is(:hover,:focus-visible){background:rgba(144,73,91,.95);outline:2px solid #fff2c9}
.held-stamp{width:28px;height:28px;object-fit:contain;vertical-align:middle}
@media(max-width:600px){.stamp-choice-grid{gap:5px}.stamp-choice-grid button{padding:6px}.stamp-choice-grid .stamp-choice-paper{width:min(100%,80px)}.stamp-choice-grid img{height:80px}.stamp-choice-grid p{font-size:12px}.custom-stamps{grid-template-columns:repeat(2,minmax(0,1fr))}.venus-hud{font-size:10px;touch-action:manipulation}}
@media(pointer:coarse){#venusSkill{min-height:44px}}


.venus-hud.is-newly-unlocked{animation:venus-unlock 1.2s ease-out 1}
#venusSkill:disabled{background:#47434a;border-color:#77717b;color:#b9b2bb;opacity:.72}
@keyframes venus-unlock{0%,35%{border-color:#fff4c9;background:#6d4b5a}100%{border-color:#cfad84;background:rgba(46,29,48,.82)}}
@media(prefers-reduced-motion:reduce){.venus-hud.is-newly-unlocked{animation:none;border-color:#fff4c9}}

/* V0.9.10.65 — consistent lock art for undiscovered companion characters. */
.codex-character-lock{display:grid;place-items:center;width:100%;height:100%;max-width:68px;max-height:68px;color:#d5d0b5;pointer-events:none}
.codex-character-lock svg{display:block;width:60%;height:60%;max-width:48px;max-height:48px;fill:#716e5c;stroke:#ded7bb;stroke-width:3.4;stroke-linecap:round;stroke-linejoin:round}
.codex-locked-detail .codex-character-lock{width:105px;height:105px;max-width:105px;max-height:105px}
.codex-locked-detail .codex-character-lock svg{max-width:70px;max-height:70px}
/* Center the visible Danger 1–5 numerals without font ascent/padding offset, on desktop and mobile. */
.danger-selector .danger-option{display:flex;align-items:center;justify-content:center;text-align:center;line-height:1;padding:0;font-variant-numeric:tabular-nums}

/* V0.9.10.66.3 — newly discovered enemy entries share companion lock tiles. */
.codex-enemy-description{margin:0 0 14px;line-height:1.65;font-size:13px;color:#e5e1d2}
.codex-enemy-body h4{font-size:12px;color:#d9d1a7;margin:12px 0 9px;letter-spacing:.4px}
.codex-enemy-stats{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.codex-enemy-stat{border:1px solid #596050;border-radius:6px;background:#292f29;padding:9px 10px;min-width:0}
.codex-enemy-stat dt{font-size:10px;color:#b6bea7;margin-bottom:4px}
.codex-enemy-stat dd{font-size:16px;font-weight:800;color:#efe5bb;margin:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.codex-enemy-note{margin:13px 0 0;font-size:11px;line-height:1.6;color:#b7b9ad}
@media(max-width:600px){.codex-enemy-stats{gap:5px}.codex-enemy-stat{padding:7px}.codex-enemy-stat dd{font-size:13px}}

/* V0.9.10.66.4: the same lock icon for items, enemies, companions and stamp paper. */
.stamp-paper.is-undiscovered .codex-character-lock{position:relative;z-index:1;width:64%;height:64%;max-width:68px;max-height:68px}
#codexDialog[data-category="stamps"] .codex-locked-detail .stamp-paper{width:min(100%,105px);height:auto;aspect-ratio:1;margin:auto}
/* Consistent, bold arcade numerals. Locks retain their existing glyph and position. */
.danger-digit{display:inline-block;font-family:"Arial Black","Arial",sans-serif;font-weight:900;font-variant-numeric:tabular-nums lining-nums;font-style:normal;line-height:1;letter-spacing:0;color:#fff2cf;-webkit-text-stroke:1.25px #27241d;paint-order:stroke fill;text-shadow:0 2px 0 #24211b,0 3px 2px #17151066}
.danger-selector .danger-digit{font-size:.94em}
.danger-symbol.danger-digit{color:#f4d975;-webkit-text-stroke:1.5px #27241d;text-shadow:0 3px 0 #211e17;line-height:1}
@media(max-width:800px){.danger-digit{-webkit-text-stroke:0.75px #27241d;text-shadow:0 1px 0 #24211b}}

/* V0.9.10.66.5: smaller Nano and Gecko Egg codex art, same slot sizes. */
.codex-entry .codex-art.codex-enemy-small{transform:scale(.7)}
.codex-detail-hero>.codex-art.codex-enemy-small{padding:21px}
@media(max-width:800px){.codex-detail-hero>.codex-art.codex-enemy-small{padding:13px}}

/* V0.9.10.66.6: profession reward preview and compact difficulty reward overview. */
.profession-card.profession-locked{background:#30312b;border-color:#57564a;}
.profession-card.profession-locked[aria-pressed=true]{border-color:var(--profession-accent);}
.profession-card.profession-locked .profession-card-icon{opacity:.55;filter:saturate(.55);}
.profession-lock-label{font-size:10px;color:#e3c578;line-height:1.25;max-width:100%;}
.danger-reward-overview{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;margin:0 auto 10px;}
.danger-reward-cell{display:grid;align-content:start;gap:4px;padding:6px 4px;border:1px solid #595342;background:#303128;text-align:center;min-width:0;overflow-wrap:anywhere;}
.danger-reward-cell.selected{border-color:#e5d18a;}
.danger-reward-cell small{font-size:10px;color:#d5cda9;}
.danger-reward-cell strong{font-size:11px;line-height:1.25;color:#ffe17b;}
@media(max-width:800px){.danger-reward-overview{grid-template-columns:repeat(3,minmax(0,1fr));}}

/* V0.9.10.66.7 — quality-only desktop control */
#desktopOptionsLabel{width:auto;min-width:64px;padding:0 9px;font-size:13px;height:34px;min-height:34px}

/* V1.0 Cache & Maintainer: existing Codex + right-hand LOADOUT panel. */
.codex-cache-description{white-space:pre-wrap;line-height:1.7;overflow-wrap:anywhere}
.result-loadout-category{margin-top:10px;border-top:1px solid #4b4a43;padding-top:7px}
.result-loadout-category>summary{display:list-item;min-height:26px;font-size:12px}
.result-loadout-list{list-style:none;margin:6px 0;padding:0;display:grid;gap:7px}
.result-loadout-list li{display:flex;align-items:center;gap:7px;min-width:0;font-size:11px}
.result-loadout-list img{flex:0 0 32px;width:32px;height:32px;object-fit:contain}
.result-loadout-list span{flex:1;min-width:0;overflow-wrap:anywhere}
.result-loadout-list b{flex:0 0 auto;white-space:nowrap;font-size:10px}
@media(max-width:700px){.codex-tabs{flex-wrap:wrap}.codex-tabs button{flex:1 0 28%}.result-loadout-list img{width:28px;height:28px;flex-basis:28px}}

/* V1.0.1 settlement placement: equipment belongs to the LEFT result column, never the right stats sidebar. */
#modal.with-stats[data-screen=complete]>.modal-main,#modal.with-stats[data-screen=dead]>.modal-main{grid-column:1;grid-row:1;min-width:0}
#modal.with-stats[data-screen=complete]>.stats-panel,#modal.with-stats[data-screen=dead]>.stats-panel{grid-column:2;grid-row:1}
@media(max-width:800px){
 #modal.with-stats[data-screen=complete]>.modal-main,#modal.with-stats[data-screen=dead]>.modal-main{order:0}
 #modal.with-stats[data-screen=complete]>.stats-panel,#modal.with-stats[data-screen=dead]>.stats-panel{order:1}
}
/* V1.0 settlement: main-panel loadout; independent of character stats disclosure. */
#modal[data-screen=complete] .result-equipment,#modal[data-screen=dead] .result-equipment{margin:14px 0 18px;padding:12px;background:#292926;border:2px solid #191917;min-width:0;text-align:left}
.result-equipment>h3{font-size:17px;margin:0 0 10px;color:var(--gold)}
.result-equipment-group{min-width:0;margin:0 0 12px}
.result-equipment-group:last-child{margin-bottom:0}
.result-equipment-group>h4{margin:0 0 6px;font-size:13px;color:var(--text);font-weight:700}
.result-equipment-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,136px),1fr));gap:6px}
.result-equipment-card{display:flex;align-items:center;gap:7px;min-width:0;padding:5px;background:#3c3c37;border:1px solid #57554b;border-left:3px solid var(--tier,#dfddd4);border-radius:3px}
.result-equipment-card>img{display:block;flex:0 0 44px;width:44px;height:44px;object-fit:contain}
.result-equipment-label{display:grid;gap:2px;min-width:0;flex:1;overflow-wrap:anywhere;line-height:1.3;font-size:12px;color:var(--text)}
.result-equipment-label>b{font-size:11px;color:var(--tier,var(--gold));white-space:nowrap}
.modal .result-equipment-empty{margin:0;color:var(--muted);font-size:12px}
@media(max-width:800px){#modal[data-screen=complete] .stats-panel,#modal[data-screen=dead] .stats-panel{order:0}.result-equipment-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,118px),1fr))}.result-equipment-card>img{flex-basis:38px;width:38px;height:38px}}


/* V1.0.2 settlement refinement: title/actions first, run data second, equipment last. */
#modal[data-screen=complete] .result-header,#modal[data-screen=dead] .result-header{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0;margin:0 0 14px}
.result-header-copy{display:grid;gap:3px;min-width:0;flex:1}
.result-header-copy>.test-badge{justify-self:start;float:none;margin:0 0 2px}
.result-header-copy .eyebrow{margin:0}
.result-header-copy h2{margin:0;font-size:clamp(25px,3vw,36px);line-height:1.12;overflow-wrap:anywhere}
.result-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:0 0 auto}
.result-header-actions button{width:auto;min-width:112px;min-height:42px;margin:0;padding:8px 11px;white-space:nowrap}
.result-header-actions button.primary{background:#a8cd65;color:#1d2818}
.result-subtitle{margin:0 0 12px}
.result-data{margin:0 0 14px;min-width:0}
.offer-actions button[data-action="buy"] .offer-blurry-log,.phone-offer-actions button[data-action="buy"] .offer-blurry-log{display:inline-block;width:18px;height:18px;min-width:18px;object-fit:contain;vertical-align:middle;margin-left:4px;pointer-events:none}
@media(max-width:800px){.phone-offer-actions button[data-action="buy"] .offer-blurry-log{width:15px;height:15px;min-width:15px;margin-left:3px}}
.result-death{margin:0 0 14px;padding:12px;background:#332b28;border:2px solid #191917;text-align:left;min-width:0}
.result-death>h3{margin:0 0 10px;font-size:17px;color:var(--gold)}
.result-death-body{display:flex;align-items:center;gap:14px;min-width:0}
.result-death-body>img{width:88px;height:88px;object-fit:contain;flex:0 0 88px}
.result-death-body>div{min-width:0;overflow-wrap:anywhere}
.result-death-source{font-size:16px;color:var(--text)}
.modal .result-death-damage{margin:8px 0 0;color:#ffb3a3;font-size:14px}
@media(max-width:800px){.result-death{padding:10px;margin-bottom:10px}.result-death-body>img{width:68px;height:68px;flex-basis:68px}.result-death-body{gap:10px}}
#modal[data-screen=complete] .result-equipment,#modal[data-screen=dead] .result-equipment{margin:0;padding:12px;background:#292926;border:2px solid #191917;min-width:0;text-align:left}
.result-equipment-card>.result-stamp-paper{display:grid;place-items:center;position:relative;flex:0 0 48px;width:48px;height:48px;min-width:0;min-height:0;aspect-ratio:1;overflow:hidden}
.result-equipment-card>.result-stamp-paper .stamp-ink{inset:10%;width:80%;height:80%;max-width:80%;max-height:80%;object-fit:contain}
/* Event Cache artwork has transparent PNG padding. Keep the detail frame fixed and zoom only the clipped inner artwork. */
.codex-entry .codex-art.codex-cache-event{transform:scale(1.4)}
.codex-detail-hero-art-frame{display:block;flex:0 0 112px;width:112px;height:112px;min-width:0;padding:7px;border:3px solid #171716;border-radius:9px;background:#444a3e}
.codex-detail-hero-art-viewport{display:block;width:100%;height:100%;overflow:hidden}
.codex-detail-hero-art-viewport>.codex-art{display:block;width:100%;height:100%;object-fit:contain}
.codex-cache-event-frame .codex-art{transform:scale(1.4)}
@media(max-width:800px){
 .codex-detail-hero-art-frame{flex-basis:72px;width:72px;height:72px;padding:4px}
 #modal[data-screen=complete] .result-header,#modal[data-screen=dead] .result-header{align-items:flex-start;gap:8px;margin-bottom:10px}
 .result-header-copy h2{font-size:clamp(22px,5.5vw,30px)}
 .result-header-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;min-width:106px}
 .result-header-actions button{min-width:0;min-height:36px;padding:6px 8px;font-size:11px}
 .result-data{margin-bottom:10px}
 .result-equipment-card>.result-stamp-paper{flex-basis:42px;width:42px;height:42px}
}

/* V1.0.13 — transparent, responsive GPS intro and realtime alert overlay. */
.wave-intro-layer{position:absolute;inset:0;z-index:1;overflow:hidden;pointer-events:none;background:transparent}
/* Defocus only; no brightness or saturation changes. HUD remains above the overlay. */
#gameRoot[data-state="intro"] #arena{filter:blur(clamp(1.5px,.24vw,3px))}
.wave-intro-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;aspect-ratio:auto;max-width:none;max-height:none;background:transparent}

/* Desktop first-run controls guide */
.controls-guide{max-width:440px}.controls-guide p{line-height:1.5;margin:12px 0}.controls-guide-keys{display:grid;gap:5px;margin:18px auto}.controls-guide-keys>div{display:flex;justify-content:center;gap:5px}.controls-guide kbd{display:grid;place-items:center;width:42px;height:42px;border:2px solid #a5a398;border-radius:5px;background:#262622;font:700 20px system-ui}.controls-guide button{margin-top:12px;width:100%}

/* Build 101019: a teaser only; never enters collection counters. */
.codex-skins-preview{display:none;}
.codex-dialog[data-category="skins"] .codex-list-panel,.codex-dialog[data-category="skins"] .codex-detail{display:none;}
.codex-dialog[data-category="skins"] .codex-content{display:flex;min-height:0;align-items:center;justify-content:center;}
.codex-dialog[data-category="skins"] .codex-skins-preview{display:block;font-size:clamp(20px,3vw,38px);font-weight:800;letter-spacing:.12em;color:#b9c4ca;text-align:center;}
.codex-tabs{flex-wrap:wrap;}

.four-bonds{font-size:12px;line-height:1.5;overflow-wrap:anywhere}.four-bonds p{margin:8px 0}.four-pause{max-width:100%;overflow-wrap:anywhere}.four-pause img{object-fit:contain}.stamp-choice-grid>button{min-width:0;overflow-wrap:anywhere}.stamp-choice-grid .four-bonds{max-height:220px;overflow-y:auto}

@media(max-height:500px){.stamp-choice-grid .stamp-choice-paper{width:min(100%,56px)}.stamp-choice-grid>button{padding:6px;gap:4px;max-height:calc(100dvh - 110px);overflow-y:auto;grid-template-rows:auto auto auto auto}.stamp-choice-grid .four-bonds{max-height:112px;font-size:11px}.stamp-choice-grid .four-bonds p{margin:4px 0}}

/* 101027: matching, read-only stamp series summaries in the existing pause inventory. */
.stamp-series-panel{max-width:100%;min-width:0;margin-top:12px;padding-top:10px;border-top:1px solid #686651;overflow-wrap:anywhere}
.stamp-series-icons{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:8px 0}
.stamp-series-icons img{object-fit:contain;flex:0 0 48px}
.venus-pause .is-unowned{opacity:.22;filter:brightness(.7)}
.venus-pause p{margin:6px 0}.venus-pause ul{margin:6px 0;padding-inline-start:20px}

.venus-pause .stamp-series-icons img{padding:3px;background:#eee4cd;border:1px dashed #aa9f84;box-sizing:border-box}

/* Tutorial pages share the existing modal and scroll area. */
.tutorial-screen{width:100%;max-width:900px;margin:0 auto;text-align:left}
.tutorial-screen h2{margin-bottom:18px}.tutorial-content{line-height:1.65;overflow-wrap:anywhere}
.tutorial-content h3{font-size:1.05rem;margin:0 0 6px}.tutorial-content section{margin:0 0 20px}
.tutorial-content p{margin:0 0 12px}.tutorial-submenus{display:grid;gap:12px}.tutorial-submenus button{width:100%;min-height:48px}
.tutorial-footer{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}.tutorial-footer button{min-height:44px}
.tutorial-flow{padding-left:1.6em}.tutorial-flow li{padding-left:6px;margin-bottom:18px}
.tutorial-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}
.tutorial-stats>div{padding:12px;border:1px solid #ffffff26;border-radius:10px;background:#ffffff08}
.tutorial-stats dt{display:flex;align-items:center;gap:8px;font-weight:700}.tutorial-stats img{object-fit:contain;flex:none}
.tutorial-stats dd{margin:8px 0 0}.tutorial-tip{margin-top:18px!important;padding:12px;border-left:3px solid #b8cf72}
@media(max-width:800px),(max-height:500px){.tutorial-stats{grid-template-columns:1fr}.tutorial-screen h2{font-size:1.3rem}.tutorial-content{font-size:.95rem}.tutorial-footer{margin-top:14px}}

.modal:has(>.tutorial-screen){width:min(900px,100%)}

/* Final-wave briefing shares the modal and its single scroll area. */
.modal-layer[data-mode=boss-briefing] .modal{width:min(1000px,100%)}
.boss-briefing{width:min(920px,100%);margin:auto;min-width:0}
.briefing-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.briefing-heading small{color:#f2c66b;letter-spacing:.12em}
.briefing-heading h2{margin:4px 0}
.briefing-heading button{min-width:44px;min-height:44px;font-size:24px}
.briefing-boss{color:#f1cd85;font-weight:700;margin:8px 0}
.boss-briefing h3{margin:6px 0}
#briefingTrigger,.briefing-hint{color:#bfcbb8;font-size:13px}
.briefing-stage{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);width:100%;aspect-ratio:16/9;max-height:42vh;min-height:160px;background:#17231c;border:1px solid #7a9074;display:grid;place-items:center;overflow:hidden;margin:12px 0;touch-action:pan-y}
.briefing-stage canvas{min-width:0;min-height:0;aspect-ratio:auto;display:block;width:100%;height:100%;object-fit:contain;touch-action:pan-y}
.briefing-controls{position:sticky;bottom:-1px;z-index:2;display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;background:#252820;padding:12px 4px 4px;border-top:1px solid #68765a}
.briefing-controls button{min-height:44px;min-width:86px}
.briefing-controls .primary{margin-left:auto}
#briefingCount{white-space:nowrap;min-width:4em;text-align:center}
@media(max-height:480px){.briefing-stage{max-height:44vh;min-height:140px}.briefing-controls{gap:6px;padding-top:7px}.briefing-controls button{min-width:68px}.boss-briefing h3{font-size:16px}}

/* Offscreen Cache hints are display-only and never intercept movement input. */
.cache-locator{position:absolute;inset:0;z-index:4;pointer-events:none;overflow:hidden}
.cache-locator[hidden]{display:none}
.cache-direction{position:absolute;width:48px;height:58px;transform:translate(-50%,-50%);display:grid;justify-items:center;align-content:start;color:#f6f5df;text-shadow:1px 1px 2px #111;font-size:12px}
.cache-direction img{width:32px;height:32px;object-fit:contain;background:#14251be8;border:2px solid #d4d9af;border-radius:50%;padding:3px}
.cache-direction b{position:absolute;right:-3px;top:-4px;border-radius:8px;background:#26351e;padding:0 3px}
.cache-direction small{font-size:11px;background:#152318dd;padding:0 4px;border-radius:4px}
.cache-direction i{position:absolute;left:37px;top:11px;line-height:1;font-style:normal;color:#ffdc92}
.cache-direction.is-warning img{border-color:#ff846d;background:#571c1c}
.cache-hint-setting{display:flex;gap:8px;align-items:center;font-size:13px;min-height:36px}
.cache-hint-setting input{width:18px;height:18px;flex:none}
.result-export-status{font-size:13px;color:#c8d7ba;white-space:normal}
.result-export-preview{padding:12px;border:1px solid #69785b;margin:12px 0}
.result-export-preview[hidden]{display:none}
.result-export-links{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.result-export-links a{display:inline-flex;align-items:center;min-height:44px;padding:7px 14px;background:#c5d485;color:#1c2b17;font-weight:bold}
.result-export-image{display:block;width:min(100%,540px);height:auto;margin:12px auto;user-select:auto;-webkit-user-select:auto;-webkit-touch-callout:default}

/* Item rewards show the Codex content directly, including live inventory counts. */
.reward-item-description{margin:12px 0;min-width:0;text-align:left;overflow-wrap:anywhere;}
.reward-item-description .item-ownership{padding:8px 10px;border:1px solid #737869;border-radius:5px;color:#e6dca9;}

/* Stamp rewards use the item reward presentation, with all candidates readable
   before one is claimed. Only the modal scrolls; cards do not clip their copy. */
.stamp-reward-grid{align-items:stretch;}
.stamp-reward-card{display:flex;flex-direction:column;min-width:0;padding:12px;border:2px solid #737869;border-radius:5px;background:#30322c;overflow-wrap:anywhere;}
.stamp-reward-card .codex-stamp-detail{flex:1;display:flex;flex-direction:column;gap:10px;}
.stamp-reward-card .codex-stamp-detail-heading h3{margin:4px 0;text-align:center;font-size:16px;line-height:1.3;}
.stamp-reward-card .codex-stamp-detail-art{width:min(112px,100%);aspect-ratio:1;margin:0 auto;}
.stamp-reward-card .codex-stamp-detail-art .stamp-paper{width:100%;height:100%;}
.stamp-reward-card .codex-stamp-detail-art .stamp-ink{width:80%;height:80%;max-width:80%;max-height:80%;}
.stamp-reward-card .codex-stamp-detail-art .is-venus .stamp-ink{width:84%;height:84%;max-width:84%;max-height:84%;}
.stamp-reward-card .codex-detail-body{padding-top:0;text-align:left;}
.stamp-reward-card .codex-detail-body>p{white-space:pre-line;line-height:1.5;}
.stamp-reward-grid .four-bonds{max-height:none;overflow:visible;}
.stamp-reward-card>button{display:block;width:100%;min-height:44px;margin-top:12px;}
@media(max-width:600px){.stamp-reward-grid{grid-template-columns:1fr;gap:10px;}.stamp-reward-card{padding:10px;}}
@media(max-height:500px) and (min-width:601px){.stamp-reward-card{padding:8px;}.stamp-reward-card .codex-stamp-detail-art{width:64px;}.stamp-reward-card .codex-stamp-detail-heading h3{font-size:14px;}.stamp-reward-card .codex-detail-body>p{font-size:12px;}}

.shop-item-ownership{display:block;padding:6px 2px;color:#e6dca9;font-size:12px;line-height:1.4;overflow-wrap:anywhere;}
.phone-offer-actions .shop-item-ownership{flex:1 0 100%;font-size:11px;}

.reward-item-description .item-ownership{display:block;}

/* 101053: fixed two-row shop weapon layout and independent aligned actions. */
.equipped-weapons.shop-weapon-loadout .gear-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:stretch;grid-auto-rows:1fr;}
.equipped-weapons.shop-weapon-loadout[data-weapon-columns="4"] .gear-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
.equipped-weapons.shop-weapon-loadout .gear-slot:not(.empty){display:grid;grid-template-rows:140px auto;align-content:start;}
.equipped-weapons.shop-weapon-loadout .gear-slot>[data-weapon-toggle]{height:140px;min-height:140px;padding:8px;box-sizing:border-box;}
.equipped-weapons.shop-weapon-loadout .gear-slot>[data-weapon-toggle]>span{display:block;white-space:normal;overflow-wrap:anywhere;line-height:1.25;font-size:12px;}
.equipped-weapons.shop-weapon-loadout .weapon-action-bar{width:100%;min-width:0;box-sizing:border-box;margin:0;padding:10px 8px 8px;border-top:1px solid #5c594f;border-bottom:0;}
.equipped-weapons.shop-weapon-loadout .weapon-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0;padding:0;border:0;align-items:stretch;}
.equipped-weapons.shop-weapon-loadout .weapon-actions button{display:grid;grid-template-rows:20px 28px;align-content:center;gap:3px;width:100%;height:auto;min-height:82px;min-width:0;box-sizing:border-box;padding:12px 4px;border:2px solid #b39b64;border-radius:3px;background:#464238;color:#f4dc97;box-shadow:none;text-align:center;white-space:normal;overflow-wrap:anywhere;word-break:normal;}
.equipped-weapons.shop-weapon-loadout .weapon-actions button .weapon-action-label{display:block;white-space:nowrap;font-size:13px;font-weight:800;line-height:20px;}
.equipped-weapons.shop-weapon-loadout .weapon-actions button .weapon-action-subline{display:block;min-height:28px;white-space:normal;overflow-wrap:anywhere;font-size:11px;line-height:14px;}
.equipped-weapons.shop-weapon-loadout .weapon-actions [data-action="combine"][data-combine-available="true"]{background:#566d32;border-color:#bbda74;color:#f1f8df;}
.equipped-weapons.shop-weapon-loadout .weapon-actions [data-action="combine"][data-combine-available="false"]{background:#33332e;border-color:#68665c;color:#a7a59a;opacity:1;cursor:pointer;}
.equipped-weapons.shop-weapon-loadout .weapon-actions button:focus-visible{outline:3px solid #f3db7e;outline-offset:2px;}

/* Mobile uses the same weapon-class labels and glyphs as desktop. */
.equipped-weapons .gear-slot .gear-classes{display:flex;justify-content:center;flex-wrap:wrap;gap:3px;max-width:100%;}
.equipped-weapons .gear-slot .gear-classes .weapon-class-tag{display:inline-flex;align-items:center;gap:3px;white-space:normal;overflow-wrap:anywhere;line-height:1.3;}
.equipped-weapons .gear-slot .gear-classes .weapon-class-tag>[aria-hidden]{display:inline;}
.weapon-combine-notice{width:min(380px,calc(100vw - 32px));max-height:calc(100dvh - 24px);overflow:auto;box-sizing:border-box;padding:22px;background:#363530;color:var(--text);border:3px solid #a99c68;border-radius:5px;text-align:center;}
.weapon-combine-notice::backdrop{background:#171715c9;}
.weapon-combine-notice h2{margin:0 0 14px;font-size:20px;}
.weapon-combine-notice p{margin:0 0 18px;font-size:14px;line-height:1.5;}
.weapon-combine-notice button{min-height:44px;min-width:110px;}
@media(pointer:coarse) and (min-height:501px){.equipped-weapons.shop-weapon-loadout .weapon-actions button{min-height:80px;padding-block:10px;}}
@media(max-height:500px) and (pointer:coarse){
 .equipped-weapons.shop-weapon-loadout .weapon-actions button{grid-template-rows:18px 26px;gap:2px;min-height:76px;padding:10px 3px;}
 .equipped-weapons.shop-weapon-loadout .weapon-actions button .weapon-action-label{font-size:12px;line-height:18px;}
 .equipped-weapons.shop-weapon-loadout .weapon-actions button .weapon-action-subline{min-height:26px;font-size:10px;line-height:13px;}
 .weapon-combine-notice{padding:16px;}
}
html[data-ui-mode="landscape"] .equipped-weapons:not(.shop-weapon-loadout) .gear-slot>[data-weapon-toggle]{height:auto;min-height:82px;}
html[data-device-class="tablet"] .equipped-weapons.shop-weapon-loadout .weapon-actions button{min-height:80px;padding-block:10px;}

/* 101055: one always-visible, six-section, four-column character dashboard. */
.modal-layer .modal.with-stats{grid-template-columns:minmax(0,1fr);gap:16px}
.modal-layer .modal.with-stats>.stats-panel{grid-column:1;grid-row:1;position:static;top:auto;width:100%;max-height:none;overflow:visible;align-self:stretch}
.modal-layer .modal.with-stats>.modal-main{grid-column:1;grid-row:2;min-width:0}
#modal.with-stats[data-screen=complete]>.modal-main,#modal.with-stats[data-screen=dead]>.modal-main{grid-column:1;grid-row:1}
#modal.with-stats[data-screen=complete]>.stats-panel,#modal.with-stats[data-screen=dead]>.stats-panel{grid-column:1;grid-row:2}
.stats-panel{position:static;max-height:none;overflow:visible;width:100%;padding:12px 14px}
.stats-disclosure{display:block}
.stats-summary{display:none!important}
.stats-content{max-height:none;overflow:visible;padding:0}
.stats-content h3{font-size:16px;margin:0 0 8px;color:#e8d391}
.stats-section{border-top:1px solid #4b4a43;padding-top:6px;margin-top:8px;min-width:0}
.stats-section>h4{font-size:11px;color:#d4c69b;margin:0 0 6px;letter-spacing:.5px}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.stats-card{display:flex;flex-direction:column;justify-content:space-between;gap:5px;min-width:0;min-height:60px;padding:7px 9px;background:#232320;border:1px solid #4b4a43;border-radius:3px}
.stats-card-label{display:flex;align-items:center;gap:5px;min-width:0;color:#bdb9aa;font-size:11px;line-height:1.25;overflow-wrap:anywhere}
.stats-card-label>span{min-width:0;overflow-wrap:anywhere}
.stats-card>strong{display:block;color:#f0ead7;font-size:17px;line-height:1.2;font-weight:800;overflow-wrap:anywhere}
.stats-card .stat-icon{width:16px;height:16px;object-fit:contain;flex:0 0 16px}
.stats-card .stat-active-effects{display:block;margin:0;color:#a7db64;font-size:9px;line-height:1.25;overflow-wrap:anywhere}
.stats-profession-section .profession-readout{display:flex;align-items:center;gap:8px;min-height:28px;margin:0;color:#d4e8a3;font-size:14px}
.profession-effects{margin-top:7px}
.profession-effects>h5,.stats-subheading{font-size:10px;color:#aaa79c;margin:6px 0 5px;letter-spacing:.3px}
.profession-effect-card{min-height:54px;background:#293329;border-color:#52624a}
.profession-effect-card>strong{color:#d9e9b9}
@media(max-width:800px){
 .modal-layer .modal.with-stats{display:flex;flex-direction:column;width:100%;max-height:calc(100dvh - 16px);gap:12px;padding:12px}
 .modal-layer .modal.with-stats>.stats-panel{order:-1;position:static;max-height:none;width:100%;padding:8px 9px;overflow:visible}
 .modal-layer .modal.with-stats>.modal-main{order:0}
 #modal.with-stats[data-screen=complete]>.modal-main,#modal.with-stats[data-screen=dead]>.modal-main{order:0}
 #modal.with-stats[data-screen=complete]>.stats-panel,#modal.with-stats[data-screen=dead]>.stats-panel{order:1}
 .stats-content{max-height:none;overflow:visible;padding:0}
 .stats-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
 .stats-card{min-height:54px;padding:5px 5px;gap:3px}
 .stats-card-label{font-size:9px;gap:3px}
 .stats-card>strong{font-size:14px}
 .stats-card .stat-icon{width:13px;height:13px;flex-basis:13px}
 .stats-section{margin-top:6px;padding-top:5px}
 .stats-section>h4{font-size:10px;margin-bottom:4px}
 .stats-profession-section .profession-readout{font-size:12px}
 .profession-effects>h5,.stats-subheading{font-size:9px}
}
@media(max-width:420px){
 .stats-grid{gap:3px}
 .stats-card{padding:4px 3px;min-height:50px}
 .stats-card-label{font-size:8px}
 .stats-card>strong{font-size:12px}
}


/* 101056: on desktop shop/pause screens, place the character dashboard after acquired items and stamps. */
.modal-layer .modal.with-stats.stats-after-inventory{grid-template-columns:minmax(0,1fr)}
.modal-layer .modal.with-stats.stats-after-inventory>.modal-main-inline-stats{grid-column:1;grid-row:1;min-width:0}
.modal-main-inline-stats>.stats-panel{position:static;top:auto;width:100%;max-height:none;overflow:visible;align-self:stretch;margin-top:18px}


/* 101057: the level-up screen keeps the upgrade choices first and the character dashboard below. */
#modal.with-stats[data-screen=level]>.modal-main{grid-column:1;grid-row:1;order:0;min-width:0}
#modal.with-stats[data-screen=level]>.stats-panel{grid-column:1;grid-row:2;order:1}

/* 101058: Earth/Cache reward choices precede the character dashboard on every device.
   Virtual Cache bonus upgrades use the existing level screen. */
#modal.with-stats:is([data-screen=earth-reward],[data-screen=cache-reward])>.modal-main{grid-column:1;grid-row:1;order:0;min-width:0}
#modal.with-stats:is([data-screen=earth-reward],[data-screen=cache-reward])>.stats-panel{grid-column:1;grid-row:2;order:1}

/* 101059: Event selection owns its layout independently of the stats dashboard. */
html[data-ui-mode=desktop] .modal-layer:is([data-mode=event],[data-mode=event-opening]){position:fixed;inset:0;z-index:10}
html[data-ui-mode=desktop] .modal-layer:is([data-mode=event],[data-mode=event-opening]) .modal{width:min(1120px,100%);max-height:calc(100dvh - 36px);min-width:0}
html[data-ui-mode=desktop] .modal-layer:is([data-mode=event],[data-mode=event-opening]) .event-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:800px){html[data-ui-mode=desktop] .modal-layer:is([data-mode=event],[data-mode=event-opening]) .event-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* 101063: desktop-only in-flow entry; the existing reroll stays at the right edge. */
.shop-pc-next{display:none}
html[data-ui-mode="desktop"] .shop-top{column-gap:22px}
html[data-ui-mode="desktop"] .shop-pc-next{display:flex;align-items:center;justify-content:center;align-self:stretch;flex-shrink:0;min-height:0;min-width:155px}


/* Keep desktop shop actions above the immersive arena toolbar. */
html[data-ui-mode="desktop"] .modal-layer[data-mode="economy"]:has(.shop-pc-next){z-index:13}

/* 101065: collection status uses the existing Codex, independent of current ownership. */
.offer-collection {font-size:10px;font-weight:600;letter-spacing:0;text-transform:none;}
.offer-collection.is-missing {color:#ffe29b;}
.offer-collection.is-collected {color:#c8c5b7;}
.offer-tier-collection {display:flex;flex-wrap:wrap;align-items:baseline;gap:3px;}
.offer-top .tier-tag {white-space:normal;text-align:right;}

.briefing-survival {padding:10px 12px;border-left:3px solid #d9896d;background:#402d27;color:#f4e5da;font-size:13px;line-height:1.6;}
.briefing-survival[hidden] {display:none;}
.briefing-layout,.briefing-info {display:contents;}
@media (max-height:520px) and (orientation:landscape) {
  html[data-ui-mode="landscape"] .boss-briefing {display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:6px;height:calc(var(--mobile-vh,100dvh) - 70px);min-height:220px;}
  html[data-ui-mode="landscape"] .briefing-heading h2 {font-size:20px;margin:0;}
  html[data-ui-mode="landscape"] .briefing-heading small {font-size:10px;}
  html[data-ui-mode="landscape"] .briefing-survival {margin:0;padding:5px 8px;font-size:11px;line-height:1.4;}
  html[data-ui-mode="landscape"] .briefing-layout {display:grid;grid-template-columns:minmax(150px,.8fr) minmax(0,1.6fr);gap:12px;min-height:0;}
  html[data-ui-mode="landscape"] .briefing-info {display:block;min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:5px;}
  html[data-ui-mode="landscape"] .briefing-info p {font-size:11px;line-height:1.5;margin:4px 0;}
  html[data-ui-mode="landscape"] .briefing-info h3 {font-size:15px;margin:4px 0;}
  html[data-ui-mode="landscape"] .briefing-stage {height:100%;min-height:0;max-height:none;aspect-ratio:auto;margin:0;}
  html[data-ui-mode="landscape"] .briefing-controls {position:static;padding:4px 0 0;gap:6px;}
}

/* 101076 desktop settings share the existing control texture and height. */
html[data-ui-mode=desktop] #desktopOptionsLabel{height:30px;min-height:30px;min-width:44px;font-size:22px;background:#4c4b47}
.desktop-settings{grid-template-columns:1fr;width:210px}.desktop-settings button{width:100%}
