@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@400;500;600;700;800&family=Nunito+Sans:wght@400;500;600;700;800&display=swap');
:root{--bg:#0b111d;--panel:#151f30;--panel2:#1a293d;--panel3:#24354d;--line:#34445b;--text:#e5edf4;--muted:#9caec0;--gold:#f8d181;--green:#8bd0a2;--accent:#9bc5f4;--red:#ee8b99;--violet:#c6acfa;--shadow:0 16px 36px rgba(0,0,0,.22)}*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;color:var(--text);background:radial-gradient(ellipse at 82% 0%,#192846,transparent 45%),#0b111d;font-family:'Nunito Sans',system-ui,sans-serif;font-size:14px}h1,h2,h3,h4,p{margin:0}h1,h2,h3,h4,.nav,.btn,.tag,.currency{font-family:Oxanium,system-ui,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.4}.shell{max-width:1600px;margin:auto;padding:18px 22px 50px}.top{display:flex;align-items:center;gap:22px;justify-content:space-between;padding:12px 8px 18px}.brand{display:flex;align-items:center;gap:12px;cursor:pointer;min-width:245px}.brand-mark{width:47px;height:47px;border:2px solid #7fa2ba;border-radius:12px;display:grid;place-items:center;color:#bad3f2;font-size:26px;background:linear-gradient(140deg,#29364a,#141e30);box-shadow:inset 0 0 16px #41639722}.brand-title{font:800 23px Oxanium;letter-spacing:-.6px}.brand-sub{font-size:11px;color:#93b1c0;letter-spacing:2.7px;font-weight:800}.top-info{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.currency{display:flex;align-items:center;gap:7px;padding:9px 12px;background:#142235;border:1px solid #2c3c55;border-radius:10px;font-size:13px;font-weight:600;white-space:nowrap}.currency strong{color:#f3f4f7}.currency .i{font-size:16px}.nav{display:flex;gap:4px;flex-wrap:wrap;background:#131e30;border:1px solid #2c3e55;padding:6px;border-radius:14px;margin-bottom:20px;position:sticky;top:0;z-index:20;box-shadow:var(--shadow)}.nav button{background:transparent;border:0;color:#aebcd0;font-family:Oxanium;font-size:12px;font-weight:700;padding:11px 13px;border-radius:9px;white-space:nowrap}.nav button:hover{background:#26354a;color:white}.nav button.active{background:linear-gradient(180deg,#42627f,#304861);color:#fff;box-shadow:0 2px 10px #0005}.nav .nav-icon{margin-right:5px}.main-header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0 0 16px}.main-header h2{font-size:25px;letter-spacing:-.5px;font-weight:700}.sub{color:var(--muted);line-height:1.55}.sub.small{font-size:12px}.panel{background:linear-gradient(160deg,#1a2739,#141f2f);border:1px solid #33425a;border-radius:13px;padding:18px;box-shadow:var(--shadow);min-width:0}.panel h3{font-size:16px;margin-bottom:10px;color:#f4f5fc}.panel h4{font-size:13px;margin-bottom:7px}.panel.tight{padding:13px}.panel+.panel{margin-top:14px}.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.between{justify-content:space-between}.cols{display:grid;grid-template-columns:1fr 340px;gap:16px}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(225px,1fr));gap:13px}.grid.sm{grid-template-columns:repeat(auto-fit,minmax(175px,1fr))}.stack{display:grid;gap:12px}.stack-xs{display:grid;gap:7px}.btn{border:1px solid #53647b;border-radius:8px;color:#e5f1fb;background:linear-gradient(180deg,#32465d,#23364d);padding:9px 13px;font-size:12px;font-weight:700;letter-spacing:.15px;transition:.15s}.btn:hover:not(:disabled){border-color:#9abde1;filter:brightness(1.13)}.btn.primary{background:linear-gradient(180deg,#4c7e75,#2e655f);border-color:#70ab98;color:white}.btn.gold{background:linear-gradient(180deg,#9c7942,#6e5536);border-color:#c5a36b;color:#fff2d6}.btn.danger{background:#683b4a;border-color:#a96776}.btn.active{background:#466784;border-color:#a2cae6;color:#fff}.btn.tiny{font-size:11px;padding:5px 9px}.btn.wide{width:100%}.btn.ghost{background:transparent;border-color:#3b4c62;color:#9eb7c8}.tag{display:inline-flex;align-items:center;gap:4px;padding:3px 7px;border:1px solid #556477;border-radius:5px;font-weight:700;font-size:10px;color:#c7d5e4;background:#27364b;white-space:nowrap}.tag.green{border-color:#426f62;background:#203b35;color:#a6e8b5}.tag.gold{border-color:#81663c;background:#3b3121;color:#e9d29c}.tag.red{border-color:#8d4b59;background:#43252e;color:#f7abb6}.tag.purple{border-color:#675089;background:#312744;color:#cfbaf7}.muted{color:var(--muted)}.tinytext{font-size:11px}.smalltext{font-size:12px}.divider{height:1px;background:#34445b;margin:13px 0}.portrait{image-rendering:pixelated;object-fit:contain;background:radial-gradient(ellipse,#293a55,#172334);border:1px solid #394c63;border-radius:10px}.portrait.small{width:50px;height:50px;padding:2px}.portrait.med{width:74px;height:74px;padding:5px}.portrait.large{width:112px;height:112px;padding:5px}.creature-card{display:flex;gap:11px;align-items:center;background:#1b2b40;border:1px solid #384d61;padding:9px;border-radius:10px;cursor:pointer;min-height:85px}.creature-card:hover,.creature-card.selected{border-color:#91c9d9;background:#243a50}.creature-card .meta{min-width:0;flex:1}.creature-card strong{display:block;font-family:Oxanium;font-size:13px;margin-bottom:3px}.creature-card .meta .sub{font-size:11px}.progress{width:100%;height:9px;background:#0d1828;border:1px solid #314158;border-radius:5px;overflow:hidden}.progress .fill{height:100%;background:#74bbae;transition:width .1s}.progress.hp .fill{background:linear-gradient(90deg,#bd5d64,#e79782)}.progress.energy .fill{background:linear-gradient(90deg,#487cbe,#7bbde6)}.progress.xp .fill{background:linear-gradient(90deg,#6f78d0,#baadf0)}.hero-banner{min-height:318px;background-position:center;background-size:cover;border-radius:12px;border:1px solid #496078;overflow:hidden;position:relative;box-shadow:inset 0 0 120px #0008}.hero-banner::before{content:'';background:linear-gradient(180deg,#08121f20,#07132188);position:absolute;inset:0}.hero-inner{position:relative;padding:18px;min-height:318px;display:flex;flex-direction:column;justify-content:space-between}.battle-line{display:grid;grid-template-columns:1fr 70px 1fr;align-items:center;gap:4px;flex:1}.battle-team{display:flex;align-items:end;justify-content:center;gap:12px;min-height:160px}.unit{width:95px;text-align:center;filter:drop-shadow(0 7px 7px #0009);min-width:0}.unit img{width:100%;max-width:92px;image-rendering:pixelated;animation:bob 2s ease-in-out infinite;object-fit:contain}.unit.dead img{filter:grayscale(1);opacity:.35}.unit .name{font-family:Oxanium;font-size:10px;font-weight:700;color:white;text-shadow:0 2px 3px #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.unit .progress{height:7px;border-color:#101722}.unit .unit-stat{font-size:9px;font-weight:800;text-shadow:0 1px 3px #000}@keyframes bob{50%{transform:translateY(-4px)}}.vs{font:800 23px Oxanium;text-shadow:0 2px 8px #0009;color:#f9d993;text-align:center}.battle-sub{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.battle-title{color:#fff;text-shadow:0 2px 4px #000;font-size:21px}.battle-log{font-size:12px;color:#afc8d7;max-height:220px;overflow:auto;display:grid;gap:6px}.battle-log div{background:#16263b;padding:7px 9px;border-left:2px solid #527c95;border-radius:3px}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.statbox{background:#17283b;border:1px solid #32465d;padding:9px 10px;border-radius:8px}.statbox .value{font:700 15px Oxanium}.statbox .desc{font-size:10px;color:#9bafbf}.region-card{position:relative;border-radius:11px;overflow:hidden;min-height:168px;background-size:cover;background-position:center;border:1px solid #374a61}.region-card:before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#0e1726df,#13243bb0)}.region-card.locked{filter:grayscale(1);opacity:.55}.region-card>*{position:relative}.region-card .content{padding:17px}.region-card h3{font-size:17px}.region-card .sub{font-size:12px;max-width:370px}.tabs{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:13px}.tabs button{border:1px solid #445976;background:#1b2b42;color:#b8c9d9;padding:8px 13px;border-radius:7px;font-family:Oxanium;font-weight:700;font-size:12px}.tabs button.active{background:#385775;color:#fff}.two-cols{display:grid;grid-template-columns:350px 1fr;gap:15px}.detail-pair{display:grid;grid-template-columns:1fr auto;gap:7px;font-size:12px;margin-bottom:7px}.detail-pair b{font-family:Oxanium}.gene-bar{display:flex;align-items:center;gap:9px;margin:6px 0}.gene-bar label{width:66px;font-size:11px}.gene-bar .progress{flex:1}.gene-bar span{font:700 11px Oxanium;width:24px;text-align:right}.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(255px,1fr));gap:10px}.card-grid.small{grid-template-columns:repeat(auto-fill,minmax(185px,1fr))}.tile{background:#1b2a3f;border:1px solid #3a4c65;border-radius:10px;padding:14px;display:flex;flex-direction:column;gap:9px}.tile:hover{border-color:#607990}.tile h4{font-size:14px}.tile p{font-size:12px;color:#abbccd;line-height:1.5}.tile .foot{margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:6px}.field{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#abbdd0;font-weight:700}input,select,textarea{background:#101c2c;border:1px solid #3f526b;color:#ebf2f9;border-radius:7px;padding:8px 10px;min-width:0;outline:none}input:focus,select:focus{border-color:#92bad9}input[type=checkbox]{accent-color:#69ad9d}.subsection{font:700 16px Oxanium;margin:5px 0 12px}.scroll-list{max-height:450px;overflow:auto;display:grid;gap:7px;padding-right:4px}.notice{border:1px solid #826a48;background:#352f26;color:#e3d6af;padding:11px 12px;border-radius:8px;font-size:12px}.notice.green{background:#1f3934;border-color:#48776c;color:#b2dccb}.overlay{position:fixed;inset:0;z-index:200;background:#050910e8;display:flex;align-items:center;justify-content:center;padding:20px}.modal{max-width:740px;width:100%;max-height:90vh;overflow:auto;background:linear-gradient(155deg,#203348,#141f31);border:1px solid #648199;border-radius:15px;padding:24px;box-shadow:0 30px 80px #0009}.modal h2{font:800 27px Oxanium;margin-bottom:9px}.starter{border:1px solid #465a70;background:#223249;border-radius:11px;padding:15px;cursor:pointer;text-align:center}.starter:hover{border-color:#f4d08c;background:#2a4253}.starter img{max-width:100%;height:130px;image-rendering:pixelated}.starter h3{font-family:Oxanium;margin:9px}.result-toast{position:fixed;z-index:150;right:20px;bottom:20px;max-width:340px;background:#1e3643;border:1px solid #619e91;padding:15px;border-radius:10px;box-shadow:var(--shadow);color:#dff0eb;pointer-events:none}.result-toast.error{border-color:#a46b7b;background:#44303a}.footer{margin-top:30px;text-align:center;color:#758a9b;font-size:11px}.kbd{font:700 11px Oxanium;background:#18283c;border:1px solid #4c617a;border-radius:4px;padding:3px 5px}.rank-line{display:flex;align-items:center;gap:10px;margin:6px 0}.rank-line .meter{flex:1;background:#111f30;border-radius:4px;height:7px}.rank-line .meter>div{background:#89b9bb;height:7px;border-radius:4px}.empty{padding:20px;color:#98aab9;text-align:center;background:#17263a;border:1px dashed #3b4b5f;border-radius:8px}.play-toggle{padding:12px 18px;font-size:13px}.guide-section{margin-bottom:14px}.guide-section summary{font:700 14px Oxanium;cursor:pointer;padding:10px;border:1px solid #354961;border-radius:7px;background:#1a2b40}.guide-section>p,.guide-section>div{padding:12px;color:#b6c7d6;line-height:1.65}.tooltip-info{border-bottom:1px dotted #6a8297;cursor:help}.lineage-chart{display:flex;gap:10px;align-items:center;justify-content:center}.text-gold{color:var(--gold)}.text-green{color:var(--green)}.text-red{color:var(--red)}.text-purple{color:var(--violet)}.w100{width:100%}.mt{margin-top:12px}.mb{margin-bottom:12px}.scroll{overflow-x:auto}@media(max-width:1000px){.cols,.two-cols{grid-template-columns:1fr}.shell{padding:10px}.nav{position:static}.nav button{font-size:11px;padding:9px}.top-info{justify-content:flex-start}.top{flex-direction:column;align-items:flex-start;gap:12px}.hero-banner,.hero-inner{min-height:270px}.unit{width:75px}.unit img{max-width:70px}}@media(max-width:560px){.main-header h2{font-size:20px}.currency{font-size:11px;padding:6px 8px}.battle-line{grid-template-columns:1fr 32px 1fr}.battle-team{gap:2px;min-height:112px}.unit{width:54px}.unit img{max-width:50px}.unit .name{font-size:8px}.hero-inner{padding:8px}.hero-banner,.hero-inner{min-height:235px}.vs{font-size:13px}.panel{padding:13px}.grid{grid-template-columns:1fr}.stat-grid{grid-template-columns:repeat(2,1fr)}.card-grid{grid-template-columns:1fr}.starter img{height:80px}.modal{padding:15px}}

/* Visible cosmetic genetics */
.portrait.golden{filter:sepia(.65) saturate(1.8) hue-rotate(345deg) brightness(1.12);box-shadow:0 0 10px #f6c15b55}
.portrait.prismatic{filter:saturate(1.55) hue-rotate(28deg);box-shadow:0 0 12px #c28cf966}

/* Battle feedback: action meters tied to actual engine gcd, plus event-driven sprite effects. */
.unit{position:relative;overflow:visible}
.unit-figure{height:98px;position:relative;display:flex;align-items:flex-end;justify-content:center;isolation:isolate}
.unit-figure img{max-height:96px;position:relative;z-index:1;transform-origin:50% 85%;will-change:transform,filter}
.unit.foe .attack-charge .fill{background:linear-gradient(90deg,#aa5f49,#ffbd75)}
.unit.friend .attack-charge .fill{background:linear-gradient(90deg,#438db9,#8bdcff)}
.unit .attack-charge{height:8px;margin-top:3px;border-color:#071421;box-shadow:0 0 5px #0007}
.unit .attack-charge .fill{transition:width .22s linear}
.attack-status{display:flex;align-items:center;justify-content:space-between;gap:3px;color:#cbdde9;font-family:Oxanium,system-ui,sans-serif;font-size:8px;font-weight:800;text-shadow:0 1px 4px #000}
.attack-status .attack-wait{color:#ffe4a7}
.unit.friend .attack-status .attack-wait{color:#a4eaff}
.battle-effect{position:absolute;z-index:4;pointer-events:none;left:50%;top:38%;transform:translate(-50%,-50%);font:900 31px Oxanium,sans-serif;text-shadow:0 0 13px currentColor,1px 2px 4px #000;white-space:nowrap;animation:fx-pulse .75s ease-out forwards}
.battle-effect.fx-hit{color:#ffb3a0;font-size:45px;animation:fx-impact .46s ease-out forwards}
.battle-effect.fx-elemental{color:#dcbaff;font-size:46px;animation:fx-magic .72s ease-out forwards}
.battle-effect.fx-cast{color:#e8ddff;font-size:10px;top:9%;padding:2px 5px;border-radius:5px;background:#32234daa;border:1px solid #b39fd2;max-width:122px;white-space:normal;line-height:1.15;animation:fx-label .76s ease-out forwards}
.battle-effect.fx-heal{color:#7cf1b3;font-size:21px}
.battle-effect.fx-ward{color:#7bc9f6;font-size:42px}
@keyframes fx-pulse{0%{opacity:0;transform:translate(-50%,-30%) scale(.35)}20%{opacity:1;transform:translate(-50%,-50%) scale(1.35)}75%{opacity:1}100%{opacity:0;transform:translate(-50%,-110%) scale(1.05)}}
@keyframes fx-impact{0%{opacity:0;transform:translate(-50%,-50%) rotate(-22deg) scale(.3)}26%{opacity:1;transform:translate(-50%,-50%) rotate(13deg) scale(1.35)}100%{opacity:0;transform:translate(-50%,-50%) rotate(40deg) scale(1.75)}}
@keyframes fx-magic{0%{opacity:0;transform:translate(-50%,-50%) rotate(-90deg) scale(.2)}35%{opacity:1;transform:translate(-50%,-50%) rotate(25deg) scale(1.5)}100%{opacity:0;transform:translate(-50%,-50%) rotate(180deg) scale(2)}}
@keyframes fx-label{0%{opacity:0;transform:translate(-50%,-40%) scale(.8)}20%{opacity:1;transform:translate(-50%,-90%) scale(1)}70%{opacity:1}100%{opacity:0;transform:translate(-50%,-150%)}}
/* Show precisely ten Wildlings at fixed card height before scrolling. */
.scroll-list.wildling-list{max-height:917px}
.scroll-list.wildling-list .creature-card{height:85px;min-height:85px;box-sizing:border-box;overflow:hidden}
@media(max-width:1000px){.unit-figure{height:76px}.unit-figure img{max-height:73px}}
@media(max-width:560px){.unit-figure{height:56px}.unit-figure img{max-height:54px}.attack-status{font-size:6px}.battle-effect.fx-cast{font-size:7px;max-width:70px}.battle-effect.fx-hit,.battle-effect.fx-elemental{font-size:28px}}
@media(prefers-reduced-motion:reduce){.battle-effect{animation:none;opacity:.75}.unit .attack-charge .fill{transition:none}}

.battle-effect.fx-elemental{color:var(--effect-color,#dcbaff)}
.battle-effect.fx-aura{z-index:0;top:50%;width:92px;height:92px;border:2px solid #dbc6ff;border-radius:50%;background:radial-gradient(circle,#bca1ff66 0%,#9182ed33 48%,transparent 72%);box-shadow:0 0 22px #a28dffcc,inset 0 0 14px #b7a9ff99;animation:fx-aura .7s ease-out forwards}
@keyframes fx-aura{0%{opacity:0;transform:translate(-50%,-50%) scale(.3)}35%{opacity:1;transform:translate(-50%,-50%) scale(1.2)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.45)}}
@media(max-width:560px){.battle-effect.fx-aura{width:49px;height:49px}}
/* v0.10: stable, scrollable acquired-creature card and clear new-discovery feedback */
.reward-modal{max-width:760px;border-color:#83aeae;box-shadow:0 16px 100px #000b,0 0 44px #68b9a122}
.reward-creature{display:grid;grid-template-columns:155px 1fr;gap:18px;align-items:center;margin:18px 0;padding:13px;background:#14283b;border:1px solid #476c79;border-radius:12px}
.reward-creature img{width:155px;height:155px;image-rendering:pixelated;object-fit:contain;filter:drop-shadow(0 0 12px #78c2be99)}
.reward-creature h3{font-size:23px;margin-bottom:5px;color:#ffe3aa}
.reward-genes{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:10px;background:#12253a;border-radius:8px;margin:10px 0 15px}
.reward-genes .detail-pair{padding:5px 9px;margin:0;border:1px solid #334c63;border-radius:6px;text-transform:capitalize}
.reward-overlay .modal{animation:reward-arrive .25s ease-out}
@keyframes reward-arrive{from{transform:translateY(18px) scale(.96);opacity:.3}to{transform:translateY(0) scale(1);opacity:1}}
@media(max-width:560px){.reward-creature{grid-template-columns:88px 1fr;gap:9px}.reward-creature img{width:88px;height:88px}.reward-genes{grid-template-columns:repeat(2,1fr)}.reward-creature h3{font-size:17px}}
@media(prefers-reduced-motion:reduce){.reward-overlay .modal{animation:none}}

/* Nonblocking discovery dock: gameplay and menus remain fully interactive. */
#reward-notifications{position:fixed;z-index:95;right:16px;bottom:16px;width:min(450px,calc(100vw - 32px));pointer-events:none}
#reward-notifications:empty{display:none}
#reward-notifications .reward-card,#reward-notifications .reward-minimized{pointer-events:auto;background:linear-gradient(155deg,#203348,#141f31);border:1px solid #83aeae;border-radius:14px;box-shadow:0 16px 44px #0009,0 0 15px #68b9a119;overflow:hidden}
#reward-notifications .reward-card{max-height:min(76vh,720px);display:flex;flex-direction:column;position:relative}
#reward-notifications .reward-card:before,#reward-notifications .reward-card:after{content:'';position:absolute;height:4px;left:15px;right:15px;background:#496a76;border-radius:6px 6px 0 0;top:0;pointer-events:none}
#reward-notifications .reward-card:after{left:28px;right:28px;top:4px;background:#345365}
#reward-notifications .reward-card-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;padding:17px 14px 10px;border-bottom:1px solid #345265}
#reward-notifications .reward-card-heading h2{font:800 17px Oxanium;line-height:1.2;margin:7px 0 0}
#reward-notifications .reward-card-heading>.row{justify-content:flex-end;flex-shrink:0}
#reward-notifications .reward-content{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:4px 14px 10px}
#reward-notifications .reward-card-footer{display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:10px 14px;border-top:1px solid #345265;background:#152a3b;flex-shrink:0}
#reward-notifications .reward-minimized{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:10px 12px}
#reward-notifications .reward-creature{grid-template-columns:80px 1fr;gap:10px;margin:10px 0;padding:9px}
#reward-notifications .reward-creature img{width:80px;height:80px}
#reward-notifications .reward-creature h3{font-size:17px}
#reward-notifications .reward-creature .sub{font-size:11px}
#reward-notifications .reward-genes{grid-template-columns:repeat(3,1fr);gap:4px;margin:5px 0 10px;padding:5px}
#reward-notifications .reward-genes .detail-pair{padding:4px 5px;font-size:10px}
#reward-notifications .reward-content h4{margin:7px 0 5px;font-size:12px}
#reward-notifications .stat-grid{grid-template-columns:repeat(2,1fr)}
#reward-notifications .row{gap:5px}
#reward-notifications .tag{white-space:normal}
@media(max-width:560px){#reward-notifications{right:8px;bottom:8px;width:min(390px,calc(100vw - 16px))}#reward-notifications .reward-card{max-height:55vh}#reward-notifications .reward-card-heading{padding:11px 10px 7px}#reward-notifications .reward-card-heading h2{font-size:15px}#reward-notifications .reward-content{padding:5px 10px}#reward-notifications .reward-card-footer{padding:8px 10px}#reward-notifications .reward-genes{grid-template-columns:repeat(2,1fr)}}
@media(prefers-reduced-motion:reduce){#reward-notifications *{scroll-behavior:auto}}
/* Keep short status toasts clear of the discovery dock. */
.result-toast{left:18px;right:auto}
@media(max-width:560px){.result-toast{left:8px;top:8px;bottom:auto;max-width:calc(100vw - 16px)}}
