@font-face{font-family:Inter;src:url('/kingdom/fonts/inter-latin.woff2') format('woff2');font-weight:100 900;font-display:swap}
:root{color-scheme:dark;--background:#111715;--panel:#171d19;--line:#30382e;--gold:#dabb83;--text:#efeee5;--muted:#939c8e;--green:#91c7a4;--red:#df8b81}
*{box-sizing:border-box}body{margin:0;background:var(--background);color:var(--text);font-family:Inter,system-ui,sans-serif;font-size:13px}button,select{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}button,a,select{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,select:focus-visible{outline:2px solid #f6dba4;outline-offset:4px}button{color:inherit}button[hidden],[hidden]{display:none!important}button:hover:not(:disabled){filter:brightness(1.12)}
.app-header{height:88px;padding:0 30px;display:flex;align-items:center;border-bottom:1px solid var(--line);background:linear-gradient(100deg,#1b231c,#121917 65%);gap:40px}.brand{display:flex;align-items:center;gap:13px;text-decoration:none;color:var(--text);width:238px;letter-spacing:3px;font-size:21px;font-weight:450;white-space:nowrap}.brand img{width:42px;height:48px}.brand b{color:var(--gold);font-weight:550}.brand small{display:block;font-size:8px;letter-spacing:2px;color:var(--muted);margin-top:7px}.map-heading{border-left:1px solid var(--line);padding-left:28px;display:grid;gap:7px}.map-heading strong{font-size:18px;font-weight:500}.eyebrow{font-size:9px;letter-spacing:1.8px;color:var(--muted);font-weight:600}.connection{margin-left:auto;display:flex;align-items:center;gap:9px;color:#a9b5a3;font-size:11px}.connection i,.status-dot{display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--green);box-shadow:0 0 9px #91c7a440}.connection span{color:#606c5d;margin-left:16px}
.app-shell{height:calc(100dvh - 88px);min-height:650px;display:flex}.roster-panel{width:278px;flex-shrink:0;border-right:1px solid var(--line);padding:30px 23px 20px;background:linear-gradient(150deg,#1d251e,#141b17);display:flex;flex-direction:column}.panel-heading{display:flex;align-items:center;justify-content:space-between}.panel-heading h1{font-size:24px;font-weight:500;margin:9px 0 0;letter-spacing:-.6px}.count-badge{border:1px solid #434c3c;color:var(--gold);padding:8px 10px;font-size:11px;border-radius:5px}.roster-help{font-size:11px;line-height:1.8;color:var(--muted);margin:17px 0 21px}.hero-roster{display:grid;gap:12px}.hero-card{--hero:#e4ba77;position:relative;display:flex;align-items:center;overflow:hidden;height:122px;border:1px solid #364030;border-radius:8px;background:radial-gradient(ellipse at 0% 85%,#3a4130,#20271e 68%);text-align:left;padding:12px 12px 12px 91px;transition:border-color .2s,background .2s}.hero-card.priest{--hero:#81dab6;background:radial-gradient(ellipse at 0% 85%,#2b4638,#1b2923 68%)}.hero-card.archer{--hero:#a4b9ff;background:radial-gradient(ellipse at 0% 85%,#353f55,#20252b 68%)}.hero-card[aria-pressed=true]{border-color:var(--hero);box-shadow:0 0 0 1px color-mix(in srgb,var(--hero) 18%,transparent),inset 0 0 30px #d4b77c07}.hero-card img{position:absolute;left:-15px;bottom:-11px;width:126px;height:142px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 5px 9px #0008)}.hero-info{display:grid;gap:6px;position:relative}.hero-role{font-size:7px;font-weight:650;letter-spacing:1.2px;color:var(--hero)}.hero-info strong{font-size:19px;font-weight:500;letter-spacing:-.4px}.hero-info small{font-size:9px;color:#a8aea2}.hero-skill{font-size:9px;color:var(--hero);margin-top:8px}.hero-check{position:absolute;top:9px;right:9px;font-size:9px;color:var(--hero)}.hero-card.unplaced .hero-check{opacity:0}.formation-tools{display:flex;align-items:center;justify-content:space-between;padding-top:14px;gap:4px}.text-button{background:none;border:0;color:var(--muted);font-size:10px;padding:7px 0;text-decoration:underline;text-underline-offset:4px;text-decoration-color:#58624c}.tactics-note{border-top:1px solid var(--line);margin-top:24px;padding-top:19px}.tactics-note .eyebrow{color:#c4ac79;font-size:8px}.tactics-note p{color:var(--muted);font-size:10px;line-height:1.9;max-width:210px;margin-top:10px}.roster-footer{margin-top:auto;padding-top:14px;color:#737f70;font-size:8px;display:flex;align-items:center;gap:8px}
.battle-panel{min-width:0;flex:1;display:flex;flex-direction:column;padding:0 25px 0;background:#101613}.battle-toolbar{height:66px;flex-shrink:0;display:flex;align-items:center;gap:19px}.phase-tag{font-size:9px;letter-spacing:1.7px;color:var(--gold);display:flex;gap:8px;align-items:center}.phase-tag i{width:5px;height:5px;background:var(--gold);transform:rotate(45deg)}#battle-hint{color:#7f8a79;font-size:10px}.timer{margin-left:auto;display:flex;gap:10px;align-items:center;font-variant-numeric:tabular-nums}.timer span{font-size:8px;letter-spacing:1px;color:#6f7c69}.timer b{font-size:17px;letter-spacing:1px;font-weight:450}.arena-stage{position:relative;isolation:isolate;flex:1;min-height:325px;overflow:hidden;border:1px solid #4a4e3b;border-radius:9px;background:#29372b}.arena-stage canvas{width:100%;height:100%;display:block;position:absolute;inset:0}.scene-vignette{position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 110px #0007;background:linear-gradient(#0a15175c,transparent 26%,transparent 80%,#0a151777)}.team-banner{position:absolute;top:20px;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:35px;pointer-events:none;white-space:nowrap;text-shadow:0 2px 6px #000}.team-banner>div{display:grid;gap:5px;text-align:center}.team-banner>div>span{font-size:8px;letter-spacing:1.4px;color:#c8d8c3}.team-banner>div:last-child>span{color:#f1c4ba}.team-banner b{font-size:12px;font-weight:500}.versus{font-family:Georgia,serif;font-size:17px;font-style:italic;color:#b6ba9f}.slot-layer,.unit-labels{position:absolute;inset:0;pointer-events:none}.slot-button{pointer-events:auto;position:absolute;transform:translate(-50%,-50%);width:66px;height:43px;border:0;background:transparent;border-radius:50%;color:#dde3cb88;font:10px Inter,system-ui;transition:background .15s}.slot-button:hover,.slot-button.drag-over{background:#d4c79533;box-shadow:0 0 15px #f2d99f33}.slot-button.occupied{color:transparent}.unit-label{position:absolute;transform:translate(-50%,-100%);min-width:58px;text-align:center;white-space:nowrap;filter:drop-shadow(0 1px 3px #000)}.unit-label>span{font-size:9px;color:#f5edcf;font-weight:550}.unit-label.monsters>span{color:#f1c2b7;font-size:8px}.unit-health{height:4px;width:51px;background:#121713;border:1px solid #182b1e;margin:4px auto 0;border-radius:2px;overflow:hidden}.unit-health i{height:100%;display:block;background:#9aca9b}.monsters .unit-health i{background:#dd8b7d}.floating-number{position:absolute;transform:translate(-50%,-50%);font-weight:750;color:#fff0c6;font-size:16px;text-shadow:0 2px 4px #000;pointer-events:none}.floating-number.heal{color:#9dffbc}.ground-caption{position:absolute;bottom:48px;left:10%;right:10%;display:flex;justify-content:space-between;pointer-events:none}.ground-caption span{font-size:7px;letter-spacing:2px;color:#d3d7bb77}.camera-caption{position:absolute;bottom:17px;left:19px;display:flex;align-items:center;gap:8px;color:#c3ccb29c;font-size:7px;letter-spacing:1.3px}.camera-caption>span{font-size:12px;color:var(--gold)}.camera-caption i{width:3px;height:3px;background:#8c977a;border-radius:50%}
.encounter-bar{min-height:82px;display:flex;align-items:center;gap:25px;border-bottom:1px solid var(--line);padding:12px 0}.encounter-bar label{display:grid;gap:7px}.encounter-bar .eyebrow{font-size:8px}.encounter-bar select{color:#d9dccd;background:#1c241c;border:1px solid #35412f;border-radius:4px;padding:6px 26px 6px 8px;font-size:11px;max-width:100%}.encounter-bar p{font-size:10px;color:#8e9b84}.encounter-level{margin-left:auto;border:1px solid var(--line);padding:9px 12px;font-size:8px;letter-spacing:1px;color:#889779;white-space:nowrap}.encounter-level b{color:var(--gold);margin-left:9px;font-weight:500}.combat-feed{height:42px;display:flex;align-items:center;gap:17px;flex-shrink:0}.combat-feed .eyebrow{font-size:7px;color:#718366;white-space:nowrap}.combat-feed p{color:#9ca892;font-size:10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.battle-actions{min-height:79px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px;flex-shrink:0}.team-totals{display:flex;gap:23px;align-items:center}.team-totals>span{display:flex;align-items:center;gap:7px;font-size:8px;color:#96a189}.team-totals b{color:#dee5d3;font-size:15px;font-weight:500;font-variant-numeric:tabular-nums}.team-totals i{height:6px;width:6px;border-radius:50%;background:#95bd8e}.team-totals .enemies-total i{background:var(--red)}.action-buttons{display:flex;align-items:center;gap:9px}.primary-button,.secondary-button{display:inline-flex;justify-content:center;align-items:center;gap:15px;border-radius:5px;height:44px;white-space:nowrap}.primary-button{background:linear-gradient(120deg,#e6cf9a,#c6a364);color:#252a1f;border:1px solid #e3cd98;font-weight:650;font-size:13px;padding:0 30px;box-shadow:0 3px 15px #d6b47a12;min-width:175px}.primary-button span{font-size:19px}.secondary-button{background:#1c261e;color:#aabb9b;border:1px solid #3a4634;padding:0 15px;font-size:11px}.secondary-button span{color:#7f9075;font-size:10px}
.loading-screen,.pause-overlay,.result-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#16231bec;backdrop-filter:blur(7px);z-index:10;text-align:center;padding:22px}.loading-screen img{width:60px;margin-bottom:25px}.loading-screen h2{font-size:25px;font-weight:450;margin:13px 0 6px}.loading-screen p{font-size:11px;color:var(--muted);line-height:1.8;max-width:360px}.loading-screen progress{width:210px;height:3px;margin:18px 0 30px;accent-color:var(--gold);border:0;background:#394735}.loading-screen progress::-webkit-progress-bar{background:#394735}.loading-screen progress::-webkit-progress-value{background:var(--gold)}.pause-overlay{background:#101a14ba;z-index:8;pointer-events:none}.pause-overlay>span{font-size:40px;color:var(--gold)}.pause-overlay h2{font-size:23px;font-weight:500;margin-bottom:0}.pause-overlay p{color:var(--muted);font-size:11px}.result-overlay{background:#111c149e}.result-card{padding:25px 35px;width:min(390px,100%);border:1px solid #69724d;background:radial-gradient(ellipse at 50% 0,#374530,#18251b 70%);border-radius:11px;box-shadow:0 20px 50px #0005;display:flex;flex-direction:column;align-items:center}.result-symbol{font-size:46px;color:var(--gold);margin-bottom:10px}.result-card h2{font-family:Georgia,serif;font-weight:400;font-size:48px;color:#ead7a9;margin:8px 0}.result-card p{font-size:11px;color:#b0bca0;line-height:1.8;margin:0}.result-stats{display:flex;justify-content:space-between;width:100%;gap:20px;margin:20px 0;border-top:1px solid #485439;padding-top:20px}.result-stats>div{display:grid;gap:7px}.result-stats b{font-weight:450;font-size:20px;color:#e3dec9}.result-stats span{font-size:7px;letter-spacing:1px;color:var(--muted)}.result-card .primary-button{width:100%;margin-bottom:8px}.result-card .text-button{font-size:11px}.result-overlay.defeat .result-card{background:radial-gradient(ellipse at 50% 0,#493b33,#221d19 70%);border-color:#796457}
@media(min-width:1500px){.roster-panel{width:305px;padding:36px 28px 23px}.hero-card{height:142px;padding-left:106px}.hero-card img{width:144px;height:164px}.hero-info strong{font-size:23px}.hero-role{font-size:8px}.hero-info small,.hero-skill{font-size:10px}.hero-roster{gap:16px}.battle-panel{padding-left:30px;padding-right:30px}.app-shell{min-height:740px}.battle-toolbar{height:76px}}
@media(max-width:1100px){.roster-panel{width:235px;padding:24px 17px 16px}.hero-card{padding-left:78px;height:117px}.hero-card img{width:111px;height:127px;left:-18px}.hero-info strong{font-size:17px}.hero-role{font-size:6px}.hero-info small,.hero-skill{font-size:8px}.battle-panel{padding:0 15px}.battle-toolbar{gap:10px}#battle-hint{font-size:9px}.team-totals{gap:12px}.team-totals b{font-size:13px}.primary-button{min-width:142px;padding:0 20px}.encounter-bar p{display:none}.brand{width:210px}.app-header{gap:20px;padding:0 22px}}
@media(max-width:850px){.app-header{height:73px;padding:0 16px;gap:16px}.brand{font-size:17px;letter-spacing:2px;width:auto}.brand img{width:33px;height:41px}.brand small{font-size:6px}.map-heading{padding-left:16px}.map-heading strong{font-size:14px}.map-heading .eyebrow{font-size:6px}.connection{display:none}.app-shell{height:auto;min-height:calc(100dvh - 73px);flex-direction:column}.roster-panel{order:2;width:100%;border-right:0;border-top:1px solid var(--line);padding:20px}.battle-panel{padding:0 15px}.battle-toolbar{height:52px}.arena-stage{height:53dvh;min-height:330px;flex:none}.roster-help{margin:10px 0 14px}.hero-roster{grid-template-columns:repeat(3,1fr);gap:10px}.hero-card{height:116px}.tactics-note{margin-top:18px;padding-top:12px}.tactics-note p{max-width:none;margin:6px 0}.roster-footer{display:none}.formation-tools{justify-content:flex-start;gap:22px}.battle-actions{min-height:72px}.encounter-bar{min-height:71px}.combat-feed{height:35px}.result-card{padding:14px 22px}.result-symbol{font-size:28px;margin-bottom:5px}.result-card h2{font-size:35px}.result-stats{margin:12px 0;padding-top:12px}.team-banner{gap:24px}.ground-caption{bottom:43px}.roster-panel .panel-heading h1{font-size:20px}}
@media(max-width:520px){.app-header{gap:12px}.brand{font-size:15px;gap:9px}.brand small{letter-spacing:1.2px}.map-heading{margin-left:auto;padding-left:13px}.battle-panel{padding:0 9px}.battle-toolbar{gap:8px}#battle-hint{font-size:8px;max-width:150px;line-height:1.4}.phase-tag{font-size:8px;letter-spacing:.7px}.timer span{display:none}.timer b{font-size:13px}.arena-stage{height:45dvh;min-height:305px}.team-banner{top:15px;gap:18px}.team-banner>div>span{font-size:6px;letter-spacing:.7px}.team-banner b{font-size:9px}.unit-label>span{font-size:7px}.unit-label.monsters>span{font-size:6px}.unit-health{width:34px}.slot-button{width:36px;height:29px;font-size:8px}.ground-caption{left:6%;right:6%;bottom:39px}.ground-caption span{font-size:5px;letter-spacing:.8px}.camera-caption{font-size:6px;left:12px;bottom:13px;gap:5px;letter-spacing:.7px}.encounter-bar{min-height:68px}.encounter-bar select{font-size:10px}.combat-feed{gap:8px}.combat-feed p{font-size:9px}.battle-actions{gap:8px;flex-wrap:wrap;padding:12px 0;justify-content:space-between}.team-totals{gap:10px}.team-totals b{font-size:11px}.team-totals>span{font-size:6px;gap:4px}.team-totals i{width:4px;height:4px}.action-buttons{gap:5px}.primary-button{min-width:108px;padding:0 13px;font-size:11px;height:39px}.secondary-button{height:39px;padding:0 9px;font-size:10px}.secondary-button span{display:none}#edit-formation{font-size:8px;padding:0 7px}.roster-panel{padding:20px 13px}.hero-roster{gap:7px}.hero-card{height:169px;padding:105px 9px 9px;align-items:flex-end}.hero-card img{width:110px;height:124px;left:50%;transform:translateX(-50%);top:-6px;bottom:auto}.hero-info{gap:4px}.hero-info strong{font-size:16px}.hero-info small{display:none}.hero-role{font-size:6px;letter-spacing:.5px}.hero-skill{font-size:7px;margin-top:3px}.floating-number{font-size:12px}.result-card{padding:13px 23px;max-width:290px}.result-card h2{font-size:32px}.result-symbol{font-size:23px}.result-card p{font-size:9px}.result-stats b{font-size:17px}.result-stats span{font-size:6px}}
@media(max-height:650px) and (min-width:851px){.app-header{height:66px}.app-shell{height:auto;min-height:640px}.roster-panel{padding-top:22px}.battle-toolbar{height:50px}}
.result-card{padding:18px 28px;max-height:100%;overflow:auto}.result-symbol{font-size:30px;margin-bottom:7px}.result-card h2{font-size:40px}.result-stats{margin:14px 0;padding-top:14px}
body:not([data-phase=setup]) .unit-label.monsters>span{display:none}
.hero-card:disabled{opacity:.85}.floating-number{font-size:14px}
.hero-card{user-select:none}.hero-card:not(:disabled){cursor:grab}.hero-card:active:not(:disabled){cursor:grabbing}.drag-ghost{position:fixed;z-index:100;transform:translate(-50%,-140%);pointer-events:none;border:1px solid var(--gold);border-radius:5px;padding:10px 18px;background:#202d22ed;color:var(--gold);box-shadow:0 7px 25px #0008;font-size:12px}
@media(min-width:851px) and (min-height:651px){.app-shell{min-height:0}.roster-panel{overflow:auto}}
@media(min-width:851px) and (max-height:800px){.tactics-note,.roster-footer{display:none}.roster-panel{padding-top:22px}.roster-help{margin:12px 0 16px}}
@media(max-width:520px){.result-card{padding:12px 22px}.result-symbol{font-size:23px;margin-bottom:5px}.result-card h2{font-size:32px}.result-stats{margin:10px 0;padding-top:10px}.floating-number{font-size:11px}}
