:root{
  --bg:#07131f;--panel:#0e2234;--panel2:#132c42;--line:#29475f;--text:#f5fbff;--muted:#a9bfce;
  --green:#48e184;--blue:#4dc2ff;--orange:#ff9849;--red:#ff6262;--purple:#b883ff;--gold:#ffd45a;
  --slot0:#20d7c5;--slot1:#258fd8;--slot2:#ffd84d;--radius:18px;--shadow:0 12px 32px rgba(0,0,0,.28)
}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:radial-gradient(circle at top,#12344c 0,#07131f 52%,#040b12 100%);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}
img{max-width:100%;display:block}
#app{min-height:100vh}.screen{max-width:1280px;margin:0 auto;padding:18px 18px 90px}.topbar{display:flex;align-items:center;gap:14px;padding:10px 0 18px}.topbar .logo{width:148px}.topbar .brand-sub{font-size:12px;color:#90d7ff;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.topbar .spacer{flex:1}.icon-btn,.pill-btn,.primary-btn,.secondary-btn,.danger-btn{border:1px solid var(--line);color:var(--text);background:#10283b;border-radius:14px;padding:11px 14px;font-weight:800;box-shadow:0 5px 14px rgba(0,0,0,.12)}.primary-btn{background:linear-gradient(135deg,#197ad0,#23b8f4);border-color:#5fc8ff}.secondary-btn{background:linear-gradient(135deg,#174735,#1b6b49);border-color:#4ad185}.danger-btn{background:linear-gradient(135deg,#6b2028,#9c2c3a);border-color:#ff7a87}.pill-btn{border-radius:999px;padding:9px 13px}.icon-btn{width:42px;height:42px;padding:0;display:grid;place-items:center;font-size:20px}.grid{display:grid;gap:16px}.card-panel{background:linear-gradient(180deg,rgba(18,43,64,.96),rgba(10,29,44,.96));border:1px solid rgba(117,169,201,.23);border-radius:var(--radius);box-shadow:var(--shadow)}
.hero{display:grid;grid-template-columns:1.2fr .8fr;gap:18px;align-items:stretch}.hero-main{padding:22px}.hero-main h1{font-size:clamp(28px,5vw,52px);line-height:.95;margin:10px 0 14px}.hero-main p{color:var(--muted);font-size:16px;line-height:1.55;max-width:720px}.hero-side{padding:18px;display:flex;flex-direction:column;justify-content:space-between}.badge{display:inline-flex;gap:8px;align-items:center;padding:7px 10px;border-radius:999px;background:#0c3340;border:1px solid #1f6174;color:#c7f6ff;font-size:12px;font-weight:900}.stat-row{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px}.stat{padding:12px;background:#0a1d2d;border:1px solid #24435b;border-radius:14px}.stat b{display:block;font-size:22px}.stat span{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em}.menu-grid{grid-template-columns:repeat(5,1fr);margin-top:16px}.menu-card{padding:18px;min-height:160px;position:relative;overflow:hidden;border:1px solid #2a4e67;border-radius:18px;background:linear-gradient(145deg,#112e43,#0b2031);text-align:left;color:var(--text)}.menu-card:before{content:"";position:absolute;inset:auto -30px -45px auto;width:120px;height:120px;border-radius:50%;background:rgba(72,194,255,.08)}.menu-card .emoji{font-size:34px;margin-bottom:14px}.menu-card h3{font-size:18px;margin:0 0 7px}.menu-card p{color:var(--muted);font-size:13px;line-height:1.45;margin:0}.section-title{display:flex;align-items:center;gap:10px;margin:26px 0 12px}.section-title h2{font-size:20px;margin:0}.section-title p{color:var(--muted);margin:0;font-size:13px}.stage-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.stage-card{padding:14px;text-align:left;border-radius:16px;border:1px solid #36526a;background:#0c2234;color:var(--text);position:relative;overflow:hidden}.stage-card.locked{filter:grayscale(.8);opacity:.55}.stage-card .num{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:#173c55;border:1px solid #2f698b;font-weight:900;margin-bottom:12px}.stage-card h4{margin:0 0 7px;font-size:15px}.stage-card p{margin:0;color:var(--muted);font-size:11px;line-height:1.4}.stage-card .reward{margin-top:10px;font-size:11px;color:#ffd777;font-weight:800}
.setup-wrap{min-height:100vh;display:grid;place-items:center;padding:20px}.setup-card{width:min(760px,100%);padding:24px}.setup-logo{width:220px;margin:0 auto 12px}.setup-card h1{text-align:center;margin:8px 0 5px}.setup-card>p{text-align:center;color:var(--muted);margin:0 0 24px}.field{display:grid;gap:8px;margin-bottom:16px}.field label{font-size:12px;color:#b9d0de;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.field input{width:100%;border:1px solid #34536b;background:#091b2a;color:var(--text);padding:14px;border-radius:14px;outline:none}.field input:focus{border-color:#45bfff;box-shadow:0 0 0 3px rgba(69,191,255,.15)}.gender-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.gender-option{border:1px solid #34536b;background:#0b2234;border-radius:16px;color:var(--text);padding:16px;text-align:center}.gender-option.selected{border-color:#54c7ff;box-shadow:0 0 0 3px rgba(84,199,255,.15);background:#12344d}.gender-option .g-icon{font-size:32px;display:block;margin-bottom:6px}.setup-actions{display:flex;justify-content:flex-end;margin-top:18px}
.tutorial{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.tutorial .step{background:#0a2132;border:1px solid #29475f;border-radius:16px;padding:14px}.tutorial .n{width:28px;height:28px;border-radius:50%;background:#1b89ce;display:grid;place-items:center;font-weight:900;margin-bottom:9px}.tutorial h4{margin:0 0 6px}.tutorial p{margin:0;color:var(--muted);font-size:12px;line-height:1.45}
.battle-shell{min-height:100vh;background:linear-gradient(rgba(5,15,24,.3),rgba(5,15,24,.72)),radial-gradient(circle at 50% 45%,#234c55 0,#0b2230 38%,#06111a 100%);transition:background .5s ease}.battle-shell.domain-jerat{background:linear-gradient(rgba(45,20,10,.42),rgba(5,10,15,.8)),radial-gradient(circle at center,#493227,#111820 68%)}.battle-shell.domain-logging{background:linear-gradient(rgba(80,40,15,.38),rgba(5,10,15,.82)),radial-gradient(circle at center,#55472a,#111820 68%)}.battle-shell.domain-plastic{background:linear-gradient(rgba(77,48,100,.32),rgba(5,10,15,.82)),radial-gradient(circle at center,#4c3d69,#111820 68%)}.battle-shell.domain-river{background:linear-gradient(rgba(18,75,91,.38),rgba(5,10,15,.82)),radial-gradient(circle at center,#23596b,#111820 68%)}.battle-shell.domain-mine{background:linear-gradient(rgba(100,90,25,.30),rgba(5,10,15,.82)),radial-gradient(circle at center,#5c5426,#111820 68%)}.battle-shell.domain-palm{background:linear-gradient(rgba(70,96,25,.32),rgba(5,10,15,.82)),radial-gradient(circle at center,#4d6427,#111820 68%)}.battle-shell.domain-fire{background:linear-gradient(rgba(135,42,15,.40),rgba(5,10,15,.82)),radial-gradient(circle at center,#853722,#111820 68%)}.battle-shell.domain-flood{background:linear-gradient(rgba(22,68,115,.40),rgba(5,10,15,.82)),radial-gradient(circle at center,#255a83,#111820 68%)}.battle-shell.domain-smog{background:linear-gradient(rgba(80,36,75,.40),rgba(5,10,15,.82)),radial-gradient(circle at center,#5b3856,#111820 68%)}.battle-shell.domain-industrial{background:linear-gradient(rgba(95,25,25,.45),rgba(5,10,15,.82)),radial-gradient(circle at center,#5c2929,#111820 68%)}
.battle{max-width:1180px;margin:0 auto;padding:10px 12px 90px}.battle-top{display:grid;grid-template-columns:220px 1fr 220px;gap:12px;align-items:stretch}.avatar-panel{display:flex;gap:10px;align-items:center;padding:10px 12px;background:rgba(6,21,32,.86);border:1px solid #2e526d;border-radius:15px}.avatar-circle{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(135deg,#285a75,#102837);font-size:28px;border:1px solid #4d7f9e}.avatar-panel.enemy .avatar-circle{background:linear-gradient(135deg,#7a2d33,#2d1518)}.avatar-panel b{display:block}.avatar-panel small{color:var(--muted)}.compact-head small{display:block;margin-top:2px}.compact-head .points{margin-top:7px}.domain-banner{min-height:62px;padding:10px 14px;border:1px solid #555f72;border-radius:15px;background:rgba(8,22,34,.9);display:flex;align-items:center;gap:12px}.domain-banner.active{border-color:#ff7b73;background:linear-gradient(135deg,rgba(112,29,35,.95),rgba(35,18,30,.95))}.domain-banner .d-icon{font-size:28px}.domain-banner b{display:block}.domain-banner small{color:#d6dce4}.points{display:flex;gap:6px;margin-top:6px}.point-dot{width:13px;height:13px;border-radius:4px;background:#183348;border:1px solid #45627a}.point-dot.on.player{background:var(--green);border-color:#83f5a8}.point-dot.on.enemy{background:var(--red);border-color:#ff9b9b}
.team-label{display:flex;align-items:center;justify-content:space-between;margin:12px 3px 8px}.team-label h3{font-size:13px;text-transform:uppercase;letter-spacing:.13em;color:#c6dce9;margin:0}.team-label span{font-size:11px;color:var(--muted)}.unit-row{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.unit-card{min-height:160px;position:relative;border-radius:18px;border:2px solid #3c5a6d;background:linear-gradient(180deg,#19364a,#0c1d2a);overflow:hidden;padding:12px;color:var(--text);text-align:left;transition:transform .12s, box-shadow .18s}.unit-card.slot-0{border-color:var(--slot0);background:linear-gradient(180deg,rgba(32,215,197,.34),rgba(7,35,38,.98))}.unit-card.slot-1{border-color:var(--slot1);background:linear-gradient(180deg,rgba(37,143,216,.36),rgba(7,29,47,.98))}.unit-card.slot-2{border-color:var(--slot2);background:linear-gradient(180deg,rgba(255,216,77,.30),rgba(38,32,7,.98));color:#fffbe5}.unit-card.targeted{box-shadow:0 0 0 4px rgba(255,255,255,.18),0 0 28px rgba(64,194,255,.35);transform:translateY(-2px)}.unit-card.dead{filter:grayscale(1);opacity:.48}.unit-card.enemy-unit{border-color:#bd5360;background:linear-gradient(180deg,#4a2329,#1e1116)}.unit-card.enemy-unit.targeted{box-shadow:0 0 0 4px rgba(255,130,130,.18),0 0 28px rgba(255,91,91,.25)}.unit-card.fx-hit{animation:hitFlash .28s ease}.unit-card.fx-heal{animation:healFlash .32s ease}.unit-card.fx-shield{animation:shieldFlash .32s ease}.unit-card.fx-cast .unit-art{transform:scale(1.06)}.unit-art{height:82px;display:grid;place-items:center;font-size:50px;border-radius:13px;background:radial-gradient(circle at 50% 30%,rgba(255,255,255,.13),rgba(0,0,0,.12));margin-bottom:8px;transition:transform .18s}.unit-meta{display:flex;align-items:flex-start;gap:8px}.unit-meta .type{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#bcd3df}.unit-meta h4{font-size:15px;line-height:1.1;margin:2px 0 0}.hp-block{margin-left:auto;text-align:right}.hp-block b{font-size:18px}.hp-block small{font-size:9px;color:#c9d6df}.hpbar{height:8px;background:#08141e;border-radius:99px;overflow:hidden;margin-top:8px;border:1px solid rgba(255,255,255,.08)}.hpbar i{display:block;height:100%;background:linear-gradient(90deg,#31cf78,#7cf3a4);transition:width .25s}.enemy-unit .hpbar i{background:linear-gradient(90deg,#ff6d61,#ff9b67)}.statusline{position:absolute;top:8px;right:8px;display:flex;gap:4px}.mini-status{font-size:10px;background:#0a1d2a;border:1px solid #5b7a8f;border-radius:8px;padding:4px 6px}.fx-popup{position:absolute;left:50%;top:38px;transform:translateX(-50%);padding:5px 9px;border-radius:999px;font-size:12px;font-weight:900;background:rgba(5,15,24,.92);border:1px solid rgba(255,255,255,.18);pointer-events:none;animation:floatUp .82s ease forwards}.fx-popup.hit{color:#ff8c8c;border-color:#ff8c8c55}.fx-popup.heal{color:#87f3a8;border-color:#87f3a855}.fx-popup.shield,.fx-popup.cast{color:#95d6ff;border-color:#95d6ff55}
.battle-center{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:12px;margin-top:12px}.hand-panel{background:rgba(7,22,33,.92);border:1px solid #2b4d66;border-radius:18px;padding:10px}.hand-tabs{display:flex;gap:7px;margin-bottom:10px}.hand-tab{border:1px solid #35526a;background:#10283a;color:#cce4f2;border-radius:12px;padding:8px 10px;font-size:12px;font-weight:800}.hand-tab.active{background:#1a4f70;border-color:#57b8ef;color:#fff}.hand{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.action-card{min-height:150px;border-radius:16px;border:2px solid #456078;background:#12293a;color:#fff;padding:10px;text-align:left;position:relative;overflow:hidden}.action-card.skill.slot-0{border-color:var(--slot0);background:linear-gradient(180deg,rgba(32,215,197,.42),rgba(8,30,37,.98))}.action-card.skill.slot-1{border-color:var(--slot1);background:linear-gradient(180deg,rgba(37,143,216,.44),rgba(8,27,43,.98))}.action-card.skill.slot-2{border-color:var(--slot2);background:linear-gradient(180deg,rgba(255,216,77,.34),rgba(37,31,8,.98))}.action-card.option{border-color:var(--purple);background:linear-gradient(180deg,#39245a,#1c1630)}.action-card.point{border-color:var(--gold);background:linear-gradient(180deg,#6b5314,#33270a)}.action-card.selected{box-shadow:0 0 0 3px rgba(255,255,255,.2),0 0 24px rgba(74,194,255,.3)}.action-card .kind{font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.12em}.action-card .a-icon{font-size:30px;margin:8px 0;position:relative;overflow:visible}.action-card h5{font-size:15px;line-height:1.08;margin:0 0 7px}.action-card p{font-size:11px;color:#d1dbe3;line-height:1.35;margin:0;padding-right:18px}.cost{position:absolute;right:8px;top:8px;width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#09131c;border:2px solid #fff;font-weight:900}.owner-tag{position:absolute;left:8px;bottom:8px;font-size:9px;max-width:75%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:rgba(0,0,0,.44);padding:4px 7px;border-radius:7px}.info-panel{background:rgba(7,22,33,.94);border:1px solid #2b4d66;border-radius:18px;padding:14px;min-height:100%}.info-panel h4{font-size:18px;margin:0 0 5px}.info-panel .info-kind{font-size:10px;text-transform:uppercase;letter-spacing:.13em;color:#91c5e3}.info-panel p{color:#d3e0e8;font-size:13px;line-height:1.5}.info-panel .tip{padding:10px;border-radius:12px;background:#0c2639;color:#a9c4d3;font-size:11px;line-height:1.4;margin:12px 0}.battle-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.battle-log{margin-top:10px;max-height:118px;overflow:auto;border-top:1px solid #24465e;padding-top:9px;font-size:11px;color:#b8ccda;line-height:1.45}.battle-log div+div{margin-top:4px}.turn-indicator{position:sticky;bottom:8px;z-index:10;margin:10px auto 0;max-width:560px;display:flex;align-items:center;justify-content:center;gap:12px;padding:9px 14px;border-radius:999px;background:rgba(7,22,34,.94);border:1px solid #36566e;box-shadow:0 8px 30px rgba(0,0,0,.4);font-weight:900}.turn-indicator.player{border-color:#45cf87}.turn-indicator.enemy{border-color:#ff6d6d}
.deck-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px}.deck-toolbar .count{margin-left:auto;color:#bcd1df}.guardian-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.guardian-card{position:relative;border:2px solid #35556b;background:linear-gradient(180deg,#143149,#0a1d2a);border-radius:18px;color:#fff;padding:10px;text-align:left;min-height:220px}.guardian-card.selected{box-shadow:0 0 0 3px rgba(77,197,255,.16)}.guardian-card.slot-0{border-color:var(--slot0)}.guardian-card.slot-1{border-color:var(--slot1)}.guardian-card.slot-2{border-color:var(--slot2)}.guardian-card.locked{opacity:.48;filter:grayscale(.7)}.guardian-card.hidden-card{background:linear-gradient(180deg,#171725,#07070e);border-color:#4a4664}.guardian-card .g-art{height:108px;border-radius:13px;display:grid;place-items:center;font-size:56px;background:radial-gradient(circle at 50% 30%,rgba(255,255,255,.12),rgba(0,0,0,.15));margin-bottom:8px}.guardian-card h4{font-size:15px;line-height:1.12;margin:0 0 6px}.guardian-card .meta{display:flex;justify-content:space-between;gap:5px;font-size:10px;color:#b9d0dd}.rarity{position:absolute;top:8px;right:8px;font-size:9px;font-weight:900;padding:5px 7px;border-radius:8px;background:#102638;border:1px solid #456579}.rarity.Langka{background:#5d4810;border-color:#cda632;color:#fff4bc}.rarity.Mitos{background:#4f184f;border-color:#b557bb;color:#ffd5ff}.slot-chip{position:absolute;left:8px;top:8px;width:28px;height:28px;border-radius:8px;display:grid;place-items:center;font-weight:900;background:#081721;border:1px solid #4c7188}.skills-preview{margin-top:18px;display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.skill-list{padding:14px}.skill-list h3{margin:0 0 10px}.skill-line{display:grid;grid-template-columns:1fr auto;gap:12px;padding:9px 0;border-bottom:1px solid #244258}.skill-line:last-child{border-bottom:0}.skill-line b{font-size:12px}.skill-line small{display:block;color:var(--muted);margin-top:3px;line-height:1.35}.skill-line .scost{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#082032;border:1px solid #3e6b88;font-weight:900}
.sim-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:16px}.sim-card{padding:18px}.sim-card h3{margin:0 0 8px}.money{font-size:28px;font-weight:900;color:#ffd36a}.eco-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:14px 0}.eco-stat{padding:11px;border-radius:13px;background:#0a1f2f;border:1px solid #27445b;text-align:center}.eco-stat b{display:block;font-size:20px}.eco-stat small{color:var(--muted);font-size:10px}.shop-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.shop-item{padding:13px;border:1px solid #315069;border-radius:15px;background:#0a2030}.shop-item h4{margin:0 0 5px;font-size:14px}.shop-item p{margin:0 0 10px;color:var(--muted);font-size:11px;line-height:1.4}.shop-item .price{color:#ffd36a;font-size:12px;font-weight:900}.family{display:grid;gap:10px}.family-card{padding:14px;border:1px solid #315069;border-radius:14px;background:#0a2030}.family-card h4{margin:0 0 4px}.family-card p{margin:0;color:var(--muted);font-size:12px}.progress{height:9px;border-radius:99px;overflow:hidden;background:#07131e;border:1px solid #27445b;margin-top:8px}.progress i{display:block;height:100%;background:linear-gradient(90deg,#45b8ff,#53e38a)}
.codex-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.codex-item{padding:14px}.codex-item h4{margin:0 0 7px}.codex-item p{margin:0;color:var(--muted);font-size:12px;line-height:1.5}.story-box{padding:18px;background:linear-gradient(145deg,#301920,#111a24);border:1px solid #7b3b42;border-radius:18px}.story-box h3{margin:0 0 6px}.story-box p{margin:0;color:#e4d7da;line-height:1.55}.matabelo-name{color:#ff8e8e;font-weight:900}
.modal-backdrop{position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.72);display:grid;place-items:center;padding:16px}.modal{width:min(680px,100%);max-height:88vh;overflow:auto;background:#0b2030;border:1px solid #35566e;border-radius:20px;padding:18px;box-shadow:0 22px 70px rgba(0,0,0,.55)}.modal h2{margin:0 0 8px}.modal p{color:var(--muted);line-height:1.55}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);z-index:200;background:#081b28;border:1px solid #34536a;color:#fff;padding:10px 14px;border-radius:999px;opacity:0;pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}
@keyframes hitFlash{0%{box-shadow:0 0 0 0 rgba(255,90,90,.05)}35%{box-shadow:0 0 0 4px rgba(255,90,90,.42),0 0 22px rgba(255,90,90,.35)}100%{box-shadow:none}}@keyframes healFlash{0%{box-shadow:none}35%{box-shadow:0 0 0 4px rgba(72,225,132,.32),0 0 20px rgba(72,225,132,.28)}100%{box-shadow:none}}@keyframes shieldFlash{0%{box-shadow:none}35%{box-shadow:0 0 0 4px rgba(77,194,255,.32),0 0 20px rgba(77,194,255,.28)}100%{box-shadow:none}}@keyframes floatUp{0%{opacity:0;transform:translate(-50%,8px)}20%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-30px)}}
@media(max-width:980px){.menu-grid{grid-template-columns:repeat(2,1fr)}.stage-grid{grid-template-columns:repeat(3,1fr)}.guardian-grid{grid-template-columns:repeat(4,1fr)}.battle-top{grid-template-columns:1fr 1.2fr 1fr}.battle-center{grid-template-columns:1fr}.info-panel{min-height:auto}.hand{grid-template-columns:repeat(4,1fr)}}
@media(max-width:720px){.screen{padding:10px 10px 80px}.topbar{padding-bottom:10px}.topbar .logo{width:110px}.topbar .brand-sub{display:none}.hero{grid-template-columns:1fr}.hero-main,.hero-side{padding:16px}.menu-grid{grid-template-columns:repeat(2,1fr);gap:10px}.menu-card{min-height:135px;padding:14px}.stage-grid{grid-template-columns:repeat(2,1fr)}.tutorial{grid-template-columns:1fr 1fr}.gender-grid{grid-template-columns:1fr}.battle{padding:7px 7px 82px}.battle-top,.battle-guidance-row,.battle-mobile-hud{display:none}.battle-mobile-brief{display:grid;gap:6px;margin:6px 0 7px}.mobile-brief-row{display:grid;grid-template-columns:1fr 1fr;gap:6px}.mobile-arena-card,.mobile-objective-card,.mobile-intent-card{border:1px solid #315368;background:linear-gradient(145deg,#092332,#081a27);border-radius:11px;padding:7px 8px;display:grid;gap:3px;min-height:58px}.mobile-arena-card.active{border-color:#d66d67;background:linear-gradient(145deg,rgba(91,29,33,.92),rgba(22,15,24,.95))}.mobile-arena-card small,.mobile-objective-card small,.mobile-intent-card small{font-size:7px;letter-spacing:.1em;color:#7fa2b5;font-weight:1000}.mobile-arena-card b,.mobile-objective-card b,.mobile-intent-card b{font-size:10px;color:#e7f5fb;line-height:1.15}.mobile-arena-card span,.mobile-objective-card span,.mobile-intent-card span{font-size:9px;color:#9fc0d1;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.mobile-intent-card{min-height:54px}.avatar-panel{padding:8px}.avatar-circle{width:42px;height:42px;font-size:22px}.avatar-panel small{font-size:10px}.unit-row{gap:6px}.unit-card{min-height:134px;padding:7px;border-radius:14px}.unit-art{height:65px;font-size:40px;margin-bottom:5px}.unit-meta h4{font-size:12px}.unit-meta .type{font-size:8px}.hp-block b{font-size:14px}.hpbar{height:7px;margin-top:5px}.battle-center{margin-top:8px}.hand-panel{padding:7px}.hand{grid-template-columns:repeat(3,1fr);gap:6px}.action-card{min-height:126px;padding:7px;border-radius:13px}.action-card .a-icon{font-size:24px;margin:7px 0}.action-card h5{font-size:12px}.action-card p{display:none}.owner-tag{font-size:8px}.cost{width:25px;height:25px;font-size:12px}.battle-actions{grid-template-columns:1fr 1fr}.guardian-grid{grid-template-columns:repeat(2,1fr);gap:8px}.guardian-card{min-height:195px}.guardian-card .g-art{height:100px}.skills-preview{grid-template-columns:1fr}.sim-grid{grid-template-columns:1fr}.eco-stats{grid-template-columns:repeat(2,1fr)}.shop-grid{grid-template-columns:1fr}.codex-grid{grid-template-columns:1fr}.stat-row{grid-template-columns:repeat(3,1fr);gap:6px}.stat{padding:9px}.stat b{font-size:18px}.setup-card{padding:16px}.setup-logo{width:170px}}
@media(max-width:390px){.menu-grid{grid-template-columns:1fr 1fr}.menu-card h3{font-size:15px}.hand{grid-template-columns:repeat(2,1fr)}.unit-meta h4{font-size:11px}.stage-grid{grid-template-columns:1fr 1fr}.guardian-grid{grid-template-columns:1fr 1fr}.battle-actions{grid-template-columns:1fr}.turn-indicator{font-size:12px}}
/* V3 vector card art + online */
.guardian-art-img,.unit-art-img,.skill-art-img{width:100%;height:100%;object-fit:cover;display:block}.guardian-card .g-art{overflow:hidden;padding:0}.guardian-card .g-art .guardian-art-img{border-radius:12px}.unit-art{overflow:hidden;padding:0}.unit-art-img{border-radius:12px}.action-card .a-icon{height:52px;display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:10px}.skill-art-img{width:52px;height:52px;border-radius:10px;object-fit:cover}.dead-mark{font-size:46px}.point-discard-btn{border:1px solid #d8ac42;color:#fff;background:linear-gradient(135deg,#73550f,#a77a14);border-radius:14px;padding:11px 12px;font-weight:900}.point-discard-btn:disabled{opacity:.4;cursor:not-allowed}.battle-actions{grid-template-columns:1fr 1fr}.battle-actions .secondary-btn{grid-column:1/-1}
.online-auth,.online-lobby,.waiting-room{padding:22px;max-width:920px;margin:0 auto}.online-auth h2,.online-lobby h2,.waiting-room h2{margin:12px 0 6px}.online-auth p,.online-lobby p,.waiting-room p{color:var(--muted)}.online-auth-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.online-actions{display:flex;gap:10px}.online-tip{margin-top:16px;padding:12px;border:1px solid #31536d;border-radius:14px;background:#0b2030;color:#bcd0dc;font-size:12px}.online-head{display:flex;align-items:flex-start;gap:16px;justify-content:space-between}.online-lobby-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:18px}.join-card{padding:14px;border:1px solid #2a4e67;border-radius:18px;background:linear-gradient(145deg,#112e43,#0b2031)}.join-card .field{margin-bottom:10px}.open-rooms{margin-top:18px}.room-row{width:100%;display:grid;grid-template-columns:100px 1fr auto;gap:10px;align-items:center;padding:11px 12px;border:1px solid #31536d;background:#0a1e2e;color:#fff;border-radius:12px;text-align:left;margin-top:7px}.room-code{font-size:clamp(42px,10vw,82px);letter-spacing:.18em;font-weight:1000;color:#7ee0ff;margin:16px 0;text-shadow:0 0 30px #2f9adf66}.waiting-room{text-align:center}.online-roombar{display:flex;gap:14px;align-items:center;justify-content:space-between;margin-bottom:8px;padding:8px 10px;border:1px solid #31536d;border-radius:14px;background:rgba(7,22,33,.92);font-size:12px}.online-result{position:sticky;bottom:10px;margin:12px auto 0;max-width:500px;padding:14px;border-radius:999px;text-align:center;background:#0a2132;border:2px solid #ffd45a;font-size:20px;font-weight:1000;box-shadow:0 10px 30px #0008}.online-battle .hand{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:980px){.online-lobby-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){.online-auth-grid{grid-template-columns:1fr}.online-actions{display:grid;grid-template-columns:1fr 1fr}.online-lobby-grid{grid-template-columns:1fr 1fr}.online-head{align-items:center}.online-battle .hand{grid-template-columns:repeat(3,1fr)}.battle-actions{grid-template-columns:1fr 1fr}.battle-actions .secondary-btn{grid-column:1/-1}.unit-art-img{border-radius:9px}.action-card .a-icon{height:42px}.skill-art-img{width:42px;height:42px}}
@media(max-width:390px){.online-lobby-grid{grid-template-columns:1fr}.online-battle .hand{grid-template-columns:repeat(2,1fr)}.room-row{grid-template-columns:76px 1fr}.room-row span:last-child{display:none}}
.enemy-codex-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.enemy-codex-card{overflow:hidden;border:1px solid #633943;border-radius:16px;background:linear-gradient(180deg,#361923,#160e14);color:#fff}.enemy-codex-art{width:100%;aspect-ratio:1/1;object-fit:cover;display:block}.enemy-codex-card>div{padding:10px}.enemy-codex-card small{color:#ff9a9a;font-weight:900}.enemy-codex-card h4{margin:3px 0 4px;font-size:14px}.enemy-codex-card p{margin:0 0 8px;color:#cdbdc2;font-size:10px;line-height:1.35}.enemy-codex-card b{font-size:12px}@media(max-width:980px){.enemy-codex-grid{grid-template-columns:repeat(4,1fr)}}@media(max-width:720px){.enemy-codex-grid{grid-template-columns:repeat(2,1fr);gap:8px}}
.avatar-art-img{width:100%;height:100%;object-fit:cover;border-radius:14px}
/* V3 lightweight icon art: every base card uses a unique icon pair. */
.guardian-icon-art,.unit-icon-art,.skill-icon-art,.enemy-codex-icon,.avatar-icon-art{display:flex;align-items:center;justify-content:center;line-height:1;filter:drop-shadow(0 6px 12px rgba(0,0,0,.25));user-select:none}.guardian-icon-art{font-size:54px;width:100%;height:100%}.unit-icon-art{font-size:48px;width:100%;height:100%}.skill-icon-art{font-size:30px;width:100%;height:100%}.avatar-icon-art{font-size:25px;width:100%;height:100%}.enemy-codex-icon{font-size:52px;aspect-ratio:1/1;background:radial-gradient(circle at 50% 34%,rgba(255,255,255,.10),rgba(0,0,0,.18));border-bottom:1px solid #633943}.guardian-card .g-art{padding:0;overflow:hidden}.action-card .a-icon{height:52px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:radial-gradient(circle at 50% 35%,rgba(255,255,255,.12),rgba(0,0,0,.12))}.unit-art{padding:0;overflow:hidden}.enemy-codex-card>div{padding:10px}
@media(max-width:720px){.guardian-icon-art{font-size:44px}.unit-icon-art{font-size:38px}.skill-icon-art{font-size:25px}.enemy-codex-icon{font-size:44px}}

/* FINAL: 45 expedition bosses, duel disasters, tournaments, simulation clock */
.stage-boss{display:flex;align-items:center;gap:7px;margin:0 0 8px;color:#e7f5ff;font-size:12px;font-weight:900}.stage-boss-icon{font-size:24px;line-height:1}.unit-row.two-units{grid-template-columns:repeat(2,minmax(0,1fr));max-width:760px;margin-inline:auto;width:100%}.modal-boss-icon{font-size:30px;vertical-align:middle;margin-right:6px}
.disaster-deck-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.disaster-deck-card{min-height:118px;border:2px solid #526075;border-radius:16px;background:linear-gradient(180deg,#172536,#0b1722);color:#fff;padding:11px;text-align:left;display:grid;gap:6px;position:relative}.disaster-deck-card .dicon{font-size:28px}.disaster-deck-card b{font-size:13px;line-height:1.15}.disaster-deck-card small{color:var(--muted);font-size:10px}.disaster-deck-card.owned{border-color:#a66dff;background:linear-gradient(180deg,#352150,#19132a)}.disaster-deck-card.selected{box-shadow:0 0 0 3px rgba(190,132,255,.23),0 0 24px rgba(167,105,255,.25);border-color:#d1a5ff}.disaster-deck-card.locked{filter:grayscale(.8);opacity:.5}.action-card.disaster{border-color:#d275ff;background:linear-gradient(180deg,#44245e,#20132d)}
.clock-panel{display:grid;grid-template-columns:1.25fr .75fr;gap:16px;align-items:center;padding:18px;margin-bottom:16px}.clock-panel h2{margin:8px 0 4px;font-size:clamp(20px,4vw,32px)}.clock-panel p{margin:4px 0;color:var(--muted);font-size:12px;line-height:1.45}.tournament-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:18px}.tournament-card{position:relative;display:grid;grid-template-columns:54px 1fr auto;gap:10px;align-items:center;background:linear-gradient(180deg,#13283a,#0b1b29);border:1px solid #31516a;border-radius:16px;padding:11px}.tournament-card.active{border-color:#ffd45a;box-shadow:0 0 0 2px rgba(255,212,90,.12)}.tournament-avatar{width:50px;height:50px;border-radius:14px;background:#091923;display:grid;place-items:center;border:1px solid #3f5c70}.tournament-icon{font-size:25px}.tournament-card h4{margin:2px 0 4px;font-size:14px}.tournament-card p,.tournament-card small{margin:0;color:var(--muted);font-size:10px}.tournament-status{font-size:9px;font-weight:900;letter-spacing:.08em;padding:5px 7px;border-radius:999px;background:#10283a;border:1px solid #34536b}.tournament-card .primary-btn{grid-column:2/-1;padding:8px 10px}
@media(max-width:980px){.disaster-deck-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:720px){.clock-panel{grid-template-columns:1fr;padding:13px}.tournament-grid{grid-template-columns:1fr}.disaster-deck-grid{grid-template-columns:repeat(2,1fr)}.unit-row.two-units{grid-template-columns:repeat(2,minmax(0,1fr))}.stage-boss-icon{font-size:20px}}
@media(max-width:390px){.disaster-deck-grid{grid-template-columns:1fr 1fr}.tournament-card{grid-template-columns:46px 1fr}.tournament-status{grid-column:2}.tournament-avatar{width:44px;height:44px}.unit-row.two-units{grid-template-columns:1fr 1fr}}

/* === FINAL UI RELEASE: readable typography, paged collections, single-icon art, Duelist === */
html,body{font-family:"Segoe UI","Noto Sans",Arial,sans-serif;font-size:16px;line-height:1.45;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
button,input,select{font-family:inherit}.topbar{position:sticky;top:0;z-index:50;background:linear-gradient(180deg,rgba(7,19,31,.98),rgba(7,19,31,.90) 72%,rgba(7,19,31,0));backdrop-filter:blur(10px);padding-top:8px}.help-top-btn{border-color:#53708a;background:#132b3d}
.home-menu-grid{grid-template-columns:repeat(5,1fr)}.compact-hero .hero-main{min-height:176px}.compact-hero .hero-side{min-height:176px}.compact-btn{padding:7px 11px;font-size:12px}
.section-title-paged{justify-content:space-between;align-items:flex-end}.section-title-paged>div{min-width:0}.section-title-paged h2,.section-title-paged p{margin:0}.section-title-paged p{margin-top:4px}

/* One large pictogram per card. Decorative fields are CSS only, never a second icon. */
.art-emblem{position:relative;display:grid;place-items:center;overflow:hidden;isolation:isolate;background:radial-gradient(circle at 24% 20%,hsl(var(--art-h) 85% 65% / .24),transparent 34%),radial-gradient(circle at 76% 78%,hsl(var(--art-h) 82% 48% / .18),transparent 38%),linear-gradient(145deg,hsl(var(--art-h) 44% 28% / .58),rgba(4,12,19,.36));box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
.art-emblem:before,.art-emblem:after{content:"";position:absolute;border-radius:50%;pointer-events:none;z-index:-1}.art-emblem:before{width:62%;height:62%;left:-20%;bottom:-28%;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.025)}.art-emblem:after{width:35%;height:35%;right:-10%;top:-12%;border:1px solid rgba(255,255,255,.06)}
.art-emblem .glyph{display:block;transform:translate(var(--art-x),var(--art-y)) rotate(var(--art-r));filter:drop-shadow(0 10px 14px rgba(0,0,0,.35));transition:transform .18s ease}
.guardian-icon-art{font-size:76px;width:100%;height:100%}.unit-icon-art{font-size:62px;width:100%;height:100%}.skill-icon-art{font-size:38px;width:100%;height:100%}.enemy-codex-icon{font-size:72px;aspect-ratio:1/1;width:100%;border-bottom:1px solid #633943}.avatar-icon-art{font-size:31px;width:100%;height:100%;border-radius:12px}.stage-boss-icon{font-size:25px;width:36px;height:36px;border-radius:10px;flex:0 0 36px}.modal-boss-icon{font-size:34px;width:48px;height:48px;border-radius:13px;display:inline-grid;vertical-align:middle;margin-right:7px}.tournament-icon{font-size:30px;width:100%;height:100%;border-radius:12px}.disaster-icon-art{font-size:42px;width:72px;height:64px;border-radius:14px}.duelist-avatar-icon{font-size:58px;width:100%;height:100%;border-radius:16px}
.guardian-card .g-art{height:132px}.guardian-card:hover .art-emblem .glyph,.enemy-codex-card:hover .art-emblem .glyph,.duelist-card:hover .art-emblem .glyph{transform:translate(var(--art-x),calc(var(--art-y) - 3px)) rotate(var(--art-r)) scale(1.07)}
.action-card .a-icon{height:60px}.action-card .a-icon .art-emblem{border-radius:10px}

/* Paged views: large collections stay compact and understandable. */
.pager{display:flex;align-items:center;justify-content:center;gap:12px;margin:14px auto 4px;min-height:42px}.pager span{min-width:70px;text-align:center;color:#c9dbe7;font-size:13px}.pager-btn{width:42px;height:38px;border-radius:12px;border:1px solid #345872;background:#10293d;color:#fff;font-size:24px;line-height:1;font-weight:800}.pager-btn:disabled{opacity:.28}.paged-stage-grid{grid-template-columns:repeat(3,minmax(0,1fr));}.paged-stage-grid .stage-card{min-height:190px}.stage-card .stage-boss{margin-bottom:8px}.stage-card .stage-boss span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Deck: collection at left, concise skill reference at right. */
.segmented{display:inline-flex;gap:4px;padding:4px;margin:0 0 14px;background:#091b29;border:1px solid #2f4d64;border-radius:14px}.segment{border:0;background:transparent;color:#a9bfce;padding:9px 13px;border-radius:10px;font-weight:800}.segment.active{background:#1a4c68;color:#fff;box-shadow:inset 0 0 0 1px #4d95bd}.deck-layout{display:grid;grid-template-columns:minmax(0,1fr) 315px;gap:14px;align-items:start}.paged-guardian-grid{grid-template-columns:repeat(4,minmax(0,1fr));}.paged-guardian-grid .guardian-card{min-height:204px}.deck-filter-row{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:8px}.filter-chip{border:1px solid #35556d;background:#0b2132;color:#bad0de;padding:7px 11px;border-radius:999px;font-size:12px;font-weight:800}.filter-chip.active{background:#1c5a78;border-color:#55acd6;color:#fff}.deck-detail{padding:12px;position:sticky;top:82px;display:grid;gap:10px}.deck-detail .section-title{margin:0 0 6px}.deck-detail .section-title h2{font-size:17px}.deck-detail .section-title p{font-size:11px}.compact-skills{margin:0;grid-template-columns:1fr}.compact-skills .skill-list{padding:0;background:transparent;border:0;box-shadow:none}.compact-skills .skill-line{padding:5px 0}.compact-skills .skill-line b{font-size:11px}.compact-skills .skill-line small{font-size:9px;line-height:1.22}.compact-skills .scost{width:25px;height:25px;font-size:11px}.deck-tab-panel .section-title{margin-top:4px}
.disaster-deck-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.disaster-deck-card{min-height:142px;align-content:start}.disaster-deck-card .art-emblem{margin-bottom:2px}

/* Enemy codex: 8 per page, 2 rows on desktop. */
.paged-enemy-grid{grid-template-columns:repeat(4,minmax(0,1fr));}.enemy-codex-card{min-height:245px}.enemy-codex-card h4{font-size:15px}.enemy-codex-card p{font-size:11px}

/* Duelist practice mode */
.duelist-intro{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px;margin-bottom:14px}.duelist-intro h2{margin:7px 0 4px;font-size:24px}.duelist-intro p{margin:0;color:var(--muted);max-width:720px}.duelist-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.duelist-card{padding:12px;display:grid;grid-template-rows:118px auto auto;gap:9px;min-height:255px}.duelist-avatar{width:100%;height:118px;border-radius:16px;overflow:hidden}.duelist-copy small{color:#8fb4c9;font-size:10px}.duelist-copy h3{margin:3px 0 4px;font-size:17px}.duelist-copy p{margin:0;color:var(--muted);font-size:11px;line-height:1.35}.duelist-card .primary-btn{width:100%;align-self:end}

/* Tournament pages stay at a practical height. */
.tournament-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.tournament-card{min-height:112px}.clock-panel{margin-top:2px}

/* Keep battle information readable while reducing vertical scrolling on phones. */
.battle-log{scrollbar-width:thin}.hand{scrollbar-width:thin}.info-panel p,.info-panel .tip{font-size:13px}.action-card h5{font-size:15px}.action-card p{font-size:11px;line-height:1.35}

@media(max-width:1100px){.deck-layout{grid-template-columns:minmax(0,1fr) 290px}.paged-guardian-grid{grid-template-columns:repeat(3,1fr)}.duelist-grid{grid-template-columns:repeat(3,1fr)}.home-menu-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:820px){.deck-layout{grid-template-columns:1fr}.deck-detail{position:static}.deck-side-summary{grid-template-columns:1fr}.paged-guardian-grid{grid-template-columns:repeat(4,1fr)}.paged-stage-grid{grid-template-columns:repeat(2,1fr)}.paged-enemy-grid{grid-template-columns:repeat(4,1fr)}.duelist-grid{grid-template-columns:repeat(2,1fr)}.home-menu-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:720px){
  body{font-size:15px}.topbar{gap:7px;flex-wrap:wrap}.topbar .logo{width:105px}.topbar .pill-btn{padding:8px 10px;font-size:12px}.topbar .spacer{min-width:12px}.home-menu-grid{grid-template-columns:repeat(2,1fr)}.menu-card{min-height:116px;padding:12px}.menu-card .emoji{font-size:30px;margin-bottom:9px}.menu-card h3{font-size:16px}.menu-card p{font-size:11px}
  .compact-hero .hero-main,.compact-hero .hero-side{min-height:auto}.paged-stage-grid{grid-template-columns:repeat(2,1fr)}.paged-stage-grid .stage-card{min-height:172px;padding:11px}.stage-card h4{font-size:13px}.stage-card p{font-size:10px}.stage-boss-icon{width:31px;height:31px;flex-basis:31px;font-size:21px}
  .paged-guardian-grid{grid-template-columns:repeat(2,1fr)}.guardian-card .g-art{height:118px}.guardian-icon-art{font-size:67px}.guardian-card h4{font-size:13px}.deck-detail{padding:12px}.compact-skills{grid-template-columns:1fr 1fr;gap:8px}.compact-skills .skill-line small{display:none}.compact-skills .skill-line{padding:7px 0}.segmented{width:100%}.segment{flex:1;padding:8px 7px;font-size:12px}.deck-toolbar .count{width:100%;margin-left:0;font-size:11px}
  .paged-enemy-grid{grid-template-columns:repeat(2,1fr)}.enemy-codex-icon{font-size:65px}.enemy-codex-card{min-height:225px}.duelist-intro{align-items:flex-start;flex-direction:column;padding:14px}.duelist-intro h2{font-size:20px}.duelist-grid{grid-template-columns:repeat(2,1fr);gap:8px}.duelist-card{grid-template-rows:94px auto auto;min-height:225px;padding:9px}.duelist-avatar{height:94px}.duelist-avatar-icon{font-size:48px}.duelist-copy h3{font-size:15px}.duelist-copy p{font-size:10px}
  .disaster-deck-grid{grid-template-columns:repeat(2,1fr)}.disaster-icon-art{width:100%;height:62px;font-size:38px}.tournament-grid{grid-template-columns:1fr}.section-title-paged{align-items:flex-start}.section-title-paged .compact-btn{flex:0 0 auto}
  .battle-center{display:flex;flex-direction:column}.hand{display:flex!important;grid-template-columns:none!important;gap:7px;overflow-x:auto;scroll-snap-type:x mandatory;padding:2px 2px 9px}.action-card{flex:0 0 46%;scroll-snap-align:start;min-height:136px}.action-card p{display:none}.action-card .a-icon{height:54px}.skill-icon-art{font-size:34px}.unit-icon-art{font-size:52px}.unit-art{height:72px}.online-battle .hand{display:flex!important}.online-battle .action-card{flex-basis:46%}
}
@media(max-width:430px){.paged-stage-grid,.paged-guardian-grid,.paged-enemy-grid,.duelist-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.compact-skills{grid-template-columns:1fr}.guardian-icon-art{font-size:61px}.enemy-codex-icon{font-size:58px}.duelist-copy p{display:none}.duelist-card{min-height:205px}.action-card{flex-basis:58%}.pager{margin-top:10px}}
/* Fruit/tree cards keep a living-tree silhouette while still using only one pictogram. */
.tree-art{position:relative;background:linear-gradient(180deg,rgba(28,84,60,.44),rgba(8,30,24,.68))!important}.tree-art:before{content:"";position:absolute;left:50%;bottom:5%;width:15%;height:44%;transform:translateX(-50%);border-radius:45% 45% 10px 10px;background:linear-gradient(90deg,#68452c,#94603c);opacity:.76;z-index:0}.tree-art:after{content:"";position:absolute;left:50%;top:12%;width:66%;height:54%;transform:translateX(-50%);border-radius:50% 48% 44% 56%;background:radial-gradient(circle at 35% 32%,#4d9c5b,#1e633d 58%,#123f2a);opacity:.68;z-index:0}.tree-art>.art-emblem{position:relative;z-index:1;background:transparent;box-shadow:none}.tree-art>.art-emblem:before,.tree-art>.art-emblem:after{display:none}
.support-card-icon{font-size:38px;width:100%;height:100%;border-radius:10px}
@media(max-width:720px){.support-card-icon{font-size:33px}}
/* Final polish: avoid sticky overlap and keep skill reference compact. */
.topbar{position:relative;top:auto;z-index:auto;background:transparent;backdrop-filter:none}
.skill-half-tabs{display:flex;gap:6px;margin:0 0 8px}.compact-skills{grid-template-columns:1fr}.compact-skills .skill-list{min-height:0}

/* ===== RIMBA battle clarity v4 ===== */
.battle-resources{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:10px 0}.battle-resources>div{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border:1px solid #31536c;border-radius:14px;background:rgba(7,22,34,.92)}.battle-resources small{font-size:10px;font-weight:900;letter-spacing:.1em;color:#9fc5d9}.battle-resources b{font-size:22px}.battle-resources b span{font-size:11px;color:#87a3b5;margin-left:2px}
.hand-tabs{overflow-x:auto;scrollbar-width:thin;padding-bottom:3px;white-space:nowrap}.hand-tab{flex:0 0 auto}.slot-tab.slot-0{border-color:var(--slot0)}.slot-tab.slot-1{border-color:var(--slot1)}.slot-tab.slot-2{border-color:var(--slot2)}
.fallen-skill{position:absolute;left:7px;right:7px;bottom:7px;border-radius:8px;padding:5px 6px;background:rgba(93,23,31,.92);border:1px solid #ff707d;color:#ffd8dc;font-size:9px;font-weight:900;text-align:center}.dead-skill-btn{border:1px solid #ff8d78;color:#fff;background:linear-gradient(135deg,#6d3023,#a84c34);border-radius:14px;padding:11px 12px;font-weight:900}.dead-skill-btn:disabled{opacity:.35;cursor:not-allowed}
.combat-scene{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center;margin:10px 0;padding:10px 14px;border-radius:18px;border:1px solid #4f6f87;background:linear-gradient(90deg,rgba(14,47,67,.96),rgba(10,24,38,.96),rgba(76,28,34,.92));box-shadow:0 12px 28px rgba(0,0,0,.28);animation:scenePop .22s ease}.combat-scene.attack{border-color:#d65b65}.combat-scene.heal{border-color:#45d58a}.combat-scene.shield{border-color:#52bfff}.combat-scene.domain{border-color:#c486ff}.combat-actor,.combat-target{display:flex;align-items:center;gap:10px;min-width:0;font-weight:900}.combat-target{justify-content:flex-end;text-align:right}.combat-icon{width:54px;height:54px;flex:0 0 54px}.combat-icon .glyph{font-size:34px}.combat-move{text-align:center;min-width:130px}.combat-move b{display:block;font-size:14px}.combat-move span{display:block;font-size:24px;line-height:1}.combat-move em{display:inline-block;margin-top:3px;padding:3px 8px;border-radius:999px;background:rgba(0,0,0,.3);font-style:normal;font-weight:900}.all-target{display:grid;place-items:center;width:54px;height:54px;border-radius:50%;border:1px solid #7791a5;background:#102b3e;font-size:9px}.unit-card.scene-attacker{animation:attackerPulse .55s ease;box-shadow:0 0 0 4px rgba(94,202,255,.28),0 0 28px rgba(94,202,255,.42)}.unit-card.scene-target{animation:targetPulse .55s ease;box-shadow:0 0 0 4px rgba(255,87,87,.30),0 0 30px rgba(255,87,87,.45)}
.online-timer{display:inline-flex;align-items:center;gap:5px;padding:6px 10px;border-radius:999px;border:1px solid #46708d;background:#0d2638}.online-timer.danger{border-color:#ff6c6c;color:#ffb2b2;animation:timerPulse 1s infinite}.online-roombar{flex-wrap:wrap}
@keyframes scenePop{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}@keyframes attackerPulse{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px) scale(1.02)}}@keyframes targetPulse{0%,100%{transform:translateX(0)}25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}@keyframes timerPulse{50%{opacity:.55}}
@media(max-width:720px){.battle-resources{grid-template-columns:repeat(4,1fr);gap:4px}.battle-resources>div{display:block;text-align:center;padding:7px 4px}.battle-resources small{display:block;font-size:8px}.battle-resources b{font-size:17px}.combat-scene{grid-template-columns:1fr 70px 1fr;padding:8px;gap:5px}.combat-icon{width:42px;height:42px;flex-basis:42px}.combat-icon .glyph{font-size:27px}.combat-actor,.combat-target{font-size:10px;gap:5px;flex-direction:column}.combat-target{flex-direction:column-reverse}.combat-move{min-width:0}.combat-move b{font-size:10px}.combat-move span{font-size:18px}.hand{grid-template-columns:repeat(2,minmax(0,1fr))!important}.action-card{min-height:145px}.action-card p{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:10px!important;padding-right:0}.battle-actions{grid-template-columns:1fr 1fr}.battle-actions .secondary-btn{grid-column:auto}.online-roombar{gap:6px}.online-roombar>*{font-size:11px}}

/* === RIMBA mobile battle compact layout v5 === */
.battle-compact{max-width:980px}
.compact-top{grid-template-columns:minmax(0,1fr) minmax(220px,.9fr) minmax(0,1fr)}
.compact-label{margin-top:8px;margin-bottom:5px}
.battle-turn-bridge{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;margin:7px 0;padding:7px 12px;border-radius:999px;border:1px solid #31536c;background:rgba(5,20,31,.92);font-size:12px;font-weight:900;text-align:center;box-shadow:0 5px 16px rgba(0,0,0,.25)}
.battle-turn-bridge>span:last-child{text-align:right}.battle-turn-bridge>span:first-child{text-align:left}.battle-turn-bridge.player{border-color:#37cf7c}.battle-turn-bridge.enemy{border-color:#ff6f74}
.hand-drawer-toggle{width:100%;margin:9px 0 0;padding:12px 14px;border-radius:15px;border:1px solid #34769b;background:linear-gradient(135deg,#102d43,#123b57);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:10px;font-weight:900;box-shadow:0 7px 18px rgba(0,0,0,.22)}
.hand-drawer-toggle.open{border-color:#5bc7ff;box-shadow:0 0 0 3px rgba(71,190,255,.13)}
.hand-drawer{margin-top:8px}.hand-drawer-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.hand-grid-2x2{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;overflow:visible!important;padding:0!important}
.hand-grid-2x2 .action-card{min-width:0;min-height:142px;flex:auto!important}
.selected-action-panel{margin-top:9px;padding:12px;border-radius:17px;border:1px solid #31536c;background:rgba(6,22,34,.97);box-shadow:0 10px 24px rgba(0,0,0,.3)}
.selected-card-summary{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:start}.selected-card-summary h4{margin:2px 0 3px;font-size:16px}.selected-card-summary p{margin:0;color:#c6d7e1;font-size:11px;line-height:1.35}.selected-cost{padding:6px 9px;border-radius:999px;background:#0d2a3d;border:1px solid #315a74;font-size:11px;font-weight:900;white-space:nowrap}.selected-close{width:28px;height:28px;border-radius:9px;border:1px solid #36566e;background:#102637;color:#fff;font-weight:900}
.target-prompt{margin:8px 0;padding:8px 10px;border-radius:11px;background:#2b1f15;border:1px solid #8a663a;color:#ffe0a2;font-size:11px;font-weight:800}.target-prompt.ready{background:#102e22;border-color:#2c8c58;color:#b8ffd2}
.compact-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px}.compact-actions .secondary-btn{grid-column:auto!important}
.battle-help{margin-top:8px;border:1px solid #27465c;border-radius:14px;background:rgba(5,19,30,.83);overflow:hidden}.battle-help summary{padding:10px 12px;cursor:pointer;color:#a9c5d5;font-size:11px;font-weight:800}.battle-help-body{padding:0 12px 12px;color:#c7d6df;font-size:12px}.battle-help-body p{line-height:1.45}.battle-help .battle-log{max-height:100px}
.unit-card.selectable-target{outline:2px dashed rgba(255,217,92,.65);outline-offset:1px;animation:targetReadyPulse 1.1s ease-in-out infinite}.unit-card.targeted{outline-style:solid!important}
@keyframes targetReadyPulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.12)}}

/* Combat scene becomes an overlay instead of making the page longer. */
.combat-scene{position:fixed!important;z-index:180;left:50%;top:50%;transform:translate(-50%,-50%);width:min(620px,calc(100vw - 24px));margin:0!important;pointer-events:none;box-shadow:0 20px 70px rgba(0,0,0,.68)!important;animation:sceneOverlay .18s ease both!important}
@keyframes sceneOverlay{from{opacity:0;transform:translate(-50%,-46%) scale(.94)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}

@media(max-width:720px){
  .battle-compact{padding:4px 5px 70px!important}
  .compact-top{display:grid!important;grid-template-columns:1fr 1fr!important;gap:5px!important}.compact-top .domain-banner{grid-column:1/-1;grid-row:2;min-height:40px;padding:6px 9px;border-radius:11px}.compact-top .domain-banner .d-icon{font-size:20px}.compact-top .domain-banner b{font-size:11px}.compact-top .domain-banner small{font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;max-width:80vw}
  .compact-top .avatar-panel{min-height:54px;padding:6px 8px;border-radius:12px}.compact-top .avatar-circle{width:36px;height:36px;font-size:20px;border-radius:10px}.compact-top .avatar-panel b{font-size:12px}.compact-top .avatar-panel small{font-size:9px}.compact-top .points{margin-top:2px;gap:2px}.compact-top .point-dot{width:8px;height:8px;border-radius:3px}
  .compact-label{margin:5px 2px 4px}.compact-label h3{font-size:10px}.compact-label span{font-size:8px}
  .unit-row{gap:4px!important}.unit-card{min-height:111px!important;padding:5px!important;border-radius:11px!important;border-width:1.5px!important}.unit-art{height:50px!important;margin-bottom:3px!important;border-radius:8px!important}.unit-icon-art{font-size:34px!important}.unit-meta h4{font-size:9.5px!important;line-height:1.05!important;max-height:21px;overflow:hidden}.unit-meta .type{font-size:6.5px!important}.hp-block b{font-size:12px!important}.hp-block small{font-size:6.5px!important}.hpbar{height:5px!important;margin-top:3px!important}.statusline{top:4px;right:4px;gap:2px}.mini-status{font-size:7px;padding:2px 3px;border-radius:5px}
  .battle-turn-bridge{margin:5px 0;padding:5px 8px;font-size:9px;gap:3px}.battle-turn-bridge b{font-size:9px}
  .hand-drawer-toggle{margin-top:6px;padding:9px 11px;border-radius:12px;font-size:11px;position:sticky;bottom:5px;z-index:35}
  .hand-drawer{position:fixed;z-index:220;left:6px;right:6px;bottom:6px;margin:0!important;padding:9px!important;max-height:78vh;overflow:auto;border-radius:18px!important;background:#071b29!important;box-shadow:0 24px 80px rgba(0,0,0,.78)!important;border:1px solid #3d7ba1!important}.hand-drawer:before{content:"";position:fixed;inset:0;background:rgba(0,0,0,.48);z-index:-1}.hand-drawer-head{position:sticky;top:0;background:#071b29;z-index:2;padding-bottom:5px}
  .hand-grid-2x2{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}.hand-grid-2x2 .action-card{min-height:123px!important;padding:7px!important;border-radius:12px!important}.hand-grid-2x2 .action-card .a-icon{height:42px!important;margin:4px 0!important}.hand-grid-2x2 .skill-icon-art,.hand-grid-2x2 .support-card-icon{font-size:28px!important}.hand-grid-2x2 .action-card h5{font-size:11px!important;margin-bottom:3px!important}.hand-grid-2x2 .action-card p{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:8.5px!important;line-height:1.25!important}.hand-grid-2x2 .cost{width:23px!important;height:23px!important;font-size:10px!important}.hand-grid-2x2 .kind{font-size:8px!important}.hand-grid-2x2 .owner-tag{font-size:6.5px!important;bottom:4px;left:5px}
  .selected-action-panel{position:fixed;z-index:210;left:6px;right:6px;bottom:6px;margin:0;padding:9px;border-radius:16px;box-shadow:0 20px 60px rgba(0,0,0,.7)}.selected-card-summary{grid-template-columns:minmax(0,1fr) auto auto;gap:6px}.selected-card-summary h4{font-size:12px}.selected-card-summary p{font-size:8.5px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.selected-cost{font-size:9px;padding:4px 6px}.selected-close{width:24px;height:24px}.target-prompt{margin:5px 0;padding:6px 8px;font-size:9px}.compact-actions{gap:5px}.compact-actions button{padding:8px 6px!important;font-size:9px!important;border-radius:10px!important}
  .battle-help{margin-top:6px}.battle-help summary{padding:7px 9px;font-size:9px}.battle-help-body{font-size:9px;padding:0 9px 9px}
  .combat-scene{top:44%!important;width:calc(100vw - 18px)!important;padding:7px!important;grid-template-columns:1fr 62px 1fr!important;border-radius:14px!important}.combat-icon{width:38px!important;height:38px!important;flex-basis:38px!important}.combat-icon .glyph{font-size:24px!important}.combat-actor,.combat-target{font-size:8px!important}.combat-move b{font-size:9px!important}.combat-move span{font-size:16px!important}.combat-move em{font-size:8px!important;padding:2px 5px!important}
  .online-roombar{position:sticky;top:0;z-index:50;padding:5px 6px!important;gap:4px!important;background:rgba(5,19,30,.96);border-radius:10px}.online-roombar>*{font-size:8.5px!important}.online-roombar button{padding:6px 7px!important}.online-timer b{font-size:11px}
}

@media(min-width:721px){.hand-drawer{max-width:700px;margin-left:auto;margin-right:auto}.selected-action-panel{max-width:700px;margin-left:auto;margin-right:auto}.battle-help{max-width:700px;margin-left:auto;margin-right:auto}}
.secret-option-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.secret-option-card{display:grid;grid-template-columns:72px 1fr;gap:10px;align-items:center;padding:12px;border-radius:16px;border:1px solid #5a4d28;background:linear-gradient(180deg,#332a13,#151109);color:#fff}.secret-option-card.locked{filter:grayscale(.85);opacity:.55}.secret-option-card.owned{border-color:#e1bc53;box-shadow:0 0 0 2px rgba(224,185,79,.08)}.secret-option-card .support-card-icon{font-size:38px;min-height:60px}.secret-option-card small{font-size:9px;color:#e7c96d;font-weight:900}.secret-option-card h4{margin:3px 0 5px}.secret-option-card p{margin:0 0 5px;color:#d8d0b7;font-size:10px;line-height:1.35}.secret-option-card b{font-size:10px}.signature-skill{border-left:3px solid #ffd765!important;background:linear-gradient(90deg,rgba(255,215,101,.08),transparent)}.signature-skill em{font-style:normal;font-size:7px;margin-left:5px;padding:2px 4px;border-radius:999px;background:#745b13;color:#ffe99b;vertical-align:middle}.action-card .fallen-skill{z-index:2}
@media(max-width:720px){.secret-option-grid{grid-template-columns:1fr}.secret-option-card{grid-template-columns:58px 1fr;padding:9px}.secret-option-card .support-card-icon{font-size:31px;min-height:50px}}

/* === RIMBA UI PATCH v7: readable card state + database === */
.home-menu-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
.action-card .a-icon{position:relative}
.usable-check{position:absolute;right:4px;bottom:4px;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:#20d978;color:#062014;border:2px solid rgba(255,255,255,.9);font-size:13px;font-weight:1000;box-shadow:0 3px 10px rgba(0,0,0,.35);z-index:4}
.owner-tag{display:none!important}
.toast{left:50%!important;top:50%!important;bottom:auto!important;transform:translate(-50%,-50%) scale(.94)!important;min-width:min(330px,84vw);max-width:min(520px,88vw);padding:16px 20px!important;border-radius:18px!important;text-align:center;font-size:15px;font-weight:900;line-height:1.35;background:rgba(5,21,31,.97)!important;border:1px solid #4d7790!important;box-shadow:0 18px 60px rgba(0,0,0,.55);z-index:500!important}
.toast.show{opacity:1!important;transform:translate(-50%,-50%) scale(1)!important}
.database-layout{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:16px;align-items:start}
.database-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.database-card{border:1px solid #31516a;border-radius:16px;background:linear-gradient(180deg,#10283a,#0a1b28);color:#fff;padding:10px;text-align:left;display:grid;grid-template-columns:72px 1fr;gap:10px;align-items:center;min-height:104px}
.database-card:hover,.database-card.selected{border-color:#62c8ff;box-shadow:0 0 0 2px rgba(98,200,255,.12),0 10px 24px rgba(0,0,0,.18)}
.database-card .guardian-icon-art{font-size:42px;min-height:68px;border-radius:12px;background:radial-gradient(circle at 50% 35%,rgba(255,255,255,.12),rgba(0,0,0,.14))}
.database-card small{display:block;color:#9fb8c8;font-size:9px;text-transform:uppercase;letter-spacing:.06em}.database-card h4{font-size:13px;line-height:1.15;margin:4px 0}.database-card span{font-size:10px;color:#d7e7f1;font-weight:800}
.database-detail{position:sticky;top:10px;padding:16px}.database-hero{display:grid;grid-template-columns:92px 1fr;gap:14px;align-items:center}.database-hero>.guardian-icon-art{min-height:92px;border-radius:16px;background:radial-gradient(circle at 50% 35%,rgba(255,255,255,.12),rgba(0,0,0,.15));font-size:60px}.database-hero h2{margin:7px 0 4px;font-size:23px}.database-hero p{margin:0;color:var(--muted)}.database-note{margin:14px 0;padding:11px 12px;border-radius:13px;background:#0b2435;border:1px solid #284b62;color:#c9e2ef;font-size:12px;line-height:1.45}.database-detail h3{font-size:15px;margin:14px 0 8px}.database-skill-list{display:grid;gap:6px}.database-skill{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;padding:8px 9px;border-radius:11px;background:#091c2a;border:1px solid #213e52}.database-skill.signature{border-color:#8c7128;background:linear-gradient(90deg,#261f0d,#091c2a)}.database-skill b{display:block;font-size:11px}.database-skill small{display:block;margin-top:2px;color:#aebfca;font-size:9px;line-height:1.35}.database-skill>span{font-size:10px;font-weight:900;color:#9edbff}
@media(max-width:1100px){.home-menu-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.database-layout{grid-template-columns:1fr}.database-detail{position:static}.database-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.home-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.database-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.database-card{grid-template-columns:54px 1fr;padding:8px;min-height:88px}.database-card .guardian-icon-art{font-size:34px;min-height:54px}.database-hero{grid-template-columns:74px 1fr}.database-hero>.guardian-icon-art{min-height:74px;font-size:48px}.database-detail{padding:12px}.usable-check{width:18px;height:18px;font-size:12px}}

/* === INDIGINUS audio+brand patch v8 === */
.brand-lockup{display:flex;align-items:center;gap:12px;min-width:0}
.brand-logo{width:54px;height:54px;border-radius:16px;object-fit:contain;background:linear-gradient(180deg,#fff,#f1f5f9);padding:6px;box-shadow:0 8px 20px rgba(0,0,0,.22)}
.brand-copy{display:grid;align-items:center;line-height:1}
.brand-copy b{font-size:18px;letter-spacing:.12em;color:#ff9a3d}
.brand-copy small{font-size:11px;letter-spacing:.18em;color:#d6efff;text-transform:uppercase;margin-top:3px}
.topbar .brand-sub{font-size:10px;color:#8bc6e5;font-weight:800;letter-spacing:.12em;text-transform:uppercase;margin-top:5px}
.setup-brand{display:flex;align-items:center;justify-content:center;gap:14px;margin:0 auto 12px;padding:14px 18px;border-radius:20px;background:linear-gradient(180deg,rgba(255,255,255,.03),rgba(255,255,255,.01));border:1px solid rgba(255,255,255,.07)}
.setup-logo{width:82px!important;height:82px;object-fit:contain;border-radius:22px;background:linear-gradient(180deg,#fff,#f0f4f7);padding:10px;box-shadow:0 10px 24px rgba(0,0,0,.2)}
.setup-brand-text{display:grid;line-height:1;text-align:left}
.setup-brand-text b{font-size:27px;letter-spacing:.14em;color:#ff9a3d}
.setup-brand-text small{font-size:13px;letter-spacing:.13em;color:#d6efff;text-transform:uppercase;margin-top:5px}
@media(max-width:720px){
  .brand-logo{width:42px;height:42px;border-radius:12px;padding:5px}
  .brand-copy b{font-size:15px}.brand-copy small{font-size:9px}.topbar .brand-sub{font-size:8px;margin-top:3px}
  .setup-brand{gap:10px;padding:10px 12px}.setup-logo{width:64px!important;height:64px;padding:8px;border-radius:18px}.setup-brand-text b{font-size:20px}.setup-brand-text small{font-size:11px}
}

/* === RIMBA card artwork patch v10 === */
.art-emblem.card-art-image{background:linear-gradient(180deg,rgba(9,27,39,.35),rgba(4,13,20,.12));box-shadow:none;overflow:hidden;padding:0!important}
.art-emblem.card-art-image:before,.art-emblem.card-art-image:after{display:none!important}
.art-emblem.card-art-image img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;filter:drop-shadow(0 8px 10px rgba(0,0,0,.24));transform:none!important}
.guardian-card .g-art .card-art-image img{padding:2px}
.unit-art .card-art-image img{padding:1px}
.action-card .a-icon .card-art-image img{padding:1px 2px}
.enemy-codex-icon.card-art-image{background:linear-gradient(180deg,rgba(70,22,29,.32),rgba(20,8,12,.12))}
.tree-art>.card-art-image{background:transparent!important}
.tree-art:has(.card-art-image):before,.tree-art:has(.card-art-image):after{display:none}
.combat-icon .card-art-image img{object-fit:contain}
@media(max-width:720px){.guardian-card .g-art .card-art-image img,.unit-art .card-art-image img{padding:0}}

/* === Balance & database patch v11 === */
.used-skill{background:rgba(46,91,127,.94)!important;border-color:#78b8e8!important;color:#dff4ff!important}
.database-tabs{margin:4px 0 14px}
.database-tabs .segment{min-width:130px}
.database-card .guardian-icon-art img,.database-detail .guardian-icon-art img{object-fit:contain}
@media(max-width:720px){.database-tabs{display:grid!important;grid-template-columns:repeat(3,1fr);gap:5px}.database-tabs .segment{min-width:0;padding:8px 5px;font-size:10px}}

/* === Responsive battle art + popup database + secret option privacy v12 === */
.unit-art{height:clamp(92px,10vw,150px)!important;overflow:hidden!important;padding:4px!important;background:radial-gradient(circle at 50% 42%,rgba(255,255,255,.08),rgba(0,0,0,.12))!important}
.unit-art .card-art-image{width:100%!important;height:100%!important;display:grid!important;place-items:center!important;overflow:visible!important}
.unit-art .card-art-image img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important;padding:0!important;transform:none!important}
.action-card .a-icon{overflow:hidden!important;padding:3px!important}
.action-card .a-icon .card-art-image,.combat-icon .card-art-image{width:100%!important;height:100%!important;overflow:visible!important}
.action-card .a-icon .card-art-image img,.combat-icon .card-art-image img{object-fit:contain!important;object-position:center!important;max-width:100%!important;max-height:100%!important;padding:0!important}
.database-layout{display:block!important}.database-detail{display:none!important}.database-popup{min-width:0}.database-popup .database-hero{grid-template-columns:110px 1fr}.database-popup .database-hero>.guardian-icon-art{min-height:110px;height:110px;border-radius:16px;background:#0a1d2a}.database-popup .database-hero>.guardian-icon-art img{object-fit:contain!important;padding:2px}.database-popup .database-skill-list{max-height:48vh;overflow:auto;padding-right:4px}
.secret-option-card .support-card-icon{font-size:46px!important}
@media(max-width:720px){
  .unit-art{height:clamp(78px,23vw,108px)!important;padding:2px!important}
  .unit-card{min-height:154px!important}
  .database-popup .database-hero{grid-template-columns:82px 1fr;gap:10px}.database-popup .database-hero>.guardian-icon-art{min-height:82px;height:82px}.database-popup .database-hero h2{font-size:19px}.database-popup .database-skill-list{max-height:52vh}
  .secret-option-card .support-card-icon{font-size:38px!important}
}
@media(max-width:390px){.unit-art{height:82px!important}.unit-card{min-height:148px!important}}

/* === SAVE / LOAD SYSTEM v13 === */
.save-top-btn{border-color:#6a83a0;background:linear-gradient(135deg,#173047,#203e58)}
.save-manager{min-width:0}.save-manager-title{display:flex;align-items:center;gap:12px;margin-bottom:14px}.save-manager-title .save-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:#12334a;font-size:25px;border:1px solid #37627d}.save-manager-title h2{margin:0 0 3px}.save-manager-title p{margin:0;color:var(--muted);font-size:12px;line-height:1.4}
.save-slot-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.save-slot-card{position:relative;display:flex;flex-direction:column;gap:10px;min-height:210px;padding:13px;border-radius:16px;border:1px solid #31536a;background:linear-gradient(180deg,#0c2638,#081a27);overflow:hidden}.save-slot-card.last-used{border-color:#6bd0ff;box-shadow:0 0 0 2px rgba(107,208,255,.1)}.save-slot-card.empty{background:linear-gradient(180deg,#0b202f,#091722)}
.save-slot-head{display:flex;justify-content:space-between;gap:8px;align-items:center;color:#a9c8da;font-size:9px;font-weight:900;letter-spacing:.12em}.save-slot-head b{font-size:7px;color:#062317;background:#48d98a;border-radius:999px;padding:4px 6px;letter-spacing:.05em}.save-slot-player strong{display:block;font-size:17px;line-height:1.1}.save-slot-player small{display:block;color:#a8bdc9;font-size:9px;margin-top:4px}.save-slot-stats{display:flex;flex-wrap:wrap;gap:6px}.save-slot-stats span{font-size:9px;font-weight:800;border:1px solid #29485c;border-radius:999px;padding:4px 7px;background:#071925}.save-slot-card time{font-size:9px;color:#7899ac}.save-slot-empty{flex:1;display:grid;place-items:center;color:#68889a;font-size:13px;border:1px dashed #29485d;border-radius:12px;min-height:78px}.save-slot-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:6px;margin-top:auto}.save-slot-card.empty .save-slot-actions{grid-template-columns:1fr}.save-slot-actions button{padding:8px 7px;font-size:9px;border-radius:10px}.save-delete-btn{width:34px;border:1px solid #6d3339;color:#ffbbc0;background:#3e171c;border-radius:10px}.save-note{margin-top:12px;padding:9px 11px;border-radius:11px;background:#071a27;border:1px solid #25455a;color:#91afc0;font-size:9px;line-height:1.45}
@media(max-width:720px){.save-slot-grid{grid-template-columns:1fr}.save-slot-card{min-height:0}.save-slot-empty{min-height:52px}.save-manager-title .save-icon{width:40px;height:40px}.save-manager-title h2{font-size:18px}.save-manager-title p{font-size:10px}.save-slot-actions button{font-size:10px}.save-top-btn{order:10}}

/* V14 skill card badge + owner thumb */
.skill-badge{position:relative;display:grid;place-items:center;width:100%;height:100%;border-radius:12px;background:radial-gradient(circle at 30% 25%,hsla(var(--sb-h),90%,78%,.95),hsla(var(--sb-h),84%,48%,.92) 48%,rgba(8,16,25,.95) 100%);border:2px solid rgba(255,255,255,.28);box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 8px 16px rgba(0,0,0,.22);transform:rotate(var(--sb-r,0deg));overflow:hidden}
.skill-badge::before{content:"";position:absolute;inset:4px;border-radius:10px;background:linear-gradient(135deg,rgba(255,255,255,.18),transparent 40%,rgba(0,0,0,.12));}
.skill-glyph{position:absolute;left:8px;top:6px;font-size:16px;opacity:.92;filter:drop-shadow(0 1px 2px rgba(0,0,0,.5));z-index:1}
.skill-mono{position:relative;z-index:1;font-size:18px;font-weight:1000;letter-spacing:.08em;color:#fff;text-shadow:0 2px 5px rgba(0,0,0,.55)}
.owner-thumb{position:absolute;right:4px;top:26px;width:20px;height:20px;border-radius:7px;background:rgba(7,16,24,.96);border:2px solid rgba(255,255,255,.9);box-shadow:0 4px 12px rgba(0,0,0,.3);overflow:hidden;z-index:4}
.owner-thumb-art,.owner-thumb-art.card-art-image,.owner-thumb-art.card-art-image img{width:100%;height:100%}
.owner-thumb-art.card-art-image img{object-fit:contain!important;object-position:center!important;background:rgba(255,255,255,.08)}
.owner-name-tag{display:block;margin-top:7px;font-size:9px;font-weight:800;letter-spacing:.04em;color:#e6f2f9;background:rgba(255,255,255,.09);padding:3px 6px;border-radius:999px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.action-card.skill .a-icon{padding:2px}
.action-card.skill .usable-check{top:4px;right:4px;bottom:auto}
.action-card.point .a-icon,.action-card.option .a-icon{padding:2px}
@media(max-width:720px){.skill-mono{font-size:15px}.skill-glyph{font-size:13px;left:6px;top:5px}.owner-thumb{width:18px;height:18px;top:22px}.owner-name-tag{font-size:8px;padding:2px 5px}}
@media(max-width:430px){.hand-grid-2x2 .owner-thumb{width:16px;height:16px;top:20px;right:3px}.hand-grid-2x2 .skill-mono{font-size:13px}.hand-grid-2x2 .skill-glyph{font-size:11px}.hand-grid-2x2 .owner-name-tag{font-size:7px;margin-top:4px;padding:2px 4px}}

/* V15 compact battle units + enforce skill emblem */
.action-card.skill .a-icon{height:46px!important;overflow:visible!important;background:rgba(5,17,27,.22)!important}
.action-card.skill .a-icon>.card-art-image:not(.owner-thumb-art){display:none!important}
.action-card.skill .skill-badge{display:grid!important}
.action-card.skill .owner-thumb{display:block!important}
.unit-card{min-height:130px!important;padding:8px!important}
.unit-art{height:58px!important;margin-bottom:5px!important;border-radius:10px!important}
.unit-art .card-art-image{width:100%!important;height:100%!important}
.unit-art .card-art-image img{object-fit:contain!important;object-position:center!important;transform:scale(.88)!important}
.unit-meta h4{font-size:12px!important;line-height:1.08!important}
.unit-meta .type{font-size:8px!important}.hp-block b{font-size:14px!important}.hp-block small{font-size:7px!important}.hpbar{height:6px!important;margin-top:5px!important}
@media(max-width:720px){
  .unit-card{min-height:104px!important;padding:5px!important;border-radius:10px!important}
  .unit-art{height:44px!important;margin-bottom:3px!important;border-radius:8px!important}
  .unit-art .card-art-image img{transform:scale(.82)!important}
  .unit-meta h4{font-size:9px!important;max-height:20px;overflow:hidden}
  .unit-meta .type{font-size:6.5px!important}.hp-block b{font-size:11px!important}.hp-block small{font-size:6px!important}.hpbar{height:4px!important;margin-top:3px!important}
  .action-card.skill .a-icon{height:40px!important}
}

/* === V16 HARD OVERRIDE: skill artwork is icon-only === */
.action-card[data-skill-card="1"] .a-icon{height:50px!important;min-height:50px!important;padding:3px!important;overflow:visible!important;background:rgba(4,16,25,.34)!important;display:grid!important;place-items:center!important;position:relative!important}
.action-card[data-skill-card="1"] .a-icon>.card-art-image:not(.owner-thumb-art),
.action-card[data-skill-card="1"] .a-icon>.skill-icon-art{display:none!important;visibility:hidden!important;width:0!important;height:0!important;opacity:0!important}
.action-card[data-skill-card="1"] .skill-badge{display:grid!important;visibility:visible!important;opacity:1!important;width:58px!important;height:44px!important;place-items:center!important;border-radius:12px!important;transform:none!important;background:radial-gradient(circle at 35% 25%,hsla(var(--sb-h),92%,72%,.98),hsla(var(--sb-h),78%,40%,.96) 52%,#08151f 100%)!important;border:1.5px solid rgba(255,255,255,.32)!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 5px 12px rgba(0,0,0,.3)!important;position:relative!important;overflow:hidden!important}
.action-card[data-skill-card="1"] .skill-glyph-main{font-size:25px!important;font-weight:1000!important;color:#fff!important;line-height:1!important;text-shadow:0 2px 5px rgba(0,0,0,.5)!important;z-index:2!important}
.action-card[data-skill-card="1"] .skill-glyph-mini{position:absolute!important;left:5px!important;bottom:3px!important;font-size:7px!important;font-weight:1000!important;letter-spacing:.05em!important;color:rgba(255,255,255,.86)!important;background:rgba(0,0,0,.28)!important;padding:1px 3px!important;border-radius:4px!important;z-index:3!important}
.action-card[data-skill-card="1"] .usable-check{top:2px!important;right:3px!important;bottom:auto!important;width:17px!important;height:17px!important;font-size:11px!important;z-index:8!important}
.action-card[data-skill-card="1"] .owner-thumb{top:23px!important;right:3px!important;width:19px!important;height:19px!important;border-radius:6px!important;border:1.5px solid rgba(255,255,255,.95)!important;z-index:8!important;background:#08131c!important}
.action-card[data-skill-card="1"] .owner-thumb .card-art-image,
.action-card[data-skill-card="1"] .owner-thumb .card-art-image img{display:block!important;visibility:visible!important;opacity:1!important;width:100%!important;height:100%!important;object-fit:contain!important}
.action-card[data-skill-card="1"].slot-0{background:linear-gradient(180deg,#155275 0%,#10354b 42%,#0b1d2a 100%)!important}
.action-card[data-skill-card="1"].slot-1{background:linear-gradient(180deg,#176046 0%,#113f32 42%,#0b1d2a 100%)!important}
.action-card[data-skill-card="1"].slot-2{background:linear-gradient(180deg,#6a3f86 0%,#442b5a 42%,#0b1d2a 100%)!important}
.action-card[data-skill-card="1"] .owner-name-tag{display:block!important;margin-top:5px!important;font-size:8px!important;font-weight:900!important;color:#fff!important;background:rgba(0,0,0,.22)!important;border:1px solid rgba(255,255,255,.08)!important;padding:3px 5px!important;border-radius:6px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
@media(max-width:720px){
  .hand-grid-2x2 .action-card[data-skill-card="1"] .a-icon{height:44px!important;min-height:44px!important}
  .hand-grid-2x2 .action-card[data-skill-card="1"] .skill-badge{width:52px!important;height:38px!important}
  .hand-grid-2x2 .action-card[data-skill-card="1"] .skill-glyph-main{font-size:22px!important}
  .hand-grid-2x2 .action-card[data-skill-card="1"] .owner-thumb{top:20px!important;width:17px!important;height:17px!important}
}

/* === V17 definitive skill-card renderer === */
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .a-icon{
  height:58px!important; min-height:58px!important; margin:6px 0 5px!important;
  padding:0!important; display:grid!important; place-items:center!important;
  overflow:visible!important; position:relative!important;
  background:rgba(2,12,20,.28)!important; border:1px solid rgba(255,255,255,.08)!important;
}
/* Never use the Guardian artwork as the main Skill illustration. */
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .a-icon > .card-art-image:not(.owner-thumb-art),
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .a-icon > .skill-icon-art,
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .a-icon > img{
  display:none!important; visibility:hidden!important; opacity:0!important;
}
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .skill-badge{
  width:70px!important; height:52px!important; border-radius:14px!important; transform:none!important;
  display:grid!important; grid-template-rows:1fr auto!important; place-items:center!important;
  position:relative!important; overflow:hidden!important;
  background:radial-gradient(circle at 30% 22%,hsla(var(--sb-h),90%,72%,.95),hsla(var(--sb-h),75%,38%,.96) 55%,#07131d 100%)!important;
  border:2px solid hsla(var(--sb-h),90%,76%,.68)!important;
  box-shadow:inset 0 0 16px rgba(255,255,255,.08),0 6px 16px rgba(0,0,0,.32)!important;
}
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .skill-badge::after{
  content:""; position:absolute; inset:5px; border-radius:9px; border:1px solid rgba(255,255,255,.10); pointer-events:none;
}
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .skill-glyph-main{
  font-size:28px!important; line-height:1!important; font-weight:1000!important; color:#fff!important;
  text-shadow:0 2px 6px rgba(0,0,0,.6)!important; z-index:2!important; margin-top:5px!important;
}
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .skill-kind-label{
  z-index:2!important; margin-bottom:4px!important; padding:1px 5px!important; border-radius:999px!important;
  background:rgba(0,0,0,.38)!important; color:#fff!important; font-size:7px!important; line-height:1.25!important;
  font-weight:1000!important; letter-spacing:.07em!important;
}
/* Each Guardian slot has a full-card color block, not only a border. */
html[data-rimba-build="v17"] .action-card[data-skill-card="1"].slot-0{background:linear-gradient(155deg,#0e658f 0%,#123c55 46%,#081a28 100%)!important}
html[data-rimba-build="v17"] .action-card[data-skill-card="1"].slot-1{background:linear-gradient(155deg,#157a57 0%,#174936 46%,#081a28 100%)!important}
html[data-rimba-build="v17"] .action-card[data-skill-card="1"].slot-2{background:linear-gradient(155deg,#7a459c 0%,#4b3062 46%,#081a28 100%)!important}
/* Check mark at upper right; owner portrait directly below it. */
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .usable-check{
  top:3px!important; right:4px!important; bottom:auto!important; width:18px!important; height:18px!important;
  font-size:11px!important; z-index:20!important;
}
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .owner-thumb{
  display:block!important; top:25px!important; right:4px!important; width:22px!important; height:22px!important;
  z-index:20!important; border-radius:7px!important; border:2px solid #fff!important; background:#07141e!important;
}
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .owner-thumb-art,
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .owner-thumb-art.card-art-image,
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .owner-thumb-art.card-art-image img{
  display:block!important; visibility:visible!important; opacity:1!important; width:100%!important; height:100%!important;
}
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .owner-thumb-art.card-art-image img{
  object-fit:contain!important; object-position:center!important; padding:0!important;
}
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .owner-name-tag{
  display:block!important; margin-top:4px!important; padding:3px 6px!important; border-radius:7px!important;
  background:rgba(0,0,0,.27)!important; color:#eaf7ff!important; font-size:8px!important; font-weight:900!important;
  white-space:nowrap!important; overflow:hidden!important; text-overflow:ellipsis!important;
}
/* Battle units: compact cards, artwork contained so heads/bodies are not awkwardly cropped. */
html[data-rimba-build="v17"] .battle .unit-card{min-height:112px!important; padding:6px!important}
html[data-rimba-build="v17"] .battle .unit-art{height:54px!important; min-height:54px!important; background:rgba(255,255,255,.035)!important}
html[data-rimba-build="v17"] .battle .unit-art .card-art-image,
html[data-rimba-build="v17"] .battle .unit-art .card-art-image img{width:100%!important;height:100%!important}
html[data-rimba-build="v17"] .battle .unit-art .card-art-image img{object-fit:contain!important;object-position:center!important;padding:1px!important}
html[data-rimba-build="v17"] .battle .unit-meta h4{font-size:10px!important;line-height:1.08!important}
html[data-rimba-build="v17"] .battle .unit-meta .type{font-size:7px!important}
html[data-rimba-build="v17"] .battle .hp-block b{font-size:12px!important}
@media(max-width:720px){
  html[data-rimba-build="v17"] .hand-grid-2x2 .action-card[data-skill-card="1"] .a-icon{height:52px!important;min-height:52px!important}
  html[data-rimba-build="v17"] .hand-grid-2x2 .action-card[data-skill-card="1"] .skill-badge{width:62px!important;height:46px!important}
  html[data-rimba-build="v17"] .hand-grid-2x2 .action-card[data-skill-card="1"] .skill-glyph-main{font-size:24px!important}
  html[data-rimba-build="v17"] .hand-grid-2x2 .action-card[data-skill-card="1"] .owner-thumb{top:23px!important;width:19px!important;height:19px!important}
  html[data-rimba-build="v17"] .battle .unit-card{min-height:102px!important}
  html[data-rimba-build="v17"] .battle .unit-art{height:46px!important;min-height:46px!important}
}


/* === V18 OWNER COLOR SYSTEM === */
/* Player 1 = turquoise, Player 2 = blue, Player 3 = orange. Enemy stays red. */
.unit-card.slot-0{border-color:var(--slot0)!important;background:linear-gradient(180deg,rgba(17,124,116,.78),rgba(7,31,37,.98))!important}
.unit-card.slot-1{border-color:var(--slot1)!important;background:linear-gradient(180deg,rgba(26,104,170,.78),rgba(7,27,43,.98))!important}
.unit-card.slot-2{border-color:var(--slot2)!important;background:linear-gradient(180deg,rgba(177,92,31,.80),rgba(42,24,10,.98))!important}
.unit-card.enemy-unit{border-color:#ef5d6a!important;background:linear-gradient(180deg,rgba(125,35,45,.88),rgba(38,12,18,.98))!important}

.action-card.skill.slot-0{border-color:var(--slot0)!important;background:linear-gradient(180deg,#116f69 0%,#0d544f 38%,#092d31 100%)!important;box-shadow:inset 0 0 0 1px rgba(83,255,237,.08)}
.action-card.skill.slot-1{border-color:var(--slot1)!important;background:linear-gradient(180deg,#155f9b 0%,#124a77 38%,#09283c 100%)!important;box-shadow:inset 0 0 0 1px rgba(113,190,255,.08)}
.action-card.skill.slot-2{border-color:var(--slot2)!important;background:linear-gradient(180deg,#a4561f 0%,#784016 38%,#38210e 100%)!important;box-shadow:inset 0 0 0 1px rgba(255,185,116,.09)}

/* Skill emblem uses the same owner color; the symbol/initial remains unique. */
.action-card.skill.slot-0 .skill-badge{background:linear-gradient(135deg,#43eee0,#14aa9d 52%,#0c615c)!important;border-color:#9dfff6!important}
.action-card.skill.slot-1 .skill-badge{background:linear-gradient(135deg,#72c7ff,#368fe8 52%,#185a9d)!important;border-color:#c0e7ff!important}
.action-card.skill.slot-2 .skill-badge{background:linear-gradient(135deg,#ffc06f,#ef8536 52%,#9c4d16)!important;border-color:#ffe0b6!important}

.action-card.skill.slot-0 .owner-name-tag{background:rgba(19,199,185,.22);border:1px solid rgba(83,255,237,.20)}
.action-card.skill.slot-1 .owner-name-tag{background:rgba(64,158,238,.22);border:1px solid rgba(119,199,255,.20)}
.action-card.skill.slot-2 .owner-name-tag{background:rgba(232,132,57,.23);border:1px solid rgba(255,190,126,.20)}

/* Make the owner distinction visible even when the hand card is small. */
.action-card.skill::after{content:"";position:absolute;left:0;right:0;bottom:0;height:5px;opacity:.95}
.action-card.skill.slot-0::after{background:var(--slot0)}
.action-card.skill.slot-1::after{background:var(--slot1)}
.action-card.skill.slot-2::after{background:var(--slot2)}

@media(max-width:720px){
  .action-card.skill.slot-0{background:linear-gradient(180deg,#126e68,#0b3b3a)!important}
  .action-card.skill.slot-1{background:linear-gradient(180deg,#185d94,#0c3657)!important}
  .action-card.skill.slot-2{background:linear-gradient(180deg,#97501f,#4a2a12)!important}
}

/* V19 — full responsive battle artwork, never crop */
.battle .unit-card .unit-art,
.online-battle .unit-card .unit-art{
  height:72px!important;
  min-height:72px!important;
  padding:3px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(0,0,0,.08))!important;
}
.battle-unit-image{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  transform:none!important;
  margin:auto!important;
  padding:0!important;
  filter:none!important;
}
/* disable older artwork transforms only inside battle cards */
.battle .unit-art .card-art-image,
.online-battle .unit-art .card-art-image{
  width:100%!important;
  height:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  transform:none!important;
}
.battle .unit-art .card-art-image img,
.online-battle .unit-art .card-art-image img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  transform:none!important;
  padding:0!important;
}
@media(max-width:720px){
  .battle .unit-card,
  .online-battle .unit-card{min-height:128px!important;padding:6px!important}
  .battle .unit-card .unit-art,
  .online-battle .unit-card .unit-art{height:66px!important;min-height:66px!important;padding:2px!important;margin-bottom:4px!important}
  .battle .unit-meta h4,.online-battle .unit-meta h4{font-size:10px!important;line-height:1.05!important}
  .battle .unit-meta .type,.online-battle .unit-meta .type{font-size:7px!important}
  .battle .hp-block b,.online-battle .hp-block b{font-size:12px!important}
}
@media(max-width:430px){
  .battle .unit-card,
  .online-battle .unit-card{min-height:120px!important;padding:5px!important}
  .battle .unit-card .unit-art,
  .online-battle .unit-card .unit-art{height:60px!important;min-height:60px!important}
}

/* === V20 CLEAN HAND CARDS / YELLOW SLOT / PINK OPTION === */
:root{
  --slot2:#f4cf3d!important;
}
/* Third player card/skill is yellow, not orange */
.unit-card.slot-2{
  border-color:#f4cf3d!important;
  background:linear-gradient(180deg,rgba(122,103,21,.74),rgba(34,31,12,.98))!important;
}
.action-card.skill.slot-2{
  border-color:#f4cf3d!important;
  background:linear-gradient(180deg,#756817 0%,#4d4512 46%,#0b1d2a 100%)!important;
  box-shadow:inset 0 0 0 1px rgba(255,238,130,.09)!important;
}
.action-card.skill.slot-2 .skill-badge{
  background:linear-gradient(135deg,#fff194,#e8c82d 54%,#806f10)!important;
  border-color:#fff8c7!important;
}
.action-card.skill.slot-2 .owner-name-tag{
  background:rgba(244,207,61,.18)!important;
  border:1px solid rgba(255,235,130,.20)!important;
}
.action-card.skill.slot-2::after{background:#f4cf3d!important}

/* Remove the long colored/dark image tray around the icon.
   Only the compact emblem itself remains. */
.action-card .a-icon,
.action-card[data-skill-card="1"] .a-icon,
html[data-rimba-build="v17"] .action-card[data-skill-card="1"] .a-icon{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
  overflow:visible!important;
}
.action-card.option .a-icon,
.action-card.point .a-icon{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
/* Option cards = special pink, visually far from guardian colors */
.action-card.option,
.action-card.disaster.option{
  border-color:#ff7bb8!important;
  background:linear-gradient(155deg,#6d2851 0%,#4b1d3b 48%,#171528 100%)!important;
  box-shadow:inset 0 0 0 1px rgba(255,170,214,.10)!important;
}
.action-card.option .kind{color:#ffd0e6!important}
.action-card.option .cost{border-color:#ffd0e6!important}
.action-card.option .support-card-icon{
  background:linear-gradient(135deg,#ffb5d7,#e45c9f 55%,#7c2856)!important;
  border:1px solid rgba(255,231,243,.55)!important;
  border-radius:12px!important;
  box-shadow:0 5px 14px rgba(0,0,0,.24)!important;
}
/* Keep point cards gold/neutral */
.action-card.point{
  border-color:#e5c65b!important;
  background:linear-gradient(155deg,#5e5122 0%,#3d3519 48%,#161710 100%)!important;
}
@media(max-width:720px){
  .unit-card.slot-2{background:linear-gradient(180deg,rgba(114,97,18,.72),rgba(31,29,11,.98))!important}
  .action-card.skill.slot-2{background:linear-gradient(180deg,#695d16,#373313)!important}
}


/* === V21 AUTHORITATIVE OWNER COLORS ===
   Final owner color mapping. These rules deliberately outrank all legacy v17/v18/v20 selectors. */
html[data-rimba-build="v21"] .action-card[data-skill-card="1"].slot-0,
html[data-rimba-build="v21"] .action-card.skill.slot-0{
  border-color:#27d8c7!important;
  background:linear-gradient(155deg,#126f69 0%,#0c514d 52%,#082a30 100%)!important;
  box-shadow:inset 0 0 0 1px rgba(112,255,240,.12)!important;
}
html[data-rimba-build="v21"] .action-card[data-skill-card="1"].slot-1,
html[data-rimba-build="v21"] .action-card.skill.slot-1{
  border-color:#49b9ff!important;
  background:linear-gradient(155deg,#155f99 0%,#114873 52%,#08283b 100%)!important;
  box-shadow:inset 0 0 0 1px rgba(130,207,255,.12)!important;
}
html[data-rimba-build="v21"] .action-card[data-skill-card="1"].slot-2,
html[data-rimba-build="v21"] .action-card.skill.slot-2{
  border-color:#f4cf3d!important;
  background:linear-gradient(155deg,#756816 0%,#544a13 52%,#28240d 100%)!important;
  box-shadow:inset 0 0 0 1px rgba(255,241,133,.14)!important;
}
html[data-rimba-build="v21"] .action-card[data-skill-card="1"].slot-0 .skill-badge{background:linear-gradient(135deg,#63f4e7,#20bdb0 55%,#0b7169)!important;border-color:#adfff7!important}
html[data-rimba-build="v21"] .action-card[data-skill-card="1"].slot-1 .skill-badge{background:linear-gradient(135deg,#86d3ff,#3a98ec 55%,#195f9e)!important;border-color:#c9ecff!important}
html[data-rimba-build="v21"] .action-card[data-skill-card="1"].slot-2 .skill-badge{background:linear-gradient(135deg,#fff5a7,#e6c82d 55%,#8a7410)!important;border-color:#fffbd0!important}
html[data-rimba-build="v21"] .unit-card.slot-0{border-color:#27d8c7!important;background:linear-gradient(180deg,rgba(20,112,103,.74),rgba(11,38,42,.98))!important}
html[data-rimba-build="v21"] .unit-card.slot-1{border-color:#49b9ff!important;background:linear-gradient(180deg,rgba(25,91,146,.74),rgba(10,36,52,.98))!important}
html[data-rimba-build="v21"] .unit-card.slot-2{border-color:#f4cf3d!important;background:linear-gradient(180deg,rgba(115,101,20,.74),rgba(34,31,12,.98))!important}
html[data-rimba-build="v21"] .action-card.option{border-color:#ff78b7!important;background:linear-gradient(155deg,#6b2850 0%,#4c1e3c 50%,#181529 100%)!important}

/* === V22: skill emblem text must remain fully visible === */
html[data-rimba-build="v22"] .action-card[data-skill-card="1"] .a-icon{
  height:62px!important;
  min-height:62px!important;
  padding:3px 32px 3px 3px!important;
  overflow:visible!important;
  display:grid!important;
  place-items:center!important;
}
html[data-rimba-build="v22"] .action-card[data-skill-card="1"] .skill-badge{
  width:68px!important;
  height:54px!important;
  min-width:68px!important;
  min-height:54px!important;
  padding:4px 5px 5px!important;
  box-sizing:border-box!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:2px!important;
  border-radius:12px!important;
  overflow:hidden!important;
  transform:none!important;
}
html[data-rimba-build="v22"] .action-card[data-skill-card="1"] .skill-glyph-main{
  display:block!important;
  position:static!important;
  margin:0!important;
  padding:0!important;
  font-size:24px!important;
  line-height:24px!important;
  flex:0 0 24px!important;
  color:#fff!important;
  text-shadow:0 2px 4px rgba(0,0,0,.55)!important;
}
html[data-rimba-build="v22"] .action-card[data-skill-card="1"] .skill-kind-label{
  display:block!important;
  position:static!important;
  margin:0!important;
  padding:2px 5px!important;
  max-width:58px!important;
  min-height:14px!important;
  box-sizing:border-box!important;
  border-radius:999px!important;
  background:rgba(0,0,0,.34)!important;
  color:#fff!important;
  font-size:7px!important;
  line-height:10px!important;
  font-weight:1000!important;
  letter-spacing:.04em!important;
  text-align:center!important;
  white-space:nowrap!important;
  overflow:visible!important;
}
html[data-rimba-build="v22"] .action-card[data-skill-card="1"] .usable-check{
  top:3px!important;
  right:3px!important;
  bottom:auto!important;
}
html[data-rimba-build="v22"] .action-card[data-skill-card="1"] .owner-thumb{
  top:27px!important;
  right:3px!important;
}
@media(max-width:720px){
  html[data-rimba-build="v22"] .hand-grid-2x2 .action-card[data-skill-card="1"] .a-icon{
    height:58px!important;
    min-height:58px!important;
  }
  html[data-rimba-build="v22"] .hand-grid-2x2 .action-card[data-skill-card="1"] .skill-badge{
    width:64px!important;
    height:50px!important;
    min-width:64px!important;
    min-height:50px!important;
  }
  html[data-rimba-build="v22"] .hand-grid-2x2 .action-card[data-skill-card="1"] .skill-glyph-main{
    font-size:22px!important;
    line-height:22px!important;
    flex-basis:22px!important;
  }
  html[data-rimba-build="v22"] .hand-grid-2x2 .action-card[data-skill-card="1"] .skill-kind-label{
    font-size:6.5px!important;
    line-height:9px!important;
    max-width:55px!important;
  }
  html[data-rimba-build="v22"] .hand-grid-2x2 .action-card[data-skill-card="1"] .owner-thumb{
    top:25px!important;
  }
}

/* === V23 used-skill lock state for expedition + duel + PvP === */
.action-card.is-used{
  filter: grayscale(.88) saturate(.42) brightness(.84);
  opacity:.92;
  box-shadow:none;
}
.action-card.is-used::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(10,15,20,.16),rgba(6,10,14,.28));
  pointer-events:none;
}
.action-card.is-fallen{
  filter: grayscale(.95) saturate(.28) brightness(.74);
  opacity:.85;
}
.used-lock{
  position:absolute;
  right:7px;
  top:34px;
  width:22px;
  height:22px;
  border-radius:999px;
  display:grid;
  place-items:center;
  background:rgba(16,21,26,.96);
  border:2px solid #d9e2e8;
  color:#ffffff;
  font-size:12px;
  line-height:1;
  z-index:6;
  box-shadow:0 4px 10px rgba(0,0,0,.28);
}
.action-card.is-used .usable-check{display:none!important}
.action-card.is-used .owner-name-tag,
.action-card.is-fallen .owner-name-tag{background:rgba(33,43,52,.85); color:#ecf3f8}
.action-card.is-used h5,
.action-card.is-fallen h5{color:#edf2f7}
.action-card.is-used p,
.action-card.is-fallen p{color:#d5dde4}
@media(max-width:720px){
  .used-lock{top:30px;width:20px;height:20px;font-size:11px}
}

/* === V24 Battle Cinematic === */
.battle-cinematic{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;background:rgba(2,8,13,.68);backdrop-filter:blur(4px);opacity:0;pointer-events:none;transition:opacity .16s ease}
.battle-cinematic.show{opacity:1}
.cine-duel{width:min(920px,94vw);display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.8fr) minmax(0,1fr);align-items:center;gap:18px;padding:18px;border:1px solid rgba(109,192,235,.25);border-radius:28px;background:linear-gradient(180deg,rgba(7,24,36,.96),rgba(4,14,22,.96));box-shadow:0 30px 90px rgba(0,0,0,.65);overflow:hidden}
.cine-entity{display:grid;justify-items:center;gap:8px;min-width:0}.cine-entity b{font-size:clamp(13px,2vw,20px);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;color:#fff;text-shadow:0 2px 8px #000}
.cine-portrait{width:min(240px,27vw);aspect-ratio:1/1;border-radius:24px;display:grid;place-items:center;overflow:hidden;background:radial-gradient(circle at 50% 35%,rgba(255,255,255,.12),rgba(0,0,0,.18));border:2px solid rgba(255,255,255,.16);box-shadow:0 16px 45px rgba(0,0,0,.42)}
.cine-portrait img{width:100%;height:100%;object-fit:contain;object-position:center;padding:6px;filter:drop-shadow(0 12px 18px rgba(0,0,0,.34))}.cine-emoji{font-size:clamp(56px,10vw,110px)}
.cine-entity.actor{animation:cineActorIn .36s ease-out both}.cine-entity.target{animation:cineTargetIn .36s ease-out both}.cine-entity.target .cine-portrait{border-color:rgba(255,104,104,.38)}
.cine-center{position:relative;display:grid;justify-items:center;align-items:center;min-height:250px;text-align:center}.cine-skill-name{position:relative;z-index:3;font-size:clamp(17px,2.6vw,28px);font-weight:1000;letter-spacing:.03em;color:#fff;text-shadow:0 3px 12px #000;margin-bottom:-8px}.cine-fx{position:relative;z-index:2;width:min(230px,28vw);aspect-ratio:1/1;object-fit:contain;filter:drop-shadow(0 0 26px rgba(97,215,255,.32));animation:cineFxPop .72s cubic-bezier(.17,.84,.32,1.18) both}.cine-value{position:relative;z-index:4;margin-top:-22px;min-height:28px;padding:5px 12px;border-radius:999px;background:rgba(3,12,19,.86);border:1px solid rgba(255,255,255,.18);font-size:clamp(14px,2vw,22px);font-weight:1000;color:#fff}
.cine-empty{width:min(220px,25vw);aspect-ratio:1/1;display:grid;place-items:center;border-radius:22px;border:2px dashed rgba(255,255,255,.18);font-size:clamp(15px,2vw,24px);font-weight:900;color:#b5cad6}
.battle-cinematic.kind-heal .cine-fx{filter:drop-shadow(0 0 28px rgba(76,255,147,.42))}.battle-cinematic.kind-shield .cine-fx{filter:drop-shadow(0 0 28px rgba(110,185,255,.42))}.battle-cinematic.kind-domain{background:rgba(5,7,12,.78)}
.cine-domain-card{width:min(760px,92vw);min-height:min(500px,72vh);display:grid;place-items:center;align-content:center;text-align:center;padding:22px;border-radius:30px;background:radial-gradient(circle at 50% 36%,rgba(109,33,33,.42),rgba(5,11,17,.97) 68%);border:2px solid rgba(255,106,106,.35);box-shadow:0 35px 110px rgba(0,0,0,.72);overflow:hidden}.cine-domain-kicker{font-size:11px;letter-spacing:.28em;font-weight:1000;color:#ff9b9b}.cine-domain-card h2{position:relative;z-index:3;margin:-20px 0 6px;font-size:clamp(27px,5vw,50px);color:#fff;text-shadow:0 5px 18px #000}.cine-domain-card p{position:relative;z-index:3;margin:0;color:#ffd4d4;font-weight:800}.cine-domain-card .domain-fx{width:min(360px,60vw);filter:drop-shadow(0 0 38px rgba(255,98,80,.48));animation:cineDomainFx 1.1s ease both}
@keyframes cineActorIn{from{opacity:0;transform:translateX(-55px) scale(.92)}to{opacity:1;transform:translateX(0) scale(1)}}
@keyframes cineTargetIn{from{opacity:0;transform:translateX(55px) scale(.92)}to{opacity:1;transform:translateX(0) scale(1)}}
@keyframes cineFxPop{0%{opacity:0;transform:scale(.35) rotate(-10deg)}38%{opacity:1;transform:scale(1.14) rotate(2deg)}100%{opacity:1;transform:scale(1) rotate(0)}}
@keyframes cineDomainFx{0%{opacity:0;transform:scale(.55)}45%{opacity:1;transform:scale(1.08)}100%{opacity:1;transform:scale(1)}}

/* V24 used Skill remains visible and visibly locked until the turn ends */
.action-card.is-used{filter:grayscale(1)!important;saturate:0!important;opacity:.68!important;background:linear-gradient(180deg,#49535b,#272e34)!important;border-color:#7c878f!important;box-shadow:none!important}
.action-card.is-used::before{content:"";position:absolute;inset:0;background:rgba(13,17,20,.26);z-index:4;pointer-events:none}
.action-card.is-used .a-icon,.action-card.is-used h5,.action-card.is-used p,.action-card.is-used .owner-name-tag,.action-card.is-used .kind,.action-card.is-used .cost{filter:grayscale(1);opacity:.72}
.action-card.is-used .usable-check{display:none!important}.action-card.is-used .used-lock{display:grid!important}
.used-lock{position:absolute!important;right:6px!important;top:34px!important;width:27px!important;height:27px!important;border-radius:999px!important;place-items:center!important;background:#171d22!important;border:2px solid #f2f5f7!important;color:#fff!important;font-size:14px!important;z-index:9!important;box-shadow:0 4px 13px rgba(0,0,0,.42)!important}
.action-card.is-used .used-skill{position:relative;z-index:8;background:#303a42!important;border-color:#87939b!important;color:#f1f5f7!important}

@media(max-width:720px){.cine-duel{grid-template-columns:1fr 110px 1fr;gap:7px;padding:11px;border-radius:20px}.cine-portrait{width:min(31vw,145px);border-radius:17px}.cine-center{min-height:170px}.cine-fx{width:min(118px,28vw)}.cine-skill-name{font-size:12px;line-height:1.1}.cine-value{font-size:12px;margin-top:-12px;padding:4px 8px}.cine-entity b{font-size:10px}.cine-domain-card{min-height:55vh;border-radius:22px}.cine-domain-card .domain-fx{width:min(280px,66vw)}.used-lock{top:29px!important;width:23px!important;height:23px!important;font-size:12px!important}}
@media(max-width:430px){.cine-duel{width:96vw;grid-template-columns:1fr 88px 1fr}.cine-portrait{width:31vw}.cine-fx{width:88px}.cine-center{min-height:140px}.cine-domain-card{width:94vw;min-height:48vh}}
@media(prefers-reduced-motion:reduce){.cine-entity,.cine-fx,.cine-domain-card .domain-fx{animation:none!important}.battle-cinematic{transition:none}}

/* === V26 TURN ECONOMY: one Guardian action per turn, maximum 3 === */
.unit-card.turn-spent{
  filter:grayscale(.9) saturate(.28) brightness(.78);
  opacity:.88;
  box-shadow:inset 0 0 0 1px rgba(210,220,228,.15)!important;
}
.unit-card.turn-spent .unit-art,
.unit-card.turn-spent .unit-meta,
.unit-card.turn-spent .hpbar{opacity:.72}
.unit-lock-badge{
  display:inline-flex!important;
  align-items:center;
  gap:3px;
  padding:4px 7px!important;
  border-radius:999px!important;
  border:1px solid #d7e0e6!important;
  background:rgba(19,25,30,.96)!important;
  color:#fff!important;
  font-size:8px!important;
  font-weight:1000!important;
  letter-spacing:.04em;
  box-shadow:0 3px 9px rgba(0,0,0,.32);
  z-index:8;
}
.action-card.is-used{
  filter:grayscale(1) saturate(0) brightness(.76)!important;
  opacity:.82!important;
  border-color:#89949b!important;
  background:linear-gradient(155deg,#46515a 0%,#303940 54%,#20272c 100%)!important;
  cursor:not-allowed!important;
}
.action-card.is-used .used-lock{display:grid!important}
.action-card.is-used .usable-check{display:none!important}
.action-card.is-used .used-skill{background:#283138!important;color:#fff!important;border-color:#929da4!important}
@media(max-width:720px){
  .unit-lock-badge{padding:3px 5px!important;font-size:7px!important}
}

/* === V27 AI difficulty + ecosystem class === */
.ai-difficulty-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px;padding:12px 14px;border-radius:16px}
.ai-difficulty-bar>div:first-child{display:grid;gap:3px}.ai-difficulty-bar b{font-size:13px}.ai-difficulty-bar small{font-size:10px;color:var(--muted);line-height:1.35}
.ai-toggle{display:flex;gap:5px;padding:4px;border-radius:12px;background:#071a27;border:1px solid #29485d;flex:0 0 auto}
.ai-toggle button{border:0;border-radius:9px;padding:8px 13px;background:transparent;color:#9db7c7;font-size:10px;font-weight:900;cursor:pointer}
.ai-toggle button.active{background:linear-gradient(180deg,#1d6f88,#124c63);color:#fff;box-shadow:inset 0 0 0 1px rgba(118,224,255,.35)}
.unit-meta .type{max-width:160px;white-space:normal;line-height:1.1}
@media(max-width:720px){.ai-difficulty-bar{align-items:stretch;flex-direction:column}.ai-toggle{display:grid;grid-template-columns:1fr 1fr}.ai-toggle button{width:100%}.unit-meta .type{font-size:8px}}

/* === V28 always-visible End Turn control === */
.always-end-turn{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  margin:10px 0 12px;
  padding:8px;
  border:1px solid #31566e;
  border-radius:14px;
  background:linear-gradient(180deg,rgba(10,31,44,.96),rgba(6,22,32,.96));
}
.end-turn-btn{
  min-height:42px;
  border:1px solid #77b7db;
  border-radius:11px;
  background:linear-gradient(135deg,#173f59,#205d7e);
  color:#fff;
  font-size:12px;
  font-weight:900;
  letter-spacing:.04em;
  cursor:pointer;
  box-shadow:0 5px 14px rgba(0,0,0,.2);
}
.end-turn-btn:hover:not(:disabled){filter:brightness(1.08);transform:translateY(-1px)}
.end-turn-btn:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(.75)}
.always-end-turn small{max-width:230px;color:#91adbd;font-size:9px;line-height:1.35;text-align:right}
@media(max-width:720px){
  .always-end-turn{grid-template-columns:1fr;padding:7px;margin:8px 0 10px}
  .end-turn-btn{min-height:40px;font-size:11px}
  .always-end-turn small{text-align:center;max-width:none;font-size:8px}
}

/* === V29 DECK LAB + UNA SHOP + FINAL SLOT ORDER ===
   Battle visual order: BLUE left / YELLOW center / TEAL right. */
:root{--slot0:#49b9ff!important;--slot1:#f4cf3d!important;--slot2:#27d8c7!important}
html[data-rimba-build="v29"] .unit-card.slot-0{border-color:#49b9ff!important;background:linear-gradient(180deg,rgba(25,91,146,.78),rgba(10,36,52,.98))!important}
html[data-rimba-build="v29"] .unit-card.slot-1{border-color:#f4cf3d!important;background:linear-gradient(180deg,rgba(115,101,20,.78),rgba(34,31,12,.98))!important}
html[data-rimba-build="v29"] .unit-card.slot-2{border-color:#27d8c7!important;background:linear-gradient(180deg,rgba(20,112,103,.78),rgba(11,38,42,.98))!important}
html[data-rimba-build="v29"] .action-card.skill.slot-0{border-color:#49b9ff!important;background:linear-gradient(155deg,#155f99 0%,#114873 52%,#08283b 100%)!important}
html[data-rimba-build="v29"] .action-card.skill.slot-1{border-color:#f4cf3d!important;background:linear-gradient(155deg,#756816 0%,#544a13 52%,#28240d 100%)!important}
html[data-rimba-build="v29"] .action-card.skill.slot-2{border-color:#27d8c7!important;background:linear-gradient(155deg,#126f69 0%,#0c514d 52%,#082a30 100%)!important}
html[data-rimba-build="v29"] .action-card.skill.slot-0 .skill-badge{background:linear-gradient(135deg,#86d3ff,#3a98ec 55%,#195f9e)!important;border-color:#c9ecff!important}
html[data-rimba-build="v29"] .action-card.skill.slot-1 .skill-badge{background:linear-gradient(135deg,#fff5a7,#e6c82d 55%,#8a7410)!important;border-color:#fffbd0!important}
html[data-rimba-build="v29"] .action-card.skill.slot-2 .skill-badge{background:linear-gradient(135deg,#63f4e7,#20bdb0 55%,#0b7169)!important;border-color:#adfff7!important}
html[data-rimba-build="v29"] .guardian-card.slot-0{border-color:#49b9ff!important}
html[data-rimba-build="v29"] .guardian-card.slot-1{border-color:#f4cf3d!important}
html[data-rimba-build="v29"] .guardian-card.slot-2{border-color:#27d8c7!important}
html[data-rimba-build="v29"] .slot-tab.slot-0{border-color:#49b9ff!important}
html[data-rimba-build="v29"] .slot-tab.slot-1{border-color:#f4cf3d!important}
html[data-rimba-build="v29"] .slot-tab.slot-2{border-color:#27d8c7!important}

.deck-presets{display:grid;grid-template-columns:230px 1fr;gap:14px;align-items:center;margin-bottom:12px;padding:13px}.deck-presets h3{margin:4px 0 3px;font-size:17px}.deck-presets p{margin:0;color:var(--muted);font-size:10px;line-height:1.4}.deck-preset-buttons{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.deck-preset{display:grid;gap:2px;min-width:0;padding:9px 8px;border-radius:12px;border:1px solid #31546b;background:#0a2130;color:#dcecf5;text-align:left;cursor:pointer}.deck-preset small{font-size:7px;letter-spacing:.11em;color:#7fa3b8;font-weight:1000}.deck-preset b{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.deck-preset span{font-size:7px;color:#91afc0}.deck-preset.active{border-color:#73d7ff;background:linear-gradient(180deg,#164763,#0c2b3d);box-shadow:0 0 0 2px rgba(99,207,255,.12)}.deck-preset.incomplete{border-color:#8b7040}.deck-preset.ready:not(.active)::after{content:"✓";justify-self:end;color:#62dfa0;font-weight:1000;margin-top:-15px}
.deck-main-tabs{grid-template-columns:repeat(4,1fr)!important}.deck-rule-strip{display:flex;flex-wrap:wrap;gap:6px;margin:9px 0 14px}.deck-rule-strip span{padding:6px 9px;border-radius:999px;border:1px solid #294d63;background:#091f2d;color:#a9c6d7;font-size:9px;font-weight:800}.deck-rule-strip.in-side{margin:0}.deck-ready{background:#173e31!important;border-color:#4bd790!important}.deck-incomplete{background:#4a381d!important;border-color:#c59d4d!important}
.active-guardian-order{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:8px 0 10px;padding:8px 9px;border-radius:11px;background:#071b27;border:1px solid #284a60;font-size:9px}.active-guardian-order b{width:100%;font-size:9px;color:#cfe5f1}.active-guardian-order button{display:grid;gap:3px;padding:8px 10px;border-radius:11px;background:#0b1f2d;color:#eef8ff;cursor:pointer;text-align:left;border:1px solid #355870;min-width:0}.active-guardian-order button small{font-size:7px;letter-spacing:.08em;opacity:.9;color:#d5ebf6}.active-guardian-order button span{padding:0;border:0;background:transparent;font-size:10px;font-weight:900;line-height:1.2;color:inherit}.active-guardian-order .blue{border-color:#49b9ff;background:linear-gradient(180deg,rgba(73,185,255,.18),rgba(10,31,45,.96))}.active-guardian-order .yellow{border-color:#e1bb39;background:linear-gradient(180deg,rgba(244,207,61,.16),rgba(34,26,8,.96));color:#fff6d1}.active-guardian-order .yellow small{color:#ffefb1}.active-guardian-order .teal{border-color:#27d8c7;background:linear-gradient(180deg,rgba(39,216,199,.16),rgba(7,33,33,.96));color:#d5fff9}.active-guardian-order .teal small{color:#c2fff7}.active-guardian-order button.active{box-shadow:0 0 0 2px rgba(255,255,255,.08),0 10px 24px rgba(0,0,0,.18);transform:translateY(-1px)}.active-guardian-order.side{display:grid;gap:8px;margin:0;padding:0;border:0;background:transparent}.active-guardian-order.side b{margin:0 0 2px}.deck-side-summary{display:grid;gap:10px;margin-bottom:10px}.deck-side-block{padding:10px;border-radius:13px;background:linear-gradient(180deg,#0c2738,#0a1c29);border:1px solid #31536a}.deck-side-block>small{display:block;margin-bottom:8px;font-size:8px;letter-spacing:.11em;color:#84a9bd;font-weight:1000}
.deck-builder-panel{display:grid;gap:12px}.deck-builder-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:14px;border-radius:16px;border:1px solid #31536a;background:linear-gradient(180deg,#0d2a3d,#091d2b)}.deck-builder-head h2{margin:5px 0 3px}.deck-builder-head p{margin:0;color:var(--muted);font-size:10px;line-height:1.4}.deck-owner-tabs,.una-guardian-tabs{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px}.owner-select{display:flex;align-items:center;gap:8px;min-width:170px;padding:8px 10px;border-radius:13px;border:1px solid #31536b;background:#0a2130;color:#dcecf5;cursor:pointer}.owner-select.active{border-color:#77d9ff;background:#123c55}.owner-select-art{width:38px;height:38px;display:grid;place-items:center;border-radius:10px;background:#071b26;overflow:hidden;flex:0 0 auto}.owner-select-art img{width:100%;height:100%;object-fit:contain}.owner-select span{font-size:10px;font-weight:900;text-align:left}
.deck-card-editor-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.deck-edit-card{position:relative;display:flex;flex-direction:column;min-height:178px;padding:10px;border-radius:14px;border:1px solid #315167;background:linear-gradient(180deg,#0d293b,#081b28)}.deck-edit-card.selected{border-color:#5fd4ff;box-shadow:inset 0 0 0 1px rgba(102,214,255,.1)}.deck-edit-card.signature{border-color:#d8b954;background:linear-gradient(180deg,#3f3719,#111e25)}.deck-edit-top{display:flex;justify-content:space-between;color:#83a9bd;font-size:8px;font-weight:900}.deck-edit-card h4{margin:8px 0 5px;font-size:12px}.deck-edit-card p{margin:0;color:#b6cbd7;font-size:8px;line-height:1.35;flex:1}.deck-copy-row{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-top:9px;padding-top:7px;border-top:1px solid rgba(255,255,255,.08)}.deck-copy-row>span{font-size:8px;color:#9bb5c4}.deck-copy-row>div{display:flex;gap:4px}.deck-copy-row button{width:29px;height:29px;border-radius:8px;border:1px solid #46728b;background:#12364b;color:#fff;font-weight:1000;cursor:pointer}.deck-copy-row button:disabled{opacity:.32;cursor:not-allowed}.option-editor-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.option-edit-card{display:grid;grid-template-columns:58px 1fr;gap:10px;padding:11px;border-radius:15px;border:1px solid #ff7bb8;background:linear-gradient(155deg,#572442,#28162a);min-height:145px}.option-edit-card.locked{filter:grayscale(.9);opacity:.5}.option-edit-card .support-card-icon{width:56px;height:56px;display:grid;place-items:center;font-size:30px}.option-edit-card h4{margin:3px 0 4px}.option-edit-card p{margin:0;color:#e1c6d3;font-size:8px;line-height:1.35}.option-edit-card .deck-copy-row{grid-column:1/-1}
.deck-strategy-card .strategy-grid{margin:0}.strategy-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:7px;margin:10px 0 14px}.strategy-card{padding:10px;border-radius:12px;border:1px solid #31536a;background:#0a2130;min-height:76px}.strategy-card small{display:block;font-size:7px;letter-spacing:.09em;font-weight:1000;color:#83a8bc;margin-bottom:5px}.strategy-card b{font-size:9px;line-height:1.4;color:#e9f3f8}.strategy-card.good{border-color:#3a7b65}.strategy-card.weak{border-color:#7b4a4d}.strategy-card.combo{border-color:#665d91}.combo-chips{display:flex;flex-wrap:wrap;gap:4px}.combo-chips span{font-size:8px;padding:4px 6px;border-radius:999px;background:#171c35;border:1px solid #4b4d78;color:#d8d7ff}
.database-card{transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}.database-card:hover{transform:translateY(-2px);border-color:#5fbbe8;box-shadow:0 10px 24px rgba(0,0,0,.2)}.database-popup .strategy-grid{margin-top:12px}.database-skill.signature{border-left:3px solid #dfbd4c;padding-left:8px;background:rgba(94,77,21,.16)}

.una-hero{display:grid;grid-template-columns:105px 1fr auto;gap:15px;align-items:center;margin-bottom:12px;padding:16px}.una-avatar{width:96px;height:96px;display:grid;place-items:center;border-radius:24px;background:linear-gradient(145deg,#f8d6a8,#9b6639);font-size:55px;border:2px solid #f4c783;box-shadow:0 10px 26px rgba(0,0,0,.28)}.una-hero h1{font-size:20px;margin:6px 0}.una-hero p{font-size:10px;color:#adc4d2;line-height:1.5;margin:0}.una-wallet{display:grid;gap:4px;min-width:160px;padding:12px;border-radius:14px;background:#071b27;border:1px solid #36556a;text-align:right}.una-wallet small{font-size:8px;color:#8eabba}.una-wallet b{font-size:19px;color:#ffe590}.shop-tabs{margin-bottom:12px}.una-shop-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.una-item{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:11px;padding:12px;border-radius:15px;border:1px solid #31536a;background:linear-gradient(180deg,#0d293b,#081b28)}.una-item>.support-card-icon{grid-row:1/3;width:58px;height:58px;margin-right:8px}.una-item:has(>.support-card-icon){grid-template-columns:58px minmax(0,1fr) auto}.una-item.signature{border-color:#c5a943}.una-item.locked{opacity:.48;filter:grayscale(.85)}.una-item-copy small{font-size:7px;color:#86a9bc;font-weight:1000;letter-spacing:.09em}.una-item-copy h4{margin:3px 0 4px;font-size:12px}.una-item-copy p{margin:0;color:#b6cbd7;font-size:8px;line-height:1.38}.una-stock{margin-top:6px;font-size:8px;color:#e5d493}.una-actions{display:grid;align-content:center;gap:5px;min-width:122px}.una-actions>b{text-align:right;color:#ffe58c;font-size:11px}.una-actions button{padding:7px 8px;border-radius:9px;border:1px solid #46728b;background:#12364b;color:#fff;font-size:8px;font-weight:900;cursor:pointer}.una-actions button:last-child{background:#392528;border-color:#78505a}.una-actions button:disabled{opacity:.34;cursor:not-allowed}.skill-shop-number{position:absolute;top:8px;left:8px;width:24px;height:24px;display:grid;place-items:center;border-radius:8px;background:#071722;border:1px solid #3f6175;color:#9fc5d9;font-size:8px;font-weight:1000}.una-item:not(:has(>.support-card-icon)) .una-item-copy{padding-left:25px}

@media(max-width:980px){.deck-presets{grid-template-columns:1fr}.deck-preset-buttons{grid-template-columns:repeat(5,minmax(105px,1fr));overflow-x:auto}.deck-card-editor-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.option-editor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.strategy-grid{grid-template-columns:1fr 1fr}.strategy-card.combo{grid-column:1/-1}.una-shop-grid{grid-template-columns:1fr}}
@media(max-width:720px){.deck-main-tabs{display:grid!important;grid-template-columns:1fr 1fr!important}.deck-presets{padding:10px}.deck-preset-buttons{grid-template-columns:repeat(5,126px)}.deck-builder-head{align-items:stretch;flex-direction:column}.deck-card-editor-grid{grid-template-columns:1fr 1fr}.option-editor-grid{grid-template-columns:1fr}.owner-select{min-width:145px}.strategy-grid{grid-template-columns:1fr}.strategy-card.combo{grid-column:auto}.una-hero{grid-template-columns:72px 1fr}.una-avatar{width:68px;height:68px;border-radius:18px;font-size:38px}.una-wallet{grid-column:1/-1;text-align:left;grid-template-columns:1fr auto;align-items:center}.una-wallet small{grid-column:1/-1}.una-hero h1{font-size:15px}.una-item{grid-template-columns:minmax(0,1fr);}.una-item:has(>.support-card-icon){grid-template-columns:50px minmax(0,1fr)}.una-item>.support-card-icon{width:48px;height:48px}.una-actions{grid-column:1/-1;grid-template-columns:1fr 1fr 1fr;align-items:center}.una-actions>b{text-align:left}.una-item:has(>.support-card-icon) .una-actions{grid-column:1/-1}}
@media(max-width:430px){.deck-card-editor-grid{grid-template-columns:1fr}.deck-preset-buttons{grid-template-columns:repeat(5,118px)}.active-guardian-order{align-items:flex-start;flex-direction:column}.active-guardian-order.side{align-items:stretch}.deck-side-block{padding:9px}.una-actions{grid-template-columns:1fr 1fr}.una-actions>b{grid-column:1/-1}}
html[data-rimba-build="v29"] .action-card.skill.slot-0 .owner-name-tag{background:rgba(73,185,255,.18)!important;border-color:rgba(130,207,255,.22)!important}
html[data-rimba-build="v29"] .action-card.skill.slot-1 .owner-name-tag{background:rgba(244,207,61,.18)!important;border-color:rgba(255,241,133,.22)!important}
html[data-rimba-build="v29"] .action-card.skill.slot-2 .owner-name-tag{background:rgba(39,216,199,.18)!important;border-color:rgba(112,255,240,.22)!important}
html[data-rimba-build="v29"] .active-guardian-order button{display:grid;gap:2px;padding:7px 9px;border-radius:10px;background:#091b27;color:#fff;cursor:pointer;text-align:left}
html[data-rimba-build="v29"] .active-guardian-order button small{font-size:7px;letter-spacing:.08em;opacity:.75}
html[data-rimba-build="v29"] .active-guardian-order button span{padding:0;border:0;background:transparent;font-size:9px;color:inherit}
html[data-rimba-build="v29"] .active-guardian-order button.blue{border:1px solid #49b9ff}
html[data-rimba-build="v29"] .active-guardian-order button.yellow{border:1px solid #f4cf3d}
html[data-rimba-build="v29"] .active-guardian-order button.teal{border:1px solid #27d8c7}
html[data-rimba-build="v29"] .active-guardian-order button.active{box-shadow:0 0 0 2px rgba(255,255,255,.12);filter:brightness(1.12)}

/* Keep V22 skill-icon label fix active on V29 as well. */
html[data-rimba-build="v29"] .action-card[data-skill-card="1"] .a-icon{height:62px!important;min-height:62px!important;padding:3px 32px 3px 3px!important;overflow:visible!important;display:grid!important;place-items:center!important}
html[data-rimba-build="v29"] .action-card[data-skill-card="1"] .skill-badge{width:68px!important;height:54px!important;min-width:68px!important;min-height:54px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:1px!important;overflow:visible!important;transform:none!important}
html[data-rimba-build="v29"] .action-card[data-skill-card="1"] .skill-glyph-main{display:block!important;position:static!important;margin:0!important;padding:0!important;font-size:24px!important;line-height:24px!important;flex:0 0 24px!important;color:#fff!important;text-shadow:0 2px 4px rgba(0,0,0,.55)!important}
html[data-rimba-build="v29"] .action-card[data-skill-card="1"] .skill-kind-label{display:block!important;position:static!important;margin:0!important;padding:2px 5px!important;max-width:58px!important;min-height:14px!important;border-radius:999px!important;background:rgba(0,0,0,.34)!important;color:#fff!important;font-size:7px!important;line-height:10px!important;font-weight:1000!important;letter-spacing:.04em!important;text-align:center!important;white-space:nowrap!important;overflow:visible!important}
html[data-rimba-build="v29"] .action-card[data-skill-card="1"] .usable-check{top:3px!important;right:3px!important;bottom:auto!important}
html[data-rimba-build="v29"] .action-card[data-skill-card="1"] .owner-thumb{top:27px!important;right:3px!important}
@media(max-width:720px){html[data-rimba-build="v29"] .hand-grid-2x2 .action-card[data-skill-card="1"] .a-icon{height:58px!important;min-height:58px!important}html[data-rimba-build="v29"] .hand-grid-2x2 .action-card[data-skill-card="1"] .skill-badge{width:64px!important;height:50px!important;min-width:64px!important;min-height:50px!important}html[data-rimba-build="v29"] .hand-grid-2x2 .action-card[data-skill-card="1"] .skill-glyph-main{font-size:22px!important;line-height:22px!important;flex-basis:22px!important}html[data-rimba-build="v29"] .hand-grid-2x2 .action-card[data-skill-card="1"] .skill-kind-label{font-size:6.5px!important;line-height:9px!important;max-width:55px!important}html[data-rimba-build="v29"] .hand-grid-2x2 .action-card[data-skill-card="1"] .owner-thumb{top:25px!important}}

/* === V30 Expedition threat mix === */
.unit-card.enemy-unit.special-threat{
  border-color:#ff5f6d!important;
  background:linear-gradient(180deg,#5b2028,#231014)!important;
  box-shadow:inset 0 0 0 1px rgba(255,95,109,.12);
}
.unit-card.enemy-unit.special-threat .type{
  color:#ffd1d5!important;
  font-weight:900;
  letter-spacing:.09em;
}

/* === V31 HOME / AUDIO / AI / HELP / TRADE / ASCEND === */
.home-menu-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0 20px}
.home-menu-card{position:relative;min-height:112px;display:grid;grid-template-columns:50px minmax(0,1fr) 20px;align-items:center;gap:11px;padding:15px;border:1px solid #2b5970;border-radius:18px;background:linear-gradient(145deg,#12344a,#0b2535);color:#fff;text-align:left;overflow:hidden;box-shadow:0 10px 24px rgba(0,0,0,.12);transition:.16s ease}
.home-menu-card:before{content:"";position:absolute;right:-34px;bottom:-48px;width:112px;height:112px;border-radius:50%;background:rgba(80,184,235,.08)}
.home-menu-card:hover{transform:translateY(-2px);border-color:#54b8e5;box-shadow:0 14px 28px rgba(0,0,0,.2)}
.home-menu-icon{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;font-size:26px;background:#0a2231;border:1px solid rgba(255,255,255,.1)}
.home-menu-copy{display:grid;gap:5px}.home-menu-copy b{font-size:16px}.home-menu-copy small{font-size:10px;line-height:1.35;color:#a9c8d8}.home-menu-arrow{font-size:24px;color:#72c8ef;text-align:right}
.home-menu-audio{border-color:#6675d8}.home-menu-ai{border-color:#47b89d}.home-menu-help{border-color:#75a7c9}.home-menu-trade{border-color:#d5a646}.home-menu-ascend{border-color:#b272df;background:linear-gradient(145deg,#2a2145,#14283c)}.home-menu-card.locked-future{filter:saturate(.7);opacity:.82}
.settings-hero,.trade-login,.trade-hero,.ascend-hero,.help-hero{display:flex;align-items:center;gap:18px;margin-bottom:16px;padding:20px}.settings-hero h1,.trade-hero h1,.ascend-hero h1,.help-hero h1{margin:6px 0 6px;font-size:28px}.settings-hero p,.trade-hero p,.ascend-hero p,.help-hero p{margin:0;color:#9fb9c8;line-height:1.55}.settings-big-icon,.ascend-symbol{width:74px;height:74px;flex:0 0 auto;display:grid;place-items:center;border-radius:22px;font-size:38px;background:linear-gradient(145deg,#173d55,#0b2332);border:1px solid #3b6680}
.audio-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.audio-control{padding:18px}.audio-control-head{display:grid;grid-template-columns:42px 1fr auto;gap:12px;align-items:center}.audio-control-head>span{font-size:28px}.audio-control h3{margin:0}.audio-control p{margin:4px 0 0;color:#9db7c6;font-size:11px}.volume-row{display:grid;grid-template-columns:1fr 52px;gap:12px;align-items:center;margin-top:18px}.volume-row input{width:100%;accent-color:#53c7ed}.volume-row b{text-align:right;font-size:18px}.audio-test{margin-top:10px}.audio-scenes{margin-top:12px;padding:18px}.audio-scenes>div{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.audio-scenes span{display:flex;flex-direction:column;padding:10px;border:1px solid #284b60;border-radius:12px;background:#081e2c}.audio-scenes b{font-size:10px;color:#7dd4f4;margin-top:3px}.audio-scenes p{color:#8eaaba;font-size:10px;margin-bottom:0}
.ai-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ai-choice{padding:20px;border-radius:18px;border:2px solid #31566c;background:linear-gradient(160deg,#112e40,#0a1f2d);color:#fff;text-align:left}.ai-choice>span{font-size:34px}.ai-choice h3{font-size:22px;margin:8px 0}.ai-choice p{color:#a9c1cf;line-height:1.5}.ai-choice b{color:#75d7f5}.ai-choice.active{border-color:#51d3b7;box-shadow:0 0 0 3px rgba(81,211,183,.12)}.ai-explain{margin-top:12px;padding:18px}.ai-method-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.ai-method-grid div{padding:12px;border-radius:12px;background:#081e2c;border:1px solid #294a5d}.ai-method-grid b{display:block;margin-bottom:4px}.ai-method-grid span{font-size:10px;color:#9cb6c5;line-height:1.4}
.battle-guide{display:grid;gap:10px}.guide-step{display:grid;grid-template-columns:42px minmax(0,1fr) minmax(180px,280px);gap:14px;align-items:center;padding:15px;border:1px solid #2d5368;border-radius:16px;background:linear-gradient(145deg,#0d2a3b,#091f2d)}.guide-num{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;font-weight:900;background:#1aa6d6;color:#fff}.guide-step h3{margin:0 0 5px}.guide-step p{margin:0;color:#9db7c6;font-size:11px;line-height:1.5}.guide-demo,.guide-hand,.guide-cinematic,.guide-lock,.guide-versus{min-height:70px;border-radius:13px;border:1px solid #31566c;background:#071a27;display:flex;align-items:center;justify-content:center;gap:12px;padding:10px}.guide-demo{justify-content:space-around}.guide-hand span{padding:10px 8px;border-radius:9px;background:#123950;font-size:8px;font-weight:900}.guide-hand span:nth-child(2){background:#7c285f}.guide-hand span:nth-child(3){background:#716213}.guide-hand span:nth-child(4){background:#553a12}.guide-skill-card{padding:12px;border-radius:13px;background:linear-gradient(145deg,#17588a,#0f3959);border:2px solid #59bfff;display:grid;gap:4px}.guide-skill-card span,.guide-skill-card small{font-size:9px}.guide-art{width:58px;height:58px}.guide-art img{width:100%;height:100%;object-fit:contain}.guide-versus>span{font-size:28px}.guide-cinematic span{font-size:22px;color:#ffe36b}.guide-lock{filter:grayscale(.8);background:#252e34}.guide-lock span{font-size:30px}.end-turn-guide{width:100%;padding:14px;border-radius:12px;border:1px solid #4d6e81;background:#173042;color:#dceaf1;font-weight:900}.help-rules-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:16px}.help-rules-grid article{display:grid;gap:4px;padding:12px;border-radius:13px;border:1px solid #2c5064;background:#0b2433}.help-rules-grid span{font-size:9px;color:#9eb7c5;line-height:1.4}
.trade-hero{justify-content:space-between}.trade-wallet{display:grid;gap:4px;justify-items:end}.trade-wallet small{font-size:9px;color:#8fb1c3}.trade-wallet b{font-size:24px}.trade-tools-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.trade-tool{padding:16px}.trade-tool h3{margin-top:0}.trade-tool p{font-size:10px;color:#9cb6c5;line-height:1.45}.trade-tool input,.trade-tool select{width:100%;background:#071b28;color:#fff;border:1px solid #31566b;border-radius:9px;padding:10px}.trade-inline{display:flex;gap:6px;margin:8px 0}.trade-inline button,.market-price button,.trade-claim-grid button{border:1px solid #437089;border-radius:9px;background:#123c54;color:#fff;padding:8px 10px;font-weight:800}.trade-inline input{min-width:0}.trade-empty{padding:16px;color:#8da9b9;text-align:center}.trade-claims{padding:16px;margin-top:12px}.trade-claim-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.trade-claim-grid article{display:grid;gap:6px;padding:11px;border:1px solid #35576a;border-radius:11px;background:#081e2c}.trade-claim-grid small{color:#90aab9}.market-section{margin-top:18px}.market-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.market-card{display:flex;flex-direction:column;justify-content:space-between;gap:10px;min-height:145px;padding:14px;border:1px solid #35596e;border-radius:15px;background:linear-gradient(145deg,#0d2a3b,#091e2b)}.market-card small{font-size:8px;color:#85b8d2}.market-card h3{margin:5px 0}.market-card p{font-size:10px;color:#9db5c3}.market-price{display:flex;align-items:center;justify-content:space-between;gap:8px}.market-price b{font-size:16px;color:#ffd671}
.ascend-hero.locked{filter:saturate(.7)}.ascend-hero.open{border-color:#aa78e6}.evolution-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.evo-card{padding:18px;border-radius:17px;border:2px solid #62798b;background:#0b2432}.evo-card>span{font-size:34px}.evo-card h3{margin:8px 0}.evo-card p{font-size:10px;line-height:1.55;color:#a2bac7}.evo-card.white{border-color:#dfe8ef;background:linear-gradient(145deg,#253a48,#132b3b)}.evo-card.purple{border-color:#a65adb;background:linear-gradient(145deg,#392353,#1d2340)}.future-system,.ultimate-concept{margin-top:12px;padding:18px}.future-system p,.ultimate-concept p{color:#a2bac7;line-height:1.55}.chip-cloud{display:flex;flex-wrap:wrap;gap:7px}.chip-cloud span{padding:7px 10px;border-radius:999px;border:1px solid #3d6479;background:#092130;font-size:9px}.subject-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.subject-grid div{display:grid;gap:3px;padding:10px;border:1px solid #315268;border-radius:10px;background:#081d2a}.subject-grid span{font-size:8px;color:#8da9b7}.ultimate-concept{display:flex;gap:14px;align-items:center;border-color:#d39c40}.ultimate-icon{width:66px;height:66px;display:grid;place-items:center;border-radius:18px;background:linear-gradient(145deg,#f0b940,#8d5c17);font-size:36px;color:#fff}.ultimate-concept h2{margin:0}.civilization-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.civil-level{display:grid;gap:5px;padding:11px;border:1px solid #31566a;border-radius:12px;background:#0a2130}.civil-level>span{font-size:9px;color:#78c9ed}.civil-level b{font-size:11px}.civil-level small{font-size:8px;color:#8fa9b7}.civil-level.locked{opacity:.55;filter:grayscale(.4)}
@media(max-width:980px){.home-menu-grid{grid-template-columns:repeat(3,1fr)}.audio-scenes>div,.help-rules-grid,.subject-grid{grid-template-columns:repeat(2,1fr)}.civilization-grid{grid-template-columns:repeat(3,1fr)}.trade-tools-grid,.market-grid,.trade-claim-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){.home-menu-grid{grid-template-columns:repeat(2,1fr);gap:8px}.home-menu-card{min-height:94px;grid-template-columns:40px minmax(0,1fr) 14px;padding:11px}.home-menu-icon{width:38px;height:38px;font-size:21px}.home-menu-copy b{font-size:13px}.home-menu-copy small{font-size:8px}.settings-hero,.trade-login,.trade-hero,.ascend-hero,.help-hero{align-items:flex-start;padding:14px}.settings-big-icon,.ascend-symbol{width:52px;height:52px;font-size:26px;border-radius:15px}.settings-hero h1,.trade-hero h1,.ascend-hero h1,.help-hero h1{font-size:21px}.audio-settings-grid,.ai-choice-grid,.evolution-grid{grid-template-columns:1fr}.audio-scenes>div{grid-template-columns:repeat(2,1fr)}.ai-method-grid{grid-template-columns:1fr}.guide-step{grid-template-columns:34px 1fr}.guide-step>div:last-child,.guide-step>button{grid-column:2}.help-rules-grid{grid-template-columns:repeat(2,1fr)}.trade-hero{display:grid}.trade-wallet{justify-items:start}.trade-tools-grid,.market-grid,.trade-claim-grid{grid-template-columns:1fr}.trade-inline{flex-wrap:wrap}.trade-inline input{flex:1 1 120px}.subject-grid{grid-template-columns:repeat(2,1fr)}.civilization-grid{grid-template-columns:repeat(2,1fr)}.ultimate-concept{align-items:flex-start}}
@media(max-width:390px){.home-menu-grid{grid-template-columns:1fr}.help-rules-grid,.subject-grid,.civilization-grid{grid-template-columns:1fr}}

/* === V32 compact interactive Skill Deck === */
.compact-skill-builder{gap:9px}
.deck-builder-head.compact{padding:11px 12px;align-items:center}
.deck-builder-title{min-width:0;flex:1}.deck-builder-title h2{font-size:16px;margin:4px 0 2px}.deck-builder-title p{font-size:9px;line-height:1.35}
.deck-progress{height:6px;margin-top:8px;border-radius:999px;background:#071723;overflow:hidden;border:1px solid #29495d}.deck-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#30c98a,#61d6ff);transition:width .18s ease}
.compact-owner-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible;gap:7px}.compact-owner-tabs .owner-select{min-width:0;width:100%;padding:7px 8px}.compact-owner-tabs .owner-select>span{display:grid;gap:2px;min-width:0}.compact-owner-tabs .owner-select b{font-size:9px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.compact-owner-tabs .owner-select small{font-size:7px;color:#8fb0c2;font-weight:700}.compact-owner-tabs .owner-select-art{width:34px;height:34px}
.compact-strategy{border:1px solid #31536a;border-radius:12px;background:#081d2a;overflow:hidden}.compact-strategy>summary{cursor:pointer;list-style:none;padding:8px 10px;font-size:9px;font-weight:900;color:#d9edf8}.compact-strategy>summary::-webkit-details-marker{display:none}.compact-strategy>summary:after{content:'＋';float:right;color:#79cdec}.compact-strategy[open]>summary:after{content:'−'}.compact-strategy .strategy-grid{padding:0 8px 8px;margin:0;grid-template-columns:repeat(3,1fr)}.compact-strategy .strategy-card{min-height:58px;padding:8px}.compact-strategy .strategy-card b{font-size:8px}.compact-strategy .combo-chips span{font-size:7px;padding:3px 5px}
.deck-card-editor-grid.compact-cards{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.compact-cards .deck-edit-card{min-height:142px;padding:8px;border-radius:12px}.compact-cards .deck-edit-top{font-size:7px}.compact-cards .deck-edit-card h4{margin:5px 0 4px;font-size:10px;line-height:1.2;min-height:24px}.compact-cards .deck-edit-card p{font-size:7.5px;line-height:1.32;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;min-height:30px}.compact-cards .deck-copy-row{margin-top:6px;padding-top:6px}.compact-cards .deck-copy-row>span{font-size:7px}.compact-cards .deck-copy-row button{width:25px;height:25px;font-size:14px;border-radius:7px}.skill-chip-row{display:flex;align-items:center;gap:3px;flex-wrap:wrap;margin-top:4px}.skill-type-chip,.signature-chip,.chosen-chip{font-size:6px;font-weight:1000;letter-spacing:.05em;padding:3px 4px;border-radius:999px;border:1px solid #345e75;background:#092131;color:#a9d6e9}.signature-chip{border-color:#8c7731;color:#ffe890;background:#312b12}.chosen-chip{margin-left:auto;border-color:#2f8d6b;color:#9dffd6;background:#0d3429}.compact-cards .deck-edit-card.selected{background:linear-gradient(180deg,#12354a,#092331)}.compact-cards .deck-edit-card.selected:before{content:'✓';position:absolute;top:7px;right:34px;width:16px;height:16px;display:grid;place-items:center;border-radius:50%;background:#38d98e;color:#052016;font-size:9px;font-weight:1000}
@media(max-width:1100px){.deck-card-editor-grid.compact-cards{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:820px){.deck-card-editor-grid.compact-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.compact-strategy .strategy-grid{grid-template-columns:1fr 1fr}.compact-strategy .strategy-card.combo{grid-column:1/-1}}
@media(max-width:620px){.deck-builder-head.compact{align-items:stretch}.compact-owner-tabs{grid-template-columns:1fr}.deck-card-editor-grid.compact-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.compact-cards .deck-edit-card{min-height:136px}.compact-cards .deck-edit-card h4{font-size:9px}.compact-cards .deck-edit-card p{font-size:7px}.compact-strategy .strategy-grid{grid-template-columns:1fr}.compact-strategy .strategy-card.combo{grid-column:auto}}


/* === V33 compact deck skill grid + modal detail === */
.deck-skill-thumb-grid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:6px}
.deck-skill-thumb{position:relative;min-height:94px;padding:7px;border-radius:12px;border:1px solid #315167;background:linear-gradient(180deg,#0d293b,#081b28);color:#fff;text-align:left;display:grid;grid-template-rows:auto auto 1fr auto;gap:4px;cursor:pointer;overflow:hidden}
.deck-skill-thumb-top{display:flex;justify-content:space-between;gap:6px}
.deck-skill-thumb.slot-0{border-color:#50c4ff;background:linear-gradient(180deg,rgba(33,92,132,.95),#0b2231)}
.deck-skill-thumb.slot-1{border-color:#dfc54f;background:linear-gradient(180deg,rgba(118,102,23,.95),#241f0b)}
.deck-skill-thumb.slot-2{border-color:#40d3c9;background:linear-gradient(180deg,rgba(22,109,104,.95),#0b2426)}
.deck-skill-thumb.signature{box-shadow:inset 0 0 0 1px rgba(223,185,84,.25)}
.deck-skill-thumb .num,.deck-skill-thumb .cost{font-size:10px;font-weight:900;color:#dcf1ff}
.deck-skill-thumb .tag{font-size:8px;font-weight:1000;letter-spacing:.03em;padding:2px 5px;border-radius:999px;background:rgba(6,18,28,.38);border:1px solid rgba(255,255,255,.16);width:max-content;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.deck-skill-thumb .name{font-size:10px;line-height:1.18;font-weight:900;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:24px}
.deck-skill-thumb .mini-meta{font-size:8px;color:#cae4f2}
.deck-skill-thumb.selected{box-shadow:0 0 0 2px rgba(98,225,155,.22) inset;border-color:#61e19b}
.deck-skill-thumb.selected .mini-meta{color:#90ffc1;font-weight:900}
.deck-skill-thumb:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(0,0,0,.16)}
.deck-skill-modal{width:min(760px,100%);padding:16px}
.deck-skill-modal-head{display:grid;grid-template-columns:44px 1fr 44px;gap:10px;align-items:center;margin-bottom:10px}
.deck-skill-nav{width:44px;height:44px;border-radius:12px;border:1px solid #3b647e;background:#113149;color:#fff;font-size:26px;font-weight:1000;cursor:pointer}
.deck-skill-modal-title h2{margin:3px 0 4px;font-size:22px;line-height:1.2}.deck-skill-modal-title p{margin:0;color:#b7cada;font-size:12px}
.deck-skill-modal-card{border:1px solid #315167;border-radius:18px;padding:14px;background:linear-gradient(180deg,#0d293b,#081b28)}
.deck-skill-modal-card.slot-0{border-color:#50c4ff;background:linear-gradient(180deg,rgba(33,92,132,.95),#0b2231)}
.deck-skill-modal-card.slot-1{border-color:#dfc54f;background:linear-gradient(180deg,rgba(118,102,23,.95),#241f0b)}
.deck-skill-modal-card.slot-2{border-color:#40d3c9;background:linear-gradient(180deg,rgba(22,109,104,.95),#0b2426)}
.deck-skill-modal-card.signature{box-shadow:inset 0 0 0 1px rgba(223,185,84,.25)}
.deck-skill-modal-kicker{display:flex;justify-content:space-between;gap:6px;flex-wrap:wrap;font-size:11px;font-weight:900;color:#dff2ff}
.deck-skill-modal-owner{display:grid;grid-template-columns:42px 1fr;gap:10px;align-items:center;margin:12px 0 10px}.deck-skill-modal-owner .owner-select-art{width:42px;height:42px}.deck-skill-modal-owner b{display:block;font-size:14px}.deck-skill-modal-owner small{display:block;color:#c8dbe7;font-size:11px}
.deck-skill-modal-text{padding:14px;border-radius:14px;background:rgba(4,15,24,.3);border:1px solid rgba(255,255,255,.08);font-size:15px;line-height:1.55;color:#fff}
.deck-skill-modal-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.deck-skill-modal-meta span{font-size:11px;padding:6px 9px;border-radius:999px;background:#0a1d2a;border:1px solid #2d4b60;color:#c5d9e6}
.deck-skill-modal-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:14px}.deck-skill-modal-hint{margin-top:10px;text-align:center;color:#9fb6c5;font-size:11px}
@media(max-width:1400px){.deck-skill-thumb-grid{grid-template-columns:repeat(8,minmax(0,1fr))}}
@media(max-width:1100px){.deck-skill-thumb-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:820px){.deck-skill-thumb-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.deck-skill-modal{width:min(680px,100%)}.deck-skill-modal-title h2{font-size:19px}.deck-skill-modal-text{font-size:14px}}
@media(max-width:620px){.deck-skill-thumb-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.deck-skill-thumb{min-height:86px}.deck-skill-thumb .name{font-size:11px}.deck-skill-modal-head{grid-template-columns:38px 1fr 38px}.deck-skill-nav{width:38px;height:38px;font-size:22px}.deck-skill-modal{padding:14px}.deck-skill-modal-actions{justify-content:stretch}.deck-skill-modal-actions button{flex:1 1 30%}}

/* === V34 Toko Una compact grid + popup === */
.una-compact-grid{display:grid;gap:6px}
.una-compact-grid.skill-grid{grid-template-columns:repeat(10,minmax(0,1fr))}
.una-compact-grid.option-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
.una-compact-card{position:relative;min-height:112px;padding:7px;border-radius:12px;border:1px solid #36556b;background:linear-gradient(180deg,#0d293b,#081b28);color:#fff;text-align:left;display:grid;grid-template-rows:auto auto 1fr auto auto;gap:4px;cursor:pointer;overflow:hidden}
.una-compact-card.skill{border-color:#4e829f}
.una-compact-card.option{border-color:#d96ba4;background:linear-gradient(180deg,#4d2340,#251423)}
.una-compact-card.signature{border-color:#d5b84d;box-shadow:inset 0 0 0 1px rgba(213,184,77,.2)}
.una-compact-card.owned-extra{box-shadow:inset 0 0 0 2px rgba(73,222,151,.25)}
.una-compact-card.locked{filter:grayscale(.9);opacity:.46}
.una-compact-card .num,.una-compact-card .cost{font-size:9px;font-weight:900;color:#dff2ff}
.una-compact-card .cost{position:absolute;top:7px;right:7px}
.una-mini-tag{font-size:7px;font-weight:1000;letter-spacing:.04em;padding:2px 5px;border-radius:999px;background:rgba(5,18,27,.45);border:1px solid rgba(255,255,255,.15);width:max-content;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.una-compact-card b{font-size:10px;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.una-compact-card small{font-size:8px;color:#b9d0dc}
.una-compact-card em{font-size:8px;font-style:normal;font-weight:900;color:#ffe38a}
.una-compact-card .support-card-icon{width:42px;height:42px;font-size:24px;margin:0 auto}
.una-compact-card:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(0,0,0,.16)}
.shop-card-modal{width:min(760px,100%);padding:16px}
.shop-modal-head{display:grid;grid-template-columns:44px 1fr 44px;gap:10px;align-items:center;margin-bottom:10px}
.shop-modal-head h2{margin:4px 0 3px;font-size:22px}.shop-modal-head p{margin:0;color:#b7cada;font-size:12px}
.shop-detail-card{border-radius:18px;padding:15px;border:1px solid #36566d;background:linear-gradient(180deg,#0d293b,#081b28)}
.shop-detail-card.slot-0{border-color:#50c4ff;background:linear-gradient(180deg,rgba(33,92,132,.95),#0b2231)}
.shop-detail-card.slot-1{border-color:#dfc54f;background:linear-gradient(180deg,rgba(118,102,23,.95),#241f0b)}
.shop-detail-card.slot-2{border-color:#40d3c9;background:linear-gradient(180deg,rgba(22,109,104,.95),#0b2426)}
.shop-detail-option{border-color:#e176b0;background:linear-gradient(180deg,#562744,#241320)}
.shop-detail-top{display:flex;justify-content:space-between;gap:8px;font-size:11px;font-weight:900}
.shop-detail-owner{display:grid;grid-template-columns:44px 1fr;gap:10px;align-items:center;margin:12px 0}.shop-detail-owner .owner-select-art{width:44px;height:44px}.shop-detail-owner b{display:block;font-size:14px}.shop-detail-owner small{display:block;color:#c4d7e2;font-size:11px}
.shop-detail-option-icon{display:grid;place-items:center;margin:8px auto 12px;width:88px;height:88px;border-radius:18px;background:rgba(5,18,27,.3)}
.shop-detail-option-icon .support-card-icon{width:70px;height:70px;font-size:38px}
.shop-detail-text{padding:14px;border-radius:14px;background:rgba(4,15,24,.28);border:1px solid rgba(255,255,255,.08);font-size:15px;line-height:1.55;color:#fff}
.shop-detail-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.shop-detail-meta span{font-size:11px;padding:6px 9px;border-radius:999px;background:#0a1d2a;border:1px solid #2d4b60;color:#c5d9e6}.shop-detail-meta b{color:#ffe38a}
.shop-detail-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:14px}
@media(max-width:1400px){.una-compact-grid.skill-grid{grid-template-columns:repeat(8,minmax(0,1fr))}.una-compact-grid.option-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:1100px){.una-compact-grid.skill-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.una-compact-grid.option-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:820px){.una-compact-grid.skill-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.una-compact-grid.option-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.shop-modal-head h2{font-size:19px}.shop-detail-text{font-size:14px}}
@media(max-width:620px){.una-compact-grid.skill-grid,.una-compact-grid.option-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.shop-modal-head{grid-template-columns:38px 1fr 38px}.shop-detail-actions{justify-content:stretch}.shop-detail-actions button{flex:1 1 30%}}


/* === V35 skill icon label unclipped fix === */
.action-card[data-skill-card="1"] .a-icon{height:66px!important;min-height:66px!important;padding:2px 34px 2px 2px!important;display:grid!important;place-items:center!important;overflow:visible!important}
.action-card[data-skill-card="1"] .skill-badge{width:76px!important;height:58px!important;min-width:76px!important;min-height:58px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;overflow:visible!important;transform:none!important;border-radius:14px!important}
.action-card[data-skill-card="1"] .skill-glyph-main{display:block!important;position:static!important;margin:0!important;padding:0!important;font-size:24px!important;line-height:22px!important;flex:0 0 22px!important;color:#fff!important;text-shadow:0 2px 4px rgba(0,0,0,.55)!important}
.action-card[data-skill-card="1"] .skill-kind-label{display:flex!important;align-items:center!important;justify-content:center!important;position:static!important;margin:0!important;padding:2px 6px!important;max-width:64px!important;min-width:42px!important;min-height:15px!important;border-radius:999px!important;background:rgba(0,0,0,.34)!important;color:#fff!important;font-size:7px!important;line-height:1!important;font-weight:1000!important;letter-spacing:.03em!important;text-align:center!important;white-space:nowrap!important;overflow:visible!important;text-overflow:clip!important}
.action-card[data-skill-card="1"] .owner-thumb{top:28px!important;right:3px!important;width:19px!important;height:19px!important;border-radius:6px!important}
@media(max-width:720px){.hand-grid-2x2 .action-card[data-skill-card="1"] .a-icon{height:60px!important;min-height:60px!important}.hand-grid-2x2 .action-card[data-skill-card="1"] .skill-badge{width:70px!important;height:52px!important;min-width:70px!important;min-height:52px!important}.hand-grid-2x2 .action-card[data-skill-card="1"] .skill-glyph-main{font-size:22px!important;line-height:20px!important;flex-basis:20px!important}.hand-grid-2x2 .action-card[data-skill-card="1"] .skill-kind-label{font-size:6.5px!important;max-width:58px!important;min-width:38px!important;padding:2px 5px!important}.hand-grid-2x2 .action-card[data-skill-card="1"] .owner-thumb{top:24px!important;width:17px!important;height:17px!important}}

/* === V36 deck modal controls fix === */
.deck-skill-modal-actions button:disabled{opacity:.42;filter:grayscale(.55);cursor:not-allowed}
.deck-skill-modal-meta span:last-child{font-weight:900}

/* === V37 avatar roster / starter path / rival classes === */
.setup-card-wide{width:min(1180px,96vw)!important;max-width:1180px!important}
.starter-preset-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:9px}
.starter-preset{position:relative;display:grid;grid-template-rows:128px auto auto auto;gap:6px;padding:9px;border-radius:16px;border:1px solid #31546b;background:linear-gradient(180deg,#0d2a3d,#071a27);color:#fff;text-align:left;cursor:pointer;overflow:hidden;transition:.16s ease}
.starter-preset:hover{transform:translateY(-2px);border-color:#68c7f3}.starter-preset.selected{border-color:#64e0a5;box-shadow:0 0 0 3px rgba(100,224,165,.14),0 12px 30px rgba(0,0,0,.2)}
.starter-avatar{width:100%;height:128px;border-radius:12px;background:radial-gradient(circle at 50% 30%,rgba(255,255,255,.09),rgba(0,0,0,.12));overflow:hidden;display:grid;place-items:center}
.starter-avatar img{width:100%;height:100%;object-fit:contain;object-position:center bottom}
.starter-sex{position:absolute;top:15px;left:15px;font-size:7px;font-weight:1000;letter-spacing:.09em;padding:4px 6px;border-radius:999px;background:rgba(5,18,27,.86);border:1px solid rgba(255,255,255,.2)}
.starter-preset>b{font-size:12px;line-height:1.2}.starter-preset>small{font-size:8px;line-height:1.35;color:#a9c0ce;min-height:22px}
.starter-deck-mini{display:grid;gap:3px;margin-top:2px}.starter-deck-mini>span{display:grid;grid-template-columns:22px 1fr;gap:5px;align-items:center;font-size:7px;padding:3px 5px;border-radius:8px;background:#071823;border:1px solid #223e51;min-width:0}.starter-mini-art{width:22px;height:22px;display:grid;place-items:center;overflow:hidden}.starter-mini-art img{width:100%;height:100%;object-fit:contain}.starter-deck-mini>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.starter-choice-summary{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:10px;padding:10px 12px;border-radius:13px;border:1px solid #356378;background:#0a2231}.starter-choice-summary>b{font-size:13px}.starter-choice-summary>span{font-size:10px;color:#85e6bd}.starter-choice-summary>small{font-size:9px;color:#a9c2d1}
.home-player-line{display:flex;align-items:center;gap:10px;margin-bottom:8px}.home-player-line>div{display:grid;gap:3px}.home-player-line small{font-size:9px;color:#92b2c4;font-weight:800}.home-player-avatar{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;overflow:hidden;background:#071a27;border:1px solid #3a6077}.home-player-avatar img{width:100%;height:100%;object-fit:contain;object-position:center bottom}
.avatar-icon-art.card-art-image img,.stage-boss-icon.card-art-image img,.tournament-icon.card-art-image img,.duelist-avatar-icon.card-art-image img,.modal-boss-icon.card-art-image img{object-fit:contain!important;object-position:center bottom!important;padding:0!important;transform:none!important}
.duelist-avatar{overflow:hidden}.duelist-avatar .duelist-avatar-icon{width:100%;height:100%}.duelist-card.group-matabelo{border-color:#7f63aa;background:linear-gradient(160deg,#22172e,#0b2130)}.duelist-card.group-country{border-color:#d5b44d;background:linear-gradient(160deg,#2a2815,#0b2130)}.duelist-card.group-anomali{border-color:#d84c57;background:linear-gradient(160deg,#35161b,#0b1724)}
.tournament-card.group-matabelo{border-color:#805aa9}.tournament-card.group-country{border-color:#aa974a}
.unit-card.elite-threat{border-color:#d49bff!important;background:linear-gradient(180deg,#50255f,#211526)!important;box-shadow:inset 0 0 0 1px rgba(255,220,255,.13),0 0 18px rgba(176,92,230,.18)}
.unit-card.elite-threat .type{color:#f3c7ff!important;font-weight:1000}.unit-card.elite-threat .hpbar i{background:linear-gradient(90deg,#c76fff,#ff9bc8)!important}
.anomali-note{padding:8px 10px;border-radius:10px;background:#251421;border:1px solid #754052;color:#f2cfd8!important}
@media(max-width:980px){.starter-preset-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){.setup-card-wide{width:100%!important}.starter-preset-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.starter-preset{grid-template-rows:112px auto auto auto;padding:7px}.starter-avatar{height:112px}.starter-preset>b{font-size:11px}.starter-deck-mini>span{font-size:6.5px}.home-player-avatar{width:44px;height:44px}}

/* === V38 responsive rival art + locked Duelist + 4-column Expedition === */
.paged-stage-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px}
.paged-stage-grid .stage-card{min-height:205px}
.duelist-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px}
.duelist-card{grid-template-rows:180px auto auto!important;min-height:330px!important;padding:12px!important}
.duelist-avatar{height:180px!important;display:grid!important;place-items:center!important;background:radial-gradient(circle at 50% 35%,rgba(255,255,255,.06),rgba(0,0,0,.08))!important;overflow:hidden!important}
.duelist-avatar .duelist-avatar-icon,.duelist-avatar .card-art-image{width:100%!important;height:100%!important;display:grid!important;place-items:center!important;overflow:visible!important}
.duelist-avatar img,.duelist-avatar .duelist-avatar-icon img,.duelist-avatar .card-art-image img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center bottom!important;transform:none!important;padding:0!important}
.duelist-card.locked-rival{filter:saturate(.35);opacity:.72;border-style:dashed}
.duelist-card.locked-rival .duelist-avatar{filter:grayscale(.9) brightness(.65)}
.duelist-card.locked-rival .primary-btn:disabled{opacity:.6;background:#293847;border-color:#495b69;color:#b8c4cd;cursor:not-allowed}

/* Never crop character portraits anywhere in the interface. */
.home-player-avatar,.starter-avatar,.avatar-circle,.tournament-avatar,.stage-boss-icon,.modal-boss-icon,.duelist-avatar{overflow:hidden!important}
.home-player-avatar img,.starter-avatar img,.avatar-circle img,.tournament-avatar img,.stage-boss-icon img,.modal-boss-icon img,.duelist-avatar img,
.home-player-avatar .card-art-image img,.starter-avatar .card-art-image img,.avatar-circle .card-art-image img,.tournament-avatar .card-art-image img,.stage-boss-icon .card-art-image img,.modal-boss-icon .card-art-image img,.duelist-avatar .card-art-image img{
  width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center bottom!important;transform:none!important;padding:0!important
}
.home-player-avatar{width:68px!important;height:68px!important;border-radius:17px!important;background:radial-gradient(circle at 50% 30%,rgba(255,255,255,.08),rgba(0,0,0,.08))!important}
.home-player-line{align-items:center!important}

@media(max-width:1100px){
  .paged-stage-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .duelist-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .duelist-card{grid-template-rows:155px auto auto!important;min-height:300px!important}
  .duelist-avatar{height:155px!important}
}
@media(max-width:820px){
  .paged-stage-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .duelist-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .duelist-card{grid-template-rows:140px auto auto!important;min-height:275px!important}
  .duelist-avatar{height:140px!important}
  .home-player-avatar{width:58px!important;height:58px!important}
}
@media(max-width:520px){
  .paged-stage-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px}
  .duelist-grid{grid-template-columns:1fr!important}
  .duelist-card{grid-template-rows:210px auto auto!important;min-height:360px!important}
  .duelist-avatar{height:210px!important}
}


/* === V39 direct portrait renderer: never crop rival/player art === */
.duelist-avatar,.tournament-avatar,.home-player-avatar,.starter-avatar,.stage-boss-icon,.modal-boss-icon,.avatar-circle{overflow:hidden!important}
.duelist-avatar>img.duelist-avatar-icon,
.tournament-avatar>img.tournament-icon,
.home-player-avatar>img.home-player-avatar,
.starter-avatar,
.stage-boss-icon,
.modal-boss-icon,
.avatar-circle>img.avatar-icon-art{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  transform:none!important;
  padding:0!important;
  margin:0 auto!important;
}
.duelist-avatar{height:240px!important;padding:8px!important;background:radial-gradient(circle at 50% 40%,rgba(255,255,255,.06),rgba(0,0,0,.10))!important}
.duelist-card{grid-template-rows:240px auto auto!important;min-height:390px!important}
.duelist-avatar>img.duelist-avatar-icon{width:auto!important;height:100%!important;max-width:100%!important;object-fit:contain!important}
.home-player-avatar{width:84px!important;height:84px!important;padding:4px!important}
.home-player-avatar>img{width:100%!important;height:100%!important;object-fit:contain!important}
.tournament-avatar{min-height:110px!important;display:grid!important;place-items:center!important;padding:6px!important}
.tournament-avatar>img{width:auto!important;height:100%!important;max-width:100%!important;object-fit:contain!important}
.stage-boss-icon{width:48px!important;height:48px!important;padding:2px!important}
.stage-boss-icon{object-fit:contain!important;object-position:center!important}
.modal-boss-icon{width:58px!important;height:58px!important;object-fit:contain!important;object-position:center!important}
.avatar-circle>img.avatar-icon-art{object-fit:contain!important;object-position:center bottom!important}
.paged-stage-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
@media(max-width:1100px){.duelist-avatar{height:220px!important}.duelist-card{grid-template-rows:220px auto auto!important;min-height:365px!important}.paged-stage-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:820px){.duelist-avatar{height:190px!important}.duelist-card{grid-template-rows:190px auto auto!important;min-height:330px!important}.paged-stage-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:520px){.duelist-grid{grid-template-columns:1fr!important}.duelist-avatar{height:260px!important}.duelist-card{grid-template-rows:260px auto auto!important;min-height:410px!important}.paged-stage-grid{grid-template-columns:1fr 1fr!important}}


/* === V40 account switcher + smaller full Duelist portraits === */
.duelist-avatar{padding:14px!important;overflow:hidden!important}
.duelist-avatar>img.duelist-avatar-icon{width:78%!important;height:78%!important;max-width:78%!important;max-height:78%!important;object-fit:contain!important;object-position:center bottom!important;margin:auto!important;display:block!important}
.duelist-card.locked-rival .duelist-avatar>img.duelist-avatar-icon{width:76%!important;height:76%!important;max-width:76%!important;max-height:76%!important}
.account-top-btn{border-color:#4e6f86;background:linear-gradient(135deg,#102b3d,#173a50)}
.account-modal{width:min(620px,100%)}
.account-local,.account-status{padding:13px;border-radius:14px;background:#0a2130;border:1px solid #2c4d63;margin-bottom:10px}
.account-status.online{border-color:#2f8b67;background:linear-gradient(180deg,#0d3328,#0a2130)}
.account-local h2,.account-status h3{margin:6px 0 3px}.account-local p,.account-status p{margin:0;color:#abc2d0;font-size:11px;line-height:1.45}
.account-auth-grid{margin:10px 0}.account-actions{display:flex;gap:8px;flex-wrap:wrap}.account-actions button{flex:1 1 150px}
@media(max-width:820px){.duelist-avatar>img.duelist-avatar-icon{width:74%!important;height:74%!important;max-width:74%!important;max-height:74%!important}}
@media(max-width:520px){.duelist-avatar>img.duelist-avatar-icon{width:70%!important;height:70%!important;max-width:70%!important;max-height:70%!important}.account-actions{display:grid;grid-template-columns:1fr}}

/* === V41 explicit logout + Matabelo threat emphasis === */
.logout-top-btn{border-color:#8a4950!important;background:linear-gradient(180deg,#402229,#28151a)!important;color:#ffd8dc!important}
.unit-card.enemy-unit:has(.mini-status.matabelo){border-color:#b76cff!important;box-shadow:inset 0 0 0 1px rgba(183,108,255,.16)}


/* === V42 Expedition story, locks, 4-card pagination === */
.paged-stage-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important}
.matabelo-lock-chip{position:absolute;left:8px;bottom:8px;z-index:5;padding:5px 7px;border-radius:8px;background:#4b173c;border:1px solid #d965bb;color:#ffd8f5;font-size:8px;font-weight:1000;letter-spacing:.05em}
.guardian-card.matabelo-locked{filter:grayscale(.86) brightness(.62);border-color:#9e4e88!important;box-shadow:inset 0 0 0 2px rgba(191,76,150,.14)}
.rpg-dialog{display:grid;grid-template-columns:190px 1fr;gap:18px;align-items:end;min-height:300px}
.rpg-dialog-face{height:280px;display:grid;place-items:end center;overflow:hidden;border-radius:18px;background:radial-gradient(circle at 50% 35%,rgba(85,169,217,.2),rgba(5,18,28,.15) 70%)}
.rpg-dialog-avatar{width:100%;height:100%;object-fit:contain!important;object-position:center bottom!important;transform:scale(.88);transform-origin:center bottom}
.rpg-dialog-narrator{font-size:90px;align-self:center;justify-self:center;filter:drop-shadow(0 10px 20px rgba(0,0,0,.4))}
.rpg-dialog-copy{padding:18px 18px 12px;border-radius:18px;background:linear-gradient(180deg,#102f43,#091e2d);border:1px solid #3b637d;box-shadow:0 16px 36px rgba(0,0,0,.25)}
.rpg-dialog-copy small{font-size:9px;letter-spacing:.13em;color:#7bcff3;font-weight:1000}.rpg-dialog-copy h2{font-size:24px;margin:5px 0 8px}.rpg-dialog-copy p{font-size:15px!important;line-height:1.65!important;color:#edf7fb!important;margin:0}.rpg-dialog-progress{text-align:right;margin-top:12px;color:#7f9eb0;font-size:10px}
.help-hero{padding:18px;margin-bottom:12px}.help-hero h1{margin:8px 0 7px}.help-hero p{line-height:1.65;color:#c5d9e5}.god-status{margin-top:12px;padding:10px 12px;border-radius:12px;background:#201b36;border:1px solid #63548e;color:#d9ccff;font-weight:900}.god-status.ready{background:#123b2c;border-color:#3e9d73;color:#aaffcf}
.help-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:12px}.help-card{padding:13px;border-radius:15px;background:#0b2435;border:1px solid #31536a}.help-card b{font-size:13px}.help-card p{font-size:10px;line-height:1.5;color:#b9cfdb}.help-card.danger{border-color:#93466f;background:#32152a}.help-card.country{border-color:#9b842e;background:#2e2913}
.help-battle-demo,.help-lore{padding:16px;margin-bottom:12px}.help-battle-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.help-battle-steps>div{padding:10px;border-radius:12px;background:#081d2a;border:1px solid #28495e}.help-battle-steps span{width:24px;height:24px;display:grid;place-items:center;border-radius:50%;background:#1a688e;color:#fff;font-weight:1000;margin-bottom:6px}.help-battle-steps b{display:block;font-size:11px}.help-battle-steps small{display:block;margin-top:4px;color:#9eb9c8;font-size:9px;line-height:1.4}.help-lore p{line-height:1.65;color:#c5d9e5}
@media(max-width:980px){.paged-stage-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.help-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rpg-dialog{grid-template-columns:150px 1fr}.rpg-dialog-face{height:230px}}
@media(max-width:620px){.paged-stage-grid{grid-template-columns:1fr!important}.rpg-dialog{grid-template-columns:1fr;gap:8px}.rpg-dialog-face{height:190px}.rpg-dialog-avatar{transform:scale(.8)}.rpg-dialog-copy h2{font-size:19px}.rpg-dialog-copy p{font-size:13px!important}.help-grid,.help-battle-steps{grid-template-columns:1fr}}


/* === V43 duelist portrait top alignment + head above image === */
.duelist-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
.duelist-card{display:grid!important;grid-template-rows:auto 210px auto auto!important;gap:10px!important;min-height:390px!important;padding:14px!important}
.duelist-head small{display:block;color:#8fb4c9;font-size:10px;line-height:1.25;margin-bottom:4px;text-transform:uppercase;letter-spacing:.02em}
.duelist-head h3{margin:0;font-size:17px;line-height:1.15}
.duelist-avatar{height:210px!important;padding:8px 8px 0 8px!important;display:grid!important;place-items:start center!important;overflow:hidden!important;background:radial-gradient(circle at 50% 22%,rgba(255,255,255,.06),rgba(0,0,0,.10))!important}
.duelist-avatar>img.duelist-avatar-icon,.duelist-avatar .card-art-image img,.duelist-avatar .duelist-avatar-icon img{width:72%!important;height:72%!important;max-width:72%!important;max-height:72%!important;object-fit:contain!important;object-position:center top!important;align-self:start!important;justify-self:center!important;margin-top:2px!important;display:block!important}
.duelist-card.locked-rival .duelist-avatar>img.duelist-avatar-icon,.duelist-card.locked-rival .card-art-image img,.duelist-card.locked-rival .duelist-avatar .duelist-avatar-icon img{width:70%!important;height:70%!important;max-width:70%!important;max-height:70%!important;object-position:center top!important}
.duelist-copy small{display:none!important}
.duelist-copy h3{display:none!important}
.duelist-copy p{margin:0;color:var(--muted);font-size:11px;line-height:1.4}
@media(max-width:1100px){.duelist-card{grid-template-rows:auto 190px auto auto!important;min-height:360px!important}.duelist-avatar{height:190px!important}.duelist-avatar>img.duelist-avatar-icon,.duelist-avatar .card-art-image img,.duelist-avatar .duelist-avatar-icon img{width:74%!important;height:74%!important;max-width:74%!important;max-height:74%!important}}
@media(max-width:820px){.duelist-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.duelist-card{grid-template-rows:auto 170px auto auto!important;min-height:330px!important;padding:12px!important}.duelist-avatar{height:170px!important}.duelist-avatar>img.duelist-avatar-icon,.duelist-avatar .card-art-image img,.duelist-avatar .duelist-avatar-icon img{width:76%!important;height:76%!important;max-width:76%!important;max-height:76%!important}.duelist-head h3{font-size:16px}}
@media(max-width:520px){.duelist-grid{grid-template-columns:1fr!important}.duelist-card{grid-template-rows:auto 200px auto auto!important;min-height:350px!important}.duelist-avatar{height:200px!important}.duelist-avatar>img.duelist-avatar-icon,.duelist-avatar .card-art-image img,.duelist-avatar .duelist-avatar-icon img{width:78%!important;height:78%!important;max-width:78%!important;max-height:78%!important}}


/* === V47 account gate === */
.auth-gate{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 50% 12%,#12354c 0,#071723 48%,#041019 100%)}
.auth-gate-card{width:min(520px,100%);padding:26px;border-radius:24px;border:1px solid #31566e;background:rgba(8,29,43,.96);box-shadow:0 28px 80px rgba(0,0,0,.45)}
.auth-gate-brand{display:flex;align-items:center;gap:12px;margin-bottom:18px}.auth-gate-brand img{width:56px;height:56px;object-fit:contain;border-radius:15px;background:#fff;padding:5px}.auth-gate-brand div{display:grid}.auth-gate-brand b{font-size:18px;letter-spacing:.12em;color:#ff9b44}.auth-gate-brand span{font-size:12px;letter-spacing:.16em;color:#bfe7ff}
.auth-gate-card h1{font-size:28px;margin:10px 0 8px}.auth-gate-card>p{color:#bcd1dd;line-height:1.55;margin:0 0 18px}.auth-gate-card>small{display:block;color:#819dab;line-height:1.45;margin-top:14px}.auth-gate-fields{grid-template-columns:1fr!important}.auth-gate-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.auth-gate-loading{padding:18px;border:1px solid #2d536b;background:#081c2a;border-radius:14px;text-align:center;color:#bfe7ff;font-weight:900}
@media(max-width:520px){.auth-gate{padding:14px}.auth-gate-card{padding:20px}.auth-gate-actions{grid-template-columns:1fr}.auth-gate-card h1{font-size:23px}}


/* === V48 Living World Simulation + Postgame Civilization === */
.sim-life-hero{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:20px;margin-bottom:12px}.sim-life-hero h1{margin:6px 0}.sim-life-hero p{max-width:760px;color:#9db7c5;line-height:1.55}.sim-world-score{min-width:180px;text-align:right}.sim-world-score>b{font-size:34px}.sim-world-score small{display:block;color:#8fb0c1;margin:3px 0 8px}.sim-status-strip{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:12px;margin-bottom:12px}.sim-status-strip>span{padding:8px 10px;border:1px solid #294d60;border-radius:10px;background:#081d2a;font-size:10px}.sim-status-strip button{margin-left:auto}.sim-world-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(290px,.75fr);gap:12px}.sim-world-map{padding:16px}.sim-map-header{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.sim-map-header h2{margin:6px 0}.sim-map-header p{margin:0;color:#9bb5c4}.sim-map-header>b{font-size:30px}.eco-world{height:480px;position:relative;overflow:hidden;margin-top:14px;border-radius:22px;border:1px solid #2f5d70;background:radial-gradient(circle at 50% 45%,#174e64 0,#0b3247 48%,#071c2a 100%)}.world-continent{position:absolute;background:linear-gradient(145deg,#315e45,#173c31);border:1px solid #477d5d;opacity:.82;filter:drop-shadow(0 8px 14px rgba(0,0,0,.2))}.world-continent.c1{width:42%;height:32%;left:8%;top:20%;border-radius:48% 35% 55% 30%}.world-continent.c2{width:26%;height:23%;left:42%;top:13%;border-radius:45% 55% 35% 50%;transform:rotate(8deg)}.world-continent.c3{width:39%;height:23%;left:50%;top:56%;border-radius:55% 30% 46% 38%;transform:rotate(-5deg)}.world-continent.c4{width:19%;height:25%;left:17%;top:57%;border-radius:35% 55% 44% 50%;transform:rotate(11deg)}.world-node{position:absolute;z-index:3;transform:translate(-50%,-50%);width:94px;min-height:76px;padding:7px;border:2px solid #437487;border-radius:16px;background:rgba(6,25,36,.92);color:#fff;display:grid;place-items:center;gap:2px;box-shadow:0 8px 24px rgba(0,0,0,.28)}.world-node>span{font-size:24px}.world-node>b{font-size:9px;line-height:1.1}.world-node>small{font-size:8px;color:#80cce6}.world-node.active{border-color:#ffb749;box-shadow:0 0 0 3px rgba(255,183,73,.18),0 10px 26px rgba(0,0,0,.3)}.world-node.restored{border-color:#7bd993;background:rgba(13,62,45,.94)}.sim-location-actions{display:flex;gap:8px;margin-top:12px}.sim-side-stack{display:grid;gap:12px;align-content:start}.sim-daily,.sim-log{padding:16px}.sim-daily h3{margin:8px 0}.sim-daily p,.sim-log p{color:#9db5c3;line-height:1.45}.sim-mini-shop{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:12px 0}.sim-mini-shop button{padding:10px 6px;border:1px solid #356177;border-radius:11px;background:#0b2635;color:#fff;font-weight:800;font-size:9px}.sim-mini-shop small{color:#8ec2da}.compact-life-shop{grid-template-columns:1fr 1fr}.compact-life-shop .shop-item{min-height:84px}.sim-log p{padding:8px 0;margin:0;border-bottom:1px dashed #244657;font-size:9px}.sim-bottom-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:12px}.sim-bottom-grid>.card-panel{padding:16px}.ascend-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
@media(max-width:900px){.sim-world-layout{grid-template-columns:1fr}.eco-world{height:430px}.sim-bottom-grid{grid-template-columns:1fr 1fr}.sim-life-hero{align-items:flex-start}.sim-world-score{min-width:120px}}
@media(max-width:620px){.sim-life-hero{display:grid}.sim-world-score{text-align:left;width:100%}.sim-status-strip>span{flex:1 1 42%}.sim-status-strip button{width:100%;margin-left:0}.eco-world{height:500px}.world-node{width:76px;min-height:68px;padding:5px}.world-node>span{font-size:20px}.world-node>b{font-size:8px}.sim-location-actions{display:grid}.sim-bottom-grid{grid-template-columns:1fr}.compact-life-shop{grid-template-columns:1fr}.sim-mini-shop{grid-template-columns:1fr 1fr 1fr}}

/* === V50 Civilization battles + evolution card variants === */
.guardian-evolution-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:12px}
.guardian-evolution-card{display:grid;grid-template-columns:118px minmax(0,1fr);gap:12px;align-items:center;padding:12px;border:1px solid #34566b;border-radius:16px;background:#081d2a}
.guardian-evolution-card>div:last-child{display:grid;gap:7px}.guardian-evolution-card b{font-size:14px}.guardian-evolution-card small{color:#9db8c7;font-size:9px;line-height:1.4}
.evo-art{position:relative;height:142px;border-radius:15px;display:grid;place-items:center;overflow:hidden;border:2px solid #456577;background:radial-gradient(circle at 50% 30%,rgba(255,255,255,.08),rgba(5,20,30,.94))}
.evo-art .evolution-guardian-art,.evo-art>img.evolution-guardian-art{width:92%;height:92%;object-fit:contain;object-position:center}
.evo-art .evolution-guardian-art img{width:100%;height:100%;object-fit:contain;object-position:center}
.evo-art.white{border-color:#e8f2f8;box-shadow:inset 0 0 30px rgba(226,244,255,.16),0 0 18px rgba(205,238,255,.16);background:radial-gradient(circle at 50% 25%,rgba(234,249,255,.24),rgba(12,34,46,.94))}
.evo-art.purple{border-color:#b86df1;box-shadow:inset 0 0 32px rgba(174,85,239,.22),0 0 20px rgba(156,71,222,.18);background:radial-gradient(circle at 50% 25%,rgba(159,77,221,.25),rgba(28,20,48,.95))}
.evo-path-mark{position:absolute;right:8px;top:7px;width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:rgba(3,14,22,.86);border:1px solid rgba(255,255,255,.28);font-size:15px}
.evo-choice-buttons{display:grid;grid-template-columns:1fr 1fr;gap:6px}.evo-choice-buttons button{padding:8px;border-radius:9px;border:1px solid #385c70;background:#0b2737;color:#fff;font-size:9px;font-weight:900}.evo-choice-buttons button.active{border-color:#f1f7fb;background:#20465a;box-shadow:0 0 0 2px rgba(255,255,255,.08)}.evo-choice-buttons button[data-evo-path="purple"].active{border-color:#bd72f1;background:#41225a}
.civil-level{appearance:none;color:#fff;text-align:left;cursor:default}.civil-level.available{cursor:pointer;border-color:#4f8299;background:linear-gradient(145deg,#0d3041,#0a2231)}.civil-level.available:hover{transform:translateY(-1px);border-color:#78c9ed}.civil-level.completed{border-color:#4f9e72;background:linear-gradient(145deg,#12382d,#0b2630)}.civil-level.completed>small{color:#8ce2ad}.civil-level.locked{pointer-events:none}
@media(max-width:980px){.guardian-evolution-grid{grid-template-columns:1fr 1fr}.guardian-evolution-card{grid-template-columns:100px minmax(0,1fr)}.evo-art{height:124px}}
@media(max-width:620px){.guardian-evolution-grid{grid-template-columns:1fr}.guardian-evolution-card{grid-template-columns:92px minmax(0,1fr)}.evo-art{height:112px}}

/* === V51 Social / CAPTCHA / realtime notifications === */
.captcha-row{display:grid;grid-template-columns:minmax(130px,1fr) minmax(100px,150px) auto;gap:10px;align-items:end;margin:14px 0;padding:12px;border:1px solid rgba(255,255,255,.12);border-radius:14px;background:rgba(255,255,255,.035)}
.captcha-row>div{display:flex;flex-direction:column;gap:3px}.captcha-row small{color:var(--muted);font-size:.72rem;letter-spacing:.12em}.captcha-row b{font-size:1.1rem}.captcha-row input{min-width:0}.captcha-row.compact{margin-top:12px}
.notif-top-btn{position:relative;min-width:46px}.notif-top-btn span{font-weight:800}.notif-top-btn.has-unread{box-shadow:0 0 0 2px rgba(255,190,70,.28),0 0 24px rgba(255,190,70,.18)}
.notif-list{display:grid;gap:10px;max-height:55vh;overflow:auto;margin-top:14px}.notif-list article{display:grid;gap:5px;padding:12px;border:1px solid rgba(255,255,255,.1);border-radius:13px;background:rgba(255,255,255,.035)}.notif-list article small{color:var(--muted)}.notif-list article p{margin:0;color:var(--muted);line-height:1.45}.notif-list article button{justify-self:start}
.friends-hero{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:18px}.friends-hero h1{margin:.3rem 0}.friends-hero p{margin:0;color:var(--muted)}
.friend-search{margin-bottom:20px}.friend-search-results{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.friend-search-results button{border-radius:999px}
.friend-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.friend-card,.friend-request,.friend-offer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;border:1px solid rgba(255,255,255,.1);border-radius:15px;background:rgba(255,255,255,.035)}.friend-card>div:first-child{display:grid;grid-template-columns:auto 1fr;column-gap:8px;align-items:center}.friend-card small{grid-column:2;color:var(--muted)}.friend-avatar-dot{opacity:.9}.friend-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}.friend-actions button,.friend-request button,.friend-offer button{padding:8px 10px;font-size:.82rem}.friend-offer-list{display:grid;gap:8px}.friend-offer>div{display:flex;flex-direction:column;gap:3px}.friend-offer small{color:var(--muted)}
@media(max-width:720px){.captcha-row{grid-template-columns:1fr auto}.captcha-row>div{grid-column:1/-1}.captcha-row input{width:100%}.friends-hero{align-items:flex-start;flex-direction:column}.friend-card,.friend-request,.friend-offer{align-items:flex-start;flex-direction:column}.friend-actions{justify-content:flex-start}}

/* =========================================================
   RIMBA V53 — Mobile dialogue + clearer battle feedback
   ========================================================= */
.unit-card.fx-miss{animation:missFlash .42s ease!important}
.unit-card.fx-block{animation:blockFlash .42s ease!important}
.fx-popup.miss{color:#d9f6ff!important;border-color:#8bdcff99!important;background:rgba(7,38,55,.96)!important}
.fx-popup.block{color:#ffe38a!important;border-color:#ffd45a99!important;background:rgba(42,35,5,.96)!important}
.fx-popup.hit{font-size:14px!important;color:#ff9a9a!important;background:rgba(64,8,13,.96)!important;border-color:#ff6e7799!important}
@keyframes missFlash{0%,100%{transform:translateX(0);opacity:1}25%{transform:translateX(-7px);opacity:.72}50%{transform:translateX(7px);opacity:.55}75%{transform:translateX(-3px);opacity:.85}}
@keyframes blockFlash{0%{box-shadow:none}35%{box-shadow:0 0 0 5px rgba(255,218,91,.45),0 0 34px rgba(255,205,61,.4);transform:scale(.985)}100%{box-shadow:none;transform:none}}

.battle-impact-feedback{position:fixed;z-index:235;left:50%;top:18%;transform:translate(-50%,-12px) scale(.94);opacity:0;display:flex;align-items:center;gap:10px;min-width:min(88vw,330px);max-width:92vw;padding:10px 14px;border-radius:16px;border:2px solid #ff7777;background:rgba(38,7,12,.94);box-shadow:0 12px 40px rgba(0,0,0,.52);pointer-events:none;transition:.16s ease}
.battle-impact-feedback.show{opacity:1;transform:translate(-50%,0) scale(1)}
.battle-impact-feedback .impact-icon{font-size:27px}.battle-impact-feedback b{display:block;font-size:14px;letter-spacing:.06em}.battle-impact-feedback small{display:block;margin-top:2px;font-size:10px;color:#e8eef2}
.battle-impact-feedback.hit{border-color:#ff6868;background:rgba(54,8,13,.95)}
.battle-impact-feedback.block{border-color:#ffd65d;background:rgba(48,37,3,.96)}
.battle-impact-feedback.miss{border-color:#71d8ff;background:rgba(4,36,53,.96)}
.battle-impact-feedback.ko{border-color:#e49bff;background:rgba(37,11,48,.96)}

.enemy-defeat-scene{position:fixed;inset:0;z-index:230;display:grid;place-items:center;padding:18px;background:radial-gradient(circle at 50% 35%,rgba(93,20,28,.42),rgba(2,8,13,.9));opacity:0;transition:opacity .2s ease;pointer-events:all}
.enemy-defeat-scene.show{opacity:1}.enemy-defeat-card{width:min(440px,92vw);text-align:center;padding:18px;border-radius:24px;border:1px solid #b95765;background:linear-gradient(180deg,rgba(58,22,29,.97),rgba(8,20,30,.98));box-shadow:0 24px 80px rgba(0,0,0,.62);animation:defeatCardIn .35s ease}
.enemy-defeat-kicker{font-size:10px;letter-spacing:.2em;font-weight:1000;color:#ff9ba5}.enemy-defeat-portrait{height:210px;margin:8px auto 10px;display:grid;place-items:end center;overflow:hidden;border-radius:18px;background:radial-gradient(circle at 50% 34%,rgba(255,118,118,.2),rgba(0,0,0,.12) 68%)}
.enemy-defeat-portrait img{width:88%;height:100%;object-fit:contain!important;object-position:center bottom!important;filter:grayscale(.25) drop-shadow(0 12px 20px rgba(0,0,0,.4))}.enemy-defeat-emoji{font-size:120px;line-height:1}.enemy-defeat-card h2{margin:4px 0 8px;font-size:24px}.enemy-defeat-chat{padding:12px 14px;border-radius:14px;background:#0b2231;border:1px solid #395b71;color:#f1f7fa;font-size:14px;line-height:1.55}.enemy-defeat-card>small{display:block;margin-top:9px;color:#93adbd;font-size:9px;letter-spacing:.08em}
@keyframes defeatCardIn{from{transform:scale(.88) translateY(16px);opacity:.2}to{transform:none;opacity:1}}

@media(max-width:620px){
  .rpg-dialog{grid-template-columns:92px minmax(0,1fr)!important;gap:8px!important;align-items:center!important;min-height:0!important}
  .rpg-dialog-face{height:132px!important;align-self:center!important;border-radius:14px!important;overflow:hidden!important}
  .rpg-dialog-avatar{width:86%!important;height:94%!important;object-fit:contain!important;object-position:center bottom!important;transform:scale(.70)!important;transform-origin:center bottom!important}
  .rpg-dialog-narrator{font-size:54px!important}
  .rpg-dialog-copy{padding:11px 12px 9px!important;min-width:0!important}
  .rpg-dialog-copy small{font-size:8px!important}.rpg-dialog-copy h2{font-size:16px!important;margin:3px 0 5px!important}.rpg-dialog-copy p{font-size:12px!important;line-height:1.42!important}.rpg-dialog-progress{margin-top:7px!important;font-size:9px!important}
  .modal:has(.rpg-dialog){padding:10px!important;max-height:82vh!important}
  .modal:has(.rpg-dialog) .modal-actions{margin-top:9px!important}
  .enemy-defeat-card{padding:13px;border-radius:19px}.enemy-defeat-portrait{height:165px}.enemy-defeat-card h2{font-size:20px}.enemy-defeat-chat{font-size:12px;line-height:1.45;padding:10px 11px}
  .battle-impact-feedback{top:14%;min-width:82vw;padding:8px 11px}.battle-impact-feedback .impact-icon{font-size:23px}.battle-impact-feedback b{font-size:12px}
}

/* V54.1 — visual correction: Option stays pink; Point cards become neutral grey. */
.action-card.point,
html[data-rimba-build] .action-card.point{
  border-color:#8d99a3!important;
  background:linear-gradient(155deg,#3b4248 0%,#252b30 52%,#15191d 100%)!important;
  box-shadow:inset 0 0 0 1px rgba(220,226,231,.08)!important;
}
.action-card.point .kind,
.action-card.point .cost{
  color:#d7dde2!important;
  border-color:#9aa5ad!important;
}
.action-card.point .a-icon{
  filter:grayscale(.25);
}
.shop-acquire-note{margin-top:10px;padding:9px 10px;border-radius:10px;border:1px solid #737e86;background:rgba(225,231,235,.06);font-size:10px;line-height:1.45;color:#d6dde1}



/* RIMBA V55 — status strategy */
.mini-status{white-space:nowrap}.unit-card.targeted .mini-status{pointer-events:none}
@media(max-width:720px){.statusline{gap:3px;flex-wrap:wrap}.mini-status{font-size:10px;padding:2px 4px}}


/* V56 beginner-friendly Help */
.help-screen{max-width:1180px;margin:0 auto}.help-welcome{display:grid;grid-template-columns:78px minmax(0,1fr);gap:18px;padding:20px;margin-bottom:12px;align-items:start}.help-welcome-icon{width:72px;height:72px;border-radius:22px;display:grid;place-items:center;font-size:38px;background:linear-gradient(145deg,#173d55,#0b2332);border:1px solid #3b6680}.help-welcome h1{font-size:25px;line-height:1.25;margin:7px 0}.help-welcome p{color:#bed3de;line-height:1.6;margin:0}.help-quick-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}.help-section{padding:17px;margin-bottom:12px}.help-section.beginner{border-color:#397c5c;background:linear-gradient(145deg,#0b2b25,#0a2231)}.help-section-title{display:flex;gap:11px;align-items:center;margin-bottom:13px}.help-section-title>span{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#1a688e;color:#fff;font-weight:1000;flex:0 0 auto}.help-section-title h2{margin:0;font-size:19px}.help-section-title p{margin:2px 0 0;color:#91acbb;font-size:11px}.help-five-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.help-five-grid article,.deck-beginner-grid article{background:#081d2a;border:1px solid #29495d;border-radius:13px;padding:11px}.help-five-grid b,.deck-beginner-grid b{font-size:11px}.help-five-grid p,.deck-beginner-grid p{font-size:9px;line-height:1.48;color:#a9c1ce;margin:6px 0 0}.simple-rule{margin-top:11px;border-radius:12px;padding:10px 12px;background:#102e3f;border:1px solid #2d607a;color:#cde6f2;font-size:11px;line-height:1.5}.help-card-types{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.help-card-types article{display:flex;gap:9px;padding:11px;border-radius:14px;border:1px solid #355165;background:#0a2030}.help-card-types article>span{font-size:23px}.help-card-types b{display:block;font-size:12px}.help-card-types small{display:block;color:#8ea9b8;font-size:8px;margin:2px 0 5px}.help-card-types p{font-size:9px;color:#b3c9d4;line-height:1.45;margin:0}.help-card-types .type-option{border-color:#8d4770;background:#2b1726}.help-card-types .type-point{border-color:#68727b;background:#22282d}.help-card-types .type-guardian{border-color:#3c7b5a;background:#102b22}.help-card-types .type-enemy{border-color:#7b4751;background:#2b161d}.read-card-demo{display:grid;grid-template-columns:230px 1fr;gap:15px;align-items:center}.fake-card{min-height:150px;border-radius:17px;padding:16px;background:linear-gradient(145deg,#143a50,#0a202d);border:2px solid #4e8bab;display:flex;flex-direction:column;justify-content:center}.fake-card small{color:#8eb4c6}.fake-card h3{margin:5px 0}.fake-card strong{font-size:15px}.fake-card p{color:#c4dae5}.read-card-notes{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.read-card-notes p{margin:0;padding:10px;background:#081d2a;border-radius:11px;color:#b7cfda;font-size:10px}.status-dictionary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.status-dictionary details,.help-more{background:#081d2a;border:1px solid #29495d;border-radius:11px;overflow:hidden}.status-dictionary summary,.help-more summary{cursor:pointer;padding:10px;display:flex;gap:8px;align-items:center;list-style:none}.status-dictionary summary::-webkit-details-marker,.help-more summary::-webkit-details-marker,.help-topic summary::-webkit-details-marker{display:none}.status-dictionary summary span{font-size:18px}.status-dictionary summary b{font-size:10px}.status-dictionary details p{padding:0 10px 10px;margin:0;color:#a9c2ce;font-size:9px;line-height:1.5}.help-more{margin-top:8px}.help-more summary{font-weight:900;font-size:11px}.help-glossary{display:grid;grid-template-columns:repeat(2,1fr);gap:5px;padding:0 10px 10px}.help-glossary p{margin:0;background:#0d2737;padding:8px;border-radius:9px;font-size:9px;color:#afc6d1}.deck-beginner-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.help-accordion-list{display:grid;gap:8px;margin-bottom:12px}.help-topic{padding:0;overflow:hidden}.help-topic summary{cursor:pointer;padding:14px 16px;font-weight:1000;font-size:12px;list-style:none}.help-topic[open] summary{border-bottom:1px solid #29495d;background:#102b3b}.help-topic>div{padding:12px 16px}.help-topic p{margin:0 0 7px;color:#b8cfd9;font-size:10px;line-height:1.6}.loss-checklist{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}.loss-checklist p{margin:0;padding:10px;border-radius:10px;background:#081d2a;color:#b7ced9;font-size:10px;line-height:1.5}.help-example-modal p{line-height:1.55;color:#c7dbe5}
@media(max-width:900px){.help-five-grid,.help-card-types{grid-template-columns:repeat(2,1fr)}.status-dictionary{grid-template-columns:repeat(2,1fr)}.deck-beginner-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.help-welcome{grid-template-columns:48px 1fr;padding:13px;gap:10px}.help-welcome-icon{width:46px;height:46px;border-radius:13px;font-size:25px}.help-welcome h1{font-size:18px}.help-welcome p{font-size:11px}.help-quick-actions{grid-column:1/-1}.help-section{padding:12px}.help-section-title h2{font-size:16px}.help-five-grid,.help-card-types,.status-dictionary,.deck-beginner-grid,.loss-checklist,.read-card-notes{grid-template-columns:1fr}.read-card-demo{grid-template-columns:1fr}.fake-card{min-height:120px}.help-glossary{grid-template-columns:1fr}.help-topic summary{padding:12px;font-size:11px}.help-topic>div{padding:10px 12px}}

/* === RIMBA V57 — battle readability, objectives, intents, Matabelo intel === */
.stage-objective-chip{display:inline-flex;align-items:center;gap:5px;margin-top:7px;padding:5px 8px;border-radius:999px;background:rgba(45,112,137,.16);border:1px solid rgba(91,159,187,.35);font-size:8px;font-weight:900;color:#c8e5ef}
.battle-guidance-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:8px 0 10px}.battle-objective-card,.enemy-intents-card,.battle-history-card{border:1px solid #315368;background:linear-gradient(145deg,#092332,#081a27);border-radius:13px;padding:9px 11px;min-height:92px}.battle-mobile-hud{display:none}.battle-mobile-brief{display:none}.battle-objective-card{display:flex;align-items:center;gap:9px}.battle-objective-card>span{font-size:25px}.battle-objective-card div{display:grid;gap:2px}.battle-objective-card small,.intent-title small,.enemy-intent small,.history-title small,.history-item small{font-size:7px;letter-spacing:.11em;color:#779bad;font-weight:1000}.battle-objective-card b,.intent-title b,.history-title b{font-size:10px;color:#e6f5fa}.battle-objective-card em{font-size:8px;color:#82d7ac;font-style:normal;font-weight:900}.intent-title,.history-title{display:flex;align-items:center;gap:7px;margin-bottom:6px}.intent-title>span,.history-title>span{font-size:18px}.intent-title div,.history-title div{display:grid}.intent-list{display:grid;grid-template-columns:1fr;gap:5px}.enemy-intent{min-width:0;display:flex;gap:6px;align-items:center;padding:6px 7px;border-radius:9px;background:#0d2938;border:1px solid #28495b}.enemy-intent>span{font-size:17px;flex:0 0 auto}.enemy-intent div{min-width:0;display:grid}.enemy-intent b{font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#f2f8fa}.enemy-intent em{font-size:7px;color:#9bb8c5;font-style:normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.intent-empty,.history-empty{font-size:8px;color:#7e9ba9;padding:4px}.history-list{display:grid;gap:5px}.history-item{display:grid;grid-template-columns:28px 1fr;gap:6px;align-items:start;padding:6px 7px;border-radius:9px;background:#0d2938;border:1px solid #28495b}.history-item span{font-size:8px;line-height:1.35;color:#d9e7ef}.history-single-card{width:100%;text-align:left;display:grid;gap:4px;padding:9px 10px;border-radius:10px;background:#0d2938;border:1px solid #28495b;color:#fff;cursor:pointer}.history-single-card small{font-size:7px;letter-spacing:.11em;color:#7fa2b5;font-weight:1000}.history-single-card span{font-size:8px;line-height:1.35;color:#d9e7ef;min-height:28px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.history-single-card b{font-size:8px;color:#8dd3ff;font-weight:900}.battle-history-modal .battle-log-scroll{max-height:320px;overflow:auto;display:grid;gap:6px;padding-right:4px}.intel-grid{display:grid;grid-template-columns:1fr 1.4fr;gap:8px;margin:10px 0}.intel-grid>div{display:grid;gap:3px;padding:10px;border-radius:11px;background:#0d2735;border:1px solid #315166}.intel-grid small{font-size:8px;color:#79a0b3;font-weight:1000}.intel-grid b{font-size:11px;color:#e0f1f6}.objective-preview{display:grid;gap:3px;padding:10px 12px;border-radius:11px;background:rgba(45,117,83,.13);border:1px solid #356d53}.objective-preview b{font-size:11px}.objective-preview span{font-size:9px;color:#a8cabc}.loss-analysis,.community-aid{margin-top:10px;padding:11px;border-radius:12px;border:1px solid #35586b;background:#0b2533}.loss-analysis b,.community-aid b{font-size:11px}.loss-analysis p,.community-aid p{margin:5px 0 0;font-size:9px;line-height:1.45;color:#b4ccd7}.community-aid{border-color:#3f7859;background:rgba(36,105,72,.14)}.world-impact-win{padding:9px 10px;border-radius:10px;background:rgba(42,118,76,.14);border:1px solid #397552;color:#bde3ca}
@media(max-width:760px){.battle-guidance-row{grid-template-columns:1fr}.intent-list{grid-template-columns:repeat(2,minmax(0,1fr))}.enemy-intent:nth-child(3){grid-column:1/-1}.intel-grid{grid-template-columns:1fr}.battle-objective-card,.enemy-intents-card,.battle-history-card{padding:8px;min-height:auto}.history-item{grid-template-columns:24px 1fr}}
@media(max-width:430px){.intent-list{grid-template-columns:1fr}.enemy-intent:nth-child(3){grid-column:auto}.battle-objective-card>span{font-size:20px}}
.guardian-signature-box{display:flex;gap:10px;align-items:flex-start;margin:9px 0 11px;padding:10px 11px;border-radius:12px;background:linear-gradient(135deg,rgba(20,95,122,.22),rgba(81,61,117,.18));border:1px solid #3d728c}.guardian-signature-box>span{flex:0 0 auto;font-size:8px;font-weight:1000;letter-spacing:.08em;color:#8de0ff;padding:4px 6px;border-radius:999px;background:#0b2634}.guardian-signature-box b{font-size:11px;color:#e6f7fb}.guardian-signature-box p{margin:3px 0 0;font-size:9px;line-height:1.45;color:#acc9d5}

.deck-side-hint{padding:10px 11px;border-radius:12px;border:1px dashed #31536a;background:rgba(9,31,45,.7)}.deck-side-hint b{font-size:10px;color:#bce8ff}.deck-side-hint p{font-size:9px;line-height:1.4;color:#9fb9c8;margin:5px 0 0}
.guardian-deck-modal{width:min(860px,94vw);max-height:min(760px,92vh);display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto;gap:10px;overflow:hidden}.guardian-popup-head{display:grid;grid-template-columns:92px 1fr;gap:12px;align-items:center}.guardian-popup-art{height:92px;border-radius:16px;border:1px solid #355b72;background:radial-gradient(circle at 50% 35%,rgba(255,255,255,.13),rgba(4,18,27,.95));overflow:hidden}.guardian-popup-head h2{margin:5px 0 3px}.guardian-popup-head p{margin:0;color:#9fb9c8}.guardian-popup-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:4px;border-radius:13px;background:#071a27;border:1px solid #294b60}.guardian-popup-tabs button{border:0;border-radius:10px;background:transparent;color:#a8c2d0;padding:9px 10px;font-weight:900;cursor:pointer}.guardian-popup-tabs button.active{background:#1a506d;color:#fff;box-shadow:inset 0 0 0 1px #4f9fc8}.guardian-popup-body{overflow:auto;min-height:190px;padding-right:4px}.popup-signature{margin-bottom:10px}.popup-strategy{margin-top:0}.guardian-popup-skills{display:grid;grid-template-columns:1fr 1fr;gap:7px}.guardian-popup-skill{display:grid;grid-template-columns:1fr 38px;gap:9px;padding:9px 10px;border-radius:12px;background:#0b2433;border:1px solid #315166}.guardian-popup-skill.signature{border-color:#61c9ef;box-shadow:inset 0 0 0 1px rgba(97,201,239,.12)}.guardian-popup-skill small{display:block;font-size:7px;color:#7ea2b6;font-weight:1000;letter-spacing:.08em}.guardian-popup-skill b{display:block;font-size:10px;margin:3px 0}.guardian-popup-skill p{font-size:9px;line-height:1.35;color:#b9ced9;margin:0}.guardian-popup-skill>span{align-self:start;justify-self:end;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#071a26;border:1px solid #3a647d;font-size:10px;font-weight:1000}.guardian-replace-box{display:grid;gap:8px;padding:10px;border-radius:13px;background:#0b2332;border:1px solid #31546a}.guardian-replace-box>div:first-child{display:grid;gap:3px}.guardian-replace-box>div:first-child small{font-size:7px;letter-spacing:.1em;color:#7fa4b8;font-weight:1000}.guardian-replace-box>div:first-child b{font-size:10px;color:#dbeef6}.guardian-slot-choice{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.guardian-slot-choice button{display:grid;gap:3px;text-align:left;padding:8px 9px;border-radius:10px;background:#0a1e2b;color:#eef8ff;border:1px solid #355870;cursor:pointer;min-width:0}.guardian-slot-choice button small{font-size:7px;font-weight:1000}.guardian-slot-choice button span{font-size:9px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.guardian-slot-choice .blue{border-color:#49b9ff}.guardian-slot-choice .yellow{border-color:#e1bb39;color:#fff4c2}.guardian-slot-choice .teal{border-color:#27d8c7;color:#d1fff8}.guardian-slot-choice button.active{box-shadow:0 0 0 2px rgba(255,255,255,.12);background:#12374b}.guardian-popup-actions{display:grid;grid-template-columns:1fr auto;gap:8px}.guardian-popup-actions button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:720px){.guardian-deck-modal{width:96vw;max-height:94vh}.guardian-popup-head{grid-template-columns:70px 1fr}.guardian-popup-art{height:70px}.guardian-popup-skills{grid-template-columns:1fr}.guardian-slot-choice{grid-template-columns:1fr}.guardian-popup-actions{grid-template-columns:1fr}.guardian-popup-body{min-height:150px}.deck-side-summary{grid-template-columns:1fr}.deck-side-hint{display:none}}

.aligned-screen{max-width:1240px;margin:0 auto}.compact-page-hero{padding:12px 14px!important}.compact-page-hero h1{font-size:18px!important;margin:4px 0}.compact-page-hero p{margin:4px 0;font-size:10px!important}.una-compact-grid{margin-top:8px}.pager{margin-top:10px}
.database-screen .section-title{margin:7px 0}.database-screen .database-grid{gap:8px}.database-screen .database-card{min-height:0}
.sim-history-scroll{max-height:360px;overflow:auto;display:grid;gap:7px}.sim-history-scroll p{margin:0;padding:9px 10px;border-radius:10px;background:#0c2636;border:1px solid #31536a;display:grid;grid-template-columns:70px 1fr;gap:8px}.sim-history-scroll p span{color:#bad0db}.sim-log p{margin:7px 0;font-size:9px;line-height:1.35}.sim-log .compact-btn{margin-top:7px}
.ascend-more{margin:10px 0;padding:0!important;overflow:hidden}.ascend-more>summary{cursor:pointer;padding:12px 14px;font-weight:900;color:#dff3fb}.ascend-more-body{display:grid;gap:10px;padding:0 12px 12px}.future-system.compact,.ultimate-concept.compact{padding:10px;border-radius:12px;background:#0b2433;border:1px solid #315166}.future-system.compact h2,.ultimate-concept.compact h2{font-size:14px;margin:0 0 5px}.future-system.compact p,.ultimate-concept.compact p{font-size:9px;margin:0 0 7px}.compact-civilization{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:8px}.compact-civilization .civil-level{min-height:96px;padding:9px}
.help-master-more{margin:10px 0;padding:0!important;overflow:hidden}.help-master-more>summary{cursor:pointer;padding:14px 16px;font-size:14px;font-weight:900;color:#e5f5fb}.help-master-body{display:grid;gap:10px;padding:0 10px 10px}.help-master-body>.help-section{margin:0}.help-screen .help-welcome,.help-screen .help-section.beginner{margin-bottom:10px}.help-screen .help-accordion-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}.help-screen .help-topic{margin:0}.help-screen .help-topic summary{font-size:11px}.help-screen .help-topic>div{font-size:10px}.help-screen .help-lore{margin-top:10px}
@media(max-width:820px){.compact-civilization{grid-template-columns:repeat(2,minmax(0,1fr))!important}.help-screen .help-accordion-list{grid-template-columns:1fr}.aligned-screen{max-width:none}.sim-history-scroll p{grid-template-columns:58px 1fr}}

.guardian-page-status{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 8px;padding:6px 9px;border-radius:10px;border:1px solid #31546a;background:#0a2130;font-size:9px}.guardian-page-status b{font-size:9px;letter-spacing:.06em}.guardian-page-status span{color:#91afbf}.guardian-page-status.open{border-color:#35785d;background:rgba(36,104,74,.14)}.guardian-page-status.open b{color:#8fe0b7}.guardian-page-status.locked{border-color:#4b5360;background:rgba(70,75,84,.12)}.guardian-page-status.locked b{color:#aeb7c0}@media(max-width:620px){.guardian-page-status{font-size:8px}.guardian-page-status b{font-size:8px}}

@media(max-width:430px){.mobile-brief-row{grid-template-columns:1fr 1fr;gap:5px}.mobile-arena-card,.mobile-objective-card,.mobile-intent-card{padding:6px 7px}.mobile-arena-card b,.mobile-objective-card b,.mobile-intent-card b{font-size:9px}.mobile-arena-card span,.mobile-objective-card span,.mobile-intent-card span{font-size:8px}}


/* V57.8 — definitive mobile battle layout override */
@media (max-width:720px){
  .battle-top,
  .battle-guidance-row,
  .battle-history-card,
  .battle-mobile-hud{display:none!important}
  .battle-mobile-brief{display:grid!important;gap:5px;margin:5px 0 7px}
  .battle-mobile-brief .mobile-brief-row{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px}
  .battle-mobile-brief .mobile-arena-card,
  .battle-mobile-brief .mobile-objective-card,
  .battle-mobile-brief .mobile-intent-card{display:grid!important;gap:2px;min-width:0;border:1px solid #315368;background:linear-gradient(145deg,#092332,#081a27);border-radius:10px;padding:6px 7px;min-height:0}
  .battle-mobile-brief .mobile-arena-card.active{border-color:#d66d67;background:linear-gradient(145deg,rgba(91,29,33,.92),rgba(22,15,24,.95))}
  .battle-mobile-brief small{font-size:6.5px;letter-spacing:.09em;color:#7fa2b5;font-weight:1000;line-height:1.1}
  .battle-mobile-brief b{font-size:9px;color:#e7f5fb;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .battle-mobile-brief span{font-size:8px;color:#9fc0d1;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .battle-mobile-brief .mobile-intent-card{grid-template-columns:auto minmax(0,1fr);align-items:center;column-gap:7px;padding:6px 8px}
  .battle-mobile-brief .mobile-intent-card small{grid-column:1/-1}
  .battle-mobile-brief .mobile-intent-card b{font-size:8px;color:#dceef7}
  .battle-mobile-brief .mobile-intent-card span{font-size:8px}
  .battle .team-label.compact-label{margin-top:4px;margin-bottom:4px}
}
@media (max-width:390px){
  .battle-mobile-brief .mobile-arena-card,
  .battle-mobile-brief .mobile-objective-card,
  .battle-mobile-brief .mobile-intent-card{padding:5px 6px}
  .battle-mobile-brief b{font-size:8.5px}
  .battle-mobile-brief span{font-size:7.5px}
}

.mobile-team-identity{display:none}

@media(max-width:720px){
  .battle .team-label.team-identity-header{margin:4px 0 5px;padding:0;border:0;background:transparent;display:block}
  .battle .team-label.team-identity-header>h3,.battle .team-label.team-identity-header>span{display:none!important}
  .mobile-team-identity{display:flex!important;align-items:center;gap:7px;min-width:0;padding:5px 7px;border-radius:10px;border:1px solid #315368;background:linear-gradient(145deg,#092332,#081a27)}
  .enemy-team .mobile-team-identity{border-color:#5f4348;background:linear-gradient(145deg,rgba(68,29,34,.72),#081a27)}
  .player-team .mobile-team-identity{border-color:#28694f;background:linear-gradient(145deg,rgba(20,75,55,.38),#081a27)}
  .mobile-team-avatar{width:32px;height:32px;flex:0 0 32px;border-radius:8px;overflow:hidden;display:grid;place-items:center;background:#071722;border:1px solid #375b70}
  .mobile-team-avatar img,.mobile-team-avatar .avatar-icon-art{width:100%;height:100%;object-fit:contain}
  .mobile-team-copy{min-width:0;flex:1;display:grid;grid-template-columns:auto 1fr;column-gap:6px;align-items:center}
  .mobile-team-copy>small{font-size:6.5px;letter-spacing:.11em;font-weight:1000;color:#82a7bb}
  .mobile-team-copy>b{font-size:10px;color:#f3fbff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-team-pointline{grid-column:1/-1;display:flex;align-items:center;gap:6px;min-width:0;margin-top:2px}
  .mobile-team-pointline>span{font-size:8px;color:#b7d0dc;font-weight:800;white-space:nowrap}
  .mobile-team-pointline .points{display:flex;gap:3px;margin:0;min-width:0}
  .mobile-team-pointline .point-dot{width:8px;height:8px;border-radius:3px}
}
@media(max-width:390px){
  .mobile-team-avatar{width:28px;height:28px;flex-basis:28px}
  .mobile-team-copy>b{font-size:9px}
  .mobile-team-pointline>span{font-size:7.5px}
  .mobile-team-pointline .point-dot{width:7px;height:7px;gap:2px}
}


/* V58 Offline / APK readiness */
.offline-entry{margin-top:14px;padding:11px 12px;border:1px solid #3a6b58;border-radius:14px;background:linear-gradient(145deg,rgba(26,77,56,.24),rgba(8,29,35,.94));display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left}.offline-entry div{display:grid;gap:3px}.offline-entry b{font-size:13px}.offline-entry small{font-size:10px;color:#a8c9bb}.offline-btn{border:1px solid #56c68d;background:#174f38;color:#eafff3;padding:9px 12px;border-radius:11px;font-weight:900;white-space:nowrap}.offline-mode-pill{border-color:#58bc8a!important;background:#123a2b!important;color:#d9ffea!important}.home-menu-card.offline-locked{opacity:.62;filter:saturate(.65)}.home-menu-card.offline-locked .home-menu-arrow{color:#6b8797}.offline-account{border-color:#3d765a!important;background:linear-gradient(145deg,rgba(28,85,58,.18),rgba(8,28,34,.94))!important}
@media(max-width:620px){.offline-entry{align-items:stretch;flex-direction:column}.offline-btn{width:100%}}


/* V58.1 — unified compact battle UI (mobile + desktop) */
.battle:not(.online-battle) .battle-top,
.battle:not(.online-battle) .battle-guidance-row{display:none!important}
.battle:not(.online-battle) .battle-mobile-brief{display:grid!important;gap:6px;margin:6px 0 7px}
.battle:not(.online-battle) .battle-mobile-brief .mobile-brief-row{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px}
.battle:not(.online-battle) .mobile-arena-card,
.battle:not(.online-battle) .mobile-objective-card{display:grid!important;gap:3px;min-width:0;border:1px solid #315368;background:linear-gradient(145deg,#092332,#081a27);border-radius:11px;padding:8px 10px;min-height:58px}
.battle:not(.online-battle) .mobile-arena-card.active{border-color:#d66d67;background:linear-gradient(145deg,rgba(91,29,33,.92),rgba(22,15,24,.95))}
.battle:not(.online-battle) .battle-mobile-brief small,
.battle:not(.online-battle) .battle-intent-inline small{font-size:7px;letter-spacing:.1em;color:#7fa2b5;font-weight:1000}
.battle:not(.online-battle) .battle-mobile-brief b{font-size:11px;color:#e7f5fb;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.battle:not(.online-battle) .battle-mobile-brief span{font-size:9px;color:#9fc0d1;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.battle:not(.online-battle) .battle-intent-inline{margin:7px 0 5px;padding:7px 10px;border-radius:11px;border:1px solid #315368;background:linear-gradient(145deg,#0b293a,#081a27)}
.battle:not(.online-battle) .battle-intent-inline>div{display:grid;grid-template-columns:auto minmax(0,1fr);gap:7px;align-items:center}
.battle:not(.online-battle) .battle-intent-inline b{font-size:10px;color:#edf8fd;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.battle:not(.online-battle) .team-label.team-identity-header{margin:5px 0;padding:0;border:0;background:transparent;display:block}
.battle:not(.online-battle) .team-label.team-identity-header>h3,
.battle:not(.online-battle) .team-label.team-identity-header>span{display:none!important}
.battle:not(.online-battle) .mobile-team-identity{display:flex!important;align-items:center;gap:8px;min-width:0;padding:6px 9px;border-radius:11px;border:1px solid #315368;background:linear-gradient(145deg,#092332,#081a27)}
.battle:not(.online-battle) .enemy-team .mobile-team-identity{border-color:#5f4348;background:linear-gradient(145deg,rgba(68,29,34,.72),#081a27)}
.battle:not(.online-battle) .player-team .mobile-team-identity{border-color:#28694f;background:linear-gradient(145deg,rgba(20,75,55,.38),#081a27)}
.battle:not(.online-battle) .mobile-team-avatar{width:36px;height:36px;flex:0 0 36px;border-radius:9px;overflow:hidden;display:grid;place-items:center;background:#071722;border:1px solid #375b70}
.battle:not(.online-battle) .mobile-team-avatar img,
.battle:not(.online-battle) .mobile-team-avatar .avatar-icon-art{width:100%;height:100%;object-fit:contain}
.battle:not(.online-battle) .mobile-team-copy{min-width:0;flex:1;display:grid;grid-template-columns:auto 1fr;column-gap:7px;align-items:center}
.battle:not(.online-battle) .mobile-team-copy>small{font-size:7px;letter-spacing:.11em;font-weight:1000;color:#82a7bb}
.battle:not(.online-battle) .mobile-team-copy>b{font-size:11px;color:#f3fbff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.battle:not(.online-battle) .mobile-team-pointline{grid-column:1/-1;display:flex;align-items:center;gap:7px;min-width:0;margin-top:2px}
.battle:not(.online-battle) .mobile-team-pointline>span{font-size:9px;color:#b7d0dc;font-weight:800;white-space:nowrap}
.battle:not(.online-battle) .mobile-team-pointline .points{display:flex;gap:3px;margin:0;min-width:0}
.battle:not(.online-battle) .mobile-team-pointline .point-dot{width:9px;height:9px;border-radius:3px}

/* Penjaga aktif: kiri Tosca, tengah Biru Laut, kanan Kuning */
.battle:not(.online-battle) .unit-card.slot-0{border-color:#20d7c5!important;background:linear-gradient(180deg,rgba(32,215,197,.36),rgba(7,35,38,.98))!important;box-shadow:inset 0 0 24px rgba(32,215,197,.05)}
.battle:not(.online-battle) .unit-card.slot-1{border-color:#258fd8!important;background:linear-gradient(180deg,rgba(37,143,216,.38),rgba(7,29,47,.98))!important;box-shadow:inset 0 0 24px rgba(37,143,216,.06)}
.battle:not(.online-battle) .unit-card.slot-2{border-color:#ffd84d!important;background:linear-gradient(180deg,rgba(255,216,77,.31),rgba(38,32,7,.98))!important;color:#fffbe5;box-shadow:inset 0 0 24px rgba(255,216,77,.05)}

@media(min-width:721px){
  .battle:not(.online-battle){max-width:1100px;padding-top:12px}
  .battle:not(.online-battle) .battle-mobile-brief{max-width:100%;margin-bottom:8px}
  .battle:not(.online-battle) .mobile-arena-card,
  .battle:not(.online-battle) .mobile-objective-card{min-height:64px}
  .battle:not(.online-battle) .battle-intent-inline{margin-top:9px}
  .battle:not(.online-battle) .unit-row{gap:12px}
}
@media(max-width:720px){
  .battle:not(.online-battle) .battle-mobile-brief{margin:5px 0 6px;gap:5px}
  .battle:not(.online-battle) .battle-mobile-brief .mobile-brief-row{gap:5px}
  .battle:not(.online-battle) .mobile-arena-card,
  .battle:not(.online-battle) .mobile-objective-card{padding:6px 7px;min-height:0}
  .battle:not(.online-battle) .battle-mobile-brief b{font-size:9px}
  .battle:not(.online-battle) .battle-mobile-brief span{font-size:8px;white-space:nowrap;text-overflow:ellipsis;display:block}
  .battle:not(.online-battle) .battle-intent-inline{margin:5px 0 4px;padding:6px 8px}
  .battle:not(.online-battle) .battle-intent-inline b{font-size:8px}
  .battle:not(.online-battle) .mobile-team-avatar{width:30px;height:30px;flex-basis:30px}
  .battle:not(.online-battle) .mobile-team-copy>b{font-size:9.5px}
  .battle:not(.online-battle) .mobile-team-pointline>span{font-size:8px}
  .battle:not(.online-battle) .mobile-team-pointline .point-dot{width:8px;height:8px}
}


/* V58.2 — SKILL COLOR SYNC
   One slot = one color everywhere:
   LEFT / slot-0 = TOSCA, CENTER / slot-1 = OCEAN BLUE, RIGHT / slot-2 = YELLOW. */
html[data-rimba-build="v58"] .action-card.skill.slot-0,
html[data-rimba-build="v58"] .online-battle .action-card.skill.slot-0{
  border-color:#20d7c5!important;
  background:linear-gradient(160deg,#137f76 0%,#0c5a56 48%,#072b31 100%)!important;
  box-shadow:inset 0 0 0 1px rgba(118,255,241,.12)!important;
}
html[data-rimba-build="v58"] .action-card.skill.slot-1,
html[data-rimba-build="v58"] .online-battle .action-card.skill.slot-1{
  border-color:#258fd8!important;
  background:linear-gradient(160deg,#176da9 0%,#124d79 48%,#07263c 100%)!important;
  box-shadow:inset 0 0 0 1px rgba(132,207,255,.12)!important;
}
html[data-rimba-build="v58"] .action-card.skill.slot-2,
html[data-rimba-build="v58"] .online-battle .action-card.skill.slot-2{
  border-color:#ffd84d!important;
  background:linear-gradient(160deg,#8a7718 0%,#5f5212 48%,#2b270b 100%)!important;
  color:#fffbe7!important;
  box-shadow:inset 0 0 0 1px rgba(255,239,145,.14)!important;
}

html[data-rimba-build="v58"] .action-card.skill.slot-0 .skill-badge{
  background:linear-gradient(135deg,#6affef,#20cbbb 55%,#08786e)!important;
  border-color:#b8fff8!important;
}
html[data-rimba-build="v58"] .action-card.skill.slot-1 .skill-badge{
  background:linear-gradient(135deg,#8bd8ff,#3a9bec 55%,#155f9f)!important;
  border-color:#d1efff!important;
}
html[data-rimba-build="v58"] .action-card.skill.slot-2 .skill-badge{
  background:linear-gradient(135deg,#fff7b0,#f0cf3e 55%,#8c7410)!important;
  border-color:#fffbd7!important;
}

html[data-rimba-build="v58"] .action-card.skill.slot-0 .owner-name-tag{
  background:rgba(32,215,197,.22)!important;border-color:rgba(115,255,240,.32)!important;color:#eafffc!important
}
html[data-rimba-build="v58"] .action-card.skill.slot-1 .owner-name-tag{
  background:rgba(37,143,216,.24)!important;border-color:rgba(130,207,255,.32)!important;color:#eef8ff!important
}
html[data-rimba-build="v58"] .action-card.skill.slot-2 .owner-name-tag{
  background:rgba(255,216,77,.20)!important;border-color:rgba(255,239,142,.34)!important;color:#fff9d2!important
}

html[data-rimba-build="v58"] .action-card.skill.slot-0 .cost{border-color:#20d7c5!important;background:#082d2c!important;color:#dffffb!important}
html[data-rimba-build="v58"] .action-card.skill.slot-1 .cost{border-color:#258fd8!important;background:#082840!important;color:#e5f5ff!important}
html[data-rimba-build="v58"] .action-card.skill.slot-2 .cost{border-color:#ffd84d!important;background:#342e0a!important;color:#fff8c6!important}

html[data-rimba-build="v58"] .action-card.skill.slot-0::after{background:#20d7c5!important}
html[data-rimba-build="v58"] .action-card.skill.slot-1::after{background:#258fd8!important}
html[data-rimba-build="v58"] .action-card.skill.slot-2::after{background:#ffd84d!important}

html[data-rimba-build="v58"] .action-card.skill.slot-0.selected{border-color:#20d7c5!important;box-shadow:0 0 0 3px rgba(32,215,197,.25),0 0 26px rgba(32,215,197,.30)!important}
html[data-rimba-build="v58"] .action-card.skill.slot-1.selected{border-color:#258fd8!important;box-shadow:0 0 0 3px rgba(37,143,216,.27),0 0 26px rgba(37,143,216,.30)!important}
html[data-rimba-build="v58"] .action-card.skill.slot-2.selected{border-color:#ffd84d!important;box-shadow:0 0 0 3px rgba(255,216,77,.24),0 0 26px rgba(255,216,77,.25)!important}

/* Deck / skill detail surfaces use exactly the same slot identity. */
html[data-rimba-build="v58"] .deck-skill-thumb.slot-0,
html[data-rimba-build="v58"] .deck-skill-modal-card.slot-0,
html[data-rimba-build="v58"] .shop-detail-card.slot-0{
  border-color:#20d7c5!important;background:linear-gradient(180deg,rgba(18,126,117,.96),#082d31)!important
}
html[data-rimba-build="v58"] .deck-skill-thumb.slot-1,
html[data-rimba-build="v58"] .deck-skill-modal-card.slot-1,
html[data-rimba-build="v58"] .shop-detail-card.slot-1{
  border-color:#258fd8!important;background:linear-gradient(180deg,rgba(29,103,160,.96),#08283f)!important
}
html[data-rimba-build="v58"] .deck-skill-thumb.slot-2,
html[data-rimba-build="v58"] .deck-skill-modal-card.slot-2,
html[data-rimba-build="v58"] .shop-detail-card.slot-2{
  border-color:#ffd84d!important;background:linear-gradient(180deg,rgba(125,107,24,.96),#302b0b)!important;color:#fffbe7!important
}
html[data-rimba-build="v58"] .deck-skill-thumb.slot-0.selected{border-color:#20d7c5!important;box-shadow:0 0 0 2px rgba(32,215,197,.28) inset!important}
html[data-rimba-build="v58"] .deck-skill-thumb.slot-1.selected{border-color:#258fd8!important;box-shadow:0 0 0 2px rgba(37,143,216,.28) inset!important}
html[data-rimba-build="v58"] .deck-skill-thumb.slot-2.selected{border-color:#ffd84d!important;box-shadow:0 0 0 2px rgba(255,216,77,.28) inset!important}

@media(max-width:720px){
  html[data-rimba-build="v58"] .action-card.skill.slot-0{background:linear-gradient(180deg,#137b73,#093b3b)!important}
  html[data-rimba-build="v58"] .action-card.skill.slot-1{background:linear-gradient(180deg,#17689f,#0a3859)!important}
  html[data-rimba-build="v58"] .action-card.skill.slot-2{background:linear-gradient(180deg,#817018,#3c350d)!important}
}


/* ============================================================
   V58.3 HARD FIX — SLOT COLOR IS THE SINGLE SOURCE OF TRUTH
   slot-0 = TOSCA | slot-1 = OCEAN BLUE | slot-2 = YELLOW
   Unscoped fallback + build-scoped high specificity intentionally
   override all historical v17/v21/v29 theme rules.
   ============================================================ */
:root{
  --rimba-slot-left:#20d7c5;
  --rimba-slot-center:#258fd8;
  --rimba-slot-right:#ffd84d;
}

body .battle .action-card[data-skill-card="1"].slot-0,
body .battle .action-card.skill.slot-0,
html[data-rimba-build="v58.3"] body .action-card[data-skill-card="1"].slot-0{
  border:2px solid var(--rimba-slot-left)!important;
  background:linear-gradient(155deg,#148b80 0%,#0c625d 48%,#062e33 100%)!important;
  color:#effffc!important;
  box-shadow:inset 0 0 0 1px rgba(116,255,241,.16)!important;
}
body .battle .action-card[data-skill-card="1"].slot-1,
body .battle .action-card.skill.slot-1,
html[data-rimba-build="v58.3"] body .action-card[data-skill-card="1"].slot-1{
  border:2px solid var(--rimba-slot-center)!important;
  background:linear-gradient(155deg,#1b76b7 0%,#125484 48%,#06283f 100%)!important;
  color:#f0f9ff!important;
  box-shadow:inset 0 0 0 1px rgba(136,211,255,.16)!important;
}
body .battle .action-card[data-skill-card="1"].slot-2,
body .battle .action-card.skill.slot-2,
html[data-rimba-build="v58.3"] body .action-card[data-skill-card="1"].slot-2{
  border:2px solid var(--rimba-slot-right)!important;
  background:linear-gradient(155deg,#98821b 0%,#685914 48%,#302a0a 100%)!important;
  color:#fffbe3!important;
  box-shadow:inset 0 0 0 1px rgba(255,241,151,.18)!important;
}

body .battle .action-card[data-skill-card="1"].slot-0 .skill-badge{background:linear-gradient(135deg,#7bfff1,#20cbbb 55%,#08786e)!important;border-color:#c4fff9!important}
body .battle .action-card[data-skill-card="1"].slot-1 .skill-badge{background:linear-gradient(135deg,#9de0ff,#3a9bec 55%,#155f9f)!important;border-color:#dcf3ff!important}
body .battle .action-card[data-skill-card="1"].slot-2 .skill-badge{background:linear-gradient(135deg,#fff9bd,#f0cf3e 55%,#8c7410)!important;border-color:#fffde0!important}

body .battle .action-card[data-skill-card="1"].slot-0 .cost{border-color:var(--rimba-slot-left)!important;background:#062f2e!important;color:#e5fffc!important}
body .battle .action-card[data-skill-card="1"].slot-1 .cost{border-color:var(--rimba-slot-center)!important;background:#062b45!important;color:#ecf8ff!important}
body .battle .action-card[data-skill-card="1"].slot-2 .cost{border-color:var(--rimba-slot-right)!important;background:#393109!important;color:#fff9c9!important}

body .battle .action-card[data-skill-card="1"].slot-0 .owner-name-tag{background:#0b625b!important;border:1px solid #48e8d8!important;color:#effffc!important}
body .battle .action-card[data-skill-card="1"].slot-1 .owner-name-tag{background:#124f7b!important;border:1px solid #55aee8!important;color:#f0f9ff!important}
body .battle .action-card[data-skill-card="1"].slot-2 .owner-name-tag{background:#665814!important;border:1px solid #ead047!important;color:#fffbe0!important}

body .battle .action-card[data-skill-card="1"].slot-0.selected{box-shadow:0 0 0 3px rgba(32,215,197,.30),0 0 28px rgba(32,215,197,.38)!important}
body .battle .action-card[data-skill-card="1"].slot-1.selected{box-shadow:0 0 0 3px rgba(37,143,216,.30),0 0 28px rgba(37,143,216,.38)!important}
body .battle .action-card[data-skill-card="1"].slot-2.selected{box-shadow:0 0 0 3px rgba(255,216,77,.28),0 0 28px rgba(255,216,77,.32)!important}

/* selected skill detail follows the same owner color */
body .battle .selected-action-panel.slot-0{border-color:var(--rimba-slot-left)!important;background:linear-gradient(145deg,rgba(14,91,85,.96),rgba(7,30,35,.98))!important}
body .battle .selected-action-panel.slot-1{border-color:var(--rimba-slot-center)!important;background:linear-gradient(145deg,rgba(19,76,119,.96),rgba(7,28,43,.98))!important}
body .battle .selected-action-panel.slot-2{border-color:var(--rimba-slot-right)!important;background:linear-gradient(145deg,rgba(94,81,18,.96),rgba(31,28,9,.98))!important}
body .battle .selected-action-panel.slot-0 .selected-cost{border-color:var(--rimba-slot-left)!important}
body .battle .selected-action-panel.slot-1 .selected-cost{border-color:var(--rimba-slot-center)!important}
body .battle .selected-action-panel.slot-2 .selected-cost{border-color:var(--rimba-slot-right)!important}

/* Deck, skill popup and shop use identical mapping */
body .deck-skill-thumb.slot-0,body .deck-skill-modal-card.slot-0,body .shop-detail-card.slot-0{border-color:var(--rimba-slot-left)!important;background:linear-gradient(180deg,#127d74,#072e32)!important}
body .deck-skill-thumb.slot-1,body .deck-skill-modal-card.slot-1,body .shop-detail-card.slot-1{border-color:var(--rimba-slot-center)!important;background:linear-gradient(180deg,#1c68a0,#072940)!important}
body .deck-skill-thumb.slot-2,body .deck-skill-modal-card.slot-2,body .shop-detail-card.slot-2{border-color:var(--rimba-slot-right)!important;background:linear-gradient(180deg,#806e18,#302a0a)!important;color:#fffbe3!important}

/* Active owner tabs also match battle card colors */
body .owner-select.slot-0{border-color:var(--rimba-slot-left)!important;background:linear-gradient(180deg,rgba(32,215,197,.24),#092c31)!important}
body .owner-select.slot-1{border-color:var(--rimba-slot-center)!important;background:linear-gradient(180deg,rgba(37,143,216,.24),#09283e)!important}
body .owner-select.slot-2{border-color:var(--rimba-slot-right)!important;background:linear-gradient(180deg,rgba(255,216,77,.22),#312b0b)!important;color:#fffbe3!important}

@media(max-width:720px){
  body .battle .action-card[data-skill-card="1"].slot-0{background:linear-gradient(180deg,#168b82,#083d3c)!important}
  body .battle .action-card[data-skill-card="1"].slot-1{background:linear-gradient(180deg,#1a72ad,#093c5f)!important}
  body .battle .action-card[data-skill-card="1"].slot-2{background:linear-gradient(180deg,#927d19,#42390d)!important}
}


/* ============================================================
   V58.4 SKILL BORDER HARD LOCK
   The card element also receives inline !important slot color from app.js.
   These rules synchronize focus/active states and act as fallback.
   ============================================================ */
body .battle .action-card[data-skill-card="1"][data-owner-slot="0"]{
  border-color:#20d7c5!important;outline-color:#20d7c5!important
}
body .battle .action-card[data-skill-card="1"][data-owner-slot="1"]{
  border-color:#258fd8!important;outline-color:#258fd8!important
}
body .battle .action-card[data-skill-card="1"][data-owner-slot="2"]{
  border-color:#ffd84d!important;outline-color:#ffd84d!important
}
body .battle .action-card[data-skill-card="1"][data-owner-slot="0"]:focus-visible{outline:2px solid #20d7c5!important;outline-offset:2px!important}
body .battle .action-card[data-skill-card="1"][data-owner-slot="1"]:focus-visible{outline:2px solid #258fd8!important;outline-offset:2px!important}
body .battle .action-card[data-skill-card="1"][data-owner-slot="2"]:focus-visible{outline:2px solid #ffd84d!important;outline-offset:2px!important}


/* === V58.7 Expedition hero cards: normalize mixed portrait sizes === */
.stage-card.stage-card-hero{padding:0!important;min-height:0!important;display:grid!important;grid-template-rows:auto auto;overflow:hidden!important;border-radius:20px!important;background:#0b2233!important;text-align:left!important;isolation:isolate}
.stage-card-hero .num{position:absolute!important;z-index:5!important;top:14px!important;left:14px!important;margin:0!important;width:42px!important;height:42px!important;border-radius:12px!important;background:rgba(8,31,46,.88)!important;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);border:1px solid rgba(103,193,240,.55)!important;color:#fff!important;box-shadow:0 6px 18px rgba(0,0,0,.22)}
.stage-hero-art{position:relative!important;height:280px!important;overflow:hidden!important;background:radial-gradient(circle at 50% 28%,rgba(85,161,193,.15),rgba(4,16,25,.88) 72%)!important;display:grid!important;place-items:end center!important}
.stage-hero-image{position:absolute!important;inset:8px 10px 0!important;display:grid!important;place-items:end center!important;overflow:visible!important;width:auto!important;height:auto!important}
.stage-hero-image.card-art-image{width:calc(100% - 20px)!important;height:calc(100% - 8px)!important}
.stage-hero-image img,.stage-hero-image.card-art-image img{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center bottom!important;padding:0!important;margin:0 auto!important;transform:scale(1.08)!important;transform-origin:center bottom!important;filter:drop-shadow(0 12px 18px rgba(0,0,0,.32))!important}
.stage-hero-shade{position:absolute!important;inset:0!important;z-index:2!important;background:linear-gradient(180deg,rgba(3,14,22,.02) 24%,rgba(5,20,30,.18) 48%,rgba(5,18,28,.88) 76%,rgba(4,16,25,.98) 100%)!important;pointer-events:none}
.stage-hero-copy{position:absolute!important;z-index:3!important;left:18px!important;right:18px!important;bottom:15px!important;color:#fff!important;text-shadow:0 2px 8px rgba(0,0,0,.92)!important;display:grid!important;gap:5px!important}
.stage-hero-boss{font-size:13px!important;font-weight:1000!important;letter-spacing:.02em!important;color:#eaf8ff!important}
.stage-hero-copy h4{margin:0!important;font-size:21px!important;line-height:1.08!important;color:#fff!important;font-weight:1000!important}
.stage-hero-copy p{margin:0!important;display:grid!important;gap:3px!important;color:#d9edf7!important;font-size:11px!important;line-height:1.3!important;font-weight:700!important}
.stage-hero-copy p span{display:block!important}
.stage-card-footer{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding:12px 16px 14px!important;background:linear-gradient(180deg,#0a2233,#071a28)!important;border-top:1px solid rgba(80,138,169,.35)!important}
.stage-card-hero .stage-objective-chip{margin:0!important;min-width:0!important;max-width:68%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;color:#d9edf8!important}
.stage-card-hero .reward{margin:0!important;white-space:nowrap!important;color:#ffd65a!important;font-size:13px!important;font-weight:1000!important}
.stage-card-hero.completed{border-color:#3a8d78!important}.stage-card-hero.completed .num{background:rgba(21,96,75,.92)!important;border-color:#50d39e!important}
.stage-card-hero.locked .stage-hero-art{filter:grayscale(.78) brightness(.7)!important}.stage-card-hero.locked .stage-hero-copy{opacity:.76!important}

@media(max-width:820px){
  .stage-hero-art{height:250px!important}
  .stage-hero-copy h4{font-size:18px!important}
  .stage-hero-image img,.stage-hero-image.card-art-image img{transform:scale(1.12)!important}
}
@media(max-width:600px){
  .paged-stage-grid{grid-template-columns:1fr!important;gap:12px!important}
  .stage-card.stage-card-hero{border-radius:22px!important}
  .stage-hero-art{height:330px!important}
  .stage-hero-image{inset:6px 14px 0!important}
  .stage-hero-image img,.stage-hero-image.card-art-image img{transform:scale(1.16)!important}
  .stage-hero-copy{left:18px!important;right:18px!important;bottom:16px!important}
  .stage-hero-boss{font-size:15px!important}
  .stage-hero-copy h4{font-size:23px!important}
  .stage-hero-copy p{font-size:12px!important;line-height:1.34!important}
  .stage-card-footer{padding:12px 16px 15px!important}
  .stage-card-hero .stage-objective-chip{font-size:11px!important;max-width:62%!important}
  .stage-card-hero .reward{font-size:14px!important}
}
@media(max-width:390px){
  .stage-hero-art{height:300px!important}
  .stage-hero-copy h4{font-size:20px!important}
  .stage-hero-copy p{font-size:11px!important}
}


/* V58.8 — Duelist hero cards + Point/Rotation + borrowed duel decks */
.duelist-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
.duelist-card-hero{padding:0!important;display:grid!important;grid-template-rows:1fr auto!important;min-height:370px!important;overflow:hidden!important;border-radius:20px!important;background:#071b28!important}
.duelist-hero-art{position:relative;height:315px;overflow:hidden;background:radial-gradient(circle at 50% 28%,rgba(85,161,193,.15),rgba(4,16,25,.9) 72%);display:grid;place-items:end center}
.duelist-hero-image{position:absolute!important;inset:8px 12px 0!important;width:calc(100% - 24px)!important;height:calc(100% - 8px)!important;display:grid!important;place-items:end center!important;overflow:visible!important}
.duelist-hero-image img,.duelist-hero-image.card-art-image img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center bottom!important;transform:scale(1.12)!important;transform-origin:center bottom!important;filter:drop-shadow(0 12px 18px rgba(0,0,0,.35))!important}
.duelist-hero-shade{position:absolute;inset:0;z-index:2;background:linear-gradient(180deg,rgba(3,14,22,.02) 22%,rgba(5,20,30,.16) 47%,rgba(5,18,28,.86) 76%,rgba(4,16,25,.98) 100%);pointer-events:none}
.duelist-hero-copy{position:absolute;z-index:3;left:18px;right:18px;bottom:15px;color:#fff;text-shadow:0 2px 8px rgba(0,0,0,.94);display:grid;gap:5px}
.duelist-hero-copy small{font-size:10px;letter-spacing:.08em;color:#bfe8f7;font-weight:900}.duelist-hero-copy h3{font-size:23px;line-height:1.05;margin:0;color:#fff}.duelist-hero-copy p{font-size:11px;line-height:1.32;margin:0;color:#dceef7;font-weight:700}
.duelist-hero-foot{padding:10px 12px 12px}.duelist-hero-foot .primary-btn{width:100%}
.duelist-card-hero.locked-rival .duelist-hero-art{filter:grayscale(.78) brightness(.72)}
.deck-main-tabs{grid-template-columns:repeat(6,minmax(0,1fr))!important;width:100%}
.deck-info-panel{display:grid;gap:12px}.point-card-catalog{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.point-info-card{position:relative;display:grid;grid-template-columns:56px 1fr;gap:10px;align-items:center;padding:12px;border:1px solid #56606a;border-radius:15px;background:linear-gradient(180deg,#28313a,#121a22)}.point-info-card .support-card-icon{width:52px;height:52px}.point-info-card small,.rotation-option-card small{font-size:7px;letter-spacing:.1em;color:#aebdca;font-weight:900}.point-info-card h3{font-size:13px;margin:2px 0}.point-info-card p{font-size:9px;line-height:1.3;color:#c8d5dd;margin:0}.point-info-card b{font-size:10px;color:#e6eef3}.point-index{position:absolute;right:8px;top:7px;font-size:9px;color:#93a6b4}
.rotation-option-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.rotation-option-card{display:grid;grid-template-columns:46px 1fr;gap:8px;align-items:center;padding:10px;border-radius:14px;border:1px solid #334e61;background:#0a1e2b;opacity:.67}.rotation-option-card.active{opacity:1;border-color:#f5c542;background:linear-gradient(180deg,rgba(122,98,19,.35),#0b2130);box-shadow:0 0 0 2px rgba(245,197,66,.08)}.rotation-option-card .support-card-icon{width:44px;height:44px}.rotation-option-card h4{font-size:11px;margin:2px 0}.rotation-option-card p{font-size:8px;color:#b9cbd6;line-height:1.28;margin:0}.rotation-option-card span{font-size:9px;color:#e8edf1}
.duel-loadout-choice{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}.duel-loadout-choice>div{display:grid;gap:5px;padding:12px;border-radius:13px;border:1px solid #35556b;background:#0a2130}.duel-loadout-choice small,.rotation-mini small,.pvp-loadout-strip small{font-size:8px;letter-spacing:.1em;color:#81a9bd;font-weight:900}.duel-loadout-choice b{font-size:12px;color:#fff}.duel-loadout-choice span{font-size:9px;color:#b9ceda}.rotation-mini{display:grid;gap:6px;padding:10px;border:1px solid #5c5430;border-radius:12px;background:rgba(93,78,20,.16)}.rotation-mini>div{display:flex;flex-wrap:wrap;gap:5px}.rotation-mini span{font-size:8px;padding:5px 7px;border-radius:999px;background:#152d3a;border:1px solid #35576b;color:#dceaf1}.rotation-mini em{font-size:8px;color:#b8c6ce;font-style:normal}
.pvp-loadout-strip{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;padding:11px 12px;border:1px solid #31536a;border-radius:14px;background:#0a2130}.pvp-loadout-strip>div:first-child{display:grid;gap:2px}.pvp-loadout-strip b{font-size:13px}.pvp-loadout-strip span{font-size:9px;color:#a9c3d1}.pvp-loadout-strip>div:last-child{display:flex;gap:6px}.pvp-loadout-strip button{border:1px solid #3a5c72;background:#0d2839;color:#bcd1de;padding:7px 10px;border-radius:10px;font-weight:900}.pvp-loadout-strip button.active{background:#1c5a78;border-color:#6ccdf1;color:#fff}.rotation-mini.lobby{margin-bottom:12px}
@media(max-width:1100px){.duelist-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.point-card-catalog,.rotation-option-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.deck-main-tabs{grid-template-columns:repeat(3,1fr)!important;flex-wrap:wrap!important}}
@media(max-width:620px){.duelist-grid{grid-template-columns:1fr!important}.duelist-card-hero{min-height:410px!important}.duelist-hero-art{height:350px}.duelist-hero-image img,.duelist-hero-image.card-art-image img{transform:scale(1.16)!important}.point-card-catalog,.rotation-option-grid{grid-template-columns:1fr}.duel-loadout-choice{grid-template-columns:1fr}.pvp-loadout-strip{align-items:stretch;flex-direction:column}.pvp-loadout-strip>div:last-child{display:grid;grid-template-columns:1fr 1fr}.deck-main-tabs{grid-template-columns:repeat(2,1fr)!important}}

/* V58.9 Point Support Rotation */
.point-info-card.active{border-color:#5ee7a2;box-shadow:0 0 0 2px rgba(94,231,162,.13),0 12px 28px rgba(0,0,0,.16);background:linear-gradient(160deg,rgba(21,80,62,.7),rgba(8,29,42,.98))}.point-info-card.active small{color:#86efb5}.point-info-card.active>b,.point-info-card.active div>b{color:#91f1b9}

/* V59 Simulation RPG Foundation */
.sim-rpg-screen{max-width:1280px;margin:0 auto}.sim-rpg-shell{padding:10px;overflow:hidden}.rpg-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:8px}.rpg-head h2{margin:4px 0 2px}.rpg-head p{margin:0;color:var(--muted);font-size:11px}.rpg-head-status{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.rpg-head-status span{padding:6px 8px;border-radius:9px;background:#0a2230;border:1px solid #315268;font-size:9px}.rpg-viewport{position:relative;height:min(62vh,590px);min-height:420px;border-radius:16px;overflow:hidden;border:1px solid #355a70;background:#183d43;box-shadow:inset 0 0 60px rgba(0,0,0,.26)}.rpg-map{position:absolute;width:1600px;height:900px;left:0;top:0;transform:translate(0,0);transition:transform .08s linear;background-size:64px 64px}.rpg-viewport.zone-basecamp .rpg-map{background:linear-gradient(rgba(35,86,76,.15),rgba(27,71,66,.15)),repeating-linear-gradient(0deg,#426d55 0 63px,#4b765c 64px)}.rpg-viewport.zone-kampung .rpg-map{background:linear-gradient(rgba(84,67,35,.12),rgba(43,88,55,.16)),repeating-linear-gradient(90deg,#60825b 0 79px,#66885f 80px)}.rpg-viewport.zone-hutan .rpg-map{background:radial-gradient(circle at 20% 30%,rgba(56,116,65,.26),transparent 28%),radial-gradient(circle at 70% 55%,rgba(28,87,51,.4),transparent 33%),#244e35}.rpg-map:before{content:"";position:absolute;left:0;right:0;top:430px;height:110px;background:#997a50;opacity:.55;transform:rotate(-2deg)}.rpg-player,.rpg-npc{position:absolute;transform:translate(-50%,-85%);z-index:8;display:grid;justify-items:center;gap:2px;border:0;background:transparent;color:white;text-shadow:0 2px 5px #000;transition:left .08s linear,top .08s linear}.rpg-player{z-index:12;pointer-events:none}.rpg-player-sprite,.rpg-npc-portrait{width:76px;height:96px;display:grid;place-items:end center;filter:drop-shadow(0 7px 7px rgba(0,0,0,.45))}.rpg-player-sprite img,.rpg-npc-portrait img,.rpg-player-img img,.rpg-npc-img img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;object-position:center bottom}.rpg-player b,.rpg-npc b{font-size:10px;padding:2px 6px;border-radius:7px;background:rgba(3,16,21,.76)}.rpg-npc small{font-size:7px;padding:2px 5px;border-radius:7px;background:rgba(3,16,21,.72);color:#c9e2ec}.rpg-npc:hover .rpg-npc-portrait{transform:scale(1.07)}.rpg-npc.group-matabelo b{background:rgba(84,26,31,.87)}.rpg-npc.group-country b{background:rgba(43,53,97,.86)}.rpg-building,.rpg-warning{position:absolute;z-index:2;display:grid;justify-items:center;font-size:72px;filter:drop-shadow(0 9px 9px rgba(0,0,0,.26))}.rpg-building b,.rpg-warning b{font-size:12px;padding:4px 8px;background:#172832;border-radius:8px;color:white}.rpg-building.office{font-size:110px}.rpg-field{position:absolute;font-size:50px;letter-spacing:8px}.rpg-tree-cluster{position:absolute;font-size:65px;letter-spacing:-22px;z-index:1}.rpg-tree-cluster.t1{left:120px;top:170px}.rpg-tree-cluster.t2{left:850px;top:140px}.rpg-tree-cluster.t3{left:740px;top:690px}.rpg-creek{position:absolute;left:220px;top:0;width:130px;height:900px;background:linear-gradient(90deg,#215c83,#47a7c0,#215c83);opacity:.8;transform:rotate(8deg)}.rpg-river-line{position:absolute;left:60px;right:60px;top:80px;height:70px;border-radius:50%;background:#367d96;opacity:.7}.rpg-portal{position:absolute;z-index:15;padding:8px 11px;border:1px solid #6fa5be;border-radius:10px;background:#092230;color:#eaf8ff;font-weight:900}.rpg-portal.east{right:25px;top:445px}.rpg-portal.west{left:25px;top:445px}.rpg-hint{position:absolute;left:10px;top:10px;z-index:20;padding:6px 9px;border-radius:9px;background:rgba(4,18,26,.74);font-size:8px;color:#d5e9f2}.rpg-touch{display:none;position:absolute;z-index:30;left:12px;bottom:12px;width:126px;text-align:center}.rpg-touch>button,.rpg-touch div button{width:40px;height:40px;border-radius:12px;border:1px solid #5f8599;background:rgba(5,23,32,.78);color:#fff;font-weight:900;margin:1px}.rpg-touch div{display:flex;justify-content:center}.rpg-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}.compact-rpg-status{margin:10px 0;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.sim-rpg-legacy{padding:0;overflow:hidden}.sim-rpg-legacy>summary{padding:12px 14px;cursor:pointer;font-weight:900}.sim-rpg-legacy-grid{display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:10px;padding:0 12px 12px}.sim-rpg-legacy-grid section{padding:10px;border-radius:12px;background:#0a2230;border:1px solid #2c4c61}.sim-rpg-legacy-grid h3{margin:0 0 8px}.rpg-location-progress{display:grid;gap:5px}.rpg-location-progress span{display:flex;justify-content:space-between;font-size:9px}.rpg-dialogue{display:grid;grid-template-columns:110px 1fr;gap:14px;align-items:center}.rpg-dialogue-portrait{width:110px;height:145px;display:grid;place-items:end center;background:#0b2431;border-radius:14px;overflow:hidden}.rpg-dialogue-portrait img{max-width:100%;max-height:100%;object-fit:contain;object-position:center bottom}.rpg-dialogue p{font-size:14px;line-height:1.55;color:#dbe9ef}
@media(max-width:720px){.rpg-head{align-items:flex-start}.rpg-head-status{display:none}.rpg-viewport{height:58vh;min-height:430px}.rpg-touch{display:block}.rpg-hint{font-size:7px;max-width:180px}.rpg-player-sprite,.rpg-npc-portrait{width:68px;height:88px}.rpg-actions{display:grid;grid-template-columns:1fr 1fr}.rpg-actions .primary-btn{grid-column:1/-1}.sim-rpg-legacy-grid{grid-template-columns:1fr}.rpg-dialogue{grid-template-columns:82px 1fr}.rpg-dialogue-portrait{width:82px;height:112px}.rpg-dialogue p{font-size:12px}.compact-rpg-status{font-size:10px}.rpg-building.office{font-size:90px}}


/* === V59.1 Deck exclusivity, expedition chooser/results, Dewa passives === */
.guardian-card.deck-reserved{opacity:.48;filter:saturate(.55);cursor:not-allowed;position:relative}
.deck-reserved-chip{position:absolute;top:8px;left:8px;z-index:4;padding:5px 8px;border-radius:999px;background:rgba(5,17,29,.92);border:1px solid rgba(255,216,77,.55);color:#ffe88b;font-size:10px;font-weight:900;letter-spacing:.04em}
.expedition-deck-modal{min-width:min(860px,92vw)}
.expedition-deck-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.expedition-deck-choice{min-height:150px;text-align:left;padding:14px;border-radius:18px;border:1px solid rgba(120,170,210,.24);background:linear-gradient(160deg,rgba(11,35,55,.96),rgba(5,19,31,.98));color:#eefaff;display:grid;gap:8px}
.expedition-deck-choice.active{border-color:#20d7c5;box-shadow:0 0 0 2px rgba(32,215,197,.12)}
.expedition-deck-choice.incomplete{opacity:.48}
.expedition-deck-choice small{color:#83c8e9;font-weight:900;letter-spacing:.05em}.expedition-deck-choice b{font-size:14px;line-height:1.35}.expedition-deck-choice>span{color:#a8bfd0;font-size:12px}
.expedition-deck-portraits{display:flex;gap:7px;align-items:center;min-height:56px}.expedition-deck-mini{width:54px;height:54px;object-fit:contain;object-position:center bottom;border-radius:12px;background:rgba(255,255,255,.05)}
.expedition-result{display:grid;gap:14px}.expedition-reward-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.expedition-reward-grid>div{padding:13px;border-radius:15px;background:rgba(8,29,46,.82);border:1px solid rgba(95,156,194,.24);display:grid;gap:5px}.expedition-reward-grid small{color:#7fb7d2;font-weight:900}.expedition-reward-grid b{color:#f4fbff;font-size:15px}.expedition-reward-grid span{color:#a9bdca;font-size:12px;line-height:1.35}.expedition-result.win .expedition-reward-grid>div{border-color:rgba(32,215,197,.28)}.expedition-result.lose .expedition-reward-grid>div{border-color:rgba(255,178,77,.25)}
.god-passive-box{display:grid;grid-template-columns:auto 1fr;gap:12px;padding:14px;border-radius:16px;background:linear-gradient(135deg,rgba(255,210,73,.15),rgba(37,143,216,.10));border:1px solid rgba(255,216,77,.42);margin-bottom:12px}.god-passive-box>span{font-size:11px;font-weight:1000;color:#ffe27a;letter-spacing:.08em}.god-passive-box b{color:#fff6c8}.god-passive-box p{margin:4px 0 0;color:#d4e5ef;line-height:1.45}
.god-passive-strip{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:8px 0 10px}.god-passive-strip>span{padding:7px 10px;border-radius:999px;background:rgba(255,216,77,.09);border:1px solid rgba(255,216,77,.28);color:#f8f4d0;font-size:11px}.garuda-emergency-btn{padding:8px 11px;border-radius:999px;border:1px solid rgba(255,216,77,.68);background:linear-gradient(135deg,#6d4c00,#2b2100);color:#fff3ac;font-weight:900}
.garuda-swap-modal{min-width:min(900px,94vw)}.garuda-swap-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;max-height:54vh;overflow:auto;margin-top:14px}.garuda-swap-grid button{display:grid;gap:6px;padding:10px;border-radius:14px;background:rgba(8,28,44,.96);border:1px solid rgba(105,164,198,.25);color:#f1f8fc;text-align:center}.garuda-swap-grid button:hover{border-color:#ffd84d}.garuda-swap-art{width:100%;height:90px;object-fit:contain;object-position:center bottom}.garuda-swap-grid small{color:#9eb7c7}
@media(max-width:700px){.expedition-deck-grid{grid-template-columns:1fr}.expedition-reward-grid{grid-template-columns:1fr}.garuda-swap-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.expedition-deck-choice{min-height:132px}.expedition-deck-mini{width:48px;height:48px}.god-passive-strip{margin-top:6px}.god-passive-strip>span{font-size:10px}}

/* V59.3 — Expedition deck swipe chooser */
.expedition-deck-modal{max-width:760px;margin:auto}
.expedition-deck-carousel{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;padding:10px 8%;margin:8px -8%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.expedition-deck-carousel::-webkit-scrollbar{display:none}
.expedition-deck-slide{flex:0 0 84%;scroll-snap-align:center;min-height:300px;border:1px solid rgba(92,170,215,.28);border-radius:24px;background:linear-gradient(180deg,rgba(16,49,68,.98),rgba(8,31,45,.98));padding:22px;opacity:.62;transform:scale(.95);transition:.2s ease;box-shadow:0 12px 34px rgba(0,0,0,.22)}
.expedition-deck-slide.selected{opacity:1;transform:scale(1);border-color:#2bdac2;box-shadow:0 0 0 1px rgba(43,218,194,.22),0 16px 40px rgba(0,0,0,.28)}
.expedition-deck-slide.incomplete{border-style:dashed}
.expedition-deck-slide-head{display:flex;justify-content:space-between;gap:12px;align-items:center;color:#8fc8e8;font-weight:800;letter-spacing:.06em}
.expedition-deck-slide-head span{font-size:.8rem;letter-spacing:0;color:#d9f7ef}
.expedition-deck-slide h3{font-size:1.05rem;line-height:1.35;margin:16px 0 8px;color:#f4fbff}
.expedition-deck-slide p{margin:0;color:#a9c7d8}
.expedition-deck-slide .expedition-deck-portraits{min-height:118px;display:flex;align-items:end;justify-content:center;gap:8px;margin-top:12px}
.expedition-deck-slide .expedition-deck-mini{width:86px;height:86px;object-fit:contain;object-position:center bottom}
.expedition-ready-note,.expedition-incomplete-note{display:block;margin-top:18px;font-size:.84rem;color:#7ff0d5}
.expedition-incomplete-note{color:#f0bf72}
.expedition-deck-dots{display:flex;justify-content:center;gap:7px;margin:4px 0 10px}.expedition-deck-dots span{width:7px;height:7px;border-radius:999px;background:#36586b;transition:.18s}.expedition-deck-dots span.active{width:24px;background:#2bdac2}
.expedition-selected-caption{text-align:center;color:#b8d4e3;margin-bottom:4px}.expedition-selected-caption b{color:#fff}
.expedition-deck-modal+.modal-actions,.modal:has(.expedition-deck-modal) .modal-actions{position:sticky;bottom:0;z-index:5;background:linear-gradient(180deg,rgba(7,26,38,.1),rgba(7,26,38,.98) 28%);padding-top:20px}
@media(max-width:600px){.modal:has(.expedition-deck-modal){width:min(94vw,760px);max-height:88vh;overflow:auto;padding:18px 14px 14px}.expedition-deck-modal h2{font-size:1.55rem}.expedition-deck-modal>p{font-size:.95rem;line-height:1.45}.expedition-deck-carousel{padding:8px 5%;margin:4px -5%}.expedition-deck-slide{flex-basis:90%;min-height:280px;padding:18px}.expedition-deck-slide .expedition-deck-mini{width:74px;height:74px}.modal:has(.expedition-deck-modal) .modal-actions{display:grid;grid-template-columns:.8fr 1.2fr;gap:10px}.modal:has(.expedition-deck-modal) .modal-actions button{min-height:52px}}

/* V59.9.1 — Build Deck release control */
.guardian-popup-actions .danger-btn{min-height:48px}
.guardian-popup-actions .deck-release-note{display:block;width:100%;color:#9fb9c9;line-height:1.45;margin-top:2px}
.guardian-slot-choice button.empty,.active-guardian-order button.empty{border-style:dashed;opacity:.92}
.guardian-slot-choice button:disabled,.active-guardian-order button:disabled{opacity:.38;cursor:not-allowed}
@media(max-width:600px){.guardian-popup-actions{display:grid;grid-template-columns:1fr;gap:10px}.guardian-popup-actions button{width:100%}}

/* V59.12 PvP */
.pvp-stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin:14px 0}.pvp-stat-grid article{padding:12px;border-radius:14px;border:1px solid #31536d;background:#091f2e;text-align:center}.pvp-stat-grid small{display:block;font-size:9px;color:#85aabc}.pvp-stat-grid b{font-size:25px}.pvp-community-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}.pvp-community-grid>section{padding:12px;border:1px solid #31536d;border-radius:16px;background:#081d2b}.pvp-online-list,.pvp-live-list{display:grid;gap:6px;max-height:160px;overflow:auto}.pvp-online-list span,.pvp-live-list button{display:flex;justify-content:space-between;gap:8px;padding:8px 9px;border-radius:10px;background:#0e2a3d;border:1px solid #284c62;color:#eaf8ff;text-align:left}.pvp-emote-bar{display:flex;align-items:center;justify-content:center;gap:6px;margin:8px 0}.pvp-emote-bar button{font-size:20px;padding:5px 8px;border-radius:10px}.pvp-emote-feed{display:flex;justify-content:center;gap:6px;min-height:24px;flex-wrap:wrap}.pvp-emote-feed span{font-size:10px;padding:4px 7px;border-radius:999px;background:#102d3e}.spectator-badge{padding:6px 10px;border-radius:999px;background:#3d2f0c;border:1px solid #d6a52c;font-size:10px;font-weight:900}.online-battle .avatar-circle img{width:100%;height:100%;object-fit:contain;border-radius:50%}@media(max-width:720px){.pvp-stat-grid{grid-template-columns:repeat(2,1fr)}.pvp-community-grid{grid-template-columns:1fr}}


/* =========================================================
   RIMBA V59.13 — BATTLE VISUAL OVERHAUL
   Lightweight CSS arena + living Guardian projection
   ========================================================= */
.battle-shell{position:relative;overflow:hidden;isolation:isolate;background-size:cover!important;background-position:center!important}
.battle-shell>.battle{position:relative;z-index:3}
.arena-ambience{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden;transition:opacity .6s ease,filter .8s ease}
.arena-ambience:before,.arena-ambience:after{content:"";position:absolute;inset:-8%;transition:background .8s ease,transform 1.2s ease;will-change:transform}
.arena-ambience:before{opacity:.82;background:radial-gradient(circle at 18% 28%,rgba(255,255,255,.12),transparent 18%),radial-gradient(circle at 78% 15%,rgba(255,255,255,.07),transparent 22%)}
.arena-ambience:after{top:auto;height:48%;background:linear-gradient(180deg,transparent,rgba(0,0,0,.48))}
.arena-ambience em{position:absolute;right:18px;bottom:12px;padding:5px 10px;border:1px solid rgba(255,255,255,.15);border-radius:999px;background:rgba(3,14,21,.45);backdrop-filter:blur(7px);color:rgba(230,247,255,.7);font-size:9px;font-style:normal;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.arena-mist{position:absolute;left:-20%;bottom:9%;width:140%;height:26%;opacity:.22;background:radial-gradient(ellipse at center,rgba(220,245,255,.42),transparent 62%);filter:blur(16px);animation:arenaMist 12s ease-in-out infinite alternate}
.arena-particles{position:absolute;inset:0;opacity:.45;background-image:radial-gradient(circle,rgba(188,255,202,.65) 0 1px,transparent 1.5px),radial-gradient(circle,rgba(255,255,255,.38) 0 1px,transparent 1.3px);background-size:76px 76px,117px 117px;background-position:0 0,30px 40px;animation:arenaParticles 18s linear infinite}

/* Base locations. Domain classes remain stronger and can override the ambience. */
.battle-shell.arena-forest{background:linear-gradient(rgba(3,18,15,.28),rgba(2,10,15,.76)),radial-gradient(circle at 50% 35%,#245c42 0,#12382e 38%,#06141a 100%)!important}
.battle-shell.arena-forest .arena-ambience:before{background:linear-gradient(100deg,transparent 0 12%,rgba(20,55,40,.85) 13% 16%,transparent 17% 32%,rgba(15,48,33,.72) 33% 36%,transparent 37%),radial-gradient(ellipse at 30% 14%,rgba(77,150,91,.55),transparent 28%),radial-gradient(ellipse at 76% 9%,rgba(75,142,85,.50),transparent 30%)}
.battle-shell.arena-river{background:linear-gradient(rgba(5,26,34,.18),rgba(2,11,18,.76)),radial-gradient(circle at 50% 25%,#277e88 0,#164b61 35%,#071a27 100%)!important}
.battle-shell.arena-river .arena-ambience:after{background:repeating-radial-gradient(ellipse at 50% 120%,rgba(123,220,235,.15) 0 2px,transparent 3px 22px),linear-gradient(180deg,transparent 15%,rgba(5,47,67,.55))}
.battle-shell.arena-village{background:linear-gradient(rgba(23,29,25,.20),rgba(7,13,18,.76)),radial-gradient(circle at 50% 20%,#846d43 0,#3f4b3c 42%,#101a1e 100%)!important}
.battle-shell.arena-village .arena-ambience:before{background:linear-gradient(115deg,transparent 0 21%,rgba(18,29,25,.72) 22% 25%,transparent 26% 59%,rgba(28,35,28,.62) 60% 65%,transparent 66%),radial-gradient(circle at 52% 18%,rgba(255,220,145,.26),transparent 16%)}
.battle-shell.arena-peat{background:linear-gradient(rgba(45,25,13,.25),rgba(12,10,12,.82)),radial-gradient(circle at 50% 38%,#73512d 0,#3c2c24 42%,#150f15 100%)!important}
.battle-shell.arena-peat .arena-mist{opacity:.38;background:radial-gradient(ellipse,rgba(210,186,155,.38),transparent 65%)}
.battle-shell.arena-city{background:linear-gradient(rgba(12,23,31,.18),rgba(4,10,17,.82)),radial-gradient(circle at 50% 24%,#36556b 0,#1c3346 40%,#07131e 100%)!important}
.battle-shell.arena-city .arena-ambience:before{background:repeating-linear-gradient(90deg,transparent 0 8%,rgba(54,85,105,.20) 8.5% 11%,transparent 11.5% 18%),linear-gradient(180deg,transparent 0 42%,rgba(8,17,25,.55) 43%)}
.battle-shell.arena-island{background:linear-gradient(rgba(5,33,33,.12),rgba(3,13,21,.74)),radial-gradient(circle at 50% 25%,#418d87 0,#24666e 38%,#092131 100%)!important}
.battle-shell.arena-island .arena-ambience:after{background:linear-gradient(180deg,transparent 20%,rgba(9,62,73,.28) 55%,rgba(7,31,48,.65)),repeating-radial-gradient(ellipse at 50% 110%,rgba(188,251,245,.12) 0 2px,transparent 3px 28px)}
.battle-shell.arena-mine{background:linear-gradient(rgba(54,45,22,.24),rgba(12,12,14,.84)),radial-gradient(circle at 50% 35%,#74663b 0,#3f3928 42%,#16171b 100%)!important}
.battle-shell.arena-palm{background:linear-gradient(rgba(27,48,18,.22),rgba(8,14,13,.82)),radial-gradient(circle at 50% 35%,#59783b 0,#304929 42%,#0d1918 100%)!important}

/* A living projection of every Guardian floats above its card artwork. */
.unit-art{position:relative;overflow:visible!important;isolation:isolate}
.unit-art>.battle-unit-image,.unit-art>.unit-icon-art{position:relative;z-index:3}
.guardian-spirit{position:absolute;z-index:2;left:50%;top:-23px;width:58px;height:58px;transform:translateX(-50%);pointer-events:none;filter:drop-shadow(0 0 10px rgba(123,225,255,.25));animation:spiritFloat 3.8s ease-in-out infinite}
.guardian-spirit:after{content:"";position:absolute;left:12%;right:12%;bottom:3px;height:10px;border-radius:50%;background:rgba(93,218,255,.20);filter:blur(6px)}
.guardian-spirit-orb{position:absolute;inset:0;display:grid;place-items:center;border-radius:50%;overflow:hidden;opacity:.62;transform:scale(.82);background:radial-gradient(circle,rgba(184,247,255,.18),rgba(72,190,220,.06) 55%,transparent 72%);mix-blend-mode:screen}
.guardian-spirit-orb img{width:100%;height:100%;object-fit:contain;filter:saturate(1.18) brightness(1.22);mask-image:radial-gradient(circle,#000 45%,transparent 72%)}
.guardian-spirit-orb span{font-size:37px;filter:saturate(1.2) brightness(1.25)}
.unit-card:hover:not(.dead) .guardian-spirit{filter:drop-shadow(0 0 15px rgba(138,239,255,.52))}

/* Actor / target motion */
.unit-card.live-actor .guardian-spirit{animation:spiritCharge .95s cubic-bezier(.2,.8,.2,1) both}
.unit-card.live-actor.live-attack,.unit-card.live-actor.live-slash{animation:unitLunge .78s cubic-bezier(.18,.84,.22,1)}
.unit-card.live-actor.live-heal,.unit-card.live-actor.live-buff,.unit-card.live-actor.live-shield{animation:unitCast .9s ease}
.unit-card.live-target.live-attack,.unit-card.live-target.live-hit,.unit-card.live-target.live-ko{animation:unitImpact .72s ease}
.unit-card.live-target.live-heal,.unit-card.live-target.live-buff{animation:unitBless .85s ease}
.unit-card.live-target.live-shield{animation:unitGuard .85s ease}

.unit-reactive-fx{position:absolute;z-index:8;inset:-7px;display:grid;place-items:center;pointer-events:none;border-radius:16px;overflow:visible}
.unit-reactive-fx i{position:absolute;inset:8%;border:2px solid rgba(255,255,255,.55);border-radius:50%;animation:fxRing .78s ease-out forwards}
.unit-reactive-fx b{font-size:28px;text-shadow:0 0 14px currentColor;animation:fxGlyph .78s ease-out forwards}
.unit-reactive-fx.fx-heal,.unit-reactive-fx.fx-buff{color:#6dffad}.unit-reactive-fx.fx-shield{color:#6fc8ff}.unit-reactive-fx.fx-poison{color:#c27aff}.unit-reactive-fx.fx-stun{color:#ffe66a}.unit-reactive-fx.fx-ko{color:#ff6073}.unit-reactive-fx.fx-attack,.unit-reactive-fx.fx-hit{color:#ff8a75}
.unit-reactive-fx.fx-heal i,.unit-reactive-fx.fx-buff i{border-color:#6dffad}.unit-reactive-fx.fx-shield i{border-color:#6fc8ff}.unit-reactive-fx.fx-poison i{border-color:#c27aff}.unit-reactive-fx.fx-attack i,.unit-reactive-fx.fx-hit i,.unit-reactive-fx.fx-ko i{border-color:#ff7a6a}

@keyframes spiritFloat{0%,100%{transform:translate(-50%,0) scale(.92);opacity:.72}50%{transform:translate(-50%,-7px) scale(1);opacity:.92}}
@keyframes spiritCharge{0%{transform:translate(-50%,0) scale(.85);opacity:.6}35%{transform:translate(-50%,-12px) scale(1.22);opacity:1;filter:brightness(1.6)}100%{transform:translate(-50%,-3px) scale(.96);opacity:.78}}
@keyframes unitLunge{0%,100%{transform:translateX(0) scale(1)}35%{transform:translateY(-7px) scale(1.04)}55%{transform:translateY(3px) scale(1.01)}}
@keyframes unitImpact{0%,100%{transform:translate(0)}15%{transform:translate(-5px,2px)}30%{transform:translate(7px,-1px)}45%{transform:translate(-4px,1px)}60%{transform:translate(3px,0)}}
@keyframes unitCast{0%,100%{filter:brightness(1)}45%{filter:brightness(1.45) saturate(1.35);box-shadow:0 0 28px rgba(93,209,255,.34)}}
@keyframes unitBless{0%,100%{filter:brightness(1)}40%{filter:brightness(1.5);box-shadow:0 0 30px rgba(91,255,164,.38)}}
@keyframes unitGuard{0%,100%{filter:brightness(1)}35%{filter:brightness(1.35);box-shadow:0 0 0 5px rgba(94,196,255,.18),0 0 30px rgba(94,196,255,.30)}}
@keyframes fxRing{0%{transform:scale(.35);opacity:0}35%{opacity:1}100%{transform:scale(1.35);opacity:0}}
@keyframes fxGlyph{0%{transform:translateY(12px) scale(.5);opacity:0}35%{opacity:1}100%{transform:translateY(-28px) scale(1.15);opacity:0}}
@keyframes arenaMist{0%{transform:translateX(-5%) scale(1)}100%{transform:translateX(7%) scale(1.08)}}
@keyframes arenaParticles{from{background-position:0 0,30px 40px}to{background-position:76px 152px,147px 274px}}

/* Domain makes the whole arena react, not just the banner. */
.battle-shell[class*="domain-"] .arena-ambience{filter:saturate(1.22) contrast(1.06)}
.battle-shell.domain-fire .arena-particles{background-image:radial-gradient(circle,#ffb04a 0 1.5px,transparent 2px),radial-gradient(circle,#ff6954 0 1px,transparent 1.5px);animation-duration:5s}
.battle-shell.domain-flood .arena-mist,.battle-shell.domain-river .arena-mist{opacity:.38;filter:blur(9px)}
.battle-shell.domain-smog .arena-mist,.battle-shell.domain-industrial .arena-mist{opacity:.52;background:radial-gradient(ellipse,rgba(158,135,160,.48),transparent 64%)}

@media(max-width:720px){
  .guardian-spirit{width:43px;height:43px;top:-15px}.guardian-spirit-orb span{font-size:29px}
  .arena-ambience em{right:8px;bottom:6px;font-size:7px;padding:3px 7px}
  .unit-reactive-fx b{font-size:22px}
}
@media(prefers-reduced-motion:reduce){.guardian-spirit,.arena-mist,.arena-particles,.unit-card.live-actor,.unit-card.live-target,.unit-reactive-fx i,.unit-reactive-fx b{animation:none!important}}


/* V59.14 Expedition Map Overhaul */
.expedition-world-panel{margin:18px 0 22px;padding:18px;border:1px solid rgba(130,210,255,.12);background:linear-gradient(180deg,rgba(8,24,39,.92),rgba(11,26,35,.98));overflow:hidden}
.expedition-world-header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;flex-wrap:wrap;margin-bottom:14px}
.expedition-world-header h2{margin:.35rem 0 .4rem;font-size:clamp(1.15rem,2vw,1.55rem)}
.expedition-world-header p{margin:0;color:var(--muted);max-width:760px;line-height:1.45}
.expedition-world-stats{display:grid;grid-template-columns:repeat(3,minmax(110px,1fr));gap:10px;min-width:min(100%,360px)}
.expedition-world-stats>div{padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.06)}
.expedition-world-stats small{display:block;color:var(--muted);margin-bottom:4px}
.expedition-world-stats b{font-size:1.05rem}
.expedition-world-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(280px,.85fr);gap:16px;align-items:start}
.expedition-world-map{position:relative}
.expedition-map-stack{position:relative;aspect-ratio:16/9;border-radius:22px;overflow:hidden;background:linear-gradient(180deg,#0a2238,#06131f);border:1px solid rgba(255,255,255,.08);box-shadow:0 16px 42px rgba(0,0,0,.28)}
.expedition-map-layer{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;user-select:none;pointer-events:none}
.map-base-before,.map-base-after{animation:mapBreath 10s ease-in-out infinite}
.map-water{mix-blend-mode:screen;animation:waterDrift 20s linear infinite}
.map-sun{width:26%;height:auto;inset:auto auto 6% 1.5%;animation:sunPulse 9s ease-in-out infinite;opacity:.35}
.map-clouds{mix-blend-mode:screen;animation:cloudDrift 30s linear infinite}
.map-rain{mix-blend-mode:screen;animation:rainSlide 2.3s linear infinite}
.map-smoke{mix-blend-mode:screen;animation:smokeDrift 16s ease-in-out infinite}
.map-fire{mix-blend-mode:screen;animation:firePulse 3s ease-in-out infinite}
.map-heal{mix-blend-mode:screen;animation:healFlow 7s ease-in-out infinite}
.expedition-map-highlight,.expedition-player-marker,.expedition-node{position:absolute;transform:translate(-50%,-50%);z-index:4}
.expedition-map-highlight{width:72px;height:72px;border-radius:999px;border:2px solid rgba(112,255,168,.92);background:radial-gradient(circle,rgba(112,255,168,.28),rgba(112,255,168,0));box-shadow:0 0 0 10px rgba(112,255,168,.08),0 0 28px rgba(112,255,168,.28);animation:focusRing 2.8s ease-in-out infinite;pointer-events:none}
.expedition-player-marker{display:flex;flex-direction:column;align-items:center;gap:2px;z-index:6}
.expedition-player-marker span{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:linear-gradient(180deg,#ffe78a,#ffab36);box-shadow:0 10px 22px rgba(0,0,0,.32);border:2px solid rgba(255,255,255,.92);font-size:1.05rem;animation:playerBob 2.2s ease-in-out infinite}
.expedition-player-marker small{padding:4px 8px;border-radius:999px;background:rgba(2,10,17,.78);font-size:.67rem;color:#fff;border:1px solid rgba(255,255,255,.12);white-space:nowrap}
.expedition-node{background:none;border:none;padding:0;cursor:pointer;z-index:5}
.expedition-node-ping{position:absolute;left:50%;top:50%;width:44px;height:44px;border-radius:50%;transform:translate(-50%,-50%);background:radial-gradient(circle,rgba(110,190,255,.28),rgba(110,190,255,0));animation:focusRing 3.4s ease-out infinite}
.expedition-node-core{display:grid;place-items:center;position:relative;width:38px;height:38px;border-radius:50%;background:rgba(4,18,29,.88);border:2px solid rgba(255,255,255,.9);box-shadow:0 10px 20px rgba(0,0,0,.26);font-size:1rem}
.expedition-node.current .expedition-node-core{background:linear-gradient(180deg,#15385d,#0c1621);border-color:#ffd55a}
.expedition-node.focus .expedition-node-core{background:linear-gradient(180deg,#10452c,#0f2218);border-color:#79ff9b}
.expedition-node-label{position:absolute;left:50%;top:calc(100% + 8px);transform:translateX(-50%);display:flex;flex-direction:column;gap:2px;min-width:116px;max-width:146px;padding:7px 9px;border-radius:12px;background:rgba(3,11,18,.82);border:1px solid rgba(255,255,255,.08);box-shadow:0 10px 20px rgba(0,0,0,.22);text-align:center;opacity:0;pointer-events:none;transition:.2s ease;font-size:.68rem;color:#dfefff;backdrop-filter:blur(5px)}
.expedition-node-label b{font-size:.72rem;line-height:1.15}
.expedition-node:hover .expedition-node-label,.expedition-node.focus .expedition-node-label,.expedition-node.current .expedition-node-label{opacity:1;transform:translateX(-50%) translateY(0)}
.expedition-node:hover .expedition-node-core,.expedition-node.focus .expedition-node-core,.expedition-node.current .expedition-node-core{transform:scale(1.06)}
.expedition-map-legend{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px;font-size:.76rem;color:var(--muted)}
.expedition-map-legend span{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.04)}
.expedition-map-legend .sw{width:12px;height:12px;border-radius:999px;display:inline-block}
.expedition-map-legend .before{background:#cb6a49}.expedition-map-legend .after{background:#71d885}.expedition-map-legend .player{background:#ffcb57}.expedition-map-legend .task{background:#5ce39e}
.expedition-focus-card{padding:16px;border-radius:18px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);display:flex;flex-direction:column;gap:12px}
.expedition-focus-card h3{margin:0;font-size:1.2rem}
.expedition-focus-card p{margin:0;line-height:1.45}
.expedition-progress-pair{display:grid;gap:12px}
.expedition-progress-pair small{display:block;color:var(--muted);margin-bottom:5px}
.expedition-progress-pair b{display:block;margin-top:6px}
.expedition-progress-bar{height:11px;background:rgba(255,255,255,.08);border-radius:999px;overflow:hidden}
.expedition-progress-bar span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#4fd0ff,#6aff9f)}
.expedition-progress-bar.secondary span{background:linear-gradient(90deg,#ffc14d,#ffe98d)}
.expedition-side-note{padding:12px 13px;border-radius:14px;background:rgba(4,10,18,.52);border:1px solid rgba(255,255,255,.06)}
.expedition-side-note p{margin-top:6px}
.expedition-mini-stage-row{display:flex;flex-wrap:wrap;gap:8px}
.expedition-mini-stage{border:none;border-radius:999px;padding:7px 12px;background:rgba(255,255,255,.07);color:#fff;cursor:pointer;font-weight:700}
.expedition-mini-stage.done{background:rgba(94,207,131,.2);color:#a9ffbe}
.expedition-mini-stage.current{background:rgba(90,179,255,.22);color:#b9deff}
.expedition-side-actions{display:flex;gap:10px;flex-wrap:wrap}
.expedition-side-actions .secondary-btn,.expedition-side-actions .primary-btn{flex:1 1 160px}
.expedition-tips-box{padding:12px 13px;border-radius:14px;background:rgba(3,17,29,.58);border:1px dashed rgba(125,215,255,.25);color:#d9f1ff}
.expedition-tips-box p{margin-top:6px;color:var(--muted)}
.expedition-map-selector{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.expedition-loc-chip{display:flex;align-items:center;gap:7px;border:none;border-radius:999px;padding:8px 12px;background:rgba(255,255,255,.06);color:#fff;cursor:pointer;font-weight:700}
.expedition-loc-chip small{opacity:.8;font-weight:600}
.expedition-loc-chip.active{background:linear-gradient(90deg,rgba(80,195,255,.22),rgba(98,255,171,.18));outline:1px solid rgba(123,233,255,.32)}
@keyframes waterDrift{0%{transform:translate3d(-1.2%,0,0) scale(1.03)}50%{transform:translate3d(1.4%,1%,0) scale(1.06)}100%{transform:translate3d(-1.2%,0,0) scale(1.03)}}
@keyframes cloudDrift{0%{transform:translate3d(-2%,0,0) scale(1.02)}50%{transform:translate3d(2.2%,1.1%,0) scale(1.04)}100%{transform:translate3d(-2%,0,0) scale(1.02)}}
@keyframes rainSlide{0%{transform:translateY(-4%)}100%{transform:translateY(4%)}}
@keyframes smokeDrift{0%{transform:translate3d(-1%,0,0) scale(1.02)}50%{transform:translate3d(1.4%,-1%,0) scale(1.04)}100%{transform:translate3d(-1%,0,0) scale(1.02)}}
@keyframes firePulse{0%,100%{transform:scale(1);filter:saturate(1)}50%{transform:scale(1.03);filter:saturate(1.1)}}
@keyframes healFlow{0%{transform:translate3d(-1%,0,0) scale(1.02);filter:saturate(.95)}50%{transform:translate3d(1%,0,0) scale(1.04);filter:saturate(1.08)}100%{transform:translate3d(-1%,0,0) scale(1.02);filter:saturate(.95)}}
@keyframes sunPulse{0%,100%{transform:scale(1);filter:drop-shadow(0 0 10px rgba(255,230,122,.35))}50%{transform:scale(1.06);filter:drop-shadow(0 0 22px rgba(255,230,122,.48))}}
@keyframes focusRing{0%{box-shadow:0 0 0 0 rgba(112,255,168,.28)}70%{box-shadow:0 0 0 18px rgba(112,255,168,0)}100%{box-shadow:0 0 0 0 rgba(112,255,168,0)}}
@keyframes playerBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@keyframes mapBreath{0%,100%{transform:scale(1)}50%{transform:scale(1.01)}}
@media (max-width:1100px){.expedition-world-layout{grid-template-columns:1fr}.expedition-world-stats{width:100%}.expedition-node-label{opacity:1;font-size:.65rem;min-width:92px;max-width:118px}}
@media (max-width:760px){.expedition-world-panel{padding:14px}.expedition-world-stats{grid-template-columns:repeat(2,minmax(120px,1fr))}.expedition-node-label{display:none}.expedition-player-marker small{display:none}.map-sun{width:34%}.expedition-map-highlight{width:58px;height:58px}.expedition-map-legend{font-size:.7rem}.expedition-side-actions .secondary-btn,.expedition-side-actions .primary-btn{flex:1 1 100%}.expedition-loc-chip{font-size:.76rem;padding:7px 10px}}


/* V59.15 Expedition Menu Refinement */
.home-expedition-tease{margin-top:18px;display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.home-expedition-tease h2{margin:.35rem 0}.home-expedition-tease p{margin:0;color:var(--muted);max-width:760px;line-height:1.5}
.expedition-screen-shell{display:block}.expedition-world-header-standalone{margin-bottom:18px}.expedition-mini-stage-grid{max-height:240px;overflow:auto;padding-right:4px}.expedition-mini-stage.selected{outline:1px solid rgba(118,223,255,.55);background:rgba(97,193,255,.18);color:#d9efff}.expedition-mini-stage.locked{opacity:.7;background:rgba(255,255,255,.04)}
.expedition-enemy-card{display:grid;grid-template-columns:74px 1fr;gap:12px;align-items:center;padding:12px 13px;border-radius:16px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.08)}
.expedition-enemy-card.locked{opacity:.8}.expedition-enemy-avatar{width:74px;height:74px;border-radius:16px;overflow:hidden;background:rgba(0,0,0,.25)}
.expedition-enemy-card h4{margin:4px 0 4px;font-size:1rem}.expedition-enemy-card p{margin:0 0 4px}.expedition-enemy-card small{color:var(--muted)}
.expedition-stage-extra{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.expedition-stage-extra>div{padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.06)}
.expedition-stage-extra small{display:block;color:var(--muted);margin-bottom:4px}.expedition-stage-extra b{font-size:.95rem;line-height:1.3}
.expedition-contribution-box{padding:12px 13px;border-radius:14px;background:rgba(24,84,54,.2);border:1px solid rgba(121,255,155,.18)}
.expedition-contribution-box p{margin:6px 0 0;line-height:1.45;color:#dfefff}
@media (max-width:760px){.home-expedition-tease{align-items:flex-start}.expedition-stage-extra{grid-template-columns:1fr}.expedition-enemy-card{grid-template-columns:60px 1fr}.expedition-enemy-avatar{width:60px;height:60px}}


/* V59.16 Battle FX Layer Overhaul */
.battle-shell{--battle-focus-x:50%;--battle-focus-y:50%;--battle-progress:0}
.battle-map-backdrop{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden;isolation:isolate}
.battle-map-base,.battle-map-overlay,.battle-map-spotlight{position:absolute;inset:-8%;background-repeat:no-repeat;background-size:170% auto;background-position:var(--battle-focus-x) var(--battle-focus-y);will-change:transform,opacity}
.battle-map-base.before{background-image:url('assets/expedition-map/before-damaged.png');filter:blur(1px) saturate(.86) brightness(.42);transform:scale(1.18)}
.battle-map-base.after{background-image:url('assets/expedition-map/after-restored.png');filter:blur(1px) saturate(1.05) brightness(.46);transform:scale(1.2)}
.battle-map-overlay{mix-blend-mode:screen;opacity:.22}
.battle-map-water{background-image:url('assets/expedition-map/water-flow-overlay.png');animation:battleWaterDrift 18s linear infinite;filter:blur(.2px) brightness(.95)}
.battle-map-sun{background-image:url('assets/expedition-map/sun-overlay.png');background-size:46% auto;background-position:left 2% top 3%;animation:battleSunPulse 9s ease-in-out infinite}
.battle-map-clouds{background-image:url('assets/expedition-map/clouds-overlay.png');animation:battleCloudDrift 28s linear infinite;opacity:.28}
.battle-map-rain{background-image:url('assets/expedition-map/rain-overlay.png');animation:battleRainSlide 2.2s linear infinite;opacity:.14}
.battle-map-smoke{background-image:url('assets/expedition-map/smoke-overlay.png');animation:battleSmokeDrift 14s ease-in-out infinite;opacity:.18}
.battle-map-fire{background-image:url('assets/expedition-map/wildfire-overlay.png');animation:battleFirePulse 3.2s ease-in-out infinite;opacity:.12}
.battle-map-spotlight{inset:0;background:radial-gradient(circle at var(--battle-focus-x) var(--battle-focus-y),rgba(255,255,255,.12),rgba(255,255,255,.02) 18%,rgba(0,0,0,.28) 44%,rgba(0,0,0,.68) 88%);mix-blend-mode:normal}
.battle-shell>.battle,.battle-shell>.arena-ambience{position:relative;z-index:3}
.unit-art{position:relative;overflow:visible}
.unit-aura-layer{position:absolute;inset:-4px;pointer-events:none;z-index:1}
.unit-aura{position:absolute;inset:0;pointer-events:none}
.unit-aura:before,.unit-aura:after{content:"";position:absolute;pointer-events:none}
.aura-leaf:before{inset:10% 8% 14% 8%;background:
 radial-gradient(circle at 14% 26%,rgba(112,255,132,.95) 0 4px,transparent 5px),
 radial-gradient(circle at 83% 22%,rgba(140,255,150,.95) 0 3px,transparent 4px),
 radial-gradient(circle at 22% 74%,rgba(120,255,142,.95) 0 3px,transparent 4px),
 radial-gradient(circle at 76% 72%,rgba(170,255,181,.95) 0 4px,transparent 5px),
 radial-gradient(circle at 50% 16%,rgba(104,238,122,.92) 0 3px,transparent 4px);
 filter:drop-shadow(0 0 8px rgba(122,255,140,.25));animation:leafOrbit 5s linear infinite}
.aura-leaf:after{left:50%;top:50%;width:72%;height:72%;transform:translate(-50%,-50%);border-radius:50%;border:1px solid rgba(120,255,145,.18);box-shadow:0 0 18px rgba(120,255,145,.12) inset;animation:softSpin 9s linear infinite}
.aura-root:before{left:50%;bottom:0;width:76%;height:45%;transform:translateX(-50%);background:repeating-linear-gradient(115deg,transparent 0 7%,rgba(171,255,130,.0) 7% 8%,transparent 8% 18%),linear-gradient(180deg,rgba(130,255,140,.0),rgba(130,255,140,.0));border-bottom-left-radius:50% 70%;border-bottom-right-radius:50% 70%;box-shadow:0 12px 0 -8px rgba(155,255,139,.18);filter:drop-shadow(0 0 10px rgba(155,255,139,.18));animation:rootPulse 3.4s ease-in-out infinite}
.aura-root:after{left:18%;right:18%;bottom:6px;height:16px;border-radius:50%;background:radial-gradient(ellipse,rgba(175,255,146,.26),transparent 70%);animation:groundPulse 3s ease-in-out infinite}
.aura-water:before{inset:18% 10% 12% 10%;background:radial-gradient(circle at 20% 70%,rgba(98,220,255,.95) 0 6px,transparent 7px),radial-gradient(circle at 72% 68%,rgba(130,230,255,.95) 0 5px,transparent 6px),radial-gradient(circle at 52% 20%,rgba(132,238,255,.82) 0 3px,transparent 4px);animation:waterSplash 3.5s ease-in-out infinite}
.aura-water:after{left:7%;right:7%;bottom:10%;height:22%;border-radius:50%;border-bottom:2px solid rgba(110,220,255,.65);border-top:2px solid rgba(110,220,255,.18);filter:drop-shadow(0 0 8px rgba(106,220,255,.24));animation:waterWave 2.6s ease-in-out infinite}
.aura-dust:before{inset:18% 14% 18% 14%;background:radial-gradient(circle at 26% 66%,rgba(208,171,112,.65) 0 7px,transparent 8px),radial-gradient(circle at 64% 72%,rgba(199,161,102,.58) 0 6px,transparent 7px),radial-gradient(circle at 58% 28%,rgba(218,180,120,.45) 0 4px,transparent 5px);animation:dustRise 4s ease-in-out infinite}
.aura-dust:after{left:8%;right:8%;bottom:8%;height:16%;border-radius:50%;background:radial-gradient(ellipse,rgba(176,141,97,.30),transparent 72%);animation:groundPulse 3s ease-in-out infinite}
.aura-fire:before{left:20%;right:20%;bottom:8%;height:58%;background:radial-gradient(circle at 50% 100%,rgba(255,189,90,.0) 14%,transparent 16%),linear-gradient(180deg,rgba(255,124,58,.0),rgba(255,124,58,.95));clip-path:polygon(10% 100%,22% 64%,32% 79%,44% 30%,55% 70%,69% 16%,80% 66%,90% 100%);filter:drop-shadow(0 0 12px rgba(255,125,76,.35));animation:fireFlicker 1.45s ease-in-out infinite}
.aura-fire:after{left:14%;right:14%;bottom:6%;height:16%;border-radius:50%;background:radial-gradient(ellipse,rgba(255,139,74,.32),transparent 72%);animation:groundPulse 2s ease-in-out infinite}
.aura-smoke:before{inset:8% 12% 24% 12%;background:radial-gradient(circle at 28% 72%,rgba(155,161,170,.30) 0 10px,transparent 11px),radial-gradient(circle at 62% 42%,rgba(137,145,158,.34) 0 12px,transparent 13px),radial-gradient(circle at 72% 72%,rgba(155,138,174,.28) 0 9px,transparent 10px);filter:blur(2px);animation:smokeLift 5.5s ease-in-out infinite}
.aura-smoke:after{left:16%;right:16%;bottom:10%;height:20%;border-radius:50%;background:radial-gradient(ellipse,rgba(92,99,110,.18),transparent 70%)}
.aura-poison:before{inset:14% 14% 18% 14%;background:radial-gradient(circle at 25% 62%,rgba(177,103,255,.72) 0 7px,transparent 8px),radial-gradient(circle at 68% 35%,rgba(199,108,255,.7) 0 6px,transparent 7px),radial-gradient(circle at 74% 71%,rgba(135,62,220,.62) 0 5px,transparent 6px);filter:blur(1px);animation:poisonBubble 4.2s ease-in-out infinite}
.aura-poison:after{left:24%;top:14%;width:52%;height:52%;border-radius:50%;border:1px dashed rgba(198,122,255,.34);animation:softSpin 8s linear infinite}
.aura-sun:before{left:50%;top:10%;width:62%;height:62%;transform:translateX(-50%);border-radius:50%;background:radial-gradient(circle,rgba(255,240,154,.20),rgba(255,240,154,.04) 55%,transparent 72%);filter:drop-shadow(0 0 15px rgba(255,234,120,.28));animation:sunGlow 3s ease-in-out infinite}
.aura-sun:after{left:50%;top:50%;width:80%;height:80%;transform:translate(-50%,-50%);border-radius:50%;border:1px solid rgba(255,236,140,.22);animation:softSpin 9s linear infinite reverse}
.unit-card.scene-attacker .unit-aura-layer,.unit-card.live-actor .unit-aura-layer{filter:brightness(1.08) saturate(1.12)}
.unit-card.scene-target .unit-aura-layer,.unit-card.live-target .unit-aura-layer{filter:brightness(1.15)}
@keyframes battleWaterDrift{0%{transform:translate3d(-2%,0,0) scale(1.18)}50%{transform:translate3d(1.6%,.8%,0) scale(1.22)}100%{transform:translate3d(-2%,0,0) scale(1.18)}}
@keyframes battleCloudDrift{0%{transform:translate3d(-2%,0,0) scale(1.14)}50%{transform:translate3d(2.2%,1%,0) scale(1.18)}100%{transform:translate3d(-2%,0,0) scale(1.14)}}
@keyframes battleRainSlide{0%{transform:translateY(-3%)}100%{transform:translateY(4%)}}
@keyframes battleSmokeDrift{0%{transform:translate3d(-1%,0,0) scale(1.13)}50%{transform:translate3d(1.6%,-1%,0) scale(1.16)}100%{transform:translate3d(-1%,0,0) scale(1.13)}}
@keyframes battleSunPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
@keyframes battleFirePulse{0%,100%{transform:scale(1)}50%{transform:scale(1.03)}}
@keyframes leafOrbit{0%{transform:translateY(0) rotate(0)}25%{transform:translateY(-3px) rotate(4deg)}50%{transform:translateY(1px) rotate(0)}75%{transform:translateY(-2px) rotate(-4deg)}100%{transform:translateY(0) rotate(0)}}
@keyframes rootPulse{0%,100%{transform:translateX(-50%) scaleY(1)}50%{transform:translateX(-50%) scaleY(1.08)}}
@keyframes groundPulse{0%,100%{transform:scaleX(.94);opacity:.65}50%{transform:scaleX(1.06);opacity:1}}
@keyframes waterWave{0%,100%{transform:translateY(0) scaleX(.96)}50%{transform:translateY(-2px) scaleX(1.04)}}
@keyframes waterSplash{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@keyframes dustRise{0%,100%{transform:translateY(1px) scale(1);opacity:.8}50%{transform:translateY(-3px) scale(1.04);opacity:1}}
@keyframes fireFlicker{0%,100%{transform:scaleY(1) translateY(0)}50%{transform:scaleY(1.08) translateY(-2px)}}
@keyframes smokeLift{0%,100%{transform:translateY(0) scale(1);opacity:.68}50%{transform:translateY(-5px) scale(1.06);opacity:1}}
@keyframes poisonBubble{0%,100%{transform:translateY(0);opacity:.78}50%{transform:translateY(-4px);opacity:1}}
@keyframes sunGlow{0%,100%{transform:translateX(-50%) scale(1)}50%{transform:translateX(-50%) scale(1.08)}}
@keyframes softSpin{from{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}
@media (max-width:720px){.battle-map-base,.battle-map-overlay{background-size:220% auto}.battle-map-sun{background-size:58% auto}.unit-aura-layer{inset:-2px}}
@media(prefers-reduced-motion:reduce){.battle-map-water,.battle-map-sun,.battle-map-clouds,.battle-map-rain,.battle-map-smoke,.battle-map-fire,.unit-aura:before,.unit-aura:after{animation:none!important}}


/* V59.17 — Expedition/Home Fix + Cinematic Battle Phases */
.battle-map-spotlight{background:radial-gradient(circle at var(--battle-focus-x) var(--battle-focus-y),rgba(255,255,255,.10),rgba(255,255,255,.015) 17%,rgba(0,0,0,.30) 43%,rgba(0,0,0,var(--battle-shade,.58)) 92%)}
.battle-intro-summon .unit-card:not(.dead){animation:battleSummonCard .92s cubic-bezier(.16,.8,.22,1) both;animation-delay:var(--summon-delay,0ms)}
.battle-intro-summon .unit-card:not(.dead) .guardian-spirit{animation:battleSummonSpirit 1.18s cubic-bezier(.16,.8,.22,1) both;animation-delay:calc(var(--summon-delay,0ms) + 90ms)}
.battle-intro-summon .unit-card:not(.dead) .unit-aura-layer{animation:battleSummonAura 1.2s ease both;animation-delay:calc(var(--summon-delay,0ms) + 120ms)}
.battle-scene-fx{position:absolute;inset:0;z-index:5;pointer-events:none;overflow:hidden}
.battle-scene-fx i,.battle-scene-fx u{position:absolute;display:block;pointer-events:none;text-decoration:none}
.battle-scene-fx .scene-fx-a{left:16%;top:50%;width:18%;height:4px;transform-origin:left center;border-radius:999px;animation:sceneProjectile 1.1s cubic-bezier(.15,.8,.2,1) both}
.battle-scene-fx .scene-fx-b{left:50%;top:50%;width:90px;height:90px;transform:translate(-50%,-50%) scale(.15);border-radius:50%;animation:sceneImpactBurst .72s .52s ease-out both}
.battle-scene-fx .scene-fx-c{inset:0;opacity:0;animation:sceneScreenFlash .65s .46s ease-out both}
.scene-water .scene-fx-a{background:linear-gradient(90deg,rgba(100,220,255,0),rgba(130,232,255,.95),rgba(255,255,255,.9));box-shadow:0 0 20px rgba(95,215,255,.6)}
.scene-water .scene-fx-b{border:4px solid rgba(105,220,255,.78);box-shadow:0 0 30px rgba(91,211,255,.45),inset 0 0 22px rgba(91,211,255,.25)}
.scene-fire .scene-fx-a{background:linear-gradient(90deg,rgba(255,103,52,0),#ff7a38,#ffd17a);box-shadow:0 0 22px rgba(255,94,47,.65)}
.scene-fire .scene-fx-b{background:radial-gradient(circle,#fff0a7 0 10%,#ff913d 24%,rgba(255,72,31,.55) 48%,transparent 72%);box-shadow:0 0 34px rgba(255,95,45,.5)}
.scene-thunder .scene-fx-a{height:6px;background:linear-gradient(90deg,transparent,#dff7ff,#728cff,#fff);filter:drop-shadow(0 0 8px #aab5ff);clip-path:polygon(0 44%,18% 0,34% 58%,51% 10%,67% 78%,84% 31%,100% 55%,83% 55%,67% 100%,50% 36%,33% 82%,18% 26%,0 68%)}
.scene-thunder .scene-fx-b{border:3px solid #a9a7ff;box-shadow:0 0 32px #807fff,inset 0 0 20px #b8c7ff}
.scene-earth .scene-fx-a{background:linear-gradient(90deg,transparent,#a77a4e,#dbc19c);box-shadow:0 0 18px rgba(176,137,88,.48)}
.scene-earth .scene-fx-b{background:radial-gradient(circle,rgba(224,193,151,.76),rgba(143,105,67,.36) 45%,transparent 72%)}
.scene-poison .scene-fx-a{background:linear-gradient(90deg,transparent,#9d5bdb,#de8fff);box-shadow:0 0 20px rgba(182,91,232,.5)}
.scene-poison .scene-fx-b{background:radial-gradient(circle,rgba(219,139,255,.75),rgba(113,46,162,.35) 46%,transparent 72%)}
.scene-heal .scene-fx-a,.scene-shield .scene-fx-a{display:none}
.scene-heal .scene-fx-b{background:radial-gradient(circle,rgba(129,255,171,.52),rgba(80,228,143,.16) 48%,transparent 72%);box-shadow:0 0 34px rgba(93,255,163,.35)}
.scene-shield .scene-fx-b{border:4px solid rgba(120,201,255,.75);box-shadow:0 0 34px rgba(94,191,255,.38),inset 0 0 22px rgba(94,191,255,.22)}
.scene-wind .scene-fx-a,.scene-sonic .scene-fx-a{background:linear-gradient(90deg,transparent,rgba(217,255,242,.85),rgba(111,255,210,.9));box-shadow:0 0 17px rgba(111,255,210,.4)}
.scene-ultimate .scene-fx-b{background:radial-gradient(circle,rgba(255,255,255,.92),rgba(255,218,107,.55) 22%,rgba(146,107,255,.36) 45%,transparent 72%);box-shadow:0 0 42px rgba(255,226,120,.42)}
.unit-card.live-actor{z-index:7}
.unit-card.live-target{z-index:6}
.unit-card.live-actor.live-attack,.unit-card.live-actor.live-slash,.unit-card.live-actor.live-ultimate,.unit-card.live-actor.live-stun,.unit-card.live-actor.live-poison{animation:cardAttackSequence 1.48s cubic-bezier(.18,.78,.2,1) both!important}
.unit-card.live-target.live-attack,.unit-card.live-target.live-hit,.unit-card.live-target.live-ko,.unit-card.live-target.live-stun,.unit-card.live-target.live-poison{animation:cardImpactSequence 1.42s ease both!important}
.unit-card.live-actor.live-heal,.unit-card.live-actor.live-buff,.unit-card.live-actor.live-shield{animation:cardCastSequence 1.38s ease both!important}
.unit-card.live-target.live-heal,.unit-card.live-target.live-buff,.unit-card.live-target.live-shield{animation:cardBlessSequence 1.38s ease both!important}
.unit-card.live-element-water .unit-art{filter:drop-shadow(0 0 13px rgba(80,207,255,.42))}
.unit-card.live-element-fire .unit-art{filter:drop-shadow(0 0 14px rgba(255,104,52,.46))}
.unit-card.live-element-thunder .unit-art{filter:drop-shadow(0 0 14px rgba(151,155,255,.48))}
.unit-card.live-element-earth .unit-art{filter:drop-shadow(0 0 12px rgba(199,164,110,.38))}
.unit-card.live-element-poison .unit-art{filter:drop-shadow(0 0 14px rgba(187,91,234,.42))}
.unit-reactive-fx em,.unit-reactive-fx u{position:absolute;display:block;text-decoration:none;pointer-events:none}
.unit-reactive-fx em{width:82%;height:82%;border-radius:50%;opacity:.9}
.unit-reactive-fx u{width:68%;height:68%;border-radius:50%;opacity:.78}
.fx-element-water em{border:3px solid rgba(94,216,255,.72);animation:elementRipple .75s ease-out both}.fx-element-water u{border:2px dashed rgba(145,235,255,.62);animation:elementSpin .8s linear both}
.fx-element-fire em{background:radial-gradient(circle,rgba(255,236,160,.68),rgba(255,99,45,.34) 42%,transparent 70%);animation:elementBurst .72s ease-out both}.fx-element-fire u{box-shadow:0 -18px 0 -12px #ff8a45,12px -9px 0 -12px #ffc062,-12px -8px 0 -12px #ff653d;animation:elementSpin .75s linear both}
.fx-element-earth em{border-bottom:4px solid rgba(186,145,94,.72);box-shadow:0 14px 18px rgba(123,89,55,.2);animation:elementGround .72s ease both}.fx-element-earth u{border:2px dotted rgba(222,190,142,.62);animation:elementSpin .8s linear both}
.fx-element-poison em{background:radial-gradient(circle,rgba(209,129,255,.46),rgba(106,40,154,.18) 55%,transparent 72%);animation:elementBurst .85s ease-out both}.fx-element-poison u{border:2px dashed rgba(205,125,255,.55);animation:elementSpin .9s linear both}
.fx-element-thunder em{border:2px solid rgba(182,190,255,.7);box-shadow:0 0 20px rgba(124,132,255,.48);animation:elementRipple .66s ease-out both}.fx-element-thunder u{clip-path:polygon(47% 0,65% 38%,51% 38%,70% 100%,35% 56%,50% 56%,29% 20%);background:#dfe7ff;filter:drop-shadow(0 0 7px #7f8cff);animation:elementFlash .65s ease both}
.fx-element-heal em,.fx-element-shield em{border:2px solid rgba(118,255,178,.64);animation:elementRipple .82s ease-out both}.fx-element-shield em{border-color:rgba(113,204,255,.72)}
@keyframes battleSummonCard{0%{opacity:0;transform:translateY(24px) scale(.78);filter:blur(4px) brightness(1.45)}55%{opacity:1;transform:translateY(-5px) scale(1.04);filter:blur(0) brightness(1.15)}100%{opacity:1;transform:translateY(0) scale(1);filter:none}}
@keyframes battleSummonSpirit{0%{opacity:0;transform:translateX(-50%) translateY(18px) scale(.45)}65%{opacity:.88;transform:translateX(-50%) translateY(-5px) scale(1.08)}100%{opacity:.62;transform:translateX(-50%) translateY(0) scale(1)}}
@keyframes battleSummonAura{0%{opacity:0;transform:scale(.65)}55%{opacity:1;transform:scale(1.12)}100%{opacity:1;transform:scale(1)}}
@keyframes cardAttackSequence{0%{transform:translate(0,0) scale(1)}16%{transform:translateY(-6px) scale(1.03)}38%{transform:translateX(10px) translateY(-3px) scale(1.075) rotate(1deg)}58%{transform:translateX(18px) scale(1.085) rotate(2deg)}76%{transform:translateX(-3px) scale(.99)}100%{transform:translate(0,0) scale(1)}}
@keyframes cardImpactSequence{0%,36%{transform:translate(0,0) scale(1);filter:brightness(1)}48%{transform:translateX(-7px) rotate(-2deg) scale(.98);filter:brightness(1.55)}62%{transform:translateX(5px) rotate(1.5deg);filter:brightness(.9)}75%{transform:translateX(-2px);filter:brightness(1.1)}100%{transform:translate(0,0);filter:none}}
@keyframes cardCastSequence{0%{transform:translateY(0) scale(1)}28%{transform:translateY(-8px) scale(1.04)}58%{transform:translateY(-3px) scale(1.075)}100%{transform:translateY(0) scale(1)}}
@keyframes cardBlessSequence{0%,30%{transform:scale(1);filter:brightness(1)}58%{transform:scale(1.045);filter:brightness(1.34)}100%{transform:scale(1);filter:none}}
@keyframes sceneProjectile{0%{opacity:0;transform:translateX(0) scaleX(.15)}15%{opacity:1}70%{opacity:1;transform:translateX(310%) scaleX(1.2)}100%{opacity:0;transform:translateX(355%) scaleX(.35)}}
@keyframes sceneImpactBurst{0%{opacity:0;transform:translate(-50%,-50%) scale(.12)}35%{opacity:1;transform:translate(-50%,-50%) scale(1.18)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.55)}}
@keyframes sceneScreenFlash{0%{opacity:0;background:rgba(255,255,255,0)}20%{opacity:.42;background:rgba(255,255,255,.12)}100%{opacity:0;background:rgba(255,255,255,0)}}
@keyframes elementRipple{0%{opacity:.9;transform:scale(.2)}100%{opacity:0;transform:scale(1.35)}}
@keyframes elementBurst{0%{opacity:.9;transform:scale(.25)}70%{opacity:.85;transform:scale(1.08)}100%{opacity:0;transform:scale(1.35)}}
@keyframes elementSpin{0%{opacity:.8;transform:rotate(0) scale(.5)}100%{opacity:0;transform:rotate(180deg) scale(1.25)}}
@keyframes elementGround{0%{opacity:0;transform:translateY(14px) scaleX(.5)}45%{opacity:1;transform:translateY(0) scaleX(1.15)}100%{opacity:0;transform:translateY(-2px) scaleX(1.3)}}
@keyframes elementFlash{0%{opacity:0;transform:scale(.3)}35%{opacity:1;transform:scale(1.1)}100%{opacity:0;transform:scale(.9)}}
@media(max-width:720px){.battle-scene-fx .scene-fx-a{left:10%;width:16%}.battle-scene-fx .scene-fx-b{width:58px;height:58px}.unit-card.live-actor.live-attack,.unit-card.live-actor.live-slash,.unit-card.live-actor.live-ultimate{animation-name:cardAttackSequenceMobile!important}}
@keyframes cardAttackSequenceMobile{0%{transform:translate(0,0) scale(1)}20%{transform:translateY(-4px) scale(1.03)}48%{transform:translateX(5px) scale(1.06)}70%{transform:translateX(-2px) scale(.99)}100%{transform:translate(0,0) scale(1)}}
@media(prefers-reduced-motion:reduce){.battle-intro-summon .unit-card,.battle-intro-summon .guardian-spirit,.battle-intro-summon .unit-aura-layer,.battle-scene-fx i,.battle-scene-fx u,.unit-reactive-fx em,.unit-reactive-fx u{animation:none!important}}


/* V59.17 desktop expedition map layout fix */
.expedition-tips-box{display:none!important}
.expedition-focus-compact{height:100%}
.expedition-detail-strip{display:grid;grid-template-columns:minmax(220px,1.15fr) minmax(270px,1.25fr) minmax(250px,1.1fr) minmax(210px,.9fr) auto;gap:10px;align-items:stretch;margin-top:14px;padding:12px;border-radius:18px;background:rgba(4,14,23,.46);border:1px solid rgba(255,255,255,.07)}
.expedition-detail-strip>*{min-width:0}
.expedition-detail-enemy .expedition-enemy-card{height:100%;box-sizing:border-box}
.expedition-detail-meta .expedition-stage-extra{height:100%}
.expedition-detail-meta .expedition-stage-extra>div{display:flex;flex-direction:column;justify-content:center}
.expedition-detail-contribution .expedition-contribution-box{height:100%;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center}
.expedition-detail-levels{display:flex;align-items:center}
.expedition-detail-levels .expedition-mini-stage-grid{max-height:none;overflow:visible;display:flex;flex-wrap:wrap;gap:7px}
.expedition-detail-actions{display:flex;flex-direction:column;gap:8px;justify-content:center;min-width:150px}
.expedition-detail-actions button{width:100%}
.expedition-map-selector{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px!important;width:100%;margin-top:12px!important}
.expedition-loc-chip{justify-content:center;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (min-width:1101px){
  .expedition-world-layout{grid-template-columns:minmax(0,1.72fr) minmax(280px,.78fr)!important;align-items:stretch!important}
  .expedition-world-side{height:100%}
  .expedition-focus-card{height:100%;box-sizing:border-box}
}
@media (max-width:1300px) and (min-width:1101px){
  .expedition-detail-strip{grid-template-columns:minmax(210px,1fr) minmax(250px,1.15fr) minmax(230px,1fr) minmax(190px,.8fr)}
  .expedition-detail-actions{grid-column:1/-1;flex-direction:row;justify-content:flex-end}
  .expedition-detail-actions button{width:auto;min-width:170px}
  .expedition-map-selector{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (max-width:1100px){
  .expedition-detail-strip{grid-template-columns:1fr 1fr}
  .expedition-detail-actions{flex-direction:row;grid-column:1/-1}
  .expedition-detail-actions button{flex:1}
  .expedition-map-selector{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media (max-width:760px){
  .expedition-detail-strip{grid-template-columns:1fr;padding:10px}
  .expedition-detail-actions{grid-column:auto;flex-direction:column}
  .expedition-map-selector{display:flex!important;overflow-x:auto;flex-wrap:nowrap!important;padding-bottom:4px}
  .expedition-loc-chip{flex:0 0 auto}
}


/* V59.18 — compact expedition selector under stats + living arena figures */
.expedition-header-tools{display:grid;gap:8px;min-width:min(100%,620px);max-width:760px;margin-left:auto}
.expedition-header-tools .expedition-world-stats{width:100%;min-width:0}
.expedition-map-selector-header{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:5px!important;margin:0!important;width:100%}
.expedition-map-selector-header .expedition-loc-chip{min-width:0!important;padding:5px 6px!important;border-radius:10px!important;font-size:9px!important;line-height:1.05!important;gap:2px!important;display:flex!important;justify-content:center!important;align-items:center!important;white-space:nowrap!important;overflow:hidden!important}
.expedition-map-selector-header .expedition-loc-chip>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.expedition-map-selector-header .expedition-loc-chip small{font-size:8px!important;opacity:.88!important;flex:0 0 auto!important;margin-left:2px!important}

.battle .unit-row,.online-battle .unit-row{padding-top:34px!important;overflow:visible!important}
.battle .unit-card.living-unit,.online-battle .unit-card.living-unit{overflow:visible!important;min-height:128px!important;padding-top:46px!important;z-index:1;transition:transform .18s ease,box-shadow .2s ease}
.battle .unit-card.living-unit:hover,.online-battle .unit-card.living-unit:hover{z-index:8;transform:translateY(-2px)}
.battle .unit-card.living-unit .unit-art,.online-battle .unit-card.living-unit .unit-art{position:absolute!important;left:50%!important;top:-48px!important;transform:translateX(-50%)!important;width:88%!important;height:108px!important;min-height:108px!important;padding:0!important;margin:0!important;background:transparent!important;border-radius:0!important;overflow:visible!important;z-index:5!important;pointer-events:none!important}
.battle .unit-card.living-unit .battle-unit-image,.online-battle .unit-card.living-unit .battle-unit-image,
.battle .unit-card.living-unit .unit-art .card-art-image img,.online-battle .unit-card.living-unit .unit-art .card-art-image img,
.battle .unit-card.living-unit .unit-icon-art,.online-battle .unit-card.living-unit .unit-icon-art{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain!important;object-position:center bottom!important;overflow:visible!important;filter:drop-shadow(0 10px 8px rgba(0,0,0,.34))!important;transform-origin:50% 86%!important;animation:unitLivingIdle var(--unit-idle-duration,3.8s) ease-in-out var(--unit-idle-delay,0s) infinite!important}
.battle .unit-card.living-flora .battle-unit-image,.online-battle .unit-card.living-flora .battle-unit-image,.battle .unit-card.living-flora .unit-art .card-art-image img,.online-battle .unit-card.living-flora .unit-art .card-art-image img{animation-name:unitFloraIdle!important}
.battle .unit-card.living-fauna .battle-unit-image,.online-battle .unit-card.living-fauna .battle-unit-image,.battle .unit-card.living-fauna .unit-art .card-art-image img,.online-battle .unit-card.living-fauna .unit-art .card-art-image img{animation-name:unitFaunaIdle!important}
.battle .unit-card.living-unit .guardian-spirit,.online-battle .unit-card.living-unit .guardian-spirit{top:-8px!important;z-index:7!important;opacity:.72}
.battle .unit-card.living-unit .unit-aura-layer,.online-battle .unit-card.living-unit .unit-aura-layer{inset:-9px!important;z-index:3!important}
.battle .unit-card.living-unit .unit-meta,.online-battle .unit-card.living-unit .unit-meta,.battle .unit-card.living-unit .hpbar,.online-battle .unit-card.living-unit .hpbar{position:relative;z-index:8}
.battle .unit-card.living-unit .statusline,.online-battle .unit-card.living-unit .statusline{z-index:12}
.battle .unit-card.living-unit .fx-popup,.online-battle .unit-card.living-unit .fx-popup{z-index:14;top:-28px!important}
.battle .unit-card.live-actor .battle-unit-image,.battle .unit-card.scene-attacker .battle-unit-image,.online-battle .unit-card.live-actor .battle-unit-image,.online-battle .unit-card.scene-attacker .battle-unit-image{animation:unitFigureAttack .82s cubic-bezier(.2,.85,.2,1) both!important}
.battle .unit-card.live-target .battle-unit-image,.battle .unit-card.scene-target .battle-unit-image,.online-battle .unit-card.live-target .battle-unit-image,.online-battle .unit-card.scene-target .battle-unit-image{animation:unitFigureHit .68s ease both!important}
@keyframes unitLivingIdle{0%,100%{transform:translate3d(0,0,0) rotate(calc(var(--unit-idle-sway,0deg) * -.45)) scale(1)}50%{transform:translate3d(0,calc(var(--unit-idle-lift,4px) * -1),0) rotate(var(--unit-idle-sway,0deg)) scale(1.015)}}
@keyframes unitFloraIdle{0%,100%{transform:translate3d(0,0,0) rotate(-.7deg) scale(1)}35%{transform:translate3d(1px,-3px,0) rotate(.9deg) scale(1.012)}70%{transform:translate3d(-1px,-1px,0) rotate(-.35deg) scale(1.006)}}
@keyframes unitFaunaIdle{0%,100%{transform:translate3d(0,0,0) scale(1)}40%{transform:translate3d(1px,-5px,0) rotate(.45deg) scale(1.02)}65%{transform:translate3d(-1px,-2px,0) rotate(-.35deg) scale(1.008)}}
@keyframes unitFigureAttack{0%{transform:translate3d(0,0,0) scale(1)}20%{transform:translate3d(-4px,-5px,0) scale(1.04)}52%{transform:translate3d(12px,-9px,0) scale(1.09) rotate(1.4deg)}72%{transform:translate3d(5px,-2px,0) scale(1.03)}100%{transform:translate3d(0,0,0) scale(1)}}
@keyframes unitFigureHit{0%,100%{transform:translate3d(0,0,0) scale(1)}18%{transform:translate3d(-7px,1px,0) rotate(-2deg) scale(.97)}36%{transform:translate3d(6px,-1px,0) rotate(1.5deg) scale(1.01)}55%{transform:translate3d(-3px,0,0) rotate(-.8deg)}75%{transform:translate3d(2px,0,0) rotate(.4deg)}}
@media(max-width:1100px){.expedition-header-tools{max-width:none;width:100%;margin-left:0}.expedition-map-selector-header{grid-template-columns:repeat(4,minmax(0,1fr))!important}.expedition-map-selector-header .expedition-loc-chip{font-size:8.5px!important}.battle .unit-row,.online-battle .unit-row{padding-top:28px!important}.battle .unit-card.living-unit .unit-art,.online-battle .unit-card.living-unit .unit-art{top:-39px!important;height:92px!important;min-height:92px!important}.battle .unit-card.living-unit,.online-battle .unit-card.living-unit{padding-top:39px!important}}
@media(max-width:760px){.expedition-map-selector-header{display:flex!important;overflow-x:auto!important;flex-wrap:nowrap!important;padding-bottom:3px!important}.expedition-map-selector-header .expedition-loc-chip{flex:0 0 auto!important;max-width:135px!important;font-size:8px!important}.battle .unit-row,.online-battle .unit-row{padding-top:23px!important}.battle .unit-card.living-unit,.online-battle .unit-card.living-unit{padding-top:32px!important;min-height:122px!important}.battle .unit-card.living-unit .unit-art,.online-battle .unit-card.living-unit .unit-art{top:-32px!important;width:96%!important;height:78px!important;min-height:78px!important}.battle .unit-card.living-unit .unit-meta h4,.online-battle .unit-card.living-unit .unit-meta h4{font-size:9px!important}}
@media(prefers-reduced-motion:reduce){.battle .unit-card.living-unit .battle-unit-image,.online-battle .unit-card.living-unit .battle-unit-image,.battle .unit-card.living-unit .unit-art .card-art-image img,.online-battle .unit-card.living-unit .unit-art .card-art-image img{animation:none!important}}

/* V59.19 — expedition full-width header + clean living units + desktop action popup */
@media (min-width:1101px){
  .expedition-world-header.expedition-world-header-standalone{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:14px!important;
    width:100%!important;
  }
  .expedition-world-header.expedition-world-header-standalone>div:first-child{
    width:100%!important;
    max-width:none!important;
  }
  .expedition-world-header.expedition-world-header-standalone>div:first-child p{
    max-width:none!important;
    width:100%!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .expedition-header-tools{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin-left:0!important;
    gap:9px!important;
  }
  .expedition-header-tools .expedition-world-stats{
    width:100%!important;
    min-width:0!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:10px!important;
  }
  .expedition-header-tools .expedition-world-stats>div{
    min-width:0!important;
    width:100%!important;
  }
  .expedition-map-selector-header{
    display:grid!important;
    grid-template-columns:repeat(8,minmax(0,1fr))!important;
    width:100%!important;
    gap:6px!important;
  }
  .expedition-map-selector-header .expedition-loc-chip{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    justify-content:center!important;
    padding:7px 6px!important;
    font-size:9px!important;
  }
  .expedition-map-selector-header .expedition-loc-chip>span{
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  .expedition-map-selector-header .expedition-loc-chip small{
    font-size:8px!important;
    margin-left:3px!important;
    flex:0 0 auto!important;
  }

  /* Card selection on PC behaves like the mobile floating action sheet. */
  .battle .selected-action-panel,
  .online-battle .selected-action-panel{
    position:fixed!important;
    z-index:260!important;
    left:50%!important;
    right:auto!important;
    bottom:24px!important;
    transform:translateX(-50%)!important;
    width:min(760px,calc(100vw - 40px))!important;
    max-width:760px!important;
    margin:0!important;
    padding:13px!important;
    border-radius:18px!important;
    box-shadow:0 28px 90px rgba(0,0,0,.72)!important;
    backdrop-filter:blur(12px)!important;
  }
  .battle .selected-action-panel:before,
  .online-battle .selected-action-panel:before{
    content:"";
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.28);
    z-index:-1;
    pointer-events:none;
  }
}

/* Do not draw a second faint copy of the Guardian behind the living figure. */
.battle .unit-card .guardian-spirit,
.online-battle .unit-card .guardian-spirit{display:none!important}

/* Remove circular green halo/ring around flora; keep leaves/roots as moving particles. */
.battle .unit-card .aura-leaf:after,
.online-battle .unit-card .aura-leaf:after,
.battle .unit-card .aura-sun:after,
.online-battle .unit-card .aura-sun:after{display:none!important}

/* Keep the living figure itself clean and visually dominant. */
.battle .unit-card.living-unit .unit-art,
.online-battle .unit-card.living-unit .unit-art{
  background:transparent!important;
  box-shadow:none!important;
}


/* V59.20 — species breathing motion + unclipped FX + readable status effects */
/* Species-specific idle: fauna quick, flora calm, large trees very slow. */
.battle .unit-card.living-unit .battle-unit-image,
.online-battle .unit-card.living-unit .battle-unit-image,
.battle .unit-card.living-unit .unit-art .card-art-image img,
.online-battle .unit-card.living-unit .unit-art .card-art-image img,
.battle .unit-card.living-unit .unit-icon-art,
.online-battle .unit-card.living-unit .unit-icon-art{
  animation-duration:var(--unit-idle-duration,3.8s)!important;
  animation-delay:var(--unit-idle-delay,0s)!important;
  animation-timing-function:ease-in-out!important;
  animation-iteration-count:infinite!important;
  will-change:transform!important;
}
.battle .unit-card.living-fauna .battle-unit-image,
.online-battle .unit-card.living-fauna .battle-unit-image,
.battle .unit-card.living-fauna .unit-art .card-art-image img,
.online-battle .unit-card.living-fauna .unit-art .card-art-image img,
.battle .unit-card.living-fauna .unit-icon-art,
.online-battle .unit-card.living-fauna .unit-icon-art{animation-name:unitFaunaBreath!important}
.battle .unit-card.living-flora:not(.living-tree) .battle-unit-image,
.online-battle .unit-card.living-flora:not(.living-tree) .battle-unit-image,
.battle .unit-card.living-flora:not(.living-tree) .unit-art .card-art-image img,
.online-battle .unit-card.living-flora:not(.living-tree) .unit-art .card-art-image img,
.battle .unit-card.living-flora:not(.living-tree) .unit-icon-art,
.online-battle .unit-card.living-flora:not(.living-tree) .unit-icon-art{animation-name:unitFloraBreath!important}
.battle .unit-card.living-tree .battle-unit-image,
.online-battle .unit-card.living-tree .battle-unit-image,
.battle .unit-card.living-tree .unit-art .card-art-image img,
.online-battle .unit-card.living-tree .unit-art .card-art-image img,
.battle .unit-card.living-tree .unit-icon-art,
.online-battle .unit-card.living-tree .unit-icon-art{animation-name:unitTreeBreath!important}
@keyframes unitFaunaBreath{0%,100%{transform:translate3d(0,0,0) rotate(calc(var(--unit-idle-sway,0deg)*-.45)) scale(1)}24%{transform:translate3d(1px,calc(var(--unit-idle-lift,5px)*-.55),0) rotate(calc(var(--unit-idle-sway,0deg)*.35)) scale(calc(1 + (var(--unit-breath-scale,1.025) - 1)*.45))}52%{transform:translate3d(-1px,calc(var(--unit-idle-lift,5px)*-1),0) rotate(var(--unit-idle-sway,0deg)) scale(var(--unit-breath-scale,1.025))}76%{transform:translate3d(1px,calc(var(--unit-idle-lift,5px)*-.35),0) rotate(calc(var(--unit-idle-sway,0deg)*-.2)) scale(1.008)}}
@keyframes unitFloraBreath{0%,100%{transform:translate3d(0,0,0) rotate(calc(var(--unit-idle-sway,0deg)*-.35)) scale(1)}50%{transform:translate3d(0,calc(var(--unit-idle-lift,2px)*-1),0) rotate(var(--unit-idle-sway,0deg)) scaleY(var(--unit-breath-scale,1.018)) scaleX(.997)}}
@keyframes unitTreeBreath{0%,100%{transform:translate3d(0,0,0) rotate(calc(var(--unit-idle-sway,0deg)*-.18)) scale(1)}50%{transform:translate3d(0,calc(var(--unit-idle-lift,1px)*-1),0) rotate(var(--unit-idle-sway,0deg)) scaleY(var(--unit-breath-scale,1.015)) scaleX(.994)}}

/* Let executed assets/effects breathe outside their own box instead of being clipped. */
.battle-scene-fx{inset:-42px -18px!important;overflow:visible!important;z-index:24!important}
.battle-scene-fx .scene-fx-a{overflow:visible!important}
.battle-scene-fx .scene-fx-b{width:122px!important;height:122px!important;overflow:visible!important}
.unit-reactive-fx{inset:-26px!important;overflow:visible!important;z-index:30!important}
.unit-reactive-fx em{width:98%!important;height:98%!important;overflow:visible!important}
.unit-reactive-fx u{width:82%!important;height:82%!important;overflow:visible!important}
.battle .unit-row,.online-battle .unit-row,.battle .unit-card.living-unit,.online-battle .unit-card.living-unit,.battle .unit-art,.online-battle .unit-art{overflow:visible!important}

/* Large, readable status badges. They sit above the card edge, leaving HP/name unobstructed. */
.battle .unit-card.living-unit .statusline.status-visuals,
.online-battle .unit-card.living-unit .statusline.status-visuals{
  position:absolute!important;top:-17px!important;right:7px!important;left:auto!important;z-index:42!important;
  display:flex!important;flex-wrap:wrap!important;justify-content:flex-end!important;align-items:center!important;gap:4px!important;
  max-width:58%!important;pointer-events:none!important;
}
.battle .unit-card.living-unit .mini-status,
.online-battle .unit-card.living-unit .mini-status{
  position:relative!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:1px!important;
  min-width:31px!important;height:31px!important;padding:0 5px!important;border-radius:999px!important;
  font-size:18px!important;line-height:1!important;font-weight:900!important;color:#fff!important;
  background:rgba(3,13,22,.90)!important;border:1.5px solid rgba(255,255,255,.28)!important;
  box-shadow:0 5px 12px rgba(0,0,0,.28)!important;backdrop-filter:blur(5px)!important;
}
.battle .unit-card.living-unit .mini-status b,.online-battle .unit-card.living-unit .mini-status b{font-size:18px!important;line-height:1!important}
.battle .unit-card.living-unit .mini-status small,.online-battle .unit-card.living-unit .mini-status small{font-size:9px!important;line-height:1!important;font-weight:1000!important;color:#fff!important;margin-left:-2px!important}
.battle .unit-card.living-unit .unit-lock-badge,.online-battle .unit-card.living-unit .unit-lock-badge{font-size:8px!important;padding:4px 6px!important;border-radius:999px!important;background:rgba(5,15,24,.88)!important}
.status-shield{border-color:#71ccff!important;box-shadow:0 0 0 1px rgba(113,204,255,.12),0 0 14px rgba(84,185,255,.35)!important;animation:statusShieldPulse 2.1s ease-in-out infinite!important}
.status-sleep{border-color:#92a9ff!important;background:rgba(31,37,78,.9)!important;animation:statusSleepFloat 2.6s ease-in-out infinite!important}
.status-confuse{border-color:#d69cff!important;background:rgba(64,29,81,.9)!important;animation:statusConfuseWobble 1.8s ease-in-out infinite!important}
.status-stun{border-color:#ffe479!important;background:rgba(75,61,13,.9)!important;animation:statusStunFlash 1.15s ease-in-out infinite!important}
.status-poison{border-color:#c77cff!important;background:rgba(49,21,63,.9)!important;animation:statusPoisonPulse 2s ease-in-out infinite!important}
.status-burn{border-color:#ff8a58!important;background:rgba(84,31,14,.9)!important;animation:statusBurnPulse 1.25s ease-in-out infinite!important}
.status-root{border-color:#8fde7a!important}.status-regen{border-color:#66f4a1!important}.status-reflect{border-color:#a8d9ff!important}.status-lock{border-color:#ffb1b1!important}.status-bleed{border-color:#ff6875!important}
@keyframes statusShieldPulse{0%,100%{transform:scale(1);filter:brightness(1)}50%{transform:scale(1.08);filter:brightness(1.25)}}
@keyframes statusSleepFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes statusConfuseWobble{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(5deg)}}
@keyframes statusStunFlash{0%,100%{filter:brightness(1)}50%{filter:brightness(1.65);transform:scale(1.08)}}
@keyframes statusPoisonPulse{0%,100%{filter:saturate(1)}50%{filter:saturate(1.6) brightness(1.18)}}
@keyframes statusBurnPulse{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-2px) scale(1.08)}}

/* Visible condition FX around the living art itself. */
.unit-status-effects{position:absolute;inset:-18px -12px -6px;z-index:18;pointer-events:none;overflow:visible}
.unit-state-fx{position:absolute;inset:0;display:block;pointer-events:none;overflow:visible}
.state-shield:before{content:"";position:absolute;left:50%;top:48%;width:88%;height:84%;transform:translate(-50%,-50%);border-radius:48% 48% 52% 52%;border:2px solid rgba(103,202,255,.72);background:radial-gradient(ellipse,rgba(111,209,255,.13),transparent 62%);box-shadow:0 0 20px rgba(86,188,255,.24),inset 0 0 18px rgba(96,200,255,.11);animation:shieldBubbleBreath 2.2s ease-in-out infinite}
.state-sleep{left:auto;right:-2px;top:-10px;width:60px;height:62px;inset:auto -4px auto auto}.state-sleep i{position:absolute;font-style:normal;font-weight:1000;color:#b9c6ff;text-shadow:0 0 8px rgba(146,169,255,.6);animation:sleepZFloat 2.8s ease-in-out infinite}.state-sleep i:nth-child(1){left:2px;bottom:4px;font-size:15px}.state-sleep i:nth-child(2){left:20px;bottom:21px;font-size:22px;animation-delay:-.8s}.state-sleep i:nth-child(3){left:42px;bottom:42px;font-size:13px;animation-delay:-1.6s}
.state-confuse{left:50%;top:4px;width:108px;height:42px;inset:auto auto auto 50%;transform:translateX(-50%);animation:confuseOrbit 3.3s linear infinite}.state-confuse i{position:absolute;font-style:normal;color:#e4b4ff;font-size:17px;font-weight:1000;text-shadow:0 0 8px rgba(209,133,255,.55)}.state-confuse i:nth-child(1){left:3px;top:14px}.state-confuse i:nth-child(2){left:48px;top:0}.state-confuse i:nth-child(3){right:3px;top:15px}
.state-stun{left:50%;top:0;width:112px;height:40px;inset:auto auto auto 50%;transform:translateX(-50%)}.state-stun i{position:absolute;font-style:normal;color:#ffe879;font-size:17px;text-shadow:0 0 9px rgba(255,231,105,.68);animation:stunStarFloat 1.4s ease-in-out infinite}.state-stun i:nth-child(1){left:6px;top:10px}.state-stun i:nth-child(2){left:48px;top:-2px;animation-delay:-.4s}.state-stun i:nth-child(3){right:7px;top:11px;animation-delay:-.8s}
.state-poison i{position:absolute;width:11px;height:11px;border-radius:50%;background:rgba(182,87,234,.44);border:1px solid rgba(219,141,255,.54);box-shadow:0 0 8px rgba(176,87,234,.3);animation:poisonStateBubble 3s ease-in-out infinite}.state-poison i:nth-child(1){left:20%;bottom:8%;}.state-poison i:nth-child(2){right:22%;bottom:18%;animation-delay:-1s}.state-poison i:nth-child(3){left:58%;bottom:2%;animation-delay:-2s}
.state-burn{inset:auto 8px 8px auto;width:38px;height:45px}.state-burn i{font-style:normal;font-size:29px;display:block;animation:burnStateFlicker 1.2s ease-in-out infinite}
.state-root:before{content:"";position:absolute;left:10%;right:10%;bottom:7%;height:20%;border-bottom:3px solid rgba(129,218,104,.72);border-radius:50%;box-shadow:0 8px 12px rgba(91,176,71,.15);animation:rootStatePulse 2.8s ease-in-out infinite}
@keyframes shieldBubbleBreath{0%,100%{transform:translate(-50%,-50%) scale(.98);opacity:.65}50%{transform:translate(-50%,-50%) scale(1.04);opacity:1}}
@keyframes sleepZFloat{0%{transform:translate(0,4px) scale(.85);opacity:0}35%{opacity:1}100%{transform:translate(7px,-12px) scale(1.1);opacity:0}}
@keyframes confuseOrbit{from{transform:translateX(-50%) rotate(0)}to{transform:translateX(-50%) rotate(360deg)}}
@keyframes stunStarFloat{0%,100%{transform:translateY(1px) scale(.9);opacity:.7}50%{transform:translateY(-4px) scale(1.15);opacity:1}}
@keyframes poisonStateBubble{0%{transform:translateY(6px) scale(.7);opacity:0}30%{opacity:1}100%{transform:translateY(-24px) scale(1.12);opacity:0}}
@keyframes burnStateFlicker{0%,100%{transform:translateY(0) scale(.94) rotate(-2deg)}50%{transform:translateY(-4px) scale(1.08) rotate(2deg)}}
@keyframes rootStatePulse{0%,100%{transform:scaleX(.9);opacity:.5}50%{transform:scaleX(1.06);opacity:1}}

@media(max-width:760px){
  .battle .unit-card.living-unit .statusline.status-visuals,.online-battle .unit-card.living-unit .statusline.status-visuals{top:-13px!important;right:3px!important;gap:2px!important;max-width:70%!important}
  .battle .unit-card.living-unit .mini-status,.online-battle .unit-card.living-unit .mini-status{min-width:25px!important;height:25px!important;padding:0 3px!important}
  .battle .unit-card.living-unit .mini-status b,.online-battle .unit-card.living-unit .mini-status b{font-size:14px!important}
  .battle .unit-card.living-unit .mini-status small,.online-battle .unit-card.living-unit .mini-status small{font-size:7px!important}
  .unit-status-effects{inset:-12px -6px -2px}
  .battle-scene-fx .scene-fx-b{width:82px!important;height:82px!important}
}
@media(prefers-reduced-motion:reduce){
  .status-shield,.status-sleep,.status-confuse,.status-stun,.status-poison,.status-burn,.unit-state-fx,.unit-state-fx:before,.unit-state-fx i{animation:none!important}
}

/* V59.21 — guaranteed living-figure motion. Animate a dedicated wrapper so
   nested artwork transforms and legacy image rules cannot cancel the idle. */
.battle .unit-card.living-unit .living-figure,
.online-battle .unit-card.living-unit .living-figure{
  position:absolute!important;
  inset:0!important;
  display:grid!important;
  place-items:center!important;
  z-index:5!important;
  pointer-events:none!important;
  transform-origin:50% 86%!important;
  will-change:transform!important;
  animation-duration:var(--unit-idle-duration,3.8s)!important;
  animation-delay:var(--unit-idle-delay,0s)!important;
  animation-timing-function:ease-in-out!important;
  animation-iteration-count:infinite!important;
  animation-fill-mode:both!important;
}
/* Stop nested art from running a second transform animation. */
.battle .unit-card.living-unit .living-figure .battle-unit-image,
.online-battle .unit-card.living-unit .living-figure .battle-unit-image,
.battle .unit-card.living-unit .living-figure .card-art-image img,
.online-battle .unit-card.living-unit .living-figure .card-art-image img,
.battle .unit-card.living-unit .living-figure .unit-icon-art,
.online-battle .unit-card.living-unit .living-figure .unit-icon-art{
  animation:none!important;
  transform:none!important;
}
.battle .unit-card.living-fauna .living-figure,
.online-battle .unit-card.living-fauna .living-figure{animation-name:livingFaunaV5921!important}
.battle .unit-card.living-flora:not(.living-tree) .living-figure,
.online-battle .unit-card.living-flora:not(.living-tree) .living-figure{animation-name:livingFloraV5921!important}
.battle .unit-card.living-tree .living-figure,
.online-battle .unit-card.living-tree .living-figure{animation-name:livingTreeV5921!important}
.battle .unit-card.living-other .living-figure,
.online-battle .unit-card.living-other .living-figure{animation-name:livingOtherV5921!important}

@keyframes livingFaunaV5921{
  0%,100%{transform:translate3d(0,0,0) rotate(-.5deg) scale(1)}
  25%{transform:translate3d(1px,-5px,0) rotate(.35deg) scale(1.012)}
  52%{transform:translate3d(-1px,-9px,0) rotate(var(--unit-idle-sway,.4deg)) scale(var(--unit-breath-scale,1.03))}
  76%{transform:translate3d(1px,-3px,0) rotate(-.2deg) scale(1.008)}
}
@keyframes livingFloraV5921{
  0%,100%{transform:translate3d(0,0,0) rotate(-.45deg) scale(1)}
  50%{transform:translate3d(0,-5px,0) rotate(var(--unit-idle-sway,.35deg)) scaleY(var(--unit-breath-scale,1.022)) scaleX(.997)}
}
@keyframes livingTreeV5921{
  0%,100%{transform:translate3d(0,0,0) rotate(-.12deg) scale(1)}
  50%{transform:translate3d(0,-3px,0) rotate(var(--unit-idle-sway,.12deg)) scaleY(var(--unit-breath-scale,1.016)) scaleX(.996)}
}
@keyframes livingOtherV5921{
  0%,100%{transform:translate3d(0,0,0) scale(1)}
  50%{transform:translate3d(0,-6px,0) scale(1.018)}
}
/* Attack / hit temporarily override idle wrapper, then idle resumes. */
.battle .unit-card.live-actor .living-figure,
.battle .unit-card.scene-attacker .living-figure,
.online-battle .unit-card.live-actor .living-figure,
.online-battle .unit-card.scene-attacker .living-figure{animation:livingAttackV5921 .82s cubic-bezier(.2,.85,.2,1) both!important}
.battle .unit-card.live-target .living-figure,
.battle .unit-card.scene-target .living-figure,
.online-battle .unit-card.live-target .living-figure,
.online-battle .unit-card.scene-target .living-figure{animation:livingHitV5921 .68s ease both!important}
@keyframes livingAttackV5921{0%{transform:translate3d(0,0,0) scale(1)}20%{transform:translate3d(-4px,-6px,0) scale(1.04)}52%{transform:translate3d(15px,-10px,0) scale(1.1) rotate(1.5deg)}72%{transform:translate3d(5px,-3px,0) scale(1.03)}100%{transform:translate3d(0,0,0) scale(1)}}
@keyframes livingHitV5921{0%,100%{transform:translate3d(0,0,0) scale(1)}18%{transform:translate3d(-8px,1px,0) rotate(-2.2deg) scale(.97)}36%{transform:translate3d(7px,-1px,0) rotate(1.7deg) scale(1.01)}55%{transform:translate3d(-4px,0,0) rotate(-.9deg)}75%{transform:translate3d(2px,0,0) rotate(.4deg)}}
/* V59.21 intentionally keeps core card idle visible even when OS asks for
   reduced motion; only non-essential particle FX remain reduced. */
@media(prefers-reduced-motion:reduce){
  .battle .unit-card.living-unit .living-figure,
  .online-battle .unit-card.living-unit .living-figure{animation-duration:6s!important;animation-iteration-count:infinite!important}
  .battle .unit-card.living-fauna .living-figure,.online-battle .unit-card.living-fauna .living-figure{animation-name:livingFaunaV5921!important}
  .battle .unit-card.living-flora:not(.living-tree) .living-figure,.online-battle .unit-card.living-flora:not(.living-tree) .living-figure{animation-name:livingFloraV5921!important}
  .battle .unit-card.living-tree .living-figure,.online-battle .unit-card.living-tree .living-figure{animation-name:livingTreeV5921!important}
}


/* V59.22 — scale correction for living battle artwork.
   Keep the figure slightly outside the card, but never dominate the battlefield. */
.battle .unit-card.living-unit,
.online-battle .unit-card.living-unit{
  padding-top:34px!important;
  min-height:132px!important;
}
.battle .unit-card.living-unit .unit-art,
.online-battle .unit-card.living-unit .unit-art{
  left:50%!important;
  top:-29px!important;
  transform:translateX(-50%)!important;
  width:68%!important;
  height:88px!important;
  min-height:88px!important;
  max-height:88px!important;
}
/* Fauna can be a little more expressive, but remains contained. */
.battle .unit-card.living-fauna .unit-art,
.online-battle .unit-card.living-fauna .unit-art{
  width:70%!important;
  height:92px!important;
  min-height:92px!important;
  max-height:92px!important;
  top:-31px!important;
}
/* Small/medium flora. */
.battle .unit-card.living-flora:not(.living-tree) .unit-art,
.online-battle .unit-card.living-flora:not(.living-tree) .unit-art{
  width:64%!important;
  height:84px!important;
  min-height:84px!important;
  max-height:84px!important;
  top:-26px!important;
}
/* Large trees should feel heavy, not oversized. */
.battle .unit-card.living-tree .unit-art,
.online-battle .unit-card.living-tree .unit-art{
  width:58%!important;
  height:80px!important;
  min-height:80px!important;
  max-height:80px!important;
  top:-23px!important;
}
/* Hard size guard: artwork can never exceed its living stage. */
.battle .unit-card.living-unit .living-figure,
.online-battle .unit-card.living-unit .living-figure{
  inset:0!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
}
.battle .unit-card.living-unit .living-figure .battle-unit-image,
.online-battle .unit-card.living-unit .living-figure .battle-unit-image,
.battle .unit-card.living-unit .living-figure .card-art-image,
.online-battle .unit-card.living-unit .living-figure .card-art-image,
.battle .unit-card.living-unit .living-figure .card-art-image img,
.online-battle .unit-card.living-unit .living-figure .card-art-image img,
.battle .unit-card.living-unit .living-figure .unit-icon-art,
.online-battle .unit-card.living-unit .living-figure .unit-icon-art{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center bottom!important;
}
/* Slightly reduce movement amplitude now that scale is corrected. */
@keyframes livingFaunaV5921{
  0%,100%{transform:translate3d(0,0,0) rotate(-.35deg) scale(1)}
  25%{transform:translate3d(1px,-3px,0) rotate(.25deg) scale(1.007)}
  52%{transform:translate3d(-1px,-6px,0) rotate(var(--unit-idle-sway,.3deg)) scale(1.014)}
  76%{transform:translate3d(1px,-2px,0) rotate(-.15deg) scale(1.004)}
}
@keyframes livingFloraV5921{
  0%,100%{transform:translate3d(0,0,0) rotate(-.28deg) scale(1)}
  50%{transform:translate3d(0,-3px,0) rotate(var(--unit-idle-sway,.24deg)) scaleY(1.010) scaleX(.998)}
}
@keyframes livingTreeV5921{
  0%,100%{transform:translate3d(0,0,0) rotate(-.08deg) scale(1)}
  50%{transform:translate3d(0,-2px,0) rotate(var(--unit-idle-sway,.08deg)) scaleY(1.006) scaleX(.998)}
}
@media(max-width:1100px){
  .battle .unit-card.living-unit,.online-battle .unit-card.living-unit{padding-top:29px!important}
  .battle .unit-card.living-fauna .unit-art,.online-battle .unit-card.living-fauna .unit-art{width:68%!important;height:82px!important;min-height:82px!important;max-height:82px!important;top:-27px!important}
  .battle .unit-card.living-flora:not(.living-tree) .unit-art,.online-battle .unit-card.living-flora:not(.living-tree) .unit-art{width:62%!important;height:76px!important;min-height:76px!important;max-height:76px!important;top:-23px!important}
  .battle .unit-card.living-tree .unit-art,.online-battle .unit-card.living-tree .unit-art{width:56%!important;height:72px!important;min-height:72px!important;max-height:72px!important;top:-20px!important}
}
@media(max-width:760px){
  .battle .unit-card.living-unit,.online-battle .unit-card.living-unit{padding-top:26px!important;min-height:120px!important}
  .battle .unit-card.living-fauna .unit-art,.online-battle .unit-card.living-fauna .unit-art{width:78%!important;height:72px!important;min-height:72px!important;max-height:72px!important;top:-22px!important}
  .battle .unit-card.living-flora:not(.living-tree) .unit-art,.online-battle .unit-card.living-flora:not(.living-tree) .unit-art{width:72%!important;height:68px!important;min-height:68px!important;max-height:68px!important;top:-19px!important}
  .battle .unit-card.living-tree .unit-art,.online-battle .unit-card.living-tree .unit-art{width:66%!important;height:64px!important;min-height:64px!important;max-height:64px!important;top:-17px!important}
}

/* V59.23 — Desktop-only living unit scale correction.
   Keep mobile/tablet unchanged; reduce artwork footprint on >1100px screens. */
@media (min-width:1101px){
  .battle .unit-card.living-unit,
  .online-battle .unit-card.living-unit{
    padding-top:24px!important;
    min-height:126px!important;
  }

  .battle .unit-card.living-unit .unit-art,
  .online-battle .unit-card.living-unit .unit-art{
    top:-18px!important;
    width:50%!important;
    height:68px!important;
    min-height:68px!important;
    max-height:68px!important;
  }

  .battle .unit-card.living-fauna .unit-art,
  .online-battle .unit-card.living-fauna .unit-art{
    width:52%!important;
    height:72px!important;
    min-height:72px!important;
    max-height:72px!important;
    top:-20px!important;
  }

  .battle .unit-card.living-flora:not(.living-tree) .unit-art,
  .online-battle .unit-card.living-flora:not(.living-tree) .unit-art{
    width:46%!important;
    height:64px!important;
    min-height:64px!important;
    max-height:64px!important;
    top:-16px!important;
  }

  .battle .unit-card.living-tree .unit-art,
  .online-battle .unit-card.living-tree .unit-art{
    width:42%!important;
    height:60px!important;
    min-height:60px!important;
    max-height:60px!important;
    top:-14px!important;
  }

  .battle .unit-card.living-unit .living-figure,
  .online-battle .unit-card.living-unit .living-figure{
    transform-origin:center bottom!important;
  }

  /* Reduce desktop bob amplitude so the figure never overlaps adjacent UI. */
  @keyframes livingFaunaV5921{
    0%,100%{transform:translate3d(0,0,0) rotate(-.25deg) scale(1)}
    25%{transform:translate3d(.5px,-2px,0) rotate(.15deg) scale(1.004)}
    52%{transform:translate3d(-.5px,-4px,0) rotate(var(--unit-idle-sway,.2deg)) scale(1.008)}
    76%{transform:translate3d(.5px,-1.5px,0) rotate(-.1deg) scale(1.003)}
  }
  @keyframes livingFloraV5921{
    0%,100%{transform:translate3d(0,0,0) rotate(-.18deg) scale(1)}
    50%{transform:translate3d(0,-2px,0) rotate(var(--unit-idle-sway,.16deg)) scaleY(1.006) scaleX(.999)}
  }
  @keyframes livingTreeV5921{
    0%,100%{transform:translate3d(0,0,0) rotate(-.05deg) scale(1)}
    50%{transform:translate3d(0,-1px,0) rotate(var(--unit-idle-sway,.05deg)) scaleY(1.003) scaleX(.999)}
  }
}


/* V59.25 — PvP / Friends / Avatar unification */
.account-avatar-editor{display:grid;grid-template-columns:108px 1fr;gap:16px;align-items:center;margin:12px 0;padding:14px;border-radius:18px;background:rgba(70,174,224,.08);border:1px solid rgba(97,203,244,.18)}
.account-avatar-preview{width:104px;height:104px;border-radius:50%;overflow:hidden;border:3px solid rgba(113,229,255,.55);background:#071722;box-shadow:0 0 22px rgba(70,190,235,.18)}
.account-avatar-image{width:100%;height:100%;object-fit:cover;display:block}.account-avatar-preview .art-emblem{width:100%;height:100%}.account-avatar-preview .art-emblem img{width:100%;height:100%;object-fit:cover}
.account-avatar-editor h3{margin:5px 0}.account-avatar-editor p{margin:0 0 10px;color:var(--muted);line-height:1.4}.account-avatar-editor small{display:block;margin-top:8px;color:var(--muted)}
.account-avatar-actions{display:flex;gap:8px;flex-wrap:wrap}.avatar-upload-label{cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.friends-hero-v5925{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap}.friends-summary{display:grid;grid-template-columns:repeat(3,minmax(78px,1fr));gap:8px}.friends-summary span{padding:10px 14px;border-radius:14px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.07);text-align:center}.friends-summary b{display:block;font-size:1.25rem}.friends-summary small{color:var(--muted)}
.friend-search-v5925{display:grid;grid-template-columns:minmax(210px,.55fr) minmax(280px,1fr);gap:16px;align-items:center}.friend-search-v5925 h3,.friend-search-v5925 p{margin:0}.friend-search-v5925 p{color:var(--muted);margin-top:4px}
.friend-grid-v5925{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.friend-card-v5925{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:16px;border:1px solid rgba(255,255,255,.08);background:linear-gradient(145deg,rgba(9,31,43,.88),rgba(8,20,31,.94))}.friend-main{display:flex;align-items:center;gap:10px;min-width:0}.friend-avatar-dot{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;flex:0 0 42px;background:linear-gradient(145deg,#16475c,#0b2534);border:1px solid rgba(128,220,255,.24);font-weight:1000;color:#dff8ff}.friend-copy{display:grid;gap:2px;min-width:0}.friend-copy b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.friend-copy small{color:var(--muted)}
.friend-presence{display:inline-flex;align-items:center;gap:5px;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.friend-presence i{width:7px;height:7px;border-radius:50%;background:#82919a}.friend-presence.online{color:#7cffad}.friend-presence.online i{background:#52e88a;box-shadow:0 0 9px rgba(82,232,138,.6)}.friend-presence.duel{color:#ffd46e}.friend-presence.duel i{background:#ffbd45;box-shadow:0 0 9px rgba(255,189,69,.55)}.friend-presence.offline{color:#8399a8}
.friend-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.friend-actions button{min-height:34px;padding:6px 9px}.compact-friend-remove{min-width:34px!important;padding:6px!important}.friend-duel-btn:disabled{opacity:.55}
.friend-request-v5925{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 0}.friend-request-v5925>div{display:flex;align-items:center;gap:9px}.friend-request-v5925>div small{color:var(--muted)}
.room-expiry-note{display:inline-flex;padding:7px 10px;border-radius:999px;background:rgba(255,197,85,.1);border:1px solid rgba(255,197,85,.22);color:#ffdc91;font-size:12px;margin-bottom:12px}
.online-expedition-shell .battle-guidance-row{display:grid}.online-expedition-shell .online-roombar{margin-bottom:8px}.online-expedition-shell .avatar-circle img,.online-expedition-shell .mobile-team-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}.online-guidance .history-single-card{cursor:default}
@media(max-width:900px){.friend-grid-v5925{grid-template-columns:1fr}.friend-search-v5925{grid-template-columns:1fr}.account-avatar-editor{grid-template-columns:82px 1fr}.account-avatar-preview{width:78px;height:78px}}
@media(max-width:620px){.friends-summary{width:100%}.friend-card-v5925{align-items:flex-start;flex-direction:column}.friend-actions{width:100%;justify-content:stretch}.friend-actions button{flex:1}.account-avatar-editor{grid-template-columns:1fr}.account-avatar-preview{margin:auto}.online-expedition-shell .battle-guidance-row{display:none}}


/* V59.29 — desktop cleanup, chat, notifications, emoji picker */
.modal:has(.expedition-deck-modal){width:min(920px,90vw)!important;max-height:88vh;overflow-y:auto;overflow-x:hidden;padding:24px 24px 16px}
.expedition-deck-modal{max-width:100%;min-width:0!important}
.expedition-deck-modal>p{max-width:68ch;color:#d7edf8}
.expedition-deck-carousel{padding:10px 10%;margin:8px -10%;scroll-padding:0 10%;overflow-y:hidden}
.expedition-deck-slide{flex:0 0 min(620px,82%);min-height:320px}
.expedition-deck-slide h3{font-size:1.18rem}.expedition-deck-slide p{font-size:.98rem;line-height:1.5}
.expedition-deck-modal+.modal-actions,.modal:has(.expedition-deck-modal) .modal-actions{display:grid;grid-template-columns:minmax(160px,.8fr) minmax(240px,1.2fr);gap:12px}
@media(min-width:980px){.friend-search-v5925{grid-template-columns:minmax(240px,.7fr) minmax(420px,1.3fr)!important}.friend-grid-v5925{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px}.friend-card-v5925{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;min-height:110px}.friend-actions{justify-content:flex-end}.friend-actions button{min-width:96px}.friend-chat-btn{background:rgba(96,187,255,.14);border:1px solid rgba(96,187,255,.32)}}
.friend-card-v5925{box-shadow:0 10px 26px rgba(0,0,0,.14)}.friend-copy b{font-size:1.05rem}.friend-copy small{line-height:1.35}.friend-actions{row-gap:8px}.friend-actions .danger-btn{min-width:42px}
.friend-chat-modal{display:grid;gap:14px;min-width:min(720px,86vw)}.friend-chat-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}.friend-chat-head h2{margin:4px 0 4px}.friend-chat-log{display:grid;gap:10px;max-height:48vh;overflow:auto;padding:6px 2px}.friend-chat-item{display:grid;gap:4px;max-width:min(82%,520px);padding:12px 14px;border-radius:18px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.05)}.friend-chat-item small{color:var(--muted)}.friend-chat-item p{margin:0;line-height:1.45}.friend-chat-item.mine{justify-self:end;background:rgba(44,185,194,.15);border-color:rgba(44,185,194,.3)}.friend-chat-item.theirs{justify-self:start;background:rgba(255,255,255,.05)}.friend-chat-compose{display:grid;gap:10px}.friend-chat-compose textarea{width:100%;resize:vertical;min-height:88px;border-radius:16px;padding:12px 14px;border:1px solid rgba(255,255,255,.12);background:#0a2130;color:#fff}.friend-chat-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.notif-modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;margin-bottom:12px}.notif-modal-head h2{margin:0 0 4px}.notif-modal-head p{margin:0;color:var(--muted)}.notif-toolbar{display:flex;gap:8px;flex-wrap:wrap}.notif-list.modern{display:grid;gap:10px;max-height:62vh;overflow:auto;padding-right:2px}.notif-item{padding:14px 15px;border-radius:16px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.04);cursor:pointer}.notif-item.unread{border-color:rgba(72,214,194,.4);box-shadow:0 0 0 1px rgba(72,214,194,.12) inset}.notif-item b{display:block;margin:4px 0 6px}.notif-item p{margin:0;line-height:1.45}.notif-meta-row{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:4px}.notif-type{font-size:.72rem;padding:4px 8px;border-radius:999px;background:rgba(255,255,255,.06);text-transform:uppercase;letter-spacing:.08em}.notif-actions-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.ghost-btn{background:transparent;border:1px dashed rgba(255,255,255,.2);color:#d5eaf2;border-radius:12px;padding:8px 11px}
.pvp-emote-bar.advanced{justify-content:space-between}.pvp-emote-launcher{border-radius:999px;padding:7px 12px;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.05);color:#fff}.emoji-picker-modal{min-width:min(640px,86vw)}.emoji-picker-modal h2{margin-top:0}.emoji-picker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(62px,1fr));gap:10px;margin-top:14px}.emoji-tile{display:grid;place-items:center;font-size:30px;line-height:1;min-height:64px;border-radius:16px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.02);backdrop-filter:blur(2px)}.emoji-tile:hover{transform:translateY(-1px);border-color:rgba(72,214,194,.45)}
@media(max-width:760px){.friend-chat-modal,.emoji-picker-modal{min-width:0;width:100%}.friend-chat-item{max-width:94%}.notif-modal-head{align-items:stretch}.notif-toolbar{width:100%}.notif-toolbar .pill-btn{flex:1}.modal:has(.expedition-deck-modal){padding:18px 14px 14px}.expedition-deck-carousel{padding:8px 6%;margin:4px -6%;scroll-padding:0 6%}.expedition-deck-slide{flex-basis:88%;min-height:286px}}


/* V59.30 — Friends desktop polish + modern controls */
.friends-hero-v5925,
.friend-search-v5925{
  padding:22px 24px!important;
  border-radius:20px!important;
  border:1px solid rgba(91,190,224,.22)!important;
  background:linear-gradient(145deg,rgba(10,35,50,.96),rgba(6,24,36,.98))!important;
  box-shadow:0 14px 34px rgba(0,0,0,.16)!important;
}
.friends-hero-v5925>div:first-child{padding:2px 4px!important;min-width:0}
.friends-hero-v5925 h1{margin:8px 0 6px!important;font-size:clamp(1.75rem,2.2vw,2.45rem)!important;letter-spacing:-.025em!important}
.friends-hero-v5925 p{margin:0!important;color:#a9c8d8!important;font-size:.96rem!important;line-height:1.55!important;max-width:720px}
.friends-summary{gap:10px!important}
.friends-summary span{min-width:86px!important;padding:14px 16px!important;border-radius:16px!important;background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.035))!important;border:1px solid rgba(144,207,232,.12)!important}
.friends-summary b{font-size:1.45rem!important;color:#f7fdff!important}
.friends-summary small{display:block;margin-top:3px!important;color:#91b7ca!important}
.friend-search-v5925{margin-top:14px!important;padding:18px 22px!important}
.friend-search-v5925 h3{font-size:1.12rem!important;margin-bottom:5px!important}
.friend-search-v5925 p{font-size:.9rem!important;line-height:1.45!important;color:#91b4c6!important}
.friend-search-v5925 .trade-inline{display:grid!important;grid-template-columns:minmax(240px,1fr) auto!important;gap:10px!important;align-items:center!important}
.friend-search-v5925 input{height:44px!important;padding:0 14px!important;border-radius:13px!important;background:#091f2d!important;color:#eefaff!important;border:1px solid rgba(98,181,215,.25)!important;outline:none!important}
.friend-search-v5925 input:focus{border-color:#32d8c4!important;box-shadow:0 0 0 3px rgba(50,216,196,.09)!important}
.friend-search-v5925 button[data-action="friend-search"]{height:44px!important;padding:0 18px!important;border-radius:13px!important;border:1px solid rgba(57,199,222,.34)!important;background:linear-gradient(180deg,#164d65,#10394e)!important;color:#eafaff!important;font-weight:900!important;box-shadow:none!important}

.friend-grid-v5925{gap:14px!important;margin-top:12px!important}
.friend-card-v5925{
  position:relative!important;
  min-height:118px!important;
  padding:18px 20px!important;
  border-radius:20px!important;
  border:1px solid rgba(92,171,205,.16)!important;
  background:linear-gradient(145deg,rgba(9,33,47,.97),rgba(5,22,33,.99))!important;
  box-shadow:0 12px 30px rgba(0,0,0,.14)!important;
  overflow:hidden!important;
}
.friend-card-v5925:before{content:"";position:absolute;left:0;top:18px;bottom:18px;width:3px;border-radius:0 4px 4px 0;background:linear-gradient(#31ddc6,#268bc4);opacity:.7}
.friend-main{gap:14px!important;padding-left:4px!important;min-width:0!important}
.friend-avatar-dot{width:46px!important;height:46px!important;flex:0 0 46px!important;background:linear-gradient(145deg,#174a61,#0a2c3e)!important;border:1px solid rgba(121,216,247,.28)!important;box-shadow:0 8px 18px rgba(0,0,0,.2)!important;font-size:.9rem!important}
.friend-copy{gap:4px!important;padding-right:10px!important}
.friend-copy b{font-size:1rem!important;color:#f4fbff!important;letter-spacing:-.01em!important}
.friend-copy small{font-size:.82rem!important;color:#8fb1c2!important;line-height:1.35!important}
.friend-presence{font-size:.68rem!important;letter-spacing:.07em!important}
.friend-actions{gap:8px!important;padding-left:10px!important}
.friend-actions button{
  appearance:none!important;
  min-width:auto!important;
  min-height:38px!important;
  padding:8px 13px!important;
  border-radius:12px!important;
  border:1px solid rgba(125,192,220,.18)!important;
  background:rgba(18,55,73,.72)!important;
  color:#eaf8ff!important;
  font-size:.78rem!important;
  font-weight:850!important;
  line-height:1!important;
  box-shadow:none!important;
  transition:transform .16s ease,border-color .16s ease,background .16s ease!important;
}
.friend-actions button:hover:not(:disabled){transform:translateY(-1px)!important;border-color:rgba(67,216,201,.5)!important;background:rgba(24,70,90,.92)!important}
.friend-actions .friend-chat-btn{background:linear-gradient(180deg,rgba(34,104,134,.65),rgba(17,66,91,.72))!important;border-color:rgba(76,180,220,.34)!important}
.friend-actions .friend-duel-btn{background:linear-gradient(180deg,rgba(63,92,142,.68),rgba(35,59,105,.76))!important;border-color:rgba(110,148,222,.32)!important}
.friend-actions button[data-friend-offer]{background:linear-gradient(180deg,rgba(88,79,35,.72),rgba(55,48,24,.78))!important;border-color:rgba(230,193,78,.28)!important;color:#fff2bd!important}
.friend-actions .friend-duel-btn:disabled{opacity:.42!important;filter:saturate(.55)!important;cursor:not-allowed!important}
.friend-actions .compact-friend-remove{
  width:38px!important;min-width:38px!important;padding:0!important;border-radius:50%!important;
  background:rgba(122,35,48,.72)!important;border-color:rgba(255,98,116,.52)!important;color:#ffdce1!important;font-size:1rem!important;
}
.section-title{padding-left:4px!important;padding-right:4px!important}
.section-title h2{margin-bottom:4px!important;letter-spacing:-.015em!important}
.section-title p{color:#8facbc!important;line-height:1.45!important}
.section-title .pill-btn{border-radius:999px!important;background:rgba(17,52,70,.75)!important;border:1px solid rgba(98,179,210,.22)!important;color:#e8f8ff!important}

/* V59.30 — notification controls */
.notif-toolbar .pill-btn{background:rgba(17,54,72,.88)!important;color:#effcff!important;border:1px solid rgba(94,183,216,.3)!important;box-shadow:none!important}
.notif-toolbar .pill-btn:hover{background:rgba(24,75,97,.96)!important;border-color:rgba(55,211,195,.45)!important}
.notif-item{padding:16px 18px!important}
.notif-actions-row button{background:rgba(17,54,72,.78)!important;color:#effcff!important;border:1px solid rgba(91,175,206,.24)!important;border-radius:12px!important}
.notif-actions-row .primary-btn{background:linear-gradient(180deg,#22aee8,#1689c5)!important;border-color:#39b9ed!important}

@media(max-width:1050px){
  .friend-card-v5925{grid-template-columns:1fr!important;gap:14px!important}
  .friend-actions{padding-left:60px!important;justify-content:flex-start!important}
}
@media(max-width:700px){
  .friends-hero-v5925,.friend-search-v5925{padding:17px!important}
  .friend-search-v5925 .trade-inline{grid-template-columns:1fr!important}
  .friend-card-v5925{padding:16px!important}
  .friend-actions{padding-left:0!important;width:100%!important;display:grid!important;grid-template-columns:1fr 1fr!important}
  .friend-actions .compact-friend-remove{width:100%!important;min-width:0!important;border-radius:12px!important}
}


/* V59.31 — Home tournament schedule + cinematic avatar */
.home-tournament-card{margin:16px 0 18px;padding:20px 22px;background:linear-gradient(145deg,rgba(8,34,48,.96),rgba(6,24,37,.98));border:1px solid rgba(65,197,201,.22);box-shadow:0 14px 38px rgba(0,0,0,.18)}
.home-tournament-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.home-tournament-head h2{margin:7px 0 4px;font-size:1.32rem}.home-tournament-head p{margin:0;max-width:720px;color:var(--muted);line-height:1.5}.home-tournament-head .secondary-btn{white-space:nowrap;background:rgba(57,160,190,.1);border-color:rgba(81,198,224,.3);color:#dff7ff}
.home-tournament-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.home-tournament-row{display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;gap:12px;padding:13px 14px;border-radius:16px;border:1px solid rgba(255,255,255,.075);background:rgba(255,255,255,.028);transition:.18s ease}.home-tournament-row:hover{border-color:rgba(71,206,200,.28);background:rgba(71,206,200,.045)}.home-tournament-row.active{border-color:rgba(75,233,157,.42);background:linear-gradient(135deg,rgba(30,144,105,.14),rgba(19,82,83,.12))}.home-tournament-date{display:grid;place-items:center;padding:8px 6px;border-radius:12px;background:rgba(0,0,0,.18);border:1px solid rgba(255,255,255,.06)}.home-tournament-date b{font-size:.96rem;color:#fff}.home-tournament-date small{font-size:.72rem;color:#90b7ca;margin-top:2px}.home-tournament-copy{display:grid;gap:2px;min-width:0}.home-tournament-copy>small{font-size:.7rem;letter-spacing:.06em;text-transform:uppercase;color:#72b7c8}.home-tournament-copy>b{font-size:.94rem;color:#f4fbff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.home-tournament-copy>span{font-size:.78rem;color:#a7c2d0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.home-tournament-state{justify-self:end;padding:6px 9px;border-radius:999px;font-size:.7rem;font-weight:900;letter-spacing:.04em;color:#9fd7e5;background:rgba(62,145,170,.1);border:1px solid rgba(76,166,190,.2);white-space:nowrap}.home-tournament-state.live{color:#83f2b3;background:rgba(43,187,108,.13);border-color:rgba(83,238,159,.3)}
.cine-portrait img{width:100%;height:100%;object-fit:contain;object-position:center;display:block}
@media(max-width:920px){.home-tournament-list{grid-template-columns:1fr}.home-tournament-head{flex-direction:column}.home-tournament-head .secondary-btn{width:100%}}
@media(max-width:560px){.home-tournament-card{padding:16px 13px}.home-tournament-row{grid-template-columns:62px minmax(0,1fr);gap:10px}.home-tournament-state{grid-column:2;justify-self:start}.home-tournament-copy>b,.home-tournament-copy>span{white-space:normal}}

/* V59.33 — Monthly Tournament Center + PvP Bracket */
.home-menu-tournaments{border-color:#d6a844;background:linear-gradient(145deg,#26331f,#112a32)}
.home-menu-tournaments .home-menu-icon{background:linear-gradient(145deg,#3d3317,#162c32);border-color:rgba(255,211,92,.28)}
.home-menu-tournaments .home-menu-arrow{color:#ffd66b}
.tournament-center-screen{display:grid;gap:16px}
.tournament-center-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;align-items:center;padding:22px;background:linear-gradient(145deg,rgba(10,38,53,.98),rgba(8,24,37,.98));border-color:rgba(225,179,72,.28)}
.tournament-center-hero h1{margin:7px 0 7px;font-size:1.6rem}.tournament-center-hero p{margin:0;max-width:820px;color:var(--muted);line-height:1.55}
.tournament-phase-box{min-width:210px;display:grid;gap:5px;padding:15px 17px;border-radius:16px;border:1px solid rgba(255,210,91,.2);background:rgba(255,199,66,.06)}
.tournament-phase-box small{font-size:.7rem;letter-spacing:.09em;color:#c1a55c}.tournament-phase-box b{font-size:1.03rem;color:#fff}.tournament-phase-box span{font-size:.78rem;color:#9fb8c5}
.tournament-current-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.tournament-current-card{padding:19px;display:grid;gap:10px}.tournament-current-card>small{font-size:.72rem;letter-spacing:.1em;color:#78c4d5;font-weight:900}.tournament-current-card h2{margin:0;font-size:1.25rem}.tournament-current-card p{margin:0;color:var(--muted);line-height:1.5}.tournament-current-stats{display:flex;gap:8px;flex-wrap:wrap}.tournament-current-stats span{padding:8px 10px;border-radius:12px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);font-size:.77rem}.tournament-current-stats b{font-size:1rem;color:#fff}
.tournament-my-match{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:13px 14px;border-radius:15px;border:1px solid rgba(77,199,214,.25);background:rgba(45,158,178,.07)}.tournament-my-match small{color:#83b9c8;font-size:.7rem}.tournament-my-match h3{margin:4px 0;font-size:1rem}.tournament-my-match h3 span{color:#ffd46d;margin:0 5px}.tournament-my-match p{font-size:.78rem}.tournament-champion{padding:11px 13px;border-radius:14px;border:1px solid rgba(255,213,92,.33);background:rgba(255,198,57,.08)}
.tournament-bracket-panel,.tournament-calendar-panel{padding:18px}.tournament-bracket{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(240px,1fr);gap:12px;overflow-x:auto;padding-bottom:4px}.tournament-bracket>section{display:grid;align-content:start;gap:8px;padding:12px;border-radius:16px;background:rgba(255,255,255,.025);border:1px solid rgba(255,255,255,.06)}.tournament-bracket>section h3{margin:0 0 3px;font-size:.92rem;color:#c8e9f5}.bracket-match{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:7px;align-items:center;padding:10px;border-radius:13px;background:#0b2636;border:1px solid rgba(255,255,255,.07)}.bracket-match>span:last-of-type{text-align:right}.bracket-match>b{font-size:.68rem;color:#718f9e}.bracket-match small{grid-column:1/-1;color:#7fa6b8;font-size:.67rem}.bracket-match.done{border-color:rgba(77,224,150,.3);background:rgba(36,116,80,.09)}.tournament-empty{padding:16px;border-radius:14px;border:1px dashed rgba(255,255,255,.12);color:var(--muted);text-align:center}
.tournament-month-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tournament-month-card{display:grid;grid-template-columns:78px minmax(0,1fr);gap:13px;align-items:center;padding:13px;border-radius:16px;border:1px solid rgba(255,255,255,.075);background:rgba(255,255,255,.025)}.tournament-month-card.current{border-color:rgba(255,205,78,.36);background:linear-gradient(135deg,rgba(178,124,22,.09),rgba(31,101,110,.08))}.tournament-month-date{display:grid;place-items:center;padding:8px;border-radius:13px;background:rgba(0,0,0,.18);border:1px solid rgba(255,255,255,.06)}.tournament-month-date b{font-size:1.25rem}.tournament-month-date span{font-size:.72rem;color:#b6d0dc}.tournament-month-date small{font-size:.68rem;color:#7bb8cb}.tournament-month-card>div:last-child>small{font-size:.68rem;color:#7fc2d1;letter-spacing:.07em}.tournament-month-card h3{margin:3px 0 4px;font-size:.95rem}.tournament-month-card p{margin:0;color:var(--muted);font-size:.76rem;line-height:1.4}
@media(max-width:900px){.tournament-center-hero{grid-template-columns:1fr}.tournament-phase-box{min-width:0}.tournament-current-grid,.tournament-month-grid{grid-template-columns:1fr}}
@media(max-width:560px){.tournament-center-hero,.tournament-current-card,.tournament-bracket-panel,.tournament-calendar-panel{padding:14px}.tournament-my-match{grid-template-columns:1fr}.tournament-my-match .primary-btn{width:100%}.tournament-month-card{grid-template-columns:65px minmax(0,1fr)}}


/* V59.34 — social row + trophy shelf + tournament response */
.home-social-card{border-color:#d7aa2f!important;box-shadow:0 0 0 1px rgba(215,170,47,.12) inset,0 10px 24px rgba(0,0,0,.14)!important;background:linear-gradient(145deg,#173548,#102b39)!important}
.home-social-card:hover{border-color:#ffd45c!important;box-shadow:0 0 0 1px rgba(255,212,92,.22) inset,0 14px 30px rgba(0,0,0,.2)!important}
.home-social-card .home-menu-icon{border-color:rgba(255,206,78,.32)!important;background:rgba(101,72,9,.22)!important}
.home-trophy-shelf{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;margin:4px 0 10px;padding:8px 10px;border-radius:13px;border:1px solid rgba(221,176,58,.34);background:linear-gradient(90deg,rgba(91,65,9,.22),rgba(9,38,52,.48));color:#fff;text-align:left}
.home-trophy-title{font-size:9px;letter-spacing:.09em;color:#ffd875;font-weight:1000}.home-trophy-title b{display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:5px;border-radius:999px;background:#604b13;color:#fff}
.home-trophy-list{display:flex;align-items:center;gap:5px}.home-trophy-list i{font-style:normal;font-size:20px;filter:drop-shadow(0 2px 4px rgba(0,0,0,.3))}.home-trophy-list i.empty{filter:grayscale(1);opacity:.35}.home-trophy-list em{font-size:9px;color:#8ca9b9;font-style:normal}
.tournament-response-rule{display:block;margin-top:6px;font-size:10px;color:#f0c967}.tournament-my-match{border-color:rgba(215,170,47,.28)!important}
@media(min-width:821px){.home-menu-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:820px){.home-trophy-shelf{align-items:flex-start}.home-trophy-list{flex-wrap:wrap}}


/* V59.35 — global BGM playlist player */
.music-player-screen{padding-bottom:48px}.music-hero{margin-bottom:14px}.music-now-playing{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:20px;align-items:center;padding:22px;margin-bottom:14px;background:linear-gradient(135deg,rgba(13,47,65,.96),rgba(7,26,39,.98));border:1px solid rgba(70,208,209,.24)}
.music-now-art{width:86px;height:86px;border-radius:22px;display:grid;place-items:center;background:radial-gradient(circle at 35% 30%,rgba(48,220,198,.34),rgba(16,67,85,.36) 58%,rgba(7,26,39,.95));border:1px solid rgba(75,221,206,.32);box-shadow:0 12px 30px rgba(0,0,0,.22)}.music-now-art span{font-size:40px}.music-now-main{min-width:0}.music-now-main>small{font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:#6ce4d1;font-weight:900}.music-now-main h2{margin:4px 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.music-mode-line{font-size:12px;color:#9db9c7}.music-mode-line b{color:#eafcff}.music-seek{width:100%;margin:13px 0 4px}.music-time{font-size:11px;color:#8faab9}.music-main-controls{display:flex;gap:8px;align-items:center}.music-main-controls button{min-width:46px;height:46px;border-radius:14px;border:1px solid rgba(105,214,239,.26);background:#0f3143;color:#eefbff;font-weight:900}.music-main-controls .music-play-main{min-width:112px;background:linear-gradient(135deg,#1480c8,#20b8e5);border-color:#62d8f8;color:#fff}
.music-settings-grid{grid-template-columns:1fr 1fr 1fr!important}.music-mode-buttons{display:flex;gap:9px;flex-wrap:wrap;margin-top:12px}.music-mode-buttons button{padding:10px 13px;border-radius:12px;background:#0d2a3a;border:1px solid rgba(255,255,255,.12);color:#dbeef6}.music-mode-buttons button.active{border-color:#f0bd3e;background:rgba(240,189,62,.12);color:#ffe59a}.music-mode-help{font-size:11px;color:#8ba8b7;line-height:1.45}
.music-library{margin-top:14px}.music-track-list{display:grid;gap:8px}.music-track-row{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:12px;padding:11px 12px;border:1px solid rgba(255,255,255,.08);border-radius:15px;background:rgba(255,255,255,.025);transition:.18s}.music-track-row:hover{background:rgba(255,255,255,.045);border-color:rgba(76,203,218,.22)}.music-track-row.playing{border-color:rgba(66,225,199,.48);background:linear-gradient(90deg,rgba(26,139,129,.13),rgba(255,255,255,.025));box-shadow:0 0 0 1px rgba(66,225,199,.08) inset}.music-track-no{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:#0d2a3a;color:#78a9bd;font-size:11px;font-weight:900}.music-track-row.playing .music-track-no{background:#15594f;color:#97ffe5}.music-track-copy{min-width:0;display:grid;gap:3px}.music-track-copy b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#f2fbff}.music-track-copy small{font-size:9px;letter-spacing:.1em;color:#7397a9}.music-track-row.playing .music-track-copy small{color:#65dfc9}.music-track-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.music-track-actions button{padding:8px 11px;border-radius:11px;border:1px solid rgba(255,255,255,.12);background:#0c2737;color:#dcedf4;font-size:12px}.music-track-actions .music-row-play{border-color:rgba(71,190,232,.34)}.music-track-actions .music-row-lock.active{border-color:#f0bd3e;background:rgba(240,189,62,.13);color:#ffe49a}
@media(max-width:980px){.music-settings-grid{grid-template-columns:1fr!important}.music-now-playing{grid-template-columns:auto 1fr}.music-main-controls{grid-column:1/-1;justify-content:center}}@media(max-width:640px){.music-now-playing{grid-template-columns:1fr;text-align:center}.music-now-art{margin:auto}.music-main-controls{grid-column:auto}.music-track-row{grid-template-columns:38px minmax(0,1fr)}.music-track-actions{grid-column:1/-1;justify-content:stretch}.music-track-actions button{flex:1}.music-now-main h2{white-space:normal}}


/* V59.36 — music library pagination */
.music-pagination{display:grid;grid-template-columns:auto auto 1fr auto;align-items:center;gap:10px;margin-top:14px;padding-top:14px;border-top:1px solid rgba(255,255,255,.08)}
.music-pagination>button,.music-page-numbers button{border:1px solid rgba(97,201,232,.22);background:#0d2b3b;color:#dff3fa;border-radius:11px;padding:8px 11px;font-weight:800}
.music-pagination>button:disabled{opacity:.35;cursor:not-allowed}.music-page-numbers{display:flex;gap:6px}.music-page-numbers button{min-width:36px}.music-page-numbers button.active{border-color:#f0bd3e;background:rgba(240,189,62,.14);color:#ffe39a}.music-pagination>span{justify-self:end;color:#89a8b8;font-size:11px;font-weight:800}
@media(max-width:640px){.music-pagination{grid-template-columns:1fr 1fr}.music-page-numbers{order:3}.music-pagination>span{order:4;justify-self:end}.music-pagination>button{width:100%}}


/* V59.41 — Desktop chat modal + production polish */
@media (min-width: 761px){
  .modal:has(.friend-chat-modal.v5941){
    width:min(860px,calc(100vw - 72px));
    max-height:min(780px,88vh);
    overflow:hidden;
    padding:22px;
  }
  .friend-chat-modal.v5941{
    min-width:0!important;
    width:100%;max-width:100%;
    display:grid;
    grid-template-rows:auto minmax(280px,48vh) auto;
    gap:14px;
  }
  .friend-chat-modal.v5941 .friend-chat-head{
    align-items:center;
    padding-bottom:14px;
    border-bottom:1px solid rgba(113,211,232,.16);
  }
  .friend-chat-modal.v5941 .friend-chat-head h2{font-size:1.6rem;margin:5px 0 2px}
  .friend-chat-modal.v5941 .friend-chat-head p{margin:0;font-size:.9rem}
  .friend-chat-modal.v5941 .friend-chat-log{
    min-height:280px;max-height:none;
    overflow-y:auto;overflow-x:hidden;
    padding:18px;
    border:1px solid rgba(113,211,232,.14);
    border-radius:18px;
    background:linear-gradient(180deg,rgba(4,20,31,.72),rgba(7,29,42,.88));
    scrollbar-gutter:stable;
  }
  .friend-chat-modal.v5941 .friend-chat-item{max-width:72%;padding:11px 14px;border-radius:16px}
  .friend-chat-modal.v5941 .friend-chat-item.mine{border-bottom-right-radius:6px}
  .friend-chat-modal.v5941 .friend-chat-item.theirs{border-bottom-left-radius:6px}
  .friend-chat-modal.v5941 .friend-chat-compose{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;align-items:stretch;
  }
  .friend-chat-modal.v5941 .friend-chat-compose textarea{
    min-height:74px;max-height:130px;resize:vertical;margin:0;
  }
  .friend-chat-modal.v5941 .chat-send-btn{min-width:112px;padding-inline:22px}
  .modal:has(.friend-chat-modal.v5941) .modal-actions{margin-top:12px;padding-top:0}
  .modal:has(.friend-chat-modal.v5941) .modal-actions button{min-width:112px}
}
@media (max-width:760px){
  .friend-chat-modal.v5941{min-width:0!important;width:100%;gap:12px}
  .friend-chat-modal.v5941 .friend-chat-log{max-height:48vh;overflow-y:auto;overflow-x:hidden}
  .friend-chat-modal.v5941 .friend-chat-compose{display:grid!important;grid-template-columns:1fr;gap:9px}
  .friend-chat-modal.v5941 .chat-send-btn{width:100%}
}

/* =========================================================
   V59.42 — WEREWOLF RIMBA ALPHA
   UX inspired by social-deduction table games; original RIMBA styling.
   ========================================================= */
.mini-games-hero{display:grid;gap:8px;padding:24px;margin-bottom:16px}.mini-games-hero h1{margin:0;font-size:clamp(1.8rem,3vw,2.6rem)}.mini-games-hero p{margin:0;color:var(--muted);max-width:760px;line-height:1.55}
.mini-game-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}.mini-game-card{position:relative;display:grid;grid-template-columns:94px 1fr auto;align-items:center;gap:18px;width:100%;padding:22px;border:1px solid rgba(79,195,190,.26);border-radius:22px;background:linear-gradient(145deg,#113247,#0a2230);color:#eefbff;text-align:left;box-shadow:0 14px 36px rgba(0,0,0,.18);cursor:pointer}.mini-game-card:hover{border-color:#48d9c5;transform:translateY(-1px)}.mini-game-card.werewolf{background:radial-gradient(circle at 85% 20%,rgba(79,35,103,.24),transparent 30%),linear-gradient(145deg,#123348,#081d29)}.mini-game-icon{display:grid;place-items:center;width:82px;height:82px;border-radius:22px;font-size:42px;background:linear-gradient(145deg,#173d51,#0b2634);border:1px solid rgba(117,213,208,.25)}.mini-game-card h2{margin:6px 0 5px;font-size:1.45rem}.mini-game-card p{margin:0;color:#b8d1de;line-height:1.5;max-width:850px}.mini-game-tags{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.mini-game-tags span{padding:5px 9px;border-radius:999px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.08);font-size:.76rem;color:#d7edf5}.mini-game-arrow{font-size:28px;color:#61dbc9}
.ww-screen{max-width:1280px;margin:auto}.ww-entry{padding:24px;display:grid;gap:15px}.ww-entry h1{margin:0;font-size:clamp(2rem,4vw,3rem)}.ww-entry>p{margin:0;max-width:850px;line-height:1.55;color:#c0d7e3}.ww-size-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:6px}.ww-size-picker button{display:grid;gap:3px;padding:14px 12px;border-radius:16px;background:#0b2635;border:1px solid #315268;color:#f3fbff;font-weight:1000}.ww-size-picker button small{font-size:.72rem;color:#98bdce}.ww-size-picker button.active{border-color:#f1c849;background:linear-gradient(145deg,#253c31,#17303b);box-shadow:0 0 0 1px rgba(241,200,73,.18) inset}.ww-entry-actions{display:grid;grid-template-columns:1fr 1fr minmax(250px,1.2fr);gap:10px}.ww-join{display:grid;grid-template-columns:1fr auto;gap:8px}.ww-join input{min-width:0;border-radius:12px;border:1px solid #315268;background:#071b27;color:#fff;padding:10px 12px;text-transform:uppercase}.ww-join button{border-radius:12px;border:1px solid #37bccc;background:#124359;color:#fff;font-weight:900}.ww-rules-mini{display:flex;gap:8px;flex-wrap:wrap}.ww-rules-mini span{font-size:.77rem;padding:6px 9px;border-radius:999px;background:#081d29;border:1px solid rgba(255,255,255,.08);color:#b7d0dc}.ww-role-preview{margin-top:14px;padding:18px}.ww-role-preview h3{margin:0 0 12px}.ww-role-preview>div{display:flex;gap:8px;flex-wrap:wrap}.ww-role-preview span{padding:7px 10px;border-radius:11px;background:#0a2432;border:1px solid rgba(255,255,255,.08);font-size:.82rem}
.ww-lobby-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 22px}.ww-lobby-head h1{margin:5px 0}.ww-lobby-head p{margin:0;color:var(--muted)}.ww-lobby-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0}.ww-lobby-grid article{min-height:92px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:14px;border-radius:18px;border:1px solid #234b60;background:#0a2331}.ww-lobby-grid article.empty{opacity:.55;grid-template-columns:auto 1fr}.ww-lobby-grid article.empty>span{font-size:28px}.ww-lobby-grid article .ready{color:#72e2aa;font-size:.72rem;font-weight:1000}.ww-lobby-grid article .wait{color:#e7bd61;font-size:.72rem;font-weight:1000}.ww-lobby-grid article small{grid-column:2;color:#78c8ef;font-weight:900}.ww-lobby-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:16px}.ww-lobby-actions small{color:var(--muted);margin-left:auto}
.ww-game-top{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:12px 16px;margin-bottom:10px;border:1px solid #285064;border-radius:18px;background:linear-gradient(145deg,#0d2a3a,#081d29)}.ww-game-top h2{margin:3px 0;font-size:1.45rem}.ww-game-top p{margin:0;color:#b6cfdb}.ww-phase-clock{min-width:94px;text-align:center;font-size:1.8rem;font-weight:1000;letter-spacing:.04em;padding:11px 13px;border-radius:16px;background:#071822;border:1px solid #2d566d;color:#eafaff}.ww-gameover{display:flex;justify-content:center;align-items:center;gap:14px;padding:12px 18px;border-radius:15px;margin-bottom:10px;border:1px solid}.ww-gameover.good{border-color:#36c78d;background:rgba(27,120,81,.18)}.ww-gameover.evil{border-color:#da5662;background:rgba(128,34,45,.2)}.ww-gameover b{font-size:1.1rem}.ww-gameover span{color:#c8dae3}
.ww-board{position:relative;min-height:640px;border:1px solid #274c5e;border-radius:26px;overflow:hidden;background:radial-gradient(circle at 50% 48%,rgba(39,101,94,.22),transparent 26%),radial-gradient(circle at 50% 45%,rgba(8,23,31,.18),rgba(4,14,20,.86) 72%),linear-gradient(180deg,#102f3d,#081b25);box-shadow:inset 0 0 80px rgba(0,0,0,.3)}.ww-board:before{content:"";position:absolute;inset:16px;border:1px dashed rgba(133,194,185,.12);border-radius:22px;pointer-events:none}.ww-moderator{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(48%,560px);height:330px;padding:18px;border-radius:24px;border:1px solid rgba(237,206,131,.32);background:linear-gradient(145deg,rgba(29,53,58,.96),rgba(11,29,37,.97));box-shadow:0 20px 55px rgba(0,0,0,.35);z-index:3}.ww-moderator-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:10px;border-bottom:1px solid rgba(255,255,255,.08)}.ww-moderator-head span{font-weight:1000;color:#f1d894}.ww-moderator-head b{font-size:.8rem;color:#8cd9cf}.ww-event-scroll{height:260px;overflow:auto;padding:8px 4px 4px;display:grid;align-content:start;gap:5px}.ww-event-scroll p{margin:0;padding:7px 8px;border-radius:10px;background:rgba(255,255,255,.035);font-size:.84rem;line-height:1.4;color:#d8e6eb}.ww-event-scroll small{display:inline-block;min-width:35px;color:#6da2b8;margin-right:4px}.ww-player-card{position:absolute;width:180px;min-height:128px;padding:8px;border-radius:18px;border:1px solid #2c5265;background:linear-gradient(145deg,#0e2b39,#071b25);color:#eef8fc;display:grid;grid-template-columns:64px 1fr;gap:9px;align-items:center;text-align:left;z-index:4;box-shadow:0 11px 24px rgba(0,0,0,.22)}.ww-player-card:not(:disabled){cursor:pointer}.ww-player-card:not(:disabled):hover{border-color:#56d6c4}.ww-player-card.selected{border-color:#ffd559;box-shadow:0 0 0 2px rgba(255,213,89,.2),0 12px 30px rgba(0,0,0,.25)}.ww-player-card.dead{filter:saturate(.2);opacity:.62}.ww-player-card.known-evil{border-color:#bc4858}.ww-player-card .ww-player-roleart{width:64px;height:88px;display:grid;place-items:center;overflow:hidden;border-radius:12px;background:#071823}.ww-player-card .ww-role-art{width:100%;height:100%;object-fit:contain}.ww-hidden-role{font-size:42px;font-weight:1000;color:#668a99}.ww-role-emoji{font-size:42px}.ww-player-meta{min-width:0;display:grid;gap:3px}.ww-player-meta b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ww-player-meta small{font-size:.65rem;color:#9ab5c2;font-weight:1000}.ww-player-meta span{font-size:.72rem;color:#e2c978;line-height:1.2}.ww-player-card.pos-0{left:28px;top:28px}.ww-player-card.pos-1{right:28px;top:28px}.ww-player-card.pos-2{left:28px;top:50%;transform:translateY(-50%)}.ww-player-card.pos-3{right:28px;top:50%;transform:translateY(-50%)}.ww-player-card.pos-4{left:28px;bottom:28px}.ww-player-card.pos-5{right:28px;bottom:28px}.ww-player-card.pos-6{left:50%;top:20px;transform:translateX(-50%)}.ww-player-card.pos-7{left:50%;bottom:20px;transform:translateX(-50%)}
.ww-self-role{display:grid;grid-template-columns:110px 1fr;gap:15px;align-items:center;max-width:760px;margin:14px auto;padding:14px 16px;border-radius:20px;border:1px solid #2d5969;background:linear-gradient(145deg,#103346,#081e2a)}.ww-self-role.good{border-color:#2f9e79}.ww-self-role.evil{border-color:#af4350;background:linear-gradient(145deg,#401d27,#17151c)}.ww-self-role.neutral{border-color:#9a68c7;background:linear-gradient(145deg,#2c2141,#17182a)}.ww-self-art{height:122px;border-radius:14px;background:#071a24;display:grid;place-items:center;overflow:hidden}.ww-self-art .ww-role-art{width:100%;height:100%;object-fit:contain}.ww-self-role small{font-size:.7rem;letter-spacing:.08em;color:#83bfd0;font-weight:1000}.ww-self-role h2{margin:4px 0}.ww-self-role p{margin:0;color:#c6d7df;line-height:1.45}.ww-self-role>div>span{display:block;margin-top:7px;font-size:.78rem}.ww-private-result{margin-top:9px;padding:8px 10px;border-radius:10px;background:rgba(65,176,211,.13);border:1px solid rgba(65,176,211,.25);font-weight:900;font-size:.82rem}
.ww-action-panel{display:grid;gap:10px;padding:14px;margin:12px 0}.ww-action-types{display:flex;gap:8px;flex-wrap:wrap}.ww-action-types button{padding:9px 11px;border-radius:12px;border:1px solid #32576b;background:#0b2635;color:#e9f7fc;font-weight:900}.ww-action-types button.active{border-color:#f2c94f;background:#403719;color:#fff4bb}.ww-passive-note,.ww-day-note,.ww-vote-title{font-weight:900;color:#bad0db}.ww-target-summary{font-size:.86rem;color:#9fbac7}.ww-chat-panel{border:1px solid #294f61;border-radius:20px;background:#081e29;overflow:hidden;margin-top:12px}.ww-chat-tabs{display:flex;gap:5px;padding:9px 10px;border-bottom:1px solid rgba(255,255,255,.07)}.ww-chat-tabs button{padding:7px 10px;border-radius:10px;border:1px solid transparent;background:transparent;color:#8fb0bf;font-weight:900}.ww-chat-tabs button.active{background:#103648;border-color:#2b7182;color:#eaffff}.ww-chat-log{height:210px;overflow:auto;padding:10px;display:grid;align-content:start;gap:6px}.ww-chat-msg{display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:start;padding:6px 8px;border-radius:9px;background:rgba(255,255,255,.03);font-size:.82rem}.ww-chat-msg.mine{background:rgba(44,178,166,.08)}.ww-chat-msg b{color:#64cfbf}.ww-chat-msg span{color:#d9e7ec;overflow-wrap:anywhere}.ww-chat-emote{font-size:22px}.ww-chat-empty{color:#6f93a2;padding:18px;text-align:center}.ww-emote-row{display:flex;gap:5px;padding:7px 10px;overflow-x:auto;border-top:1px solid rgba(255,255,255,.05)}.ww-emote-row button{min-width:38px;height:36px;border-radius:10px;background:transparent;border:1px solid rgba(255,255,255,.08);font-size:18px}.ww-chat-compose{display:grid;grid-template-columns:minmax(0,1fr) 112px;gap:10px;padding:12px;align-items:end;border-top:1px solid rgba(255,255,255,.06);background:#081e29}.ww-chat-compose textarea{box-sizing:border-box;width:100%;min-width:0;min-height:54px;max-height:128px;resize:vertical;padding:12px 13px;border-radius:13px;border:1px solid #315469;background:#071923;color:#fff;font:inherit;font-size:16px;line-height:1.45;outline:none}.ww-chat-compose textarea:focus{border-color:#43cbbb;box-shadow:0 0 0 3px rgba(67,203,187,.12)}.ww-chat-send-btn{min-height:54px;height:54px;align-self:end}.ww-exit-row{display:flex;justify-content:flex-end;margin:10px 0 24px}
@media(max-width:980px){.ww-board{min-height:auto;padding:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.ww-board:before{display:none}.ww-moderator{position:relative;left:auto;top:auto;transform:none;width:auto;height:auto;grid-column:1/-1;grid-row:1;padding:13px}.ww-event-scroll{height:180px}.ww-player-card,.ww-player-card[class*="pos-"]{position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important;width:100%;min-height:105px}.ww-player-card{grid-template-columns:54px 1fr}.ww-player-card .ww-player-roleart{width:54px;height:70px}.ww-self-role{max-width:none}}
@media(max-width:700px){.mini-game-card{grid-template-columns:68px 1fr;padding:16px}.mini-game-icon{width:60px;height:60px;font-size:30px}.mini-game-arrow{display:none}.ww-entry{padding:17px}.ww-size-picker{grid-template-columns:1fr}.ww-entry-actions{grid-template-columns:1fr}.ww-lobby-grid{grid-template-columns:1fr}.ww-lobby-head{align-items:flex-start;flex-direction:column}.ww-lobby-actions{display:grid;grid-template-columns:1fr}.ww-lobby-actions small{margin-left:0}.ww-game-top{align-items:flex-start}.ww-phase-clock{font-size:1.3rem;min-width:78px}.ww-board{grid-template-columns:1fr}.ww-moderator{grid-column:1}.ww-self-role{grid-template-columns:82px 1fr}.ww-self-art{height:96px}.ww-chat-log{height:180px}.ww-chat-compose{grid-template-columns:1fr auto}}

/* V59.43 Werewolf chat input stability */
@media(max-width:700px){.ww-chat-compose{grid-template-columns:minmax(0,1fr) 86px;gap:8px;padding:9px}.ww-chat-compose textarea{min-height:48px;max-height:110px;padding:10px 11px}.ww-chat-send-btn{min-height:48px;height:48px;padding:0 10px}.ww-chat-log{height:200px}}


/* V59.44 — Werewolf Rimba voice room */
.ww-voice-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 12px;border-bottom:1px solid rgba(255,255,255,.07);background:linear-gradient(90deg,rgba(22,71,82,.34),rgba(8,30,41,.72))}
.ww-lobby-grid+.ww-voice-bar{margin:12px 0;border:1px solid #2a5669;border-radius:16px;background:linear-gradient(145deg,#0b2a38,#081e29)}
.ww-voice-copy{display:grid;gap:2px;min-width:0}.ww-voice-copy b{font-size:.9rem;color:#eafaff}.ww-voice-copy small{color:#8eb5c5;line-height:1.35}
.ww-voice-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.ww-voice-actions button{min-height:38px;padding:8px 12px;border-radius:12px;white-space:nowrap}
.ww-voice-actions [data-action="ww-voice-mute"]{border-color:#2b9aa6;background:rgba(22,111,125,.24)}
@media(max-width:700px){.ww-voice-bar{align-items:stretch;flex-direction:column}.ww-voice-actions{display:grid;grid-template-columns:1fr 1fr}.ww-voice-actions button:first-child:last-child{grid-column:1/-1}.ww-voice-copy small{font-size:.76rem}}

/* V59.45 Chrome/WebRTC voice fixes */
.ww-voice-actions [data-action="ww-voice-unlock"]{border-color:#f4c84a;background:rgba(244,200,74,.16);color:#fff6c9}.ww-voice-copy small{min-height:1.35em}

/* V59.46 — Werewolf UX polish */
.ww-game-top{align-items:stretch}.ww-game-top>div:first-child{min-width:0}.ww-game-side-badges{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}.ww-game-pill{min-width:86px;padding:10px 12px;border-radius:15px;border:1px solid rgba(104,186,198,.24);background:linear-gradient(145deg,#0f3041,#0a202d);display:grid;gap:2px;text-align:center}.ww-game-pill small{font-size:.7rem;color:#88aebe;font-weight:900;text-transform:uppercase;letter-spacing:.06em}.ww-game-pill b{font-size:1rem;color:#fff}
.ww-phase-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}.ww-phase-step{padding:14px;border-radius:18px;border:1px solid rgba(88,137,161,.24);background:linear-gradient(145deg,#0d2735,#081c27);display:grid;gap:7px}.ww-phase-step-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.ww-phase-step-top span{font-size:1.15rem}.ww-phase-step-top small{font-size:.66rem;color:#88aebe;font-weight:900;letter-spacing:.08em}.ww-phase-step b{font-size:1rem}.ww-phase-step p{margin:0;color:#a8c3d0;font-size:.8rem;line-height:1.42}.ww-phase-step.active{border-color:#45d5c3;box-shadow:0 0 0 1px rgba(69,213,195,.16) inset,0 12px 28px rgba(0,0,0,.18)}.ww-phase-step.done{border-color:#2da66b;background:linear-gradient(145deg,#143629,#0a2018)}.ww-phase-step.upcoming{opacity:.9}
.ww-live-status{display:grid;grid-template-columns:minmax(0,1.4fr) auto;gap:16px;align-items:center;padding:16px 18px;margin:0 0 12px;border-radius:20px;border:1px solid #285064;background:linear-gradient(145deg,#0f3041,#091f2b)}.ww-live-status.night{border-color:#6b4aa2;background:linear-gradient(145deg,#241d3a,#0b2130)}.ww-live-status.day{border-color:#2e7e95;background:linear-gradient(145deg,#133449,#0a2230)}.ww-live-status.vote{border-color:#d1a745;background:linear-gradient(145deg,#463619,#101f29)}.ww-live-status.finished{border-color:#7e8f99;background:linear-gradient(145deg,#213541,#10202b)}.ww-live-copy h3{margin:5px 0 6px;font-size:1.4rem}.ww-live-copy p{margin:0;color:#c3d5de;line-height:1.45}.ww-live-hint{margin-top:10px;padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);color:#eaf5f8;font-size:.9rem}.ww-live-metrics{display:grid;grid-template-columns:repeat(3,minmax(86px,1fr));gap:10px}.ww-live-metrics>div{padding:12px 11px;border-radius:16px;background:rgba(4,15,21,.45);border:1px solid rgba(255,255,255,.08);display:grid;gap:4px;text-align:center}.ww-live-metrics small{font-size:.68rem;color:#87abba;font-weight:900;text-transform:uppercase;letter-spacing:.07em}.ww-live-metrics b{font-size:1.28rem;color:#fff}.ww-metric-clock{letter-spacing:.04em}
.ww-board{min-height:600px}.ww-moderator{width:min(46%,540px);height:352px}.ww-event-scroll{height:282px}
.ww-lower-grid{display:grid;grid-template-columns:minmax(320px,.95fr) minmax(0,1.25fr);gap:14px;margin-top:14px;align-items:start}.ww-left-stack,.ww-right-stack{display:grid;gap:14px}
.ww-self-role{max-width:none;margin:0}.ww-action-panel{margin:0}.ww-action-header h3{margin:6px 0 0}.ww-chat-panel{margin-top:0}.ww-chat-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid rgba(255,255,255,.07);background:linear-gradient(145deg,#0d2b3b,#081d29)}.ww-chat-head h3{margin:6px 0 4px}.ww-chat-head p{margin:0;color:#a9c3cf;font-size:.88rem;line-height:1.45}.ww-chat-tabs{padding-top:10px}.ww-chat-log{height:280px}.ww-chat-compose textarea{min-height:58px}.ww-chat-msg{padding:8px 10px}.ww-chat-msg b{min-width:76px}
.ww-voice-kicker{font-size:.7rem;font-weight:900;letter-spacing:.08em;color:#7fbfd0;text-transform:uppercase}.ww-voice-alert{margin-top:8px;padding:8px 10px;border-radius:12px;background:rgba(215,95,92,.12);border:1px solid rgba(215,95,92,.28);color:#ffd9d7;font-size:.83rem;line-height:1.4}.ww-voice-tip{margin-top:8px;padding:8px 10px;border-radius:12px;background:rgba(244,200,74,.12);border:1px solid rgba(244,200,74,.25);color:#f8e6ad;font-size:.82rem;line-height:1.4}.ww-voice-actions [data-action="ww-voice-help"]{border-color:#5c85a6;background:rgba(92,133,166,.16)}

@media(max-width:1100px){.ww-phase-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.ww-lower-grid{grid-template-columns:1fr}.ww-board{min-height:auto}.ww-chat-log{height:240px}}
@media(max-width:760px){.ww-game-side-badges{justify-content:flex-start}.ww-live-status{grid-template-columns:1fr}.ww-live-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.ww-phase-strip{grid-template-columns:1fr}.ww-moderator{height:auto}.ww-event-scroll{height:210px}}
@media(max-width:700px){.ww-chat-head{padding:10px 11px}.ww-chat-log{height:210px}.ww-live-metrics{grid-template-columns:1fr 1fr 1fr}.ww-live-copy h3{font-size:1.15rem}}

/* V59.47 — microphone permission state */
.ww-mic-permission{margin-top:8px;display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:999px;font-size:.78rem;font-weight:900;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.04);color:#cfe5ed}.ww-mic-permission.granted{border-color:rgba(50,199,130,.35);background:rgba(50,199,130,.12);color:#bff3d6}.ww-mic-permission.denied{border-color:rgba(222,91,91,.4);background:rgba(222,91,91,.12);color:#ffd1cf}.ww-mic-permission.prompt{border-color:rgba(244,200,74,.36);background:rgba(244,200,74,.11);color:#ffedb0}.ww-voice-actions [data-action="ww-voice-retry"]{border-color:#f1c34e;background:rgba(241,195,78,.16);color:#fff2be}

/* V59.49 — Werewolf compact mobile + chat stability */
.ww-compact-screen .ww-game-top{margin-bottom:10px}
.ww-compact-screen .ww-mod-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.ww-compact-screen .secondary-btn.tiny{padding:7px 10px;min-height:auto;font-size:.74rem;border-radius:10px}
.ww-compact-screen .ww-board{min-height:460px}
.ww-compact-screen .ww-moderator{height:250px;padding:14px;width:min(42%,500px)}
.ww-compact-screen .ww-event-scroll{height:184px;font-size:.8rem}
.ww-compact-screen .ww-player-card{width:138px;min-height:92px;grid-template-columns:42px 1fr;padding:7px;gap:7px;border-radius:14px}
.ww-compact-screen .ww-player-card .ww-player-roleart{width:42px;height:56px;border-radius:9px}
.ww-compact-screen .ww-player-meta b{font-size:.88rem}
.ww-compact-screen .ww-player-meta small{font-size:.58rem}
.ww-compact-screen .ww-player-meta span{font-size:.62rem}
.ww-compact-screen .ww-hidden-role,.ww-compact-screen .ww-role-emoji{font-size:30px}
.ww-compact-screen .ww-player-card.pos-0{left:16px;top:16px}.ww-compact-screen .ww-player-card.pos-1{right:16px;top:16px}.ww-compact-screen .ww-player-card.pos-2{left:16px;top:50%}.ww-compact-screen .ww-player-card.pos-3{right:16px;top:50%}.ww-compact-screen .ww-player-card.pos-4{left:16px;bottom:16px}.ww-compact-screen .ww-player-card.pos-5{right:16px;bottom:16px}.ww-compact-screen .ww-player-card.pos-6{top:14px}.ww-compact-screen .ww-player-card.pos-7{bottom:14px}
.ww-compact-screen .ww-phase-strip{gap:8px}.ww-compact-screen .ww-phase-step{padding:10px 11px;border-radius:14px}.ww-compact-screen .ww-phase-step p{font-size:.73rem;line-height:1.32}.ww-compact-screen .ww-phase-step b{font-size:.92rem}
.ww-compact-screen .ww-live-status{padding:12px 13px;gap:12px;border-radius:16px}.ww-compact-screen .ww-live-copy h3{font-size:1.15rem}.ww-compact-screen .ww-live-copy p{font-size:.86rem}.ww-compact-screen .ww-live-hint{padding:8px 10px;font-size:.82rem}.ww-compact-screen .ww-live-metrics>div{padding:9px 8px;border-radius:12px}.ww-compact-screen .ww-live-metrics b{font-size:1.05rem}
.ww-compact-screen .ww-self-role{grid-template-columns:78px 1fr;gap:12px;padding:12px 13px;border-radius:16px}.ww-compact-screen .ww-self-art{height:88px}.ww-compact-screen .ww-self-role h2{font-size:1.02rem;margin:2px 0 4px}.ww-compact-screen .ww-self-role p{font-size:.82rem;line-height:1.35}.ww-compact-screen .ww-self-role small{font-size:.62rem}.ww-compact-screen .ww-self-role>div>span,.ww-compact-screen .ww-private-result{font-size:.72rem}
.ww-compact-screen .ww-action-panel{padding:12px;border-radius:16px}.ww-compact-screen .ww-action-types button{padding:8px 10px;font-size:.78rem;border-radius:10px}
.ww-compact-screen .ww-chat-panel.compact{border-radius:16px}.ww-compact-screen .ww-chat-head{padding:10px 12px}.ww-compact-screen .ww-chat-head h3{font-size:1rem}.ww-compact-screen .ww-chat-head p{font-size:.78rem;line-height:1.35}.ww-compact-screen .ww-chat-log{height:190px;padding:8px;gap:5px}.ww-compact-screen .ww-chat-msg{padding:6px 7px;font-size:.78rem;border-radius:8px}.ww-compact-screen .ww-chat-msg b{min-width:58px;font-size:.76rem}.ww-compact-screen .ww-chat-tabs{padding:7px 8px;gap:4px}.ww-compact-screen .ww-chat-tabs button{padding:6px 8px;font-size:.73rem}.ww-compact-screen .ww-emote-row{padding:6px 8px;gap:4px}.ww-compact-screen .ww-emote-row button{min-width:32px;height:32px;font-size:16px}.ww-compact-screen .ww-chat-compose{grid-template-columns:minmax(0,1fr) 82px;gap:8px;padding:8px}.ww-compact-screen .ww-chat-compose textarea{min-height:44px;max-height:80px;padding:9px 10px;font-size:15px;border-radius:10px}.ww-compact-screen .ww-chat-send-btn{min-height:44px;height:44px;padding:0 8px}
.ww-compact-screen .ww-voice-bar{padding:10px 12px;gap:10px}.ww-compact-screen .ww-voice-copy small{font-size:.76rem;line-height:1.32}.ww-compact-screen .ww-voice-actions{gap:6px}.ww-compact-screen .ww-voice-actions button{padding:7px 9px;border-radius:10px;font-size:.74rem}

@media(max-width:900px){
  .ww-compact-screen .ww-board{min-height:auto;padding:10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .ww-compact-screen .ww-board:before{display:none}
  .ww-compact-screen .ww-moderator{position:relative;left:auto;top:auto;transform:none;grid-column:1/-1;width:auto;height:auto;padding:12px}
  .ww-compact-screen .ww-event-scroll{height:130px}
  .ww-compact-screen .ww-player-card,.ww-compact-screen .ww-player-card[class*="pos-"]{position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important;width:100%;min-height:74px;grid-template-columns:36px 1fr;gap:6px;padding:6px}
  .ww-compact-screen .ww-player-card .ww-player-roleart{width:36px;height:48px}
  .ww-compact-screen .ww-hidden-role,.ww-compact-screen .ww-role-emoji{font-size:24px}
}
@media(max-width:700px){
  .ww-compact-screen .screen-topbar{margin-bottom:8px}
  .ww-compact-screen .ww-game-top{display:grid;grid-template-columns:1fr;gap:8px}.ww-compact-screen .ww-game-top h2{font-size:1.3rem}
  .ww-compact-screen .ww-game-side-badges{justify-content:flex-start}
  .ww-compact-screen .ww-phase-strip{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .ww-compact-screen .ww-phase-step{padding:8px 7px;gap:4px}
  .ww-compact-screen .ww-phase-step-top{display:block}.ww-compact-screen .ww-phase-step-top small{display:block;margin-top:2px}.ww-compact-screen .ww-phase-step b{font-size:.74rem}.ww-compact-screen .ww-phase-step p{display:none}
  .ww-compact-screen .ww-live-status{padding:10px 11px}.ww-compact-screen .ww-live-copy p{display:none}.ww-compact-screen .ww-live-copy h3{font-size:1rem}.ww-compact-screen .ww-live-hint{margin-top:6px;font-size:.76rem;padding:7px 8px}.ww-compact-screen .ww-live-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .ww-compact-screen .ww-board{grid-template-columns:1fr 1fr;gap:7px;padding:8px}
  .ww-compact-screen .ww-moderator{grid-column:1/-1}.ww-compact-screen .ww-event-scroll{height:112px}
  .ww-compact-screen .ww-lower-grid.compact{gap:10px}.ww-compact-screen .ww-left-stack,.ww-compact-screen .ww-right-stack{gap:10px}
  .ww-compact-screen .ww-chat-head p{display:none}.ww-compact-screen .ww-voice-tip{display:none}
}
@media(max-width:520px){
  .ww-compact-screen .ww-board{grid-template-columns:1fr 1fr}
  .ww-compact-screen .ww-player-meta span{display:none}
  .ww-compact-screen .ww-player-meta small{font-size:.55rem}
  .ww-compact-screen .ww-chat-log{height:156px}
  .ww-compact-screen .ww-chat-compose{grid-template-columns:minmax(0,1fr) 72px}.ww-compact-screen .ww-chat-send-btn{font-size:.78rem}
  .ww-compact-screen .ww-voice-bar{padding:8px 10px}.ww-compact-screen .ww-voice-copy .ww-voice-tip,.ww-compact-screen .ww-voice-copy .ww-voice-alert{margin-top:6px}
  .ww-compact-screen .ww-self-role{grid-template-columns:64px 1fr}.ww-compact-screen .ww-self-art{height:74px}
}

/* V59.50 — Werewolf board-first compact layout */
.ww-v5950-screen .ww-phase-strip,.ww-v5950-screen .ww-live-status,.ww-v5950-screen .ww-action-panel{display:none!important}
.ww-v5950-status{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:11px 14px;margin-bottom:10px;border:1px solid #285064;border-radius:16px;background:linear-gradient(145deg,#0d2a3a,#081d29)}
.ww-v5950-status-copy{min-width:0}.ww-v5950-status-copy h2{margin:4px 0 3px;font-size:1.25rem}.ww-v5950-status-copy p{margin:0;color:#b9ced8;font-size:.84rem;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ww-v5950-metrics{display:grid;grid-template-columns:repeat(3,74px);gap:7px}.ww-v5950-metrics>div{display:grid;gap:2px;text-align:center;padding:8px 7px;border-radius:12px;border:1px solid rgba(255,255,255,.08);background:#071923}.ww-v5950-metrics small{font-size:.58rem;color:#86aebb;font-weight:1000;letter-spacing:.08em}.ww-v5950-metrics b{font-size:1rem;color:#f5fbff}
.ww-v5950-play-area{display:grid;grid-template-columns:1fr;gap:10px}
.ww-v5950-board{position:relative!important;display:block!important;min-height:0!important;height:auto!important;padding:10px!important;overflow:visible!important;border-radius:18px!important}
.ww-v5950-board:before{display:none!important}
.ww-v5950-moderator{position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important;width:100%!important;max-width:none!important;height:auto!important;box-sizing:border-box!important;padding:13px 14px!important;border-radius:16px!important;margin:0!important}
.ww-v5950-moderator .ww-moderator-head{padding-bottom:8px}.ww-v5950-moderator .ww-moderator-head span{font-size:1rem}.ww-v5950-moderator .ww-moderator-head b{font-size:.76rem}
.ww-v5950-moderator .ww-event-scroll{height:176px!important;padding:7px 2px 1px!important;gap:4px!important}.ww-v5950-moderator .ww-event-scroll p{font-size:.9rem!important;line-height:1.42!important;padding:7px 9px!important;border-radius:9px!important}.ww-v5950-moderator .ww-event-scroll small{font-size:.68rem!important;min-width:32px!important}
.ww-v5950-player-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:9px}
.ww-v5950-player-grid .ww-player-card,.ww-v5950-player-grid .ww-player-card[class*="pos-"]{position:relative!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;transform:none!important;width:100%!important;min-width:0!important;min-height:76px!important;height:auto!important;box-sizing:border-box!important;grid-template-columns:40px minmax(0,1fr)!important;gap:7px!important;padding:7px!important;border-radius:13px!important}
.ww-v5950-player-grid .ww-player-roleart{width:40px!important;height:52px!important;border-radius:9px!important}.ww-v5950-player-grid .ww-role-art{object-fit:contain!important}.ww-v5950-player-grid .ww-hidden-role,.ww-v5950-player-grid .ww-role-emoji{font-size:27px!important}.ww-v5950-player-grid .ww-player-meta b{font-size:.82rem!important}.ww-v5950-player-grid .ww-player-meta small{font-size:.55rem!important}.ww-v5950-player-grid .ww-player-meta span{font-size:.61rem!important}
.ww-v5950-chat{margin-top:0}.ww-v5950-chat .ww-chat-panel{margin:0!important;border-radius:16px!important}.ww-v5950-chat .ww-chat-head{padding:8px 11px!important}.ww-v5950-chat .ww-chat-head h3{font-size:.95rem!important;margin:4px 0 0!important}.ww-v5950-chat .ww-chat-head p{display:none!important}.ww-v5950-chat .ww-voice-bar{padding:8px 10px!important}.ww-v5950-chat .ww-chat-log{height:166px!important;padding:7px 8px!important}.ww-v5950-chat .ww-chat-msg{font-size:.77rem!important;padding:5px 7px!important}.ww-v5950-chat .ww-emote-row{padding:5px 8px!important}.ww-v5950-chat .ww-emote-row button{min-width:30px!important;height:30px!important;font-size:15px!important}.ww-v5950-chat .ww-chat-compose{padding:7px 8px!important;grid-template-columns:minmax(0,1fr) 78px!important;gap:7px!important}.ww-v5950-chat .ww-chat-compose textarea{min-height:42px!important;max-height:72px!important;padding:8px 9px!important;font-size:15px!important}.ww-v5950-chat .ww-chat-send-btn{height:42px!important;min-height:42px!important}
.ww-v5950-self{margin:10px 0 0!important;max-width:none!important;grid-template-columns:76px minmax(0,1fr)!important;gap:11px!important;padding:10px 12px!important;border-radius:16px!important}.ww-v5950-self .ww-self-art{height:82px!important}.ww-v5950-self .ww-self-copy{min-width:0}.ww-v5950-self h2{font-size:1rem!important;margin:2px 0 3px!important}.ww-v5950-self p{font-size:.8rem!important;line-height:1.34!important}.ww-v5950-self small{font-size:.59rem!important}.ww-v5950-self>div>span{font-size:.7rem!important}
.ww-self-controls{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:8px;padding-top:7px;border-top:1px solid rgba(255,255,255,.08)}.ww-self-controls-title{font-size:.72rem;font-weight:1000;color:#e2c978}.ww-self-controls .ww-action-types{display:flex;gap:5px;flex-wrap:wrap}.ww-self-controls .ww-action-types button{padding:6px 8px!important;font-size:.7rem!important;border-radius:9px!important}.ww-self-controls .ww-passive-note{font-size:.72rem!important}.ww-self-controls .ww-target-summary{font-size:.72rem!important;margin-left:auto}.ww-inline-confirm{min-height:32px!important;padding:6px 9px!important;font-size:.72rem!important;border-radius:9px!important}
.ww-v5950-screen .ww-exit-row{margin:8px 0 18px!important}

@media(max-width:900px){
  .ww-v5950-status-copy p{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .ww-v5950-player-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .ww-v5950-moderator .ww-event-scroll{height:158px!important}
}
@media(max-width:700px){
  .ww-v5950-screen{padding-left:8px!important;padding-right:8px!important}
  .ww-v5950-status{grid-template-columns:1fr auto;padding:9px 10px;gap:8px;margin-bottom:8px}.ww-v5950-status-copy h2{font-size:1.05rem}.ww-v5950-status-copy p{font-size:.74rem;-webkit-line-clamp:1}.ww-v5950-metrics{grid-template-columns:repeat(3,54px);gap:4px}.ww-v5950-metrics>div{padding:6px 4px}.ww-v5950-metrics small{font-size:.49rem}.ww-v5950-metrics b{font-size:.87rem}
  .ww-v5950-board{padding:7px!important;border-radius:14px!important}
  .ww-v5950-moderator{width:100%!important;padding:10px!important;border-radius:13px!important}.ww-v5950-moderator .ww-moderator-head{align-items:flex-start}.ww-v5950-moderator .ww-moderator-head span{font-size:.9rem}.ww-v5950-moderator .ww-mod-actions{gap:5px}.ww-v5950-moderator .secondary-btn.tiny{padding:5px 7px!important;font-size:.62rem!important}.ww-v5950-moderator .ww-event-scroll{height:142px!important}.ww-v5950-moderator .ww-event-scroll p{font-size:.82rem!important;line-height:1.38!important;padding:6px 7px!important}
  .ww-v5950-player-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;margin-top:7px!important}
  .ww-v5950-player-grid .ww-player-card,.ww-v5950-player-grid .ww-player-card[class*="pos-"]{min-height:66px!important;grid-template-columns:34px minmax(0,1fr)!important;padding:5px!important;gap:5px!important;border-radius:11px!important}.ww-v5950-player-grid .ww-player-roleart{width:34px!important;height:44px!important}.ww-v5950-player-grid .ww-hidden-role,.ww-v5950-player-grid .ww-role-emoji{font-size:23px!important}.ww-v5950-player-grid .ww-player-meta b{font-size:.74rem!important}.ww-v5950-player-grid .ww-player-meta small{font-size:.49rem!important}.ww-v5950-player-grid .ww-player-meta span{display:none!important}
  .ww-v5950-chat .ww-chat-log{height:148px!important}.ww-v5950-chat .ww-voice-copy small{font-size:.68rem!important}.ww-v5950-chat .ww-voice-actions button{font-size:.68rem!important;padding:6px 7px!important}.ww-v5950-chat .ww-voice-tip{display:none!important}
  .ww-v5950-self{grid-template-columns:62px minmax(0,1fr)!important;padding:8px 9px!important;gap:8px!important}.ww-v5950-self .ww-self-art{height:68px!important}.ww-v5950-self h2{font-size:.9rem!important}.ww-v5950-self p{font-size:.73rem!important}.ww-v5950-self small{font-size:.53rem!important}
  .ww-self-controls{gap:5px;margin-top:6px;padding-top:6px}.ww-self-controls-title{font-size:.65rem}.ww-self-controls .ww-target-summary{width:100%;margin-left:0;font-size:.66rem!important}.ww-inline-confirm{font-size:.67rem!important}
}
@media(max-width:430px){
  .ww-v5950-status-copy p{display:none}.ww-v5950-status{grid-template-columns:minmax(0,1fr) auto}.ww-v5950-metrics{grid-template-columns:repeat(3,48px)}
  .ww-v5950-moderator .ww-event-scroll{height:128px!important}.ww-v5950-chat .ww-chat-log{height:132px!important}
}

/* V59.51 — Guided Duel Tutorial */
.guided-tutorial-done{margin-top:10px;padding:9px 12px;border-radius:12px;border:1px solid rgba(74,207,148,.28);background:rgba(74,207,148,.08);color:#bff6d9;font-size:.82rem;font-weight:800}
.gt-screen{max-width:1180px;margin:auto}.gt-guide{display:grid;grid-template-columns:62px minmax(0,1fr) auto;align-items:center;gap:14px;margin-bottom:12px;padding:14px 16px;border-radius:18px;border:1px solid #3b6b79;background:linear-gradient(145deg,#123847,#0b2733);box-shadow:0 14px 34px rgba(0,0,0,.18)}.gt-moderator-avatar{width:54px;height:54px;display:grid;place-items:center;border-radius:16px;font-size:30px;background:#071c27;border:1px solid rgba(244,207,110,.3)}.gt-guide-copy small{font-size:.68rem;color:#e2c873;font-weight:1000;letter-spacing:.08em}.gt-guide-copy h2{margin:3px 0 4px;font-size:1.18rem}.gt-guide-copy p{margin:0;color:#c7dbe3;line-height:1.42}.gt-guide-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.gt-guide-actions button{padding:8px 10px;min-height:38px}
.gt-arena{display:grid;grid-template-columns:minmax(0,1fr) 130px minmax(0,1fr);gap:16px;align-items:center;padding:16px;background:radial-gradient(circle at 50% 50%,rgba(41,116,105,.18),transparent 28%),linear-gradient(145deg,#102f3d,#071b25)}.gt-side{min-height:220px;display:grid;grid-template-rows:auto 110px auto auto auto;justify-items:center;gap:7px;padding:13px;border-radius:18px;border:1px solid #2d5669;background:rgba(5,21,29,.7);transition:.2s ease;cursor:pointer}.gt-side>small{font-size:.66rem;color:#83aebd;font-weight:1000;letter-spacing:.08em}.gt-side h3{margin:0;font-size:1rem}.gt-unit-art{width:104px;height:110px;display:grid;place-items:center;border-radius:14px;background:#061923;overflow:hidden}.gt-guardian-art{width:100%;height:100%;object-fit:contain}.gt-enemy-art{font-size:58px}.gt-hp-label{width:100%;display:flex;justify-content:space-between;align-items:center;font-size:.78rem}.gt-hp-label span{color:#8fb0bd}.gt-hpbar{width:100%;height:9px;border-radius:999px;background:#07141b;overflow:hidden;border:1px solid rgba(255,255,255,.06)}.gt-hpbar i{display:block;height:100%;background:#35c98b;transition:width .35s ease}.gt-hpbar.enemy i{background:#df5b64}.gt-center{display:grid;justify-items:center;gap:8px}.gt-vs{font-size:2rem;font-weight:1000;color:#f0c95b}.gt-round,.gt-points{padding:7px 10px;border-radius:11px;background:#081c27;border:1px solid rgba(255,255,255,.08);font-size:.78rem;font-weight:900}.gt-ai-thinking{font-size:.72rem;color:#ffd98c;text-align:center}
.gt-controls{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:12px;margin-top:12px}.gt-hand{padding:13px}.gt-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.gt-section-head small{font-size:.65rem;color:#7da7b8;font-weight:1000;letter-spacing:.08em}.gt-section-head h3{margin:3px 0 0;font-size:1rem}.gt-section-head>b{font-size:.9rem;color:#f4d166}.gt-hand-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.gt-hand-card{position:relative;min-height:150px;padding:10px;border-radius:15px;border:1px solid #33596a;background:linear-gradient(145deg,#0e2d3b,#081f2a);color:#eefaff;text-align:left;display:grid;align-content:start;gap:5px;cursor:pointer;transition:.18s ease}.gt-hand-card.option{border-color:#8a5d84}.gt-hand-card.point{border-color:#6f7b84}.gt-hand-card.selected{border-color:#f2cf5b;box-shadow:0 0 0 2px rgba(242,207,91,.16)}.gt-kind{font-size:.6rem;color:#8fb2c0;font-weight:1000;letter-spacing:.07em}.gt-cost{position:absolute;right:8px;top:8px;font-size:.72rem;color:#ffe183}.gt-card-icon{font-size:28px}.gt-hand-card strong{font-size:.86rem}.gt-hand-card small{color:#a9c3cf;line-height:1.32;font-size:.72rem}.gt-empty-hand{padding:20px;color:#829eaa}.gt-action-box{padding:13px;display:grid;gap:8px;align-content:start}.gt-action-box small{font-size:.64rem;color:#7fa5b5;font-weight:1000}.gt-action-box h3{margin:2px 0 4px}.gt-action-box p{margin:0 0 5px;color:#abc2cd;font-size:.8rem;line-height:1.35}.gt-action-box button{width:100%;min-height:42px}.gt-log{margin-top:12px;padding:11px 13px}.gt-log>small{font-size:.65rem;color:#7ca4b4;font-weight:1000}.gt-log p{margin:5px 0 0;font-size:.76rem;color:#b7ccd5}.gt-complete{margin-top:12px;padding:18px;text-align:center}.gt-complete>div:first-child{font-size:40px}.gt-complete h2{margin:7px 0}.gt-complete p{color:#b9d0da}.gt-complete>div:last-child{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.gt-focus{position:relative;z-index:2;animation:gtPulse 1.1s ease-in-out infinite;border-color:#ffd75a!important;box-shadow:0 0 0 3px rgba(255,215,90,.18),0 0 28px rgba(255,215,90,.24)!important}.gt-guide.gt-focus{animation:none}.gt-guide.point,.gt-guide.attack,.gt-guide.heal,.gt-guide.spare,.gt-guide.finisher,.gt-guide.enemy,.gt-guide.self,.gt-guide.use,.gt-guide.discard,.gt-guide.end{border-color:#4b8999}@keyframes gtPulse{0%,100%{box-shadow:0 0 0 2px rgba(255,215,90,.13),0 0 18px rgba(255,215,90,.14)}50%{box-shadow:0 0 0 4px rgba(255,215,90,.24),0 0 30px rgba(255,215,90,.28)}}
@media(max-width:850px){.gt-guide{grid-template-columns:48px 1fr}.gt-moderator-avatar{width:44px;height:44px;font-size:24px}.gt-guide-actions{grid-column:1/-1;justify-content:stretch}.gt-guide-actions button{flex:1}.gt-arena{grid-template-columns:1fr 74px 1fr;gap:8px;padding:10px}.gt-side{min-height:178px;grid-template-rows:auto 78px auto auto auto;padding:9px}.gt-unit-art{width:72px;height:78px}.gt-enemy-art{font-size:42px}.gt-center{gap:6px}.gt-vs{font-size:1.4rem}.gt-controls{grid-template-columns:1fr}.gt-hand-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.gt-action-box{grid-template-columns:1fr 1fr 1fr;align-items:end}.gt-action-box>div{grid-column:1/-1}.gt-hand-card{min-height:118px}.gt-card-icon{font-size:24px}}
@media(max-width:520px){.gt-screen{padding-left:8px!important;padding-right:8px!important}.gt-guide{margin-bottom:8px;padding:10px;border-radius:14px;gap:9px}.gt-guide-copy h2{font-size:1rem}.gt-guide-copy p{font-size:.78rem}.gt-guide-actions{display:grid;grid-template-columns:1fr 1fr}.gt-guide-actions .primary-btn{grid-column:1/-1}.gt-arena{grid-template-columns:1fr 54px 1fr;border-radius:15px}.gt-side{min-height:154px;grid-template-rows:auto 62px auto auto auto;gap:4px;padding:7px}.gt-unit-art{width:58px;height:62px}.gt-side h3{font-size:.8rem;text-align:center}.gt-side>small{font-size:.55rem}.gt-hp-label{font-size:.66rem}.gt-center{font-size:.66rem}.gt-vs{font-size:1.15rem}.gt-round,.gt-points{padding:5px 6px;font-size:.62rem}.gt-hand{padding:9px}.gt-section-head h3{font-size:.88rem}.gt-hand-grid{gap:6px}.gt-hand-card{min-height:104px;padding:7px;border-radius:11px;gap:3px}.gt-kind{font-size:.52rem}.gt-cost{font-size:.62rem;right:6px;top:6px}.gt-card-icon{font-size:20px}.gt-hand-card strong{font-size:.72rem}.gt-hand-card small{font-size:.62rem;line-height:1.22}.gt-action-box{padding:9px;gap:6px}.gt-action-box h3{font-size:.9rem}.gt-action-box p{display:none}.gt-action-box button{font-size:.72rem;min-height:38px;padding:7px}.gt-log{display:none}.gt-complete{padding:14px}}

/* V59.52 — Expedition gender-aware dialogue voice */
.expedition-voiced-dialog .rpg-dialog-copy{min-width:0}
.rpg-dialog-voice-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;padding-top:10px;border-top:1px solid rgba(255,255,255,.08)}
.rpg-dialog-voice-row>span{font-size:.74rem;color:#9fc8d4;font-weight:900;letter-spacing:.03em;margin-right:auto}
.rpg-dialog-voice-row button{border:1px solid #315b68;background:#0a2b38;color:#e9fbff;border-radius:10px;padding:7px 10px;font-weight:900;font-size:.73rem;cursor:pointer}
.rpg-dialog-voice-row button:hover{border-color:#58cdbd;background:#103b45}
@media(max-width:700px){
  .expedition-voiced-dialog{grid-template-columns:72px minmax(0,1fr);gap:10px}
  .expedition-voiced-dialog .rpg-dialog-face{align-self:start}
  .rpg-dialog-voice-row{gap:6px;margin-top:9px;padding-top:8px}
  .rpg-dialog-voice-row>span{width:100%;margin-right:0;font-size:.68rem}
  .rpg-dialog-voice-row button{flex:1;padding:7px 8px;font-size:.68rem}
}

/* V59.54 — critical dialogue lock */
.modal-backdrop.modal-locked{cursor:default}
.modal-backdrop.modal-locked>.modal{position:relative}
.modal-lock-hint{display:block;margin-top:8px;text-align:center;color:#8fb2bf;font-size:.72rem;line-height:1.35}
.modal-attention{animation:modalAttentionV5954 .34s ease}
@keyframes modalAttentionV5954{0%,100%{transform:translateX(0)}25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}
.expedition-voiced-dialog .rpg-dialog-copy p{font-size:1rem;line-height:1.55}
@media(max-width:700px){.modal-backdrop.modal-locked{padding:10px}.modal-backdrop.modal-locked>.modal{max-height:94dvh;overflow:auto}.modal-lock-hint{font-size:.68rem}.expedition-voiced-dialog .rpg-dialog-copy p{font-size:.95rem;line-height:1.5}}


/* V59.55 — login tutorial invitation */
.login-tutorial-prompt{text-align:center;max-width:560px;margin:auto}.login-tutorial-icon{width:76px;height:76px;margin:0 auto 12px;border-radius:24px;display:grid;place-items:center;font-size:40px;background:linear-gradient(145deg,#133c48,#09242f);border:1px solid #35687b}.login-tutorial-prompt h2{margin:10px 0 8px}.login-tutorial-prompt p{margin:0;color:#bed0d8;line-height:1.55}.login-tutorial-note{margin-top:14px;padding:10px 12px;border-radius:12px;background:rgba(78,189,166,.08);border:1px solid rgba(78,189,166,.2);color:#a9d9cf;font-size:.82rem;line-height:1.45}@media(max-width:600px){.login-tutorial-icon{width:62px;height:62px;font-size:32px;border-radius:18px}.login-tutorial-prompt h2{font-size:1.3rem}}

/* V59.56 — multilingual selector */
.language-selector{display:grid;gap:14px;min-width:min(720px,92vw)}
.language-selector>h2,.language-selector>p{margin:0}
.language-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.language-choice{position:relative;display:grid;grid-template-columns:42px 1fr auto;grid-template-rows:auto auto;align-items:center;text-align:left;gap:2px 10px;padding:12px 14px;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:rgba(255,255,255,.045);color:inherit;cursor:pointer}
.language-choice>span{grid-row:1/3;font-size:26px}.language-choice>b{font-size:14px}.language-choice>small{opacity:.7}.language-choice>em{grid-row:1/3;grid-column:3;font-style:normal;font-weight:900;color:#5fe1a1}
.language-choice.active{outline:2px solid rgba(95,225,161,.55);background:rgba(95,225,161,.09)}
.language-note{display:block;line-height:1.5;opacity:.66}
@media(max-width:620px){.language-choice-grid{grid-template-columns:1fr}.language-selector{min-width:0}}


/* ========================================================================== 
   RIMBA V59.56.1 STABLE — COLOR-ONLY BATTLE ARENAS
   No expedition map PNGs, animated mist, particles, or decorative scene layers.
   Terrain identity is preserved only through lightweight colors.
   ========================================================================== */
.battle-shell{
  background:#0b211d!important;
  background-image:none!important;
}
.battle-shell.arena-forest{background:linear-gradient(180deg,#173d2c 0%,#0a211b 58%,#071512 100%)!important}
.battle-shell.arena-river{background:linear-gradient(180deg,#17485a 0%,#0c2d3c 58%,#071923 100%)!important}
.battle-shell.arena-village{background:linear-gradient(180deg,#57472f 0%,#293329 56%,#131d19 100%)!important}
.battle-shell.arena-peat{background:linear-gradient(180deg,#4a342c 0%,#2a211f 56%,#171311 100%)!important}
.battle-shell.arena-city{background:linear-gradient(180deg,#344753 0%,#1b2b35 56%,#101920 100%)!important}
.battle-shell.arena-island{background:linear-gradient(180deg,#14616a 0%,#174454 54%,#092333 100%)!important}
.battle-shell.arena-mine{background:linear-gradient(180deg,#66552e 0%,#363020 55%,#1b1912 100%)!important}
.battle-shell.arena-palm{background:linear-gradient(180deg,#526129 0%,#28391f 56%,#132016 100%)!important}
/* Disaster domains remain distinguishable, but are still color-only. */
.battle-shell.arena-domain-jerat,.battle-shell.domain-jerat{background:linear-gradient(180deg,#573b2c,#241c1a 60%,#121315)!important}
.battle-shell.arena-domain-logging,.battle-shell.domain-logging{background:linear-gradient(180deg,#665130,#2b261c 60%,#141511)!important}
.battle-shell.arena-domain-plastic,.battle-shell.domain-plastic{background:linear-gradient(180deg,#57436d,#292038 60%,#15121c)!important}
.battle-shell.arena-domain-river,.battle-shell.domain-river{background:linear-gradient(180deg,#256276,#123949 60%,#081d27)!important}
.battle-shell.arena-domain-mine,.battle-shell.domain-mine{background:linear-gradient(180deg,#6d622d,#38341e 60%,#1a1911)!important}
.battle-shell.arena-domain-palm,.battle-shell.domain-palm{background:linear-gradient(180deg,#58712f,#2d3d20 60%,#151e13)!important}
.battle-shell.arena-domain-fire,.battle-shell.domain-fire{background:linear-gradient(180deg,#853b24,#421f19 60%,#1c1211)!important}
.battle-shell.arena-domain-flood,.battle-shell.domain-flood{background:linear-gradient(180deg,#2b6490,#173b5b 60%,#0c2132)!important}
.battle-shell.arena-domain-smog,.battle-shell.domain-smog{background:linear-gradient(180deg,#674760,#352b39 60%,#1c171e)!important}
.battle-shell.arena-domain-industrial,.battle-shell.domain-industrial{background:linear-gradient(180deg,#633535,#342226 60%,#1b1417)!important}
.battle-shell .battle-map-backdrop{display:none!important}
.battle-shell .arena-ambience:before,
.battle-shell .arena-ambience:after,
.battle-shell .arena-mist,
.battle-shell .arena-particles{display:none!important;animation:none!important}
.battle-shell .arena-ambience{filter:none!important}
.battle-shell .arena-ambience em{backdrop-filter:none!important;background:rgba(3,14,21,.62)!important}


/* === RIMBA V59.56.4 — stable responsive viewport / iPhone 11 precision === */
html{
  width:100%;
  max-width:100%;
  min-height:100%;
  overflow-x:hidden;
  overscroll-behavior-x:none;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  touch-action:pan-y;
}
body{
  width:100%;
  max-width:100%;
  min-height:100dvh;
  overflow-x:hidden;
  overscroll-behavior-x:none;
  overscroll-behavior-y:auto;
  touch-action:pan-y;
  -webkit-tap-highlight-color:transparent;
}
#app,#modal-root{
  width:100%;
  max-width:100%;
  overflow-x:clip;
}
#app{min-height:100dvh}
.screen{
  width:100%;
  max-width:1280px;
  margin-inline:auto;
  padding-left:max(18px,env(safe-area-inset-left));
  padding-right:max(18px,env(safe-area-inset-right));
  padding-bottom:max(90px,calc(74px + env(safe-area-inset-bottom)));
}
.setup-wrap{
  width:100%;
  min-height:100dvh;
  padding-left:max(20px,env(safe-area-inset-left));
  padding-right:max(20px,env(safe-area-inset-right));
  padding-top:max(20px,env(safe-area-inset-top));
  padding-bottom:max(20px,env(safe-area-inset-bottom));
}
.modal-backdrop{
  padding-left:max(12px,env(safe-area-inset-left))!important;
  padding-right:max(12px,env(safe-area-inset-right))!important;
  padding-top:max(12px,env(safe-area-inset-top))!important;
  padding-bottom:max(12px,env(safe-area-inset-bottom))!important;
}
.modal{max-width:calc(100vw - 24px)}
img,canvas,svg,video{max-width:100%;height:auto}
input,select,textarea,button{max-width:100%}

/* Horizontal movement is opt-in only for intentional carousels. */
.expedition-deck-carousel,
.expedition-map-selector,
.expedition-map-selector-header,
.ww-emote-row,
.audio-playlist,
.deck-carousel{
  touch-action:pan-x;
  overscroll-behavior-x:contain;
}

/* Tablet */
@media (min-width:768px) and (max-width:1100px){
  .screen{max-width:100%;padding-left:20px;padding-right:20px}
  .hero{grid-template-columns:1.15fr .85fr}
  .menu-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .stage-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Smartphones */
@media (max-width:767px){
  .screen{
    padding-left:max(12px,env(safe-area-inset-left));
    padding-right:max(12px,env(safe-area-inset-right));
    padding-top:max(8px,env(safe-area-inset-top));
    padding-bottom:max(82px,calc(68px + env(safe-area-inset-bottom)));
  }
  .topbar{gap:8px;padding:6px 0 12px;min-width:0}
  .topbar>*{min-width:0}
  .topbar .spacer{min-width:4px}
  .hero{grid-template-columns:1fr;gap:12px}
  .hero-main,.hero-side{padding:14px}
  .stat-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
  .stat{padding:9px 7px;min-width:0}
  .stat b{font-size:18px}
  .stat span{font-size:9px;overflow-wrap:anywhere}
  .menu-grid,.home-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .menu-card{min-width:0;min-height:132px;padding:13px}
  .menu-card h3{font-size:15px;overflow-wrap:anywhere}
  .menu-card p{font-size:11px}
  .stage-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .card-panel,.stage-card,.menu-card{max-width:100%}
  .section-title{align-items:flex-start;flex-wrap:wrap;margin-top:20px}
  .setup-wrap{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
  .setup-card{padding:16px;max-width:100%}
  .gender-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .gender-option{padding:12px 6px;min-width:0}
  .tutorial{grid-template-columns:1fr 1fr}
  .database-layout,.pvp-community-grid{min-width:0}
  .battle-shell,.online-battle{width:100%;max-width:100%;overflow-x:hidden}
  .battle .unit-row,.online-battle .unit-row{width:100%;max-width:100%}
}

/* iPhone 11 / 11 Pro Max class and similar 390–430 px devices */
@media (min-width:390px) and (max-width:430px){
  .screen{
    padding-left:max(10px,env(safe-area-inset-left));
    padding-right:max(10px,env(safe-area-inset-right));
  }
  .topbar{gap:6px}
  .brand-lockup{gap:8px}
  .brand-logo{width:39px;height:39px}
  .brand-copy b{font-size:14px}
  .brand-copy small{font-size:8px;letter-spacing:.12em}
  .icon-btn{width:38px;height:38px;flex:0 0 38px}
  .pill-btn{padding:8px 10px;font-size:11px}
  .hero-main h1{font-size:clamp(27px,8.5vw,36px)}
  .menu-card{min-height:124px;padding:12px}
  .menu-card .emoji{font-size:29px;margin-bottom:9px}
  .stage-card{padding:11px}
  .modal{width:min(100%,calc(100vw - 20px))!important}
}

/* Very small phones */
@media (max-width:389px){
  .screen{padding-left:8px;padding-right:8px}
  .menu-grid,.home-menu-grid,.stage-grid{grid-template-columns:1fr 1fr;gap:7px}
  .menu-card{padding:10px;min-height:116px}
  .menu-card h3{font-size:13px}
  .menu-card p{font-size:10px}
  .stat-row{gap:5px}
  .stat{padding:8px 5px}
  .gender-grid{grid-template-columns:1fr}
}

/* Desktop stays centered and never stretches beyond readable width. */
@media (min-width:1281px){
  .screen{max-width:1280px}
}

/* ========================================================================== 
   RIMBA V59.56.7 — DESKTOP / WINDOWS RESPONSIVE LAYOUT
   Desktop-only rules. Mobile and tablet <=1100px remain unchanged.
   ========================================================================== */
@media (min-width:1101px){
  html,body{min-width:0;width:100%;overflow-x:hidden}
  body{background-attachment:fixed}

  /* Use the available Windows/desktop canvas without letting content become unreadably wide. */
  .screen{
    width:min(96vw,1720px)!important;
    max-width:none!important;
    margin-inline:auto!important;
    padding-left:clamp(20px,2.2vw,42px)!important;
    padding-right:clamp(20px,2.2vw,42px)!important;
    padding-top:clamp(10px,1.2vh,20px)!important;
    padding-bottom:clamp(38px,4vh,70px)!important;
    box-sizing:border-box;
  }
  .topbar{width:100%;gap:clamp(10px,1.2vw,20px);align-items:center}
  .topbar .spacer{flex:1 1 auto}

  /* Home: scale proportionally with viewport instead of stretching fixed cards. */
  .hero{
    grid-template-columns:minmax(0,1.38fr) minmax(320px,.62fr)!important;
    gap:clamp(14px,1.5vw,26px)!important;
  }
  .hero-main{padding:clamp(20px,2vw,34px)!important}
  .hero-side{padding:clamp(18px,1.6vw,28px)!important}
  .hero-main h1{font-size:clamp(38px,3.25vw,62px)!important;max-width:16ch}
  .hero-main p{font-size:clamp(14px,1.02vw,18px)!important;max-width:76ch}
  .compact-hero .hero-main,.compact-hero .hero-side{min-height:clamp(176px,18vh,250px)!important}

  .home-menu-grid,.menu-grid{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(clamp(165px,12.2vw,225px),1fr))!important;
    gap:clamp(10px,1vw,18px)!important;
  }
  .menu-card{min-height:clamp(142px,15vh,190px)!important;padding:clamp(14px,1.25vw,22px)!important}
  .menu-card .emoji{font-size:clamp(30px,2.15vw,42px)!important}
  .menu-card h3{font-size:clamp(15px,1.12vw,19px)!important}
  .menu-card p{font-size:clamp(11px,.82vw,14px)!important}

  .stage-grid{
    grid-template-columns:repeat(auto-fit,minmax(clamp(175px,12vw,220px),1fr))!important;
    gap:clamp(10px,.9vw,16px)!important;
  }
  .stage-card{padding:clamp(12px,1vw,18px)!important}

  /* Deck / collection — fill large screens but keep cards at usable reading size. */
  .guardian-grid{
    grid-template-columns:repeat(auto-fit,minmax(clamp(180px,12vw,225px),1fr))!important;
    gap:clamp(10px,1vw,17px)!important;
  }
  .guardian-card{min-height:clamp(210px,24vh,280px)!important}
  .guardian-card .g-art{height:clamp(106px,12vh,150px)!important}
  .deck-card-editor-grid{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important}
  .point-card-catalog{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important}
  .deck-presets{grid-template-columns:minmax(220px,300px) minmax(0,1fr)!important}
  .deck-preset-buttons{grid-template-columns:repeat(5,minmax(110px,1fr))!important}

  /* Databases / side panels should grow with screen but not dominate it. */
  .database-layout{grid-template-columns:minmax(0,1fr) clamp(340px,25vw,460px)!important;gap:clamp(14px,1.4vw,24px)!important}
  .pvp-community-grid{gap:clamp(12px,1.2vw,22px)!important}

  /* Desktop battle uses more of the monitor, still centered. */
  .battle{
    width:min(96vw,1540px)!important;
    max-width:none!important;
    margin-inline:auto!important;
    padding-left:clamp(12px,1.4vw,24px)!important;
    padding-right:clamp(12px,1.4vw,24px)!important;
  }
  .battle-top{grid-template-columns:clamp(210px,16vw,285px) minmax(320px,1fr) clamp(210px,16vw,285px)!important;gap:clamp(10px,1vw,18px)!important}
  .unit-row{gap:clamp(8px,.8vw,14px)!important}
  .unit-card{min-width:0}
  .hand{gap:clamp(7px,.75vw,13px)!important}

  /* Modals: use desktop room, but remain readable and fit viewport height. */
  .modal{max-width:min(94vw,1180px)!important;max-height:92vh!important}
  .language-selector{min-width:min(760px,78vw)!important}
}

/* Large desktop / 1440p / ultrawide */
@media (min-width:1600px){
  .screen{width:min(94vw,1840px)!important}
  .hero{grid-template-columns:minmax(0,1.48fr) minmax(380px,.52fr)!important}
  .home-menu-grid,.menu-grid{grid-template-columns:repeat(auto-fit,minmax(205px,1fr))!important}
  .stage-grid{grid-template-columns:repeat(auto-fit,minmax(205px,1fr))!important}
  .guardian-grid{grid-template-columns:repeat(auto-fit,minmax(215px,1fr))!important}
  .battle{width:min(94vw,1680px)!important}
}

/* Short-height Windows laptops (e.g. 1366×768): reduce vertical waste only. */
@media (min-width:1101px) and (max-height:820px){
  .screen{padding-top:8px!important;padding-bottom:30px!important}
  .hero-main,.hero-side{padding-top:16px!important;padding-bottom:16px!important}
  .compact-hero .hero-main,.compact-hero .hero-side{min-height:154px!important}
  .menu-card{min-height:132px!important}
  .menu-card .emoji{margin-bottom:8px!important}
  .section-title{margin-top:18px!important;margin-bottom:9px!important}
  .battle{padding-top:6px!important;padding-bottom:34px!important}
}


/* V59.56.8 — desktop battle rescale refinement
   Mobile stays untouched. On desktop: overall battle a bit more compact,
   artwork should emphasize only the top area, not spill visually toward
   the lower gap. Trees are larger, fauna smaller, small flora smallest. */
@media (min-width:1101px){
  .battle:not(.online-battle),
  .online-battle{
    max-width:1040px!important;
  }

  .battle .unit-row,
  .online-battle .unit-row{
    gap:12px!important;
    padding-top:14px!important;
  }

  .battle .unit-card,
  .online-battle .unit-card{
    min-height:118px!important;
  }

  .battle .unit-card.living-unit,
  .online-battle .unit-card.living-unit{
    min-height:118px!important;
    padding-top:26px!important;
  }

  .battle .unit-card.living-unit .unit-meta h4,
  .online-battle .unit-card.living-unit .unit-meta h4{
    font-size:14px!important;
  }

  .battle .unit-card.living-unit .unit-art,
  .online-battle .unit-card.living-unit .unit-art{
    left:50%!important;
    top:-16px!important;
    transform:translateX(-50%)!important;
    width:44%!important;
    height:56px!important;
    min-height:56px!important;
    max-height:56px!important;
  }

  /* Fauna / animals: smaller than before so the desktop battlefield feels neat. */
  .battle .unit-card.living-fauna .unit-art,
  .online-battle .unit-card.living-fauna .unit-art{
    width:38%!important;
    height:50px!important;
    min-height:50px!important;
    max-height:50px!important;
    top:-11px!important;
  }

  /* Small flora / vegetables / herbs: smaller than fauna. */
  .battle .unit-card.living-flora:not(.living-tree) .unit-art,
  .online-battle .unit-card.living-flora:not(.living-tree) .unit-art{
    width:34%!important;
    height:46px!important;
    min-height:46px!important;
    max-height:46px!important;
    top:-9px!important;
  }

  /* Trees: larger than fauna but still controlled so only the top dominates. */
  .battle .unit-card.living-tree .unit-art,
  .online-battle .unit-card.living-tree .unit-art{
    width:48%!important;
    height:66px!important;
    min-height:66px!important;
    max-height:66px!important;
    top:-18px!important;
  }

  .battle .unit-card.living-unit .living-figure,
  .online-battle .unit-card.living-unit .living-figure{
    transform-origin:center bottom!important;
  }

  .battle .unit-card.living-unit .living-figure .battle-unit-image,
  .online-battle .unit-card.living-unit .living-figure .battle-unit-image,
  .battle .unit-card.living-unit .living-figure .card-art-image,
  .online-battle .unit-card.living-unit .living-figure .card-art-image,
  .battle .unit-card.living-unit .living-figure .card-art-image img,
  .online-battle .unit-card.living-unit .living-figure .card-art-image img{
    object-position:center bottom!important;
  }

  /* Calmer desktop motion so the art does not feel oversized. */
  @keyframes livingFaunaV5921{
    0%,100%{transform:translate3d(0,0,0) rotate(-.18deg) scale(1)}
    25%{transform:translate3d(.4px,-1.2px,0) rotate(.1deg) scale(1.0025)}
    52%{transform:translate3d(-.4px,-2.4px,0) rotate(var(--unit-idle-sway,.14deg)) scale(1.005)}
    76%{transform:translate3d(.4px,-1px,0) rotate(-.08deg) scale(1.002)}
  }
  @keyframes livingFloraV5921{
    0%,100%{transform:translate3d(0,0,0) rotate(-.12deg) scale(1)}
    50%{transform:translate3d(0,-1.2px,0) rotate(var(--unit-idle-sway,.1deg)) scaleY(1.004) scaleX(.999)}
  }
  @keyframes livingTreeV5921{
    0%,100%{transform:translate3d(0,0,0) rotate(-.05deg) scale(1)}
    50%{transform:translate3d(0,-1px,0) rotate(var(--unit-idle-sway,.05deg)) scaleY(1.004) scaleX(.999)}
  }
}


/* V59.56.9 — RIMBA World prototype: RPG walk, quest HUD and 1v1 field encounter */
.rpg-world-hud{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;margin:0 0 8px}.rpg-world-hud span,.rpg-world-hud strong{padding:7px 8px;border-radius:10px;background:#092331;border:1px solid #315368;font-size:9px;color:#b9d4df}.rpg-world-hud span b{color:#fff}.rpg-world-hud strong{grid-column:1/-1;color:#ffdb86;border-color:#725a2c;background:rgba(111,78,21,.18)}
.rpg-walker .rpg-walk-sprite{width:54px!important;height:68px!important;border-radius:14px 14px 9px 9px;overflow:hidden;background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(0,0,0,.12));border:1px solid rgba(255,255,255,.08);transform-origin:center bottom}.rpg-walker .rpg-walk-sprite img{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center bottom!important}.rpg-walker.is-walking .rpg-walk-sprite{animation:rpgWalkBob .24s ease-in-out infinite alternate}.rpg-walker.dir-left .rpg-walk-sprite{transform:scaleX(-1)}.rpg-walker.dir-right .rpg-walk-sprite{transform:scaleX(1)}@keyframes rpgWalkBob{from{translate:0 0}to{translate:0 -4px}}
.rpg-quest-mark{position:absolute;left:50%;top:-82px;transform:translateX(-50%);width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:#ffd04d;color:#1d1a0a;font-style:normal;font-weight:1000;border:2px solid white;box-shadow:0 3px 12px rgba(0,0,0,.35);animation:rpgQuestBob 1.1s ease-in-out infinite alternate}@keyframes rpgQuestBob{to{translate:0 -5px}}
.rpg-result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:12px}.rpg-result-grid span{padding:9px;border-radius:11px;background:#0b2634;border:1px solid #31566c;display:flex;justify-content:space-between}
.sim-world-duel{max-width:1040px;margin:0 auto}.sim-duel-story{margin-bottom:10px;padding:13px 15px}.sim-duel-story h2{margin:4px 0}.sim-duel-story p{margin:0;color:var(--muted)}.sim-duel-enemy-art{overflow:hidden!important}.sim-duel-enemy-art img{width:100%;height:100%;object-fit:contain;object-position:center bottom}.sim-duel-hand .gt-hand-card.used{opacity:.45}
@media(max-width:900px){.rpg-world-hud{grid-template-columns:repeat(3,minmax(0,1fr))}.rpg-world-hud strong{grid-column:1/-1}}
@media(max-width:520px){.rpg-world-hud{grid-template-columns:repeat(2,minmax(0,1fr))}.rpg-walker .rpg-walk-sprite{width:46px!important;height:60px!important}.rpg-quest-mark{top:-72px}.sim-world-duel .gt-arena{grid-template-columns:1fr 54px 1fr}.sim-duel-hand{grid-template-columns:repeat(2,minmax(0,1fr))!important}}


/* =========================================================
   V59.56.10 — PATCH A: RIMBA WORLD SHELL
   Desktop >= 1101px: 8/4 world shell, no page scroll.
   Mobile/tablet intentionally keeps the existing flow.
   ========================================================= */
.sim-world-sidebar{display:none}

@media (min-width:1101px){
  html:has(.sim-world-shell-v1),
  body:has(.sim-world-shell-v1){height:100%;overflow:hidden!important}
  body:has(.sim-world-shell-v1){overscroll-behavior:none}
  #app:has(.sim-world-shell-v1){height:100dvh;min-height:0!important;overflow:hidden}

  .sim-world-shell-v1{
    width:100%!important;max-width:none!important;height:100dvh!important;min-height:0!important;
    padding:8px 12px 10px!important;overflow:hidden!important;
    display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;gap:7px!important;
  }
  .sim-world-shell-v1>.topbar{padding:3px 2px 7px!important;min-height:48px}
  .sim-world-shell-v1>.topbar .logo{width:118px!important}
  .sim-world-shell-v1>.topbar .brand-sub{font-size:10px!important}
  .sim-world-shell-v1>.topbar .pill-btn,.sim-world-shell-v1>.topbar .icon-btn{min-height:34px;padding-top:7px;padding-bottom:7px}

  .sim-world-shell-grid{
    min-height:0;overflow:hidden;display:grid;grid-template-columns:minmax(0,8fr) minmax(310px,4fr);
    gap:10px;align-items:stretch;
  }
  .sim-world-main{min-width:0;min-height:0;overflow:hidden}
  .sim-world-main>.sim-rpg-shell{height:100%;min-height:0;margin:0;padding:9px!important;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:6px;overflow:hidden}
  .sim-world-main .rpg-head{margin:0!important;min-height:62px}
  .sim-world-main .rpg-head .badge{font-size:9px;padding:5px 8px}
  .sim-world-main .rpg-head h2{font-size:20px;margin:3px 0 1px}
  .sim-world-main .rpg-head p{font-size:10px}
  .sim-world-main .rpg-head-status span{padding:5px 7px;font-size:8.5px}

  .sim-world-main .rpg-world-hud{margin:0!important;gap:5px;grid-template-columns:repeat(6,minmax(0,1fr))}
  .sim-world-main .rpg-world-hud span,.sim-world-main .rpg-world-hud strong{padding:5px 7px;font-size:8px}
  .sim-world-main .rpg-world-hud strong{padding:6px 8px}

  .sim-world-main .rpg-viewport{height:auto!important;min-height:0!important;max-height:none!important;border-radius:14px}
  .sim-world-main .rpg-actions{margin:0!important;display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:6px}
  .sim-world-main .rpg-actions button{min-height:36px;padding:7px 9px;font-size:10px}
  .sim-world-main .rpg-hint{top:8px;left:8px;font-size:7.5px;padding:5px 7px}

  .sim-world-sidebar{
    display:grid!important;min-width:0;min-height:0;height:100%;overflow:hidden;
    grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px;
  }
  .sim-sidebar-card{
    min-width:0;padding:10px;border-radius:15px;border:1px solid rgba(117,169,201,.23);
    background:linear-gradient(180deg,rgba(18,43,64,.97),rgba(10,29,44,.97));box-shadow:0 9px 24px rgba(0,0,0,.18);
  }
  .sim-sidebar-title small,.sim-sidebar-card-head small{font-size:7px;letter-spacing:.12em;color:#77a9be;font-weight:1000}
  .sim-sidebar-title h3,.sim-sidebar-card-head h3{margin:2px 0 0;font-size:12px;line-height:1.2}
  .sim-sidebar-card-head{display:flex;align-items:center;gap:7px;margin-bottom:7px}
  .sim-sidebar-card-head>span{font-size:20px}

  .sim-sidebar-quick{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:8px}
  .sim-sidebar-quick>span{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:5px;padding:6px 7px;border-radius:10px;background:#081f2d;border:1px solid #294b60;font-size:10px}
  .sim-sidebar-quick>span.wide{grid-column:1/-1}
  .sim-sidebar-quick small{font-size:7px;color:#88a9b9;text-transform:uppercase;letter-spacing:.06em}
  .sim-sidebar-quick b{font-size:10px;color:#fff;white-space:nowrap}
  .sim-sidebar-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:6px}
  .sim-sidebar-actions button{min-height:32px;padding:6px 8px;font-size:9px}

  .sim-sidebar-supplies{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
  .sim-sidebar-supplies button{min-width:0;display:grid;justify-items:center;gap:1px;padding:7px 4px;border-radius:10px;border:1px solid #31546a;background:#0a2230;color:#fff}
  .sim-sidebar-supplies button span{font-size:17px}.sim-sidebar-supplies button b{font-size:8px;line-height:1.15}.sim-sidebar-supplies button small{font-size:7px;color:#9bb8c6}

  .sim-sidebar-progress-card{min-height:0;overflow:hidden;display:grid;grid-template-rows:auto minmax(0,1fr)}
  .sim-sidebar-progress{display:grid;align-content:start;gap:7px;min-height:0;overflow:auto;padding-right:2px}
  .sim-sidebar-progress>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 7px;align-items:center}
  .sim-sidebar-progress span{font-size:8.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#d7e9f1}.sim-sidebar-progress b{font-size:8px}
  .sim-sidebar-progress i{grid-column:1/-1;height:5px;border-radius:99px;background:#061721;overflow:hidden;border:1px solid rgba(255,255,255,.05)}
  .sim-sidebar-progress i u{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#28bd82,#5be6a4);text-decoration:none}

  .sim-sidebar-calendar p{margin:4px 0 7px;font-size:8.5px;line-height:1.35;color:#b9d0db}
  .sim-sidebar-gods{display:grid;gap:3px}.sim-sidebar-gods span{font-size:7.8px;color:#a9bec9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  .sim-world-mobile-legacy{display:none!important}
}

@media (max-width:1100px){
  .sim-world-shell-grid{display:block}
  .sim-world-sidebar{display:none!important}
  .sim-world-mobile-legacy{display:block}
}

/* Short desktop/laptop screens: compress shell, preserve the map. */
@media (min-width:1101px) and (max-height:820px){
  .sim-world-shell-v1{padding-top:5px!important;gap:4px!important}
  .sim-world-shell-v1>.topbar{min-height:42px;padding-bottom:4px!important}
  .sim-world-main>.sim-rpg-shell{padding:7px!important;gap:4px}
  .sim-world-main .rpg-head{min-height:53px}.sim-world-main .rpg-head h2{font-size:17px}.sim-world-main .rpg-head p{font-size:9px}
  .sim-world-main .rpg-world-hud span,.sim-world-main .rpg-world-hud strong{padding:4px 6px;font-size:7.4px}
  .sim-world-main .rpg-actions button{min-height:32px;padding:5px 7px;font-size:9px}
  .sim-world-sidebar{gap:5px}.sim-sidebar-card{padding:8px}.sim-sidebar-quick{margin-top:5px}.sim-sidebar-card-head{margin-bottom:5px}
  .sim-sidebar-supplies button{padding:5px 3px}.sim-sidebar-progress{gap:5px}
}


/* =========================================================
   V59.56.11 — PATCH B: CORE SIMULATION
   Adds movement feedback, camera polish, interaction range,
   relationship UI and quest tracker. Mobile shell dimensions stay intact.
   ========================================================= */
.rpg-map{will-change:transform;transition:transform .11s cubic-bezier(.2,.7,.2,1)}
.rpg-player.bump .rpg-player-sprite{animation:rpgBumpV5611 .12s ease}
@keyframes rpgBumpV5611{0%,100%{transform:translateX(0)}50%{transform:translateX(5px)}}
.rpg-npc.in-range .rpg-npc-portrait{filter:drop-shadow(0 0 12px rgba(111,237,211,.9)) drop-shadow(0 7px 7px rgba(0,0,0,.45));transform:scale(1.055)}
.rpg-npc.in-range b{background:#0d665e;color:#eafffb;box-shadow:0 0 0 1px rgba(123,255,232,.24)}
.rpg-quest-mark.danger{background:#ad303b!important;box-shadow:0 0 16px rgba(255,83,93,.7)!important}
.rpg-core-indicator{position:absolute;right:10px;top:10px;z-index:20;display:grid;justify-items:end;gap:4px;pointer-events:none}
.rpg-core-indicator span{max-width:360px;padding:5px 8px;border-radius:9px;background:rgba(4,18,26,.75);border:1px solid rgba(124,181,207,.18);font-size:8px;color:#d7ecf4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rpg-quest-tracker{display:grid!important;grid-column:1/-1;gap:2px!important}
.rpg-quest-tracker em{font-style:normal;color:#93e4c3;font-size:.92em}
.rpg-relation{display:grid;gap:5px;margin:7px 0 9px;padding:8px 10px;border-radius:11px;background:#092331;border:1px solid #31546a}
.rpg-relation>div{display:flex;align-items:center;justify-content:space-between;gap:10px}.rpg-relation span{font-size:9px;color:#9bb9c8}.rpg-relation b{font-size:9px;color:#e8f7fb}
.rpg-relation i{height:6px;border-radius:99px;background:#061722;overflow:hidden}.rpg-relation i u{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#29ba88,#6fe7bd);text-decoration:none}
.rpg-dialogue-note{display:block;margin-top:8px;color:#83a6b6;font-size:9px}.core-dialogue{min-width:min(650px,82vw)}
.rpg-portal{box-shadow:0 0 0 1px rgba(128,220,255,.08),0 7px 18px rgba(0,0,0,.22)}

@media(min-width:1101px){
  .sim-world-main .rpg-world-hud{grid-template-columns:repeat(6,minmax(0,1fr))!important}
  .sim-world-main .rpg-quest-tracker{grid-column:1/-1!important;min-height:31px;align-content:center}
  .rpg-core-indicator span{font-size:7.5px;max-width:320px}
}
@media(max-width:720px){
  .rpg-core-indicator{display:none}.core-dialogue{min-width:0}.rpg-relation{padding:7px 8px}
}

/* =========================================================
   V59.56.12 — PATCH C: WORLD SYSTEMS + ECOSYSTEM OVERVIEW
   Reference: clean ecosystem map on the left, world condition on the right.
   Desktop only; mobile keeps PATCH B RPG flow.
   ========================================================= */
.sim-desktop-overview{display:none}
.sim-rpg-stage-panel{display:block;min-height:0}
.sim-world-condition-panel{display:none}

@media (min-width:1101px){
  .sim-world-patch-c .sim-world-shell-grid{grid-template-columns:minmax(0,8fr) minmax(330px,4fr)!important;gap:12px!important}
  .sim-world-patch-c .sim-world-main{min-height:0;overflow:hidden}
  .sim-world-patch-c.world-mode-overview .sim-desktop-overview{display:block;height:100%;min-height:0}
  .sim-world-patch-c.world-mode-overview .sim-rpg-stage-panel{display:none!important}
  .sim-world-patch-c.world-mode-explore .sim-desktop-overview{display:none!important}
  .sim-world-patch-c.world-mode-explore .sim-rpg-stage-panel{display:block;height:100%;min-height:0}
  .sim-world-patch-c.world-mode-explore .sim-rpg-stage-panel>.sim-rpg-shell{height:100%;min-height:0}
  .sim-world-patch-c .sim-world-condition-panel{display:grid;grid-template-rows:minmax(0,1fr) auto auto;gap:10px;min-height:0;overflow:hidden}

  .sim-eco-card,.sim-condition-card{
    border:1px solid #d7dde2;background:#f7f8f8;color:#14201a;border-radius:18px;box-shadow:0 10px 28px rgba(0,0,0,.16)
  }
  .sim-eco-card{height:100%;min-height:0;padding:14px;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:10px;overflow:hidden}
  .sim-eco-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
  .sim-eco-title small,.sim-condition-head small,.sim-condition-quest small{font-size:8px;font-weight:1000;letter-spacing:.12em;color:#5b7568}
  .sim-eco-title h2,.sim-condition-head h2{margin:4px 0 0;font-size:15px;color:#101b15;line-height:1.25}
  .sim-eco-clock{display:grid;justify-items:end;gap:3px;font-size:10px;color:#35463d}.sim-eco-clock span{font-size:9px;color:#66766d}

  .sim-eco-map{position:relative;min-height:0;border-radius:15px;overflow:hidden;background:linear-gradient(#b9dda4,#b9dda4);border:1px solid #a4ca90}
  .sim-eco-map:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 16% 24%,rgba(255,255,255,.22),transparent 18%),radial-gradient(circle at 76% 72%,rgba(255,255,255,.12),transparent 24%);pointer-events:none}
  .eco-river{position:absolute;left:-4%;right:-4%;top:49%;height:78px;background:#67a9c0;transform:rotate(-1.5deg);box-shadow:inset 0 11px 0 rgba(255,255,255,.16),inset 0 -10px 0 rgba(48,111,139,.14)}
  .eco-river span{display:block;position:absolute;left:0;right:0;top:31px;height:2px;background:rgba(255,255,255,.24)}
  .eco-tree{position:absolute;font-size:27px;filter:drop-shadow(0 3px 2px rgba(0,0,0,.14));user-select:none}.eco-tree.t1{left:9%;top:12%}.eco-tree.t2{left:31%;top:14%}.eco-tree.t3{left:73%;top:9%}.eco-tree.t4{left:19%;top:31%}.eco-tree.t5{left:43%;top:36%}.eco-tree.t6{left:84%;top:38%}
  .eco-place{position:absolute;z-index:4;border:1px solid rgba(77,100,89,.2);background:rgba(255,255,255,.94);color:#15231a;border-radius:11px;padding:9px 12px;font-weight:900;font-size:10px;box-shadow:0 5px 14px rgba(0,0,0,.08);cursor:pointer;transition:.14s ease}
  .eco-place:hover,.eco-place.active{transform:translateY(-2px);border-color:#1d8a56;box-shadow:0 0 0 2px rgba(29,138,86,.12),0 7px 16px rgba(0,0,0,.1)}
  .eco-place.basecamp{left:7%;top:68%}.eco-place.habitat{left:57%;top:19%}.eco-place.village{left:12%;top:74%}.eco-place.river{left:47%;top:54%}.eco-place.mine{right:9%;bottom:18%}
  .eco-place.basecamp{top:auto;bottom:8%}.eco-place.village{left:12%;top:auto;bottom:25%}
  .sim-eco-caption{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;min-width:0;padding:1px 2px}
  .sim-eco-caption>div{display:grid;gap:2px;min-width:0}.sim-eco-caption b{font-size:11px}.sim-eco-caption span{font-size:9px;color:#53665b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sim-eco-caption>small{font-size:9px;color:#3a5d49;font-weight:800;white-space:nowrap}

  .sim-condition-card{padding:12px;min-height:0;overflow:hidden}.sim-condition-card:first-child{display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:8px}
  .sim-condition-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.sim-condition-head>span{font-size:10px;padding:5px 8px;border-radius:999px;background:#e9f1eb;color:#40564a}
  .sim-condition-bars{display:grid;align-content:start;gap:8px;min-height:0;overflow:hidden}
  .sim-condition-row{display:grid;gap:3px}.sim-condition-row>div{display:flex;justify-content:space-between;gap:8px;align-items:center}.sim-condition-row span{font-size:10px}.sim-condition-row b{font-size:9px;color:#34483c}.sim-condition-row i{height:7px;border-radius:999px;background:#edf0ee;overflow:hidden}.sim-condition-row i u{display:block;height:100%;background:#ec6ba4;border-radius:999px;text-decoration:none}.sim-condition-row.risk i u{background:#efa15f}
  .sim-intervention-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.sim-intervention-grid button{min-width:0;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:6px;align-items:center;text-align:left;padding:8px 9px;border-radius:11px;border:1px solid #d5dcda;background:#fff;color:#142019;cursor:pointer}.sim-intervention-grid button>b{font-size:10px}.sim-intervention-grid button>small{grid-column:2;font-size:7px;color:#6f7f76}.sim-intervention-grid button:hover{border-color:#62a67e;background:#f4fbf6}

  .sim-condition-card.compact{display:grid;gap:7px}.sim-condition-resource-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}.sim-condition-resource-grid>span{display:grid;grid-template-columns:auto 1fr auto;gap:5px;align-items:center;padding:6px 7px;border-radius:9px;background:#fff;border:1px solid #dde3df;font-size:9px}.sim-condition-resource-grid small{font-size:7px;color:#6a7c72}.sim-condition-resource-grid b{font-size:9px;white-space:nowrap}
  .sim-basecamp-strip{display:grid;grid-template-columns:1fr 1fr auto;gap:6px;align-items:center}.sim-basecamp-strip>span{font-size:8px;padding:6px 7px;border-radius:9px;background:#edf4ee}.sim-basecamp-strip button{border:1px solid #b9d3c1;background:#fff;border-radius:9px;padding:6px 8px;font-size:8px;font-weight:900;color:#214831}
  .sim-condition-footer{display:grid;gap:8px}.sim-condition-quest{display:grid;gap:2px}.sim-condition-quest b{font-size:9px;line-height:1.25}.sim-condition-quest span{font-size:8px;color:#607168}.sim-world-mode-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.sim-world-mode-actions .pill-btn{grid-column:1/-1}.sim-world-mode-actions button{min-height:32px;padding:6px 8px;font-size:8.5px}

  .sim-world-patch-c.world-mode-explore .sim-world-main>.sim-rpg-stage-panel{overflow:hidden}
  .sim-world-patch-c.world-mode-explore .sim-world-main .rpg-viewport{min-height:0!important}
}

@media (min-width:1101px) and (max-height:820px){
  .sim-eco-card{padding:10px;gap:7px}.sim-eco-title h2,.sim-condition-head h2{font-size:13px}.sim-eco-title small,.sim-condition-head small{font-size:7px}.sim-eco-map{border-radius:12px}.eco-river{height:62px}.eco-tree{font-size:23px}.eco-place{padding:7px 9px;font-size:8.5px}.sim-condition-card{padding:9px}.sim-condition-bars{gap:5px}.sim-condition-row i{height:6px}.sim-intervention-grid{gap:5px}.sim-intervention-grid button{padding:6px 7px}.sim-condition-resource-grid>span{padding:5px 6px}.sim-world-mode-actions button{min-height:29px;padding:5px 7px}
}

@media (max-width:1100px){
  .sim-desktop-overview,.sim-world-condition-panel{display:none!important}
  .sim-rpg-stage-panel{display:block!important}
}

@media (min-width:1101px){
  .sim-world-patch-c.world-mode-explore .sim-rpg-stage-panel>.sim-rpg-shell{
    height:100%;min-height:0;margin:0;padding:9px!important;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:6px;overflow:hidden
  }
}


/* =========================================================
   V59.56.13 — PATCH C refined
   Match the ecosystem overview to the dark game theme and
   remove the stark white background. Desktop defaults back
   to the ecosystem overview unless the player explicitly
   enters Explore mode.
   ========================================================= */
@media (min-width:1101px){
  .sim-world-patch-c .sim-world-shell-grid{
    grid-template-columns:minmax(0,8fr) minmax(320px,4fr)!important;
    gap:12px!important;
  }

  .sim-eco-card,
  .sim-condition-card{
    border:1px solid rgba(88,145,174,.35)!important;
    background:linear-gradient(180deg,rgba(8,29,43,.86),rgba(11,40,59,.74))!important;
    color:#e8f4fb!important;
    box-shadow:0 10px 26px rgba(0,0,0,.18)!important;
    backdrop-filter:blur(3px);
  }

  .sim-eco-title small,
  .sim-condition-head small,
  .sim-condition-quest small{
    color:#77a9be!important;
  }

  .sim-eco-title h2,
  .sim-condition-head h2,
  .sim-eco-caption b,
  .sim-condition-quest b{
    color:#f3fbff!important;
  }

  .sim-eco-clock,
  .sim-condition-head>span,
  .sim-eco-caption span,
  .sim-condition-quest span{
    color:#b7d4e2!important;
  }
  .sim-condition-head>span{
    background:rgba(255,255,255,.07)!important;
  }

  .sim-eco-map{
    background:linear-gradient(180deg,rgba(146,192,126,.92),rgba(137,181,118,.9))!important;
    border:1px solid rgba(162,208,146,.52)!important;
  }
  .sim-eco-map:before{
    background:radial-gradient(circle at 16% 24%,rgba(255,255,255,.18),transparent 18%),radial-gradient(circle at 76% 72%,rgba(255,255,255,.10),transparent 24%)!important;
  }
  .eco-river{
    background:linear-gradient(180deg,#6098b4,#4b87a6)!important;
    box-shadow:inset 0 9px 0 rgba(255,255,255,.12),inset 0 -10px 0 rgba(22,74,102,.18)!important;
  }

  .eco-place{
    background:rgba(10,31,45,.84)!important;
    color:#eef9ff!important;
    border:1px solid rgba(122,178,204,.42)!important;
    box-shadow:0 6px 16px rgba(0,0,0,.16)!important;
  }
  .eco-place:hover,
  .eco-place.active{
    border-color:#45ca89!important;
    background:rgba(12,43,55,.94)!important;
    box-shadow:0 0 0 2px rgba(69,202,137,.14),0 7px 18px rgba(0,0,0,.22)!important;
  }

  .sim-condition-row span{color:#e7f1f7!important}
  .sim-condition-row b{color:#cbe0eb!important}
  .sim-condition-row i{background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.04)}
  .sim-condition-row i u{background:linear-gradient(90deg,#de75ae,#ff8ac1)!important}
  .sim-condition-row.risk i u{background:linear-gradient(90deg,#e58b4d,#f8b16e)!important}

  .sim-intervention-grid button,
  .sim-condition-resource-grid>span,
  .sim-basecamp-strip>span{
    background:rgba(255,255,255,.05)!important;
    border-color:rgba(127,173,197,.28)!important;
    color:#eef8ff!important;
  }
  .sim-intervention-grid button>small,
  .sim-condition-resource-grid small{
    color:#a8c4d3!important;
  }
  .sim-intervention-grid button:hover{
    background:rgba(80,182,124,.10)!important;
    border-color:#50b67c!important;
  }
  .sim-basecamp-strip button{
    background:rgba(255,255,255,.08)!important;
    border-color:rgba(127,173,197,.30)!important;
    color:#ebf8ff!important;
  }

  .sim-condition-footer{gap:10px!important}
  .sim-world-mode-actions{grid-template-columns:1fr 1fr!important}
  .sim-world-mode-actions button{font-size:9px!important}

  /* keep desktop compact and prevent the white section feel */
  .sim-world-condition-panel{grid-template-rows:minmax(0,1fr) auto auto!important}
}

/* =========================================================
   V59.56.15 — Expedition Beginner 1v1
   Isolated from the original 3v3 battle engine.
   ========================================================= */
.expedition-mode-modal{display:grid;gap:14px;max-width:900px}
.expedition-mode-modal>h2{margin:0}.expedition-mode-modal>p{margin:0;color:var(--muted)}
.expedition-mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.expedition-mode-card{display:grid;grid-template-columns:58px 1fr;gap:12px;padding:14px;border-radius:17px;border:1px solid #355870;background:linear-gradient(145deg,#0b2636,#081b28)}
.expedition-mode-card.beginner{border-color:#3d8d68;background:linear-gradient(145deg,rgba(25,88,60,.48),#081b28)}
.expedition-mode-card.duelist{border-color:#3b7195;background:linear-gradient(145deg,rgba(27,73,103,.5),#081b28)}
.expedition-mode-card .mode-icon{font-size:38px;display:grid;place-items:start center}
.expedition-mode-card small{font-size:8px;font-weight:1000;letter-spacing:.12em;color:#8bb4c8}.expedition-mode-card h3{margin:4px 0 6px}.expedition-mode-card p{margin:0;color:#bdd0da;font-size:11px;line-height:1.45}
.expedition-mode-card ul{margin:9px 0;padding-left:18px;color:#abc4d0;font-size:10px;line-height:1.55}.expedition-mode-card>b{font-size:10px;color:#83e8ae}

.battle-shell.beginner-1v1 .battle{max-width:980px}
.battle-shell.beginner-1v1 .unit-row{grid-template-columns:minmax(260px,560px)!important;justify-content:center!important}
.battle-shell.beginner-1v1 .unit-card{width:100%;min-height:140px}
.battle-shell.beginner-1v1 .battle-turn-bridge{max-width:760px;margin-left:auto;margin-right:auto}
.battle-shell.beginner-1v1 .hand.hand-grid-2x2{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.beginner-reserve{display:flex;align-items:center;justify-content:center;gap:10px;margin:7px auto 9px;max-width:720px;padding:7px 10px;border-radius:13px;border:1px solid rgba(75,161,119,.25);background:rgba(8,32,42,.65)}
.beginner-reserve.enemy{border-color:rgba(194,87,95,.25)}
.beginner-reserve>small{font-size:7px;letter-spacing:.1em;color:#8eb3c3;font-weight:1000;white-space:nowrap}
.beginner-reserve>div{display:flex;gap:7px;flex-wrap:wrap;justify-content:center}
.beginner-reserve button{display:grid;grid-template-columns:34px minmax(70px,1fr);grid-template-rows:auto auto;column-gap:7px;align-items:center;text-align:left;min-width:140px;padding:6px 8px;border-radius:11px;border:1px solid #31586c;background:#0b2634;color:#fff;cursor:pointer}
.beginner-reserve.enemy button{cursor:default;opacity:.76}.beginner-reserve button>.battle-unit-image,.beginner-reserve button>.unit-icon-art,.beginner-reserve button>.card-art-image{grid-row:1/3;width:34px!important;height:40px!important;object-fit:contain!important}
.beginner-reserve button span{font-size:9px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.beginner-reserve button b{font-size:7px;color:#9fc1cf}
.beginner-reserve button:not(:disabled):hover{border-color:#45cf87;transform:translateY(-1px)}
.beginner-actions{grid-template-columns:1fr 1fr!important;max-width:620px!important}.beginner-actions small{grid-column:1/-1}.basic-attack-btn{border:1px solid #d89a56;background:linear-gradient(135deg,#7a3d22,#a95128);color:#fff;border-radius:13px;padding:10px 12px;font-weight:1000}.basic-attack-btn:disabled{opacity:.42}

@media(max-width:720px){
  .expedition-mode-grid{grid-template-columns:1fr}.expedition-mode-card{grid-template-columns:44px 1fr;padding:11px}.expedition-mode-card .mode-icon{font-size:30px}
  .battle-shell.beginner-1v1 .unit-row{grid-template-columns:1fr!important}.battle-shell.beginner-1v1 .hand.hand-grid-2x2{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .beginner-reserve{align-items:flex-start;flex-direction:column}.beginner-reserve>div{width:100%;display:grid;grid-template-columns:1fr 1fr}.beginner-reserve button{min-width:0;width:100%}.beginner-actions{grid-template-columns:1fr 1fr!important}
}


/* V59.56.16 — Beginner 1v1 layout + modal polish */
.beginner-lane{position:relative;display:grid;grid-template-columns:minmax(118px,148px) minmax(0,1fr) minmax(118px,148px);align-items:end;gap:10px;max-width:980px;margin:4px auto 12px}
.beginner-active-stage{position:relative;z-index:2}.beginner-unit-row{justify-content:center}.beginner-unit-row .unit-card{max-width:620px;margin-inline:auto}
.beginner-side-reserves{display:contents}
.beginner-side-card{position:relative;z-index:1;display:grid;grid-template-rows:72px auto;justify-items:center;align-content:end;gap:4px;min-height:120px;padding:8px 8px 10px;border-radius:16px;border:1px solid rgba(83,158,122,.34);background:linear-gradient(180deg,rgba(8,31,40,.78),rgba(10,27,35,.92));color:#fff;box-shadow:0 8px 22px rgba(0,0,0,.18);transform:translateY(24px) scale(.92);backdrop-filter:blur(2px)}
.beginner-side-card.enemy{border-color:rgba(194,87,95,.34)}
.beginner-side-card.left{justify-self:end}.beginner-side-card.right{justify-self:start}.beginner-side-card:not(:disabled):hover{transform:translateY(18px) scale(.95);border-color:#45cf87}
.beginner-side-card:disabled{cursor:default;opacity:.82}
.beginner-side-art{width:86px;height:72px;display:flex;align-items:flex-end;justify-content:center;overflow:hidden}.beginner-side-art .unit-icon-art,.beginner-side-art .battle-unit-image,.beginner-side-art .card-art-image{width:100%!important;height:100%!important;object-fit:contain!important}
.beginner-side-copy{display:grid;gap:2px;text-align:center}.beginner-side-copy small{font-size:7px;letter-spacing:.12em;color:#8eb3c3;font-weight:1000;text-transform:uppercase}.beginner-side-copy span{font-size:10px;font-weight:900;line-height:1.1}.beginner-side-copy b{font-size:8px;color:#b9d7e5}
.beginner-card-modal{text-align:center;display:grid;gap:8px}.beginner-card-modal-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.beginner-card-modal h2{margin:0;font-size:22px;line-height:1.1}.beginner-card-modal-art{height:76px;display:flex;align-items:center;justify-content:center}.beginner-card-modal-art .skill-icon-art,.beginner-card-modal-art .support-card-icon{font-size:40px}.beginner-card-modal-tip{padding:10px 12px;border-radius:12px;background:#0c2639;color:#b4d0dc;font-size:12px;line-height:1.4}
.beginner-1v1 .selected-action-panel{display:none!important}
@media (max-width:860px){.beginner-lane{grid-template-columns:1fr;gap:6px}.beginner-side-reserves{display:grid;grid-template-columns:1fr 1fr;gap:8px;order:2}.beginner-side-card{transform:none;min-height:unset;grid-template-columns:52px 1fr;grid-template-rows:auto;justify-items:start;align-items:center;text-align:left}.beginner-side-art{width:52px;height:48px}.beginner-side-copy{text-align:left}.beginner-active-stage{order:1}}


/* V59.56.17 — Beginner 1v1 refined positioning and fair switch hand */
.beginner-lane{position:relative;display:grid;grid-template-columns:108px minmax(360px,520px) 108px;align-items:center;justify-content:center;gap:0;max-width:760px;margin:6px auto 10px}
.beginner-side-reserves{display:grid;grid-template-columns:108px 1fr 108px;align-items:center;grid-column:1 / -1;position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);pointer-events:none;z-index:1}
.beginner-reserve-core-gap{min-height:1px}
.beginner-active-stage{grid-column:2;position:relative;z-index:3}.beginner-unit-row .unit-card{max-width:520px;min-height:122px;margin-inline:auto}
.beginner-side-card{pointer-events:auto;position:relative;display:grid;grid-template-rows:auto 54px auto;justify-items:center;align-content:center;gap:3px;width:96px;min-height:118px;padding:6px 6px 7px;border-radius:15px;border:1px solid rgba(83,158,122,.30);background:linear-gradient(180deg,rgba(7,25,35,.82),rgba(8,27,39,.92));color:#fff;box-shadow:0 12px 28px rgba(0,0,0,.18);backdrop-filter:blur(2px);transform:scale(.94)}
.beginner-side-card.left{grid-column:1;justify-self:end;margin-right:-20px}.beginner-side-card.right{grid-column:3;justify-self:start;margin-left:-20px}.beginner-side-card.enemy{border-color:rgba(194,87,95,.30)}
.beginner-side-card:not(:disabled):hover{transform:scale(.97);border-color:#45cf87;box-shadow:0 14px 30px rgba(0,0,0,.22)}
.beginner-side-card:disabled{cursor:default;opacity:.9}
.beginner-side-card .reserve-label{font-size:6.2px;letter-spacing:.12em;color:#8eb3c3;font-weight:1000;text-transform:uppercase;line-height:1;text-align:center}
.beginner-side-art{width:54px;height:54px;display:flex;align-items:flex-end;justify-content:center;overflow:hidden}.beginner-side-art .unit-icon-art,.beginner-side-art .battle-unit-image,.beginner-side-art .card-art-image{width:100%!important;height:100%!important;object-fit:contain!important}
.beginner-side-copy{display:grid;gap:1px;text-align:center}.beginner-side-copy span{font-size:9px;font-weight:900;line-height:1.05}.beginner-side-copy b{font-size:7px;color:#b9d7e5;line-height:1.05}
.beginner-1v1 .team-label.player-team{margin-top:8px}
@media (max-width:860px){.beginner-lane{grid-template-columns:1fr;gap:8px;max-width:none}.beginner-side-reserves{position:static;transform:none;display:grid;grid-template-columns:1fr 1fr;gap:8px;order:2}.beginner-reserve-core-gap{display:none}.beginner-active-stage{grid-column:auto;order:1}.beginner-side-card.left,.beginner-side-card.right{margin:0;justify-self:stretch;width:auto;transform:none;grid-column:auto;grid-template-columns:48px 1fr;grid-template-rows:auto auto;justify-items:start;align-items:center;text-align:left;padding:7px 8px;min-height:84px}.beginner-side-card .reserve-label{grid-column:1/-1}.beginner-side-art{width:48px;height:48px}.beginner-side-copy{text-align:left}}


/* V59.56.18 — Beginner 1v1 polish */
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit{min-height:126px!important;padding-top:24px!important;overflow:visible!important}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .unit-art{top:-40px!important;height:82px!important;min-height:82px!important;width:88%!important}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure{height:82px!important;align-items:flex-end!important}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .battle-unit-image,
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .card-art-image,
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .card-art-image img{object-position:center bottom!important;transform:translateY(-6px)!important}

/* main card with half-hidden side reserves */
.beginner-lane{position:relative;display:grid;grid-template-columns:86px minmax(340px,500px) 86px;align-items:center;justify-content:center;gap:0;max-width:670px;margin:6px auto 10px}
.beginner-side-reserves{display:grid;grid-template-columns:86px 1fr 86px;align-items:center;grid-column:1/-1;position:absolute;left:0;right:0;top:50%;transform:translateY(-52%);pointer-events:none;z-index:1}
.beginner-active-stage{grid-column:2;position:relative;z-index:3;filter:drop-shadow(0 6px 14px rgba(0,0,0,.16))}
.beginner-unit-row .unit-card{max-width:500px;min-height:126px;margin-inline:auto}
.beginner-side-card{pointer-events:auto;position:relative;display:grid;grid-template-rows:auto 48px auto;justify-items:center;align-content:center;gap:2px;width:88px;min-height:108px;padding:5px 5px 6px;border-radius:14px;border:1px solid rgba(83,158,122,.24);background:linear-gradient(180deg,rgba(7,25,35,.68),rgba(8,27,39,.86));color:#fff;box-shadow:0 10px 22px rgba(0,0,0,.16);backdrop-filter:blur(2px);transform:scale(.92);overflow:hidden}
.beginner-side-card:before{content:'';position:absolute;inset:0;background:linear-gradient(90deg,rgba(255,255,255,.06),transparent 40%,transparent 60%,rgba(0,0,0,.12));pointer-events:none}
.beginner-side-card.left{grid-column:1;justify-self:end;margin-right:-44px}.beginner-side-card.right{grid-column:3;justify-self:start;margin-left:-44px}.beginner-side-card.enemy{border-color:rgba(194,87,95,.24)}
.beginner-side-card:not(:disabled):hover{transform:scale(.95);border-color:#45cf87;box-shadow:0 12px 26px rgba(0,0,0,.22)}
.beginner-side-card .reserve-label{font-size:6px;letter-spacing:.10em;color:#92b7c7;font-weight:1000;text-transform:uppercase;line-height:1;text-align:center;opacity:.92}
.beginner-side-art{width:48px;height:48px}.beginner-side-copy span{font-size:8.5px}.beginner-side-copy b{font-size:7px}

/* switch animation */
@keyframes beginnerGuardEnter{0%{transform:translateY(14px) scale(.96);opacity:0}45%{transform:translateY(-3px) scale(1.02);opacity:1}100%{transform:translateY(0) scale(1);opacity:1}}
@keyframes beginnerReserveSettleLeft{0%{transform:translateX(14px) scale(.88);opacity:0}100%{transform:translateX(0) scale(.92);opacity:1}}
@keyframes beginnerReserveSettleRight{0%{transform:translateX(-14px) scale(.88);opacity:0}100%{transform:translateX(0) scale(.92);opacity:1}}
.beginner-active-stage.switching .unit-card{animation:beginnerGuardEnter .42s cubic-bezier(.18,.9,.22,1) both}
.beginner-lane.switching .beginner-side-card.left{animation:beginnerReserveSettleLeft .42s ease both}
.beginner-lane.switching .beginner-side-card.right{animation:beginnerReserveSettleRight .42s ease both}

/* modal + hand spacing on desktop */
.battle-shell.beginner-1v1 .hand-drawer{max-width:780px;margin-left:auto;margin-right:auto}
.battle-shell.beginner-1v1 .hand.hand-grid-2x2{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}

/* Mobile tidy layout */
@media (max-width:860px){
  .battle-shell.beginner-1v1 .battle{max-width:none;padding-inline:10px}
  .beginner-lane{grid-template-columns:1fr;gap:8px;max-width:none;margin:6px auto 8px}
  .beginner-active-stage{grid-column:auto;order:1;z-index:2}
  .beginner-side-reserves{position:static;transform:none;display:grid;grid-template-columns:1fr 1fr;gap:8px;order:2;z-index:1}
  .beginner-side-card.left,.beginner-side-card.right{margin:0;justify-self:stretch;width:auto;transform:none;grid-column:auto;grid-template-columns:42px 1fr;grid-template-rows:auto auto;justify-items:start;align-items:center;text-align:left;padding:7px 8px;min-height:78px;border-radius:12px}
  .beginner-side-card .reserve-label{grid-column:1/-1;text-align:left;font-size:6px}
  .beginner-side-art{width:42px;height:42px}
  .beginner-side-copy{text-align:left}.beginner-side-copy span{font-size:9px}.beginner-side-copy b{font-size:7px}
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card{max-width:none;min-height:116px!important}
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit{padding-top:22px!important}
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .unit-art{top:-34px!important;height:74px!important;min-height:74px!important;width:92%!important}
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure{height:74px!important}
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .battle-unit-image,
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .card-art-image,
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .card-art-image img{transform:translateY(-5px)!important}
  .battle-shell.beginner-1v1 .battle-turn-bridge{max-width:none}
  .battle-shell.beginner-1v1 .hand-drawer-toggle{padding:10px 12px!important}
  .battle-shell.beginner-1v1 .hand.hand-grid-2x2{grid-template-columns:1fr!important;gap:10px!important}
  .battle-shell.beginner-1v1 .hand .action-card{min-height:unset!important}
}
@media (max-width:560px){
  .battle-shell.beginner-1v1 .battle{padding-inline:8px}
  .battle-shell.beginner-1v1 .battle .hud-panels{gap:8px}
  .battle-shell.beginner-1v1 .battle .team-strip{padding:8px 10px}
  .battle-shell.beginner-1v1 .battle-turn-bridge{padding:8px 10px}
  .beginner-side-card.left,.beginner-side-card.right{grid-template-columns:36px 1fr;padding:6px 7px;min-height:72px}
  .beginner-side-art{width:36px;height:36px}
}


/* V59.56.19 — Beginner 1v1 size tuning + centered action buttons */
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit{min-height:112px!important;padding-top:16px!important}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .unit-art{top:-28px!important;height:60px!important;min-height:60px!important;width:72%!important}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure{height:60px!important;align-items:flex-end!important}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .battle-unit-image,
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .card-art-image,
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .card-art-image img,
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .unit-icon-art{transform:translateY(-10px) scale(.78)!important;transform-origin:center bottom!important}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card .unit-meta h4{font-size:11px!important}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card .type{font-size:7px!important}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card .hp-block b{font-size:13px!important}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card .hpbar{height:6px!important;margin-top:4px!important}

.beginner-actions{grid-template-columns:repeat(2,minmax(180px,220px))!important;justify-content:center!important;justify-items:stretch!important;max-width:520px!important;margin:12px auto 14px!important;padding:10px 12px!important}
.beginner-actions .basic-attack-btn,.beginner-actions .end-turn-btn{width:100%!important;min-height:44px!important;text-align:center!important}
.beginner-actions small{grid-column:1/-1;text-align:center!important;max-width:none!important}

/* keep side reserves subtle behind the main card */
.beginner-side-card.left{margin-right:-48px!important}.beginner-side-card.right{margin-left:-48px!important}
.beginner-side-card{opacity:.96}

@media (max-width:860px){
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit{min-height:102px!important;padding-top:14px!important}
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .unit-art{top:-24px!important;height:52px!important;min-height:52px!important;width:76%!important}
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure{height:52px!important}
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .battle-unit-image,
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .card-art-image,
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .card-art-image img,
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .unit-icon-art{transform:translateY(-8px) scale(.74)!important}
  .beginner-actions{grid-template-columns:1fr 1fr!important;max-width:none!important;margin:10px auto 12px!important;padding:8px!important}
}
@media (max-width:560px){
  .beginner-actions{grid-template-columns:1fr!important;gap:8px!important}
  .beginner-actions .basic-attack-btn,.beginner-actions .end-turn-btn{min-height:42px!important}
}


/* V59.56.20 — hard cap artwork size for Beginner 1v1 only */
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit{
  min-height:108px!important;
  padding-top:18px!important;
}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .unit-art{
  top:-18px!important;
  width:100%!important;
  height:64px!important;
  min-height:64px!important;
  max-height:64px!important;
}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure{
  height:64px!important;
  max-height:64px!important;
  overflow:visible!important;
}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .battle-unit-image,
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .card-art-image,
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .card-art-image img,
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .unit-icon-art{
  width:auto!important;
  height:64px!important;
  max-width:170px!important;
  max-height:64px!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  transform:none!important;
}

/* flora can be slightly taller, fauna slightly wider but still capped */
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-flora .living-figure .battle-unit-image,
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-flora .living-figure .card-art-image img{
  max-width:150px!important;
  height:68px!important;
  max-height:68px!important;
}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-fauna .living-figure .battle-unit-image,
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-fauna .living-figure .card-art-image img{
  max-width:175px!important;
  height:60px!important;
  max-height:60px!important;
}

/* centered actions */
.battle-shell.beginner-1v1 .beginner-actions{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(160px,210px))!important;
  justify-content:center!important;
  max-width:460px!important;
  margin:12px auto 14px!important;
}
.battle-shell.beginner-1v1 .beginner-actions small{
  grid-column:1/-1!important;
  text-align:center!important;
}

@media(max-width:860px){
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .unit-art{
    top:-14px!important;
    height:56px!important;
    min-height:56px!important;
    max-height:56px!important;
  }
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure{
    height:56px!important;
    max-height:56px!important;
  }
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .battle-unit-image,
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .card-art-image,
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .card-art-image img,
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card.living-unit .living-figure .unit-icon-art{
    height:54px!important;
    max-height:54px!important;
    max-width:140px!important;
  }
}
@media(max-width:560px){
  .battle-shell.beginner-1v1 .beginner-actions{
    grid-template-columns:1fr 1fr!important;
    max-width:100%!important;
    gap:8px!important;
  }
}


/* V59.56.21 — proportion fix for Beginner 1v1 active cards */
.battle-shell.beginner-1v1 .beginner-lane{
  grid-template-columns:68px minmax(300px,380px) 68px!important;
  max-width:520px!important;
  margin:6px auto 10px!important;
}
.battle-shell.beginner-1v1 .beginner-side-reserves{
  grid-template-columns:68px 1fr 68px!important;
}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card{
  max-width:380px!important;
  min-height:104px!important;
  border-radius:18px!important;
}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card .unit-shell{
  padding-left:12px!important;
  padding-right:12px!important;
}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card .unit-meta{
  gap:4px!important;
}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card .unit-meta h4{
  font-size:10px!important;
}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card .type{
  font-size:6.5px!important;
}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card .hp-block{
  min-width:52px!important;
}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card .hp-block b{
  font-size:12px!important;
}
.battle-shell.beginner-1v1 .beginner-unit-row .unit-card .hpbar{
  height:5px!important;
}
.battle-shell.beginner-1v1 .beginner-side-card{
  width:74px!important;
  min-height:94px!important;
  border-radius:12px!important;
}
.battle-shell.beginner-1v1 .beginner-side-art{
  width:40px!important;
  height:40px!important;
}
.battle-shell.beginner-1v1 .beginner-side-card.left{margin-right:-34px!important}
.battle-shell.beginner-1v1 .beginner-side-card.right{margin-left:-34px!important}
.battle-shell.beginner-1v1 .beginner-side-copy span{font-size:8px!important}
.battle-shell.beginner-1v1 .beginner-side-copy b{font-size:6.5px!important}

@media (max-width:860px){
  .battle-shell.beginner-1v1 .beginner-lane{
    grid-template-columns:1fr!important;
    max-width:none!important;
  }
  .battle-shell.beginner-1v1 .beginner-unit-row .unit-card{
    max-width:340px!important;
    margin-inline:auto!important;
  }
}


/* =========================================================
   V59.56.23 — Expedition map + Deck catalog visual cleanup
   ========================================================= */
.expedition-world-map-column{min-width:0;display:grid;grid-template-rows:auto minmax(0,1fr);gap:9px}
.expedition-map-enemy-top{position:relative;z-index:5}
.expedition-enemy-card-top{
  width:min(560px,76%);
  grid-template-columns:58px minmax(0,1fr)!important;
  gap:10px!important;
  padding:9px 11px!important;
  border-radius:15px!important;
  background:linear-gradient(135deg,rgba(8,28,41,.78),rgba(17,36,48,.58))!important;
  border:1px solid rgba(107,178,204,.28)!important;
  box-shadow:0 9px 28px rgba(0,0,0,.18)!important;
  backdrop-filter:blur(7px);
}
.expedition-enemy-card-top .expedition-enemy-avatar{width:58px!important;height:58px!important;border-radius:13px!important}
.expedition-enemy-card-top h4{font-size:14px!important;margin:2px 0!important}
.expedition-enemy-card-top p{font-size:9px!important;margin:0 0 2px!important;color:#d7e8f0}
.expedition-enemy-card-top small{font-size:8px!important}
.expedition-enemy-meta{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}
.expedition-enemy-meta span{padding:4px 7px;border-radius:999px;border:1px solid rgba(113,176,201,.18);background:rgba(2,16,25,.42);font-size:7px;font-weight:850;color:#d8edf6}
.expedition-detail-strip-slim{grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;padding:9px 10px!important;margin-top:10px!important}
.expedition-detail-strip-slim .expedition-detail-levels{min-width:0}
.expedition-detail-strip-slim .expedition-mini-stage-grid{display:flex!important;flex-wrap:wrap!important;gap:6px!important}
.expedition-detail-strip-slim .expedition-detail-actions{flex-direction:row!important;min-width:0!important}
.expedition-detail-strip-slim .expedition-detail-actions button{width:auto!important;min-width:132px}

/* Deck tabs: Option, Rotation and Disaster use Point-catalog visual language. */
.option-editor-grid,
.rotation-option-grid,
.disaster-deck-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;
  gap:10px!important;
}
.option-edit-card,
.rotation-option-card,
.disaster-deck-card{
  position:relative!important;
  display:grid!important;
  grid-template-columns:56px minmax(0,1fr)!important;
  grid-template-rows:auto!important;
  gap:10px!important;
  align-items:center!important;
  min-height:112px!important;
  padding:12px!important;
  border-radius:15px!important;
  border:1px solid #56606a!important;
  background:linear-gradient(180deg,#28313a,#121a22)!important;
  color:#fff!important;
  opacity:1!important;
  text-align:left!important;
  box-sizing:border-box!important;
}
.option-edit-card>.support-card-icon,
.rotation-option-card>.support-card-icon,
.disaster-deck-card>.disaster-icon-art{
  width:52px!important;height:52px!important;min-width:52px!important;
  display:grid!important;place-items:center!important;
  grid-column:1!important;grid-row:1!important;
}
.option-edit-card>div:not(.deck-copy-row),
.rotation-option-card>div{grid-column:2!important;min-width:0}
.option-edit-card small,
.rotation-option-card small,
.disaster-deck-card small{font-size:7px!important;letter-spacing:.1em!important;color:#aebdca!important;font-weight:900!important}
.option-edit-card h4,
.rotation-option-card h4,
.disaster-deck-card b{font-size:12px!important;margin:2px 0!important;line-height:1.18!important}
.option-edit-card p,
.rotation-option-card p{font-size:8.5px!important;line-height:1.3!important;color:#c8d5dd!important;margin:0!important}
.option-edit-card.selected{border-color:#ff7bb8!important;box-shadow:0 0 0 2px rgba(255,123,184,.10),0 12px 28px rgba(0,0,0,.14)!important;background:linear-gradient(160deg,rgba(94,31,64,.72),rgba(18,26,34,.98))!important}
.rotation-option-card.active{border-color:#f5c542!important;box-shadow:0 0 0 2px rgba(245,197,66,.10),0 12px 28px rgba(0,0,0,.14)!important;background:linear-gradient(160deg,rgba(91,75,18,.66),rgba(18,26,34,.98))!important}
.disaster-deck-card.owned{border-color:#a66dff!important;background:linear-gradient(160deg,rgba(65,40,88,.75),rgba(18,26,34,.98))!important}
.disaster-deck-card.selected{border-color:#d1a5ff!important;box-shadow:0 0 0 2px rgba(190,132,255,.13),0 12px 28px rgba(0,0,0,.16)!important}
.disaster-deck-card.locked{filter:grayscale(.8)!important;opacity:.48!important}
.option-edit-card .deck-copy-row{grid-column:1/-1!important;margin-top:4px!important}

@media(max-width:760px){
  .expedition-enemy-card-top{width:100%!important}
  .expedition-detail-strip-slim{grid-template-columns:1fr!important}
  .expedition-detail-strip-slim .expedition-detail-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%}
  .expedition-detail-strip-slim .expedition-detail-actions button{width:100%!important;min-width:0!important}
  .option-editor-grid,.rotation-option-grid,.disaster-deck-grid{grid-template-columns:1fr!important}
}

/* V59.56.24 — selected card actions in one compact row */
.battle .selected-action-panel .compact-actions,
.online-battle .selected-action-panel .compact-actions{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:6px!important;
  align-items:stretch!important;
}
.battle .selected-action-panel .compact-actions button,
.online-battle .selected-action-panel .compact-actions button{
  grid-column:auto!important;
  min-width:0!important;
  width:100%!important;
  min-height:38px!important;
  padding:7px 5px!important;
  font-size:9px!important;
  line-height:1.15!important;
  white-space:normal!important;
  text-align:center!important;
  border-radius:10px!important;
}

@media(max-width:720px){
  .battle .selected-action-panel .compact-actions,
  .online-battle .selected-action-panel .compact-actions{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:4px!important;
  }
  .battle .selected-action-panel .compact-actions button,
  .online-battle .selected-action-panel .compact-actions button{
    min-height:36px!important;
    padding:6px 3px!important;
    font-size:7.8px!important;
    letter-spacing:0!important;
  }
}


/* V59.56.25 — move enemy level info into right focus panel */
.expedition-map-enemy-top{display:none!important}
.expedition-world-map-column{grid-template-rows:minmax(0,1fr)!important}
.expedition-side-enemy-info{margin-top:10px}
.expedition-side-enemy-info .expedition-enemy-card-top{
  width:100%!important;
  display:grid!important;
  grid-template-columns:54px minmax(0,1fr)!important;
  gap:10px!important;
  padding:10px!important;
  border-radius:14px!important;
  background:linear-gradient(135deg,rgba(7,27,40,.88),rgba(12,38,52,.72))!important;
  border:1px solid rgba(103,177,203,.28)!important;
  box-shadow:0 8px 22px rgba(0,0,0,.14)!important;
}
.expedition-side-enemy-info .expedition-enemy-avatar{width:54px!important;height:54px!important}
.expedition-side-enemy-info .expedition-enemy-copy .badge{font-size:7px!important;padding:4px 7px!important}
.expedition-side-enemy-info .expedition-enemy-copy h4{font-size:13px!important;margin:3px 0 1px!important}
.expedition-side-enemy-info .expedition-enemy-copy p{font-size:9px!important;line-height:1.3!important;margin:0 0 2px!important}
.expedition-side-enemy-info .expedition-enemy-copy small{font-size:8px!important;color:#a9c2cf!important}
.expedition-side-enemy-info .expedition-enemy-meta{display:grid!important;grid-template-columns:1fr!important;gap:5px!important;margin-top:7px!important}
.expedition-side-enemy-info .expedition-enemy-meta span{
  display:block!important;
  width:100%!important;
  padding:5px 7px!important;
  border-radius:8px!important;
  background:rgba(1,14,23,.42)!important;
  border:1px solid rgba(103,177,203,.15)!important;
  font-size:7.5px!important;
}
@media(max-width:1100px){
  .expedition-side-enemy-info .expedition-enemy-card-top{grid-template-columns:46px minmax(0,1fr)!important}
  .expedition-side-enemy-info .expedition-enemy-avatar{width:46px!important;height:46px!important}
}


/* =========================================================
   V59.56.26 — Deck mobile grids + Toko Una density
   UI only; no deck/shop logic changes.
   ========================================================= */

/* Rotation active = pink, matching active Option language. */
.rotation-option-card.active{
  opacity:1!important;
  border-color:#ff79b7!important;
  background:linear-gradient(160deg,rgba(105,34,72,.76),rgba(18,26,34,.98))!important;
  box-shadow:0 0 0 2px rgba(255,121,183,.12),0 12px 28px rgba(0,0,0,.14)!important;
}
.rotation-option-card.active .support-card-icon{
  filter:drop-shadow(0 0 8px rgba(255,121,183,.28));
}

/* Toko Una — desktop Guardian owner selector: 10 columns. */
@media (min-width:1101px){
  .una-guardian-tabs.compact-owner-tabs{
    display:grid!important;
    grid-template-columns:repeat(10,minmax(0,1fr))!important;
    gap:6px!important;
    overflow:visible!important;
  }
  .una-guardian-tabs.compact-owner-tabs .owner-select{
    min-width:0!important;
    width:100%!important;
    padding:6px!important;
    gap:5px!important;
  }
  .una-guardian-tabs.compact-owner-tabs .owner-select-art{
    width:28px!important;
    height:28px!important;
  }
  .una-guardian-tabs.compact-owner-tabs .owner-select b{
    font-size:7.5px!important;
    line-height:1.1!important;
  }
  .una-guardian-tabs.compact-owner-tabs .owner-select small{
    font-size:6.5px!important;
  }
}

/* Mobile Deck: Option, Point, Rotation and Duel Disaster = 2 columns. */
@media (max-width:760px){
  .option-editor-grid,
  .point-card-catalog,
  .rotation-option-grid,
  .disaster-deck-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }

  .option-edit-card,
  .point-info-card,
  .rotation-option-card,
  .disaster-deck-card{
    min-width:0!important;
    min-height:104px!important;
    padding:8px!important;
    gap:7px!important;
    border-radius:12px!important;
  }

  .option-edit-card,
  .rotation-option-card,
  .disaster-deck-card{
    grid-template-columns:40px minmax(0,1fr)!important;
  }
  .point-info-card{
    grid-template-columns:40px minmax(0,1fr)!important;
  }

  .option-edit-card>.support-card-icon,
  .rotation-option-card>.support-card-icon,
  .disaster-deck-card>.disaster-icon-art,
  .point-info-card>.support-card-icon{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
  }

  .option-edit-card h4,
  .rotation-option-card h4,
  .point-info-card h3,
  .disaster-deck-card b{font-size:9px!important}
  .option-edit-card p,
  .rotation-option-card p,
  .point-info-card p{font-size:7px!important;line-height:1.25!important}
  .option-edit-card small,
  .rotation-option-card small,
  .point-info-card small,
  .disaster-deck-card small{font-size:6px!important}

  /* Toko Una mobile: 3 columns for Guardian selector and item grids. */
  .una-guardian-tabs.compact-owner-tabs{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:5px!important;
    overflow:visible!important;
  }
  .una-guardian-tabs.compact-owner-tabs .owner-select{
    min-width:0!important;
    width:100%!important;
    padding:5px!important;
    gap:4px!important;
  }
  .una-guardian-tabs.compact-owner-tabs .owner-select-art{width:26px!important;height:26px!important}
  .una-guardian-tabs.compact-owner-tabs .owner-select b{font-size:7px!important;line-height:1.05!important}
  .una-guardian-tabs.compact-owner-tabs .owner-select small{font-size:6px!important}

  .una-compact-grid.skill-grid,
  .una-compact-grid.option-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:5px!important;
  }
  .una-compact-card{
    min-width:0!important;
    padding:7px 5px!important;
    border-radius:11px!important;
  }
  .una-compact-card b{font-size:8px!important;line-height:1.08!important}
  .una-compact-card small{font-size:6px!important}
  .una-compact-card em{font-size:6.5px!important}
  .una-compact-card .support-card-icon{min-height:34px!important;font-size:25px!important}
}

/* Very narrow phones still keep requested 2-column Deck and 3-column Una. */
@media (max-width:390px){
  .option-editor-grid,.point-card-catalog,.rotation-option-grid,.disaster-deck-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .una-guardian-tabs.compact-owner-tabs,
  .una-compact-grid.skill-grid,
  .una-compact-grid.option-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}


/* V59.56.27 — Guardian summary 4-grid + Duelist 4/2 grid */
.guardian-summary-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
  margin:8px 0 10px!important;
}
.guardian-summary-grid .strategy-card{
  min-height:100px!important;
  padding:10px!important;
  display:grid!important;
  align-content:start!important;
  gap:5px!important;
}
.guardian-summary-grid .strategy-card.signature{
  border-color:#337d98!important;
  background:linear-gradient(145deg,rgba(23,91,116,.24),rgba(13,38,54,.96))!important;
}
.guardian-summary-grid .strategy-card.signature p{
  margin:0!important;
  font-size:8px!important;
  line-height:1.4!important;
  color:#a9c8d5!important;
}
.guardian-summary-grid .strategy-card b{
  font-size:8.5px!important;
  line-height:1.4!important;
}
.guardian-summary-grid .combo-chips{
  display:grid!important;
  gap:4px!important;
}
.guardian-summary-grid .combo-chips span{
  width:100%!important;
  box-sizing:border-box!important;
  text-align:center!important;
  white-space:normal!important;
}
.compact-strategy .guardian-summary-grid{
  padding:0 8px 8px!important;
  margin:0!important;
}
.compact-strategy .guardian-summary-grid .strategy-card{
  min-height:84px!important;
  padding:8px!important;
}

/* Duelist: desktop 4 cards, 8 items per pager (JS); mobile 2 cards. */
.duelist-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
}
.duelist-card-hero{
  min-height:330px!important;
}
.duelist-hero-art{
  min-height:265px!important;
}
@media(max-width:1100px){
  .duelist-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .duelist-card-hero{min-height:310px!important}
}
@media(max-width:820px){
  .guardian-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .duelist-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .duelist-card-hero{min-height:300px!important}
}
@media(max-width:520px){
  .guardian-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  .guardian-summary-grid .strategy-card{min-height:92px!important;padding:8px!important}
  .guardian-summary-grid .strategy-card b{font-size:7.5px!important}
  .guardian-summary-grid .strategy-card.signature p{font-size:7px!important}
  .duelist-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .duelist-card-hero{min-height:270px!important;border-radius:14px!important}
  .duelist-hero-art{height:210px!important;min-height:210px!important}
  .duelist-hero-copy h3{font-size:13px!important}
  .duelist-hero-copy p{font-size:8px!important}
  .duelist-hero-foot{padding:7px!important}
  .duelist-hero-foot .primary-btn{padding:7px 6px!important;font-size:8px!important}
}


/* V59.56.28 — Skill Deck desktop: 10 cards per page */
@media (min-width:1101px){
  .compact-skill-builder .deck-skill-thumb-grid{
    grid-template-columns:repeat(10,minmax(0,1fr))!important;
    gap:6px!important;
  }
  .compact-skill-builder .pager{
    margin-top:9px!important;
  }
}


/* V59.56.29 — Guardian menu artwork fit */
.paged-guardian-grid .guardian-card .g-art{
  height:92px!important;
  min-height:92px!important;
  padding:4px!important;
  overflow:hidden!important;
  background:radial-gradient(circle at 50% 38%,rgba(255,255,255,.10),rgba(0,0,0,.12))!important;
}
.paged-guardian-grid .guardian-card .g-art .guardian-art-img,
.paged-guardian-grid .guardian-card .g-art .card-art-image,
.paged-guardian-grid .guardian-card .g-art .card-art-image img{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  padding:0!important;
}
.paged-guardian-grid .guardian-card .guardian-icon-art{
  font-size:46px!important;
}
.paged-guardian-grid .guardian-card{
  min-height:176px!important;
}
.paged-guardian-grid .guardian-card h4{
  font-size:13px!important;
  margin-top:2px!important;
}
.paged-guardian-grid .guardian-card .meta{
  font-size:9px!important;
}
@media(max-width:820px){
  .paged-guardian-grid .guardian-card .g-art{height:82px!important;min-height:82px!important}
  .paged-guardian-grid .guardian-card{min-height:162px!important}
  .paged-guardian-grid .guardian-card .guardian-icon-art{font-size:42px!important}
}
@media(max-width:430px){
  .paged-guardian-grid .guardian-card .g-art{height:74px!important;min-height:74px!important}
  .paged-guardian-grid .guardian-card{min-height:150px!important;padding:8px!important}
  .paged-guardian-grid .guardian-card h4{font-size:11px!important}
  .paged-guardian-grid .guardian-card .meta{font-size:8px!important}
}


/* V59.56.30 — specifically smaller Guardian artwork inside Deck > Penjaga */
.paged-guardian-grid .guardian-card .g-art{
  height:68px!important;
  min-height:68px!important;
  padding:6px!important;
}
.paged-guardian-grid .guardian-card .g-art .guardian-art-img,
.paged-guardian-grid .guardian-card .g-art .card-art-image,
.paged-guardian-grid .guardian-card .g-art .card-art-image img{
  width:88%!important;
  height:88%!important;
  max-width:88%!important;
  max-height:88%!important;
  object-fit:contain!important;
  object-position:center center!important;
  margin:auto!important;
}
.paged-guardian-grid .guardian-card .guardian-icon-art{font-size:36px!important}
.paged-guardian-grid .guardian-card{min-height:150px!important;padding:9px!important}
.paged-guardian-grid .guardian-card h4{font-size:12px!important;margin:3px 0 4px!important}
.paged-guardian-grid .guardian-card .meta{font-size:8.5px!important}

@media(max-width:820px){
  .paged-guardian-grid .guardian-card .g-art{height:60px!important;min-height:60px!important}
  .paged-guardian-grid .guardian-card{min-height:138px!important}
  .paged-guardian-grid .guardian-card .guardian-icon-art{font-size:32px!important}
}
@media(max-width:430px){
  .paged-guardian-grid .guardian-card .g-art{height:54px!important;min-height:54px!important}
  .paged-guardian-grid .guardian-card{min-height:128px!important;padding:7px!important}
  .paged-guardian-grid .guardian-card h4{font-size:10px!important}
  .paged-guardian-grid .guardian-card .meta{font-size:7.5px!important}
}


/* V59.56.31 — rebalance Deck > Penjaga artwork (previous version was too small) */
.paged-guardian-grid .guardian-card .g-art{
  height:98px!important;
  min-height:98px!important;
  padding:4px 8px 2px!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:center!important;
}
.paged-guardian-grid .guardian-card .g-art .guardian-art-img,
.paged-guardian-grid .guardian-card .g-art .card-art-image,
.paged-guardian-grid .guardian-card .g-art .card-art-image img{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  margin:auto!important;
  padding:0!important;
}
.paged-guardian-grid .guardian-card .guardian-icon-art{font-size:48px!important}
.paged-guardian-grid .guardian-card{
  min-height:176px!important;
  padding:10px!important;
}
.paged-guardian-grid .guardian-card h4{
  font-size:13px!important;
  margin:5px 0 4px!important;
}
.paged-guardian-grid .guardian-card .meta{font-size:9px!important}

@media(max-width:820px){
  .paged-guardian-grid .guardian-card .g-art{height:88px!important;min-height:88px!important;padding:4px 6px 2px!important}
  .paged-guardian-grid .guardian-card{min-height:166px!important;padding:9px!important}
  .paged-guardian-grid .guardian-card .guardian-icon-art{font-size:44px!important}
}
@media(max-width:430px){
  .paged-guardian-grid .guardian-card .g-art{height:78px!important;min-height:78px!important}
  .paged-guardian-grid .guardian-card{min-height:154px!important;padding:8px!important}
  .paged-guardian-grid .guardian-card h4{font-size:11px!important}
  .paged-guardian-grid .guardian-card .meta{font-size:8px!important}
}


/* V59.56.32 — Deck > Penjaga uses the same visual language as normal Penjaga cards */
.deck-layout .paged-guardian-grid{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:12px!important;
}
.deck-layout .paged-guardian-grid .guardian-card{
  min-height:220px!important;
  padding:10px!important;
  border-radius:18px!important;
}
.deck-layout .paged-guardian-grid .guardian-card .g-art{
  height:132px!important;
  min-height:132px!important;
  padding:0!important;
  margin-bottom:8px!important;
  border-radius:13px!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
}
.deck-layout .paged-guardian-grid .guardian-card .g-art .guardian-art-img,
.deck-layout .paged-guardian-grid .guardian-card .g-art .card-art-image,
.deck-layout .paged-guardian-grid .guardian-card .g-art .card-art-image img{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  margin:0!important;
  padding:2px!important;
}
.deck-layout .paged-guardian-grid .guardian-card .guardian-icon-art{
  font-size:76px!important;
  width:100%!important;
  height:100%!important;
}
.deck-layout .paged-guardian-grid .guardian-card h4{
  font-size:15px!important;
  line-height:1.12!important;
  margin:0 0 6px!important;
}
.deck-layout .paged-guardian-grid .guardian-card .meta{
  font-size:10px!important;
}

@media(max-width:1100px){
  .deck-layout .paged-guardian-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:820px){
  .deck-layout .paged-guardian-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .deck-layout .paged-guardian-grid .guardian-card{min-height:195px!important}
  .deck-layout .paged-guardian-grid .guardian-card .g-art{height:100px!important;min-height:100px!important}
  .deck-layout .paged-guardian-grid .guardian-card .guardian-icon-art{font-size:67px!important}
  .deck-layout .paged-guardian-grid .guardian-card h4{font-size:13px!important}
}
@media(max-width:430px){
  .deck-layout .paged-guardian-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .deck-layout .paged-guardian-grid .guardian-card{min-height:185px!important;padding:8px!important}
  .deck-layout .paged-guardian-grid .guardian-card .g-art{height:94px!important;min-height:94px!important}
  .deck-layout .paged-guardian-grid .guardian-card .guardian-icon-art{font-size:61px!important}
  .deck-layout .paged-guardian-grid .guardian-card h4{font-size:12px!important}
}


/* =========================================================
   V59.56.33 — FINAL RESET Deck > Penjaga artwork
   Neutralize older V29/V30/V31/V32 sizing/cropping rules.
   ========================================================= */
.deck-layout .paged-guardian-grid{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:12px!important;
}
.deck-layout .paged-guardian-grid .guardian-card{
  min-height:220px!important;
  padding:10px!important;
  border-radius:18px!important;
  overflow:visible!important;
}
.deck-layout .paged-guardian-grid .guardian-card .g-art{
  position:relative!important;
  width:100%!important;
  height:132px!important;
  min-height:132px!important;
  max-height:132px!important;
  padding:8px!important;
  margin:0 0 8px!important;
  border-radius:13px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
}
/* image wrapper must fill the art box without applying crop/translation */
.deck-layout .paged-guardian-grid .guardian-card .g-art > .card-art-image,
.deck-layout .paged-guardian-grid .guardian-card .g-art > .guardian-art-img{
  position:relative!important;
  inset:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  padding:0!important;
  margin:0!important;
  overflow:visible!important;
  transform:none!important;
  background:transparent!important;
  box-shadow:none!important;
}
.deck-layout .paged-guardian-grid .guardian-card .g-art > .card-art-image img,
.deck-layout .paged-guardian-grid .guardian-card .g-art > img.guardian-art-img{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:92%!important;
  max-height:92%!important;
  object-fit:contain!important;
  object-position:center center!important;
  margin:auto!important;
  padding:0!important;
  transform:none!important;
  scale:1!important;
}
.deck-layout .paged-guardian-grid .guardian-card .g-art > .guardian-icon-art{
  width:100%!important;
  height:100%!important;
  display:grid!important;
  place-items:center!important;
  font-size:72px!important;
  transform:none!important;
}
.deck-layout .paged-guardian-grid .guardian-card h4{
  font-size:15px!important;
  margin:0 0 6px!important;
}
.deck-layout .paged-guardian-grid .guardian-card .meta{font-size:10px!important}

@media(max-width:1100px){
  .deck-layout .paged-guardian-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:820px){
  .deck-layout .paged-guardian-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .deck-layout .paged-guardian-grid .guardian-card{min-height:195px!important}
  .deck-layout .paged-guardian-grid .guardian-card .g-art{height:105px!important;min-height:105px!important;max-height:105px!important;padding:6px!important}
  .deck-layout .paged-guardian-grid .guardian-card .g-art > .card-art-image img,
  .deck-layout .paged-guardian-grid .guardian-card .g-art > img.guardian-art-img{max-width:90%!important;max-height:90%!important}
}
@media(max-width:430px){
  .deck-layout .paged-guardian-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .deck-layout .paged-guardian-grid .guardian-card{min-height:180px!important;padding:8px!important}
  .deck-layout .paged-guardian-grid .guardian-card .g-art{height:92px!important;min-height:92px!important;max-height:92px!important;padding:5px!important}
  .deck-layout .paged-guardian-grid .guardian-card h4{font-size:12px!important}
}


/* =========================================================
   V59.56.34 — BATTLE PERFORMANCE LITE
   Reduce continuous GPU layers and visual clutter while keeping
   Guardian idle/attack feedback and important status information.
   ========================================================= */
.battle-cinematic{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  background:rgba(2,8,13,.56)!important;
  transition:opacity .12s ease!important;
}
.battle-cinematic .cine-fx{
  max-width:min(270px,40vw)!important;
  filter:none!important;
}
.battle-cinematic .cine-lite-fx{
  display:grid!important;place-items:center!important;
  width:112px!important;height:112px!important;margin:8px auto!important;
  border-radius:50%!important;border:1px solid rgba(255,255,255,.28)!important;
  background:radial-gradient(circle,rgba(122,215,255,.28),rgba(17,44,68,.15) 56%,transparent 70%)!important;
  font-size:46px!important;color:#fff!important;
}

/* Keep only compact arena impact feedback. */
.battle-scene-fx{inset:-14px -8px!important;overflow:hidden!important;z-index:20!important}
.battle-scene-fx .scene-fx-b{width:72px!important;height:72px!important;filter:none!important}
.battle-scene-fx .scene-fx-c{display:none!important}
.unit-reactive-fx{inset:-7px!important;z-index:24!important;overflow:hidden!important}
.unit-reactive-fx em,.unit-reactive-fx u{display:none!important}
.unit-reactive-fx i{inset:19%!important;border-width:1px!important;filter:none!important}
.unit-reactive-fx b{font-size:20px!important;text-shadow:none!important;filter:none!important}

/* A status still has a clear icon/badge; it no longer needs several perpetual animations. */
.battle .unit-card.living-unit .mini-status,
.online-battle .unit-card.living-unit .mini-status{
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  box-shadow:0 2px 6px rgba(0,0,0,.24)!important;
  animation:none!important;filter:none!important;
}
.unit-state-fx,.unit-state-fx:before,.unit-state-fx i{
  animation:none!important;filter:none!important;
}
.unit-aura:before,.unit-aura:after{
  animation:none!important;filter:none!important;
}
.unit-aura-layer{opacity:.72!important}

/* The card art itself stays animated through the wrapper, but avoid an expensive
   drop-shadow filter being recomposited every frame. */
.battle .unit-card.living-unit .living-figure,
.online-battle .unit-card.living-unit .living-figure{will-change:auto!important}
.battle .unit-card.living-unit .living-figure .battle-unit-image,
.online-battle .unit-card.living-unit .living-figure .battle-unit-image,
.battle .unit-card.living-unit .living-figure .card-art-image img,
.online-battle .unit-card.living-unit .living-figure .card-art-image img{
  filter:none!important;
}

/* Calmer idle movement: visible, but no longer looks like every card is bouncing. */
@keyframes livingFaunaV5921{
  0%,100%{transform:translate3d(0,0,0) rotate(-.15deg) scale(1)}
  50%{transform:translate3d(0,-2px,0) rotate(var(--unit-idle-sway,.15deg)) scale(var(--unit-breath-scale,1.01))}
}
@keyframes livingFloraV5921{
  0%,100%{transform:translate3d(0,0,0) rotate(-.12deg) scale(1)}
  50%{transform:translate3d(0,-1px,0) rotate(var(--unit-idle-sway,.12deg)) scaleY(var(--unit-breath-scale,1.008))}
}
@keyframes livingTreeV5921{
  0%,100%{transform:translate3d(0,0,0) rotate(-.06deg) scale(1)}
  50%{transform:translate3d(0,-1px,0) rotate(var(--unit-idle-sway,.06deg)) scaleY(var(--unit-breath-scale,1.006))}
}
@keyframes livingOtherV5921{
  0%,100%{transform:translate3d(0,0,0) scale(1)}
  50%{transform:translate3d(0,-2px,0) scale(1.008)}
}

@media(max-width:760px){
  .battle-scene-fx{inset:-8px -4px!important}
  .battle-scene-fx .scene-fx-b{width:56px!important;height:56px!important}
  .unit-aura-layer{opacity:.55!important}
  .unit-status-effects{opacity:.76!important}
}

/* === RIMBA v59.56.35 — Enemy defeat popup artwork fit === */
.enemy-defeat-card{
  width:min(460px,94vw)!important;
  max-height:min(680px,92vh)!important;
  overflow:auto!important;
}
.enemy-defeat-portrait{
  width:min(300px,78vw)!important;
  height:min(280px,38vh)!important;
  aspect-ratio:1/1!important;
  margin:10px auto 12px!important;
  padding:12px!important;
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  border:1px solid rgba(255,255,255,.10)!important;
  background:radial-gradient(circle at 50% 42%,rgba(255,118,118,.16),rgba(4,15,23,.42) 72%)!important;
}
.enemy-defeat-portrait img,
.enemy-defeat-portrait .card-art-image,
.enemy-defeat-portrait .card-art-image img{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center center!important;
  margin:auto!important;
  padding:0!important;
  transform:none!important;
  box-sizing:border-box!important;
}
.enemy-defeat-portrait img{
  filter:grayscale(.18) drop-shadow(0 9px 15px rgba(0,0,0,.34))!important;
}
@media(max-width:720px){
  .enemy-defeat-card{width:min(400px,94vw)!important;padding:13px!important;max-height:90vh!important}
  .enemy-defeat-portrait{width:min(235px,70vw)!important;height:min(220px,32vh)!important;padding:9px!important;margin:7px auto 9px!important}
  .enemy-defeat-card h2{margin-top:2px!important;font-size:19px!important}
}
@media(max-height:620px){
  .enemy-defeat-card{max-height:94vh!important;padding:10px!important}
  .enemy-defeat-portrait{width:180px!important;height:160px!important;margin:5px auto 7px!important;padding:7px!important}
  .enemy-defeat-chat{padding:8px 10px!important;font-size:11px!important;line-height:1.35!important}
}

/* === RIMBA v59.56.36 — mobile-safe defeat/dialog sizing === */
@media(max-width:480px){
  .enemy-defeat-scene{padding:8px!important;align-items:center!important}
  .enemy-defeat-card{width:96vw!important;max-height:92dvh!important;padding:10px!important;border-radius:16px!important;overflow:auto!important}
  .enemy-defeat-portrait{width:min(210px,64vw)!important;height:min(190px,28dvh)!important;padding:7px!important;margin:5px auto 7px!important}
  .enemy-defeat-card h2{font-size:18px!important;line-height:1.15!important;margin:2px 0 6px!important}
  .enemy-defeat-kicker{font-size:8px!important}
  .enemy-defeat-chat{font-size:11px!important;line-height:1.35!important;padding:8px 9px!important}
  .enemy-defeat-card>small{font-size:8px!important;margin-top:6px!important}

  .modal:has(.rpg-dialog){width:96vw!important;max-width:96vw!important;max-height:92dvh!important;overflow:auto!important;padding:8px!important}
  .rpg-dialog{grid-template-columns:76px minmax(0,1fr)!important;gap:7px!important}
  .rpg-dialog-face{height:112px!important}
  .rpg-dialog-avatar{width:84%!important;height:92%!important;transform:scale(.68)!important}
  .rpg-dialog-copy{padding:9px 10px 8px!important}
  .rpg-dialog-copy h2{font-size:15px!important}
  .rpg-dialog-copy p{font-size:11px!important;line-height:1.38!important}
  .rpg-dialog-voice-row{gap:5px!important;flex-wrap:wrap!important}
  .rpg-dialog-voice-row button{min-height:30px!important;padding:5px 7px!important;font-size:9px!important}
  .modal:has(.rpg-dialog) .modal-actions button{min-height:38px!important}
}

/* ========================================================================== 
   RIMBA v59.56.38 — Production UI pass (mobile + desktop)
   Home economy visibility, safe modals, dialogue portraits, defeat art fit,
   touch targets and small-screen overflow hardening.
   ========================================================================== */

/* Home economy is intentionally split into two readable currencies. */
.home-stat-row{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.home-stat-row .stat{min-width:0}
.home-stat-row .stat b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-point-stat{border-color:rgba(255,205,92,.36)!important;background:linear-gradient(145deg,rgba(55,43,16,.42),rgba(10,29,45,.98))!important}
.home-point-stat b{color:#ffe08a}
.home-money-stat b{font-size:clamp(16px,2vw,22px)}

/* Exact defeat artwork target: never inherit battle transforms/scales. */
.enemy-defeat-portrait .enemy-defeat-image{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:86%!important;
  max-height:86%!important;
  object-fit:contain!important;
  object-position:center center!important;
  transform:none!important;
  translate:none!important;
  scale:none!important;
  rotate:none!important;
  margin:auto!important;
  filter:grayscale(.14) drop-shadow(0 7px 12px rgba(0,0,0,.28))!important;
}
.enemy-defeat-portrait{
  width:min(270px,72vw)!important;
  height:min(250px,35vh)!important;
  min-height:0!important;
  padding:14px!important;
  overflow:hidden!important;
  place-items:center!important;
}
.enemy-defeat-card{
  width:min(430px,94vw)!important;
  max-height:min(680px,92dvh)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
}

/* Desktop dialogue art should read like a character portrait, not a thumbnail. */
@media (min-width:701px){
  .modal:has(.rpg-dialog){width:min(820px,92vw)!important}
  .rpg-dialog{grid-template-columns:210px minmax(0,1fr)!important;gap:16px!important;align-items:center!important}
  .rpg-dialog-face{height:286px!important;min-height:260px!important}
  .rpg-dialog-avatar{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center bottom!important;transform:scale(.96)!important;transform-origin:center bottom!important}
  .rpg-dialog-copy{padding:18px 20px 15px!important}
}

/* Strong mobile baseline: no accidental horizontal clipping and usable touch size. */
@media (max-width:767px){
  html,body,#app{max-width:100%;overflow-x:hidden!important}
  .modal,.modal *,.card-panel,.card-panel *{box-sizing:border-box}
  .primary-btn,.secondary-btn,.danger-btn,.offline-btn{min-height:44px;touch-action:manipulation}
  .pill-btn{min-height:40px;touch-action:manipulation}
  .modal-backdrop{overflow:hidden!important;align-items:center!important}
  .modal{overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable both-edges}

  /* 4 home stats become a clear 2x2 dashboard. */
  .home-stat-row{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .home-stat-row .stat{padding:10px 9px!important;min-height:62px;display:flex;flex-direction:column;justify-content:center}
  .home-stat-row .stat b{font-size:17px!important;line-height:1.1}
  .home-stat-row .stat span{font-size:8.5px!important;line-height:1.25;letter-spacing:.07em}
  .home-money-stat b{font-size:15px!important}

  /* Deck picker: carousel remains swipeable, footer can never leave/crop the viewport. */
  .modal:has(.expedition-deck-modal){
    width:calc(100vw - 16px)!important;
    max-width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
    padding:14px 12px max(10px,env(safe-area-inset-bottom))!important;
    border-radius:20px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  .expedition-deck-modal{width:100%!important;max-width:100%!important;min-width:0!important;margin:0!important}
  .expedition-deck-modal h2{font-size:clamp(1.35rem,6vw,1.65rem)!important;line-height:1.12!important;margin:10px 0 8px!important}
  .expedition-deck-modal>p{font-size:.9rem!important;line-height:1.45!important;margin:0 0 10px!important}
  .expedition-deck-modal .story-box{font-size:.8rem!important;line-height:1.4!important;padding:10px 11px!important}
  .expedition-deck-carousel{
    width:100%!important;
    margin:8px 0 4px!important;
    padding:4px 12px 10px!important;
    scroll-padding-inline:12px!important;
    gap:10px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }
  .expedition-deck-slide{
    flex:0 0 calc(100% - 24px)!important;
    min-width:0!important;
    min-height:270px!important;
    padding:15px!important;
    border-radius:20px!important;
    transform:none!important;
  }
  .expedition-deck-slide.selected{transform:none!important}
  .expedition-deck-slide .expedition-deck-portraits{min-height:96px!important;margin-top:8px!important;gap:5px!important}
  .expedition-deck-slide .expedition-deck-mini{width:min(25vw,78px)!important;height:min(25vw,78px)!important;max-width:78px!important;max-height:78px!important;object-fit:contain!important;object-position:center bottom!important}
  .expedition-deck-slide h3{font-size:1rem!important;line-height:1.35!important;margin:10px 0 7px!important;overflow-wrap:anywhere}
  .expedition-deck-slide p{font-size:.84rem!important;line-height:1.4!important}
  .expedition-deck-dots{margin:5px 0 7px!important}
  .expedition-selected-caption{font-size:.88rem;text-align:center}
  .modal:has(.expedition-deck-modal) .modal-actions{
    position:sticky!important;
    left:0!important;
    right:0!important;
    bottom:calc(-1 * max(10px,env(safe-area-inset-bottom)))!important;
    z-index:20!important;
    width:100%!important;
    margin:8px 0 0!important;
    padding:12px 0 max(10px,env(safe-area-inset-bottom))!important;
    display:grid!important;
    grid-template-columns:minmax(0,.8fr) minmax(0,1.35fr)!important;
    gap:8px!important;
    background:linear-gradient(180deg,rgba(7,26,38,.20),#071a26 24%,#071a26 100%)!important;
  }
  .modal:has(.expedition-deck-modal) .modal-actions button{width:100%!important;min-width:0!important;max-width:100%!important;min-height:48px!important;padding:10px 8px!important;white-space:normal!important;line-height:1.15!important}

  /* Story/dialogue: make the actual character visibly larger on phones. */
  .modal:has(.rpg-dialog){
    width:calc(100vw - 16px)!important;
    max-width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
    padding:10px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  .rpg-dialog,
  .expedition-voiced-dialog{
    grid-template-columns:108px minmax(0,1fr)!important;
    gap:10px!important;
    align-items:center!important;
    min-height:0!important;
  }
  .rpg-dialog-face{
    width:108px!important;
    height:166px!important;
    min-height:166px!important;
    align-self:center!important;
    border-radius:15px!important;
    overflow:hidden!important;
  }
  .rpg-dialog-avatar{
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
    object-position:center bottom!important;
    transform:scale(.96)!important;
    transform-origin:center bottom!important;
    margin:auto!important;
  }
  .rpg-dialog-narrator{font-size:58px!important}
  .rpg-dialog-copy{min-width:0!important;padding:13px 13px 11px!important;border-radius:15px!important}
  .rpg-dialog-copy small{font-size:8px!important;letter-spacing:.11em!important}
  .rpg-dialog-copy h2{font-size:18px!important;line-height:1.15!important;margin:4px 0 7px!important}
  .rpg-dialog-copy p{font-size:13px!important;line-height:1.48!important;overflow-wrap:anywhere}
  .rpg-dialog-progress{font-size:10px!important;margin-top:8px!important}
  .rpg-dialog-voice-row{gap:7px!important;margin-top:10px!important;padding-top:9px!important}
  .rpg-dialog-voice-row>span{width:100%!important;margin:0!important;font-size:10px!important}
  .rpg-dialog-voice-row button{flex:1 1 calc(50% - 4px)!important;min-height:40px!important;padding:7px 8px!important;font-size:11px!important;white-space:normal!important}
  .modal:has(.rpg-dialog) .modal-actions{
    position:sticky!important;
    bottom:calc(-1 * max(10px,env(safe-area-inset-bottom)))!important;
    z-index:10!important;
    width:100%!important;
    margin:9px 0 0!important;
    padding:10px 0 max(8px,env(safe-area-inset-bottom))!important;
    background:linear-gradient(180deg,rgba(7,26,38,.10),#071a26 28%,#071a26)!important;
  }
  .modal:has(.rpg-dialog) .modal-actions button{width:100%!important;min-width:0!important;min-height:46px!important;font-size:14px!important}

  /* Enemy defeat: deliberately smaller than battle artwork; whole PNG must remain visible. */
  .enemy-defeat-scene{padding:8px max(8px,env(safe-area-inset-left)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-right))!important;align-items:center!important}
  .enemy-defeat-card{width:min(360px,calc(100vw - 16px))!important;max-height:calc(100dvh - 16px)!important;padding:12px!important;border-radius:18px!important;overflow-y:auto!important;overflow-x:hidden!important}
  .enemy-defeat-portrait{width:min(184px,52vw)!important;height:min(178px,25dvh)!important;min-height:130px!important;padding:12px!important;margin:5px auto 8px!important}
  .enemy-defeat-portrait .enemy-defeat-image{max-width:82%!important;max-height:82%!important}
  .enemy-defeat-card h2{font-size:18px!important;line-height:1.2!important;margin:2px 0 6px!important}
  .enemy-defeat-chat{font-size:11.5px!important;line-height:1.4!important;padding:9px 10px!important}
  .enemy-defeat-card>small{font-size:8.5px!important;line-height:1.35!important;margin-top:7px!important}

  /* Generic modal action safety used by other menus too. */
  .modal-actions{max-width:100%;flex-wrap:wrap}
  .modal-actions>button{min-width:0;max-width:100%;overflow-wrap:anywhere}
}

/* Narrow phones: keep portraits useful without starving dialogue text. */
@media (max-width:360px){
  .rpg-dialog,.expedition-voiced-dialog{grid-template-columns:90px minmax(0,1fr)!important;gap:8px!important}
  .rpg-dialog-face{width:90px!important;height:145px!important;min-height:145px!important}
  .rpg-dialog-copy{padding:10px!important}
  .rpg-dialog-copy h2{font-size:16px!important}
  .rpg-dialog-copy p{font-size:12px!important;line-height:1.42!important}
  .expedition-deck-slide{flex-basis:calc(100% - 12px)!important;padding:13px!important}
  .home-stat-row .stat b{font-size:15px!important}
  .home-money-stat b{font-size:13px!important}
}

/* Short phones / landscape: prioritize complete content over portrait size. */
@media (max-height:650px) and (max-width:767px){
  .rpg-dialog-face{height:130px!important;min-height:130px!important}
  .enemy-defeat-portrait{width:150px!important;height:138px!important;min-height:120px!important}
  .expedition-deck-slide{min-height:230px!important}
}

/* Avoid expensive animation work for users/devices asking for reduced motion. */
@media (prefers-reduced-motion:reduce){
  .living-figure,.unit-aura:before,.unit-aura:after,.battle-scene-fx *{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}

/* V1.1.3 — PvP hand keeps a balanced 2×2 footprint as cards decrease. */
.online-battle .hand.hand-grid-2x2{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;align-items:stretch!important}
.online-battle .hand.hand-grid-2x2>.action-card{width:100%!important;min-width:0!important;max-width:none!important;height:100%!important}
.online-battle .hand.hand-grid-2x2>.action-card:only-child{grid-column:1/-1!important;width:calc(50% - 4px)!important;justify-self:center!important}
.online-battle .hand.hand-grid-2x2>.action-card:nth-last-child(1):nth-child(odd):not(:only-child){grid-column:1/-1!important;width:calc(50% - 4px)!important;justify-self:center!important}
.expedition-tier-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 12px}.expedition-tier-tabs button{min-height:52px;border:1px solid #31566d;border-radius:14px;background:#0a2131;color:#d9f3ff;font-weight:1000;display:grid;place-items:center;gap:2px}.expedition-tier-tabs button small{font-size:9px;color:#86aabd}.expedition-tier-tabs button.active{border-color:#54cfe1;background:linear-gradient(145deg,#11445a,#0a2a3b);box-shadow:0 0 0 2px rgba(84,207,225,.12)}.expedition-tier-tabs button.locked{opacity:.55}.expedition-tier2-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;margin-bottom:12px}.expedition-tier2-hero h1{margin:6px 0}.expedition-tier2-hero p{color:var(--muted);line-height:1.5}.expedition-tier2-stats{display:grid;grid-template-columns:auto auto;gap:4px 12px;align-items:center}.expedition-tier2-stats b{font-size:24px;color:#7ee5cf}.expedition-tier2-stats span{font-size:10px;color:#91aebb}.expedition-tier2-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.expedition-tier2-lock{text-align:center;padding:28px}.expedition-tier2-lock h2{margin:10px 0}.expedition-tier2-lock p{max-width:640px;margin:0 auto 18px;color:var(--muted)}
@media(max-width:900px){.expedition-tier2-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.online-battle .hand.hand-grid-2x2{gap:6px!important}.online-battle .hand.hand-grid-2x2>.action-card:only-child,.online-battle .hand.hand-grid-2x2>.action-card:nth-last-child(1):nth-child(odd):not(:only-child){width:calc(50% - 3px)!important}.expedition-tier-tabs{gap:6px}.expedition-tier-tabs button{min-height:46px;font-size:11px}.expedition-tier2-hero{grid-template-columns:1fr}.expedition-tier2-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}}

/* RIMBA v59.56.39 — Peradaban preview / muted orange theme */
.civilization-screen{--civ-accent:#b97745;--civ-soft:#d7a06f;--civ-deep:#211711;--civ-panel:#2a1d16}
.civilization-screen .card-panel,.civilization-screen .civilization-map{border-color:rgba(185,119,69,.28)}
.civilization-hero{background:linear-gradient(135deg,rgba(55,35,24,.96),rgba(18,22,28,.98));border:1px solid rgba(197,132,80,.35)}
.civ-bonus-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0}.civ-bonus-strip article{padding:14px;border-radius:16px;background:linear-gradient(145deg,#302017,#17191d);border:1px solid rgba(201,134,79,.3);display:grid;gap:4px}.civ-bonus-strip article>span{font-size:24px}.civ-bonus-strip small{color:#cbb9aa}.civ-bonus-strip .armor{border-color:rgba(154,112,205,.48)}.civ-bonus-strip .evolution{border-color:rgba(235,235,235,.45)}
.civ-subject-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.civ-subject{display:grid;grid-template-columns:1fr auto;gap:12px;padding:15px;border-radius:17px;background:#181719;border:1px solid #3e322b}.civ-subject.available{background:linear-gradient(145deg,#2a1c14,#15181d);border-color:#9b643c}.civ-subject.done{border-color:#7d9d70;background:linear-gradient(145deg,#1d281d,#15191b)}.civ-subject.locked{opacity:.5}.civ-subject h3{margin:3px 0}.civ-subject p{margin:3px 0;color:#bbaea5;font-size:12px}.civ-subject>div>span{font-size:10px;color:#d49b6d;font-weight:900}.subject-duels{display:flex;min-width:160px;flex-direction:column;align-items:flex-end;justify-content:center;gap:5px}.subject-duels small{font-size:10px;color:#a89d96;text-align:right}.subject-duels button{padding:8px 10px}
.civilization-map{margin-top:16px;padding:16px;background:linear-gradient(180deg,#241912,#11171d)}.civilization-map-head{display:flex;align-items:end;justify-content:space-between;gap:12px}.civilization-map-head h2{margin:5px 0}.civilization-map-head p{margin:0;color:#bdaea4}.civilization-map-head>b{font-size:26px;color:#dfa372}.civilization-map-stage{position:relative;min-height:430px;margin-top:14px;border-radius:22px;overflow:hidden;background:linear-gradient(rgba(34,22,16,.6),rgba(22,19,18,.78)),url('assets/expedition-map/after-restored.png') center/cover no-repeat;border:1px solid rgba(212,145,91,.22)}.civilization-map-stage:after{content:'';position:absolute;inset:0;background:radial-gradient(circle at 35% 25%,rgba(201,123,67,.18),transparent 36%),linear-gradient(90deg,rgba(164,91,49,.08),transparent 60%);pointer-events:none}.civ-map-node{position:absolute;transform:translate(-50%,-50%);z-index:2;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;border:2px solid #c18a62;background:#2a211c;color:#f7e8da;font-size:10px;font-weight:900;box-shadow:0 8px 18px rgba(0,0,0,.35)}.civ-map-node.open{background:#74482f;border-color:#e3aa7b;cursor:pointer}.civ-map-node.done{background:#536b4d;border-color:#b9d4a7}.civ-map-node.locked{filter:grayscale(.6);opacity:.42}
.civ-reward-legend{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.civ-reward-legend article{padding:15px;border-radius:16px;background:#17191d;border:2px solid #a46c42}.civ-reward-legend .armor{border-color:#8c64b8}.civ-reward-legend .evolution{border-color:#ece7df}.civ-reward-legend p{font-size:11px;color:#b9adb0;line-height:1.45}.civ-locked-alert{margin:12px 0;border-color:#a178ca!important}.civilization-tab{border-color:rgba(191,125,77,.45)!important}
@media(max-width:720px){.civ-bonus-strip,.civ-reward-legend,.civ-subject-grid{grid-template-columns:1fr}.civ-subject{grid-template-columns:1fr}.subject-duels{align-items:stretch;min-width:0}.subject-duels small{text-align:left}.civilization-map-stage{min-height:360px}.civ-map-node{width:30px;height:30px}.civilization-map-head{align-items:start}}


/* =========================================================
   RIMBA V59.56.40 — HOME 6 GRID + EXPEDITION PHASE PICKER
   ========================================================= */
.home-menu-grid{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:12px!important}
.home-menu-card{min-width:0!important;width:100%!important}
.home-menu-copy{min-width:0!important}
.home-menu-copy b,.home-menu-copy small{overflow-wrap:anywhere}
.modal:has(.phase-picker){width:min(1180px,94vw)!important;max-width:1180px!important}
.phase-picker{display:grid;gap:16px;min-width:0}
.phase-picker-head{text-align:center;max-width:820px;margin:0 auto}
.phase-picker-head h2{margin:8px 0 6px!important;font-size:clamp(1.5rem,2.5vw,2.25rem)}
.phase-picker-head p{margin:0!important}
.phase-picker-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.phase-card{position:relative;display:flex;flex-direction:column;min-width:0;min-height:330px;padding:18px;border:1px solid #35566e;border-radius:20px;background:linear-gradient(160deg,#102c3e,#081c29);overflow:hidden}
.phase-card:before{content:"";position:absolute;right:-55px;bottom:-60px;width:180px;height:180px;border-radius:50%;background:rgba(255,255,255,.035);pointer-events:none}
.phase-card.restoration{border-color:#3f8065;background:linear-gradient(160deg,#12362f,#0a2028)}
.phase-card.civilization{border-color:#8a5b34;background:linear-gradient(160deg,#382318,#15191d)}
.phase-card.power{border-color:#6d637c;background:linear-gradient(160deg,#292335,#151a25)}
.phase-card.locked{filter:saturate(.78)}
.phase-number{font-size:.72rem;font-weight:1000;letter-spacing:.14em;color:#a8c0cc}
.phase-icon{font-size:42px;margin:18px 0 9px}
.phase-card h3{font-size:1.4rem;margin:0 0 8px}
.phase-card p{font-size:.92rem!important;line-height:1.55!important;margin:0 0 16px!important;flex:1}
.phase-progress{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 14px;padding:10px 12px;border:1px solid rgba(255,255,255,.09);border-radius:12px;background:rgba(0,0,0,.15)}
.phase-progress b{font-size:1rem}.phase-progress span{font-size:.66rem;font-weight:900;letter-spacing:.08em;text-align:right;color:#9db7c5}
.phase-card>button{min-height:46px;width:100%;position:relative;z-index:1}
.phase-card>button:disabled{opacity:.55;cursor:not-allowed}

@media (max-width:1499px) and (min-width:1100px){
  .home-menu-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media (max-width:1099px) and (min-width:768px){
  .home-menu-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .phase-picker-grid{grid-template-columns:1fr 1fr}
  .phase-card.power{grid-column:1/-1;min-height:250px}
}
@media (max-width:767px){
  .home-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .home-menu-card{min-height:96px!important;grid-template-columns:40px minmax(0,1fr) 14px!important;padding:10px!important;gap:8px!important}
  .home-menu-icon{width:38px!important;height:38px!important;font-size:21px!important}
  .home-menu-copy b{font-size:13px!important;line-height:1.15!important}
  .home-menu-copy small{font-size:8.5px!important;line-height:1.3!important;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  .modal:has(.phase-picker){width:calc(100vw - 18px)!important;max-width:calc(100vw - 18px)!important;max-height:94dvh!important;padding:12px!important}
  .phase-picker{gap:11px}
  .phase-picker-head h2{font-size:1.45rem!important}
  .phase-picker-head p{font-size:.82rem!important;line-height:1.4!important}
  .phase-picker-grid{grid-template-columns:1fr!important;gap:9px}
  .phase-card,.phase-card.power{grid-column:auto;min-height:0;padding:13px 14px;border-radius:16px}
  .phase-card{display:grid;grid-template-columns:54px minmax(0,1fr);column-gap:10px;align-items:start}
  .phase-number{grid-column:1/-1}
  .phase-icon{grid-column:1;grid-row:2/5;font-size:34px;margin:8px 0 0}
  .phase-card h3{grid-column:2;margin:7px 0 4px;font-size:1.15rem}
  .phase-card p{grid-column:2;margin:0 0 8px!important;font-size:.8rem!important;line-height:1.42!important}
  .phase-progress{grid-column:1/-1;margin:2px 0 8px;padding:8px 10px}
  .phase-card>button{grid-column:1/-1;min-height:44px}
}
@media (max-width:390px){
  .home-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .home-menu-card{min-height:92px!important;padding:8px!important}
  .home-menu-copy b{font-size:12px!important}
  .home-menu-copy small{font-size:8px!important;-webkit-line-clamp:2}
}

/* Fase II — muted orange, intentionally restrained so card artwork remains dominant. */
.civilization-screen{--civ-bg:#17120f;--civ-panel:#261912;--civ-panel2:#322016;--civ-border:#704226;--civ-accent:#b56a36;--civ-accent-soft:#d49a6a}
.civilization-screen .civilization-hero,.civilization-screen .civilization-map,.civilization-screen .civ-subject,.civilization-screen .civ-reward-legend>article{
  background:linear-gradient(155deg,rgba(47,29,20,.96),rgba(14,24,30,.98))!important;
  border-color:rgba(181,106,54,.48)!important
}
.civilization-screen .civ-map-node.open{border-color:#b56a36!important;box-shadow:0 0 0 3px rgba(181,106,54,.14)!important}
.civilization-screen .civ-map-node.done{border-color:#d49a6a!important;background:#56331f!important}
\n\n/* =========================================================
   RIMBA V59.56.41 — Civilization responsive map + compact teachers
   ========================================================= */
.civilization-screen{overflow-x:hidden}
.civilization-screen .civilization-map{padding:14px!important}
.civ-map-progress{display:grid;justify-items:end;gap:1px;flex:0 0 auto}
.civ-map-progress b{font-size:clamp(22px,2vw,30px);line-height:1;color:#dfa372}
.civ-map-progress small{font-size:8px;letter-spacing:.12em;color:#a99587;font-weight:900}
.civilization-map-stage{min-height:0!important;height:auto!important;padding:18px!important;overflow:hidden!important;background:linear-gradient(rgba(34,22,16,.58),rgba(22,19,18,.8)),url('assets/expedition-map/after-restored.png') center/cover no-repeat!important}
.civ-map-route{position:relative;z-index:2;display:grid;grid-template-columns:repeat(10,minmax(38px,1fr));gap:14px 10px;align-items:center;max-width:1180px;margin:0 auto}
.civ-map-node{position:relative!important;left:auto!important;top:auto!important;transform:none!important;width:38px!important;height:38px!important;justify-self:center;isolation:isolate}
.civ-map-node:before{content:"";position:absolute;left:50%;top:50%;width:calc(100% + 20px);height:2px;background:rgba(193,138,98,.25);z-index:-1}
.civ-map-node:nth-child(10n):before,.civ-map-node:last-child:before{display:none}
.civ-map-node.checkpoint{width:44px!important;height:44px!important;border-width:3px!important}
.civ-map-node.checkpoint i{position:absolute;right:-5px;top:-8px;font-size:10px;font-style:normal;color:#f1c27d;text-shadow:0 2px 5px #000}
.civ-map-legend{display:flex;flex-wrap:wrap;gap:12px;margin-top:10px;justify-content:flex-end;color:#ae9f95;font-size:9px;font-weight:800}
.civ-map-legend span{display:flex;align-items:center;gap:5px}.civ-map-legend .dot{display:inline-block;width:9px;height:9px;border-radius:50%;border:1px solid #b56a36}.civ-map-legend .dot.done{background:#56331f;border-color:#d49a6a}.civ-map-legend .dot.checkpoint{border-width:2px;box-shadow:0 0 0 2px rgba(181,106,54,.12)}

.civ-learning-title{margin-top:14px!important}
.civ-subject-grid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:9px!important}
.civ-subject{display:flex!important;flex-direction:column!important;gap:9px!important;min-width:0!important;min-height:222px!important;padding:12px!important;border-radius:15px!important}
.civ-subject-main{display:flex;flex-direction:column;min-width:0;flex:1}
.civ-subject-kicker{display:flex;justify-content:space-between;align-items:center;gap:8px}
.civ-subject-kicker>span{font-size:10px;color:#d49b6d;font-weight:1000;letter-spacing:.08em}
.civ-subject-kicker>b{font-size:9px;color:#d9c5b6;padding:3px 6px;border-radius:999px;background:rgba(255,255,255,.06);white-space:nowrap}
.civ-subject h3{font-size:13px!important;line-height:1.2!important;margin:6px 0 4px!important;min-height:31px}
.civ-subject p{font-size:9.5px!important;line-height:1.4!important;margin:0!important;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;min-height:40px}
.civ-teachers{margin-top:auto;padding-top:9px}.civ-teachers>small{display:block;margin-bottom:5px;font-size:7px;letter-spacing:.12em;color:#9e8c80;font-weight:1000}
.civ-teacher-row{display:flex;align-items:center;gap:5px}
.civ-teacher{position:relative;width:34px;height:34px;border-radius:10px;overflow:hidden;border:1px solid #74513a;background:#10171d;display:grid;place-items:center;flex:0 0 auto}
.civ-teacher.passed{border-color:#739068;box-shadow:0 0 0 2px rgba(115,144,104,.12)}
.civ-teacher-art{width:100%!important;height:100%!important;object-fit:cover!important;display:block}
.civ-teacher>i{position:absolute;right:1px;bottom:1px;min-width:12px;height:12px;padding:0 2px;border-radius:6px;background:rgba(5,13,18,.88);color:#f4dfcf;font-size:7px;font-style:normal;display:grid;place-items:center;font-weight:900}
.subject-duels{min-width:0!important;width:100%;display:grid!important;grid-template-columns:1fr!important;gap:5px!important;align-items:stretch!important;margin-top:auto}
.subject-duels small{font-size:8px!important;line-height:1.3!important;text-align:left!important;min-height:21px}
.subject-duels button{width:100%;min-height:34px!important;padding:7px 8px!important;font-size:9px!important}
.civ-subject-complete,.civ-subject-lock{display:grid;place-items:center;min-height:32px;border-radius:9px;background:rgba(255,255,255,.05);font-size:8px;font-weight:1000;letter-spacing:.08em;color:#aab7aa}
.civ-subject-scroll-hint{display:none}

@media(max-width:1250px){
  .civ-subject-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .civ-map-route{grid-template-columns:repeat(8,minmax(38px,1fr))}
  .civ-map-node:nth-child(10n):before{display:block}.civ-map-node:nth-child(8n):before{display:none}
}
@media(max-width:900px){
  .civ-subject-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .civ-map-route{grid-template-columns:repeat(6,minmax(38px,1fr));gap:12px 8px}
  .civ-map-node:nth-child(8n):before{display:block}.civ-map-node:nth-child(6n):before{display:none}
  .civilization-map-head{align-items:flex-start!important}
}
@media(max-width:720px){
  .civilization-screen .civilization-map{padding:11px!important}
  .civilization-map-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:8px!important}
  .civilization-map-head h2{font-size:17px!important;line-height:1.2}.civilization-map-head p{font-size:9px!important;line-height:1.4}
  .civilization-map-stage{padding:12px 8px!important;border-radius:16px!important}
  .civ-map-route{grid-template-columns:repeat(5,minmax(34px,1fr));gap:10px 4px}
  .civ-map-node{width:32px!important;height:32px!important;font-size:9px!important}
  .civ-map-node.checkpoint{width:37px!important;height:37px!important}
  .civ-map-node:nth-child(6n):before{display:block}.civ-map-node:nth-child(5n):before{display:none}
  .civ-map-legend{justify-content:flex-start;font-size:8px;gap:8px}
  .civ-subject-scroll-hint{display:block;margin:-4px 0 7px;text-align:right;color:#b69a87;font-size:8px;font-weight:800}
  .civ-subject-grid{display:flex!important;grid-template-columns:none!important;gap:9px!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;padding:2px 2px 10px!important;scrollbar-width:thin}
  .civ-subject{flex:0 0 min(78vw,310px)!important;width:min(78vw,310px)!important;min-height:210px!important;scroll-snap-align:start}
  .civ-subject h3{min-height:auto!important;font-size:13px!important}
  .civ-subject p{min-height:38px!important;-webkit-line-clamp:3}
  .civ-teacher{width:36px;height:36px}
  .subject-duels small{min-height:auto!important}
}
@media(max-width:390px){
  .civ-map-route{grid-template-columns:repeat(5,minmax(30px,1fr));gap:8px 2px}
  .civ-map-node{width:29px!important;height:29px!important}
  .civ-map-node.checkpoint{width:34px!important;height:34px!important}
  .civ-subject{flex-basis:82vw!important;width:82vw!important;padding:11px!important}
}


/* V59.56.42 — civilization visual balance + pvp emote arena */

.civilization-map-stage{min-height:auto!important;padding:16px!important;overflow:hidden!important}
.civ-map-route{width:100%!important;max-width:none!important;grid-template-columns:repeat(10,minmax(0,1fr))!important;gap:12px 6px!important;padding:4px 2px!important}
.civ-map-node{width:clamp(26px,2.1vw,36px)!important;height:clamp(26px,2.1vw,36px)!important;font-size:clamp(8px,.78vw,10px)!important}
.civ-map-node.checkpoint{width:clamp(30px,2.55vw,41px)!important;height:clamp(30px,2.55vw,41px)!important}
.civ-map-node:before{width:calc(100% + 12px)!important}
.civ-teacher-row{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.civ-teacher{width:40px!important;height:40px!important;padding:3px!important;border-radius:12px!important;background:linear-gradient(180deg,#1a2026,#0f1418)!important;border:1px solid #6c4c37!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.03)}
.civ-teacher.passed{border-color:#75946b!important;box-shadow:0 0 0 2px rgba(117,148,107,.12),inset 0 0 0 1px rgba(255,255,255,.03)!important}
.civ-teacher .civ-teacher-art,.civ-teacher .art-emblem{width:100%!important;height:100%!important;display:grid!important;place-items:center!important;border-radius:9px!important;overflow:hidden!important;background:radial-gradient(circle at 35% 30%,rgba(255,255,255,.12),rgba(255,255,255,.03) 55%,rgba(0,0,0,.15) 100%)!important}
.civ-teacher img.civ-teacher-art,.civ-teacher .civ-teacher-art img{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center center!important}
.civ-teacher .glyph{font-size:18px!important;line-height:1!important;transform:none!important}
.civ-teacher>i{right:1px!important;bottom:1px!important;min-width:13px!important;height:13px!important;font-size:7px!important;border-radius:7px!important;background:rgba(4,10,15,.92)!important}
.subject-duels{min-width:0!important}
.subject-duels button{width:100%!important;max-width:154px}
.pvp-emote-arena{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:8px 0 10px;pointer-events:none;min-height:0}
.pvp-emote-pop{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:999px;background:rgba(7,20,31,.82);border:1px solid rgba(255,255,255,.12);box-shadow:0 8px 20px rgba(0,0,0,.18);backdrop-filter:blur(4px);font-size:11px;line-height:1}
.pvp-emote-pop .emo{font-size:18px;line-height:1}
.pvp-emote-pop b{font-size:9px;color:#d9edf7;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pvp-emote-feed{opacity:.78}
@media (max-width: 1400px){
  .civ-map-route{grid-template-columns:repeat(10,minmax(0,1fr))!important;gap:10px 5px!important}
}
@media (max-width: 1180px){
  .civ-map-route{grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:10px 5px!important}
  .civ-map-node:nth-child(10n):before{display:block!important}
  .civ-map-node:nth-child(8n):before{display:none!important}
}
@media (max-width: 980px){
  .civ-map-route{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:9px 4px!important}
  .civ-map-node:nth-child(8n):before{display:block!important}
  .civ-map-node:nth-child(6n):before{display:none!important}
}
@media (max-width: 720px){
  .civilization-map-stage{padding:12px!important}
  .civ-map-route{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:8px 3px!important}
  .civ-map-node{width:30px!important;height:30px!important;font-size:8.5px!important}
  .civ-map-node.checkpoint{width:34px!important;height:34px!important}
  .civ-map-node:nth-child(6n):before{display:block!important}
  .civ-map-node:nth-child(5n):before{display:none!important}
  .civ-subject-grid{display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory!important;padding-bottom:10px!important}
  .civ-subject{flex:0 0 min(80vw,300px)!important;width:min(80vw,300px)!important;min-height:208px!important}
  .civ-teacher{width:38px!important;height:38px!important}
  .pvp-emote-arena{justify-content:flex-start;gap:5px}
  .pvp-emote-pop{padding:3px 7px;font-size:10px}
  .pvp-emote-pop .emo{font-size:16px}
}
@media (max-width: 420px){
  .civ-map-route{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:7px 2px!important}
  .civ-map-node{width:28px!important;height:28px!important;font-size:8px!important}
  .civ-map-node.checkpoint{width:32px!important;height:32px!important}
  .civ-subject{flex-basis:84vw!important;width:84vw!important;padding:10px!important}
  .civ-teacher{width:36px!important;height:36px!important;padding:2px!important}
}


/* V59.56.43 — civilization rivals + card slot */

.civ-teacher{position:relative}.civ-teacher>u{position:absolute;left:-3px;top:-6px;width:16px;height:16px;border-radius:8px;display:grid;place-items:center;background:#17120f;border:1px solid #d6a36f;text-decoration:none;font-size:9px;z-index:3;box-shadow:0 3px 8px rgba(0,0,0,.3)}
.civilization-card-art{width:92px;aspect-ratio:.72;border-radius:12px;padding:7px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;background:linear-gradient(160deg,#38261b,#14191e);border:2px solid #bd7742;box-shadow:inset 0 0 0 1px rgba(255,255,255,.05),0 8px 18px rgba(0,0,0,.22);color:#fff;flex:0 0 auto}
.civilization-card-art.armor{border-color:#9a70cd;background:linear-gradient(160deg,#302240,#15181e)}.civilization-card-art.evolution{border-color:#f0eee8;background:linear-gradient(160deg,#393938,#14181d)}.civilization-card-art.locked{filter:grayscale(.85);opacity:.48}.civilization-card-art.selected{box-shadow:0 0 0 3px rgba(213,161,104,.22),0 10px 24px rgba(0,0,0,.3)}
.civ-card-band{font-size:7px;font-weight:1000;letter-spacing:.12em;opacity:.85}.civ-card-emblem{font-size:25px;line-height:1}.civilization-card-art b{font-size:10px;line-height:1.1}.civilization-card-art small{font-size:7px;color:#d9c7b8}.civilization-card-art em{font-size:7.5px;line-height:1.15;color:#f0dfd0;font-style:normal}.civilization-card-art.compact{width:72px;border-radius:10px;padding:5px}.civilization-card-art.compact .civ-card-emblem{font-size:20px}.civilization-card-art.compact b{font-size:8px}.civilization-card-art.compact em{font-size:6.5px}
.database-tabs{flex-wrap:wrap}.civilization-db-grid .database-card{min-height:118px}.civilization-db-card{border-color:#6f4a31!important}.civilization-db-card.selected{box-shadow:0 0 0 2px #c28655 inset}.civilization-db-card.locked{opacity:.55}.civ-db-popup .database-hero{align-items:center}
.civilization-deck-panel{display:grid;gap:14px}.civilization-slot{padding:14px;display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:12px}.civ-slot-empty{width:70px;height:96px;border:2px dashed #70523d;border-radius:12px;display:grid;place-items:center;font-size:28px;color:#8f7663}.civilization-deck-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}.civilization-deck-card{border:1px solid #3d342e;border-radius:14px;padding:8px;background:#11181d;color:#fff;display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0}.civilization-deck-card>span{font-size:8px;font-weight:900;color:#cbb9aa}.civilization-deck-card.selected{border-color:#d09a64;box-shadow:0 0 0 2px rgba(208,154,100,.15)}.civilization-deck-card.locked{opacity:.45}
@media(max-width:1100px){.civilization-deck-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:720px){.civilization-slot{grid-template-columns:1fr auto}.civilization-slot>button{grid-column:1/-1;width:100%}.civilization-deck-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.civilization-card-art.compact{width:64px}.civilization-db-grid{grid-template-columns:1fr 1fr!important}}
@media(max-width:420px){.civilization-deck-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.civilization-card-art.compact{width:60px}.civilization-db-grid{grid-template-columns:1fr!important}}


/* V59.56.44 — exact civilization rival roster */
.civ-teacher>strong{position:absolute;left:50%;bottom:-17px;transform:translateX(-50%);font-size:6.5px;line-height:1;letter-spacing:.02em;color:#d8c0ad;font-weight:900;white-space:nowrap;pointer-events:none}
.civ-subject:nth-child(9) .civ-teacher-row{padding-bottom:17px}
@media(max-width:720px){.civ-teacher>strong{font-size:6px;bottom:-16px}.civ-subject:nth-child(9) .civ-teacher-row{padding-bottom:16px}}

/* V59.56.49 — expedition phase selector and Civilization Level II map */
.expedition-tier-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:4px 0 12px;padding:8px;border:1px solid #2a4e64;border-radius:16px;background:linear-gradient(145deg,#0e2738,#081b28)}
.expedition-tier-tabs button{min-width:0;min-height:48px;padding:9px 12px;border:1px solid #355d72;border-radius:12px;background:#0b2231;color:#d8edf5;font-weight:950;letter-spacing:.03em}
.expedition-tier-tabs button.active{border-color:#38b994;background:linear-gradient(145deg,#12513f,#0d2a31);color:#eafff5;box-shadow:0 0 0 1px #38b99430 inset}
.expedition-tier-tabs button.locked{opacity:.65}.expedition-tier-tabs button small{display:block;margin-top:3px;color:#95b8c5;font-size:9px;letter-spacing:0}

/* Mobile expedition and Civilization phase layout — v59.56.50 */
.phase-picker{display:grid;gap:16px;min-width:0}
.phase-picker-head{display:grid;gap:8px}
.phase-picker-head h2{font-size:clamp(20px,3vw,28px);line-height:1.15;margin:0}
.phase-picker-head p{max-width:760px;margin:0;color:#a8c3d0;line-height:1.5}
.phase-picker-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:stretch}
.phase-card{position:relative;min-width:0;padding:16px;border:1px solid #31546a;border-radius:18px;background:linear-gradient(150deg,#102d40,#091d2c);display:flex;flex-direction:column;gap:10px;overflow:hidden}
.phase-card.restoration{border-color:#399b83}.phase-card.civilization{border-color:#8770b7}.phase-card.power{border-color:#9b7a42}
.phase-card.locked{filter:saturate(.72)}
.phase-number{font-size:10px;font-weight:1000;letter-spacing:.14em;color:#8eb4c5}
.phase-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:15px;background:#ffffff0b;font-size:27px}
.phase-card h3{font-size:18px;margin:0}.phase-card>p{flex:1;margin:0;color:#abc2ce;font-size:13px;line-height:1.45}
.phase-progress{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 11px;border:1px solid #ffffff12;border-radius:12px;background:#06172366}
.phase-progress b{font-size:15px;color:#f2fbff}.phase-progress span{font-size:9px;letter-spacing:.08em;color:#9bb6c4;text-align:right}
.phase-card>button{width:100%;min-height:44px}
.modal:has(.phase-picker){width:min(980px,100%);max-height:min(90dvh,860px);padding:clamp(14px,2.2vw,22px)}
.civilization-screen{display:grid;gap:12px}
.civilization-hero{display:grid;grid-template-columns:72px minmax(0,1fr);gap:16px;align-items:center;padding:20px}
.civilization-hero h1{font-size:clamp(23px,3vw,34px);line-height:1.08;margin:8px 0}
.civilization-hero p{max-width:850px;color:#b2c7d2;line-height:1.5;margin:0 0 8px}
.civilization-hero>div:last-child>b{font-size:12px;color:#d5eaf2}
.civ-bonus-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.civ-bonus-strip article{display:grid;grid-template-columns:42px minmax(0,1fr);grid-template-rows:auto auto;column-gap:10px;align-items:center;padding:12px;border:1px solid #754e20;border-radius:15px;background:linear-gradient(145deg,#382715,#17222a)}
.civ-bonus-strip article>span{grid-row:1/3;font-size:27px}.civ-bonus-strip article>b{font-size:13px}.civ-bonus-strip article>small{font-size:10px;color:#d3b782;line-height:1.35}
.civ-bonus-strip .armor{border-color:#714590;background:linear-gradient(145deg,#30203e,#18212d)}.civ-bonus-strip .armor small{color:#cfb1e8}
.civ-bonus-strip .evolution{border-color:#8296a5;background:linear-gradient(145deg,#283741,#17232c)}.civ-bonus-strip .evolution small{color:#c7d4dc}
.civ-locked-alert{padding:12px 15px;border-color:#8a6835;color:#f5db9b}
.civilization-map{padding:18px;display:grid;gap:14px;min-width:0}
.civilization-map-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}
.civilization-map-head h2{margin:6px 0;font-size:21px}.civilization-map-head p{margin:0;color:#a9c0cc;line-height:1.45}
.civ-map-progress{min-width:86px;display:grid;justify-items:center;gap:3px;padding:10px;border:1px solid #406174;border-radius:14px;background:#081e2b}.civ-map-progress b{font-size:21px}.civ-map-progress small{font-size:8px;color:#91adbb;letter-spacing:.08em}
.civilization-map-stage{min-width:0;padding:12px;border:1px solid #24495d;border-radius:16px;background:radial-gradient(ellipse at top,#102e40,#081b28 72%)}
.civ-map-route{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:8px}
.civ-map-node{position:relative;min-width:0;min-height:76px;padding:7px 4px;border:1px solid #31566a;border-radius:12px;background:#0b2230;color:#e9f7fc;display:grid;align-content:center;justify-items:center;gap:4px;touch-action:manipulation}
.civ-map-node>span{display:grid;place-items:center;width:26px;height:26px;border:1px solid #43718a;border-radius:50%;background:#14384c;font-weight:1000;font-size:11px}
.civ-map-node>b{width:100%;font-size:9px;line-height:1.15;text-align:center;color:#b8d0db;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.civ-map-node.open{border-color:#2e9f80;background:linear-gradient(150deg,#10392f,#0a2430)}.civ-map-node.open>span{border-color:#4dd6ac;color:#9ff5d9}
.civ-map-node.done{border-color:#d5a53c;background:linear-gradient(150deg,#453618,#252317)}.civ-map-node.done>span{background:#d69e22;color:#17202a;border-color:#ffdc7a}
.civ-map-node.locked{opacity:.58;filter:grayscale(.45)}.civ-map-node.checkpoint{box-shadow:inset 0 0 0 1px #eac24a55}
.civ-map-node>i{position:absolute;top:4px;right:5px;color:#ffd868;font-size:10px;font-style:normal}
.civ-map-legend{display:flex;flex-wrap:wrap;gap:8px 14px;color:#9db7c4;font-size:11px}
.civ-map-legend span{display:inline-flex;align-items:center;gap:6px}.civ-map-legend .dot{width:9px;height:9px;border-radius:50%;background:#2e9f80}.civ-map-legend .dot.done{background:#d5a53c}.civ-map-legend .dot.checkpoint{background:#f1d263}
.civ-learning-title{margin:8px 0 0}.civ-subject-scroll-hint{display:none}
.civ-subject-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.civ-subject{min-width:0;padding:14px;border:1px solid #31566a;border-radius:16px;background:linear-gradient(145deg,#102a3b,#091d2a);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.civ-subject.done{border-color:#398e68;background:linear-gradient(145deg,#12372b,#0a211d)}.civ-subject.available{border-color:#b18438}.civ-subject.locked{opacity:.78}
.civ-subject-main{min-width:0}.civ-subject-kicker{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#9bc1d0;font-size:10px}.civ-subject-kicker>span{font-weight:1000;letter-spacing:.1em}.civ-subject-kicker>b{color:#e4c57e}
.civ-subject h3{font-size:15px;line-height:1.2;margin:7px 0 4px}.civ-subject-main>p{font-size:11px;line-height:1.42;color:#a9c1cd;margin:0}
.civ-teachers{margin-top:9px}.civ-teachers>small{font-size:8px;letter-spacing:.1em;color:#87a8b7}.civ-teacher-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:5px}.civ-teacher{position:relative;width:42px;height:42px;border:1px solid #385d70;border-radius:11px;background:#071b27;display:grid;place-items:center}.civ-teacher-art{width:100%;height:100%;object-fit:cover;border-radius:10px}.civ-teacher>i{position:absolute;right:-4px;top:-5px;width:16px;height:16px;border-radius:50%;display:grid;place-items:center;background:#17384a;color:#d8f3ff;font-size:9px;font-style:normal}.civ-teacher.passed{border-color:#4dc995;box-shadow:0 0 0 1px #4dc99544}.civ-teacher>strong{position:absolute;bottom:0;left:0;right:0;padding:2px;background:#06151ddd;color:#fff;font-size:6px;text-align:center}.civ-teacher>u{position:absolute;left:-4px;top:-5px;z-index:2;font-size:12px;text-decoration:none}
.subject-duels{display:grid;justify-items:stretch;gap:8px;min-width:112px}.subject-duels>small{color:#a7bfca;font-size:9px;line-height:1.35}.subject-duels .primary-btn{min-height:40px;white-space:nowrap}.civ-subject-complete,.civ-subject-lock{padding:9px;border-radius:10px;background:#ffffff0c;color:#c7e1eb;font-weight:900;text-align:center;font-size:9px}
.civ-reward-legend{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.civ-reward-legend article{padding:13px;border:1px solid #996e32;border-radius:14px;background:#302615}.civ-reward-legend article.armor{border-color:#8053a0;background:#261c32}.civ-reward-legend article.evolution{border-color:#8897a4;background:#202c34}.civ-reward-legend b{font-size:12px}.civ-reward-legend p{margin:6px 0 0;color:#bfd0d7;font-size:10px;line-height:1.4}

@media(max-width:760px){
  .modal:has(.phase-picker){width:calc(100vw - 16px)!important;max-width:600px;max-height:calc(100dvh - 16px);padding:14px 12px}
  .phase-picker{gap:12px}.phase-picker-head{gap:6px}.phase-picker-head h2{font-size:22px}.phase-picker-head p{font-size:12px;line-height:1.4}
  .phase-picker-grid{grid-template-columns:1fr;gap:8px}
  .phase-card{display:grid;grid-template-columns:42px minmax(0,1fr) auto;grid-template-rows:auto auto auto;gap:4px 9px;padding:10px 11px;border-radius:14px}
  .phase-number{grid-column:1/-1;font-size:8px}.phase-icon{grid-column:1;grid-row:2/4;width:38px;height:38px;font-size:22px;border-radius:12px}
  .phase-card h3{grid-column:2;grid-row:2;font-size:15px;align-self:end}.phase-card>p{grid-column:2;grid-row:3;font-size:10px;line-height:1.3;align-self:start}
  .phase-progress{grid-column:3;grid-row:2;min-width:78px;padding:7px;display:grid;justify-items:end;gap:2px}.phase-progress b{font-size:12px}.phase-progress span{font-size:7px}
  .phase-card>button{grid-column:2/4;grid-row:4;min-height:38px;padding:8px;font-size:11px}
  .modal:has(.phase-picker)>.modal-actions{position:sticky;bottom:-14px;padding:9px 0 0;margin-top:12px;background:linear-gradient(180deg,#0b203000,#0b2030 35%)}
  .civilization-screen{gap:10px}
  .civilization-hero{grid-template-columns:44px minmax(0,1fr);gap:10px;padding:13px}
  .civilization-hero .ascend-symbol{width:42px;height:42px;font-size:22px;border-radius:12px}
  .civilization-hero h1{font-size:20px;margin:6px 0}.civilization-hero p{font-size:11px;line-height:1.4}
  .civilization-hero>div:last-child>b{font-size:10px;line-height:1.35;display:block}
  .civ-bonus-strip{grid-template-columns:1fr;gap:6px}
  .civ-bonus-strip article{grid-template-columns:34px minmax(0,1fr);padding:8px 10px;column-gap:8px;border-radius:12px}
  .civ-bonus-strip article>span{font-size:22px}.civ-bonus-strip article>b{font-size:11px}.civ-bonus-strip article>small{font-size:9px}
  .civilization-map{padding:12px;gap:10px;border-radius:16px}
  .civilization-map-head{grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:start}
  .civilization-map-head h2{font-size:16px;margin:5px 0}.civilization-map-head p{font-size:10px;line-height:1.35}
  .civ-map-progress{min-width:64px;padding:8px 6px;border-radius:12px}.civ-map-progress b{font-size:17px}.civ-map-progress small{font-size:7px}
  .civilization-map-stage{padding:8px;border-radius:13px}.civ-map-route{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
  .civ-map-node{min-height:61px;padding:6px 3px;border-radius:10px;gap:3px}
  .civ-map-node>span{width:23px;height:23px;font-size:10px}.civ-map-node>b{font-size:7px;line-height:1.05}
  .civ-map-node>i{top:2px;right:3px;font-size:8px}
  .civ-map-legend{gap:7px 10px;font-size:9px}
  .civ-learning-title{margin:6px 0 0}.civ-learning-title h2{font-size:17px}.civ-learning-title p{font-size:10px;line-height:1.35}
  .civ-subject-scroll-hint{display:block;color:#8fabb8;font-size:9px;margin-top:-6px}
  .civ-subject-grid{grid-template-columns:1fr;gap:7px}
  .civ-subject{grid-template-columns:minmax(0,1fr) 94px;gap:8px;padding:10px;border-radius:13px}
  .civ-subject h3{font-size:13px;margin:5px 0 3px}.civ-subject-main>p{font-size:9px;line-height:1.3}
  .civ-teachers{margin-top:6px}.civ-teachers>small{font-size:7px}.civ-teacher-row{gap:5px}.civ-teacher{width:34px;height:34px;border-radius:9px}
  .civ-teacher-art{border-radius:8px}.civ-teacher>i{width:14px;height:14px;font-size:8px}
  .subject-duels{min-width:0;gap:5px}.subject-duels>small{font-size:8px}.subject-duels .primary-btn{min-height:38px;padding:7px 5px;font-size:9px;white-space:normal}
  .civ-subject-complete,.civ-subject-lock{font-size:8px;padding:8px 4px}
  .civ-reward-legend{grid-template-columns:1fr;gap:7px}.civ-reward-legend article{padding:10px}.civ-reward-legend b{font-size:11px}.civ-reward-legend p{font-size:9px}
  .civ-locked-panel{padding:14px}.civ-locked-panel h2{font-size:18px}.civ-locked-panel p{font-size:12px;line-height:1.45}
  .expedition-screen{padding-left:8px!important;padding-right:8px!important}
  .expedition-screen .topbar{gap:5px;padding-bottom:8px}
  .expedition-screen .topbar h1,.expedition-screen .topbar .title{font-size:15px}
  .expedition-tier-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:6px;margin:0 0 8px;border-radius:14px}
  .expedition-tier-tabs button{min-width:0;min-height:44px;padding:7px 5px;font-size:10px;line-height:1.1;white-space:normal}
  .expedition-tier-tabs button small{display:block;font-size:8px;margin-top:3px}
  .expedition-screen-shell,.expedition-world-panel,.expedition-world-header,.expedition-world-layout,.expedition-world-side,.expedition-focus-card{min-width:0;max-width:100%}
  .expedition-world-panel{margin:6px 0 12px;padding:10px;border-radius:16px}
  .expedition-world-header.expedition-world-header-standalone{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-bottom:10px}
  .expedition-world-header.expedition-world-header-standalone>div:first-child{min-width:0;width:100%}
  .expedition-world-header.expedition-world-header-standalone>div:first-child .badge{font-size:8px;padding:5px 7px}
  .expedition-world-header.expedition-world-header-standalone>div:first-child h2{font-size:17px;line-height:1.2;margin:6px 0}
  .expedition-world-header.expedition-world-header-standalone>div:first-child p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;white-space:normal;overflow:hidden;text-overflow:clip;font-size:10px;line-height:1.4}
  .expedition-header-tools{width:100%;max-width:none;min-width:0;margin:0;gap:7px}
  .expedition-header-tools .expedition-world-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
  .expedition-header-tools .expedition-world-stats>div{padding:7px 5px;border-radius:10px;text-align:center}
  .expedition-header-tools .expedition-world-stats small{font-size:7px;line-height:1.15;min-height:17px;margin-bottom:3px}
  .expedition-header-tools .expedition-world-stats b{font-size:10px;line-height:1.15;overflow-wrap:anywhere}
  .expedition-map-selector-header{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;width:100%;overflow:visible!important}
  .expedition-map-selector-header .expedition-loc-chip{min-width:0!important;max-width:none!important;width:100%;min-height:38px;padding:6px 7px!important;display:flex!important;justify-content:space-between!important;gap:4px!important;white-space:normal!important;border-radius:10px!important;font-size:9px!important;text-align:left}
  .expedition-map-selector-header .expedition-loc-chip>span{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;text-overflow:clip;line-height:1.1}
  .expedition-map-selector-header .expedition-loc-chip small{margin:0;flex:0 0 auto;font-size:8px!important}
  .expedition-world-layout{grid-template-columns:minmax(0,1fr)!important;gap:9px}
  .expedition-world-map-column{min-width:0;grid-template-rows:auto!important}
  .expedition-world-map{min-width:0}
  .expedition-map-stack{aspect-ratio:4/3;border-radius:13px}
  .expedition-map-highlight{width:44px;height:44px}
  .expedition-node-core{width:32px;height:32px;font-size:14px}
  .expedition-node-ping{width:38px;height:38px}
  .expedition-player-marker span{width:34px;height:34px;font-size:13px}
  .expedition-map-legend{gap:5px;font-size:8px;margin-top:7px}
  .expedition-map-legend span{padding:5px 7px}
  .expedition-focus-card{padding:11px;gap:8px;border-radius:13px}
  .expedition-focus-card>.badge{align-self:start;font-size:8px;padding:5px 7px}
  .expedition-focus-card h3{font-size:15px}.expedition-focus-card>p{font-size:10px;line-height:1.35}
  .expedition-progress-pair{grid-template-columns:1fr 1fr;gap:8px}
  .expedition-progress-pair small{font-size:8px;line-height:1.2;min-height:19px}
  .expedition-progress-bar{height:8px}.expedition-progress-pair b{font-size:10px;margin-top:4px}
  .expedition-side-note{padding:8px;border-radius:10px;background:#ffffff08}.expedition-side-note p{font-size:9px;line-height:1.3;margin-top:4px}
  .expedition-side-enemy-info{margin-top:2px}
  .expedition-side-enemy-info .expedition-enemy-card-top{grid-template-columns:42px minmax(0,1fr)!important;gap:7px!important;padding:8px!important}
  .expedition-side-enemy-info .expedition-enemy-avatar{width:42px!important;height:42px!important}
  .expedition-side-enemy-info .expedition-enemy-copy h4{font-size:11px!important}
  .expedition-side-enemy-info .expedition-enemy-copy p{font-size:8px!important}
  .expedition-side-enemy-info .expedition-enemy-meta{grid-template-columns:1fr!important;gap:4px!important}
  .expedition-side-enemy-info .expedition-enemy-meta span{font-size:7px!important;line-height:1.2}
  .expedition-detail-strip-slim{grid-template-columns:minmax(0,1fr)!important;gap:9px;padding:9px!important;margin-top:8px!important}
  .expedition-detail-strip-slim .expedition-detail-levels{width:100%;overflow:visible}
  .expedition-detail-strip-slim .expedition-mini-stage-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px!important;width:100%}
  .expedition-mini-stage{min-width:0;min-height:38px;padding:6px 3px;font-size:9px;white-space:nowrap}
  .expedition-detail-strip-slim .expedition-detail-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px;width:100%}
  .expedition-detail-strip-slim .expedition-detail-actions button{min-width:0!important;min-height:42px;width:100%!important;padding:8px 6px;font-size:10px}
}
@media(max-width:390px){
  .phase-card{grid-template-columns:36px minmax(0,1fr) 72px;padding:9px}
  .phase-icon{width:34px;height:34px;font-size:19px}
  .phase-progress{min-width:72px;padding:6px}
  .civ-map-route{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
  .civ-map-node{min-height:58px}
  .civ-subject{grid-template-columns:minmax(0,1fr) 82px;padding:8px;gap:6px}
  .civ-teacher{width:30px;height:30px}
  .expedition-map-selector-header{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .expedition-progress-pair{grid-template-columns:1fr}
  .expedition-progress-pair small{min-height:0}
}

/* v59.57.1: compact onboarding, natural scrolling with a keyboard or large text. */
.setup-v571 .setup-card-wide{width:min(720px,100%)!important;padding:18px;min-width:0}
.setup-v571 .setup-compact-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.setup-v571 .setup-brand{display:flex;align-items:center;gap:8px;margin:0}
.setup-v571 .setup-logo{width:42px;height:42px;margin:0;object-fit:contain}
.setup-v571 h1{font-size:24px;margin:12px 0 4px;text-align:left}
.setup-v571 .setup-card>p{font-size:13px;text-align:left;margin-bottom:12px}
.setup-v571 .field{gap:5px;margin-bottom:10px}
.setup-v571 .field input{font-size:16px;padding:10px 12px;min-height:44px}
.setup-deck-heading,.setup-deck-nav{display:flex;align-items:center;justify-content:space-between;gap:8px}
.setup-deck-heading{font-size:13px;font-weight:700}
.setup-deck-nav{margin-top:4px}.setup-deck-nav small{font-size:11px;color:#bdd2dc}
.setup-deck-nav button{min-width:44px;min-height:44px;font-size:24px;padding:0}
.setup-v571 .starter-preset-grid{display:flex!important;overflow-x:auto!important;overflow-y:hidden;scroll-snap-type:x mandatory;gap:10px;padding:4px 3px 10px;position:relative;touch-action:pan-x pan-y;overscroll-behavior-x:contain}
.setup-v571 .starter-preset{flex:0 0 210px;display:grid;grid-template-columns:52px 1fr;grid-template-rows:auto auto auto;gap:4px 8px;min-width:0;padding:10px;scroll-snap-align:center;min-height:110px}
.setup-v571 .starter-avatar{grid-row:1/4;width:52px;height:82px}
.setup-v571 .starter-preset>b{font-size:13px}.setup-v571 .starter-preset>small{font-size:11px;min-height:0}
.starter-picked{font-size:11px;color:#80e3b4}
.setup-v571 .starter-choice-summary{display:grid;grid-template-columns:1fr;margin-top:4px;gap:4px;padding:10px}
.setup-guardian-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:4px}
.setup-guardian-preview>span{display:flex;flex-direction:column;align-items:center;min-width:0;text-align:center}
.setup-v571 .starter-mini-art{width:48px;height:48px}.setup-guardian-preview small{font-size:11px;line-height:1.3;overflow-wrap:anywhere}
.setup-v571 .setup-actions{display:grid;gap:6px;margin-top:12px;justify-content:stretch}
.setup-actions>small{color:#b9d0de;font-size:11px;text-align:center}
.setup-v571 .setup-actions button{width:100%;min-height:46px}
.skill-rule-note{display:block;color:#bdd2dc;line-height:1.5;font-size:11px;margin-top:6px}
@media(max-width:600px){
 .setup-wrap.setup-v571{padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));align-items:start}
 .setup-v571 .setup-card-wide{padding:12px}
 .setup-v571 h1{font-size:21px;margin-top:8px}
 .setup-v571 .setup-logo{width:34px;height:34px}
 .setup-v571 .starter-preset{flex-basis:calc(100% - 32px);min-height:98px}
 .setup-v571 .starter-avatar{height:70px}
 .setup-v571 .setup-brand-text b{font-size:16px}.setup-v571 .setup-brand-text small{font-size:10px}
 .setup-v571 .starter-mini-art{height:40px;width:40px}
}

#app .setup-v571 .setup-logo{width:42px!important;height:42px!important}
@media(max-width:600px){#app .setup-v571 .setup-logo{width:34px!important;height:34px!important}}

/* v59.57.6 — PvP surrender flow + arena emoticon overlay */
.pvp-emote-screen-overlay{position:fixed;inset:0;z-index:9998;display:grid;place-items:center;pointer-events:none;background:radial-gradient(circle at center,rgba(20,58,76,.18),transparent 44%);animation:pvpEmoteOverlayIn .16s ease-out both}
.pvp-emote-screen-bubble{display:grid;place-items:center;gap:7px;min-width:138px;padding:16px 24px 13px;border-radius:28px;border:1px solid rgba(255,255,255,.22);background:rgba(4,20,31,.78);box-shadow:0 18px 60px rgba(0,0,0,.42),0 0 45px rgba(80,235,204,.15);backdrop-filter:blur(8px);animation:pvpEmotePop .42s cubic-bezier(.2,1.35,.4,1) both}
.pvp-emote-screen-emoji{font-size:clamp(68px,15vw,118px);line-height:1;filter:drop-shadow(0 8px 16px rgba(0,0,0,.32));animation:pvpEmoteFloat 1.35s ease-in-out infinite alternate}
.pvp-emote-screen-user{max-width:min(72vw,280px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:900;letter-spacing:.06em;color:#e9fbff;text-transform:uppercase}
.pvp-emote-screen-overlay.out{animation:pvpEmoteOverlayOut .55s ease-in forwards}
@keyframes pvpEmoteOverlayIn{from{opacity:0}to{opacity:1}}
@keyframes pvpEmoteOverlayOut{to{opacity:0;transform:scale(.94)}}
@keyframes pvpEmotePop{0%{transform:scale(.35) rotate(-8deg);opacity:0}70%{transform:scale(1.08) rotate(2deg);opacity:1}100%{transform:scale(1) rotate(0)}}
@keyframes pvpEmoteFloat{from{transform:translateY(0) scale(1)}to{transform:translateY(-7px) scale(1.05)}}
@media(max-width:720px){.pvp-emote-screen-bubble{min-width:112px;padding:13px 20px 11px;border-radius:24px}.pvp-emote-screen-emoji{font-size:clamp(64px,24vw,96px)}}
@media(prefers-reduced-motion:reduce){.pvp-emote-screen-overlay,.pvp-emote-screen-bubble,.pvp-emote-screen-emoji{animation:none!important}}

/* v59.57.6 — surrender returns Home + full-screen PvP emoticon */
.pvp-emote-screen-overlay{position:fixed;inset:0;z-index:9998;display:grid;place-items:center;pointer-events:none;background:radial-gradient(circle at center,rgba(20,58,76,.18),transparent 44%);animation:pvpEmoteOverlayIn .16s ease-out both}
.pvp-emote-screen-bubble{display:grid;place-items:center;gap:7px;min-width:138px;padding:16px 24px 13px;border-radius:28px;border:1px solid rgba(255,255,255,.22);background:rgba(4,20,31,.78);box-shadow:0 18px 60px rgba(0,0,0,.42),0 0 45px rgba(80,235,204,.15);backdrop-filter:blur(8px);animation:pvpEmotePop .42s cubic-bezier(.2,1.35,.4,1) both}
.pvp-emote-screen-emoji{font-size:clamp(68px,15vw,118px);line-height:1;filter:drop-shadow(0 8px 16px rgba(0,0,0,.32));animation:pvpEmoteFloat 1.35s ease-in-out infinite alternate}
.pvp-emote-screen-user{max-width:min(72vw,280px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:900;letter-spacing:.06em;color:#e9fbff;text-transform:uppercase}
.pvp-emote-screen-overlay.out{animation:pvpEmoteOverlayOut .55s ease-in forwards}
@keyframes pvpEmoteOverlayIn{from{opacity:0}to{opacity:1}}
@keyframes pvpEmoteOverlayOut{to{opacity:0;transform:scale(.94)}}
@keyframes pvpEmotePop{0%{transform:scale(.35) rotate(-8deg);opacity:0}70%{transform:scale(1.08) rotate(2deg);opacity:1}100%{transform:scale(1) rotate(0)}}
@keyframes pvpEmoteFloat{from{transform:translateY(0) scale(1)}to{transform:translateY(-7px) scale(1.05)}}
@media(max-width:720px){.pvp-emote-screen-bubble{min-width:112px;padding:13px 20px 11px;border-radius:24px}.pvp-emote-screen-emoji{font-size:clamp(64px,24vw,96px)}}
@media(prefers-reduced-motion:reduce){.pvp-emote-screen-overlay,.pvp-emote-screen-bubble,.pvp-emote-screen-emoji{animation:none!important}}


/* === REV10 TCG polish: mirrored cinematic popup, smaller arena FX, clearer idle === */
.battle-cinematic .cine-entity.mirrored .cine-portrait img,
.battle-cinematic .cine-entity.mirrored .cine-emoji{transform:scaleX(-1)!important}
.battle-cinematic .cine-entity.actor.side-player .cine-portrait,
.battle-cinematic .cine-entity.target.side-player .cine-portrait{background:radial-gradient(circle at 50% 35%,rgba(150,232,255,.16),rgba(0,0,0,.18))}
.battle-cinematic .cine-entity.actor .cine-portrait img,
.battle-cinematic .cine-entity.target .cine-portrait img{padding:4px!important}

.unit-card.scene-attacker{box-shadow:0 0 0 2px rgba(94,202,255,.22),0 0 12px rgba(94,202,255,.28)!important}
.unit-card.scene-target{box-shadow:0 0 0 2px rgba(255,87,87,.22),0 0 12px rgba(255,87,87,.28)!important}
.battle-scene-fx{inset:-8px -4px!important;overflow:hidden!important;z-index:18!important}
.battle-scene-fx .scene-fx-b{width:48px!important;height:48px!important;opacity:.9!important}
.unit-reactive-fx{inset:-3px!important}
.unit-reactive-fx i{inset:24%!important;border-width:1px!important;opacity:.8!important}
.unit-reactive-fx b{font-size:16px!important}
.unit-aura-layer{opacity:.48!important}
.guardian-spirit{width:42px!important;height:42px!important;top:-8px!important;opacity:.56!important}

@keyframes livingFaunaV5921{0%,100%{transform:translate3d(0,0,0) rotate(-.18deg) scale(1)}50%{transform:translate3d(0,-3px,0) rotate(var(--unit-idle-sway,.18deg)) scale(var(--unit-breath-scale,1.014))}}
@keyframes livingFloraV5921{0%,100%{transform:translate3d(0,0,0) rotate(-.14deg) scale(1)}50%{transform:translate3d(0,-2px,0) rotate(var(--unit-idle-sway,.14deg)) scaleY(var(--unit-breath-scale,1.010)) scaleX(.998)}}
@keyframes livingTreeV5921{0%,100%{transform:translate3d(0,0,0) rotate(-.08deg) scale(1)}50%{transform:translate3d(0,-2px,0) rotate(var(--unit-idle-sway,.08deg)) scaleY(var(--unit-breath-scale,1.008))}}
@keyframes livingOtherV5921{0%,100%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(0,-2px,0) scale(1.010)}}

.evolution-r68 .evolution-reveal{width:min(94vw,420px)!important;padding:14px 14px 12px!important}
.evolution-r68 .evolution-stage{min-height:180px!important}
.evolution-r68 .evolution-ring{inset:20%!important;box-shadow:0 0 14px #70ffdd,inset 0 0 14px #70ffdd!important}
.evolution-r68 .evolution-before,.evolution-r68 .evolution-after{max-height:150px!important;object-fit:contain!important}
.evolution-r68 .mirror-player{transform:scaleX(-1)!important}
.evolution-r68 .evolution-title{font-size:15px!important}
.evolution-r68 p{font-size:12px!important;line-height:1.45!important}

@media(max-width:760px){
  .battle-cinematic .cine-duel{grid-template-columns:1fr 92px 1fr!important;gap:6px!important;padding:10px!important}
  .battle-cinematic .cine-portrait{width:min(32vw,118px)!important;border-radius:15px!important}
  .battle-cinematic .cine-center{min-height:132px!important}
  .battle-cinematic .cine-fx{width:78px!important}
  .battle-cinematic .cine-skill-name{font-size:11px!important}
  .battle-cinematic .cine-value{font-size:11px!important;padding:4px 7px!important}
  .battle-scene-fx .scene-fx-b{width:38px!important;height:38px!important}
  .guardian-spirit{width:34px!important;height:34px!important;top:-5px!important}
}

/* REV 12: Pet card and compact accessible mobile header */
.r12-home-pet{display:flex;align-items:center;gap:12px;padding:8px 10px;border-radius:14px;background:rgba(5,25,34,.64);border:1px solid rgba(106,195,196,.45)}
.r12-pet-portrait{width:92px;height:98px;flex:0 0 92px;display:grid;place-items:center;overflow:hidden;border-radius:12px;background:radial-gradient(circle,#245d61,#08202e);font-size:40px}
.r12-pet-portrait img{max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain}
.r12-pet-summary{display:grid;gap:3px;min-width:0}.r12-pet-summary small{font-size:10px;color:#8fd9cd;font-weight:900;text-transform:uppercase}.r12-pet-summary b{font-size:19px}.r12-pet-summary span{font-size:11px;color:#a9c8d2}.r12-home-pet-empty{padding:12px;border:1px dashed #427485;border-radius:12px}
@media(max-width:720px){
 #app .v55-mobile-header{position:relative!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto auto auto!important;gap:5px!important;align-items:center!important;min-height:56px!important;padding:6px 7px!important;margin-bottom:7px!important;background:#071d2be8!important;border:1px solid #315364!important;border-radius:14px!important;overflow:visible!important}
 #app .v55-mobile-header .brand-lockup{display:flex!important;gap:6px!important;align-items:center!important;min-width:0!important;overflow:hidden!important}
 #app .v55-mobile-header .brand-logo{height:30px!important;width:30px!important;object-fit:contain!important;flex-shrink:0!important}
 #app .v55-mobile-header .v55-header-title{font-size:11px!important;line-height:1.15!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;min-width:0!important}
 #app .v55-mobile-header .account-top-btn{display:flex!important;align-items:center!important;gap:3px!important;padding:3px 5px!important;min-width:0!important;max-width:83px!important;font-size:9px!important}
 #app .v55-mobile-header .account-top-btn>span:last-child{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
 #app .v55-mobile-header .v55-profile-thumb{width:26px!important;height:26px!important;flex:0 0 26px!important}
 #app .v55-mobile-header .notif-top-btn{width:36px!important;height:38px!important;min-width:36px!important;padding:4px!important}
 #app .v55-mobile-header .v55-header-menu{position:relative!important;margin:0!important;z-index:300!important}
 #app .v55-mobile-header .v55-header-menu>summary{display:flex!important;align-items:center!important;justify-content:center!important;min-width:48px!important;min-height:40px!important;padding:4px!important;font-size:11px!important;cursor:pointer!important}
 #app .v55-mobile-header .v55-header-menu>div{position:absolute!important;right:0!important;top:calc(100% + 7px)!important;min-width:205px!important;max-width:min(85vw,270px)!important;display:grid!important;gap:5px!important;padding:10px!important;background:#071b28!important;border:1px solid #426a7b!important;border-radius:13px!important;box-shadow:0 14px 35px #0009!important;z-index:999!important}
 #app .v55-mobile-header .v55-header-menu:not([open])>div{display:none!important}
 #app .v55-mobile-header .v55-header-menu>div button{min-height:39px!important;text-align:left!important}
 .compact-hero{grid-template-columns:1fr!important;gap:8px!important}.compact-hero .hero-side{gap:8px!important;padding:10px!important}.compact-hero .r12-home-pet{padding:5px 8px!important}.compact-hero .r12-pet-portrait{width:64px!important;height:66px!important;flex-basis:64px!important}.compact-hero .r12-pet-summary b{font-size:15px!important}.compact-hero .r12-pet-summary small{font-size:9px!important}
}
@media(max-width:380px){#app .v55-mobile-header .v55-header-title{max-width:85px!important}#app .v55-mobile-header .account-top-btn{max-width:53px!important}#app .v55-mobile-header .account-top-btn>span:last-child{display:none!important}}


/* REV13 mobile header + starter deck visual refresh */
@media(max-width:720px){
  #app .v55-mobile-header.compact{grid-template-columns:minmax(0,1fr) auto auto auto!important;gap:6px!important;padding:7px 8px!important;min-height:60px!important;align-items:center!important}
  #app .v55-mobile-header .brand-copy{display:grid!important;min-width:0!important}
  #app .v55-mobile-header .brand-copy small{font-size:8px!important;color:#93bdd3!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  #app .v55-mobile-header .v55-header-title{font-size:12px!important;line-height:1.1!important}
  #app .v55-mobile-header .account-top-btn.compact{width:40px!important;min-width:40px!important;max-width:40px!important;height:40px!important;padding:4px!important;justify-content:center!important;border-radius:14px!important}
  #app .v55-mobile-header .account-top-btn.compact>span:last-child{display:none!important}
  #app .v55-mobile-header .v55-profile-thumb{width:28px!important;height:28px!important;flex:0 0 28px!important}
  #app .v55-mobile-header .notif-top-btn{width:40px!important;height:40px!important;min-width:40px!important;padding:0!important;display:grid!important;place-items:center!important;border-radius:14px!important}
  #app .v55-mobile-header .notif-top-btn .notif-ico{font-size:16px!important;line-height:1!important}
  #app .v55-mobile-header .notif-top-btn .notif-badge{position:absolute!important;right:4px!important;top:3px!important;min-width:16px!important;height:16px!important;padding:0 4px!important;border-radius:999px!important;background:#ffd24d!important;color:#142234!important;font-size:9px!important;display:grid!important;place-items:center!important;font-weight:1000!important}
  #app .v55-mobile-header .v55-header-menu>summary{min-width:40px!important;min-height:40px!important;border:1px solid rgba(120,170,194,.28)!important;border-radius:14px!important;background:linear-gradient(145deg,#103049,#0d2638)!important;padding:0!important}
  #app .v55-mobile-header .v55-header-menu>summary span{font-size:18px!important;line-height:1!important}
  #app .v55-mobile-header .v55-header-menu>div{right:0!important;left:auto!important;top:calc(100% + 8px)!important;min-width:min(320px,calc(100vw - 28px))!important;max-width:min(320px,calc(100vw - 28px))!important;padding:10px!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}
  #app .v55-mobile-header .v55-header-menu>div button{min-height:44px!important;text-align:left!important;font-size:11px!important;padding:10px 11px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important}
}
@media(max-width:380px){
  #app .v55-mobile-header.compact{grid-template-columns:minmax(0,1fr) auto auto auto!important}
  #app .v55-mobile-header .brand-copy small{display:none!important}
}
.setup-v571 .starter-preset{grid-template-columns:58px 1fr!important;grid-template-rows:auto auto auto!important;gap:5px 9px!important}
.setup-v571 .starter-avatar{grid-row:1/4!important;width:58px!important;height:86px!important}
.setup-v571 .starter-preset-copy{display:grid;gap:3px;align-content:start}
.setup-v571 .starter-preset-copy b{font-size:13px;line-height:1.15}
.setup-v571 .starter-preset-copy small{font-size:10px;line-height:1.25;color:#a9c0ce}
.setup-v571 .starter-preset-team{grid-column:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.setup-v571 .starter-guardian-chip{display:grid;grid-template-rows:30px auto;justify-items:center;align-items:start;padding:4px;border-radius:10px;background:#081c29;border:1px solid #244558;min-width:0}
.setup-v571 .starter-chip-art{width:28px;height:28px;display:grid;place-items:center;overflow:hidden}
.setup-v571 .starter-chip-art img{width:100%;height:100%;object-fit:contain}
.setup-v571 .starter-guardian-chip em{font-style:normal;font-size:7px;line-height:1.15;color:#cfe2ee;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
@media(max-width:680px){
  .setup-v571 .starter-preset{flex-basis:calc(100% - 26px)!important;grid-template-columns:52px 1fr!important}
  .setup-v571 .starter-avatar{width:52px!important;height:78px!important}
  .setup-v571 .starter-preset-team{gap:4px}
  .setup-v571 .starter-guardian-chip{padding:3px}
  .setup-v571 .starter-chip-art{width:24px;height:24px}
  .setup-v571 .starter-guardian-chip em{font-size:6.5px}
}

/* REV14: compact mobile combat UI */
@media(max-width:760px){
 .battle.battle-compact .compact-top{display:grid!important;grid-template-columns:minmax(0,1fr) 76px minmax(0,1fr)!important;gap:5px!important}
 .battle.battle-compact .compact-top .avatar-panel{display:flex!important;align-items:center!important;gap:5px!important;min-width:0!important;padding:5px!important}
 .battle.battle-compact .compact-top .avatar-circle{display:grid!important;place-items:center!important;width:32px!important;height:32px!important;min-width:32px!important;overflow:hidden!important;border-radius:50%!important}
 .battle.battle-compact .compact-top .avatar-circle img{width:100%!important;height:100%!important;object-fit:cover!important}
 .battle.battle-compact .compact-top .avatar-panel b{display:block!important;font-size:11px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
 .battle.battle-compact .compact-top .avatar-panel small{font-size:10px!important;color:#ffdc91!important}
 .battle.battle-compact .compact-top .points{display:flex!important;flex-wrap:wrap!important;gap:2px!important}
 .battle.battle-compact .compact-top .point-dot{width:6px!important;height:6px!important;min-width:6px!important}
 .battle.battle-compact .compact-top .domain-banner{padding:4px!important;min-width:0!important;overflow:hidden!important}
 .battle.battle-compact .compact-top .domain-banner .d-icon{font-size:15px!important}
 .battle.battle-compact .compact-top .domain-banner b{font-size:9px!important}
 .battle.battle-compact .compact-top .domain-banner small{display:none!important}
 .battle.battle-compact .unit-card{overflow:visible!important}
 .battle.battle-compact .unit-card .unit-meta{background:none!important;border:0!important;box-shadow:none!important;padding:0 1px!important;position:relative!important;min-height:30px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important}
 .battle.battle-compact .unit-card .unit-meta>div:first-child{width:100%!important;text-align:center!important;min-width:0!important}
 .battle.battle-compact .unit-card .unit-meta h4{font-size:clamp(8px,2.05vw,10px)!important;line-height:1.12!important;font-weight:800!important;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere!important;max-width:100%!important;text-align:center!important;text-shadow:0 2px 3px #001018,0 0 5px #001018!important}
 .battle.battle-compact .unit-card .unit-meta .type{display:none!important}
 .battle.battle-compact .unit-card .unit-meta .hp-block{display:flex!important;align-items:center!important;justify-content:center!important;gap:2px!important;background:none!important;border:0!important;padding:0!important;font-size:8px!important}
 .battle.battle-compact .unit-card .unit-meta .hp-block b{font-size:9px!important}
 .battle.battle-compact .unit-card .living-figure{display:block!important;transform-origin:center 80%!important;animation:rimba-rev14-breathe var(--unit-idle-duration,4.8s) ease-in-out var(--unit-idle-delay,0s) infinite!important;will-change:transform}
 .battle.battle-compact .unit-card.dead .living-figure{animation:none!important}
}
@keyframes rimba-rev14-breathe{
 0%,100%{transform:translate3d(0,0,0) scale(1) rotate(-.4deg)}
 50%{transform:translate3d(0,-4px,0) scale(1.022,.99) rotate(.5deg)}
}
@media(prefers-reduced-motion:reduce){.battle.battle-compact .unit-card .living-figure{animation:none!important}}

/* REV15 compact skill popup + distinctive type icons */
.battle .action-card.skill .a-icon .r15-skill-icon,.online-battle .action-card.skill .a-icon .r15-skill-icon{display:grid!important;place-items:center!important;width:100%!important;height:100%!important;min-height:88px!important;background:radial-gradient(circle at 40% 32%,hsla(var(--sb-h),88%,67%,.32),transparent 64%),linear-gradient(150deg,#103d55,#0b172e)!important;border:1px solid hsla(var(--sb-h),88%,68%,.7)!important;border-radius:12px!important}
.battle .action-card.skill .r15-skill-icon .skill-glyph-main,.online-battle .action-card.skill .r15-skill-icon .skill-glyph-main{font-size:clamp(28px,5vw,49px)!important;line-height:1.1!important;text-shadow:0 2px 12px #061b2c!important}
.battle .action-card.skill .r15-skill-icon .skill-kind-label,.online-battle .action-card.skill .r15-skill-icon .skill-kind-label{font-size:9px!important}
@media(max-width:760px){
 .battle.battle-compact>.selected-action-panel,.online-battle .selected-action-panel{bottom:clamp(245px,37dvh,340px)!important;max-height:min(230px,30dvh)!important;overflow:auto!important;width:calc(100vw - 24px)!important;left:12px!important;right:12px!important;transform:none!important;padding:9px 11px!important;border-radius:13px!important}
 .battle .selected-action-panel .selected-card-summary,.online-battle .selected-action-panel .selected-card-summary{gap:6px!important}
 .battle .selected-action-panel .selected-card-summary h4,.online-battle .selected-action-panel .selected-card-summary h4{font-size:12px!important;line-height:1.2!important;margin:2px 0!important}
 .battle .selected-action-panel .selected-card-summary p,.online-battle .selected-action-panel .selected-card-summary p{font-size:10px!important;line-height:1.28!important;margin:2px 0!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
 .battle .selected-action-panel .r15-optional-note,.online-battle .selected-action-panel .r15-optional-note{display:none!important}
 .battle .selected-action-panel .target-prompt,.online-battle .selected-action-panel .target-prompt{font-size:10px!important;padding:5px 7px!important;margin:4px 0!important;min-height:0!important}
 .battle .selected-action-panel .compact-actions,.online-battle .selected-action-panel .compact-actions{gap:5px!important;margin-top:5px!important}
 .battle .selected-action-panel .compact-actions button,.online-battle .selected-action-panel .compact-actions button{font-size:10px!important;min-height:34px!important;padding:6px 3px!important}
 .battle .action-card.skill .a-icon .r15-skill-icon{min-height:75px!important}
}
@media(max-width:420px) and (max-height:740px){.battle.battle-compact>.selected-action-panel,.online-battle .selected-action-panel{bottom:39dvh!important;max-height:32dvh!important}}
