/* The Firstborn: native game art, inked panels and raised controls. */
:root{--ink:#fff;--muted:#c0d0eb;--gold:#ffd44d;--line:#5275a7;--panel:#222e60;--red:#fa555a;--yellow:#ffce39;--green:#41d889;--blue:#48b8ff;font-family:Arial,"Segoe UI",sans-serif;background:#111b38}
body{background:radial-gradient(ellipse at 50% 0,#3f508a66,transparent 70%),linear-gradient(#111c3b55,#12274788),url('/assets/game/scene.webp') center/cover fixed;line-height:1.35}
.shell{max-width:480px;padding:0 12px calc(84px + env(safe-area-inset-bottom));min-height:100svh;background:linear-gradient(90deg,#0a133b33,transparent 30%,transparent 70%,#0a133b33)}
header{height:66px!important;border:2px solid #080d20;border-top:0;border-radius:0 0 14px 14px;margin:0 -8px;padding:0 10px;background:linear-gradient(#303c77,#1c2754);box-shadow:inset 0 -2px #657ab3,0 3px 0 #050b1e66}
.brand{gap:10px}.brand img{width:66px;height:60px;object-fit:contain}.brand span{font:900 12px/1.1 Arial,sans-serif;letter-spacing:.4px;color:#fff;text-shadow:0 2px #050b1e;margin:0;max-width:140px}
h1,h2,h3{font-family:Arial,"Segoe UI",sans-serif;font-weight:900;text-shadow:0 2px 0 #050918;line-height:1.12}
h1{font-size:25px}h2{font-size:21px}h3{font-size:15px}.section-title{margin:12px 0 9px!important}.section-title h2{font-size:21px!important}
.campaign-line{padding:8px 2px!important;font-size:10px;color:#c8d9ed;text-shadow:0 1px #000}.sub,.date{color:var(--muted)}
button{border:2px solid #080b17;border-radius:9px;background:linear-gradient(#ffe96c 0%,#ffcb34 48%,#e59215 100%);color:#fff;font-weight:900;text-shadow:0 2px 1px #53320d;box-shadow:inset 0 2px #fff4a1,inset 0 -3px #ae5c16,0 2px 0 #070b1b;min-height:42px;padding:8px 13px;transition:filter .12s,transform .12s}
button:hover:not(:disabled){filter:brightness(1.12)}button:active:not(:disabled){transform:translateY(2px)}button:disabled{opacity:.48}
button.secondary{background:linear-gradient(#375b96,#213769);color:#fff;box-shadow:inset 0 1px #83b8ec,inset 0 -3px #112247,0 2px #080c1d;border:2px solid #080b17;text-shadow:0 2px #101a35}
.icon-button{width:40px;height:40px;min-height:40px;font-size:25px;padding:0;background:linear-gradient(#31d9ff,#0078d2);border:2px solid #080b17;box-shadow:inset 0 2px #91efff,inset 0 -3px #005697;color:white}
button:focus-visible,summary:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #fff07a;outline-offset:3px}
.panel,.profile-compact,.more-detail,.battle-detail,.battle-arena,.front-panel,.personal-score{border:2px solid #080d20;border-radius:11px;background:linear-gradient(125deg,#273c70f5,#17254ced);box-shadow:inset 0 1px #6b8ec3,inset 0 -2px #101c3b,0 3px 0 #060c1c88}
.panel{padding:14px}.more-detail{padding:12px;margin:9px 0}.more-detail>summary{font-size:15px}.profile-compact{padding:12px}.more-buttons button{font-size:12px;min-height:42px}
input,select,textarea{border:2px solid #080d20;background:#101b38;color:#fff;box-shadow:inset 0 1px 3px #050817;border-radius:7px}
.home-screen{gap:8px}.home-screen>.section-title{margin:3px 0 0!important}
.hero.compact-hero{display:grid;grid-template-columns:52px minmax(0,1fr) 48px;column-gap:7px;align-items:center;min-height:76px!important;margin:0;padding:10px!important;border:2px solid #080d20;border-radius:11px;background:linear-gradient(110deg,#30477d,#1e2c58);box-shadow:inset 0 1px #7da5cc,0 2px #070b1b}
.compact-hero .royal-seal{grid-column:1;grid-row:1/4;width:52px;height:52px;object-fit:contain;filter:drop-shadow(0 3px 1px #0008)}
.compact-hero .eyebrow,.compact-hero h1,.compact-hero p.sub{grid-column:2;max-width:100%;margin:0}
.compact-hero h1{font-size:18px!important}.compact-hero .eyebrow{font-size:9px;letter-spacing:.5px;color:#c3dbfa}.compact-hero p.sub{font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-castle{grid-column:3;grid-row:1/4;width:48px;height:55px;object-fit:contain}
.front-panel{padding:10px}.front-panel .section-title{margin:0 0 7px!important;align-items:center}.front-panel .section-title h2{font-size:18px!important}.front-panel .section-title .date{font-size:9px;max-width:105px;text-align:right}
.duel{padding:10px 0}.duel+.duel{border-top:1px solid #5f7baa77;margin-top:8px;padding-top:17px}.compact-duel{padding:0}
.duel-sides{display:grid;grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr);align-items:center;gap:6px;text-align:center}
.duel-side{min-width:0}.duel-side h3{font-size:14px;color:var(--accent);margin:2px 0 3px}.duel-side strong{display:block;font-size:24px;font-weight:900;font-variant-numeric:tabular-nums;text-shadow:0 2px #060c20;overflow-wrap:anywhere}
.duel-side small{display:block;color:#cfdef4;font-size:10px;margin-top:3px}.duel-crest{display:grid;place-items:center;height:70px;background:radial-gradient(ellipse,var(--accent),transparent 70%);background-size:100% 60%;background-repeat:no-repeat;background-position:center bottom}
.duel-crest img{width:74px;height:70px;object-fit:contain;filter:drop-shadow(0 3px 1px #0009)}.duel-swords{width:40px;height:40px;object-fit:contain;filter:drop-shadow(0 2px #080b20)}
.compact-duel .duel-crest{height:58px}.compact-duel .duel-crest img{width:60px;height:58px}.compact-duel .duel-side strong{font-size:21px}
.battle-meter{display:flex;position:relative;height:19px;border:2px solid #040b1a;border-radius:7px;overflow:hidden;background:#182441;margin-top:10px;box-shadow:0 1px #7c9bcb,inset 0 2px #0008}
.meter-fill{display:block;flex-shrink:0;min-width:0;background:linear-gradient(#ffffff6b,transparent 55%,#0005),var(--accent);box-shadow:inset 0 1px #ffffff99;transition:width .5s ease}
.meter-fill+.meter-fill{box-shadow:inset 2px 0 #061024,inset 0 1px #ffffff99}.meter-mid{position:absolute;left:50%;top:0;height:4px;border-left:2px solid #fff9}.meter-empty{width:100%;background:repeating-linear-gradient(135deg,#314568 0 8px,#283959 8px 16px)}
.meter-caption{display:flex;justify-content:space-between;gap:6px;font-size:10px;color:#d4e3f9;margin-top:5px;min-height:13px}.meter-caption>span:first-child,.meter-caption>span:last-child{font-weight:800;color:white}
.personal-score{padding:10px;gap:6px}.personal-score>div{position:relative;padding-left:31px}.personal-score>div>img{position:absolute;left:0;top:4px;width:25px;height:28px;object-fit:contain}.personal-score span{font-size:10px}.personal-score strong{font-size:22px;color:white}.personal-score p{font-size:10px;background:#142f3b;border:1px solid #348470;color:#b4f6bb;padding:5px;border-radius:5px;margin-top:3px}
.standing-grid{gap:6px}.standing-tile{background:linear-gradient(120deg,#263b6b,#17244b);border:2px solid #080d20;box-shadow:inset 0 1px #5876a6;border-radius:8px;padding:6px;gap:5px;min-height:48px}.standing-tile>span{color:var(--gold);font-weight:900}.standing-tile img{width:28px;height:30px}.standing-tile b{font-size:10px}.standing-tile small{font-size:9px}.standing-tile strong{color:#fff;font-size:19px}
.kingdom-grid{gap:10px;margin-top:4px}.kingdom-grid .kingdom-card{position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:stretch;border:2px solid #080d20;border-radius:12px;padding:10px;margin:0;background:radial-gradient(ellipse at 50% 5%,color-mix(in srgb,var(--accent),transparent 55%),transparent 65%),linear-gradient(#253a6b,#142441);box-shadow:inset 0 0 0 1px var(--accent),0 4px 0 #060e26;overflow:hidden}
.kingdom-grid .kingdom-card:before{content:'';position:absolute;z-index:-1;inset:5px 0 85px;background:url('/assets/game/castle.webp') center 12%/120px auto no-repeat;opacity:.18}
.kingdom-grid .kingdom-card>img{align-self:center;float:none;width:82px;height:79px;object-fit:contain;margin:0 auto 4px;filter:drop-shadow(0 3px 2px #0008)}
.kingdom-grid .kingdom-card h3{text-align:center;font-size:15px;color:var(--accent);margin:0 0 4px}.kingdom-grid .kingdom-card .sub{text-align:center;font-size:10px;color:#d8e7fa}.mine-label{font-size:9px;min-height:15px;color:#ffe76a;margin:3px 0;text-align:center}
.kingdom-grid .kingdom-card button{font-size:11px;min-height:36px;padding:6px 3px;margin-top:6px}.kingdom-grid .my-kingdom{outline:2px solid #ffe55c;outline-offset:1px}
.package-choice{border:2px solid #080d20;border-radius:10px;box-shadow:inset 0 0 0 1px #36bfe9,0 3px #080f24;background:linear-gradient(110deg,#174578,#1c2b5e);grid-template-columns:48px minmax(0,1fr) auto;padding:11px 9px;min-height:92px;gap:8px}.package-choice.selected{border-color:#080d20;box-shadow:inset 0 0 0 2px #ffe164,0 3px #080f24;background:linear-gradient(110deg,#605123,#222f57)}
.package-choice>img{width:48px;height:48px}.package-label h3{font-size:14px}.package-label>span{font-size:10px}.package-action button{min-height:39px;padding:6px;font-size:11px}
.package-choice .vote-first{background:linear-gradient(#89f454,#2fae2e);border-color:#071c0c;box-shadow:inset 0 2px #d0ffad,inset 0 -3px #1f6d21;color:white;text-shadow:0 2px #194b18}
.package-choice .vote-revote{background:linear-gradient(#ffe86c,#e79e17);border-color:#271900;box-shadow:inset 0 2px #fff3ab,inset 0 -3px #a96312;color:#281900;text-shadow:none;font-weight:800}
.package-choice .vote-current:disabled{background:#1b3b37;border-color:#86d5a8;box-shadow:none;color:#b7ffd0;text-shadow:none;opacity:1}
.text-button{color:#ffdf64!important;text-shadow:none!important;box-shadow:none!important}.reward-shares{padding:10px 5px;border:2px solid #080d20;border-radius:8px;background:#18274b;box-shadow:inset 0 1px #46669a}.reward-shares strong{color:#ffe265}.reward-hint{font-size:11px}.reward-eligibility{color:#b3fac8}
.battle-days{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin:10px 0}.battle-days button{min-width:0;padding:5px 0;background:linear-gradient(#344979,#1a2a54);box-shadow:inset 0 1px #6e91c1,inset 0 -2px #0c1731;font-size:11px;text-shadow:0 1px #000;color:#d4e2ff}.battle-days small{display:block;font-size:10px;line-height:14px;color:#a9c2ea}.battle-days .selected{background:linear-gradient(#ffe466,#e59116);color:white;box-shadow:inset 0 1px #fff5ae,inset 0 -2px #a96117}.battle-days .selected small{color:white}.battle-days .today{border-bottom-color:#4fe1ff}
.battle-arena{padding:12px;margin-top:8px!important}.arena-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:5px}.arena-heading h2{font-size:20px}.arena-heading .tag{font-size:9px;padding:3px 6px;border-radius:5px;border:1px solid #6b95be;background:#101c3e;color:#c7e7ff}.battle-outcome{font-size:11px;background:#101f3d;padding:8px;border:1px solid #557398;border-radius:6px;margin-top:10px}.battle-outcome p{margin-bottom:4px}.battle-outcome b{color:#ffe163}.battle-outcome small{color:#b8cee9}
.final-four{gap:8px}.final-four>div{border:1px solid var(--accent);border-radius:8px;background:linear-gradient(#2c3d69,#142344);padding:8px}.final-four img{height:50px;width:54px;object-fit:contain}.final-four h3{font-size:12px;color:var(--accent)}.final-four strong{font-size:21px}.front-status{font-size:10px;color:#c7d9f1}
dialog{border:3px solid #080d20;border-radius:14px;background:linear-gradient(#2c3e72,#152549);box-shadow:inset 0 0 0 1px #779bc4,0 10px 70px #000b;padding:18px;color:white;max-height:calc(100svh - 36px)}dialog::backdrop{background:#020a20c9;backdrop-filter:blur(3px)}dialog h2{font-size:21px}.reward-package{background:#122343}.reward-package-number{border-color:#e1bb53;background:#5a4524;font-weight:900}.reward-package-list{border-color:#5b7a9e}.reward-preview .reward-condition{font-size:11px}.reward-preview .actions{margin-top:12px}
.leaderboard-row.podium{border-width:2px;background:linear-gradient(100deg,var(--medal-bg),#152547)}.podium-1{--medal-bg:#755525;box-shadow:inset 0 1px #ffebac}.podium-2{--medal-bg:#405772}.podium-3{--medal-bg:#5e3829}.leaderboard-self{background:#123748;border-color:#48bda9}
.welcome-screen{background:none;gap:19px}.welcome-screen>img{filter:drop-shadow(0 6px 2px #02081bb3);width:230px;height:220px}.welcome-screen h1{font-size:27px}.welcome-screen p{color:#d5e6ff;font-size:14px;max-width:310px}.welcome-screen button{min-height:48px;max-width:300px;font-size:17px}.tutorial{border:2px solid #080e26;border-radius:12px;background:linear-gradient(#2b4077db,#13254be6);padding:18px 15px;margin-top:12px!important;box-shadow:inset 0 1px #6c92c4}.tutorial>img{width:140px;height:140px;filter:drop-shadow(0 4px #0005)}.tutorial>p:not(.eyebrow){color:#d9e7fa}.tutorial .eyebrow{font-weight:900;color:#ffe571}.rules{padding:13px 14px 13px 32px;border:2px solid #0a1028;border-radius:10px;background:#1c2e57ed;color:#d8e5fa}.rules li{padding:9px 0}
nav{max-width:480px;padding:0 4px env(safe-area-inset-bottom);gap:2px;background:#0e1833;border-top:2px solid #080c1c;backdrop-filter:none;box-shadow:0 -3px 8px #050a1e66}
nav button{position:relative;min-height:76px;margin-top:0;padding:6px 1px 7px;border:2px solid #080c1c;border-bottom:0;border-radius:11px 11px 0 0;background:linear-gradient(#343f78,#1e2a55);box-shadow:inset 0 1px #59c5e2,inset 1px 0 #4d639a;color:#fff;font-size:10px;font-weight:900;text-shadow:0 2px 1px #020713;letter-spacing:0}
nav button i{display:block;margin:0 auto 2px;height:36px;font-style:normal}nav button img{width:36px;height:36px;object-fit:contain;filter:drop-shadow(0 2px #0008)}nav button.active{margin-top:-7px;padding-top:9px;min-height:83px;background:linear-gradient(#ffe768,#ffb522 50%,#d77b13);color:#fff;box-shadow:inset 0 2px #fff3ae,inset 0 -2px #aa5410}nav button.active:after{display:none}
#toast{background:linear-gradient(#ffe680,#f1bd49);color:#172139;border:2px solid #10152d;bottom:95px;font-weight:700}
@media(max-height:700px){.hero.compact-hero{min-height:65px!important;padding:7px!important}.compact-hero .royal-seal{width:46px;height:46px}.home-screen{gap:6px}.front-panel{padding:8px}.compact-duel .duel-crest,.compact-duel .duel-crest img{height:45px}.compact-duel .duel-side h3{font-size:12px}.compact-duel .duel-side strong{font-size:19px}.compact-duel .battle-meter{margin-top:6px}.personal-score{padding:8px}.standing-tile{min-height:43px;padding:4px}.kingdom-grid{gap:8px}.kingdom-grid .kingdom-card{padding:8px}.kingdom-grid .kingdom-card>img{height:65px;width:72px}.kingdom-grid .kingdom-card button{min-height:34px;margin-top:5px}.package-choice{min-height:82px;padding:8px}.battle-arena{padding:9px}.duel-crest,.duel-crest img{height:54px}.duel-side strong{font-size:21px}.duel+.duel{margin-top:5px;padding-top:10px}.tutorial>img{height:105px;width:115px}}
@media(max-width:370px){.shell{padding-left:9px;padding-right:9px}.brand span{font-size:11px}.compact-hero h1{font-size:16px!important}.kingdom-grid .kingdom-card h3{font-size:14px}.package-choice{grid-template-columns:38px minmax(0,1fr) auto;gap:6px}.package-choice>img{width:38px;height:40px}.package-label h3{font-size:12px}.package-action button{font-size:10px}.duel-side h3{font-size:12px}nav button{font-size:9px}.standing-tile b{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

@media(max-height:660px){.kingdom-grid .kingdom-card{padding:6px}.kingdom-grid .kingdom-card>img{height:50px;width:62px;margin-bottom:2px}.kingdom-grid .kingdom-card h3{margin-bottom:2px}.kingdom-grid .mine-label{min-height:12px;margin:2px 0;font-size:8px}.kingdom-grid .kingdom-card button{margin-top:4px}.home-screen .personal-score{padding:6px}.home-screen .standing-tile{min-height:40px}.home-screen .compact-hero{min-height:59px!important}.home-screen .compact-duel .duel-crest,.home-screen .compact-duel .duel-crest img{height:40px}.home-screen .compact-duel .duel-side small{margin-top:1px}.home-screen .meter-caption{margin-top:3px}.home-screen .section-title h2{font-size:18px!important}.home-screen .personal-score p{padding:4px}.home-screen .personal-score strong{font-size:19px}}

@media(max-height:700px){.battle-arena .duel{padding:5px 0}.battle-arena .duel+.duel{padding-top:8px;margin-top:5px}.battle-arena .duel-crest,.battle-arena .duel-crest img{height:38px}.battle-arena .duel-side h3{font-size:12px;margin:1px 0}.battle-arena .duel-side strong{font-size:20px}.battle-arena .duel-side small{font-size:9px;margin-top:1px}.battle-arena .battle-meter{margin-top:6px;height:17px}.battle-arena .meter-caption{font-size:9px;margin-top:3px}.battle-arena .duel-swords{width:32px;height:32px}.battle-arena .battle-outcome{padding:5px;font-size:10px;margin-top:6px}}
@media(max-height:700px){.rewards-screen .section-title{margin-top:8px!important}.package-choice{min-height:70px;padding:6px 8px}.reward-hint{font-size:10px;margin:4px 0 6px}.rewards-screen .reward-shares{padding:4px}.rewards-screen .reward-eligibility{margin:5px 0;font-size:10px}.rewards-screen>.full{min-height:34px;font-size:11px}}

.duel-points{display:inline-block;color:#ffe36b;border:1px solid #b99a46;border-radius:3px;padding:0 3px;margin-left:3px;background:#162c44;font-weight:900;font-size:9px;line-height:11px}
@media(max-height:660px){.home-castle{height:38px;width:38px}.hero.compact-hero{grid-template-columns:46px minmax(0,1fr) 38px}.home-screen .standing-grid{gap:4px}.home-screen .standing-tile{min-height:38px}.home-screen .standing-tile img{height:26px}}
body[data-screen="onboarding"] .shell{padding-bottom:16px}.welcome-screen{min-height:calc(100svh - 20px)}

.package-label .text-button{display:inline-block;min-height:22px!important;font-size:10px!important;margin-left:5px;vertical-align:baseline}

.admin-image-editor{margin:12px 0;padding:12px;border:1px solid #6286b4;border-radius:8px;background:#101f3d}.admin-image-editor>img{display:block;width:88px;height:88px;object-fit:contain;background:#243659;border:1px solid #6b8ab3;border-radius:8px}.admin-image-editor small,.admin-image-editor p{font-size:11px;color:#caddf7}.reward-package-image{width:36px;height:36px;object-fit:contain;flex:0 0 36px}

/* Full button outlines stay inside the bottom panel and Telegram safe area. */
nav{padding:6px 5px calc(8px + env(safe-area-inset-bottom));align-items:end;gap:5px;background:#080e21;border-top:2px solid #6c8bb5;box-shadow:0 -6px 18px #020715b3}
nav button{min-height:64px;border:2px solid #718cb8;border-radius:11px;padding-bottom:6px;background:linear-gradient(#405c99,#273b70);box-shadow:inset 0 1px #b2c9eb66,inset 0 -3px #14234b,0 2px 2px #0009}
nav button.active{min-height:70px;margin-top:-4px;border:2px solid #ffe994;border-radius:11px;padding-top:7px;box-shadow:inset 0 2px #fff8b5,inset 0 -3px #a95511,0 2px 3px #000b}
.shell{padding-bottom:calc(84px + env(safe-area-inset-bottom))}

/* Return, dismiss, cancel and remove share the game's red button treatment. */
button.button-back,button.secondary.button-back,button#cancel{background:linear-gradient(#fa6261,#d3343e 55%,#a91c2f);border:2px solid #4c101b;color:#fff;box-shadow:inset 0 2px #ffb4a8,inset 0 -3px #781324,0 2px 0 #080b1b;text-shadow:0 1px 1px #681322}

/* Fine ink edge remains behind the glyph fill, preserving small white letters. */
body{-webkit-text-stroke:.65px #000;paint-order:stroke fill}
body button{text-shadow:0 1px 0 #0008!important}
.package-choice .vote-revote,#toast{-webkit-text-stroke:0;text-shadow:none!important}

.icon-button{font-size:32px;line-height:1}
.kingdom-grid .kingdom-card:before{display:none}
.kingdom-grid .kingdom-card{background:linear-gradient(#253a6b,#142441)}
.duel-crest{background:none}
.duel-crest img,.kingdom-grid .kingdom-card>img{filter:drop-shadow(0 0 2px var(--accent)) drop-shadow(0 0 5px color-mix(in srgb,var(--accent),transparent 45%))}
button.button-positive{background:linear-gradient(#81e559,#36b83b 55%,#208b30);border:2px solid #123b1b;box-shadow:inset 0 2px #c5ffab,inset 0 -3px #165e25,0 3px #080e22;color:white;min-height:42px}
.soldier-reward{margin:12px 0;padding:12px;border:2px solid #0a1128;border-radius:10px;background:#18294e;box-shadow:inset 0 1px #5e7fac}
.soldier-reward>h3{font-size:15px;margin-bottom:6px}.reward-place-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.reward-place{padding:9px;border:1px solid #526d99;border-radius:8px;background:#233965}.reward-place>b{color:#ffe073;font-size:13px}.reward-place p{display:flex;justify-content:space-between;gap:6px;font-size:11px;margin-top:5px}.reward-place strong{white-space:nowrap}.reward-place span{overflow-wrap:anywhere}

.telegram-entry{margin-top:32px}.telegram-entry p{margin:14px 0;line-height:1.6}.telegram-entry a{display:inline-block;padding:12px 18px;background:linear-gradient(#ffe76b,#e89e18);border:2px solid #30220c;border-radius:9px;color:#241901;font-weight:800;-webkit-text-stroke:0;text-shadow:none;text-decoration:none}
