@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Noto+Sans+KR:wght@400;500;600;700;800&display=swap');
:root{color-scheme:dark;--bg:#101619;--panel:#1a2327;--line:#354145;--text:#edf1ef;--muted:#a1afb3;--accent:#ffae70}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:'Noto Sans KR',sans-serif;font-size:16px}button,select{font:inherit}button{cursor:pointer;border:0;color:inherit}button:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button:disabled{opacity:.4;cursor:not-allowed}[hidden]{display:none!important}header{height:72px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(4vw,20px)}.brand{background:none;padding:0;font:800 28px 'Barlow Condensed',sans-serif;color:var(--accent);display:flex;gap:12px;align-items:center}.brand span{color:var(--text);letter-spacing:1px}.brand em{font-style:normal;font-weight:500;color:var(--accent)}nav{font-size:13px;color:#89989b;display:flex;gap:15px}nav i{font-style:normal;color:#536461}nav .current{color:var(--accent)}main{max-width:1280px;margin:auto;padding:26px max(4vw,20px) 24px}.screen-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;gap:16px}.eyebrow{font:600 13px 'Barlow Condensed',sans-serif;letter-spacing:2px;color:var(--accent)}h1,h2,h3,p{margin:0}h1{font-size:26px;letter-spacing:-.8px;margin-top:5px}h2{font-size:16px}h3{font-size:15px}p{color:var(--muted);line-height:1.8}.primary{background:var(--accent);color:#29211b;border-radius:7px;font-size:15px;font-weight:800;padding:13px 24px;min-width:170px;display:flex;align-items:center;justify-content:space-between;gap:30px}.primary:hover{background:#ffc49b}.primary span{font-size:12px}.secondary{background:#253034;border:1px solid #405052;border-radius:6px;padding:9px 14px;font-size:14px}.secondary:hover{background:#344241}.text-button{background:none;color:var(--muted);font-size:13px;padding:5px}.text-button:hover{color:#fff}.home-screen{min-height:min(680px,calc(100dvh - 130px));display:grid;grid-template-columns:1fr 1fr;gap:50px;align-items:center}.home-copy h1{font-size:clamp(36px,4.5vw,62px);line-height:1.3;margin:16px 0 24px;letter-spacing:-2px}.home-copy p{font-size:16px}.home-copy .primary{margin:30px 0 25px;max-width:260px}.home-meta{display:flex;gap:18px;font-size:13px;color:var(--muted)}.home-visual{max-width:470px;width:100%;justify-self:end}.preview-label{display:flex;justify-content:space-between;font:600 13px 'Barlow Condensed',sans-serif;letter-spacing:2px;margin-bottom:14px;color:var(--muted)}.preview-board{position:relative;aspect-ratio:1;background-color:#1a2d25;background-image:linear-gradient(#64796822 1px,transparent 1px),linear-gradient(90deg,#64796822 1px,transparent 1px);background-size:8% 8%;border:1px solid #52665b;border-radius:12px;box-shadow:0 30px 70px #0003}.preview-board:before{content:'';position:absolute;inset:7%;border:1px solid #6d8d692e}.preview-board:after{content:'ARENA';position:absolute;inset:40% 0;text-align:center;font:800 54px 'Barlow Condensed',sans-serif;letter-spacing:5px;color:#b7c9bb1c}.home-token{position:absolute;z-index:1;transform:translate(-50%,-50%);text-align:center}.home-token .portrait{width:64px;height:64px;border-width:3px;box-shadow:0 8px 25px #0008}.home-token span{display:block;margin-top:8px;font-size:12px;color:#bdcfc2}.preview-bottom{font-size:13px;text-align:center;color:var(--muted);margin-top:18px}.config-tabs{display:flex;gap:6px;border-bottom:1px solid var(--line);padding-bottom:10px;margin-bottom:16px}.config-tabs button{background:none;border-radius:6px;padding:10px 18px;color:var(--muted);font:600 14px 'Barlow Condensed',sans-serif;display:flex;align-items:center;gap:10px}.config-tabs button span{font:500 14px 'Noto Sans KR',sans-serif}.config-tabs button[aria-selected=true]{background:#32403d;color:var(--accent)}.config-tabs button b{background:#4e5b50;color:#fff;border-radius:4px;padding:1px 7px;font-size:13px}.config-panel{border:1px solid var(--line);background:var(--panel);padding:20px;border-radius:10px;min-height:400px}.roster-layout{display:grid;grid-template-columns:1.15fr 1fr;gap:24px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}.panel-heading>span{font-size:12px;color:var(--muted)}.panel-heading h2 b{color:var(--accent);margin-left:7px}.character-library{display:grid;grid-template-columns:1fr 1fr;gap:10px}.character-card{background:#202c30;border:1px solid #3b494b;padding:12px;border-radius:8px}.character-card-top{display:flex;align-items:center;gap:10px;margin-bottom:8px}.portrait{background-size:300% 200%;width:42px;height:42px;border-radius:50%;border:2px solid var(--color);flex-shrink:0}.role{font-size:12px;color:var(--color);margin-top:3px}.tags{display:flex;gap:5px;flex-wrap:wrap}.tag{font-size:12px;color:#c6d6d0;border:1px solid #54625e;padding:2px 6px;border-radius:4px;background:#23332c}.character-card-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:10px;font-size:12px;color:var(--muted);gap:8px}.add-character{background:#3e4c45;color:#ffd2ae;border:1px solid #687566;border-radius:5px;padding:5px 10px;font-size:13px;white-space:nowrap}.add-character:hover{background:#546053}.participants{border-left:1px solid var(--line);padding-left:24px}.hint{font-size:13px;margin:9px 0 14px}.participant-list{display:grid;gap:7px;min-height:290px;align-content:start}.participant-row{display:grid;grid-template-columns:36px 1fr 95px 26px;align-items:center;gap:10px;background:#152024;padding:8px;border-radius:6px}.participant-row .portrait{width:36px;height:36px}.participant-name{font-size:14px;font-weight:600;white-space:nowrap}.participant-name small{color:var(--muted);font-size:12px;font-weight:400;margin-left:5px}.remove-participant{background:none;color:#aebbb8;font-size:22px;padding:0}.participant-row select{width:100%;font-size:13px;padding:5px;border-radius:4px}.empty-list{font-size:14px;color:var(--muted);padding:50px 15px;text-align:center;border:1px dashed var(--line);border-radius:6px}.pagination{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:10px}.pagination button{background:#283632;width:28px;height:28px;border-radius:4px;font-size:22px;line-height:1}.pagination span{font:500 14px 'Barlow Condensed',sans-serif;color:var(--muted);min-width:40px;text-align:center}.config-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-top:18px}.config-footer p{font-size:13px}#validation{color:#ffaf9a;margin-top:3px}.choice-layout{display:grid;grid-template-columns:1fr 1fr;gap:40px;max-width:850px;margin:20px auto}.field-label{display:block;font-size:14px;margin:30px 0 8px}select{background:#132025;color:#e8efea;border:1px solid #51615f;border-radius:6px;padding:10px;width:100%;cursor:pointer}.map-card,.mode-card{text-align:center;padding:15px}.map-card p,.mode-card p{font-size:14px;margin-top:10px}.mini-map{max-width:210px;aspect-ratio:1;margin:0 auto 16px;display:flex;align-items:center;justify-content:center;background-color:#213e2d;background-image:linear-gradient(#6c926338 1px,transparent 1px),linear-gradient(90deg,#6c926338 1px,transparent 1px);background-size:20% 20%;border:1px solid #759372;border-radius:6px}.mini-map span{color:#b4c3ab55;font-size:35px}.mode-symbol{display:block;font-size:65px;color:var(--accent);margin:20px 0}.battle-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:24px;align-items:start}.arena-column{max-width:min(100%,calc(100dvh - 225px));width:100%;justify-self:center}.arena-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px;font-size:13px;gap:10px}.arena-top>span:first-child{color:#c6dfce}#clock{font:600 23px 'Barlow Condensed',sans-serif;letter-spacing:1px}#remaining{color:var(--muted)}.arena-wrap{position:relative;aspect-ratio:1;border:1px solid #52665b;border-radius:10px;overflow:hidden}canvas{display:block;width:100%;height:100%}.winner{position:absolute;inset:30% 10% auto;text-align:center;background:#14201ff0;border:1px solid var(--accent);padding:25px;border-radius:10px;box-shadow:0 20px 80px #0008}.winner h2{font-size:25px;margin:8px 0}.winner p{font-size:14px}.toolbar{display:flex;justify-content:space-between;align-items:center;padding-top:12px;gap:7px}.speeds{display:flex;background:#25312c;border-radius:5px;padding:3px}.speeds button{background:none;color:var(--muted);font:600 15px 'Barlow Condensed',sans-serif;padding:5px 10px;border-radius:3px}.speeds button.active{background:#4a5c50;color:#fff}.battle-sidebar{border:1px solid var(--line);background:var(--panel);border-radius:9px;padding:16px}.battle-stats{display:grid;gap:7px}.stat{background:#132024;border-radius:6px;padding:9px;display:flex;gap:10px;align-items:center}.stat .portrait{width:34px;height:34px}.stat.dead{opacity:.45}.stat.dead .portrait{filter:grayscale(1)}.stat-body{min-width:0;flex:1}.stat-top{display:flex;justify-content:space-between;gap:5px;font-size:13px}.stat-top span{color:var(--muted);font:500 14px 'Barlow Condensed',sans-serif}.hp{height:4px;background:#394742;border-radius:4px;margin-top:6px;overflow:hidden}.hp>div{height:100%;background:var(--color)}.stat-detail{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-top:4px;gap:4px}.stat-detail b{font-weight:400;color:#c8dcd1}.events-heading{border-top:1px solid var(--line);padding-top:14px;margin-top:14px;font-size:14px}.battle-log{margin-top:8px;min-height:95px}.log-entry{font-size:12px;color:var(--muted);margin:5px 0;line-height:1.5}.log-entry span{font:500 13px 'Barlow Condensed',sans-serif;color:#748e7b;margin-right:8px}@media(max-width:1000px){.roster-layout{grid-template-columns:1fr 1fr;gap:16px}.participants{padding-left:16px}.character-library{gap:7px}.character-card{padding:10px}.participant-row{grid-template-columns:30px 1fr 76px 18px;gap:5px}.participant-row .portrait{width:30px;height:30px}.character-card-bottom{flex-wrap:wrap}.character-card-bottom .add-character{width:100%}.battle-layout{grid-template-columns:minmax(0,1fr) 280px;gap:16px}.home-screen{gap:30px}.home-token .portrait{width:54px;height:54px}}@media(max-width:720px){header{height:60px}.brand{font-size:23px;gap:6px}nav{font-size:12px;gap:7px}main{padding-top:18px}.home-screen{grid-template-columns:1fr;gap:20px;min-height:0}.home-copy h1{font-size:36px;margin:12px 0}.home-copy p{font-size:14px}.home-copy .primary{margin:20px 0 15px}.home-visual{width:min(80%,330px);justify-self:center}.preview-label,.preview-bottom{display:none}.home-token .portrait{width:44px;height:44px}.home-token span{font-size:11px}.home-meta{margin-bottom:10px}.screen-title{margin-bottom:14px}h1{font-size:23px}.config-tabs{gap:3px;margin-bottom:10px}.config-tabs button{padding:8px 9px;gap:6px}.config-tabs button span{font-size:13px}.config-panel{padding:12px;min-height:0}.roster-layout{grid-template-columns:1fr;gap:14px}.panel-heading{margin-bottom:9px}.panel-heading>span{font-size:12px}.character-library{grid-template-columns:repeat(3,1fr)}.character-card{padding:8px}.character-card-top{flex-direction:column;gap:5px;text-align:center;margin-bottom:6px}.character-card .portrait{width:32px;height:32px}.character-card h3{font-size:13px}.character-card .role{font-size:11px;margin:1px 0}.tags{justify-content:center;gap:3px}.tag{font-size:11px;padding:1px 3px}.character-card-bottom{margin-top:7px}.character-card-bottom>span{display:none}.character-card-bottom .add-character{padding:4px;font-size:12px}.participants{padding:12px 0 0;border-left:0;border-top:1px solid var(--line)}.participants .hint{margin:4px 0 9px;font-size:12px}.participant-list{min-height:180px;gap:5px}.participant-row{grid-template-columns:28px 1fr 90px 26px;gap:8px;padding:6px}.participant-row .portrait{width:28px;height:28px}.pagination{margin-top:7px}.config-footer{padding-top:12px;gap:10px;align-items:flex-start}.config-footer p{font-size:12px}.config-footer .primary{min-width:130px;padding:11px 14px;gap:16px}.choice-layout{grid-template-columns:1fr;gap:5px;margin:0}.field-label{margin-top:15px}.mini-map{max-width:170px}.map-card,.mode-card{padding:8px}.battle-layout{grid-template-columns:1fr;gap:14px}.arena-column{max-width:min(100%,calc(100dvh - 205px));min-width:250px}.battle-sidebar{padding:12px}.battle-stats{grid-template-columns:1fr 1fr;gap:6px}.stat{padding:7px;gap:6px}.stat .portrait{width:26px;height:26px}.stat-top{font-size:12px}.stat-top span{font-size:12px}.stat-detail{font-size:11px}.battle-log{min-height:0}.events-heading{margin-top:10px;padding-top:9px}.battle-screen .screen-title .secondary{font-size:12px;padding:8px}.toolbar .secondary{font-size:12px;padding:8px}.winner h2{font-size:21px}}@media(min-width:721px) and (max-height:780px){main{padding-top:16px}.screen-title{margin-bottom:12px}.config-panel{padding:14px;min-height:350px}.character-card{padding:8px}.participant-row{padding:6px}.participant-list{min-height:260px}.config-footer{padding-top:12px}.battle-sidebar{padding:12px}.stat{padding:7px}.battle-log{min-height:65px}.battle-log .log-entry:nth-child(n+4){display:none}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
.mobile-switch{display:none}.arena-column{max-width:min(100%,calc(100dvh - 305px))}.battle-stats{line-height:1.4}.stat{padding:7px}.stat-detail{line-height:1.4}.battle-log{min-height:65px}.home-copy p{line-height:1.8}
@media(min-width:721px) and (max-height:780px){.character-card{padding:7px}.character-card-top{gap:8px;margin-bottom:5px}.character-card .portrait{width:34px;height:34px}.role{line-height:1.4;font-size:12px}.tag{line-height:1.4;padding:1px 5px}.character-card-bottom{margin-top:5px}.add-character{padding:3px 9px}.stat{padding:5px}.stat .portrait{width:30px;height:30px}.stat-top{line-height:1.3}.stat-detail{line-height:1.25;margin-top:3px}.hp{margin-top:4px}.battle-sidebar .panel-heading{margin-bottom:10px}.battle-log .log-entry{line-height:1.4;margin:4px 0}.battle-sidebar .events-heading{padding-top:10px;margin-top:10px}}
@media(max-width:720px){.mobile-switch{display:flex;gap:6px;margin-bottom:12px}.mobile-switch button{flex:1;background:#202d2e;color:var(--muted);font-size:13px;padding:8px;border-radius:5px;border:1px solid #3e4d4b}.mobile-switch button[aria-pressed=true]{background:#3a4c43;color:#ffe0c7;border-color:#687566}.mobile-switch span{margin-left:5px;color:var(--accent)}#panel-roster[data-view=library] .participants{display:none}#panel-roster[data-view=participants] .library{display:none}.participants{padding:0;border:0}.participant-list{min-height:220px}.character-library{gap:7px}.character-card-top{margin-bottom:5px}.character-card .role{line-height:1.4}.tag{line-height:1.4}.config-panel{min-height:315px}.config-footer{align-items:center}.arena-column{max-width:min(100%,calc(100dvh - 300px));min-width:0}.battle-screen[data-view=arena] .battle-sidebar{display:none}.battle-screen[data-view=status] .arena-column{display:none}.battle-stats{grid-template-columns:1fr}.stat{padding:10px}.stat .portrait{width:34px;height:34px}.stat-top{font-size:14px}.stat-top span{font-size:14px}.stat-detail{font-size:12px}.battle-log{min-height:0}.battle-screen .screen-title{margin-bottom:12px}.winner{inset:25% 5% auto;padding:16px}.config-footer #configSummary{max-width:190px}.home-visual{max-width:min(70vw,calc(100dvh - 355px))}.home-token .portrait{width:36px;height:36px}.home-token span{font-size:10px}}
.library-pagination{display:none}.brand{white-space:nowrap}
@media(min-width:721px) and (max-height:780px){.config-tabs{margin-bottom:12px;padding-bottom:8px}.config-panel{padding:12px}.screen-title{margin-bottom:9px}.character-card-top{margin-bottom:3px}.character-card .portrait{width:30px;height:30px}.character-card h3{font-size:14px;line-height:1.3}.character-card .role{line-height:1.3;margin-top:2px}.character-card-bottom{margin-top:3px;font-size:12px}.character-card{padding:6px}.tag{padding:0 4px}.config-footer{padding-top:10px}.battle-log .log-entry:nth-child(n+4){display:none}}
@media(max-width:720px){.library-pagination{display:flex}.config-panel{min-height:305px}.character-card{padding:8px 6px}.home-copy h1{margin-bottom:12px}.home-copy .primary{margin:16px 0 12px}.home-meta{font-size:12px;gap:14px}.home-token span{font-size:12px}}
@media(max-width:400px){header{padding-left:16px;padding-right:16px}.brand{font-size:20px;gap:5px}nav{font-size:11px;gap:4px}main{padding-left:16px;padding-right:16px}.config-tabs button{padding:8px 7px;gap:4px}.config-tabs button span{font-size:12px}.panel-heading>span{font-size:11px}.config-footer .primary{min-width:125px}.config-panel{min-height:290px}}
@media(max-width:720px) and (max-height:720px){.choice-layout{margin:0;gap:0}.choice-layout .field-label{margin-top:10px}.choice-layout .hint{font-size:12px;line-height:1.5;margin:6px 0}.map-card,.mode-card{padding:4px}.map-card p,.mode-card p{font-size:13px;line-height:1.5;margin-top:5px}.mini-map{max-width:95px;margin-bottom:8px}.mode-symbol{font-size:30px;margin:2px 0}.mode-card>.hint{display:none}.participant-list{min-height:172px}.home-copy h1{font-size:32px;margin:10px 0}.home-copy p{font-size:13px;line-height:1.6}.home-screen{gap:12px}.home-meta{margin-bottom:0}.home-visual{max-width:min(65vw,calc(100dvh - 375px))}.battle-log .log-entry:nth-child(n+4){display:none}}
.defense-tag{display:inline-block;color:#ffcd9b;font-size:12px;line-height:1.4;margin-top:5px;padding:2px 6px;background:#3d322a;border:1px solid #695443;border-radius:4px;cursor:help}.character-card-bottom{margin-top:6px}@media(max-width:720px){.defense-tag{display:block;width:fit-content;margin:5px auto 0;font-size:11px;padding:1px 4px}}@media(min-width:721px) and (max-height:780px){.defense-tag{padding:1px 5px;margin-top:3px;font-size:11px}.character-card-bottom{margin-top:3px}.character-card .tag{font-size:11px}}
@media(min-width:721px){.character-card{padding:9px}.character-card-top{margin-bottom:5px}.character-card .portrait{width:36px;height:36px}.role{line-height:1.4}.tag{line-height:1.4;padding:1px 5px}.defense-tag{margin-top:4px;padding:1px 5px}.character-card-bottom{margin-top:4px}.add-character{padding:4px 9px}}@media(min-width:721px) and (max-height:780px){.character-card{padding:5px 7px}.character-card-top{margin-bottom:2px}.character-card .portrait{width:28px;height:28px}.character-card h3{line-height:1.2}.role{font-size:11px;line-height:1.2}.tag{font-size:11px;line-height:1.2;padding:0 4px}.defense-tag{font-size:11px;line-height:1.2;margin-top:3px;padding:1px 4px}.character-card-bottom{margin-top:3px;line-height:1.2}.add-character{padding:3px 8px}}
.character-info{background:none;padding:0;font:inherit;font-weight:inherit;text-align:left}.character-info small{font-size:12px;color:#a7bbb2}.character-info:hover{color:var(--accent)}dialog{color:var(--text);background:#1a2629;border:1px solid #53665b;border-radius:12px;width:min(480px,calc(100vw - 32px));padding:24px;max-height:calc(100dvh - 40px);overflow:auto}dialog::backdrop{background:#07120ecc;backdrop-filter:blur(4px)}#closeCharacterInfo{position:absolute;top:12px;right:14px;background:none;font-size:25px;color:#c5d8ce}.info-header{display:flex;align-items:center;gap:14px;padding-right:25px}.info-header .portrait{width:55px;height:55px}.info-header p{font-size:13px;margin-top:4px}dialog dl{margin:20px 0 0}dialog dt{font-size:14px;font-weight:700;color:#ffcd9c;margin:15px 0 6px}dialog dd{margin:0;font-size:14px;line-height:1.7;color:#c3d1cb}dialog dd b{font-weight:600;color:#e1eae4}

.ultimate-meter{height:13px;margin:3px 0;position:relative;background:#22332d;border-radius:3px;overflow:hidden}.ultimate-meter i{position:absolute;inset:0 auto 0 0;background:linear-gradient(90deg,#715ca7,#c7a5ef)}.ultimate-meter span{position:relative;display:block;text-align:center;font-size:9px;line-height:13px;color:#fff}.stat{padding-top:8px;padding-bottom:8px}.stat-detail b{max-width:58%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

@media(min-width:721px) and (max-height:780px){.stat{padding-top:5px;padding-bottom:5px}main{padding-bottom:18px}.ultimate-meter{height:11px;margin:2px 0}.ultimate-meter span{line-height:11px}}

@media(max-width:720px) and (max-height:720px){main{padding-bottom:12px}.battle-sidebar{padding:10px}.stat{padding-top:7px;padding-bottom:7px}}

.log-entry{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.battle-log{max-height:125px;overflow:hidden}

#arena{image-rendering:pixelated}
.stat-detail>span{white-space:nowrap;flex-shrink:0}.stat-detail>b{min-width:0}
@media(min-width:721px) and (min-height:781px){.battle-sidebar .stat{padding-top:5px;padding-bottom:5px}}
.battle-log{max-height:80px;min-height:65px}.battle-log .log-entry:nth-child(n+4){display:none}
/* V8: spectator-first layout and prediction rounds. */
.home-modes{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:26px;max-width:510px}.mode-entry{padding:20px 18px;background:#202b2e;border:1px solid #4e605e;border-radius:10px;text-align:left}.mode-entry b{display:flex;justify-content:space-between;gap:16px;font-size:17px}.mode-entry small{display:block;color:#afbbb6;margin-top:9px;font-size:12px}.mode-entry:hover{border-color:var(--accent);transform:translateY(-2px)}.prediction-entry{background:#403025;border-color:#987052}.prediction-entry b{color:#ffbf8a}.prediction-hint{margin-bottom:24px}.prediction-choices{display:flex;justify-content:center;gap:20px}.prediction-card{background:#1c2729;border:2px solid #38484a;border-radius:12px;padding:24px;flex:1;max-width:370px;min-width:0;text-align:left}.prediction-card:hover,.prediction-card.selected{border-color:var(--team);background:color-mix(in srgb,var(--team) 8%,#182123)}.team-heading{display:flex;justify-content:space-between;color:var(--team);font-weight:800;font-size:22px}.team-heading i{font-style:normal}.prediction-members{display:flex;gap:14px;justify-content:center;margin:35px 0}.prediction-members>div{display:grid;justify-items:center;gap:8px;min-width:0}.prediction-members .portrait{width:72px;height:72px}.prediction-members b{font-size:14px}.prediction-members small{font-size:12px;color:var(--muted)}.prediction-tags{font-size:12px;color:var(--muted)}.prediction-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:24px}.prediction-footer p{font-size:13px}.prediction-verdict{font-size:22px;font-weight:800;color:#ffab89;margin-bottom:12px}.prediction-verdict.correct{color:#aff3ae}.prediction-verdict.draw{color:#ccd8d4}
body:has(#battleScreen:not([hidden])) header{height:48px}body:has(#battleScreen:not([hidden])) main{max-width:none;padding:8px 20px 10px}.battle-heading{display:flex;align-items:center;justify-content:space-between;max-width:1100px;margin:auto;height:38px;gap:12px}.battle-heading>span{color:#b1beb8;font-size:13px}.battle-heading .secondary{padding:7px 12px;font-size:12px}.battle-layout{display:block!important;margin:auto}.arena-column{width:min(100%,calc(100dvh - 178px));max-width:none!important;margin:0 auto}.arena-top{height:28px;padding:0 3px;font-size:12px}.arena-wrap{width:100%;aspect-ratio:1;position:relative;overflow:hidden;border-radius:4px}.toolbar{margin-top:7px;gap:10px;height:38px}.toolbar .secondary{padding:8px 12px;font-size:12px}.speeds button{padding:7px 12px}.battle-screen[data-view="status"] .arena-column{display:block!important}#battleDetails{width:min(420px,calc(100vw - 28px));max-height:calc(100dvh - 40px);overflow:auto;background:#172124;color:var(--text);border:1px solid #50615c;border-radius:12px;padding:20px}#battleDetails::backdrop{background:#070e15b0}#closeBattleDetails{background:none;font-size:26px;margin-left:auto}.battle-intro{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#0c151ae8;padding:22px;animation:introReveal .3s ease-out}.intro-matchup{display:flex;align-items:center;justify-content:center;gap:14px;width:100%;flex-wrap:wrap}.intro-team{flex:1;min-width:70px;text-align:center;color:var(--team)}.intro-team>b{display:block;font-size:clamp(16px,3vw,32px);margin-bottom:22px;font-weight:800}.intro-team>div{display:flex;justify-content:center;flex-wrap:wrap;gap:8px}.intro-team .portrait{width:clamp(38px,6vw,72px);height:clamp(38px,6vw,72px);box-shadow:0 0 0 2px var(--team)}.intro-vs{font:800 clamp(34px,7vw,80px) 'Barlow Condensed',sans-serif;color:#ffbc80;font-style:italic;text-shadow:4px 4px #7d3f24}.intro-caption{font-size:12px;color:#a9b8ad;position:absolute;bottom:10%}.many-teams{gap:12px}.many-teams .intro-team{flex:0 0 17%}.many-teams .intro-team>b{font-size:12px;margin-bottom:8px}.many-teams .portrait{width:26px;height:26px}.many-teams .intro-vs{font-size:18px}.cinema-bars{position:absolute;inset:0;border-top:24px solid #060c10cc;border-bottom:24px solid #060c10cc;pointer-events:none;z-index:2;animation:introReveal .15s ease-out}.winner{z-index:6}.winner h2{font-size:clamp(24px,4vw,38px)}@keyframes introReveal{from{opacity:0;transform:scale(1.03)}to{opacity:1;transform:scale(1)}}
@media(max-width:720px){.home-modes{gap:8px;margin-top:20px}.mode-entry{padding:15px 12px}.mode-entry b{font-size:15px;gap:6px}.mode-entry small{font-size:10px}.prediction-screen .screen-title{margin-bottom:12px}.prediction-screen h1{font-size:22px}.prediction-hint{font-size:12px;margin-bottom:14px}.prediction-choices{flex-direction:column;gap:10px}.prediction-card{max-width:none;padding:14px 16px;width:100%;position:relative}.team-heading{font-size:16px}.prediction-members{margin:12px 0 8px;gap:25px}.prediction-members>div{grid-template-columns:36px auto;grid-template-rows:auto auto;gap:1px 8px;align-items:center}.prediction-members .portrait{width:36px;height:36px;grid-row:1/3}.prediction-members b{font-size:12px;justify-self:start}.prediction-members small{font-size:10px;justify-self:start}.prediction-tags{font-size:10px}.prediction-footer{flex-wrap:wrap;margin-top:14px;gap:10px}.prediction-footer .primary{flex:1;min-width:0;padding:12px;font-size:13px;gap:8px}.prediction-footer .secondary{font-size:12px;padding:12px}.prediction-footer p{order:3;width:100%;text-align:center;font-size:12px}.prediction-members:has(>div:nth-child(3)){gap:10px}body:has(#battleScreen:not([hidden])) main{padding:6px 6px 8px}body:has(#battleScreen:not([hidden])) header{padding:0 14px;height:44px}.battle-heading{height:40px;gap:5px}.battle-heading>span{font-size:10px}.battle-heading .text-button{font-size:11px}.battle-heading .secondary{font-size:10px;padding:7px 9px}.arena-column{width:min(100%,calc(100dvh - 162px))!important;max-width:none!important}.arena-top{height:26px;font-size:10px}.toolbar .secondary{padding:8px;font-size:11px}.toolbar{gap:6px}.speeds button{font-size:11px;padding:7px 9px}.intro-matchup{gap:6px}.intro-team>b{font-size:16px;margin-bottom:14px}.intro-team .portrait{width:38px;height:38px}.intro-team>div{gap:6px}.intro-vs{font-size:38px}.battle-intro{padding:14px}.cinema-bars{border-width:15px}.prediction-verdict{font-size:20px}}
@media(prefers-reduced-motion:reduce){.battle-intro,.cinema-bars{animation:none}.mode-entry:hover{transform:none}}
.arena-top{margin-bottom:0}.toolbar{padding-top:0}
@media(max-width:720px) and (max-height:740px){body:has(#predictionScreen:not([hidden])) header{height:48px}body:has(#predictionScreen:not([hidden])) main{padding:12px}.prediction-screen .screen-title{margin-bottom:8px}.prediction-screen h1{font-size:20px}.prediction-hint{font-size:11px;margin-bottom:10px}.prediction-choices{gap:8px}.prediction-card{padding:10px 14px}.team-heading{font-size:15px}.prediction-members{margin:8px 0 4px}.prediction-tags{font-size:9px}.prediction-footer{margin-top:10px;gap:7px}.prediction-footer p{font-size:11px;line-height:1.5}.prediction-footer .primary,.prediction-footer .secondary{padding:10px}}
/* V9: emoji combatants and a focused game start screen. */
.portrait{background-image:none!important;background:#26352d;display:flex;align-items:center;justify-content:center;font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:30px;line-height:1;overflow:hidden}.character-card .portrait{font-size:34px}.participant-row .portrait,.stat .portrait{font-size:25px}.prediction-members .portrait{font-size:42px}.intro-team .portrait{font-size:44px}.many-teams .portrait{font-size:17px}.info-header .portrait{font-size:38px}.brand small{font-size:18px;color:#c6d0c9;font-weight:600;letter-spacing:1.5px}.home-screen{display:flex;justify-content:center;align-items:center;min-height:min(620px,calc(100dvh - 160px));text-align:center}.home-copy{max-width:650px}.home-copy h1{font-size:clamp(36px,5vw,60px);line-height:1.25}.home-copy>p{margin-top:20px}.home-modes{margin:32px auto 0;max-width:600px}.home-meta{justify-content:center;margin-top:20px}.home-modes .mode-entry{padding:24px;text-align:left}.home-modes .mode-entry b{font-size:20px}.home-modes .mode-entry small{font-size:14px}.home-copy .eyebrow{font-size:14px}
@media(max-width:720px){.brand{font-size:19px;gap:6px}.brand small{font-size:11px;letter-spacing:.5px}.brand span{letter-spacing:.5px}header{padding:0 12px}nav{font-size:10px;gap:7px}.home-screen{min-height:calc(100dvh - 145px)}.home-copy h1{font-size:36px}.home-copy>p{font-size:13px;margin-top:16px}.home-modes{margin-top:24px;grid-template-columns:1fr;gap:12px;max-width:330px}.home-modes .mode-entry{padding:20px}.home-modes .mode-entry b{font-size:19px}.home-modes .mode-entry small{font-size:13px}.home-meta{font-size:11px;margin-top:20px}.prediction-members .portrait{font-size:25px}.intro-team .portrait{font-size:26px}.many-teams .portrait{font-size:17px}}
/* V10: paginated nine-character catalog and ammunition/duel status. */
.library-pagination{display:flex}.character-card-top>div:last-child{min-width:0}.character-info{font-size:14px;line-height:1.3;overflow-wrap:anywhere}.character-card-bottom>span{max-width:65%;font-size:11px;line-height:1.5}.special-meter{font-size:11px;line-height:1.5;color:#d8c4a5;margin-top:4px;min-height:17px}.stat-top b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:65%}.participant-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.prediction-members b{max-width:90px;overflow-wrap:anywhere}.prediction-tags{display:block;white-space:normal}.intro-team>b{overflow-wrap:anywhere}
@media(max-width:720px){.character-info{font-size:13px}.character-card .portrait{font-size:25px}.participant-name{font-size:12px}.special-meter{font-size:10px}.prediction-members b{max-width:70px}.intro-team>b{font-size:13px}.many-teams .intro-team>b{font-size:10px}}
@media(min-width:721px){.character-library{grid-template-columns:repeat(3,minmax(0,1fr))}.character-card-top{flex-wrap:wrap;gap:7px}.character-card-bottom{flex-wrap:wrap}.character-card-bottom .add-character{width:100%}.character-card-bottom>span{max-width:100%;min-height:17px}.character-card .tag{font-size:10px;padding:2px 5px}.character-card .tags{gap:4px}.character-card .defense-tag{font-size:10px}}
/* V12: a stationary combat HUD, independent of the finishing camera. */
.home-headline-line{white-space:nowrap}.kill-overlay{position:absolute;inset:0;z-index:4;pointer-events:none;overflow:hidden}.kill-feed{position:absolute;right:12px;top:84px;width:min(290px,47%)}.kill-row{position:absolute;inset:0 0 auto;min-width:0;height:34px;display:grid;grid-template-columns:minmax(0,1fr) 26px minmax(0,1fr);align-items:center;background:#0d171deb;border:1px solid #536359;border-radius:4px;box-shadow:0 2px 8px #0004;padding:3px 5px;will-change:transform,opacity}.kill-unit{display:flex;align-items:center;gap:5px;min-width:0;line-height:1.1}.kill-unit>i{display:flex;align-items:center;justify-content:center;width:24px;height:24px;flex:0 0 24px;background:#26352d;border:1px solid var(--kill-color);border-radius:50%;font:normal 18px 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif}.kill-unit>span{display:flex;align-items:baseline;gap:3px;min-width:0}.kill-unit b{font-size:12px;font-weight:600;color:var(--kill-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kill-unit small{font-size:10px;color:#d4dcd4;flex-shrink:0}.kill-sword{text-align:center;font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:18px}.kill-row>.kill-unit:last-child{flex-direction:row-reverse;text-align:right}.multi-kill{position:absolute;top:10px;left:50%;width:max-content;max-width:70%;text-align:center;padding:0 18px;color:#ffe5b1;filter:drop-shadow(0 3px 2px #07100e);will-change:transform,opacity}.multi-kill-unit{display:flex;justify-content:center;margin-bottom:2px}.multi-kill-unit .kill-unit b{font-size:12px}.multi-kill-unit .kill-unit>i{width:20px;height:20px;flex-basis:20px;font-size:15px}.multi-kill>strong{display:block;font-size:clamp(24px,4vw,38px);font-weight:900;line-height:1.05;letter-spacing:1px;color:#fff0c6;text-shadow:1px 2px #653f24}.multi-kill-ticks{display:flex;justify-content:center;gap:3px;margin-top:5px}.multi-kill-ticks i{display:block;width:15px;height:3px;transform:skewX(-22deg);background:var(--multi-color,#ffb67d);box-shadow:0 0 4px #ffd7a64d}
@media(max-width:720px){.home-copy h1{font-size:clamp(26px,7.2vw,34px);letter-spacing:-1px}.kill-feed{right:6px;top:58px;width:48%}.kill-row{height:29px;grid-template-columns:minmax(0,1fr) 19px minmax(0,1fr);padding:2px 3px}.kill-unit{gap:3px}.kill-unit>i{width:19px;height:19px;flex-basis:19px;font-size:14px}.kill-unit b{font-size:10px}.kill-unit small{font-size:9px}.kill-unit>span{gap:2px}.kill-sword{font-size:14px}.multi-kill{top:7px;padding:0 10px}.multi-kill>strong{font-size:24px}.multi-kill-unit .kill-unit b{font-size:10px}.multi-kill-unit .kill-unit>i{width:16px;height:16px;flex-basis:16px;font-size:12px}.multi-kill-ticks{margin-top:4px}.multi-kill-ticks i{width:11px;height:2px}}

/* V14: a map-first deployment board with an unrestricted shopping deck. */
body:has(#setupScreen:not([hidden])) header{height:48px}
body:has(#setupScreen:not([hidden])) main{max-width:1400px;padding:10px 24px}
.deployment-screen{height:calc(100dvh - 68px);min-height:470px;display:flex;flex-direction:column;gap:10px}
.deployment-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}
.deployment-heading h1{font-size:20px;margin:0;letter-spacing:0}
.deployment-heading>button{min-width:92px;font-size:14px}
.deployment-budget{background:#192321;border:1px solid #354a40;border-radius:6px;padding:8px 12px;display:flex;gap:20px;align-items:center;flex-shrink:0}
.budget-caption{display:flex;flex-direction:column;gap:2px;min-width:105px;font-size:12px;color:var(--muted)}
.budget-caption b{font-size:14px;font-weight:600;color:#ffe2b4}
.team-costs{flex:1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.team-costs>div{display:flex;align-items:center;justify-content:center;gap:10px;color:var(--team);font-size:14px}
.team-costs b{color:#f1e9d8;font-family:'Barlow Condensed',sans-serif;font-size:20px;letter-spacing:.3px;font-variant-numeric:tabular-nums}
.team-costs small{font-size:12px;color:#a9b9ab}
.setup-map-stage{flex:1;min-height:120px;container-type:size;display:grid;place-items:center}
.deployment-map{width:min(100cqw,100cqh);height:min(100cqw,100cqh);position:relative;isolation:isolate;background-color:#1a2d25;background-image:linear-gradient(#64796822 1px,transparent 1px),linear-gradient(90deg,#64796822 1px,transparent 1px);background-size:5% 5%;border:1px solid #52665b;border-radius:4px;box-shadow:0 12px 40px #0002}
#placementSurface{position:absolute;inset:0;width:100%;height:100%;background:none;cursor:crosshair;border-radius:4px}
#placementSurface:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.map-boundary{position:absolute;inset:2.5%;border:1px solid #75957255;pointer-events:none}
.placed-units{position:absolute;inset:0;pointer-events:none}
.placed-unit{position:absolute;width:6.75%;aspect-ratio:1;min-width:calc(24px * var(--unit-scale,1));transform:translate(-50%,-50%);border:2px solid var(--unit);border-radius:50%;background:#21362c;display:flex;align-items:center;justify-content:center;pointer-events:auto;box-shadow:0 3px 0 #09161088;padding:0;color:var(--unit);container-type:inline-size}
.placed-unit>span{font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:clamp(17px,1.8vw,27px);font-size:75cqw;line-height:1}
.placed-unit small{position:absolute;top:110%;left:50%;transform:translateX(-50%);font:600 12px 'Barlow Condensed',sans-serif;white-space:nowrap;background:#101c18ba;padding:0 3px;border-radius:2px;line-height:1.2;pointer-events:none}
.placed-unit:hover{background:#405647;box-shadow:0 0 0 4px #dfeae327}
.placed-unit[data-movable]{touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}
.placed-unit.dragging{cursor:grabbing;z-index:5;box-shadow:0 0 0 5px #dfeae345,0 8px 16px #0007}
.placed-unit.drop-blocked{border-color:#ff9b7f;background:#6d392e}
.guild-ranked-portrait{position:relative;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center}
.guild-star-badge{position:absolute;bottom:-4px;left:50%;transform:translateX(-50%);font-size:10px;line-height:1;font-style:normal;white-space:nowrap;text-shadow:0 1px 3px #000}
.promotion-rule{font-size:12px;color:#dacba7;flex-shrink:0;margin-bottom:10px}
.promotion-selected{display:flex;align-items:center;justify-content:center;gap:9px;flex-shrink:0;margin-bottom:14px}
.promotion-selected>button,.promotion-empty{width:66px;height:72px;background:#263329;border:1px solid #706b4b;border-radius:7px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}
.promotion-selected small{font-size:10px;color:#d4c296}.promotion-empty{color:#7c8272;font-size:24px;border-style:dashed}.promotion-arrow{color:#e8c178}.promotion-result{display:flex;flex-direction:column;align-items:center;gap:8px}.promotion-result .portrait{border-color:#e7bf71}.promotion-result>span{font-size:32px}
.promotion-guild{flex:1;min-height:0;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:8px;align-content:start;padding:4px}
.promotion-member{display:flex;flex-direction:column;align-items:center;gap:7px;padding:13px 8px;border:1px solid #465949;border-radius:7px;background:#1c2a22}.promotion-member b{font-size:12px}.promotion-member small{font-size:10px;color:#aeb9a3}.promotion-member.selected{border-color:#f5be77;background:#3e3726;box-shadow:0 0 0 1px #f5be77}.promotion-member .unit-mini-vitals{width:68px;min-height:10px}.promotion-member:disabled{opacity:.35}
.promotion-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:12px;flex-shrink:0}.promotion-footer>span{font-size:12px;color:#d5c99f}.promotion-footer .primary{min-width:115px}
.tower-scene[data-kind=promotion]{background:radial-gradient(ellipse at center,#695323cc,#070d0ff0 65%);pointer-events:auto}.tower-scene[data-kind=promotion] .tower-scene-icon{font-size:56px;line-height:1;width:200px;height:110px}.promotion-fusion{position:relative;display:block;width:100%;height:100%}.promotion-fusion i{position:absolute;top:25px;left:calc(50% - 30px);font-style:normal;animation:promotion-center 3s both}.promotion-fusion i:first-child{--fusion-x:-85px}.promotion-fusion i:nth-child(2){--fusion-x:0px}.promotion-fusion i:nth-child(3){--fusion-x:85px}.promotion-fusion b{position:absolute;top:0;left:0;width:100%;font-size:32px;animation:promotion-stars 3s both}.tower-scene[data-kind=promotion] .tower-scene-content{filter:drop-shadow(0 0 22px #f5c36c55)}
@keyframes promotion-center{0%,15%{transform:translateX(var(--fusion-x)) scale(.7);opacity:.5}45%{transform:translateX(0) scale(.9);opacity:1}55%{transform:translateX(0) scale(1.5);filter:brightness(2.5)}75%,100%{transform:translateX(0) scale(1.05);opacity:1;filter:brightness(1)}}
@keyframes promotion-stars{0%,48%{transform:translateY(35px) scale(.1);opacity:0}68%{transform:translateY(0) scale(1.3);opacity:1}85%,100%{transform:translateY(0) scale(1);opacity:1}}
@media(max-width:720px){.promotion-selected{gap:5px;margin-bottom:8px}.promotion-selected>button,.promotion-empty{width:48px;height:58px}.promotion-selected .portrait{width:31px;height:31px;font-size:25px}.promotion-result{max-width:70px}.promotion-guild{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.promotion-member{padding:10px 5px;gap:5px}.promotion-member .portrait{width:32px;height:32px;font-size:26px}.promotion-footer>span{font-size:10px}}
@media(prefers-reduced-motion:reduce){.promotion-fusion i,.promotion-fusion b{animation:none}.promotion-fusion i{transform:none}.promotion-fusion b{opacity:1}}
.deployment-map[data-tool=eraser] .placed-unit{cursor:crosshair}
.deployment-map[data-tool=eraser] .placed-unit:hover{border-color:#ff9b7f;background:#6d392e;box-shadow:0 0 0 4px #ff9b7f45}
.placement-cursor{position:absolute;transform:translate(-50%,-50%);font-size:30px;color:#ffcc8c;pointer-events:none}
.deployment-deck{flex-shrink:0;min-width:0;border-top:1px solid #354a40;padding-top:8px}
.deck-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}
.placement-teams{display:flex;gap:6px}
.placement-team{background:#1d2828;border:1px solid #3d4a44;border-radius:5px;padding:7px 13px;color:var(--team);font-size:14px;white-space:nowrap}
.placement-team small{font-family:'Barlow Condensed',sans-serif;opacity:.7;font-size:12px;margin-right:2px}
.placement-team[aria-pressed=true]{background:color-mix(in srgb,var(--team) 18%,#182321);border-color:var(--team);box-shadow:inset 0 -2px var(--team);color:#fff}
.placement-tools{display:flex;gap:6px}
.placement-tool{border:1px solid #4f5045;background:#282e28;padding:7px 12px;border-radius:5px;font-size:14px;white-space:nowrap}
.placement-tool[aria-pressed=true]{background:#694739;border-color:#ffb388;color:#ffd9ae;box-shadow:inset 0 -2px #ffb388}
.deployment-cards{display:flex;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#657163 #17221d;padding:0 0 7px;min-width:0}
.deployment-card{flex:0 0 116px;min-height:116px;background:#1d2928;border:1px solid #45544a;border-radius:6px;padding:9px 6px 7px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:6px;transition:background .12s,border-color .12s}
.deployment-card>b{font-size:14px;line-height:1.2;word-break:keep-all;text-align:center;font-weight:600;min-height:34px;display:flex;align-items:center;justify-content:center}
.deployment-card .portrait{width:44px;height:44px;font-size:31px;background:#263b2f}
.deployment-card>span{font:700 20px 'Barlow Condensed',sans-serif;color:#e8d9b4;line-height:1}
.deployment-card>span small{font-size:12px;font-weight:500;color:#b4aa90}
.deployment-card:hover{background:#304037;border-color:#9eaa8a}
.deployment-card.selected{background:#493b2a;border-color:#ffbc80;box-shadow:inset 0 0 0 1px #ffbc80}
.deployment-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-shrink:0;min-height:47px}
.deployment-footer p{font-size:14px;line-height:1.4}
.deployment-footer #configSummary{font-size:12px;color:#aab9ad;margin-bottom:3px}
.deployment-footer #validation{color:#e0cfb0}
.deployment-footer .primary{padding:12px 20px;min-width:150px;font-size:14px}
#setupSettings select{width:100%;margin-top:6px}
#setupSettings .settings-money{font-size:14px;margin:20px 0;color:#d8c4a5}
#setupSettings .primary{width:100%}
@media(max-width:720px){body:has(#setupScreen:not([hidden])) header{height:44px}body:has(#setupScreen:not([hidden])) main{padding:8px}
.deployment-screen{height:calc(100dvh - 60px);min-height:470px;gap:8px}.deployment-heading h1{font-size:18px}.deployment-heading>button{min-width:72px;padding:7px 8px}
.deployment-budget{flex-direction:column;gap:4px;padding:6px 8px;align-items:stretch}.budget-caption{flex-direction:row;justify-content:space-between;align-items:center;font-size:12px}.budget-caption b{font-size:12px}.team-costs{gap:4px}.team-costs>div{flex-direction:column;gap:0;font-size:12px}.team-costs b{font-size:18px;line-height:1.1}.team-costs small{font-size:11px}
.deck-toolbar{gap:5px}.placement-teams{gap:3px;flex:1}.placement-team{padding:7px 6px;font-size:12px;flex:1}.placement-team small{display:none}.placement-tools{gap:3px}.placement-tool{padding:6px 8px;font-size:18px;line-height:1.2;min-height:31px}.placement-tool span{display:none}
.deployment-card{flex-basis:96px;min-height:110px;padding-top:6px;gap:4px}.deployment-card>b{font-size:13px;min-height:31px}.deployment-card .portrait{width:39px;height:39px;font-size:28px}.deployment-cards{gap:6px}
.deployment-footer .primary{min-width:108px;padding:11px 12px;gap:12px}.deployment-footer p{font-size:12px}.deployment-footer #configSummary{font-size:12px}.deployment-footer>div{min-width:0}.placed-unit small{font-size:11px}
}
@supports not (width:100cqw){.deployment-map{width:min(100%,calc(100dvh - 345px));height:auto;aspect-ratio:1}}

/* V16: five-floor tower and a compact preparation camp. */
.home-modes .tower-entry{grid-column:1/-1;background:#2e3429;border:1px solid #8e9467}.home-modes .tower-entry b{color:#f4dc9c}
body:has(#towerScreen:not([hidden])) header{height:48px}body:has(#towerScreen:not([hidden])) main{padding:16px 24px}.tower-screen{height:calc(100dvh - 80px);min-height:490px;display:flex;flex-direction:column;gap:12px}.tower-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-shrink:0}.tower-heading h1{font-size:24px;margin:3px 0 0}
.tower-wallet{display:grid;grid-template-columns:1fr 1fr 1.25fr;gap:12px;padding:12px 18px;background:#222b24;border:1px solid #5a6550;border-radius:8px;flex-shrink:0}.tower-wallet>div{display:flex;align-items:center;gap:14px}.tower-wallet span{font-size:14px;color:#c4cdbb}.tower-wallet b{font:700 26px 'Barlow Condensed',sans-serif;color:#ffe1a2;white-space:nowrap}.tower-wallet small{font-size:14px;color:#c3bdab}.tower-player-hp{position:relative}.tower-player-hp b{color:#badfa4}.tower-player-hp>i{position:absolute;left:0;right:0;bottom:-6px;height:3px;background:#3c4735}.tower-player-hp em{display:block;height:100%;background:#a3c783}
.tower-path{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;flex-shrink:0}.tower-path>div{border:1px solid #35463b;padding:8px 12px;display:flex;align-items:center;justify-content:center;gap:8px;border-radius:4px;color:#85948a;background:#17221e}.tower-path b{font-size:14px}.tower-path span{font-size:12px}.tower-path .current{border-color:#e3c17c;color:#ffdea0;background:#40382b}.tower-path .cleared{color:#b5d0a9;border-color:#56724b}
.tower-body{flex:1;min-height:0;border:1px solid #3f5043;border-radius:8px;background:#19241f;overflow:auto;padding:22px}.tower-message{flex-shrink:0;min-height:21px;font-size:14px;line-height:1.5;color:#ebd6aa}.tower-intro{height:100%;display:flex;justify-content:center;align-items:center;gap:38px;max-width:760px;margin:auto}.tower-castle{font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:90px;line-height:1}.tower-intro h2{font-size:24px;margin-bottom:12px}.tower-intro p{font-size:16px;max-width:510px;margin-bottom:12px}.tower-intro .primary{margin:20px 0 14px;max-width:220px}.tower-intro small{font-size:12px;line-height:1.7;color:#a2b19f}
.tower-prep-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.tower-prep-heading h2{font-size:20px}.tower-prep-heading p{font-size:14px;margin-top:4px}.tower-prep-heading .primary{min-width:130px;padding:11px 15px}.tower-shop-tabs{display:flex;gap:5px;margin-bottom:16px}.tower-shop-tabs button{padding:9px 15px;background:#253228;border:1px solid #42583f;border-radius:4px;font-size:14px}.tower-shop-tabs [aria-selected=true]{background:#51432c;border-color:#d5b875;color:#ffe3a4}
.tower-character-strip{display:flex;gap:8px;overflow-x:auto;padding-bottom:10px;scrollbar-width:thin;scrollbar-color:#657163 #17221d;overscroll-behavior-x:contain}.tower-character-strip button{flex:0 0 108px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:7px;padding:10px 6px;background:#26352b;border:1px solid #53614b;border-radius:6px}.tower-character-strip .portrait{width:42px;height:42px;font-size:28px}.tower-character-strip b{font-size:14px;min-height:34px;line-height:1.2;display:flex;align-items:center;text-align:center;word-break:keep-all}.tower-character-strip small{font-size:12px;color:#c4c4a8}.tower-character-strip .locked{background:#1e2823;border-color:#3b443b}.tower-character-strip .locked .portrait{opacity:.4}.tower-character-strip .selected{border-color:#ffca86;background:#493d2b;box-shadow:inset 0 0 0 1px #ffca86}
.tower-shop-detail{margin-top:12px;border-top:1px solid #3b4b3e;padding-top:12px}.tower-selected{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.tower-selected>div{display:flex;align-items:center;gap:16px}.tower-selected b{font-size:16px}.tower-selected span{font-size:14px;color:#c8c3ab}.tower-selected .text-button{white-space:nowrap}.tower-shop-action{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px;background:#213026;border-radius:5px}.tower-shop-action p{font-size:14px}.tower-shop-action button{flex-shrink:0}.tower-shop-note{font-size:13px;margin-bottom:9px;line-height:1.5}
.tower-items{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.tower-items button{padding:12px;display:flex;align-items:center;flex-direction:column;gap:6px;background:#25362a;border:1px solid #52694b;border-radius:5px}.tower-items button>span{font-size:28px;line-height:1}.tower-items b{font-size:14px}.tower-items small{font-size:13px;color:#c0c8b8}.tower-items strong{font-size:14px;color:#e7cea0}.tower-upgrade{display:flex;justify-content:space-between;gap:20px;background:#213026;padding:16px;border-radius:5px}.tower-upgrade p{font-size:14px;line-height:1.8}.tower-upgrade>div{display:flex;flex-direction:column;gap:6px}.tower-upgrade b{font-size:14px}.tower-upgrade span{font-size:12px;color:#aaba9e}.tower-upgrade button{margin-top:5px}
.tower-result,.tower-event{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100%;text-align:center;gap:12px}.tower-result h2,.tower-event h2{font-size:26px}.tower-result p,.tower-event>p{font-size:16px}.tower-result .primary{margin-top:12px;min-width:210px}.tower-result-lines{padding:14px 20px;background:#243128;border:1px solid #47563e;border-radius:6px}.tower-result-lines p{font-size:14px}.tower-event-options{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:18px;width:min(620px,100%)}.tower-event-options button{display:flex;align-items:center;flex-direction:column;gap:12px;padding:24px 14px;border:1px solid #60704e;border-radius:7px;background:#293a2b}.tower-event-options button>span{font-size:38px}.tower-event-options b{font-size:16px}.tower-event-options small{font-size:14px;color:#e2d1a9}.tower-event-options button:hover{background:#3d4d2e;border-color:#dcc083}
.tower-battle-hud{display:flex;justify-content:center;align-items:center;gap:24px;font-size:13px;margin:4px 0 8px;color:#d5c499;line-height:1.4}.tower-battle-hud b{color:#b8dfa2}.deployment-map.tower-map{background-color:#19291f;background-image:linear-gradient(90deg,#305d742e 0%,#305d742e 48%,transparent 48%,transparent 52%,#8b493529 52%,#8b493529 100%),linear-gradient(#64796822 1px,transparent 1px),linear-gradient(90deg,#64796822 1px,transparent 1px);background-size:100% 100%,5% 5%,5% 5%}#towerDeployHint{font-size:14px;color:#aacafa}.deployment-budget:has(+.setup-map-stage .tower-map) .team-costs{grid-template-columns:repeat(3,1fr)}body:has(#towerBattleHud:not([hidden])) .arena-column{width:min(100%,calc(100dvh - 205px))!important}
@media(max-width:720px){.home-modes .tower-entry{grid-column:auto}.home-modes{gap:9px;margin-top:18px}.home-modes .mode-entry{padding:15px 18px}.home-copy>p{margin-top:12px}.home-meta{margin-top:15px}body:has(#towerScreen:not([hidden])) header{height:44px}body:has(#towerScreen:not([hidden])) main{padding:10px 8px}.tower-screen{height:calc(100dvh - 64px);min-height:470px;gap:9px}.tower-heading h1{font-size:21px}.tower-heading .eyebrow{font-size:12px}.tower-heading button{font-size:12px;padding:8px}.tower-wallet{padding:9px 10px;gap:8px}.tower-wallet>div{flex-direction:column;align-items:flex-start;gap:0}.tower-wallet span{font-size:12px}.tower-wallet b{font-size:23px}.tower-wallet small{font-size:12px}.tower-player-hp>i{bottom:-3px}.tower-path{gap:4px}.tower-path>div{flex-direction:column;gap:1px;padding:6px 4px}.tower-path b{font-size:13px}.tower-path span{font-size:12px}.tower-body{padding:14px}.tower-intro{flex-direction:column;gap:16px;text-align:center}.tower-intro .tower-castle{font-size:55px}.tower-intro h2{font-size:20px}.tower-intro p{font-size:14px;margin-bottom:8px;line-height:1.6}.tower-intro .primary{margin:15px auto 12px}.tower-prep-heading{margin-bottom:10px}.tower-prep-heading h2{font-size:18px}.tower-prep-heading p{font-size:12px;line-height:1.4;max-width:185px}.tower-prep-heading .primary{min-width:91px;padding:10px;gap:10px;font-size:13px}.tower-shop-tabs{margin-bottom:12px;gap:4px}.tower-shop-tabs button{flex:1;font-size:13px;padding:8px 5px}.tower-character-strip{gap:6px}.tower-character-strip button{flex-basis:88px;padding:7px 5px;gap:4px}.tower-character-strip .portrait{width:35px;height:35px;font-size:25px}.tower-character-strip b{font-size:13px;min-height:31px}.tower-selected{gap:7px;align-items:flex-start}.tower-selected>div{flex-direction:column;align-items:flex-start;gap:3px}.tower-selected span{font-size:12px}.tower-selected b{font-size:14px}.tower-selected .text-button{font-size:12px;padding:2px}.tower-shop-action{flex-direction:column;align-items:stretch;gap:9px;padding:11px}.tower-shop-action p{font-size:13px;line-height:1.6}.tower-shop-note{font-size:12px}.tower-items{gap:6px}.tower-items button{padding:9px 4px;gap:4px}.tower-items b{font-size:12px;word-break:keep-all}.tower-items small{font-size:11px}.tower-items button>span{font-size:24px}.tower-upgrade{flex-direction:column;gap:10px;padding:12px}.tower-upgrade p{font-size:13px;line-height:1.6}.tower-result h2,.tower-event h2{font-size:22px}.tower-result .tower-castle{font-size:64px}.tower-result p,.tower-event>p{font-size:14px}.tower-event-options{gap:8px;margin-top:10px}.tower-event-options button{padding:18px 6px;gap:10px}.tower-event-options button>span{font-size:28px}.tower-event-options b,.tower-event-options small{font-size:12px}.tower-message{font-size:12px;min-height:18px}.tower-battle-hud{gap:10px;font-size:11px;margin:4px 0 7px}body:has(#towerBattleHud:not([hidden])) .arena-column{width:min(100%,calc(100dvh - 203px))!important}}
@media(max-width:720px) and (max-height:700px){.home-screen{min-height:calc(100dvh - 110px)}.home-copy h1{font-size:27px;line-height:1.2;margin-bottom:14px}.home-copy>p{font-size:12px}.home-modes .mode-entry{padding:13px 17px}.home-modes .mode-entry b{font-size:18px}.tower-intro .tower-castle{font-size:40px}.tower-intro{gap:12px}.tower-intro small{font-size:11px}.tower-intro p{font-size:13px}.tower-body{padding:12px}}

/* V17: compact owned characters, a large inventory, and connected floor choices. */
.tower-body[data-phase=prepare],.tower-body[data-phase=shop],.tower-body[data-phase=unlock]{display:flex;flex-direction:column;overflow:hidden}
.tower-prep-heading,.tower-shop-tabs,.inventory-characters{flex-shrink:0}.tower-shop-detail{flex:1;min-height:0;overflow:auto;margin-top:8px;padding-top:10px}.tower-body:has(.inventory-grid) .tower-shop-detail{display:flex;flex-direction:column;overflow:hidden}
.inventory-characters{gap:7px;padding-bottom:6px}.inventory-characters button{flex:0 0 62px;padding:7px 4px;gap:2px;min-height:82px}.inventory-characters .portrait{height:32px;width:32px;font-size:25px}.inventory-characters small{font-size:11px}.tower-mini-item{font-size:14px;line-height:17px;min-height:17px;color:#677669}.inventory-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-shrink:0}.inventory-heading b{font-size:14px}.inventory-heading span{font-size:12px;color:#a5b29c}.inventory-help{font-size:12px;color:#b3c1ad;line-height:1.6;margin:7px 0 10px;flex-shrink:0}
.inventory-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:minmax(78px,1fr);gap:7px;flex:1;min-height:0;overflow:auto;padding:1px;align-content:start;scrollbar-width:thin;scrollbar-color:#6d7b5b #15211b}.inventory-slot{border:1px solid #43543c;background:linear-gradient(135deg,#26372a,#1c2b23);border-radius:5px;min-width:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;padding:6px;position:relative}.inventory-slot>span{font-size:28px;line-height:1.2}.inventory-slot small{font-size:12px;line-height:1.3;word-break:keep-all}.inventory-slot em{font-size:10px;font-style:normal;color:#acb29f}.inventory-slot.empty{background:#14211a;border-color:#2c3e31;box-shadow:inset 0 0 12px #0a120c66}.inventory-slot.equipped{border-color:#91a777}.inventory-slot.selected{background:#4a3b25;border-color:#efc37e;box-shadow:inset 0 0 0 1px #d3ab6a}.inventory-slot.selected em{color:#f0d69e}.inventory-slot:hover:not(.empty){border-color:#f0d69e}.inventory-empty-note{font-size:12px;color:#b5bea7;flex-shrink:0;text-align:center;margin-top:9px}
.tower-unlock-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.tower-unlock-grid button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:12px 5px;border:1px solid #61734d;border-radius:5px;background:#293c29}.tower-unlock-grid b{font-size:13px;text-align:center;word-break:keep-all}.tower-unlock-grid small{font-size:12px;color:#dac395}.tower-unlock-grid .portrait{width:34px;height:34px;font-size:25px}
.tower-body[data-phase=route]{display:flex;flex-direction:column;overflow:hidden}.tower-route-heading{flex-shrink:0;text-align:center}.tower-route-heading h2{font-size:20px}.tower-route-heading p{font-size:13px;margin-top:5px;color:#b7c0a7}.tower-route-map{position:relative;flex:1;min-height:240px;max-width:760px;width:100%;margin:8px auto;background:radial-gradient(ellipse at 50% 55%,#36432a66,transparent 70%)}.tower-route-map svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}.tower-route-map path{fill:none;stroke:#a6a16b;stroke-width:.55;stroke-dasharray:2 1.6}.tower-route-node,.tower-route-preview,.tower-route-current{position:absolute;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;justify-content:center}.tower-route-node{width:104px;min-height:101px;padding:10px 6px;gap:3px;background:#303e2a;border:2px solid #cfc388;box-shadow:0 4px 0 #101a13,0 0 22px #ccaa4433;border-radius:9px}.tower-route-node>span{font-size:31px;line-height:1.3}.tower-route-node>b{font-size:16px}.tower-route-node>small{font-size:12px;color:#cdbf9b}.tower-route-node.combat{border-color:#d3997c;background:#49362c}.tower-route-node:hover{transform:translate(-50%,-53%);border-color:#ffdc95;background:#554b30}.tower-route-preview{opacity:.5;gap:3px;pointer-events:none}.tower-route-preview span{font-size:23px}.tower-route-preview small{font-size:11px;white-space:nowrap}.tower-route-current{background:#1c2b20;border:1px solid #647653;border-radius:7px;padding:6px 12px;gap:3px;white-space:nowrap}.tower-route-current span{font-size:22px}.tower-route-current small{font-size:11px;color:#bdc6a8}.tower-route-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:5px 14px;font-size:12px;color:#b8bea8;flex-shrink:0}
@media(max-width:720px){.inventory-characters button{flex-basis:55px;min-height:75px;padding:5px 3px}.inventory-characters .portrait{width:29px;height:29px;font-size:23px}.inventory-characters small{font-size:10px}.inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:minmax(68px,1fr);gap:5px}.inventory-slot{padding:4px 2px}.inventory-slot>span{font-size:22px}.inventory-slot small{font-size:10px}.inventory-slot em{font-size:9px}.inventory-help{font-size:11px;margin:5px 0 8px}.inventory-heading b{font-size:13px}.inventory-empty-note{font-size:11px}.tower-shop-detail{padding-top:8px;margin-top:4px}.tower-unlock-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.tower-unlock-grid button{padding:9px 4px;gap:4px}.tower-unlock-grid b{font-size:12px}.tower-unlock-grid small{font-size:11px}.tower-route-heading h2{font-size:17px}.tower-route-heading p{font-size:11px}.tower-route-node{width:78px;min-height:89px;padding:7px 3px}.tower-route-node>span{font-size:27px}.tower-route-node>b{font-size:13px}.tower-route-preview small{font-size:10px}.tower-route-current{padding:6px 9px}.tower-route-legend{font-size:11px;gap:5px 10px}.tower-route-map{min-height:240px}.tower-upgrade{flex-direction:column}}
@media(max-width:720px){.tower-body:has(.inventory-grid) .tower-prep-heading p{display:none}.tower-body:has(.inventory-grid) .tower-prep-heading{margin-bottom:8px}.tower-body:has(.inventory-grid) .tower-shop-tabs{margin-bottom:8px}.inventory-characters button{min-height:66px;padding:4px 3px}.inventory-characters small{line-height:12px}.inventory-characters .tower-mini-item{line-height:14px;min-height:14px}.inventory-grid{grid-auto-rows:minmax(62px,1fr)}.inventory-slot{gap:2px}}

/* V18: unit dispositions and a tactical pause beside the arena. */
#battleScreen[data-turning=hold] #arena{touch-action:none}
#unitStrategy{width:min(450px,calc(100vw - 24px));max-height:calc(100dvh - 30px);overflow:auto;background:#18251e;border:1px solid #8d9a6c;color:var(--text);border-radius:8px;padding:20px}#unitStrategy::backdrop{background:#080f13ba}#unitStrategyTitle{font-size:20px}.stance-unit{display:flex;align-items:center;gap:12px;margin:12px 0 18px}.stance-unit small{display:block;font-size:12px;color:#a8b9a0}.stance-unit .portrait{width:40px;height:40px;font-size:28px}.stance-options{display:grid;gap:8px;margin-bottom:12px}.stance-options button{background:#23352a;border:1px solid #50664b;border-radius:5px;padding:12px;text-align:left}.stance-options b{display:block;font-size:15px}.stance-options small{display:block;font-size:12px;line-height:1.6;margin-top:3px;color:#b3bfa9}.stance-options [aria-pressed=true]{border-color:#ebc27a;background:#4b3e29}
.strategy-shop-cards,.strategy-owned-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.strategy-shop-cards button,.strategy-owned-cards>div{display:flex;flex-direction:column;align-items:center;gap:6px;padding:15px 9px;background:#26372a;border:1px solid #65744d;border-radius:6px;text-align:center}.strategy-shop-cards span,.strategy-owned-cards span{font-size:30px}.strategy-shop-cards b,.strategy-owned-cards b{font-size:15px}.strategy-shop-cards small,.strategy-owned-cards small{font-size:12px}.strategy-shop-cards em,.strategy-owned-cards em{font-size:11px;color:#d9c396;font-style:normal}.strategy-shop-cards strong{font-size:14px;color:#efcb85}.strategy-owned-cards{overflow:auto;margin-top:10px}.inventory-heading .text-button{font-size:12px;padding:3px 5px}.tower-event-options:has(button:nth-child(4)){grid-template-columns:repeat(2,1fr)}
#battleScreen[data-turning=hold] .battle-layout{display:flex!important;align-items:flex-start;justify-content:center;gap:16px}#battleScreen[data-turning=hold] .battle-layout .arena-column{margin:0;flex-shrink:1;width:min(calc(100vw - 410px),calc(100dvh - 205px))!important}.turning-panel{flex:0 0 310px;background:#1d2d22;border:1px solid #acb178;border-radius:7px;padding:14px;max-height:calc(100dvh - 170px);overflow:auto}.turning-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.turning-title h2{font-size:17px}.turning-title h2 span{display:block;font-size:25px;color:#ffe2a2;font-family:'Barlow Condensed',sans-serif}.turning-title button{font-size:12px;padding:8px}.enemy-forecasts{display:grid;gap:6px;padding:8px;background:#342f24;border-left:3px solid #e6ae78;border-radius:4px;margin-bottom:12px}.enemy-forecasts>div{display:flex;flex-direction:column;font-size:11px;line-height:1.5;color:#bdbdab}.enemy-forecasts b{font-size:12px;font-weight:500;color:#f5d6a7}.turning-selection{display:flex;flex-direction:column;gap:3px;margin-bottom:9px}.turning-selection b{font-size:13px}.turning-selection span{font-size:11px;color:#b1c5a6}.turning-stances{display:grid;grid-template-columns:repeat(2,1fr);gap:5px}.turning-stances button{padding:8px 4px;border:1px solid #5e7654;border-radius:4px;background:#263e2c;font-size:12px}.turning-stances [aria-pressed=true]{background:#59452c;border-color:#e5bb79}.strategy-message{font-size:11px;color:#d6caac;min-height:32px;line-height:1.5;margin:9px 0}.turning-cards{display:flex;gap:6px;overflow-x:auto;padding-bottom:6px;scrollbar-width:thin}.strategy-card{flex:0 0 103px;display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 5px;border:1px solid #92a66c;border-radius:5px;background:#34432b;touch-action:pan-x;user-select:none}.strategy-card>span{font-size:26px;line-height:1}.strategy-card b{font-size:12px}.strategy-card small{font-size:10px;line-height:1.4;min-height:28px}.strategy-card em{font-size:9px;font-style:normal;color:#ddc391}.strategy-card.selected{background:#674c2f;border-color:#ffd88e}.strategy-drag-ghost{position:fixed;transform:translate(-50%,-50%);width:56px;height:56px;display:grid;place-items:center;z-index:1000;border:2px solid #ffd897;background:#50402de8;border-radius:7px;font-size:32px;pointer-events:none}.turning-notice{position:fixed;top:90px;left:50%;transform:translateX(-50%);z-index:8;background:#352c20e8;border:1px solid #ffce8d;color:#ffe1a4;font-size:18px;padding:15px 24px;border-radius:6px;white-space:nowrap;pointer-events:none}
@media(max-width:720px){#unitStrategy{padding:15px}.stance-options button{padding:10px}.strategy-shop-cards button,.strategy-owned-cards>div{padding:12px 6px}.strategy-shop-cards b,.strategy-owned-cards b{font-size:13px}.strategy-shop-cards small,.strategy-owned-cards small{font-size:11px}#battleScreen[data-turning=hold] .battle-heading,#battleScreen[data-turning=hold] .tower-battle-hud,#battleScreen[data-turning=hold] .arena-top,#battleScreen[data-turning=hold] .toolbar{display:none}#battleScreen[data-turning=hold] .battle-layout{flex-direction:column;align-items:center;gap:8px}#battleScreen[data-turning=hold] .battle-layout .arena-column{flex:none;width:min(100%,calc(100dvh - 345px))!important}.turning-panel{width:100%;flex:none;max-height:275px;padding:9px;overflow:auto}.turning-title{margin-bottom:6px}.turning-title h2{font-size:14px}.turning-title h2 span{display:inline;margin-left:6px;font-size:19px}.turning-title button{font-size:11px;padding:6px 9px}.enemy-forecasts{gap:2px;padding:5px 7px;margin-bottom:6px}.enemy-forecasts>div{flex-direction:row;justify-content:space-between;gap:6px;font-size:10px}.enemy-forecasts b{font-size:10px}.turning-selection{flex-direction:row;justify-content:space-between;margin-bottom:6px;gap:4px}.turning-selection b{font-size:11px}.turning-selection span{font-size:10px}.turning-stances{grid-template-columns:repeat(4,1fr);gap:4px}.turning-stances button{font-size:10px;padding:6px 3px}.strategy-message{min-height:16px;font-size:10px;margin:5px 0}.turning-cards{padding-bottom:2px}.strategy-card{flex-basis:92px;padding:5px 3px;gap:2px}.strategy-card>span{font-size:20px}.strategy-card b{font-size:10px}.strategy-card small{font-size:9px;min-height:23px}.strategy-card em{font-size:9px}.turning-notice{top:70px;font-size:14px;padding:12px 15px}}

.placed-unit.tower-elite{border-color:#ffc985;box-shadow:0 0 0 2px #b78642,0 4px 0 #08141088}.placed-unit.tower-elite::after{content:'★';position:absolute;top:-16px;font-size:14px;color:#ffd99c;line-height:1;text-shadow:0 1px 2px #101c18}.tower-enemy-info{background:#453923;border:1px solid #8b7044;border-radius:5px;padding:10px;margin-bottom:16px;color:#ffe1ad;font-size:13px;line-height:1.6}

.tower-prep-heading h2 small{display:block;margin-top:4px;font-size:12px;font-weight:500;line-height:1.4;color:#d5c499}

/* V22: one inventory slot per recruited guild member. */
.tower-body[data-phase=recruit]{display:flex;flex-direction:column;overflow:hidden}
.tower-body:has(.guild-grid) .tower-shop-detail{display:flex;flex-direction:column;overflow:hidden}
.guild-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(148px,1fr));gap:10px;overflow:auto;min-height:0;flex:1;align-content:start;padding:1px;scrollbar-width:thin}
.guild-card{display:flex;flex-direction:column;align-items:center;gap:6px;padding:13px 10px;border:1px solid #57664c;border-radius:7px;background:linear-gradient(145deg,#2d3b2b,#1d2c23);min-width:0;text-align:center}
.guild-card>b{font-size:14px}.guild-card.selected{border-color:#e8c080;background:#443c2a}.guild-card-identity{display:flex;align-items:center;gap:9px}.guild-card-identity .portrait{width:36px;height:36px;font-size:28px}.guild-card-identity small{font-size:11px;color:#c8bc99}
.guild-card-vitals{display:flex;flex-direction:column;gap:3px;width:100%;font-size:12px;color:#d9e5d0}.guild-card-vitals>small{font-size:10px;color:#cbb7e4}.guild-hp{display:block;width:100%;height:4px;border-radius:2px;background:#101d17;overflow:hidden}.guild-hp em{display:block;height:100%;background:#8fbe8d}
.guild-energy{display:flex;gap:4px;justify-content:center;height:8px}.guild-energy i{width:13px;height:6px;border-radius:1px;background:#18251f;border:1px solid #4e5c48}.guild-energy i.filled{background:#efce89;border-color:#efce89}
.guild-card-status{font-size:10px;color:#bec6ae;line-height:1.5;word-break:keep-all}.guild-unavailable{border-color:#59534a;background:#282922!important}.guild-unavailable .guild-card-status{color:#e19e87}.guild-dead .portrait{filter:grayscale(1);opacity:.55}.guild-placed{border-color:#88b7ff;background:#293e40!important}.guild-placed .guild-card-status{color:#acd1ff}
.deployment-card:has([aria-label^=기력]){flex-basis:138px;min-height:162px;gap:4px;justify-content:flex-start;padding:8px}.deployment-card:has([aria-label^=기력])>b{font-size:13px;min-height:17px}.deployment-card .guild-card-identity{flex-direction:row;gap:5px}.deployment-card .guild-card-identity .portrait{height:32px;width:32px;font-size:25px}.deployment-card .guild-card-identity small{font-size:10px}.deployment-card .guild-card-vitals{font-size:11px}.deployment-card .guild-card-status{max-width:100%;max-height:28px;overflow:hidden}.deployment-card .guild-energy{margin-top:2px}
.guild-recruit-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.guild-recruit-card{display:flex;flex-direction:column;align-items:center;gap:12px;padding:22px 12px;background:#2b3b2b;border:1px solid #65714d;border-radius:8px;text-align:center}.guild-recruit-card .portrait{height:66px;width:66px;font-size:46px}.guild-recruit-card>b{font-size:17px;word-break:keep-all}.guild-recruit-card>small{font-size:12px;color:#bdc7b0}.guild-recruit-card .text-button{padding:2px;font-size:12px}.guild-recruit-card .secondary{width:100%;padding:10px 5px;font-size:13px}.guild-rest .tower-event-options{grid-template-columns:repeat(2,minmax(0,1fr));max-width:580px}.guild-rest>small{font-size:12px;color:#b9c9ad}
.guild-info{background:#27382a;border-color:#607254;color:#d5e7c8}.placed-hp{position:absolute;top:calc(100% + 3px);width:90%;height:3px;background:#192b32;pointer-events:none}.placed-hp em{display:block;height:100%;background:#88b7ff}
@media(max-width:720px){.guild-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.guild-card{padding:10px 7px;gap:5px}.guild-card>b{font-size:12px}.guild-card-identity{gap:5px}.guild-card-identity .portrait{width:30px;height:30px;font-size:23px}.guild-card-vitals{font-size:11px}.guild-card-status{font-size:10px}.deployment-card:has([aria-label^=기력]){flex-basis:118px;min-height:150px;padding:6px}.guild-recruit-grid{gap:6px}.guild-recruit-card{gap:9px;padding:13px 5px}.guild-recruit-card .portrait{width:43px;height:43px;font-size:32px}.guild-recruit-card>b{font-size:13px;min-height:32px}.guild-recruit-card>small{font-size:10px}.guild-recruit-card .secondary{font-size:11px;padding:10px 2px}.tower-route-node>b{max-width:70px;word-break:keep-all;line-height:1.3}.tower-route-node{min-height:96px}.tower-route-legend{font-size:10px}.tower-character-strip.inventory-characters button{flex-basis:70px}.tower-shop-tabs button{font-size:12px;white-space:nowrap}.guild-rest .tower-event-options small{line-height:1.7}.tower-body:has(.guild-grid) .tower-prep-heading p{display:none}.tower-body:has(.guild-grid) .inventory-help{font-size:10px}}
/* Tower room map: one bounded vertical scroller, horizontal rooms on each floor. */
.tower-body[data-phase=route]{overflow:hidden;padding:18px;gap:16px}.tower-floors{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:0 8px 8px}.tower-floor-row{padding:15px 0 18px;border-bottom:1px solid #40503e}.tower-floor-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.tower-floor-heading>b{font-size:19px;color:#f2ddae}.tower-floor-heading small{font-size:11px;margin-left:8px;color:#a5b59d}.tower-floor-heading>span{font-size:12px;color:#b6c4a9}.tower-room-row{display:flex;gap:10px;overflow-x:auto;padding:3px 2px 9px}.tower-room{flex:1 0 86px;min-width:0;max-width:175px;min-height:121px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:9px 5px;border:1px solid #65714c;border-radius:7px;background:#29372b;box-shadow:0 3px 0 #111b15}.tower-room>small{font-size:11px;color:#a3b49b}.tower-room>span{font-size:31px;font-weight:800;color:#d7bd7a;line-height:1.2}.tower-room>b{font-size:13px;word-break:keep-all;text-align:center}.tower-room>em{font-style:normal;font-size:10px;color:#bac7ac}.tower-room:hover:not(:disabled){background:#414c31;border-color:#ecd194;transform:translateY(-2px)}.tower-room.cleared{border-color:#75a682;background:#234337}.tower-room.cleared>em{color:#a4e5b7}.tower-room.last-room{outline:2px solid #e1ba6d;outline-offset:2px}.tower-floor-row.locked{opacity:.5}.tower-room:disabled{cursor:not-allowed}.tower-map-back{align-self:flex-start;flex-shrink:0;margin-bottom:9px}.tower-room:focus-visible{outline:2px solid #ffdf9a;outline-offset:2px}.tower-floors:focus-visible{outline:1px solid #829364}
@media(max-width:720px){.tower-body[data-phase=route]{padding:10px 6px;gap:8px}.tower-floors{padding:0 3px 8px}.tower-floor-row{padding:10px 0 12px}.tower-floor-heading{gap:5px;margin-bottom:8px}.tower-floor-heading>b{font-size:16px}.tower-floor-heading small{margin-left:3px;font-size:10px}.tower-floor-heading>span{font-size:10px}.tower-room-row{gap:5px}.tower-room{flex-basis:55px;min-height:98px;gap:4px;padding:8px 2px}.tower-room>span{font-size:25px}.tower-room>b{font-size:11px;line-height:1.3}.tower-room>small,.tower-room>em{font-size:9px}.tower-map-back{font-size:12px;margin-bottom:6px}}
.tower-conquered{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 12px;background:#34462d;border:1px solid #baaa6c;border-radius:6px;font-size:12px;flex-shrink:0}.tower-conquered>b{color:#f0d389}.tower-conquered>button{margin-left:auto}
/* Spent rooms recede into the map; only usable services remain highlighted. */
.tower-room.consumed{background:#18211d!important;border-color:#37433b!important;box-shadow:none;outline:none;opacity:.52}.tower-room.consumed>span{filter:grayscale(1);color:#849082}.tower-room.consumed>em,.tower-room.consumed>small{color:#89958a}.tower-room.consumed:hover:not(:disabled){transform:none;opacity:.65}.tower-items em{font-size:11px;font-style:normal;color:#c9c8a3}
.tower-body[data-phase=predictionEvent]{display:flex;flex-direction:column;overflow:hidden;gap:12px}.tower-prediction-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}.tower-prediction-heading h2{font-size:22px;margin:3px 0 6px}.tower-prediction-heading p{font-size:12px;color:#bdc7b3}.tower-prediction-choices{display:flex;gap:12px;flex:1;min-height:0;overflow:auto;align-items:center}.tower-prediction-choices .prediction-card{padding:18px;max-width:none;align-self:stretch;display:flex;flex-direction:column;justify-content:center}.tower-prediction-choices .prediction-members{margin:22px 0;gap:10px}.tower-prediction-choices .prediction-members .portrait{width:50px;height:50px;font-size:35px}.tower-prediction-choices .team-heading{font-size:18px}.tower-wager{display:grid;grid-template-columns:auto 1fr auto;gap:7px 12px;align-items:center;flex-shrink:0;border-top:1px solid #48503c;padding-top:14px}.tower-wager>span{font-size:13px}.tower-wager>div{display:flex;gap:6px}.tower-wager>div>button{padding:8px 18px;border:1px solid #63714f;border-radius:5px;background:#26352a;font-size:13px}.tower-wager>div>button.selected{background:#5c4e2d;border-color:#e7c684;color:#ffe0a4}.tower-wager>p,.tower-wager>small{grid-column:1/3;color:#cbd3bf;font-size:12px;line-height:1.5}.tower-wager>small{font-size:10px;color:#aeb8a3}.tower-wager>.primary{grid-column:3;grid-row:1/4;min-width:180px}.tower-prediction-reward{color:#f0d7a4!important}
@media(max-width:720px){.tower-body[data-phase=predictionEvent]{padding:12px;gap:8px}.tower-prediction-heading h2{font-size:18px}.tower-prediction-heading p{font-size:10px;line-height:1.4}.tower-prediction-heading .eyebrow{font-size:10px}.tower-prediction-heading>button{padding:8px;font-size:11px}.tower-prediction-choices{flex-direction:column;align-items:stretch;gap:7px}.tower-prediction-choices .prediction-card{padding:10px 12px;flex:none}.tower-prediction-choices .team-heading{font-size:14px}.tower-prediction-choices .prediction-members{margin:8px 0 6px;gap:14px}.tower-prediction-choices .prediction-members .portrait{width:31px;height:31px;font-size:23px}.tower-prediction-choices .prediction-members>div{grid-template-columns:31px auto;gap:2px 5px}.tower-prediction-choices .prediction-members b{font-size:11px}.tower-prediction-choices .prediction-members small{font-size:9px}.tower-prediction-choices .prediction-tags{font-size:9px}.tower-wager{grid-template-columns:auto 1fr;gap:6px 9px;padding-top:9px}.tower-wager>div>button{padding:6px 12px;font-size:12px}.tower-wager>p{font-size:10px}.tower-wager>small{font-size:9px}.tower-wager>.primary{grid-column:1/-1;grid-row:auto;padding:10px;font-size:12px;min-width:0}}

/* Keep frozen combat overlays from hiding units during strategy changes. */
.kill-overlay{transition:opacity .18s ease}
#battleScreen[data-turning=brake] .kill-overlay,
#battleScreen[data-turning=hold] .kill-overlay{opacity:.22}
#battleScreen[data-turning=brake] .turning-notice{opacity:.4}

.inventory-strategy{border-color:#81744e;background:linear-gradient(135deg,#3c3524,#262d23)}
.inventory-strategy>i{position:absolute;top:3px;right:4px;font-size:9px;font-style:normal;color:#d8c18e}
.inventory-strategy.card-unavailable{filter:saturate(.45);border-color:#55584a}
.inventory-card-icon{font-size:48px;line-height:1;padding:12px}
.tower-event-lock{font-size:12px;color:#d4bd8c}
.tower-gameover .eyebrow{color:#e7a38a}

.resource-icon,.vital-icon{font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-style:normal;font-size:1em}
.tower-upgrade{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px 24px;max-width:640px;padding:18px}
.tower-upgrade .upgrade-unit{display:flex;flex-direction:column;gap:10px;min-width:0}
.upgrade-identity{display:flex;align-items:center;gap:10px}.upgrade-identity b{font-size:15px}.upgrade-identity span{font-size:12px}
.tower-upgrade .upgrade-vitals{display:flex;flex-direction:column;gap:7px;max-width:270px}
.upgrade-vital{display:grid;grid-template-columns:18px minmax(45px,1fr) 70px;align-items:center;gap:8px;line-height:1}
.upgrade-vital .vital-icon{font-size:13px;text-align:center}.upgrade-vital small{font-size:11px;text-align:right;color:#d1dcc6;font-variant-numeric:tabular-nums;white-space:nowrap}
.upgrade-vital .guild-hp{height:5px}.upgrade-vital .guild-energy{width:100%;gap:3px;align-items:center}.upgrade-vital .guild-energy i{flex:1;width:auto;height:5px}
.tower-upgrade .upgrade-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;grid-column:1/-1;grid-row:2}
.upgrade-stats>div{display:flex;flex-direction:column;gap:4px;background:#18271d;border-radius:4px;padding:10px 8px}
.tower-upgrade .upgrade-stats span{font-size:11px;color:#b4d8a6}.upgrade-stats strong{font-size:19px;color:#97e09a;font-variant-numeric:tabular-nums}
.tower-upgrade>button{margin:0;white-space:nowrap;grid-column:2;grid-row:1}
@media(max-width:720px){.tower-upgrade{grid-template-columns:1fr;gap:14px;padding:12px}.tower-upgrade .upgrade-vitals{max-width:240px}.tower-upgrade>button{grid-column:1;grid-row:3;justify-self:stretch}.tower-upgrade .upgrade-stats{gap:5px}.upgrade-stats>div{padding:9px 5px}.upgrade-stats strong{font-size:17px}.tower-upgrade .upgrade-stats span{font-size:10px}}
@media(max-width:720px){
 .tower-body:has(.tower-upgrade) .tower-prep-heading{margin-bottom:5px}
 .tower-body:has(.tower-upgrade) .tower-prep-heading h2 small{display:block}
 .tower-body:has(.tower-upgrade) .tower-map-back{margin:2px 0 6px;padding:4px}
 .tower-body:has(.tower-upgrade) .tower-shop-tabs{margin-bottom:7px}
 .tower-upgrade{padding:10px;gap:10px}
 .tower-upgrade .upgrade-unit{gap:8px}
 .upgrade-stats>div{padding:7px 5px}
}

.unit-mini-vitals{display:flex;flex-direction:column;gap:3px;width:100%;padding:0 3px}.unit-mini-vitals>i{display:block;width:100%;height:3px;background:#16211b;border-radius:2px;overflow:hidden}.unit-mini-vitals em{display:block;height:100%;background:#98d58b;border-radius:2px}.unit-mini-vitals .mini-energy em{background:#e7bc66}.inventory-characters button{min-height:94px}
.tower-items .shop-price,.strategy-shop-cards .shop-price{display:block;width:100%;margin-top:auto;padding:8px 5px;border:1px solid #b69b67;border-radius:4px;background:#453c28;line-height:1.2}.shop-purchased{opacity:.48}.shop-purchased .shop-price{border-color:#57604d;background:#283029;color:#a3ad9b}
.tower-result-lines{min-width:230px;text-align:left;display:flex;flex-direction:column;gap:16px}.tower-result-lines p{margin:0;line-height:1.7}.result-loss,.result-reward{display:flex;flex-direction:column;gap:2px}.tower-result-lines .result-loss-title{color:#ff9b91;font-weight:700}.tower-result-lines .result-reward-title{color:#97e09a;font-weight:700}.winner .tower-result-lines{margin:12px auto}
@media(max-width:720px){.inventory-characters button{min-height:78px}.inventory-characters .unit-mini-vitals{gap:2px}.tower-items .shop-price,.strategy-shop-cards .shop-price{font-size:12px;padding:7px 3px}}
.winner:has(.tower-result-lines){top:50%;transform:translateY(-50%);padding:14px}.winner .tower-result-lines{min-width:0;margin:8px auto;padding:10px 14px;gap:8px}.winner .tower-result-lines p{font-size:12px;line-height:1.5}
.tower-scene{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:24px;background:rgba(4,10,12,.72);pointer-events:none;opacity:0}
.tower-scene-content{display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center;max-width:100%;color:#fff5dc;text-shadow:0 3px 14px #000;will-change:transform}
.tower-scene-icon{font-size:clamp(56px,9vw,82px);line-height:1.15;filter:drop-shadow(0 3px 12px #0008)}
.tower-scene-content>strong{font-size:clamp(28px,5vw,46px);font-weight:800;letter-spacing:.04em;word-break:keep-all}
.tower-scene-content>small{font-size:clamp(18px,3vw,24px);font-weight:700;color:#a1edae}
.tower-scene[data-kind=conquest]{background:radial-gradient(ellipse at center,rgba(65,91,44,.36),rgba(4,10,12,.55))}
.tower-scene[data-kind=conquest] .tower-scene-content>strong{color:#ffe4a0}
.tower-scene[data-kind=chapterConquest]{overflow:hidden;background:radial-gradient(ellipse at center,#5b4225e8,#05090bf5 72%)}
.tower-scene[data-kind=chapterConquest]::before{content:"";position:absolute;inset:-60%;background:repeating-conic-gradient(from 0deg at 50% 50%,transparent 0deg 13deg,#f4d17b10 14deg 23deg,transparent 24deg 36deg);animation:chapter-rays 18s linear infinite;pointer-events:none}
.tower-scene[data-kind=chapterConquest] .tower-scene-content{position:relative;padding:35px 24px;filter:drop-shadow(0 0 25px #ffcd6b55)}
.tower-scene[data-kind=chapterConquest] .tower-scene-icon{font-size:clamp(88px,15vw,128px);animation:chapter-crown .7s cubic-bezier(.16,1,.3,1) both}
.tower-scene[data-kind=chapterConquest] .tower-scene-content>strong{color:#ffe9a8;font-size:clamp(32px,6vw,60px);letter-spacing:.07em}
.tower-scene[data-kind=chapterConquest] .tower-scene-content>small{color:#dbc79b;font-size:clamp(15px,2.7vw,20px)}
@keyframes chapter-rays{to{transform:rotate(360deg)}}
@keyframes chapter-crown{from{transform:translateY(24px) scale(.65);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}
.tower-room-row.milestone{display:grid;grid-template-columns:repeat(var(--room-columns),minmax(86px,1fr))}
.tower-room-row.milestone .tower-room{max-width:none}
.tower-room.public-room:not(.consumed){border:2px solid #ba8c4e;background:linear-gradient(160deg,#54432d,#2f2c25);box-shadow:0 3px 0 #111b15,inset 0 0 16px #f3bd6410}
.tower-room.public-room.boss:not(.consumed){border-color:#e0b36b}
.tower-room.public-room:not(.consumed)>b{color:#ffe1a8}
.tower-room.public-room:disabled{opacity:1}
@media(max-width:720px){.tower-room-row.milestone{grid-template-columns:repeat(var(--room-columns),minmax(55px,1fr))}}
@media(prefers-reduced-motion:reduce){.tower-scene[data-kind=chapterConquest]::before,.tower-scene[data-kind=chapterConquest] .tower-scene-icon{animation:none}}
.tower-scene[data-kind=recruit]{background:radial-gradient(ellipse at center,#26382bf0,#04090bf5 70%);pointer-events:auto}
.tower-scene[data-kind=recruit] .tower-scene-icon{display:grid;place-items:center;width:156px;height:156px;font-size:88px;border-radius:50%;background:radial-gradient(circle,#fff2b824,transparent 68%);box-shadow:0 0 60px #e7cc6320;filter:drop-shadow(0 4px 18px #ffe7a033)}
.tower-scene[data-kind=recruit] .tower-scene-content>small{color:#d5e3c0;font-size:16px;letter-spacing:.15em}
.tower-scene[data-kind=recruit] .tower-scene-content>strong{color:#fff2cf}
@media(max-width:720px) and (max-height:700px){.inventory-characters button{min-height:72px;gap:1px}.inventory-characters .portrait{width:27px;height:27px}.inventory-characters .tower-mini-item{line-height:12px;min-height:12px}.tower-body:has(.tower-upgrade) .tower-shop-detail{padding-top:4px}.tower-upgrade{gap:7px}.tower-upgrade .upgrade-unit{gap:6px}.tower-upgrade .upgrade-vitals{gap:5px}.upgrade-stats>div{padding:6px 5px}}

.tower-retreat-scene{position:fixed;inset:0;z-index:95;display:grid;place-items:center;background:rgba(3,5,8,.88);opacity:0;pointer-events:all}
.tower-retreat-scene>strong{font-size:clamp(52px,10vw,90px);font-weight:900;letter-spacing:.2em;color:#ff5858;text-shadow:0 2px 22px #bb1b2366;opacity:0}
.tower-mini-item{white-space:nowrap;letter-spacing:0;font-size:13px}
.inventory-consumable{border-color:#796b96;background:linear-gradient(135deg,#332c43,#231f31)}

#returnSetup.retreat-action,#rematch.retreat-action{color:#ff7878}

.tower-intro.tower-lobby{flex-direction:column;text-align:center;gap:16px;max-width:800px}.tower-lobby h2{margin:0;font-size:clamp(19px,2.1vw,27px);line-height:1.5;word-break:keep-all}.tower-lobby .tower-lobby-subtitle{margin:0;font-size:15px;line-height:1.6}.tower-lobby .primary{margin:6px auto 8px}.tower-lobby .tower-lobby-note{font-size:12px;color:#929f98;line-height:1.8;max-width:620px;word-break:keep-all}
@media(max-width:720px){.tower-intro.tower-lobby{gap:13px}.tower-lobby h2{max-width:300px;font-size:20px}.tower-lobby .tower-lobby-subtitle{font-size:13px}.tower-lobby .tower-lobby-note{font-size:11px;max-width:310px}.tower-lobby .primary{margin:3px auto 5px}}
@media(max-width:720px) and (max-height:700px){.tower-intro.tower-lobby{gap:10px}.tower-lobby h2{font-size:18px}.tower-lobby .tower-lobby-subtitle{font-size:12px}.tower-lobby .tower-lobby-note{font-size:10px}}

.guild-recruit-tools{display:flex;justify-content:flex-end;margin-bottom:12px}.guild-recruit-tools .secondary{padding:10px 14px;font-size:13px;white-space:nowrap}
@media(max-width:720px){.guild-recruit-tools{margin-bottom:9px}.guild-recruit-tools .secondary{padding:9px 12px;font-size:12px}}

.tower-gameover-scene{position:fixed;inset:0;z-index:110;display:grid;place-items:center;background:rgba(2,4,7,.94);opacity:0;pointer-events:all}
.tower-gameover-scene>div{text-align:center;padding:24px}
.tower-gameover-scene strong{display:block;font-size:clamp(44px,10vw,88px);font-weight:900;letter-spacing:.12em;color:#ff5b63;text-shadow:0 3px 24px #ad1b2c55;opacity:0}
.tower-gameover-scene small{display:block;margin-top:22px;font-size:15px;color:#a9b4b7}
#battleScreen[data-gameover] .kill-overlay{opacity:.2}

/* V55: shared tower resources and selectable guild revival. */
.tower-resource-budget{padding:0;border:0;background:none}.tower-resource-budget #teamCosts{width:100%}.tower-resource-budget .budget-caption[hidden]{display:none}.tower-resource-budget .tower-wallet>div{border:0;background:none;padding:0;justify-content:flex-start}.tower-resource-budget .tower-wallet{gap:12px}.tower-battle-hud.tower-wallet{display:grid;justify-content:normal;line-height:1.4;margin:0 0 10px}.tower-battle-hud.tower-wallet b{color:#ffe1a2}.tower-battle-hud.tower-wallet .tower-player-hp b{color:#badfa4}
body:has(#towerBattleHud:not([hidden])) .arena-column{width:min(100%,calc(100dvh - 253px))!important}
.guild-rest .tower-event-options{max-width:580px}.guild-rest .tower-event-options button{padding:18px 12px;gap:9px}.guild-rest .tower-event-options button:disabled{opacity:.4;cursor:not-allowed}
#towerRevival{width:min(620px,calc(100vw - 24px));padding:22px}#towerRevival .panel-heading{margin-bottom:18px}.revival-units{display:flex;gap:12px;overflow-x:auto;overscroll-behavior-x:contain;padding:4px 2px 15px;scrollbar-width:thin}.revival-unit{flex:0 0 128px;display:flex;flex-direction:column;align-items:center;gap:10px;padding:16px 8px;background:#26352b;border:1px solid #53614b;border-radius:7px}.revival-unit .portrait{height:56px;width:56px;font-size:38px}.revival-unit>b{font-size:14px;word-break:keep-all}.revival-unit>small{font-size:12px;color:#aebfac}.revival-unit>span{font-size:14px;color:#bce7a6}.revival-unit>span small{font-size:11px;color:#aebfac}.revival-unit.selected{background:#3e4930;border-color:#d3dd87;box-shadow:inset 0 0 0 1px #d3dd87}.revival-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}.revival-footer>span{font-size:14px;color:#c7d2b8}.revival-footer .primary{min-width:110px}
@media(max-width:720px){.tower-resource-budget .tower-wallet{gap:8px}.tower-resource-budget .tower-wallet>div{align-items:flex-start}.tower-resource-budget .tower-wallet b{font-size:23px}.tower-battle-hud.tower-wallet{gap:8px;margin-bottom:8px}body:has(#towerBattleHud:not([hidden])) .arena-column{width:min(100%,calc(100dvh - 253px))!important}.guild-rest .tower-event-options button{padding:16px 8px}#towerRevival{padding:16px}.revival-units{gap:8px}.revival-unit{flex-basis:105px;padding:13px 6px}.revival-unit .portrait{height:43px;width:43px;font-size:30px}.revival-unit>b{font-size:13px}}
body:has(#towerBattleHud:not([hidden])) #battleScreen[data-turning=hold] .battle-layout .arena-column{width:min(calc(100vw - 410px),calc(100dvh - 253px))!important}
@media(max-width:720px){#battleScreen[data-turning=hold] .tower-battle-hud.tower-wallet:not([hidden]){display:grid}body:has(#towerBattleHud:not([hidden])) #battleScreen[data-turning=hold] .battle-layout .arena-column{width:min(100%,calc(100dvh - 415px))!important}}

/* V56: the same guild strip across tower rooms and shop tabs. */
.tower-character-strip{flex-shrink:0;max-width:100%}.tower-body[data-phase=rest],.tower-body[data-phase=event]{display:flex;flex-direction:column;overflow:hidden}.tower-body[data-phase=rest] .tower-prep-heading,.tower-body[data-phase=event] .tower-prep-heading{margin-bottom:10px}.tower-body[data-phase=rest]>.tower-event,.tower-body[data-phase=event]>.tower-event{min-height:0;flex:1;overflow-y:auto;justify-content:center;padding-top:8px}.tower-body[data-phase=event] .tower-event-options{grid-template-columns:repeat(2,minmax(0,1fr));max-width:580px}.tower-body[data-phase=rest] .tower-event-options,.tower-body[data-phase=event] .tower-event-options{margin-top:0;flex-shrink:0}.tower-body[data-phase=predictionEvent]>.tower-character-strip{margin-bottom:4px}#returnSetup[hidden]+#battleModeLabel{margin-right:auto}
@media(max-width:720px){.tower-body[data-phase=rest],.tower-body[data-phase=event]{padding:12px;gap:6px}.tower-body[data-phase=rest] .tower-prep-heading,.tower-body[data-phase=event] .tower-prep-heading{margin-bottom:0}.tower-body[data-phase=rest] .tower-prep-heading .primary{min-width:90px;padding:10px 12px;gap:15px}.tower-body[data-phase=rest]>.tower-event,.tower-body[data-phase=event]>.tower-event{justify-content:flex-start;padding-top:4px;gap:8px}.tower-body[data-phase=rest] .tower-event-options,.tower-body[data-phase=event] .tower-event-options{gap:7px}.tower-body[data-phase=rest] .tower-event-options button,.tower-body[data-phase=event] .tower-event-options button{padding:10px 6px;gap:5px}.tower-body[data-phase=rest] .tower-event-options button>span,.tower-body[data-phase=event] .tower-event-options button>span{font-size:26px}.tower-body[data-phase=rest] .tower-event-options small{line-height:1.5}.tower-body[data-phase=predictionEvent] .tower-character-strip{padding-bottom:4px}}
.tower-player-hp em{transition:width .28s ease-out}
#towerItemInfo{width:min(360px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;padding:20px;background:#18251e;border:1px solid #81946a;border-radius:8px;color:var(--text)}
#towerItemInfo::backdrop{background:#080f13c4;backdrop-filter:blur(3px)}
#towerItemTitle{font-size:20px;line-height:1.3}.item-detail-icon{display:block;text-align:center;font-size:54px;margin:14px 0}.item-detail-description{font-size:15px;line-height:1.7;text-align:center;color:#e4e9d5;margin:12px 0 20px;word-break:keep-all}.item-detail-target{display:flex;flex-direction:column;gap:6px;padding:12px;background:#23352a;border:1px solid #4d624b;border-radius:5px}.item-detail-target b{font-size:14px}.item-detail-target small{color:#bdc9ac;font-size:12px}.item-detail-actions{display:grid;grid-template-columns:1fr 1.4fr;gap:8px;margin-top:18px}.item-detail-actions button{justify-content:center}
#towerFeedback{position:fixed;inset:0;z-index:100;pointer-events:none;overflow:hidden;contain:strict}
.wallet-flight{position:absolute;left:0;top:0;will-change:transform;line-height:1;opacity:0;font-family:'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji',sans-serif;font-size:25px;filter:drop-shadow(0 0 5px #ffdc7599)}
.wallet-flight-tokens{font-size:27px;filter:drop-shadow(0 0 6px #87ddff99)}
.wallet-flight-hp{width:8px;height:8px;background:#ff5f63;box-shadow:0 0 9px #ff4345,0 0 2px #ffe3e2;filter:none}
.wallet-flight-hp::after{content:'';position:absolute;right:5px;top:2px;width:18px;height:4px;background:linear-gradient(90deg,transparent,#ff505a99)}
.wallet-impact-spark{position:absolute;left:0;top:0;width:4px;height:4px;will-change:transform,opacity;pointer-events:none}
[data-wallet-kind]{border-radius:4px;transition:background-color .18s,box-shadow .18s}
[data-wallet-kind].wallet-hit{background:#c72b3a44;box-shadow:0 0 14px #ff334c88,inset 0 0 10px #f5484955;animation:wallet-impact .25s ease-out}
[data-wallet-kind].wallet-hit b{color:#ff8a91!important}[data-wallet-kind].wallet-hit>i{box-shadow:0 0 10px #ff3949}[data-wallet-kind].wallet-hit em{background:#ff515e}
[data-wallet-kind].wallet-gain{background:#e7c57524;box-shadow:0 0 12px #ffe49d66}[data-wallet-kind="tokens"].wallet-gain{background:#85dfff24;box-shadow:0 0 12px #a1ecff77}
[data-wallet-kind].wallet-spend{background:#e7c57518;box-shadow:inset 0 0 12px #ffe49d44}[data-wallet-kind="tokens"].wallet-spend{background:#85dfff18;box-shadow:inset 0 0 12px #a1ecff55}
.purchase-arrival{box-shadow:0 0 20px #ffe49d88,inset 0 0 18px #ffe49d30!important;opacity:1!important;transition:box-shadow .2s}
.hot-spring-event .tower-event-options{grid-template-columns:repeat(2,minmax(0,1fr));max-width:540px}.hot-spring-event .tower-event-options button:disabled{opacity:.4;cursor:not-allowed}.hot-spring-reward{display:flex;flex-direction:column;align-items:center;gap:16px;width:min(440px,100%);padding:28px 20px;border:1px solid #667656;border-radius:8px;background:radial-gradient(ellipse at top,#526a3633,#23332a)}.hot-spring-reward>span{font-size:64px}.hot-spring-reward p{color:#d6ebaf;word-break:keep-all}
@media(max-width:720px){.hot-spring-event .tower-event-options button{padding:18px 8px;gap:9px}.hot-spring-event .tower-event-options b{font-size:14px}.hot-spring-event .tower-event-options small{font-size:12px}.hot-spring-reward{padding:20px 14px}}
@keyframes wallet-impact{0%,100%{transform:translateX(0)}20%{transform:translateX(-3px)}45%{transform:translateX(3px)}70%{transform:translateX(-1px)}}
@media(prefers-reduced-motion:reduce){.tower-player-hp em,[data-wallet-kind]{transition:none}[data-wallet-kind].wallet-hit{animation:none}.wallet-flight-hp::after{display:none}}

.inventory-slot,#towerItemInfo button{-webkit-tap-highlight-color:transparent}

/* Floor conquest progress fills the reward button border clockwise. */
.conquest-button{padding:2px;border:0;border-radius:7px;background:conic-gradient(from 0deg,#b6e78b 0deg var(--conquest-angle),#53634c var(--conquest-angle) 360deg);flex-shrink:0;font-size:12px;box-shadow:0 2px 0 #111b15}
.conquest-button>span{display:block;background:#233229;padding:8px 12px;border-radius:5px;color:#d8e7c5}
.conquest-button:hover>span,.conquest-button:focus-visible>span{background:#354a30}.conquest-button.received>span{color:#c7f39b}
.conquest-button:focus-visible{outline:2px solid #ffe49f;outline-offset:3px}
#towerConquest{width:min(390px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;padding:22px;background:#18251e;border:1px solid #81946a;border-radius:9px;color:var(--text)}
#towerConquest::backdrop{background:#080f13cc;backdrop-filter:blur(3px)}
#towerConquestTitle{font-size:20px}.conquest-progress{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;margin:24px 0;color:#e4eed6}.conquest-progress>span{color:#b7dc8f;font-size:14px}.conquest-progress>div{width:100%;height:9px;border-radius:6px;background:#35452e;overflow:hidden}.conquest-progress i{display:block;height:100%;background:linear-gradient(90deg,#83b260,#c5e99b);border-radius:6px}
.conquest-rewards{list-style:none;padding:0;margin:0;display:grid;gap:10px}.conquest-rewards li{display:flex;align-items:center;gap:10px;padding:13px 10px;border:1px solid #465e3e;border-radius:6px;background:#25382a}.conquest-rewards li>span{font-size:23px}.conquest-rewards b{font-size:14px}.conquest-rewards small{margin-left:auto;white-space:nowrap;color:#c2d79a;font-size:10px}
.conquest-status{margin:22px 0 8px;text-align:center;font-size:14px;color:#c3ceba}.conquest-status.received{color:#bde492}.conquest-unlock{display:block;text-align:center;font-size:12px;color:#95a98d}
.tower-scene[data-kind=conquest] .tower-scene-content>small{white-space:pre-line;line-height:1.7}.tower-scene[data-kind=recruit]{cursor:pointer;touch-action:manipulation}
@media(max-width:720px){.conquest-button{font-size:11px}.conquest-button>span{padding:7px 8px}#towerConquest{padding:18px}.conquest-rewards li{padding:12px 8px}.conquest-rewards b{font-size:13px}}

.conquest-button,#towerConquest button{-webkit-tap-highlight-color:transparent}

/* Keep expedition actions together, including on narrow screens. */
.tower-heading-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}.tower-heading-actions #towerAbandon{color:#ff9b96;border-color:#70484a}.tower-heading-actions #towerAbandon:hover{background:#493032;border-color:#e37c77}
#towerAbandonConfirm h2{font-size:20px;line-height:1.5;margin:0}#towerAbandonNote{color:var(--muted);font-size:14px;margin:12px 0 24px}#confirmTowerAbandon{background:#bd484d;color:#fff;border-color:#df777b}#confirmTowerAbandon:hover{background:#d3565c}
@media(max-width:720px){.tower-heading{flex-wrap:wrap;gap:8px}.tower-heading-actions{gap:6px;margin-left:auto}.tower-heading-actions button{white-space:nowrap}.tower-heading h1{font-size:19px}}

.unit-settings-tabs{display:flex;border-bottom:1px solid #4a5c46;gap:6px;margin-bottom:14px}.unit-settings-tabs button{flex:1;background:transparent;padding:9px;color:#a8b9a0;border-bottom:2px solid transparent;font-size:14px;font-weight:700}.unit-settings-tabs [aria-selected=true]{color:#ffce91;border-bottom-color:#ffce91;background:#2b3627}
.custom-equipment-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}.custom-equipment-heading b{font-size:14px}.custom-equipment-heading b span{color:#ffce91;margin-left:6px}.custom-equipment-heading small{font-size:11px;color:#a8b9a0}.custom-equipment-slots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:16px}.custom-equipment-slots>button,.custom-equipment-empty{min-width:0;height:64px;display:flex;align-items:center;gap:7px;padding:10px;background:#2f3928;border:1px solid #a89765;border-radius:6px}.custom-equipment-slots b{font-size:12px;word-break:keep-all}.custom-equipment-slots span{font-size:25px}.custom-equipment-slots i{font-style:normal;color:#ffaaa0;margin-left:auto;font-size:20px}.custom-equipment-empty{border:1px dashed #52624c;background:#1b2b20;justify-content:center;color:#8e9e86}.custom-equipment-empty small{font-size:12px}.custom-item-library{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.custom-item-library button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;background:#223429;border:1px solid #4b6046;border-radius:6px;padding:10px 3px;min-width:0}.custom-item-library button:hover{background:#35432e}.custom-item-library span{font-size:27px}.custom-item-library b{font-size:11px;word-break:keep-all}.custom-item-library [aria-pressed=true]{background:#4b3e29;border-color:#ebc27a}.custom-item-detail{margin:12px 0;min-height:80px;padding:12px;background:#152219;border:1px solid #46583f;border-radius:6px;display:flex;align-items:center;justify-content:space-between;gap:12px}.custom-item-detail b{font-size:13px}.custom-item-detail p{font-size:12px;line-height:1.6;margin-top:4px}.custom-item-detail .primary{min-width:70px;padding:10px 12px;font-size:12px;justify-content:center;white-space:nowrap}
@media(max-width:400px){.custom-equipment-slots>button{padding:7px;gap:5px}.custom-equipment-slots b{font-size:11px}.custom-item-library{gap:5px}.custom-item-library b{font-size:10px}.custom-equipment-heading small{font-size:10px}}

.equipment-stats{display:flex;flex-wrap:wrap;gap:4px 12px;margin:-5px 0 12px;font-size:11px;color:#a8b9a0}.equipment-stats b{color:#8fe9a9;font-weight:700;margin-left:3px}
/* Manual transcendence controls sit below the arena and remain visible during strategy. */
.transcendence-bar{display:flex;gap:7px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:6px 3px 4px;margin-top:5px;border-top:1px solid #536c783b;min-height:66px;touch-action:pan-x}
.trans-unit{flex:0 0 54px;display:flex;flex-direction:column;align-items:center;gap:3px;border:1px solid #3b535c;border-radius:7px;background:#1c2d32;padding:4px;user-select:none;-webkit-user-select:none;touch-action:pan-x}
.trans-avatar{width:31px;height:31px;display:grid;place-items:center;font-size:25px;line-height:1;border-radius:50%;background:#23363e}
.trans-meter{display:block;width:100%;height:4px;border-radius:3px;background:#0a171f;overflow:hidden}.trans-meter em{display:block;height:100%;background:linear-gradient(90deg,#8052d4,#cd9bff);border-radius:3px}.trans-unit small{font-size:9px;line-height:1;color:#bdcad2}
.trans-unit.ready{border-color:#c993ff;box-shadow:inset 0 0 14px #b65cff26;touch-action:none}.trans-unit.ready .trans-avatar{background:#46305e}.trans-unit.ready .trans-meter em{background:linear-gradient(90deg,#a16dff,#e2beff)}.trans-unit.ready small{color:#e1bdff}.trans-unit.locked{opacity:.65}.trans-unit.dead{opacity:.28}.trans-unit.selected{outline:2px solid #8ebff3;outline-offset:-2px}
.trans-joystick{position:fixed;z-index:110;transform:translate(-50%,-50%);width:104px;height:104px;border:2px solid #c695ff80;border-radius:50%;background:#23133ead;pointer-events:none;box-shadow:0 0 30px #a1d7ff22}.trans-joystick::before{content:'';position:absolute;inset:19px;border:1px dashed #d8ebff55;border-radius:50%}.trans-joystick i{position:absolute;left:35px;top:35px;width:30px;height:30px;border:2px solid #e8f5ff;border-radius:50%;background:#9d6ac4bd;transform:translate(var(--stick-x,0px),var(--stick-y,0px));box-shadow:0 0 16px #bde7ff66}.trans-joystick[data-outside=true]{border-color:#d7aaff}.trans-joystick[data-outside=true] i{background:#b785e1d9;border-color:#edd6ff}
#battleScreen[data-transcend] .turning-panel{pointer-events:none;opacity:.55}#battleScreen[data-transcend=cast] .transcendence-bar{pointer-events:none}
body:has(#transcendenceBar:not([hidden])) .arena-column{width:min(100%,calc(100dvh - 250px))!important}
body:has(#towerBattleHud:not([hidden])):has(#transcendenceBar:not([hidden])) .arena-column{width:min(100%,calc(100dvh - 325px))!important}
body:has(#transcendenceBar:not([hidden])) #battleScreen[data-turning=hold] .battle-layout .arena-column{width:min(calc(100vw - 410px),calc(100dvh - 325px))!important}
@media(max-width:720px){body:has(#transcendenceBar:not([hidden])) #battleScreen[data-turning=hold] .battle-layout .arena-column{width:min(100%,calc(100dvh - 455px))!important}.transcendence-bar{gap:6px;min-height:64px}.trans-unit{flex-basis:50px}#battleScreen[data-turning=hold] .turning-panel{max-height:220px}}

/* V82: compact strategy controls, purple readiness and a skill cut-in. */
.trans-unit{position:relative;box-shadow:inset 2px 0 var(--trans-team,#9b83bf)}.trans-unit::after{content:'';position:absolute;top:3px;right:3px;width:4px;height:4px;border-radius:50%;background:var(--trans-team,#9b83bf);pointer-events:none}
.trans-avatar{position:relative;overflow:visible}.trans-glyph{position:relative;z-index:1}
.trans-ready-fx{display:none;position:absolute;inset:0;pointer-events:none}.ready .trans-ready-fx{display:block}
.trans-ready-fx::before,.trans-ready-fx::after{content:'';position:absolute;inset:-2px;border:1px solid #daafff;border-radius:50%;box-shadow:0 0 6px #b879ff7a;animation:transReadyWave 1.7s ease-out infinite}.trans-ready-fx::after{animation-delay:.85s}
.trans-ready-fx i{position:absolute;left:calc(50% - 2px);top:calc(50% - 2px);height:3px;width:3px;background:#e8c8ff;box-shadow:0 0 4px #ca7fff;--angle:calc(var(--spark)*60deg);animation:transReadySpark 1.7s ease-out infinite;animation-delay:calc(var(--spark)*-.23s)}
@keyframes transReadyWave{0%{transform:scale(.6);opacity:0}20%{opacity:.75}100%{transform:scale(1.5);opacity:0}}
@keyframes transReadySpark{0%{transform:rotate(var(--angle)) translateX(13px);opacity:0}25%{opacity:.9}100%{transform:rotate(var(--angle)) translateX(25px) rotate(90deg);opacity:0}}
.trans-practice{position:sticky;left:0;z-index:2;flex:0 0 61px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;background:#362644;border:1px solid #8765a3;border-radius:7px;padding:4px;box-shadow:4px 0 9px #101619}.trans-practice span{font-size:24px}.trans-practice small{font-size:9px;color:#e1c5fa;white-space:nowrap}
.trans-cutin{position:fixed;left:0;bottom:28px;width:min(440px,72vw);height:190px;z-index:112;pointer-events:none}
.trans-cutin-shape{position:absolute;inset:0;display:flex;align-items:center;padding-left:clamp(28px,7vw,80px);background:linear-gradient(108deg,#b27affee 0%,#62329bcc 44%,#22133133 82%,transparent);clip-path:polygon(0 14%,86% 0,100% 24%,91% 82%,0 100%);animation:transCutinEnter .25s cubic-bezier(.2,.85,.2,1) both}
.trans-cutin-shape::before{content:'';position:absolute;inset:12% 8% 12% 0;background:linear-gradient(125deg,transparent 28%,#e6caff44 28.5%,transparent 29.5%,transparent 52%,#b68aff55 52.5%,transparent 54%);pointer-events:none}
.trans-cutin-shape::after{content:'';position:absolute;left:5%;right:30%;bottom:17%;height:2px;background:linear-gradient(90deg,#f2dcff,transparent);transform:rotate(-8deg)}
#transCutinIcon{font-size:110px;line-height:1;filter:drop-shadow(0 8px 9px #1c063988);transform:rotate(-8deg);animation:transCutinIcon .3s ease-out both}
@keyframes transCutinEnter{from{transform:translateX(-100%)}to{transform:translateX(0)}}
@keyframes transCutinIcon{from{transform:translateX(-25px) rotate(-16deg) scale(.8)}to{transform:translateX(0) rotate(-8deg) scale(1)}}
body:has(#battleScreen[data-transcend=cast]) header,
#battleScreen[data-transcend=cast] :is(.battle-heading,.tower-battle-hud,.arena-top,.toolbar,.transcendence-bar,.turning-panel,.kill-overlay){visibility:hidden;pointer-events:none}
body:has(#battleScreen[data-transcend=cast]) #towerFeedback{visibility:hidden}
@media(max-width:720px){
 #battleScreen[data-turning=hold] .battle-layout{gap:6px}
 #battleScreen[data-turning=hold] .tower-battle-hud.tower-wallet{padding:7px 12px;margin-bottom:6px}
 #battleScreen[data-turning=hold] .tower-wallet b{font-size:22px}
 #battleScreen[data-turning=hold] .turning-panel{padding:7px 8px;max-height:178px;min-height:0;overflow-y:auto}
 .turning-title{margin-bottom:4px;min-height:28px}.turning-title h2{font-size:12px}.turning-title h2 span{font-size:17px}.turning-title button{min-height:28px;padding:4px 9px}
 .turning-selection{margin-bottom:4px;align-items:center}.turning-selection b{font-size:11px;white-space:nowrap}.turning-selection span{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .turning-stances{gap:4px}.turning-stances button{min-height:32px;font-size:10px;padding:5px 2px}
 .strategy-message{min-height:0;line-height:1.4;font-size:10px;margin:4px 0}
 .turning-cards{margin-top:5px;padding-bottom:0;min-height:44px}.strategy-card{flex:0 0 94px;min-height:44px;flex-direction:row;gap:5px;padding:5px;justify-content:center}.strategy-card span{font-size:21px}.strategy-card b{font-size:11px;white-space:nowrap}.strategy-card small,.strategy-card em{display:none}.turning-cards>p{font-size:11px;align-self:center}
 .transcendence-bar{min-height:56px;padding:4px 3px 3px;margin-top:4px;gap:6px}.trans-unit{flex-basis:48px;padding:3px;gap:2px}.trans-avatar{width:28px;height:28px;font-size:23px}
 body:has(#transcendenceBar:not([hidden])) #battleScreen[data-turning=hold] .battle-layout .arena-column{width:min(100%,var(--turning-arena,calc(100dvh - 320px)))!important}
 .trans-cutin{height:130px;bottom:18px;width:min(290px,78vw)}#transCutinIcon{font-size:80px}
}
@media(prefers-reduced-motion:reduce){.trans-ready-fx::before,.trans-ready-fx::after,.trans-ready-fx i{animation:none;opacity:.5}.trans-cutin-shape,#transCutinIcon{animation:none}}

/* V83: map actions live in compact menu and guild dialogs. */
.tower-heading-actions .tower-round-button{width:44px;height:44px;border-radius:50%;padding:0;display:grid;place-items:center;background:#26342d;border:1px solid #677759;color:#e5dfc3;flex-shrink:0}
.tower-round-button,#towerMenu button,#towerUnits button{-webkit-tap-highlight-color:transparent}
.tower-round-button:hover{background:#40503a;border-color:#d8bf86}.tower-round-button svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.tower-round-button>span{font-size:23px;line-height:1}
.dialog-close{display:grid;place-items:center;width:32px;height:32px;flex-shrink:0;border-radius:50%;font-size:25px;background:transparent;color:#bbccbc}.dialog-close:hover{background:#334538}
#towerMenu{width:min(300px,calc(100vw - 32px));padding:20px}#towerMenu .panel-heading{margin-bottom:16px}.tower-menu-actions{display:grid;gap:10px}.tower-menu-actions button{display:flex;align-items:center;gap:12px;text-align:left;min-height:48px;font-size:14px;padding:12px 16px}.tower-menu-actions button span{font-size:22px}.tower-menu-actions #towerAbandon{color:#ffaaa0;border-color:#734c48;background:#3a2d29}.tower-menu-actions #towerAbandon:hover{background:#51352f}
#towerUnits{width:min(760px,calc(100vw - 32px));height:min(710px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);padding:20px;overflow:hidden}
#towerUnits[open]{display:flex;flex-direction:column;gap:10px}#towerUnits>.panel-heading{margin-bottom:0;flex-shrink:0}#towerUnits .tower-wallet{padding:8px 14px;gap:8px}#towerUnits .tower-wallet>div{gap:6px}#towerUnits .tower-wallet b{font-size:23px}#towerUnits .tower-wallet span{font-size:12px}
.tower-unit-tabs{margin-bottom:0;flex-shrink:0}.tower-unit-tabs button{flex:1;white-space:nowrap}
#towerUnitsContent{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}#towerUnitsPane{min-height:0;flex:1;overflow:auto;margin-top:0;padding-top:0;border-top:0}
#towerUnitsPane .guild-grid{grid-template-columns:repeat(4,minmax(0,1fr));min-height:0;align-content:start}
#towerUnitsContent:has(.inventory-grid) #towerUnitsPane{display:flex;flex-direction:column;overflow:hidden}#towerUnitsContent>.tower-character-strip{margin-bottom:10px}
#towerUnitsMessage{min-height:0;line-height:1.4;font-size:12px}#towerUnitsMessage:empty{display:none}
@media(max-width:720px){
 .tower-heading{flex-wrap:nowrap;gap:8px}.tower-heading>div:first-child{min-width:0;flex:1}.tower-heading h1{font-size:18px}.tower-heading-actions{gap:6px;margin-left:0}
 #towerUnits{width:calc(100vw - 20px);height:calc(100dvh - 32px);max-height:calc(100dvh - 32px);padding:12px}
 #towerUnits[open]{gap:8px}#towerUnits .tower-wallet{padding:7px 10px}.tower-unit-tabs button{font-size:12px;padding:9px 4px}
 #towerUnitsPane .guild-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #towerUnitsContent>.tower-character-strip{margin-bottom:7px}.tower-character-strip.inventory-characters button{flex-basis:70px}
 #towerUnits .inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:72px;gap:6px}#towerUnits .inventory-heading{align-items:flex-start}#towerUnits .inventory-heading b{font-size:12px}#towerUnits .inventory-heading span{font-size:10px;text-align:right}#towerUnits .inventory-help{font-size:10px;margin:5px 0 8px}
 #towerUnits .tower-upgrade{max-width:none;padding:12px;gap:12px}#towerUnits .upgrade-stats strong{font-size:17px}
}
@media(max-width:400px){.tower-heading h1{font-size:16px}.tower-heading .eyebrow{font-size:10px}.tower-heading-actions .tower-round-button{width:42px;height:42px}}
