:root{--bg:#0b1024;--surface:#131b39;--surface2:#1a2445;--border:#303b61;--text:#f4f6ff;--muted:#a3aecf;--blue:#6ba4ff;--cyan:#49e6dc;--violet:#9977ff;--pink:#f4a7ff;--green:#65e0b4}
*{box-sizing:border-box}html{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}body{margin:0;min-height:100svh}.ambient{position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at 96% 5%,#583b984f,transparent 42%),radial-gradient(ellipse at 8% 38%,#174d884d,transparent 55%);z-index:-1}.shell{max-width:650px;padding:24px 18px 28px;margin:auto;min-height:100svh}.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;gap:10px;align-items:center}.brand-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:14px;background:linear-gradient(145deg,#9b7dff,#517bfa);font-size:calc(29px + 1pt);box-shadow:0 8px 28px #604bf750}.brand .overline{display:block;font-size:calc(10px + 1pt);letter-spacing:.2em;color:#b9b7ff;font-weight:800}.brand strong{display:block;font-size:calc(21px + 1pt);letter-spacing:.06em;line-height:1.3}.brand em{font-size:calc(9px + 1pt);font-style:normal;border:1px solid #5664a4;padding:3px 5px;border-radius:5px;color:#a2bcff;vertical-align:middle}.network{font-size:calc(10px + 1pt);letter-spacing:.08em;font-weight:800;color:#a8bbdd;display:flex;align-items:center;gap:6px;white-space:nowrap}.pulse{width:7px;height:7px;background:var(--cyan);border-radius:50%;box-shadow:0 0 10px var(--cyan)}.hero-head{margin-top:30px;display:flex;align-items:center;justify-content:space-between}.eyebrow,.kicker{font-size:calc(10px + 1pt);color:var(--cyan);letter-spacing:.17em;font-weight:800}.hero-head h1{font-size:calc(clamp(35px,10vw,52px) + 1pt);margin:6px 0 2px;letter-spacing:-.055em;line-height:1.02}.hero-head h1 span{color:#a391ff}.hero-head p{font-size:calc(14px + 1pt);margin:8px 0;color:var(--muted)}.orb{font-size:calc(88px + 1pt);line-height:1;background:linear-gradient(145deg,#4ff1e9,#ba88ff);color:transparent;background-clip:text;filter:drop-shadow(0 0 20px #8878ffa8)}.content{margin-top:28px}.panel{background:linear-gradient(145deg,#192346d9,#101a35f0);border:1px solid var(--border);border-radius:22px;padding:18px;margin-bottom:14px;box-shadow:0 12px 32px #02091720}.panel-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:14px}.panel-title h2{font-size:calc(15px + 1pt);letter-spacing:.02em;margin:0}.pill{color:#afc5f8;font-size:calc(10px + 1pt);font-weight:800;letter-spacing:.06em;background:#273865;border:1px solid #3e5589;border-radius:100px;padding:6px 10px}.profile-meta{display:flex;gap:9px;align-items:center;margin-bottom:13px}.avatar{display:grid;place-items:center;border-radius:12px;width:36px;height:36px;background:#304176;color:var(--cyan)}.label{font-size:calc(11px + 1pt);color:var(--muted)}.profile-meta strong{display:block;font-size:calc(15px + 1pt)}.coins{margin-left:auto;color:#fcd17b;font-weight:800;background:#3b3150;border-radius:10px;padding:8px 10px;font-size:calc(13px + 1pt)}.partner-wrap{display:flex;align-items:center;gap:17px}.creature-art{min-width:130px;min-height:144px;flex-basis:42%;display:grid;place-items:center;font-size:calc(86px + 1pt);border-radius:18px;position:relative;isolation:isolate;background:radial-gradient(circle at 48% 52%,#6085ea5c,transparent 64%),linear-gradient(150deg,#253764,#1a2445)}.creature-art:before{content:"";position:absolute;border:1px dashed #779cff70;border-radius:50%;height:118px;width:118px;z-index:-1}.creature-art span{filter:drop-shadow(0 12px 12px #070f28b0)}.partner-details{flex:1;min-width:0}.partner-details h3{font-size:calc(25px + 1pt);margin:5px 0 6px;letter-spacing:-.03em;overflow-wrap:anywhere}.muted{color:var(--muted)}.subtle{font-size:calc(12px + 1pt);color:var(--muted)}.stats-row{display:flex;gap:12px;margin:14px 0}.stat{flex:1;border:1px solid #3a476d;border-radius:12px;padding:10px}.stat strong{font-size:calc(18px + 1pt);display:block}.meter-block{margin-top:12px}.meter-head{display:flex;justify-content:space-between;font-size:calc(12px + 1pt);margin-bottom:7px}.meter{height:9px;border-radius:15px;background:#0b1430;overflow:hidden;border:1px solid #34456f}.fill{height:100%;border-radius:15px;background:linear-gradient(90deg,#43cda5,#70eed1);transition:width .3s}.fill.xp{background:linear-gradient(90deg,#7569ff,#b8a2ff)}.fill.enemy{background:linear-gradient(90deg,#fa7d8c,#ffbd91)}.section-caption{color:#acbce0;font-size:calc(12px + 1pt);margin:0 0 10px}.actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.btn{background:#283963;color:#eef6ff;border:1px solid #465984;border-radius:13px;min-height:47px;padding:12px 10px;font:inherit;font-size:calc(13px + 1pt);font-weight:750;cursor:pointer;transition:transform .15s,filter .15s;text-align:center}.btn:active{transform:scale(.97)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn.primary{background:linear-gradient(110deg,#7864f2,#536eff);border-color:#9585ff;box-shadow:0 8px 18px #635cf733}.btn.teal{background:linear-gradient(115deg,#178a95,#237eae);border-color:#37b3d0}.btn.wide{grid-column:1/-1}.arena{background:linear-gradient(145deg,#311d4d,#1b2048);border-color:#6b477d}.arena-fight{display:flex;align-items:center;gap:8px;justify-content:space-evenly;text-align:center;margin-bottom:17px}.fighter{flex:1;min-width:0}.fighter .big{font-size:calc(53px + 1pt);display:block}.fighter strong{display:block;font-size:calc(13px + 1pt);overflow-wrap:anywhere}.fighter small{color:#c8b9df}.versus{font-size:calc(17px + 1pt);font-weight:1000;color:#d8b6ff;font-style:italic}.arena .meter-head{color:#f2dcf5}.notice{padding:13px 14px;margin-top:18px;color:#e9f7ff;border:1px solid #5b89a0;background:#143f57;border-radius:13px;font-size:calc(13px + 1pt);line-height:1.5}.notice.error{border-color:#af667e;background:#59243a}.loading{padding:36px 14px;text-align:center;color:var(--muted)}.starter-intro{font-size:calc(14px + 1pt);color:var(--muted);line-height:1.5}.starter-list{display:grid;gap:12px}.starter{display:flex;align-items:center;gap:13px;border:1px solid #3e507e;background:#1c2a4c;border-radius:16px;padding:14px}.starter .emoji{font-size:calc(52px + 1pt);min-width:61px;text-align:center}.starter .desc{flex:1}.starter h3{margin:0 0 3px}.starter p{margin:0;color:var(--muted);font-size:calc(12px + 1pt)}.starter .btn{min-height:39px;padding:8px 10px;font-size:calc(12px + 1pt)}.evo{display:flex;justify-content:space-between;align-items:center;gap:10px}.evo strong{display:block;margin-top:4px}.evo .btn{white-space:nowrap}.records{display:flex;gap:10px}.record{flex:1;border-radius:12px;background:#101b37;padding:12px}.record strong{display:block;font-size:calc(21px + 1pt)}.record span{font-size:calc(11px + 1pt);color:var(--muted)}footer{text-align:center;color:#7888ad;font-size:calc(10px + 1pt);margin:20px 0 12px;line-height:1.6}button:focus-visible{outline:3px solid var(--cyan);outline-offset:2px}
@media(max-width:410px){.shell{padding:18px 13px 24px}.hero-head{margin-top:24px}.hero-head h1{font-size:calc(37px + 1pt)}.orb{font-size:calc(64px + 1pt)}.partner-wrap{gap:11px}.creature-art{min-width:116px;min-height:132px;font-size:calc(72px + 1pt)}.partner-details h3{font-size:calc(21px + 1pt)}.panel{padding:15px}.starter{gap:8px}.starter .emoji{min-width:47px;font-size:calc(42px + 1pt)}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important}}

/* Exploration and battle: compact touch-friendly layouts for Telegram WebApp. */
.fill.mp{background:linear-gradient(90deg,#5091ff,#74d5ff)}
.region-list{display:grid;gap:10px;margin-top:15px}
.region-row{display:flex;align-items:center;gap:11px;padding:12px;border:1px solid #3c5079;border-radius:14px;background:#152241}
.region-symbol{font-size:calc(28px + 1pt);flex:0 0 35px;text-align:center}
.region-copy{flex:1;min-width:0}
.region-copy strong{display:block;font-size:calc(13px + 1pt)}
.region-copy span{display:block;color:var(--muted);font-size:calc(11px + 1pt);margin-top:3px}
.region-row .btn{min-height:39px;padding:8px;font-size:calc(11px + 1pt)}
.combat-actions .btn{min-height:54px;white-space:normal;line-height:1.3}
@media(max-width:410px){.region-row{gap:6px;padding:9px}.region-symbol{font-size:calc(25px + 1pt)}.combat-actions .btn{font-size:calc(12px + 1pt)}}

/* DigiGram compact Digivice – removes redundant hero and duplicates. */
.digivice-top{background:#121b35;border:1px solid #31446b;border-radius:18px;padding:9px 14px}
.brand-logo{height:64px;width:64px;object-fit:contain;border-radius:13px;background:#050d20}
.digivice-top .kicker{display:block;color:#66d6ff;font-weight:900}
.digivice-top strong{font-size:calc(21px + 1pt);letter-spacing:.04em}
.online-dot{margin-left:auto;width:10px;height:10px;background:#39dfb2;border-radius:50%;box-shadow:0 0 9px #39dfb2}
.content{margin-top:14px}
.digimon-panel h2{font-size:calc(22px + 1pt);line-height:1.4;margin:5px 0 0}
.digimon-panel .level{font-size:calc(12px + 1pt);background:#344a82;padding:5px 9px;border-radius:9px;white-space:nowrap}
.tamer-summary{display:flex;align-items:start;justify-content:space-between;gap:12px}
.tamer-balances{display:flex;flex-direction:column;gap:6px;flex-shrink:0;align-items:stretch}
.tamer-balances .balance{text-align:center}
.dc-balance{color:#d6c3ff;background:#322b56;border:1px solid #594c8e}
.balance{font-size:calc(12px + 1pt);color:#ffda93;background:#413351;border-radius:8px;padding:8px;white-space:nowrap}
.stat-bars .meter-head{margin-top:13px}
.energy-help{font-size:calc(11px + 1pt);color:#a7b7da;margin:12px 0 3px}
.digimon-panel details{margin-top:12px}
.digimon-panel summary{padding:10px;color:#80dbee;font-size:calc(12px + 1pt);cursor:pointer}
.stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:10px 0}
.stat-tile{padding:11px 10px;border:1px solid #3b5075;border-radius:12px;display:flex;flex-direction:column;gap:6px;min-width:0}
.stat-tile .stat-name{font-size:calc(11px + 1pt);color:#aebddb;line-height:1.35;overflow-wrap:anywhere}
.stat-tile .stat-effective{font-size:calc(19px + 1pt);line-height:1.15;overflow-wrap:anywhere}
.stat-tile .stat-effective small{font-size:calc(9px + 1pt);font-weight:500;color:#8d9cb7}
.digimon-panel #digimon-attributes>summary .attribute-points-balance{
 display:block;flex:0 0 100%;margin:0;padding:6px 9px;
 border:1px solid #55779b;border-radius:9px;background:#1a3550;
 text-align:center;color:#f7df91;font-size:calc(11px + 1pt);
 font-weight:800;line-height:1.4;font-variant-numeric:tabular-nums;
}
.stat-tile .stat-natural-row{display:flex;align-items:center;justify-content:space-between;gap:7px;
 min-width:0;min-height:36px}
.stat-tile .stat-natural-value{flex:1;min-width:0;color:#d5e5f9;font-weight:700;
 font-size:calc(10px + 1pt);line-height:1.35;overflow-wrap:anywhere}
.stat-tile .stat-allocate-btn{flex:0 0 36px;width:36px;height:36px;border-radius:10px;
 border:1px solid #6fbeed;background:#245078;color:#ecffff;
 font-size:25px;font-weight:800;line-height:1;cursor:pointer;touch-action:manipulation;
 display:grid;place-items:center;padding:0}
.stat-tile .stat-allocate-btn:focus-visible{outline:2px solid #a4efff;outline-offset:2px}
.stat-tile .stat-allocate-btn:disabled{opacity:.38;cursor:not-allowed}
.stat-tile .stat-implant-bonus{display:block;color:#76e8b4;font-size:calc(10px + 1pt);
 font-weight:700;line-height:1.35;overflow-wrap:anywhere}
.stat-tile .stat-temporary-bonus{display:block;color:#c5afff;font-size:calc(10px + 1pt);
 font-weight:700;line-height:1.35;overflow-wrap:anywhere}
@media(max-width:350px){
 .stat-tile{padding:9px 8px}
 .stat-tile .stat-allocate-btn{flex-basis:34px;width:34px;height:34px}
 .stat-tile .stat-natural-value{font-size:11px}
}
.fill.energy{background:linear-gradient(90deg,#f1b954,#ffe58a)}
.digivice-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:15px 0}
.tab{border:1px solid #3b5488;background:#192849;border-radius:12px;color:#c6d5ed;font-size:calc(11px + 1pt);font-weight:800;min-height:45px;padding:9px 4px}
.tab.on{background:#2c4f92;color:#fff;border-color:#70abfa}
.gym-list{display:grid;gap:10px}
.gym-row{display:grid;grid-template-columns:1fr auto;gap:6px 10px;align-items:center;background:#162344;border:1px solid #3d527f;padding:12px;border-radius:12px}
.gym-title strong{font-size:calc(13px + 1pt);display:block}
.gym-title small{font-size:calc(10px + 1pt);color:#9fb7d9}
.gym-line{display:flex;align-items:center;gap:8px}
.gym-line .meter{flex:1}
.gym-line span{font-size:calc(11px + 1pt);white-space:nowrap}
.gym-row button{grid-row:1/3;grid-column:2;max-width:115px;min-width:95px;font-size:calc(11px + 1pt)}
.region-list{margin-top:13px}
.region-row{margin-bottom:8px}
@media(max-width:420px){.shell{padding:15px 12px 20px}.brand-logo{width:57px;height:57px}.digivice-top strong{font-size:calc(18px + 1pt)}.digimon-panel h2{font-size:calc(19px + 1pt)}.digivice-tabs{gap:5px}.tab{font-size:calc(10px + 1pt)}}

/* Evolution thresholds: training-bar markers and transparent requirement checklist. */
.gym-milestone{margin:12px 0 14px;padding:11px 12px;background:#203356;border:1px solid #4e6ca2;border-radius:12px;font-weight:700;font-size:calc(12px + 1pt);color:#cce8ff}
.gym-row .gym-goal{grid-column:1/-1;grid-row:auto;padding-top:6px}
.gym-goal-label{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:calc(11px + 1pt);color:#add5ed;margin-bottom:6px}
.gym-goal-label b{font-variant-numeric:tabular-nums;white-space:nowrap;color:#fff}
.evo-target-meter{position:relative;height:9px;background:#31456c;overflow:visible}
.evo-target-meter .fill{border-radius:inherit}
.goal-tick{position:absolute;right:0;top:-3px;bottom:-3px;width:2px;border-radius:2px;background:#f8d16c;box-shadow:0 0 5px #f8d16c}
.gym-goal.reached .gym-goal-label{color:#70e8c0}
.evolution-list{display:grid;gap:12px;margin-top:16px}
.evolution-card{border:1px solid #3d507c;border-radius:13px;padding:13px;background:#162446}
.evolution-card.ready{border-color:#448d8b}
.evolution-top{display:flex;justify-content:space-between;align-items:start;gap:8px}
.evolution-top strong{display:block;font-size:calc(14px + 1pt)}
.evolution-top small{display:block;color:#b1c1df;font-size:calc(11px + 1pt);margin-top:3px}
.evolution-top button{min-width:80px;font-size:calc(12px + 1pt);flex-shrink:0}
.evolution-checks{margin-top:12px;display:grid;gap:7px}
.evolution-check{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:calc(11px + 1pt);color:#f0b2ac}
.evolution-check.met{color:#75e3bb}
.evolution-check b{color:#fff;font-variant-numeric:tabular-nums;white-space:nowrap}
.evolution-checks .section-caption{margin:3px 0;font-size:calc(11px + 1pt)}

/* Rare evolution temporary form and in-game countdown. */
.temporary-evo-banner{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 13px;margin:12px 0;border:1px solid #64a8db;background:linear-gradient(110deg,#143858,#19295a);border-radius:14px;color:#e5f7ff}
.temporary-evo-banner span{font-size:calc(12px + 1pt);font-weight:800;line-height:1.4}
.temporary-evo-banner small{display:block;color:#a4d8eb;font-size:calc(10px + 1pt);font-weight:500;margin-top:3px}
.temp-clock{border:1px solid #79c6f5;padding:6px 8px;border-radius:9px;font-size:calc(15px + 1pt);white-space:nowrap;min-width:54px;text-align:center;font-variant-numeric:tabular-nums}
.temporary-combat-note{font-size:calc(11px + 1pt);color:#b3ecff;line-height:1.5;margin:9px 0;padding:9px 11px;border:1px solid #436e8f;border-radius:10px;background:#193251}

/* Exploration v2: region grouping, creature cards and loot catalog. */
.world-region{margin:12px 0;padding:10px 12px;background:#0f1933;border-radius:14px;border:1px solid #324977}
.world-region-title{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin:5px 0 9px}
.world-region-title strong{font-size:calc(14px + 1pt)}
.world-region-title small{color:#9ab9de;font-size:calc(10px + 1pt)}
.world-region .region-row{background:#182649;border-radius:10px;margin-top:7px;padding:9px 8px}
.world-region .region-row strong{font-size:calc(12px + 1pt)}
.world-region .region-row span{font-size:calc(10px + 1pt);line-height:1.5}
.world-battle-info{font-size:calc(12px + 1pt);padding:7px 8px;border-radius:9px;margin:9px 0;background:#354065;color:#d9eaff}
.enemy-sheet{padding:9px 8px;color:#d5e6fb;font-size:calc(12px + 1pt);line-height:1.5}
.supreme-counter{background:#2e2955;border:1px solid #8274b3;padding:10px 13px;border-radius:12px;color:#e6d9ff;font-size:calc(12px + 1pt)}
.inventory-catalog-group{margin:13px 0 8px;padding:10px;background:#172543;border:1px solid #3b5074;border-radius:11px}
.inventory-catalog-group>strong{font-size:calc(12px + 1pt);color:#a9cbff}
.inventory-catalog-group p{color:#bbcceb;font-size:calc(11px + 1pt);line-height:1.5;margin:8px 0}
.inventory-catalog-group p b{color:#ecf4ff}
@media(max-width:440px){.world-region-title small{display:block}.world-region .region-row .btn{min-width:72px;padding:8px 6px}}

/* Owned-only inventory: explain when an acquired item is not usable. */
.item-restriction{display:block;margin-top:6px;color:#a9d9f5;font-size:calc(11px + 1pt);line-height:1.45}

/* DigiMarket v3: inline quantities, smooth purchases without DOM remount. */
.shop-line{border:1px solid #3c5079;border-radius:14px;background:#152241;padding:12px;margin-bottom:9px}
.shop-line-main{display:flex;align-items:center;gap:11px}
.shop-line-main .region-copy{flex:1;min-width:0}
.shop-line-main .region-copy strong{display:block;font-size:calc(13px + 1pt)}
.shop-line-main .region-copy span{display:block;font-size:calc(11px + 1pt);color:var(--muted);margin-top:4px}
.shop-line-main .shop-open-btn{flex-shrink:0;min-height:42px;padding:9px 12px}
.shop-quantity-panel{margin-top:12px;border-top:1px solid #3e5275;padding-top:11px}
.shop-quantity-panel[hidden],.shop-row-feedback[hidden]{display:none}
.shop-quantity-panel label{display:block;font-size:calc(12px + 1pt);color:#c7d8f7;font-weight:700;margin-bottom:8px}
.shop-quantity-controls{display:flex;align-items:center;justify-content:flex-start;gap:10px}
.shop-quantity-controls .shop-step{min-height:44px;min-width:46px;flex:0 0 46px;font-size:calc(19px + 1pt);padding:6px}
.shop-qty-input{width:92px;min-width:0;min-height:44px;text-align:center;background:#0c1730;border:1px solid #6580b0;border-radius:10px;color:#fff;font-size:calc(18px + 1pt);font-weight:700;appearance:textfield;-moz-appearance:textfield}
.shop-qty-input::-webkit-outer-spin-button,.shop-qty-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.shop-qty-input:focus{outline:2px solid #6fd5eb;outline-offset:2px}
.shop-total{font-size:calc(12px + 1pt);font-weight:700;color:#f6d598;margin:11px 0}
.shop-buy-actions{display:flex;gap:8px;flex-wrap:wrap}
.shop-buy-actions button{flex:1;min-height:43px}
.shop-row-feedback{font-size:calc(12px + 1pt);font-weight:700;line-height:1.45;background:#123f3c;border:1px solid #287f69;color:#b9f5e2;padding:10px;margin:9px 0 0;border-radius:10px}
.shop-row-feedback.error{background:#4a2239;border-color:#ac5977;color:#ffd4e1}
@media(max-width:420px){.shop-line{padding:10px}.shop-line-main{gap:7px}.shop-buy-actions{gap:6px}}

/* Battle v4: always-visible ally/enemy vitals, embedded combat log and
   victory/failure summary that reveals loot only after combat. */
.battle-vitals{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 14px}
.battle-vital-group{border:1px solid #40649d;background:#152943;padding:11px;border-radius:13px}
.battle-vital-group.enemy-vitals{background:#311f47;border-color:#765381}
.battle-vital-group>strong{display:block;font-size:calc(12px + 1pt);color:#c9e9ff;margin-bottom:11px}
.battle-vital-group .meter-head{font-size:calc(11px + 1pt);margin:9px 0 5px}
.battle-vital-group .meter-head b{font-variant-numeric:tabular-nums}
.battle-vital-group .meter{height:9px}
.combat-history{margin:16px 0;padding:11px 13px;border-radius:13px;
  border:1px solid #5473ae;background:#14233d}
.combat-history>strong{display:block;font-size:calc(13px + 1pt);margin-bottom:9px;color:#b9e6fa}
.combat-history p{font-size:calc(12px + 1pt);color:#bac8e1;line-height:1.5;margin:0;padding:7px 0;
  border-top:1px solid #34496a;overflow-wrap:anywhere}
.combat-history p.latest{font-weight:700;color:#f1faff}
.battle-final .battle-finish-message{font-size:calc(13px + 1pt);line-height:1.6;color:#e5eaff;
  background:#212b51;border:1px solid #51628a;padding:13px;border-radius:12px;
  white-space:pre-line;overflow-wrap:anywhere;margin:12px 0}
.battle-loot{border:1px solid #6d9d81;background:#183b35;border-radius:13px;
  padding:14px;margin:14px 0;color:#d8f4df}
.battle-loot strong{display:block;font-size:calc(14px + 1pt);margin-bottom:7px}
.battle-loot p{font-size:calc(13px + 1pt);line-height:1.55;margin:0}
.battle-final>.btn{margin-top:13px;width:100%}
@media(max-width:420px){.battle-vitals{gap:7px}.battle-vital-group{padding:9px 7px}
  .battle-vital-group .meter-head{font-size:calc(10px + 1pt)}}

/* DigiMarket: discreet buy/sell switch, owned-only sale quantities and summary. */
.market-mode-toggle{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0}
.market-mode-toggle .market-mode{min-height:45px;background:#1b315a;color:#d8e8ff;
 border:1px solid #48618c;border-radius:12px}
.market-mode-toggle .market-mode.on{background:#3b51a3;color:#fff;border-color:#7f91ef;
 box-shadow:inset 0 0 0 1px rgba(191,199,255,.25)}
.sell-panel .shop-line{background:#142a36;border-color:#426d72}
.sell-panel .shop-line-main .sell-open-btn{min-height:42px;flex-shrink:0}
.sell-panel .sell-total{color:#aef4c5}
.market-sale-feedback{margin:12px 0}
@media(max-width:420px){.market-mode-toggle{gap:6px}.market-mode-toggle .market-mode{padding:7px 9px}}

/* V8: full-rest control, energy countdown and battle closure. */
.rest-tab{background:linear-gradient(120deg,#15526c,#1d5686);border-color:#348fb2;color:#e8fbff}
.rest-tab:disabled{opacity:.4}
.energy-countdown{font-variant-numeric:tabular-nums;color:#fff;font-size:calc(12px + 1pt)}
.energy-help{min-height:17px}
.battle-final .battle-finish-message{white-space:normal;overflow-wrap:anywhere}
.battle-final .btn[data-action="battle-continue"]{width:100%;margin-top:12px}

/* V9 combat skill hints and persistent status effects. */
.special-description{font-size:calc(11px + 1pt);line-height:1.5;color:#c8e7ff;background:#1b3052;border:1px solid #3d638e;border-radius:10px;padding:9px 11px;margin:7px 0}
.combat-actions .btn[data-action="skill"]{white-space:normal;overflow-wrap:anywhere}

/* V10: compact, mobile-first combat, evolution and shop controls. */
.xp-loss-note{margin:9px 0 0;color:#bfc5e5;font-size:calc(10px + 1pt);line-height:1.45}
.gym-summary{padding:9px 11px;border-radius:11px;background:#1d3454;border:1px solid #405b89;font-size:calc(12px + 1pt);color:#c9e8fb;line-height:1.45}
.gym-next{margin:9px 0;color:#bdd8f5;font-size:calc(11px + 1pt)}
.rule-details{border:1px solid #3c5483;background:#152440;border-radius:10px;padding:8px 11px;margin:9px 0 12px}
.rule-details summary,.evolution-details summary{font-size:calc(12px + 1pt);color:#9cdef9;cursor:pointer;font-weight:700}
.rule-details .section-caption{margin:9px 0 0;line-height:1.6}
.evolution-details{margin-top:10px;padding:7px;border-top:1px solid #35476e}
.stat-bonus{color:#78e5be!important;font-size:calc(11px + 1pt)!important;font-weight:750}
.combat-actions{margin:14px 0 0;align-items:stretch}
.combat-actions .combat-move{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:10px 6px}
.combat-move strong{font-size:calc(12px + 1pt);line-height:1.35;overflow-wrap:anywhere}
.combat-move small{font-size:calc(10px + 1pt);font-weight:600;line-height:1.3;overflow-wrap:anywhere}
.combat-move .move-effect{font-size:calc(10px + 1pt);color:#e0f9fc;opacity:.9}
.combat-recovery{margin-top:18px;padding-top:12px;border-top:1px solid #5c6285;clear:both}
.combat-recovery>strong{display:block;margin-bottom:12px;font-size:calc(13px + 1pt);line-height:1.4;overflow-wrap:anywhere}
.combat-recovery>strong small{font-size:calc(11px + 1pt);color:#b3c9e4;white-space:nowrap}
.combat-recovery .actions{margin:0;gap:9px}
.combat-recovery .btn{min-width:0;overflow-wrap:anywhere;font-size:calc(11px + 1pt);padding:10px 7px;min-height:52px}
.shop-qty-input[type=text]{text-align:right;direction:ltr;font-variant-numeric:tabular-nums;padding:0 12px;font-size:calc(20px + 1pt);caret-color:#67e0ef}
@media(max-width:420px){.combat-actions{gap:8px}.combat-move strong{font-size:calc(11px + 1pt)}.combat-move small{font-size:calc(9px + 1pt)}.combat-recovery>strong{font-size:calc(12px + 1pt)}}

/* First-run Jijimon dialogue and clear starter choice cards. */
.jijimon-panel{padding:20px;border-color:#536ca0;background:linear-gradient(155deg,#203059,#121d3b)}
.jijimon-heading{display:flex;gap:15px;align-items:center;margin-bottom:18px}
.jijimon-heading h2{margin:3px 0;font-size:calc(23px + 1pt)}
.jijimon-heading small{font-size:calc(11px + 1pt);color:var(--muted)}
.jijimon-avatar{width:78px;height:78px;flex:0 0 78px;display:grid;place-items:center;
 font-size:calc(52px + 1pt);line-height:1;border-radius:20px;background:radial-gradient(circle at 35% 25%,#456fa2,#27335c 65%,#19213b);
 border:1px solid #7795d6;box-shadow:0 8px 20px #0b112760}
.jijimon-dialogue{position:relative;padding:18px 17px;border:1px solid #6982b7;
 border-radius:17px;background:#162b49;color:#eff7ff;line-height:1.6;min-height:156px}
.jijimon-dialogue:before{content:"";position:absolute;top:-9px;left:24px;width:15px;height:15px;
 background:#162b49;border-left:1px solid #6982b7;border-top:1px solid #6982b7;transform:rotate(45deg)}
.jijimon-dialogue strong{display:block;font-size:calc(17px + 1pt);line-height:1.35}
.jijimon-dialogue p{font-size:calc(14px + 1pt);color:#d6e6fa;margin:12px 0 0}
.jijimon-progress{display:flex;justify-content:center;gap:7px;margin:18px 0 15px}
.jijimon-progress span{width:27px;height:5px;border-radius:12px;background:#31486f}
.jijimon-progress span.active{background:#7c9cff}
.jijimon-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.jijimon-actions button{min-height:48px;line-height:1.3}
.starter-selection>.kicker{display:block;margin-bottom:8px}
.starter-selection>h2{font-size:calc(25px + 1pt);margin:0 0 10px;line-height:1.2}
.starter-selection>.section-caption{line-height:1.55;margin-bottom:15px}
.starter-choices{display:grid;grid-template-columns:1fr;gap:12px}
.starter-choice{border:1px solid #405886;border-radius:17px;background:#182745;
 padding:15px;min-width:0}
.starter-choice-head{display:flex;align-items:center;gap:13px}
.starter-choice-icon{flex:0 0 63px;width:63px;height:63px;border-radius:15px;
 display:grid;place-items:center;font-size:calc(38px + 1pt);background:linear-gradient(130deg,#273b67,#1f2c4e)}
.starter-choice-head h3{margin:0 0 3px;font-size:calc(19px + 1pt)}
.starter-choice-head strong{font-size:calc(12px + 1pt);color:#9dd9f7}
.starter-choice>p{font-size:calc(12px + 1pt);line-height:1.5;margin:12px 0;color:#d9e6fa}
.starter-traits{display:grid;gap:5px;color:#b9dfca;font-size:calc(11px + 1pt);line-height:1.45;margin:0 0 14px}
.starter-choice .btn{width:100%;min-height:44px}
@media(max-width:410px){.jijimon-panel{padding:15px}
 .jijimon-heading{gap:10px}.jijimon-avatar{width:66px;height:66px;flex-basis:66px;font-size:calc(42px + 1pt)}
 .jijimon-actions{gap:7px}.jijimon-actions .btn{font-size:calc(11px + 1pt);padding:8px 7px}
 .starter-choice{padding:12px}.starter-choice-icon{width:53px;height:53px;flex-basis:53px;font-size:calc(32px + 1pt)}
 .starter-choice-head h3{font-size:calc(18px + 1pt)}}

.dungeon-charge-warning{border:1px solid #ffa063;background:#612a30;color:#fff3c0;font-size:calc(12px + 1pt);font-weight:800;line-height:1.5;padding:12px;border-radius:12px;margin:12px 0}
@media(prefers-reduced-motion:no-preference){.dungeon-charge-warning{animation:dungeon-glow 1.3s ease-in-out infinite alternate}
@keyframes dungeon-glow{from{box-shadow:0 0 0 #ff6d0000}to{box-shadow:0 0 12px #ff6d0077}}}
.dungeon-drop-details{margin:10px 0;padding:8px 10px;background:#122138;border:1px solid #39547f;border-radius:9px}
.dungeon-drop-details summary{font-size:calc(11px + 1pt);color:#9dddfa;cursor:pointer;font-weight:800}
.dungeon-drop{display:flex;justify-content:space-between;gap:8px;border-bottom:1px solid #30415c;padding:7px 0;font-size:calc(10px + 1pt);color:#c8d7ed}
.dungeon-drop:last-child{border-bottom:0}.dungeon-drop strong{white-space:nowrap;color:#f6df97}
/* V11: Quest board and persistent DigiDungeon navigation. */
.tasks-panel h2,.dungeons-panel h2{margin:4px 0 11px;font-size:calc(23px + 1pt)}
.tasks-panel>.section-caption,.dungeons-panel>.section-caption{font-size:calc(12px + 1pt);line-height:1.6}
.task-section{margin:15px 0 19px;display:grid;gap:9px}
.task-section h3{font-size:calc(14px + 1pt);margin:0 0 2px;color:#d8ccff}
.task-card{padding:13px;border:1px solid #3c527c;border-radius:13px;background:#172845;min-width:0}
.task-card.task-claimed{opacity:.7}
.task-card-head{display:flex;justify-content:space-between;align-items:start;gap:8px}
.task-card-head strong{font-size:calc(13px + 1pt);line-height:1.4}
.task-card-head span{font-size:calc(11px + 1pt);color:#a7d6f7;font-weight:800;white-space:nowrap}
.task-card>small{display:block;font-size:calc(11px + 1pt);color:#becde8;margin:7px 0 10px}
.task-meter{height:9px;margin-bottom:10px}
.task-footer{display:flex;align-items:center;justify-content:space-between;gap:10px}
.task-footer span{font-size:calc(11px + 1pt);color:#f6dcb2}
.task-footer .btn{min-height:35px;padding:6px 11px;font-size:calc(11px + 1pt)}
.dungeon-card,.dungeon-active{padding:14px;border:1px solid #405b8b;border-radius:14px;background:#18294c;margin:12px 0}
.dungeon-card.locked{opacity:.64}
.dungeon-card-head{display:flex;align-items:start;justify-content:space-between;gap:8px}
.dungeon-card-head strong{font-size:calc(14px + 1pt);line-height:1.4}
.dungeon-card-head span{font-size:calc(11px + 1pt);color:#b3cefa;white-space:nowrap}
.dungeon-card p,.dungeon-active p{color:#bfcfed;font-size:calc(11px + 1pt);margin:9px 0;line-height:1.5}
.dungeon-card button,.dungeon-active button{margin-top:7px;width:100%;min-height:44px;font-size:calc(12px + 1pt)}
.dungeon-active{border-color:#74c3c6;background:linear-gradient(130deg,#1b4056,#1a2852)}
.dungeon-active>strong{display:block;font-size:calc(14px + 1pt)}
.dungeon-rooms{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:15px 0}
.dungeon-rooms span{padding:9px 2px;text-align:center;border:1px solid #4b6692;border-radius:9px;font-size:calc(10px + 1pt);color:#b1c9ed}
.dungeon-rooms span.done{color:#a1f2ca;border-color:#4bbda4;background:#154a48}
.dungeon-active .dungeon-abandon{background:#342941;border-color:#745073}
@media(max-width:420px){.tasks-panel h2,.dungeons-panel h2{font-size:calc(20px + 1pt)}
 .task-card-head strong{font-size:calc(12px + 1pt)}.task-card-head span{font-size:calc(10px + 1pt)}
 .task-footer span{font-size:calc(10px + 1pt)}.task-footer .btn{padding:6px 8px}
 .dungeon-card,.dungeon-active{padding:12px}}

/* V12 multiplayer social */
.social-panel,.social-nick-panel {display:grid;gap:12px;}
.social-trade-actions,.social-search,.social-add-row,.social-trade-head,.social-friend-row,.social-draft-row {display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.social-trade-head,.social-friend-row,.social-draft-row {justify-content:space-between;}
.social-trade,.social-compose,.social-friends,.social-teams {border:1px solid var(--line,rgba(255,255,255,.16));border-radius:12px;padding:12px;display:grid;gap:10px;}
.social-trade p {margin:0;overflow-wrap:anywhere;}
.social-offer-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.social-offer-grid>div {display:grid;gap:8px;min-width:0;}
.social-offer-grid input,.social-offer-grid select,.social-search input,
.social-compose input,.social-nick-panel input,.social-rename input {
  max-width:100%;min-width:0;box-sizing:border-box;padding:10px;border-radius:8px;
  border:1px solid var(--line,rgba(255,255,255,.25));background:var(--panel,#151e32);color:inherit;
}
.social-add-row select {flex:1 1 100px;}
.social-add-row input {width:55px;flex:0 0 55px;}
.social-friend-row small {display:block;color:var(--muted,#aeb4c0);}
.social-trade-head .pill {font-size:calc(11px + 1pt);}
/* Social panels must never widen Telegram's in-app viewport. In particular,
   two offer columns need enough room for a select, quantity and add button. */
.shell,.content,#app,.social-panel,.social-compose,.social-friends,
.social-teams,.social-trade,.social-offer-grid,.social-offer-grid>div {
  min-width:0;
  max-width:100%;
}
.social-panel,.social-compose,.social-friends,.social-teams,.social-trade {
  width:100%;
}
.social-panel h2,.social-panel h3,.social-trade-head strong,
.social-friend-row span,.social-draft-row {
  min-width:0;
  overflow-wrap:anywhere;
}
.social-panel .btn,.social-panel input,.social-panel select {
  min-width:0;
}
.social-panel input,.social-panel select {
  width:100%;
  font-size:calc(16px + 1pt); /* Prevent auto-zoom in Telegram's mobile WebView */
}
.social-add-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) 64px 44px;
  gap:8px;
  align-items:stretch;
  width:100%;
  min-width:0;
}
.social-add-row select {
  width:100%;
  min-width:0;
  max-width:100%;
  text-overflow:ellipsis;
}
.social-add-row input {
  width:100%;
  min-width:0;
  min-height:44px;
  text-align:center;
  padding-inline:4px;
}
.social-add-row .btn {
  min-width:0;
  width:44px;
  min-height:44px;
  padding:8px 4px;
}
.social-offer-grid>div>strong {display:block;line-height:1.4;}
.social-offer-grid>div>label {display:block;font-size:calc(12px + 1pt);font-weight:650;color:var(--muted);}
.social-trade-actions .btn {min-width:0;overflow-wrap:anywhere;}
.social-search {display:grid;grid-template-columns:minmax(0,1fr) auto;width:100%;min-width:0;}
.social-search .btn {min-width:72px;}
.social-friend-row>span {min-width:0;flex:1 1 125px;}
.social-rename {min-width:0;overflow-wrap:anywhere;}
.coop-invite-row {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;min-width:0;max-width:100%;}
.coop-invite-row input,.coop-controls input {width:100%;min-width:0;max-width:100%;box-sizing:border-box;}
.coop-member {min-width:0;overflow-wrap:anywhere;}
@media(max-width:640px) {
  .social-offer-grid {
    grid-template-columns:minmax(0,1fr);
    gap:18px;
  }
  .social-offer-grid>div {
    padding:12px;
    border:1px solid var(--border);
    background:#111d3a;
    border-radius:12px;
    width:100%;
  }
  .social-panel>.social-trade-actions {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    width:100%;
  }
  .social-panel>.social-trade-actions .btn {
    width:100%;
    padding:10px 6px;
    font-size:calc(12px + 1pt);
  }
  .social-compose>.social-trade-actions {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    width:100%;
  }
  .social-compose>.social-trade-actions .btn {
    width:100%;
    padding:10px 6px;
    font-size:calc(12px + 1pt);
  }
  .social-compose .btn.wide {
    width:100%;
  }
  .social-trade .social-trade-actions {
    max-width:100%;
  }
}
@media(max-width:340px) {
  .social-panel,.social-compose,.social-friends,.social-teams {padding:10px;}
  .social-offer-grid>div {padding:9px;}
  .social-add-row {grid-template-columns:minmax(0,1fr) 58px 42px;gap:6px;}
  .social-add-row .btn {width:42px;}
  .coop-invite-row {grid-template-columns:minmax(0,1fr);}
}


/* V12.1 DigiTrade — dedicated, mobile-first trading room. */
.digitrade-screen{display:grid;gap:16px;min-width:0;max-width:100%;width:100%;overflow-wrap:anywhere}
.dt-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;min-width:0}
.dt-heading>div{flex:1;min-width:0}
.dt-heading h2{font-size:calc(26px + 1pt);line-height:1.2;margin:4px 0 0}
.dt-heading .btn{min-height:40px;padding:8px 10px;flex:0 0 auto}
.dt-offer-card,.dt-room-header,.dt-history{
  display:grid;gap:12px;min-width:0;width:100%;max-width:100%;
  border:1px solid #3b5181;border-radius:15px;padding:14px;
  background:linear-gradient(145deg,#152545,#0e1b35)
}
.dt-offer-card h3,.dt-history h3{font-size:calc(17px + 1pt);margin:0}
.dt-offer-card p{margin:0;line-height:1.5}
.dt-room-header{background:linear-gradient(135deg,#153f51,#1a254c);border-color:#317f9a}
.dt-room-header h3{font-size:calc(26px + 1pt);letter-spacing:.09em;margin:0;overflow-wrap:anywhere}
.dt-room-header p,.dt-room-header small{margin:0;color:#bed0ee;font-size:calc(12px + 1pt)}
.dt-room-header strong{color:#fff}
.dt-card-title,.dt-offer-line,.dt-bits-line,.dt-item-top{
  display:flex;justify-content:space-between;gap:8px;align-items:center;min-width:0
}
.dt-card-title h3{overflow-wrap:anywhere;min-width:0;font-size:calc(16px + 1pt)}
.dt-card-title span{font-size:calc(12px + 1pt);color:var(--muted);white-space:nowrap}
.dt-item-row{display:grid;gap:8px;min-width:0;border:1px solid #384c78;
  padding:11px;border-radius:12px;background:#111d3a}
.dt-item-top small,.dt-stock{color:#b7c8ec;font-size:calc(11px + 1pt)}
.dt-item-top .btn.dt-remove{min-width:40px;min-height:35px;padding:5px 8px}
.dt-item-fields{display:grid;grid-template-columns:minmax(0,1fr) 74px;gap:8px;width:100%;min-width:0}
.dt-item-fields select,.dt-item-fields input,.dt-bits-input input,.digitrade-screen #dt-code{
  border:1px solid #57709d;background:#0b1630;color:#f4f6ff;border-radius:10px;
  min-height:46px;padding:9px 10px;font-size:calc(16px + 1pt);min-width:0;max-width:100%;width:100%;
  box-sizing:border-box
}
.dt-item-fields select{text-overflow:ellipsis}
.dt-item-fields input{text-align:center;padding:8px 3px}
.dt-bits-input{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,40%);gap:12px;align-items:center}
.dt-bits-input label{font-size:calc(13px + 1pt);font-weight:700;color:#d6e6ff}
.dt-bits-input input{text-align:right}
.dt-action-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0}
.dt-action-row .btn{min-width:0;font-size:calc(12px + 1pt);padding:9px 6px;overflow-wrap:anywhere}
.digitrade-screen>.btn.wide,.dt-offer-card>.btn.wide,.dt-success>.btn.wide{width:100%}
.dt-status{color:#c0c9df;border:1px solid #45577c;background:#263354;padding:10px;
  border-radius:10px;font-size:calc(12px + 1pt);font-weight:650;overflow-wrap:anywhere}
.dt-status.good{border-color:#338c7c;background:#143c3e;color:#a8f6d6}
.dt-unsaved{color:#ffd585;font-size:calc(12px + 1pt);font-weight:650}
.dt-offer-line{font-size:calc(13px + 1pt);overflow-wrap:anywhere;align-items:start}
.dt-offer-line span{flex:1;min-width:0}
.dt-offer-line strong{white-space:nowrap}
.dt-bits-line{padding-top:10px;border-top:1px solid #36476a;font-size:calc(13px + 1pt)}
.dt-trading-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;min-width:0}
.dt-swap-symbol{text-align:center;font-size:calc(25px + 1pt);color:#82c8e0;line-height:1}
.dt-fineprint{line-height:1.65}
.dt-cancel{background:#3b2845;border-color:#76516b}
.dt-success{display:grid;gap:15px;text-align:center}
.dt-success-icon{font-size:calc(48px + 1pt)}
.dt-success h3{font-size:calc(22px + 1pt);margin:0}
.dt-confirm-create,.dt-waiting{display:grid;gap:12px}
.dt-history>summary{cursor:pointer;font-weight:750;font-size:calc(14px + 1pt)}
.dt-history-row{border-top:1px solid #36486b;padding:11px 0;display:grid;gap:5px}
.dt-history-row small{color:var(--muted)}
.dt-history-row p{font-size:calc(12px + 1pt);margin:0;overflow-wrap:anywhere}
@media(max-width:360px){
  .digitrade-screen{gap:12px}
  .dt-heading{gap:5px}
  .dt-heading h2{font-size:calc(22px + 1pt)}
  .dt-offer-card,.dt-room-header{padding:11px}
  .dt-item-fields{grid-template-columns:minmax(0,1fr) 62px;gap:6px}
  .dt-action-row{grid-template-columns:minmax(0,1fr)}
  .dt-bits-input{grid-template-columns:minmax(0,1fr)}
}


/* V12.2 — Social: compact, readable trainer directory with live presence. */
.social-compact{gap:12px;padding:15px;min-width:0;}
.sc-top{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.sc-top .kicker{font-size:calc(9px + 1pt);color:#8caeca;letter-spacing:.09em}
.sc-top h2{font-size:calc(22px + 1pt);line-height:1.25;margin:4px 0 0}
.sc-count{flex:0 0 auto;font-size:calc(11px + 1pt);color:#83e1be;background:#173f42;
  border:1px solid #326d66;border-radius:30px;padding:6px 10px}
.sc-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0}
.sc-tabs .btn{width:100%;min-width:0;min-height:43px;font-size:calc(13px + 1pt);padding:8px}
.sc-sync{display:flex;align-items:center;gap:7px;font-size:calc(10px + 1pt);color:#9cb8d3;
 margin:0;line-height:1.35}
.sc-sync-dot{height:6px;width:6px;flex:0 0 6px;border-radius:50%;background:#6cb6de}
.sc-search-card,.sc-group{display:grid;gap:10px;min-width:0;background:#131f3a;
  border:1px solid #344667;border-radius:13px;padding:11px}
.sc-search-card label{font-size:calc(12px + 1pt);font-weight:700;color:#bed4f0}
.sc-search-card .social-search{gap:7px;grid-template-columns:minmax(0,1fr) auto}
.sc-search-card .social-search input{font-size:calc(14px + 1pt);min-height:43px}
.sc-search-card .social-search .btn{font-size:calc(12px + 1pt);min-height:43px;min-width:68px;padding:7px 9px}
.sc-search-hit{display:flex;align-items:center;justify-content:space-between;gap:8px;
  border-top:1px solid #32456a;padding-top:9px}
.sc-search-hit span{min-width:0;flex:1}
.sc-search-hit strong{font-size:calc(12px + 1pt);overflow-wrap:anywhere}
.sc-search-hit small{font-size:calc(10px + 1pt);display:block;color:#a7b9d4}
.sc-search-hit .btn{font-size:calc(11px + 1pt);padding:7px}
.sc-group-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.sc-group-heading h3{font-size:calc(14px + 1pt);margin:0}
.sc-group-heading>span{color:#afd9ef;font-size:calc(11px + 1pt)}
.sc-request{display:flex;justify-content:space-between;align-items:center;gap:7px;flex-wrap:wrap;
  border-top:1px solid #2e4062;padding-top:10px}
.sc-request>strong{font-size:calc(12px + 1pt)}
.sc-request-actions{display:flex;gap:7px}
.sc-request-actions .btn{font-size:calc(11px + 1pt);padding:7px}
.sc-friend{display:flex;align-items:flex-start;gap:10px;min-width:0;border:1px solid #3b547e;
  background:linear-gradient(130deg,#192b50,#12203d);padding:11px;border-radius:12px}
.sc-friend-avatar{display:grid;place-items:center;height:39px;width:39px;flex:0 0 39px;
  border:1px solid #526d9b;border-radius:11px;background:#263c65;font-size:calc(21px + 1pt)}
.sc-friend-content{flex:1;min-width:0;display:grid;gap:5px}
.sc-friend-title{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0}
.sc-friend-title strong{font-size:calc(13px + 1pt);line-height:1.3;overflow-wrap:anywhere;min-width:0}
.sc-friend-content p{margin:0;font-size:calc(11px + 1pt);color:#afbed6}
.sc-friend-content p span{margin:0 3px}
.sc-presence{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;font-size:calc(10px + 1pt);
  font-weight:700;padding:4px 6px;border-radius:8px}
.sc-presence-dot{width:7px;height:7px;flex:0 0 7px;border-radius:50%}
.sc-presence.is-online{color:#87efc9;background:#17423b}
.sc-presence.is-online .sc-presence-dot{background:#4be3a0;box-shadow:0 0 7px #42d9a080}
.sc-presence.is-offline{color:#bac0d1;background:#26304c}
.sc-presence.is-offline .sc-presence-dot{background:#77829a}
.sc-friend-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:4px}
.sc-friend-actions .btn{font-size:calc(11px + 1pt);min-height:34px;padding:6px 12px}
.sc-empty{font-size:calc(11px + 1pt);color:#adc0dc;line-height:1.6;padding:9px}
.social-compact .social-rename{padding:8px 3px;margin:0}
.social-compact .social-rename summary{font-size:calc(12px + 1pt)}
@media(max-width:360px){
  .social-compact{padding:11px}
  .sc-friend{gap:7px;padding:8px}
  .sc-friend-avatar{height:33px;width:33px;flex-basis:33px;font-size:calc(18px + 1pt)}
  .sc-friend-title strong{font-size:calc(12px + 1pt)}
  .sc-presence{font-size:calc(9px + 1pt);padding:3px 4px}
}
/* V12.2 — DigiDungeons: separated lobby, boss, team, actions and loot. */
.dc-panel{display:grid;gap:15px;min-width:0;width:100%;max-width:100%;padding:15px}
.dc-panel *{box-sizing:border-box;min-width:0}
.dc-panel .btn{white-space:normal;overflow-wrap:anywhere}
.dc-page-heading .kicker{font-size:calc(9px + 1pt);color:#8caec8;letter-spacing:.09em}
.dc-page-heading h2{font-size:calc(21px + 1pt);line-height:1.3;margin:6px 0}
.dc-muted{font-size:calc(11px + 1pt);line-height:1.5;color:#adbfde;margin:6px 0}
.dc-mode-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.dc-mode-tabs .btn{min-height:46px;font-size:calc(12px + 1pt);padding:9px 7px}
.dc-cards{display:grid;gap:12px}
.dc-dungeon-card,.dc-block,.dc-join,.dc-room-heading{
  padding:13px;border-radius:13px;border:1px solid #435a89;
  background:linear-gradient(145deg,#1a2c50,#121f3c)}
.dc-dungeon-card{display:grid;gap:11px}
.dc-dungeon-card.locked{opacity:.78}
.dc-dungeon-title,.dc-block-top{display:flex;align-items:start;justify-content:space-between;gap:9px}
.dc-dungeon-title h3{font-size:calc(15px + 1pt);line-height:1.35;margin:0}
.dc-dungeon-title>span,.dc-block-top>span{font-size:calc(10px + 1pt);white-space:nowrap;color:#b4d3ed}
.dc-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.dc-facts span{font-size:calc(11px + 1pt);color:#c9dbf5}
.dc-boss-list summary{font-size:calc(11px + 1pt);color:#a5def5;cursor:pointer}
.dc-boss-list p{font-size:calc(11px + 1pt);line-height:1.45;color:#becde7}
.dc-dungeon-card>.btn{min-height:43px;font-size:calc(12px + 1pt)}
.dc-join{display:grid;gap:12px;text-align:center;padding:21px 16px}
.dc-code-art{font-size:calc(35px + 1pt)}
.dc-join h3{font-size:calc(20px + 1pt);margin:0}
.dc-join>p{font-size:calc(12px + 1pt);color:#c2d3ec;line-height:1.55;margin:0}
.dc-join label{font-size:calc(11px + 1pt);font-weight:700;text-align:left;color:#cce7f5}
.dc-join input{width:100%;min-height:56px;max-width:100%;border-radius:11px;
  background:#0a1936;border:1px solid #6aa3c2;color:#f5fcff;text-align:center;
  font-size:calc(19px + 1pt);font-weight:800;letter-spacing:.13em;padding:10px;
  text-transform:uppercase}
.dc-join input:focus{outline:2px solid #69cfea;outline-offset:2px}
.dc-join>.btn{min-height:48px;font-size:calc(13px + 1pt)}
.dc-checks{display:flex;justify-content:center;flex-wrap:wrap;gap:7px;color:#a5e1ca;font-size:calc(10px + 1pt)}
.dc-checks span{padding:4px 7px;border-radius:8px;background:#17423a}
.dc-room{display:grid;gap:12px}
.dc-room-heading{border-color:#3f94a1;background:linear-gradient(130deg,#1b4355,#1a294f)}
.dc-room-heading .kicker{font-size:calc(10px + 1pt);color:#9ce5f5}
.dc-room-heading h3{font-size:calc(19px + 1pt);margin:7px 0;line-height:1.35}
.dc-room-meta{display:flex;flex-wrap:wrap;gap:8px}
.dc-room-meta>span{font-size:calc(11px + 1pt);border-radius:7px;padding:5px 8px;background:#203b5b;color:#d2e9f5}
.dc-block h4{font-size:calc(14px + 1pt);line-height:1.4;margin:0}
.dc-room-code{font-size:calc(27px + 1pt);font-weight:900;letter-spacing:.12em;text-align:center;
  color:#e7fbff;padding:12px;border:1px dashed #6ac2d9;background:#10263f;border-radius:11px}
.dc-lobby .btn,.dc-lobby-controls>.btn,.dc-next>.btn{width:100%;margin-top:9px;min-height:46px}
.dc-team-list{display:grid;gap:7px;margin-top:12px}
.dc-team-member{display:flex;justify-content:space-between;align-items:center;gap:8px;
  padding:9px;border:1px solid #35466d;border-radius:10px;background:#122340}
.dc-member-name{display:grid;gap:3px;flex:1}
.dc-member-name strong{font-size:calc(12px + 1pt);line-height:1.25;overflow-wrap:anywhere}
.dc-member-name small{font-size:calc(10px + 1pt);color:#a8c6e2}
.dc-member-vitals{display:grid;gap:4px;text-align:right;white-space:nowrap}
.dc-member-vitals span{font-size:calc(10px + 1pt);color:#e3effe}
.dc-team-member.defeated{opacity:.62}
.dc-ready-state{font-size:calc(10px + 1pt);white-space:nowrap;font-weight:750;padding:5px 7px;border-radius:8px}
.dc-ready-state.yes{color:#a2efcf;background:#16463d}
.dc-ready-state.no{color:#eed393;background:#4b372c}
.dc-team-empty{font-size:calc(11px + 1pt);padding:11px;border:1px dashed #536689;
  border-radius:9px;text-align:center;color:#abc4e0}
.dc-requirements{display:grid;gap:7px;color:#a6dec9;font-size:calc(11px + 1pt);margin:9px 0}
.dc-progress .dc-block-top{margin-bottom:12px}
.dc-stage-track{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.dc-stage{display:grid;justify-items:center;gap:6px;font-size:calc(9px + 1pt);text-align:center;color:#97a4c5}
.dc-stage-marker{display:grid;place-items:center;width:29px;height:29px;border-radius:50%;
  border:1px solid #53658b;background:#1c2949;font-size:calc(12px + 1pt);font-weight:800}
.dc-stage.done{color:#9ceac2}.dc-stage.done .dc-stage-marker{border-color:#41bc94;background:#155342}
.dc-stage.current{color:#a6d9ff}.dc-stage.current .dc-stage-marker{border-color:#66cbea;background:#1d5780}
.dc-boss{border-color:#6b527d;background:linear-gradient(160deg,#39214b,#1c2449)}
.dc-boss-badge{font-size:calc(10px + 1pt);font-weight:850;color:#dbb9fa;letter-spacing:.09em}
.dc-boss h4{font-size:calc(22px + 1pt);margin:9px 0}
.dc-boss-meter{display:flex;justify-content:space-between;font-size:calc(11px + 1pt);gap:7px;margin:10px 0 7px}
.dc-boss .meter{height:12px}
.dc-warning{padding:11px;border-radius:9px;margin-top:12px;color:#ffe2a3;
  border:1px solid #9e7749;background:#483526;font-size:calc(12px + 1pt);line-height:1.5}
.dc-round-line{display:flex;justify-content:space-between;gap:8px;margin-top:12px;
  color:#b5c7e8;font-size:calc(11px + 1pt)}
.dc-actions .dc-block-top{margin-bottom:12px}
.dc-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.dc-action-grid>.btn,.dc-item-action summary{font-size:calc(12px + 1pt);min-height:48px;padding:10px 7px}
.dc-item-action{position:relative}
.dc-item-action summary{display:flex;align-items:center;justify-content:center;cursor:pointer;
  border:1px solid #4a68a0;background:#28395e;border-radius:10px;font-weight:750}
.dc-item-action[open]{grid-column:1/-1}
.dc-item-options{display:grid;gap:8px;padding:10px;border:1px solid #3c5278;border-radius:9px}
.dc-item-options>.btn{width:100%;font-size:calc(11px + 1pt)}
.dc-action-note{font-size:calc(11px + 1pt);color:#b8dcf5;line-height:1.5;margin:9px 0 0}
.dc-next{border-color:#45977f;background:#183d42}
.dc-next h4{color:#9af2cf}
.dc-next p{font-size:calc(12px + 1pt);line-height:1.55}
.dc-reward-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:12px 0}
.dc-reward-grid>div{display:grid;gap:5px;background:#12233e;border-radius:9px;padding:9px 7px}
.dc-reward-grid small{font-size:calc(10px + 1pt);color:#b7c5db}
.dc-reward-grid strong{font-size:calc(14px + 1pt);font-variant-numeric:tabular-nums}
.dc-log{padding:11px 13px}
.dc-log summary{cursor:pointer;font-size:calc(12px + 1pt);font-weight:750;color:#b2e0f2}
.dc-log p{font-size:calc(11px + 1pt);line-height:1.65;margin:11px 0 0;overflow-wrap:anywhere;color:#cee1ef}
.dc-exit{background:#38273e;border:1px solid #725775;font-size:calc(12px + 1pt);min-height:43px}
.dc-rules{padding:9px;border-top:1px solid #32476e}
.dc-rules summary{cursor:pointer;font-size:calc(12px + 1pt);color:#b3d9ed}
.dc-rules p{font-size:calc(11px + 1pt);line-height:1.6;color:#bdcce3}
@media(max-width:380px){
  .dc-panel{padding:12px}
  .dc-member-vitals span{font-size:calc(9px + 1pt)}
  .dc-room-code{font-size:calc(21px + 1pt)}
  .dc-join input{font-size:calc(16px + 1pt)}
  .dc-reward-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dc-action-grid{gap:6px}
}


/* V12.4 — always-visible toast and centered, server-authoritative rewards. */
.notice[hidden],.reward-modal[hidden]{display:none!important}
.notice{position:fixed;left:50%;bottom:calc(16px + env(safe-area-inset-bottom,0px));
  transform:translateX(-50%);z-index:1200;max-width:calc(100vw - 24px);
  width:min(560px,calc(100vw - 24px));margin:0;padding:13px 15px;
  border:1px solid #5b9db3;box-shadow:0 16px 46px #000a;border-radius:14px;
  background:#173b54;color:#e8faff;font-size:calc(13px + 1pt);line-height:1.55;
  overflow-wrap:anywhere;max-height:42dvh;overflow-y:auto}
.notice.error{background:#562b42;border-color:#b26a86;color:#fff1f7}
.reward-modal{position:fixed;inset:0;z-index:2200;background:#02091ddd;
  display:grid;place-items:center;padding:20px 14px calc(20px + env(safe-area-inset-bottom,0px))}
.reward-card{width:min(100%,450px);max-height:calc(100dvh - 40px);overflow-y:auto;
  border:1px solid #5278a7;border-radius:22px;padding:22px 18px;
  background:linear-gradient(155deg,#182c53,#101936);box-shadow:0 24px 60px #000b;
  text-align:center;color:#f4f8ff}
.reward-emblem{font-size:calc(53px + 1pt);line-height:1.3}
.reward-kicker{font-size:calc(11px + 1pt);letter-spacing:.13em;color:#79e4df;font-weight:900;
  margin:10px 0 5px}
.reward-card h2{font-size:calc(23px + 1pt);line-height:1.3;margin:4px 0 10px}
.reward-card h3{font-size:calc(13px + 1pt);text-align:left;margin:18px 0 9px}
.reward-amounts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:13px 0}
.reward-amounts>div{background:#1a3159;border:1px solid #344f7e;border-radius:12px;
  padding:12px 8px;display:grid;gap:4px;text-align:center}
.reward-amounts small{font-size:calc(10px + 1pt);color:#aec8e2}
.reward-amounts strong{font-size:calc(17px + 1pt);color:#87efc5;font-variant-numeric:tabular-nums}
.reward-list{display:grid;gap:7px;text-align:left}
.reward-item{display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:10px;border:1px solid #3b5379;border-radius:10px;background:#112341;
  font-size:calc(12px + 1pt);overflow-wrap:anywhere}
.reward-item strong{color:#e6d5ff;white-space:nowrap}
.reward-confirm{font-size:calc(12px + 1pt);color:#91efd0;margin:14px 0}
.reward-card .btn{width:100%;font-size:calc(13px + 1pt)}
.battle-loot .reward-list{margin-top:9px}
.battle-loot .reward-amounts strong{font-size:calc(14px + 1pt)}
.dc-round-clock{display:inline-block;font-size:calc(17px + 1pt);font-weight:900;
  font-variant-numeric:tabular-nums;color:#7de9cf}
.dc-round-clock.urgent{color:#ffb08f}
.dc-auto-defense-note{font-size:calc(11px + 1pt);line-height:1.5;color:#a9d3e8;margin:4px 0 0}

/* V12.5 — tasks explained first; readable team outcomes and sticky boss info. */
.task-guide{margin:12px 0 18px;padding:13px;border-radius:13px;
  background:#192e4e;border:1px solid #5276a6;color:#dcecff}
.task-guide>strong{display:block;font-size:calc(13px + 1pt);color:#b7e9ff;margin-bottom:7px}
.task-guide p{font-size:calc(12px + 1pt);line-height:1.6;margin:7px 0 0;color:#c2d4ec}
.task-guide b{color:#f4f7ff}
.dc-room .dc-boss{position:sticky;top:8px;z-index:12;padding:10px 12px;
  box-shadow:0 10px 26px #030918a8}
.dc-boss h4{font-size:calc(16px + 1pt);margin:5px 0;line-height:1.3}
.dc-boss .dc-boss-meter{margin:5px 0}
.dc-boss .meter{height:9px}
.dc-boss .dc-round-line{margin-top:7px}
.dc-boss .dc-warning{margin-top:7px;padding:7px;font-size:calc(10px + 1pt)}
.dc-round-result{border-color:#4b9f9d;background:linear-gradient(140deg,#153d48,#152645)}
.dc-round-result .dc-block-top{margin-bottom:8px}
.dc-round-result p{font-size:calc(12px + 1pt);line-height:1.65;margin:0;white-space:pre-wrap;
  overflow-wrap:anywhere;color:#e2f2ff}
.dc-team-compact .dc-team-list{margin-top:8px}
.dc-team-compact .dc-team-member{padding:7px 9px}
.reward-card .reward-empty{font-size:calc(15px + 1pt);font-weight:850;color:#ffe8ca;
  padding:15px;border-radius:12px;background:#49302e;border:1px solid #966d55}
.reward-card .reward-lost{color:#ffcfb4;font-size:calc(11px + 1pt);line-height:1.5;margin:10px 0}

/* V12.6 — shared-round preparation and visible one-action lock. */
.dc-round-phase{min-height:15px;margin:6px 0 0;color:#b8baff;font-size:calc(11px + 1pt);
  font-weight:700;line-height:1.5;font-variant-numeric:tabular-nums}
.dc-member-action{font-size:calc(10px + 1pt)!important;font-weight:750;white-space:normal;
  overflow-wrap:anywhere;text-align:right;max-width:160px}
.dc-member-action.confirmed{color:#92efd0}
.dc-member-action.waiting{color:#e6ce90}
.dc-actions .btn:disabled{opacity:.45;cursor:not-allowed;transform:none}
.dc-actions .dc-block-top>span{white-space:normal;text-align:right}


/* V1.3 Neural Implants: distinct instance rarity and two equipment slots. */
.implant-summary{border-top:1px solid #385072;margin-top:16px;padding-top:14px;display:grid;gap:10px}
.implant-summary-title{display:flex;gap:8px;justify-content:space-between;align-items:center}
.implant-summary-title strong{color:#83e8e4;font-size:calc(14px + 1pt)}
.implant-summary-title span{color:#a8bbd3;font-size:calc(10px + 1pt)}
.implant-slot-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.implant-slot{border:1px dashed #4d658a;background:#131f3b;border-radius:12px;
  padding:10px;display:flex;flex-direction:column;gap:6px;min-width:0}
.implant-slot.filled{border:1px solid var(--implant-color,#839ab9);background:#172744}
.implant-slot strong{font-size:calc(12px + 1pt);color:#edf7ff;overflow-wrap:anywhere}
.implant-slot small{font-size:calc(9px + 1pt);letter-spacing:.05em;color:var(--implant-color,#abc2df);font-weight:bold}
.implant-slot span{font-size:calc(10px + 1pt);color:#acbdd6;line-height:1.45}
.implant-bonuses{display:flex;flex-wrap:wrap;gap:6px}
.implant-bonuses span{background:#1b3150;border:1px solid #3d5577;border-radius:7px;
  color:#b9eae1;font-size:calc(10px + 1pt);padding:6px 8px}
.implant-summary>small{font-size:calc(10px + 1pt);color:#94a9c7}
.implant-inventory{border-top:1px solid #34466b;margin-top:15px;padding-top:12px}
.implant-inventory h3{color:#aeeae7;font-size:calc(15px + 1pt);margin:0}
.implant-item{border:1px solid var(--implant-color,#8da0b8);border-left-width:4px;
  border-radius:12px;margin-top:10px;padding:12px;background:#152342}
.implant-item-head{display:flex;justify-content:space-between;gap:7px;align-items:center}
.implant-item-head strong{font-size:calc(13px + 1pt);overflow-wrap:anywhere}
.implant-item-head small{font-size:calc(9px + 1pt);color:#abbad1}
.implant-rarity{color:var(--implant-color);font-weight:800;font-size:calc(11px + 1pt)}
.implant-meta,.implant-item p{font-size:calc(11px + 1pt);color:#bacce0;line-height:1.5;margin:8px 0}
.implant-controls{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.implant-controls button{flex:1;min-width:100px;font-size:calc(11px + 1pt)}
.implant-item>small{font-size:calc(10px + 1pt);color:#e8bb92;display:block;margin-top:7px}
.reward-item.neural-drop{border-left:3px solid var(--implant-color)}
.reward-item.neural-drop span{display:grid;gap:5px}
.reward-item.neural-drop small{font-size:calc(10px + 1pt);color:#bed5ea}
.reward-item.neural-drop strong{font-size:calc(10px + 1pt)}


/* V1.4: neural equipment lives inside Ver atributos, managed in a modal. */
.implant-slot-button{color:inherit;text-align:left;width:100%;cursor:pointer;font:inherit}
.implant-slot-button:focus-visible{outline:2px solid #65d7e4;outline-offset:3px}
.implant-modal[hidden]{display:none!important}
.implant-modal{position:fixed;inset:0;z-index:2300;background:#02091dd9;display:grid;
 place-items:center;padding:14px 12px calc(14px + env(safe-area-inset-bottom,0px))}
.implant-dialog{width:min(100%,490px);max-height:calc(100dvh - 35px);
 overflow-y:auto;padding:18px;border-radius:20px;border:1px solid #4f78a5;
 box-shadow:0 22px 66px #000c;background:linear-gradient(135deg,#182d4e,#0c1831);
 color:#edf6ff}
.implant-dialog-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.implant-dialog-top h2{font-size:calc(20px + 1pt);margin:4px 0 12px}
.implant-dialog h3{font-size:calc(15px + 1pt);color:#8ddae2;margin:15px 0 10px}
.implant-choice,.implant-current{border:1px solid var(--implant-color,#607f9f);
 background:#152844;border-radius:12px;padding:12px;display:grid;gap:7px;margin:9px 0}
.implant-choice p,.implant-choice small,.implant-current span,.implant-current small{
 margin:0;font-size:calc(11px + 1pt);line-height:1.5;color:#afc9de}
.implant-current strong{font-size:calc(13px + 1pt);color:#fff}
.implant-choice .btn,.implant-current .btn{margin-top:4px}
.implant-sale{border-left:3px solid var(--implant-color,#739bb2);
 padding:12px;display:grid;gap:9px}
.implant-sale .region-copy{display:grid;gap:5px}
.implant-sale .region-copy small{font-size:calc(11px + 1pt);color:#a8d7df}
.implant-sale .dt-action-row{display:flex;gap:8px}

/* DigiGram pixel art: transparent sprites, sized for mobile Telegram WebApp. */
.digimon-sprite{display:block;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 2px 4px rgba(0,0,0,.22))}
.digimon-sprite-fallback{display:inline-grid;place-items:center;min-width:40px;min-height:40px;font-size:calc(32px + 1pt)}
.starter-choice .starter-sprite{width:68px;height:68px;flex:0 0 68px}
.tamer-profile{display:flex;align-items:center;gap:10px;min-width:0}
.tamer-profile-copy{min-width:0}
.tamer-profile .partner-sprite{width:84px;height:84px;flex:0 0 84px}
.tamer-profile h2{overflow-wrap:anywhere}
.arena-fight .battle-sprite{width:88px;height:88px;max-width:100%;margin:0 auto 5px}
.arena-fight .fighter{min-width:0}
.evolution-target{display:flex;align-items:center;gap:10px;min-width:0}
.evolution-target>div{min-width:0}
.evolution-target .evolution-sprite{width:58px;height:58px;flex:0 0 58px}
@media(max-width:450px){
  .tamer-summary{flex-wrap:wrap}
  .tamer-profile{flex:1 1 200px}
  .tamer-profile .partner-sprite{width:72px;height:72px;flex-basis:72px}
  .tamer-balances{flex-direction:row;flex-wrap:wrap;width:100%;justify-content:flex-end}
  .arena-fight .battle-sprite{width:72px;height:72px}
  .starter-choice .starter-sprite{width:58px;height:58px;flex-basis:58px}
  .evolution-target .evolution-sprite{width:48px;height:48px;flex-basis:48px}
}

/* Enemy pixel art: atlas is 5 columns x 3 rows of 128px RGBA tiles.
   Visual-only; values, combat engine, and backend remain untouched. */
.enemy-sprite{--enemy-size:88px;display:block;flex-shrink:0;width:var(--enemy-size);height:var(--enemy-size);
 background-image:url('/static/sprites/enemy_atlas.png?v=1');
 background-size:500% 300%;background-position:var(--enemy-x) var(--enemy-y);
 background-repeat:no-repeat;image-rendering:pixelated;
 filter:drop-shadow(0 3px 6px rgba(0,0,0,.35))}
.arena-fight .enemy-sprite.battle-sprite{--enemy-size:88px;margin:0 auto 5px}
.dungeon-guardian-art{display:flex;align-items:center;gap:9px;min-height:74px}
.dungeon-guardian-art p{margin:0}
.dungeon-guardian-art .dungeon-guard-sprite{--enemy-size:72px}
.dc-boss-identity{display:flex;align-items:center;gap:9px;min-width:0}
.dc-boss-identity h4{min-width:0;overflow-wrap:anywhere}
.dc-boss-identity .coop-boss-sprite{--enemy-size:77px}
@media(max-width:420px){
 .arena-fight .enemy-sprite.battle-sprite{--enemy-size:72px}
 .dungeon-guardian-art .dungeon-guard-sprite{--enemy-size:62px}
 .dc-boss-identity .coop-boss-sprite{--enemy-size:64px}
}
/* DigiGram sprite presentation V2: one proportional ground shadow for every evolution.
   Presentation-only: all twelve original transparent PNGs remain unchanged. */
.digimon-sprite-stage{
  position:relative;isolation:isolate;display:grid;place-items:center;
  flex-shrink:0;min-width:0;vertical-align:middle;
}
.digimon-sprite-stage::after{
  content:"";position:absolute;pointer-events:none;z-index:0;
  left:11%;bottom:2%;width:78%;height:14%;border-radius:50%;
  background:radial-gradient(ellipse at center,rgba(2,7,21,.72) 0%,rgba(2,7,21,.39) 42%,transparent 76%);
  filter:blur(4px);
}
.digimon-sprite-stage>.digimon-sprite{
  position:relative;z-index:1;display:block;
  width:100%;height:100%;max-width:100%;max-height:100%;
  object-fit:contain;filter:drop-shadow(0 2px 3px rgba(0,0,0,.24));
}
.starter-choice .starter-sprite-stage{width:68px;height:68px;flex:0 0 68px}
.arena-fight .battle-sprite-stage{width:88px;height:88px;margin:0 auto 5px}
.evolution-target .evolution-sprite-stage{width:58px;height:58px;flex:0 0 58px}

/* Avoid compressing the partner artwork against names, nickname and balances. */
.digimon-panel .tamer-summary{
  display:grid;grid-template-columns:minmax(0,1fr);
  align-items:stretch;gap:8px;
}
.digimon-panel .tamer-profile{
  display:grid;grid-template-columns:clamp(124px,36%,180px) minmax(0,1fr);
  align-items:center;gap:12px;min-width:0;width:100%;
}
.digimon-panel .partner-sprite-stage{width:100%;height:auto;aspect-ratio:1/1}
.digimon-panel .tamer-profile-copy{min-width:0;overflow-wrap:anywhere}
.digimon-panel .tamer-profile h2{
  font-size:calc(clamp(19px,4.9vw,27px) + 1pt);line-height:1.25;margin:6px 0;
  overflow-wrap:anywhere;
}
.digimon-panel .tamer-profile .subtle{display:block;line-height:1.4}
.digimon-panel .tamer-balances{
  display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-end;
  align-items:center;width:100%;gap:8px;
}
.digimon-panel .tamer-balances .balance{font-variant-numeric:tabular-nums}
@media(max-width:450px){
  .starter-choice .starter-sprite-stage{width:58px;height:58px;flex-basis:58px}
  .arena-fight .battle-sprite-stage{width:72px;height:72px}
  .evolution-target .evolution-sprite-stage{width:48px;height:48px;flex-basis:48px}
}
@media(max-width:350px){
  .digimon-panel .tamer-profile{grid-template-columns:112px minmax(0,1fr);gap:8px}
  .digimon-panel .tamer-balances .balance{font-size:calc(11px + 1pt)}
}

/* DigiGram BETA header label: display-only, stays in the approved top gap. */
.digivice-top{position:relative}
.digivice-top .digivice-beta{
  position:absolute;
  left:57%;
  top:9px;
  transform:translateX(-50%);
  z-index:1;
  white-space:nowrap;
  pointer-events:none;
  color:#f4f7ff;
  font-size:calc(clamp(13px,4.8vw,22px) + 1pt);
  font-weight:1000;
  line-height:1;
  letter-spacing:.045em;
  text-shadow:0 2px 9px rgba(4,9,24,.75);
}
@media(max-width:360px){
  .digivice-top .digivice-beta{
    left:59%;
    top:5px;
    font-size:calc(12px + 1pt);
    letter-spacing:.02em;
  }
}

/* Full-energy Telegram notification — optional, accessible, partner card only. */
.energy-notify-setting{margin:11px 0 3px;display:grid;gap:5px}
.energy-notify-toggle{
  display:flex;align-items:center;gap:7px;width:100%;border:1px solid #536482;
  border-radius:10px;background:#172845;color:#dfeaff;padding:9px 10px;
  cursor:pointer;font-size:calc(11px + 1pt);font-family:inherit;line-height:1.4;text-align:left
}
.energy-notify-toggle>span:nth-child(2){flex:1;min-width:0}
.energy-notify-toggle strong{flex-shrink:0;color:#9caecc;font-size:calc(9px + 1pt);letter-spacing:.025em}
.energy-notify-toggle[aria-pressed="true"]{background:#123c47;border-color:#3e9f9d}
.energy-notify-toggle[aria-pressed="true"] strong{color:#89f4d6}
.energy-notify-toggle:disabled{opacity:.6;cursor:not-allowed}
.energy-notify-toggle:focus-visible{outline:2px solid #61e6d7;outline-offset:2px}
.energy-notify-setting>small{color:#9eb1cc;font-size:calc(10px + 1pt);line-height:1.4}
@media(max-width:360px){
  .energy-notify-toggle{font-size:calc(10px + 1pt);padding:8px}
  .energy-notify-toggle strong{font-size:calc(8px + 1pt)}
}

/* DigiGram battle flow: immersive mobile modal with no in-modal brand logo. */
body.battle-open { overflow:hidden; }
.battle-overlay {
  position:fixed;inset:0;z-index:2050;background:rgba(3,6,23,.94);
  /* Avoid Android WebView compositor flicker/black tiles caused by GPU backdrop blur.
     The solid translucent scrim preserves contrast without offscreen filtering. */
  backdrop-filter:none;-webkit-backdrop-filter:none;
  display:flex;align-items:center;justify-content:center;
  padding:calc(8px + env(safe-area-inset-top,0px)) 10px calc(8px + env(safe-area-inset-bottom,0px));
}
.battle-window {
  display:flex;flex-direction:column;width:min(100%,550px);max-height:100%;
  min-height:0;border:1px solid #bb78ff;border-radius:24px;overflow:hidden;
  color:#fff;background:linear-gradient(155deg,#2b1747,#1d1a43 55%,#121d3a);
  box-shadow:0 0 0 1px #7b5bf54a,0 0 34px #a546ff77,0 30px 90px #000e;
}
.battle-window-head {
  flex-shrink:0;display:grid;grid-template-columns:42px 1fr 42px;align-items:center;
  text-align:center;font-size:calc(19px + 1pt);font-weight:850;min-height:52px;
  background:linear-gradient(90deg,#241c46,#2b2454,#201b42);
  border-bottom:1px solid #9c69ed8a;
}
.battle-window-head strong { font-size:calc(19px + 1pt);letter-spacing:.01em; }
.battle-icon-button {
  background:transparent;border:0;color:#ecf6ff;font-size:calc(22px + 1pt);
  display:grid;place-items:center;min-height:44px;min-width:40px;
  padding:7px;cursor:pointer;
}
.battle-icon-button:focus-visible {outline:2px solid #54d9f8;outline-offset:-4px;}
.battle-window-body {
  padding:12px;overflow:auto;overscroll-behavior:contain;min-height:0;
  scrollbar-width:thin;scrollbar-color:#8b63bf #191535;
}
.battle-window .panel.arena {border:0;box-shadow:none;margin:0;padding:5px 1px 10px;background:none;}
.battle-live .panel-title h2 {font-size:calc(20px + 1pt);font-weight:850;}
.battle-live .pill {background:#273965;border-color:#6683c1;color:#d9e6ff;}
.battle-live .section-caption {font-size:calc(13px + 1pt);margin:0 0 7px;}
.battle-live .arena-fight {
  border-radius:16px;min-height:139px;
  background:radial-gradient(ellipse at 50% 45%,#7741e547,transparent 67%);
  margin:4px 0 10px;padding:7px 3px 5px;align-items:center;
}
.battle-live .fighter .big {
  font-size:calc(68px + 1pt);line-height:1.14;filter:drop-shadow(0 6px 4px #040822) drop-shadow(0 0 11px #8c55d4);
}
.battle-live .fighter strong {font-size:calc(14px + 1pt);font-weight:850;margin-top:3px;}
.battle-live .fighter small {font-size:calc(12px + 1pt);display:block;margin-top:3px;color:#d9c9ff;}
.battle-live .versus {font-size:calc(28px + 1pt);font-weight:950;text-shadow:0 0 12px #cc77ff;}
.battle-live .world-battle-info {font-size:calc(12px + 1pt);background:#354363;border:1px solid #5f679b;padding:9px 12px;margin:9px 0;}
.battle-live .battle-vitals {gap:10px;margin:10px 0 14px;}
.battle-live .battle-vital-group {
  min-height:158px;padding:13px 12px;border-radius:16px;background:#0f2949;
  border:1px solid #42a9fd;box-shadow:inset 0 0 25px #0576c014;
}
.battle-live .battle-vital-group.enemy-vitals {border-color:#c167e9;background:#352044;}
.battle-live .battle-vital-group>strong {font-size:calc(12px + 1pt);color:#d8ecff;margin-bottom:14px;}
.battle-live .battle-vital-group .meter-head {font-size:calc(12px + 1pt);margin:12px 0 6px;}
.battle-live .battle-vital-group .meter-head b {font-size:calc(12px + 1pt);}
.battle-live .battle-vital-group .meter {height:14px;border:1px solid #5a7ca2;border-radius:100px;}
.battle-live .combat-actions {display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:11px;}
.battle-live .combat-actions .btn {
  border-radius:15px;min-height:58px;
  background:linear-gradient(128deg,#303962,#304873);
  border:1px solid #6c88bc;
}
.battle-live .combat-actions .btn.primary {
  background:linear-gradient(125deg,#8554fa,#526bff);border-color:#b4a0ff;
  box-shadow:0 4px 18px #8063ff4a;
}
.battle-live .combat-actions .btn.teal {
  background:linear-gradient(125deg,#235a74,#1d608d);border-color:#4dd2ea;
}
.battle-live .combat-move strong {font-size:calc(12px + 1pt);}
.battle-live .combat-move small,.battle-live .combat-move .move-effect {font-size:calc(10px + 1pt);}
.battle-live .combat-history {
  border:1px solid #527bbb;border-radius:14px;background:#102542;
  margin:12px 0 10px;padding:12px;
}
.battle-live .combat-history>strong {font-size:calc(13px + 1pt);color:#c6e7ff;}
.battle-live .combat-history p {font-size:calc(12px + 1pt);line-height:1.45;}
.battle-live .combat-recovery {margin-top:10px;padding-top:10px;border-top:1px solid #64628c;}
.battle-live .combat-recovery>strong {font-size:calc(13px + 1pt);}
.battle-live .combat-recovery .btn {background:#223c69;border-color:#5779b1;}
.battle-final {text-align:center;}
.battle-final .battle-victory-title {
  font-size:calc(clamp(29px,7vw,43px) + 1pt);line-height:1.25;
  font-weight:950;color:#ffeb9b;text-shadow:0 0 17px #ae56f9;
  letter-spacing:-.025em;margin:8px auto 16px;
}
.battle-xp-box {
  padding:18px 13px 16px;margin:8px 0 15px;border-radius:20px;
  background:linear-gradient(150deg,#29134d,#2f2359);
  border:1px solid #be60f7;box-shadow:inset 0 0 23px #933cf333;
}
.battle-levelup {
  display:inline-block;padding:9px 15px;border-radius:13px;margin-bottom:9px;
  border:1px solid #ffdc68;color:#ffe16d;
  box-shadow:0 0 16px #ffac3f66;background:#6a3064;
  font-size:calc(19px + 1pt);font-weight:950;letter-spacing:.01em;
}
.battle-xp-box h3 {margin:5px 0 17px;font-size:calc(15px + 1pt);}
.battle-xp-head {display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:calc(11px + 1pt);margin-bottom:10px;}
.battle-xp-head strong {white-space:nowrap;}
.battle-xp-head span {color:#69e9b6;font-weight:850;}
.battle-xp-track {
  height:20px;padding:2px;border-radius:30px;background:#0f1639;
  border:1px solid #9473e9;box-shadow:inset 0 2px 8px #0006;
  overflow:hidden;
}
.battle-xp-fill {
  width:0;height:100%;border-radius:30px;
  background:linear-gradient(90deg,#21d6b9,#7effdd);
  box-shadow:0 0 12px #35ffdba6;
}
.battle-xp-counter {font-size:calc(14px + 1pt);font-variant-numeric:tabular-nums;font-weight:750;margin:10px 0 0;}
.battle-final .battle-loot {
  text-align:left;border:1px solid #4cae95;background:#103f39;
  border-radius:20px;padding:17px 14px;margin-top:13px;
}
.battle-final .battle-loot>strong {font-size:calc(21px + 1pt);color:#e9fff7;}
.battle-final .reward-amounts {gap:10px;margin:12px 0 15px;}
.battle-final .reward-amounts>div {background:#203b65;border:1px solid #5674ba;border-radius:14px;padding:15px 5px;}
.battle-final .reward-amounts small {font-size:calc(12px + 1pt);color:#dfebff;font-weight:700;}
.battle-final .reward-amounts strong {font-size:calc(25px + 1pt);color:#58f0c3;}
.battle-result-loot {
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  border:1px solid #79a99c;border-radius:13px;padding:12px 10px;
  color:#e7fbf1;background:#174c46;
}
.battle-result-loot>strong {margin:0;white-space:nowrap;font-size:calc(14px + 1pt);}
.battle-result-loot .reward-list {flex:1;min-width:0;border-left:1px solid #78998f;padding-left:12px;}
.battle-result-loot .reward-list p {font-size:calc(11px + 1pt);margin:0;}
.battle-result-loot .reward-item {padding:5px;}
.battle-result-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:16px 0 0;}
.battle-result-actions .btn {min-height:55px;font-size:calc(13px + 1pt);}
.battle-result-actions .btn:only-child {grid-column:1/-1;}
.battle-result-actions .btn.teal {background:linear-gradient(120deg,#13b7b0,#05a58f);border-color:#62f9d7;}
@media(max-width:390px){
  .battle-overlay {padding:5px;}
  .battle-window {border-radius:17px;}
  .battle-window-body {padding:9px;}
  .battle-live .battle-vitals {gap:6px;}
  .battle-live .battle-vital-group {padding:10px 7px;min-height:155px;}
  .battle-live .battle-vital-group .meter-head {font-size:calc(10px + 1pt);}
  .battle-live .fighter .big {font-size:calc(52px + 1pt);}
  .battle-final .reward-amounts strong {font-size:calc(20px + 1pt);}
  .battle-final .battle-victory-title {font-size:calc(30px + 1pt);}
}

/* Production keeps existing transparent creature sprites and winner banner. */
.battle-live .arena-fight .battle-sprite-stage {width:102px;height:102px;margin:0 auto 5px}
.battle-live .arena-fight .battle-sprite-stage>.digimon-sprite {width:100%;height:100%}
.battle-live .arena-fight .enemy-sprite.battle-sprite {--enemy-size:102px}
.battle-window .battle-final.victory-final {
  padding:0 0 15px;background:linear-gradient(145deg,#301847,#281b4d 63%,#251941);
  border:1px solid #a25de0;border-radius:21px;
}
.battle-window .victory-rewards {margin-top:10px;}
.battle-window .battle-xp-box {margin:12px 14px 10px;}
@media(max-width:390px){
 .battle-live .arena-fight .battle-sprite-stage {width:76px;height:76px}
 .battle-live .arena-fight .enemy-sprite.battle-sprite {--enemy-size:76px}
 .battle-window .battle-xp-box {margin:9px 10px;}
}

/* Victory cannot start another exploration until ten energy is available. */
.victory-final .victory-energy-warning {
  margin:0 16px 13px;padding:11px 13px;text-align:center;
  border:1px solid #dbab5c;border-radius:13px;
  background:#4b3227;color:#ffe6a7;font-size:calc(12px + 1pt);
  font-weight:750;line-height:1.5;
}
.battle-final.victory-final .victory-actions .btn[disabled] {
  cursor:not-allowed;opacity:.5;filter:grayscale(.35);
}
@media(max-width:410px) {
  .victory-final .victory-energy-warning {margin:0 11px 11px;padding:10px 9px;font-size:calc(11px + 1pt);}
}

/* Keep energy-complete notifications visible over an open combat dialog. */
body.battle-open .notice:not([hidden]){z-index:2300}

/* Shared DigiGram music library — compact cooperative boss sound control. */
.dc-music-control {
  display:flex;align-items:center;justify-content:space-between;gap:9px;
  padding:8px 10px;margin:7px 0;
  border:1px solid #715b9a;border-radius:12px;
  background:#211e41;color:#ddcff6;font-size:calc(11px + 1pt);
}
.dc-music-control>span {min-width:0;overflow-wrap:anywhere;line-height:1.3}
.dc-music-control .dc-music-toggle {
  flex:0 0 auto;min-height:34px;padding:5px 9px;
  font-size:calc(11px + 1pt);border-radius:9px;
}
@media (max-width:365px) {
  .dc-music-control {padding:7px 8px;font-size:calc(10px + 1pt)}
  .dc-music-control .dc-music-toggle {padding:4px 7px;font-size:calc(10px + 1pt)}
}


/* DigiDungeon immersive combat panel — shared shell with Explore battle modal.
   Existing lobby/list remain on the regular page; no separate room header
   or music controller is visible while a fight is active. */
.dc-overlay .dc-popup-window {
  width:min(100%,550px);max-height:100%;
  border-color:#6f9bc2;
  background:linear-gradient(155deg,#171d40,#142342 70%,#121c35);
  box-shadow:0 0 0 1px #6ca3db3b,0 14px 44px #000c;
}
.dc-popup-window *{box-sizing:border-box;min-width:0}
.dc-popup-window .battle-window-head {
  background:linear-gradient(115deg,#192848,#25204d);
  border-bottom-color:#5975a7;
}
.dc-popup-window .battle-window-head strong {font-size:calc(17px + 1pt)}
.dc-popup-team-count{font-size:calc(11px + 1pt);color:#c1dcfa;font-weight:750;white-space:nowrap}
.dc-popup-window .battle-window-body {
  padding:10px;scrollbar-color:#7799d0 #121f3d;
}
.dc-popup-window .dc-room {gap:10px}
.dc-popup-window .dc-block{
  padding:11px 12px;border-radius:16px;
}
.dc-popup-window .dc-boss {
  border-color:#a077c2;
  background:linear-gradient(155deg,#362044,#262046 62%,#202a47);
  box-shadow:inset 0 0 22px #9c5ac01c;
}
.dc-popup-window .dc-boss-badge {font-size:calc(11px + 1pt);color:#e2bdf8}
.dc-popup-window .dc-boss-identity {
  justify-content:flex-start;
  gap:14px;
  min-height:128px;
  margin:6px 0;
}
.dc-popup-window .dc-boss-identity .coop-boss-sprite {
  --enemy-size:126px;
  flex:0 0 126px;
  filter:drop-shadow(0 5px 6px #100d27) drop-shadow(0 0 11px #ba63c759);
}
.dc-popup-window .dc-boss-name {display:grid;gap:6px}
.dc-popup-window .dc-boss-identity h4 {
  margin:0;font-size:calc(clamp(16px,4.5vw,21px) + 1pt);
  overflow-wrap:anywhere;
  line-height:1.25;
}
.dc-popup-window .dc-boss-name small {font-size:calc(11px + 1pt);color:#eab8ef}
.dc-popup-window .dc-boss-meter{
  margin:8px 0 6px;font-size:calc(11px + 1pt);align-items:center;
}
.dc-popup-window .dc-boss .meter,
.dc-popup-window .dc-member-vitals .meter {
  height:14px;
  border:1px solid #6783af;
  border-radius:999px;
  background:#0d1c3a;
  overflow:hidden;
  box-shadow:inset 0 2px 5px #030b1f7a;
}
.dc-popup-window .dc-boss .meter .fill.enemy {background:linear-gradient(90deg,#ff7798,#ffb18d)}
.dc-popup-window .dc-member-vitals .meter .fill.hp {background:linear-gradient(90deg,#ff718c,#ffa2a8)}
.dc-popup-window .dc-member-vitals .meter .fill.mp {background:linear-gradient(90deg,#5b9cfa,#5ee4ff)}
.dc-popup-window .dc-boss-progress {
  border-top:1px solid #7d5d97;
  margin-top:14px;
  padding-top:12px;
}
.dc-popup-window .dc-progress-heading{
  display:flex;align-items:center;justify-content:space-between;
  gap:8px;margin-bottom:10px;
  color:#e7ddfa;font-size:calc(11px + 1pt);
}
.dc-popup-window .dc-progress-heading span{color:#d4caeb;font-size:calc(10px + 1pt)}
.dc-popup-window .dc-stage-track {gap:5px}
.dc-popup-window .dc-stage {font-size:calc(10px + 1pt);gap:5px}
.dc-popup-window .dc-stage-marker {
  width:40px;height:40px;border-radius:50%;
  font-weight:850;font-size:calc(14px + 1pt);
}
.dc-popup-window button.dc-stage-marker {
  cursor:pointer;color:#ccffe6;
  box-shadow:0 0 12px #38c59033;
}
.dc-popup-window button.dc-stage-marker:hover,
.dc-popup-window button.dc-stage-marker:focus-visible {
  outline:2px solid #a1f7c9;outline-offset:2px;
}
.dc-popup-window .dc-stage.done{color:#a7f6c8}
.dc-popup-window .dc-stage.done .dc-stage-marker {
  background:#186c4d;border-color:#64e8af;color:#fff;
}
.dc-popup-window .dc-stage small{font-size:calc(9px + 1pt);color:#e6cf88}
.dc-popup-window .dc-round-line {margin-top:9px}
.dc-popup-window .dc-round-clock {font-size:calc(18px + 1pt)}
.dc-popup-window .dc-team {
  border-color:#4f77ac;background:linear-gradient(150deg,#1b3155,#152542);
}
.dc-popup-window .dc-team-list {gap:8px;margin-top:9px}
.dc-popup-window .dc-team-member {
  display:grid;grid-template-columns:minmax(0,1fr);
  align-items:stretch;gap:7px;padding:9px 10px;border-radius:12px;
}
.dc-popup-window .dc-member-name {
  display:flex;align-items:center;justify-content:space-between;gap:6px;
}
.dc-popup-window .dc-member-name strong {font-size:calc(12px + 1pt)}
.dc-popup-window .dc-member-name small {text-align:right;font-size:calc(10px + 1pt)}
.dc-popup-window .dc-member-vitals {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px 10px;text-align:left;white-space:normal;
}
.dc-popup-window .dc-member-vital {min-width:0}
.dc-popup-window .dc-member-vital .meter-head {
  display:flex;align-items:center;justify-content:space-between;
  gap:4px;margin:0 0 5px;font-size:calc(10px + 1pt);
}
.dc-popup-window .dc-member-vital .meter-head span{font-size:calc(10px + 1pt)}
.dc-popup-window .dc-member-vital .meter-head b{
  font-weight:800;color:#eef6ff;font-size:calc(10px + 1pt);font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.dc-popup-window .dc-member-action {grid-column:1/-1;text-align:right;font-size:calc(10px + 1pt)}
.dc-popup-window .dc-actions {
  border-color:#537ab3;background:linear-gradient(160deg,#1b2f4f,#152744);
}
.dc-popup-window .dc-actions .dc-block-top {align-items:center;margin-bottom:8px}
.dc-popup-window .dc-action-grid {gap:8px}
.dc-popup-window .dc-action-grid>.btn,
.dc-popup-window .dc-item-action summary {
  min-height:52px;border-radius:13px;font-size:calc(12px + 1pt);font-weight:750;
}
.dc-popup-window .dc-action-grid>.btn.teal{
  background:linear-gradient(125deg,#6a57e6,#5367fa);
  border-color:#a39afa;
}
.dc-popup-window .dc-action-note {font-size:calc(10px + 1pt);margin:7px 0 0}
.dc-popup-window .dc-round-result {
  border-color:#479c9c;background:linear-gradient(135deg,#153f48,#172d4a);
}
.dc-popup-window .dc-next-minimal {
  background:transparent;border:0;padding:2px 0 4px;
}
.dc-popup-window .dc-next-minimal .btn {min-height:48px;width:100%}
.dc-popup-window .dc-rewards-collapsible summary {
  cursor:pointer;
  display:flex;justify-content:space-between;align-items:center;gap:9px;
  font-size:calc(12px + 1pt);font-weight:800;
}
.dc-popup-window .dc-rewards-collapsible summary span {
  color:#aed4de;font-size:calc(10px + 1pt);font-weight:500;
}
.dc-popup-window .dc-stage-award {
  border-color:#5eac92;background:linear-gradient(140deg,#17483d,#172f42);
}
.dc-popup-window .dc-stage-award h4{color:#b7f9d9;font-size:calc(13px + 1pt)}
.dc-popup-window .dc-stage-award p{font-size:calc(12px + 1pt);line-height:1.45;color:#e6fff2}
.dc-popup-window .dc-stage-award small{display:block;font-size:calc(10px + 1pt);line-height:1.4;color:#a9dbc7}
.dc-stage-award-close {
  background:#275246;border:1px solid #70b79a;color:#ecfff7;
  border-radius:8px;min-width:29px;min-height:29px;cursor:pointer;
}
.dc-popup-window .dc-log{
  margin:0;border:1px solid #54769a;
  background:#192943;
}
.dc-popup-window .dc-log summary{font-size:calc(12px + 1pt);color:#bce5f8}
.dc-popup-window .dc-exit{margin:4px 0 0;min-height:39px}
.dc-dungeon-resume {
  background:linear-gradient(145deg,#1b3657,#162544);
  border:1px solid #678cb8;
  border-radius:14px;padding:16px;display:grid;gap:10px;
}
.dc-dungeon-resume strong{font-size:calc(15px + 1pt);color:#f5f3ff}
.dc-dungeon-resume p{font-size:calc(12px + 1pt);margin:0;color:#bacde7}
.dc-dungeon-resume>.btn {min-height:45px}
@media(max-width:380px){
  .dc-popup-window .battle-window-body{padding:6px}
  .dc-popup-window .dc-block{padding:10px 8px}
  .dc-popup-window .dc-boss-identity{gap:5px;min-height:106px}
  .dc-popup-window .dc-boss-identity .coop-boss-sprite{--enemy-size:100px;flex-basis:100px}
  .dc-popup-window .dc-stage-marker{width:35px;height:35px}
  .dc-popup-window .dc-stage{font-size:calc(9px + 1pt)}
  .dc-popup-window .dc-member-vitals{gap:5px}
  .dc-popup-window .dc-member-vital .meter-head b{font-size:calc(9px + 1pt)}
  .dc-popup-window .dc-actions .btn{font-size:calc(11px + 1pt)}
}
@media(prefers-reduced-motion:reduce){
  .dc-popup-window .dc-boss-identity .coop-boss-sprite {transition:none}
}


/* Compact boss card: preserve danger emphasis but return viewport space
   to team HP/MP and action controls in mobile Telegram. */
.dc-popup-window .dc-room .dc-boss {
  position:relative;
  top:auto;
  z-index:auto;
  padding:9px 10px;
  box-shadow:inset 0 0 20px #9c5ac01c;
}
.dc-popup-window .dc-room{gap:8px}
.dc-popup-window .dc-boss-identity{
  gap:9px;
  min-height:108px;
  margin:4px 0;
}
.dc-popup-window .dc-boss-identity .coop-boss-sprite {
  --enemy-size:108px;
  flex:0 0 108px;
}
.dc-popup-window .dc-boss-name {gap:4px}
.dc-popup-window .dc-boss-identity h4 {
  font-size:calc(clamp(15px,4.2vw,19px) + 1pt);
  line-height:1.2;
}
.dc-popup-window .dc-boss-name small{font-size:calc(10px + 1pt)}
.dc-popup-window .dc-boss-meter{margin:5px 0 5px}
.dc-popup-window .dc-boss-progress{
  margin-top:9px;
  padding-top:9px;
}
.dc-popup-window .dc-progress-heading {margin-bottom:7px}
.dc-popup-window .dc-stage {gap:3px}
.dc-popup-window .dc-stage-marker{width:35px;height:35px;font-size:calc(13px + 1pt)}
.dc-popup-window .dc-stage small {font-size:calc(9px + 1pt)}
.dc-popup-window .dc-round-line{margin-top:6px}
.dc-popup-window .dc-round-clock{font-size:calc(16px + 1pt)}
@media(max-width:380px){
  .dc-popup-window .dc-room .dc-boss {padding:8px}
  .dc-popup-window .dc-boss-identity{
    min-height:94px;
    gap:6px;
  }
  .dc-popup-window .dc-boss-identity .coop-boss-sprite{
    --enemy-size:86px;
    flex-basis:86px;
  }
  .dc-popup-window .dc-stage-marker{
    width:32px;height:32px;font-size:calc(12px + 1pt);
  }
}


/* DigiGram UI readability: centered attribute toggle and roomier starter cards.
   Preserve the existing three-column menu and all gameplay mechanics. */
html{font-size:calc(16px + 1pt)}
.digimon-panel #digimon-attributes>summary{
  list-style:none;display:flex;justify-content:center;align-items:center;
  flex-wrap:wrap;column-gap:10px;row-gap:6px;
  min-height:49px;padding:12px 14px;margin-top:12px;
  background:linear-gradient(115deg,#233a61,#182a51);
  border:1px solid #638ad4;border-radius:13px;
  color:#aeecff;font-weight:800;font-size:calc(15px + 1pt);
  text-align:center;cursor:pointer;overflow-wrap:anywhere;
}
.digimon-panel #digimon-attributes>summary::-webkit-details-marker{display:none}
.digimon-panel #digimon-attributes>summary::before{
  content:"▸";display:inline-block;transition:transform .16s ease;
  font-size:calc(18px + 1pt);flex-shrink:0;
}
.digimon-panel #digimon-attributes[open]>summary::before{transform:rotate(90deg)}
.digimon-panel #digimon-attributes>summary:focus-visible{outline:3px solid #72e2ec;outline-offset:2px}
.starter-choices{gap:16px}
.starter-choice{padding:18px;border-radius:19px}
.starter-choice-head{gap:16px}
.starter-choice-head>div{min-width:0;flex:1}
.starter-choice .starter-sprite-stage,
.starter-choice .starter-sprite{width:90px;height:90px;flex:0 0 90px}
.starter-choice>p{line-height:1.6;margin:15px 0}
.starter-traits{gap:8px;line-height:1.55;margin-bottom:17px}
.starter-choice .btn{min-height:49px}
.digivice-tabs .tab{overflow-wrap:anywhere;line-height:1.4;padding:10px 4px;min-width:0}
.actions>.btn,.gym-row .btn{overflow-wrap:anywhere;line-height:1.4}
@media(max-width:450px){
  .starter-choice{padding:16px}
  .starter-choice .starter-sprite-stage,
  .starter-choice .starter-sprite{width:82px;height:82px;flex:0 0 82px}
}
@media(max-width:360px){
  .starter-choice{padding:15px}
  .starter-choice-head{gap:10px}
  .starter-choice .starter-sprite-stage,
  .starter-choice .starter-sprite{width:74px;height:74px;flex:0 0 74px}
  .digivice-tabs{gap:5px}
  .digivice-tabs .tab{padding:9px 2px;line-height:1.35}
}

/* Overflow protection: distinguish discarded full-stack chests from rewards. */
.dc-chest-limit-warning{margin:9px 0;padding:10px 12px;border:1px solid #c39460;
  border-radius:11px;background:#493326;color:#ffe2a9;line-height:1.55;
  font-size:calc(12px + 1pt);overflow-wrap:anywhere}


/* Ginásio dedicated screen: separate distribution from training. */
.gym-overlay{z-index:2070;background:rgba(3,9,26,.91)}
.gym-popup-window{
  width:min(100%,570px);max-height:100%;border-color:#618ecb;
  background:linear-gradient(160deg,#15264a,#121c39 70%,#11192f);
  box-shadow:0 0 0 1px #64aeef42,0 20px 65px #000c;
}
.gym-popup-window *{min-width:0;box-sizing:border-box}
.gym-popup-window .gym-window-head{
  background:linear-gradient(110deg,#192f57,#222150);
  border-bottom-color:#466ea5;
}
.gym-popup-window .gym-window-head strong{
  display:block;text-align:center;font-size:calc(21px + 1pt);color:#f4f6ff;
}
.gym-popup-window .gym-window-body{
  flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;
  padding:15px;scrollbar-color:#779cdb #101d36;
}
.gym-panel{margin:0;padding:0;display:block}
.gym-popup-window .gym-list{display:grid;gap:12px}
.gym-popup-window .gym-row{
  grid-template-columns:minmax(0,1fr) minmax(110px,34%);
  grid-template-rows:auto auto auto;gap:11px 10px;
  padding:15px 12px;border-radius:16px;background:#172745;
  border:1px solid #4b6697;
}
.gym-popup-window .gym-title{grid-column:1;grid-row:1;display:flex;align-items:center;gap:12px}
.gym-popup-window .gym-title-copy{flex:1;min-width:0}
.gym-popup-window .gym-title strong{font-size:calc(13px + 1pt)}
.gym-popup-window .gym-title small{font-size:calc(10px + 1pt);line-height:1.5;display:block}
.gym-popup-window .gym-line{grid-column:1;grid-row:2;align-self:center}
.gym-popup-window .gym-row .gym-goal{grid-column:1/-1;grid-row:3;padding-top:2px}
.gym-popup-window .gym-row-actions{
  grid-column:2;grid-row:1/3;display:flex;flex-direction:column;
  gap:7px;align-self:center;
}
.gym-popup-window .gym-row-actions .btn{
  grid-row:auto;grid-column:auto;width:100%;min-width:0;max-width:none;
  min-height:48px;padding:9px 5px;font-size:calc(11px + 1pt);
}
@media(max-width:390px){
  .gym-popup-window .gym-window-body{padding:9px}
  .gym-popup-window .gym-row{padding:11px 9px;gap:8px}
  .gym-popup-window .gym-title{gap:8px}
  .gym-popup-window .gym-row-actions .btn{font-size:calc(10px + 1pt)}
}


/* Chest receipt — separate stackable prizes (cap 99) from unlimited implants. */
.chest-result-card{width:min(100%,500px);text-align:center;padding:18px 16px}
.chest-result-card .reward-emblem{font-size:calc(45px + 1pt)}
.chest-result-card .reward-kicker{margin:5px 0 4px}
.chest-result-card>h2{margin:3px 0 8px}
.chest-result-card>.section-caption{line-height:1.45;overflow-wrap:anywhere}
.chest-result-group{
  margin:13px 0;padding:12px;border:1px solid #3f5e8b;
  border-radius:14px;background:linear-gradient(140deg,#182b4c,#132341);
  text-align:left;
}
.chest-result-group h3{margin:0 0 9px;font-size:calc(13px + 1pt)}
.chest-result-group .reward-item{margin:0}
.chest-result-group .reward-item small{display:block;margin-top:5px;
  color:#a8c2e2;font-size:calc(10px + 1pt);line-height:1.45}
.chest-result-group .chest-discarded-item{border-color:#a77b64;background:#422d36}
.chest-discarded-item strong{color:#ffd6a4;white-space:normal;text-align:right}
.chest-discarded-item small{color:#ffe0b9!important}
.chest-result-empty{margin:0;padding:9px 11px;border-radius:9px;
  background:#101e37;color:#aec4db;font-size:calc(11px + 1pt);line-height:1.5}
.chest-implant-note{margin:9px 0 0;color:#9edcd7;line-height:1.5;font-size:calc(10px + 1pt)}
.chest-result-card .reward-confirm{margin:11px 0;color:#9beacb;font-size:calc(11px + 1pt)}
.chest-result-card .btn{min-height:49px}
@media(max-width:390px){
  .chest-result-card{padding:13px 11px}
  .chest-result-group{padding:10px;margin:11px 0}
  .chest-result-group .reward-item{padding:9px}
  .chest-discarded-item strong{font-size:calc(10px + 1pt)}
}


/* Mundo Digital: compact independent Explore window, styled like the approved mockup. */
.world-overlay{z-index:2070;background:rgba(3,9,26,.93)}
.world-popup-window{
  width:min(100%,570px);max-height:100%;border:1px solid #329ce8;
  background:linear-gradient(165deg,#0d1b35,#111e3b 65%,#0b1730);
  box-shadow:0 0 0 1px #22a8f744,0 18px 64px #000c;
}
.world-popup-window *{min-width:0;box-sizing:border-box}
.world-window-head{
  background:linear-gradient(110deg,#142950,#182850);
  border-bottom:1px solid #306eaf;
}
.world-window-head strong{
  text-align:center;color:#e9f6ff;font-size:calc(18px + 1pt);
}
.world-window-body{
  flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;
  padding:12px;scrollbar-width:thin;scrollbar-color:#5499d9 #0e1930;
}
.world-panel{padding:0;margin:0}
.world-banner{
  position:relative;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:8px;text-align:center;
  margin:0 0 14px;padding:15px 12px;
  border:1px solid #159df0;border-radius:20px;
  background:linear-gradient(145deg,#101e3f,#122b55 55%,#0f1b3d);
  box-shadow:inset 0 0 24px #178cc020,0 0 11px #069ce022;
}
.world-banner::before,.world-banner::after{
  content:"";position:absolute;top:51%;width:19%;height:2px;
  background:linear-gradient(90deg,transparent,#36c9ee);
  box-shadow:0 0 9px #2fcff0;
}
.world-banner::before{left:6%}
.world-banner::after{right:6%;transform:rotate(180deg)}
.world-compass{font-size:calc(43px + 1pt);line-height:1.15;display:block}
.world-banner h2{
  margin:0;color:#f0f7ff;font-size:calc(27px + 1pt);
  line-height:1.2;font-weight:900;letter-spacing:.01em;
}
.world-region-list{display:grid;gap:14px;margin:0}
.world-popup-window .world-region{
  margin:0;padding:14px 12px 15px;border:1px solid #159add;
  border-radius:18px;background:linear-gradient(145deg,#102645,#101d38);
  box-shadow:inset 0 0 16px #0e6db216;
}
.world-popup-window .world-region-title{
  display:flex;justify-content:center;align-items:center;flex-wrap:wrap;
  gap:10px;min-height:36px;margin:0 0 13px;padding:0;text-align:center;
  color:#f4f8ff;font-size:calc(18px + 1pt);line-height:1.3;font-weight:850;
}
.world-region-symbol{font-size:calc(26px + 1pt);line-height:1}
.world-popup-window .world-region .region-row{
  display:flex;align-items:center;gap:10px;margin:8px 0 0;
  padding:11px;border:1px solid #48699c;border-radius:13px;
  background:#182a4d;min-height:76px;
}
.world-popup-window .world-region .region-copy{flex:1;min-width:0}
.world-popup-window .world-region .region-copy strong{
  display:block;color:#f3f8ff;font-size:calc(14px + 1pt);
  line-height:1.35;font-weight:800;overflow-wrap:anywhere;
}
.world-popup-window .world-region .region-copy span{
  display:block;margin-top:4px;color:#80defc;
  font-size:calc(12px + 1pt);font-weight:750;line-height:1.3;
}
.world-popup-window .world-region .region-row .btn{
  min-width:102px;min-height:44px;flex-shrink:0;
  padding:9px 12px;font-size:calc(12px + 1pt);
  border:1px solid #2cc6e5;border-radius:13px;
  color:#f5feff;background:linear-gradient(115deg,#0795a3,#1a8eae);
}
.world-popup-window .world-region .region-row .btn:disabled{
  opacity:.5;cursor:not-allowed;background:#23375b;
  border-color:#596c90;
}
.world-launch-panel{text-align:center;padding:14px}
.world-launch-button{width:min(100%,420px);min-height:53px}
@media(max-width:390px){
  .world-overlay{padding:5px}
  .world-window-body{padding:9px}
  .world-banner{padding:12px 8px}
  .world-banner h2{font-size:calc(23px + 1pt)}
  .world-popup-window .world-region{padding:10px 9px 12px}
  .world-popup-window .world-region-title{font-size:calc(16px + 1pt);gap:7px}
  .world-popup-window .world-region .region-row{padding:9px;gap:7px}
  .world-popup-window .world-region .region-row .btn{min-width:85px;padding:8px 6px}
}


/* One readable loot format across combat, dungeons and all chest receipts. */
.reward-list,.loot-results,.loot-received-list,.loot-discarded-list{
  box-sizing:border-box;min-width:0;width:100%;max-width:100%;
}
.reward-list,.loot-received-list,.loot-discarded-list{
  display:grid;grid-template-columns:minmax(0,1fr);gap:7px;
}
.loot-results{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.reward-list>.reward-item{
  box-sizing:border-box;min-width:0;width:100%;max-width:100%;
  display:flex;align-items:center;gap:9px;line-height:1.45;
}
.reward-list>.reward-item>span,.loot-item-description{
  display:block;flex:1 1 auto;min-width:0;
  overflow-wrap:break-word;word-break:normal;hyphens:auto;
}
/* Nome, efeito oficial e quantidade permanecem legíveis em celulares estreitos. */
.reward-list>.reward-item>.loot-item-description>b{
  display:block;font-weight:800;overflow-wrap:anywhere;
}
.reward-list .loot-item-description>.loot-effect{
  display:block;margin-top:5px;color:#b9d6ea;
  font-size:calc(10px + 1pt);font-weight:500;line-height:1.45;
  white-space:normal;overflow-wrap:anywhere;
}
.reward-list .loot-item-discarded .loot-item-description>.loot-effect{color:#ffe3c8}
.reward-list>.reward-item>strong,.loot-item-count{
  flex:0 0 auto;max-width:45%;font-variant-numeric:tabular-nums;
}
.loot-discarded-group{
  box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);
  gap:7px;width:100%;min-width:0;max-width:100%;
  margin-top:4px;padding-top:10px;border-top:1px solid #bd917966;
}
.loot-discarded-group>h3{
  margin:0 0 2px!important;color:#f2d1a7;
  font-size:calc(12px + 1pt);line-height:1.35;font-weight:800;
}
.reward-list>.loot-item-discarded{
  background:#413029;border:1px solid #b88b69;color:#ffe2c1;
}
.loot-item-discarded .loot-item-description>b{
  display:block;font-weight:750;color:#ffe9ca;overflow-wrap:break-word;
}
.loot-item-discarded .loot-item-description>small{
  display:block;margin-top:4px;font-size:calc(10px + 1pt);
  line-height:1.4;font-weight:500;color:#f4cba5;
}
.reward-list>.loot-item-discarded>.loot-item-count{
  flex:0 0 auto;color:#ffdaa9;
  font-size:calc(11px + 1pt);white-space:nowrap;
}
.chest-result-group .loot-discarded-group{
  margin:0;padding:0;border-top:0;
}
.chest-result-group .loot-discarded-group h3{margin:0 0 9px!important}
@media(max-width:440px){
  .reward-list>.reward-item{padding:9px 10px;font-size:calc(11px + 1pt)}
  .reward-list>.loot-item-discarded{
    display:grid;grid-template-columns:minmax(0,1fr);gap:6px;
    align-items:start;
  }
  .reward-list>.loot-item-discarded>.loot-item-count{
    width:max-content;max-width:100%;justify-self:start;
    padding:3px 8px;border-radius:6px;
    background:#69472c;font-size:calc(10px + 1pt);
  }
}


/* DigiDungeons selection refresh: larger, centered titles and legible facts.
   The "create room" action belongs only to the individual Dungeon cards;
   the lone top shortcut opens the join-by-code view. */
.dc-panel .dc-page-heading{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:8px;
  padding:5px 5px 3px;
}
.dc-panel .dc-page-heading .kicker{
  font-size:12px;
  font-weight:800;
  letter-spacing:.11em;
  line-height:1.3;
  color:#9dc6df;
}
.dc-panel .dc-page-heading h2{
  width:100%;
  margin:0;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:30px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:-.025em;
  color:#f3f7ff;
  text-align:center;
}
.dc-panel .dc-heading-icon{font-size:31px;line-height:1}
.dc-panel .dc-page-heading>.dc-muted{
  width:100%;
  max-width:460px;
  margin:2px auto 4px;
  font-size:15px;
  line-height:1.55;
  text-align:center;
  color:#cad9ee;
}
.dc-panel .dc-join-shortcut{
  width:100%;
  margin:1px 0 0;
}
.dc-panel .dc-join-shortcut-button,
.dc-panel .dc-return-to-choices .btn{
  min-height:48px;
  width:100%;
  padding:10px 14px;
  border-radius:13px;
  border:1px solid #5a729d;
  background:#25395f;
  color:#eaf3ff;
  font-size:16px;
  font-weight:800;
  text-align:center;
}
.dc-panel .dc-return-to-choices{width:100%}
.dc-panel .dc-dungeon-card{
  gap:12px;
  padding:17px 14px 16px;
  border-radius:17px;
}
.dc-panel .dc-dungeon-title{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:3px 2px 2px;
  width:100%;
  text-align:center;
}
.dc-panel .dc-dungeon-title h3{
  width:100%;
  margin:0;
  color:#f6f9ff;
  font-size:22px;
  line-height:1.25;
  font-weight:900;
  overflow-wrap:break-word;
  text-align:center;
}
.dc-panel .dc-dungeon-title>.dc-level-range{
  align-self:center;
  padding:5px 11px;
  border:1px solid #5f779d;
  border-radius:999px;
  color:#cde8ff;
  background:#233d62;
  font-size:14px;
  line-height:1.25;
  font-weight:750;
  white-space:nowrap;
}
.dc-panel .dc-facts{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.dc-panel .dc-facts .dc-fact{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:10px 6px;
  min-height:43px;
  border-radius:10px;
  background:#1b2d4b;
  border:1px solid #365078;
  font-size:14px;
  line-height:1.35;
  font-weight:600;
  color:#d8e6fc;
  text-align:center;
  overflow-wrap:break-word;
}
.dc-panel .dc-facts .dc-fact strong{
  color:#f6fbff;
  font-size:15px;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.dc-panel .dc-facts .dc-fact-xp{
  grid-column:1/-1;
  background:#213551;
}
.dc-panel .dc-dungeon-card>.dc-muted{
  margin:0;
  font-size:14px;
  line-height:1.5;
  color:#c5d5ea;
  text-align:center;
}
.dc-panel .dc-dungeon-card>.btn{
  min-height:51px;
  padding:11px 12px;
  font-size:16px;
  font-weight:850;
  border-radius:13px;
}
@media(max-width:390px){
  .dc-panel .dc-page-heading h2{font-size:27px}
  .dc-panel .dc-heading-icon{font-size:28px}
  .dc-panel .dc-page-heading>.dc-muted{font-size:14px}
  .dc-panel .dc-dungeon-card{padding:13px 10px 14px}
  .dc-panel .dc-dungeon-title h3{font-size:20px}
  .dc-panel .dc-dungeon-title>.dc-level-range{font-size:13px}
  .dc-panel .dc-facts .dc-fact{font-size:13px;padding:9px 5px}
  .dc-panel .dc-facts .dc-fact strong{font-size:14px}
  .dc-panel .dc-dungeon-card>.dc-muted{font-size:13px}
}

/* DigiDungeons uses a single independent window, like Mundo Digital.
   Its selection, code-entry, lobby and combat share this scrollable shell. */
.dungeon-window-overlay{
  z-index:2070;
  background:rgba(3,9,26,.93);
}
.dungeon-window{
  width:min(100%,570px);
  max-height:100%;
  border-color:#329ce8;
  background:linear-gradient(165deg,#0d1b35,#111e3b 65%,#0b1730);
  box-shadow:0 0 0 1px #22a8f744,0 18px 64px #000c;
}
.dungeon-window .battle-window-head{
  background:linear-gradient(110deg,#142950,#182850);
  border-bottom-color:#306eaf;
}
.dungeon-window .battle-window-head strong{
  text-align:center;
  color:#e9f6ff;
  font-size:calc(18px + 1pt);
}
.dungeon-window-body{
  flex:1;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:12px;
  scrollbar-width:thin;
  scrollbar-color:#5499d9 #0e1930;
}
.dungeon-window .dc-panel,
.dungeon-window .dungeons-panel{
  width:100%;
  max-width:100%;
  padding:4px 2px 10px;
  margin:0;
  border:0;
  background:transparent;
  box-shadow:none;
}
.dungeon-window .dc-popup-team-count{
  text-align:center;
  min-width:38px;
}
.dungeon-launch-panel{
  display:grid;
  gap:13px;
  padding:14px;
  text-align:center;
}
.dungeon-launch-button{
  width:min(100%,420px);
  min-height:53px;
  justify-self:center;
}
.dungeon-launch-panel .dc-dungeon-resume{
  text-align:left;
  width:100%;
}
@media(max-width:390px){
  .dungeon-window-overlay{padding:5px}
  .dungeon-window-body{padding:9px}
  .dungeon-window .dc-panel{padding:3px 0 9px}
  .dungeon-window .dc-page-heading h2{font-size:27px}
}


/* Quadro de Tasks: tela independente com cartões e fontes legíveis no celular. */
.tasks-window-overlay{
  z-index:2070;
  background:rgba(3,9,26,.93);
}
.tasks-popup-window{
  width:min(100%,620px);
  max-height:100%;
  border-color:#6971c9;
  background:linear-gradient(165deg,#101a39,#172143 65%,#0f1934);
  box-shadow:0 0 0 1px #8871ec48,0 18px 64px #000c;
}
.tasks-popup-window *{box-sizing:border-box;min-width:0}
.tasks-window-head{
  background:linear-gradient(110deg,#1b2851,#252b56);
  border-bottom-color:#626db3;
}
.tasks-window-head strong{
  text-align:center;
  color:#f1efff;
  font-size:calc(19px + 1pt);
}
.tasks-window-body{
  flex:1;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:14px;
  scrollbar-width:thin;
  scrollbar-color:#7a7dd2 #131e3d;
}
.tasks-window-body .tasks-panel{
  width:100%;
  max-width:100%;
  padding:4px 3px 18px;
  margin:0;
  border:0;
  background:transparent;
  box-shadow:none;
}
.tasks-window-body .tasks-panel>h2{
  margin:7px 0 18px;
  text-align:center;
  font-size:calc(27px + 1pt);
  line-height:1.25;
}
.tasks-window-body .task-section{
  gap:13px;
  margin:16px 0 23px;
}
.tasks-window-body .task-section h3{
  font-size:calc(18px + 1pt);
  margin:0 0 4px;
}
.tasks-window-body .task-card{
  padding:17px 16px;
  min-height:155px;
  border-radius:16px;
  border-color:#506696;
  background:#1b2c4e;
}
.tasks-window-body .task-card.task-claimed{opacity:.87}
.tasks-window-body .task-card-head{
  align-items:center;
  flex-wrap:wrap;
  gap:8px 12px;
}
.tasks-window-body .task-card-head strong{
  font-size:calc(16px + 1pt);
  line-height:1.4;
}
.tasks-window-body .task-card-head span{
  font-size:calc(12px + 1pt);
  line-height:1.35;
  white-space:normal;
  text-align:right;
}
.tasks-window-body .task-card>small{
  font-size:calc(14px + 1pt);
  line-height:1.45;
  margin:10px 0 12px;
}
.tasks-window-body .task-meter{
  height:11px;
  margin:0 0 14px;
}
.tasks-window-body .task-footer{
  gap:11px;
  flex-wrap:wrap;
}
.tasks-window-body .task-footer span{
  font-size:calc(13px + 1pt);
  line-height:1.4;
}
.tasks-window-body .task-footer .btn{
  min-height:43px;
  min-width:112px;
  padding:9px 13px;
  font-size:calc(13px + 1pt);
  margin-left:auto;
}
.tasks-launch-panel{
  display:grid;
  padding:14px;
  text-align:center;
}
.tasks-launch-button{
  width:min(100%,420px);
  min-height:53px;
  justify-self:center;
}
@media(max-width:390px){
  .tasks-window-overlay{padding:5px}
  .tasks-window-body{padding:9px}
  .tasks-window-body .tasks-panel{padding:3px 1px 14px}
  .tasks-window-body .tasks-panel>h2{font-size:calc(24px + 1pt)}
  .tasks-window-body .task-section h3{font-size:calc(17px + 1pt)}
  .tasks-window-body .task-card{padding:15px 12px;min-height:150px}
  .tasks-window-body .task-card-head strong{font-size:calc(15px + 1pt)}
  .tasks-window-body .task-card-head span{font-size:calc(11px + 1pt)}
  .tasks-window-body .task-card>small{font-size:calc(13px + 1pt)}
  .tasks-window-body .task-footer span{font-size:calc(12px + 1pt)}
  .tasks-window-body .task-footer .btn{font-size:calc(12px + 1pt)}
}

/* DigiGram Mochila V1: filtros locais, grid mobile 2 colunas e implantes na mochila. */
.inventory-panel{min-width:0;overflow:hidden}
.inventory-panel .inventory-heading{
  display:flex;align-items:flex-start;justify-content:space-between;gap:10px;
  margin:0 0 15px;flex-wrap:wrap
}
.inventory-heading h2{
  font-size:25px;line-height:1.2;letter-spacing:.01em;margin:0;color:#f1f7ff
}
.inventory-heading h2 small{
  display:block;font-size:14px;color:#a7b9dd;font-weight:600;margin-top:3px
}
.inventory-heading .inventory-summary{
  flex:none;border:1px solid #4097b0;background:#142c48;
  color:#b7e7f6;font-size:14px;font-weight:750;
  padding:8px 10px;border-radius:11px
}
.inventory-filters{
  display:flex;gap:7px;overflow-x:auto;overflow-y:hidden;
  padding:1px 0 10px;margin:0 0 8px;scrollbar-width:thin;
  scrollbar-color:#597dc3 #111c39;overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch
}
.inventory-filter-btn{
  flex:0 0 auto;border:1px solid #4a628d;border-radius:11px;
  background:linear-gradient(145deg,#213455,#17243f);color:#e0edff;
  min-height:47px;padding:9px 12px;white-space:nowrap;
  font:inherit;font-size:15px;font-weight:780;cursor:pointer
}
.inventory-filter-btn.on{
  color:#fff;border-color:#50d8fd;
  background:linear-gradient(145deg,#087eaa,#174d8a);
  box-shadow:inset 0 0 0 1px #88e4ff66,0 0 12px #1baddb33
}
.inventory-filter-btn:focus-visible,
.inventory-tools :is(input,select):focus-visible{
  outline:2px solid #54e0ff;outline-offset:2px
}
.inventory-tools{
  display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.9fr);
  gap:9px;margin:4px 0 13px
}
.inventory-tools label{
  display:flex;flex-direction:column;gap:5px;min-width:0;
  color:#b8cbed;font-size:14px;font-weight:700
}
.inventory-tools input,.inventory-tools select{
  width:100%;min-width:0;max-width:100%;min-height:45px;
  border:1px solid #56709b;border-radius:11px;
  padding:9px 10px;background:#0f1e3a;color:#f4f8ff;
  font-size:16px;font-family:inherit
}
.inventory-tools input::placeholder{color:#9fb4d3}
.inventory-panel .inventory-entries{
  margin:0 0 13px;padding:11px 12px;font-size:15px;line-height:1.4
}
.inventory-match-count{
  display:block;color:#b7cae6;font-size:14px;font-weight:700;
  margin:3px 0 10px
}
.inventory-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;align-items:stretch
}
.inventory-item-card{
  min-width:0;display:flex;flex-direction:column;align-items:stretch;
  padding:13px 11px 12px;min-height:184px;
  border:1px solid #44618b;border-radius:15px;
  background:linear-gradient(160deg,#1b3153,#14213e);
  box-shadow:0 5px 15px #030b1b22
}
.inventory-item-top{
  display:flex;align-items:flex-start;justify-content:space-between;
  gap:5px;flex-wrap:wrap;min-width:0
}
.inventory-item-top>strong{
  color:#f1f6ff;font-size:16px;font-weight:850;line-height:1.3;
  overflow-wrap:anywhere;min-width:0;flex:1 1 94px
}
.inventory-quantity{
  display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 auto;font-size:14px;font-weight:800;color:#e1f6ff;
  background:#263e62;border-radius:8px;border:1px solid #53749c;
  padding:2px 7px
}
.inventory-item-description,.inventory-implant-meta,.inventory-implant-bonuses{
  color:#c1d0e9;font-size:15px;line-height:1.45;
  margin:8px 0;overflow-wrap:anywhere
}
.inventory-item-description{flex:1}
.inventory-use-note{
  display:block;color:#b1d8ed;font-size:13px;line-height:1.35;
  margin:0 0 8px;overflow-wrap:anywhere
}
.inventory-item-button{
  display:block;width:100%;min-width:0;min-height:44px;
  margin-top:auto;padding:9px 7px;white-space:normal;
  line-height:1.25;font-size:15px;font-weight:800
}
.inventory-item-button:disabled{opacity:.48}
.inventory-implants-section{
  margin-top:20px;padding-top:15px;border-top:1px solid #52639a
}
.inventory-implant-heading{
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;flex-wrap:wrap;margin:0 0 12px
}
.inventory-implant-heading h3{
  font-size:19px;font-weight:850;color:#e2d1ff;margin:0
}
.inventory-implant-heading h3 span{color:#bcb5fa}
.inventory-implant-heading .btn{min-height:40px;font-size:14px}
.inventory-implant-card{
  border-color:var(--implant-color,#6976b4);
  background:linear-gradient(155deg,#1a284e,#171e3d);
  box-shadow:inset 0 0 12px #586bd316
}
.inventory-implant-card .inventory-item-top>strong{
  font-size:15px
}
.inventory-implant-rarity{
  flex:0 0 auto;font-size:13px;font-weight:900;
  color:var(--implant-color,#b4d9ef);
  border:1px solid currentColor;border-radius:8px;padding:2px 6px
}
.inventory-implant-meta{
  font-size:13px;margin:8px 0 4px
}
.inventory-implant-bonuses{
  font-size:14px;color:#d7e9ff;flex:1;margin:4px 0 8px
}
.inventory-implant-status{
  display:block;font-size:13px;color:#b2e1c9;margin:0 0 9px
}
.inventory-implant-empty,.inventory-empty{
  grid-column:1/-1;padding:17px 12px;text-align:center;
  color:#b9cde6;border:1px dashed #4d6491;border-radius:13px;
  background:#142341;font-size:15px;line-height:1.55;margin:0
}
.inventory-implant-empty{margin:0}
.inventory-pager{
  display:flex;justify-content:center;align-items:center;gap:12px;
  margin:17px 0 6px;color:#d1def3;font-size:15px;font-weight:750
}
.inventory-pager .btn{
  width:47px;min-width:47px;min-height:45px;padding:7px;font-size:23px
}
.inventory-battle-note{margin-top:14px;font-size:14px}
@media(max-width:390px){
  .inventory-panel{padding:12px 10px}
  .inventory-heading h2{font-size:23px}
  .inventory-heading .inventory-summary{font-size:12px;padding:7px 8px}
  .inventory-filters{gap:6px}
  .inventory-filter-btn{font-size:14px;padding:9px 11px;min-height:44px}
  .inventory-tools{grid-template-columns:minmax(0,1fr)}
  .inventory-grid{gap:8px}
  .inventory-item-card{padding:10px 8px;min-height:179px;border-radius:13px}
  .inventory-item-top>strong{font-size:15px}
  .inventory-quantity{font-size:13px}
  .inventory-item-description{font-size:14px}
  .inventory-use-note{font-size:12px}
  .inventory-item-button{font-size:14px;min-height:43px}
  .inventory-implant-heading h3{font-size:17px}
  .inventory-implant-card .inventory-item-top>strong{font-size:14px}
  .inventory-implant-meta{font-size:12px}
  .inventory-implant-bonuses{font-size:13px}
  .inventory-implant-status{font-size:12px}
}


/* DigiMarket V1.1: standalone store and inventory-style selling filters. */
.market-window-overlay{
  z-index:2070;
  background:rgba(3,9,26,.93);
}
.market-popup-window{
  width:min(100%,620px);
  max-height:100%;
  min-height:0;
  border-color:#4699cb;
  background:linear-gradient(155deg,#111c3c,#122041 65%,#0e1936);
  box-shadow:0 0 0 1px #289fcc55,0 18px 64px #000b;
}
.market-popup-window *{box-sizing:border-box;min-width:0}
.market-window-head{
  background:linear-gradient(105deg,#182c55,#202c56);
  border-bottom-color:#4c87b6;
}
.market-window-head strong{
  text-align:center;
  color:#eef8ff;
  font-size:calc(19px + 1pt);
}
.market-window-body{
  flex:1;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:13px;
  scrollbar-width:thin;
  scrollbar-color:#619ed2 #12203a;
}
.market-window-body .shop-panel{
  width:100%;
  max-width:100%;
  margin:0;
  padding:5px 2px 15px;
  border:0;
  background:transparent;
  box-shadow:none;
}
.market-window-body .shop-panel>h2{
  margin:7px 0 15px;
  text-align:center;
  font-size:calc(27px + 1pt);
}
.market-window-body .shop-panel>.section-caption{
  color:#c2d0e9;
  font-size:calc(13px + 1pt);
  line-height:1.45;
}
.market-window-body .shop-line{
  padding:14px 12px;
  margin-bottom:11px;
  border-radius:15px;
}
.market-window-body .shop-line-main{gap:11px}
.market-window-body .shop-line-main .region-copy strong{
  font-size:calc(15px + 1pt);
  line-height:1.4;
}
.market-window-body .shop-line-main .region-copy span{
  font-size:calc(12px + 1pt);
  line-height:1.45;
}
.market-window-body .market-item-effect{
  margin:8px 0 0;
  color:#c7dff3;
  font-size:calc(12px + 1pt);
  line-height:1.5;
  overflow-wrap:anywhere;
}
.market-window-body .shop-line-main .btn{
  min-height:45px;
  flex-shrink:0;
  font-size:calc(12px + 1pt);
  padding:9px 11px;
  white-space:normal;
}
.market-window-body .market-mode-toggle .market-mode{
  min-height:49px;
  font-size:calc(14px + 1pt);
  font-weight:800;
}
.market-launch-panel{
  display:grid;
  gap:12px;
  padding:14px;
  text-align:center;
}
.market-launch-button{
  width:min(100%,420px);
  min-height:53px;
  justify-self:center;
}
.market-sale-tools{display:grid;gap:9px;margin:13px 0 9px}
.market-sale-filters{
  display:flex;
  gap:7px;
  padding:1px 0 8px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  scrollbar-color:#6585c6 #132343;
}
.market-sale-filter-btn{
  flex:0 0 auto;
  border:1px solid #4a628d;
  border-radius:11px;
  background:linear-gradient(145deg,#203452,#17233e);
  color:#e2ecff;
  min-height:44px;
  padding:8px 12px;
  white-space:nowrap;
  font:inherit;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
}
.market-sale-filter-btn.on{
  border-color:#51d7f9;
  color:#fff;
  background:linear-gradient(145deg,#077b9f,#194d87);
  box-shadow:inset 0 0 0 1px #83dbff66,0 0 10px #1da6db33;
}
.market-sale-inputs{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(0,.85fr);
  gap:9px;
}
.market-sale-inputs label{
  display:grid;
  gap:5px;
  min-width:0;
  font-size:14px;
  font-weight:750;
  color:#c2d4ef;
}
.market-sale-inputs :is(input,select){
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:44px;
  border:1px solid #58759f;
  border-radius:10px;
  background:#0e1d38;
  color:#f4f8ff;
  padding:9px 10px;
  font-size:16px;
  font-family:inherit;
}
.market-sale-inputs input::placeholder{color:#99b2d6}
.market-sale-filter-btn:focus-visible,
.market-sale-inputs :is(input,select):focus-visible{
  outline:2px solid #54dcf6;
  outline-offset:2px;
}
.market-sale-matches{
  margin:6px 0 12px;
  font-size:14px;
  font-weight:700;
  color:#b7cce8;
}
.market-sale-filter-empty{
  margin:10px 0;
  padding:14px 12px;
  border:1px dashed #526d9a;
  border-radius:12px;
  background:#162541;
  color:#c1d8f0;
  font-size:15px;
  line-height:1.4;
}
.market-sale-filter-empty[hidden],
.market-window-body .sell-line[hidden],
.market-window-body .implant-sale[hidden],
.market-window-body .implant-inventory[hidden]{
  display:none!important;
}
.market-window-body .sell-panel .shop-line{
  display:block;
}
.market-window-body .sell-panel .shop-line[hidden]{
  display:none!important;
}
.market-window-body .implant-inventory h3{
  font-size:calc(16px + 1pt);
  line-height:1.3;
}
.market-window-body .implant-inventory .implant-sale .region-copy strong{
  font-size:calc(14px + 1pt);
}
@media(max-width:390px){
  .market-window-overlay{padding:5px}
  .market-window-body{padding:9px}
  .market-window-body .shop-panel{padding:3px 1px 12px}
  .market-window-body .shop-panel>h2{font-size:calc(24px + 1pt)}
  .market-window-body .shop-line{padding:12px 9px}
  .market-window-body .shop-line-main{gap:7px}
  .market-window-body .shop-line-main .region-copy strong{font-size:calc(14px + 1pt)}
  .market-window-body .shop-line-main .btn{font-size:calc(11px + 1pt);padding:8px}
  .market-window-body .market-item-effect{font-size:calc(11px + 1pt)}
  .market-sale-inputs{grid-template-columns:minmax(0,1fr)}
}


/* Digievolução: janela independente, quadro centralizado e cartões legíveis. */
.evolution-window-overlay{
  z-index:2070;
  background:rgba(3,9,26,.93);
}
.evolution-popup-window{
  width:min(100%,620px);
  max-height:100%;
  min-height:0;
  border-color:#8f78dd;
  background:linear-gradient(160deg,#141d40,#171b3d 65%,#10182f);
  box-shadow:0 0 0 1px #9e7ff144,0 18px 64px #000c;
}
.evolution-popup-window *{box-sizing:border-box;min-width:0}
.evolution-window-head{
  background:linear-gradient(105deg,#242b56,#2e2759);
  border-bottom-color:#7563bc;
}
.evolution-window-head strong{
  text-align:center;
  color:#f4edff;
  font-size:calc(18px + 1pt);
}
.evolution-window-body{
  flex:1;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:15px;
  scrollbar-width:thin;
  scrollbar-color:#9d80db #17203a;
}
.evolution-window-body .evolution-panel{
  width:100%;
  max-width:100%;
  margin:0;
  padding:5px 3px 20px;
  border:0;
  background:transparent;
  box-shadow:none;
}
.evolution-window-body .evolution-panel>h2{
  font-size:calc(26px + 1pt);
  line-height:1.25;
  font-weight:900;
  color:#f5f3ff;
  text-align:center;
  margin:6px 0 18px;
}
.evolution-window-body .evolution-list{
  display:grid;
  gap:15px;
  margin-top:12px;
}
.evolution-window-body .evolution-card{
  border-radius:17px;
  padding:18px 15px;
  min-height:156px;
  border-color:#596694;
  background:linear-gradient(145deg,#1d2b53,#16213f);
}
.evolution-window-body .evolution-card.ready{
  border-color:#4fa99a;
  background:linear-gradient(145deg,#1a3b4c,#182440);
}
.evolution-window-body .evolution-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
}
.evolution-window-body .evolution-target{
  flex:1 1 185px;
  display:flex;
  align-items:center;
  gap:13px;
}
.evolution-window-body .evolution-target .evolution-sprite,
.evolution-window-body .evolution-target .evolution-sprite-stage{
  width:76px;
  height:76px;
  flex:0 0 76px;
}
.evolution-window-body .evolution-top strong{
  font-size:calc(17px + 1pt);
  font-weight:900;
  line-height:1.3;
  overflow-wrap:anywhere;
}
.evolution-window-body .evolution-top small{
  margin-top:5px;
  font-size:calc(13px + 1pt);
  line-height:1.4;
  color:#c4d2ed;
}
.evolution-window-body .evolution-top .btn{
  flex:0 0 auto;
  min-width:116px;
  min-height:49px;
  padding:10px 14px;
  font-size:calc(14px + 1pt);
  font-weight:850;
  white-space:normal;
}
.evolution-window-body .evolution-checks{
  gap:10px;
  margin-top:16px;
}
.evolution-window-body .evolution-check{
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  border:1px solid #3d527b;
  border-radius:11px;
  padding:11px 12px;
  background:#14223f;
  font-size:calc(13px + 1pt);
  line-height:1.45;
  font-weight:750;
}
.evolution-window-body .evolution-check.met{
  border-color:#317a71;
  background:#173a43;
}
.evolution-window-body .evolution-check span{
  flex:1 1 135px;
  overflow-wrap:anywhere;
}
.evolution-window-body .evolution-check b{
  margin-left:auto;
  font-size:calc(13px + 1pt);
  font-variant-numeric:tabular-nums;
  color:#f8f9ff;
}
.evolution-window-body .evolution-checks .section-caption{
  font-size:calc(12px + 1pt);
  line-height:1.5;
}
.evolution-window-body .evolution-details{
  margin-top:14px;
  padding:12px 10px;
  border-radius:11px;
  border:1px solid #425785;
  background:#162747;
}
.evolution-window-body .evolution-details summary{
  font-size:calc(13px + 1pt);
  line-height:1.5;
}
.evolution-window-body .temporary-combat-note{
  font-size:calc(13px + 1pt);
  line-height:1.5;
  padding:12px;
  margin:10px 0 14px;
}
.evolution-launch-panel{
  display:grid;
  gap:12px;
  padding:14px;
  text-align:center;
}
.evolution-launch-button{
  width:min(100%,420px);
  min-height:53px;
  justify-self:center;
  font-size:calc(13px + 1pt);
}
.digivice-tabs .tab[data-tab="evolve"]{
  overflow-wrap:break-word;
  white-space:normal;
  padding-inline:3px;
  min-height:50px;
}
@media(max-width:390px){
  .evolution-window-overlay{padding:5px}
  .evolution-window-body{padding:9px}
  .evolution-window-body .evolution-panel{padding:4px 1px 16px}
  .evolution-window-body .evolution-panel>h2{font-size:calc(24px + 1pt)}
  .evolution-window-body .evolution-card{padding:15px 11px;min-height:148px}
  .evolution-window-body .evolution-target{flex-basis:150px;gap:8px}
  .evolution-window-body .evolution-target .evolution-sprite,
  .evolution-window-body .evolution-target .evolution-sprite-stage{
    width:62px;height:62px;flex-basis:62px
  }
  .evolution-window-body .evolution-top strong{font-size:calc(15px + 1pt)}
  .evolution-window-body .evolution-top small{font-size:calc(12px + 1pt)}
  .evolution-window-body .evolution-top .btn{
    min-width:104px;min-height:47px;
    padding:9px 10px;font-size:calc(13px + 1pt)
  }
  .evolution-window-body .evolution-check{
    padding:10px 9px;font-size:calc(12px + 1pt)
  }
  .evolution-window-body .evolution-check b{font-size:calc(12px + 1pt)}
}
@media(max-width:340px){
  .evolution-window-body .evolution-target{flex-basis:100%;gap:11px}
  .evolution-window-body .evolution-top .btn{width:100%}
  .evolution-window-body .evolution-check span{flex-basis:100%}
}

/* Usable recovery items: visible effects during normal and cooperative combat.
   Full-width rows keep long official descriptions legible in Telegram WebView. */
.combat-recovery .actions{grid-template-columns:minmax(0,1fr)}
.combat-recovery .btn.combat-consumable,
.dc-item-options>.btn.combat-consumable{
  box-sizing:border-box;display:flex;flex-direction:column;
  align-items:stretch;justify-content:center;gap:5px;
  min-width:0;width:100%;min-height:76px;padding:11px 13px;
  text-align:left;white-space:normal;overflow-wrap:anywhere;line-height:1.4;
}
.combat-consumable-name{
  display:flex;justify-content:space-between;align-items:baseline;
  flex-wrap:wrap;gap:5px 10px;min-width:0;
}
.combat-consumable-name>strong{
  font-size:calc(12px + 1pt);font-weight:800;line-height:1.35;overflow-wrap:anywhere;
}
.combat-consumable-name>b{
  flex:0 0 auto;white-space:nowrap;color:#ffe3a6;
  font-size:calc(12px + 1pt);font-variant-numeric:tabular-nums;
}
.combat-consumable-description{
  display:block;color:#c4d7f0;font-size:calc(10px + 1pt);
  line-height:1.5;font-weight:500;white-space:normal;overflow-wrap:anywhere;
}
.combat-consumable-restriction{
  display:block;color:#ffceaa;font-size:calc(10px + 1pt);
  line-height:1.4;font-weight:600;overflow-wrap:anywhere;
}
.combat-recovery .btn.combat-consumable:disabled,
.dc-item-options>.btn.combat-consumable:disabled{opacity:.8}

/* Hybrid co-op combat: compact, non-interactive status indicators. */
.dc-status-strip{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 10px;min-width:0}
.dc-status-tag{display:inline-flex;max-width:100%;align-items:center;
  padding:5px 8px;border:1px solid #6582a9;border-radius:9px;
  background:#1c3455;color:#e4f1ff;font-size:calc(10px + 1pt);
  line-height:1.35;font-weight:700;overflow-wrap:anywhere}
.dc-actions>.dc-status-strip{margin:0 0 10px}

/* Owner-approved evolution art: all 9 use the SAME rectangular full-frame
   presentation. Original scenery is retained; no circular mask/crop/background.
   Base partner portraits and enemy/boss sprites remain unchanged. */
.digimon-sprite-stage.hd-evolution-reuse{
  overflow:visible;border-radius:0;clip-path:none;background:none;
}
.digimon-sprite-stage.hd-evolution-reuse::after{display:none}
.digimon-sprite-stage.hd-evolution-reuse>.digimon-sprite{
  display:block;width:100%;height:100%;max-width:100%;max-height:100%;
  object-fit:contain;object-position:center center;image-rendering:auto;
  border-radius:0;clip-path:none;
}

/* Approved evolution frames V4: the SAME size, corner radius and border as
   base Agumon (red), Gabumon (blue), and Patamon (yellow) in all screens.
   Earlier transparent HD art had no frame. Full user-uploaded scenes are
   centered with contain, never distorted or cropped to fill portrait slots. */
.digimon-sprite-stage.hd-evolution-reuse.starter-portrait-reuse{
  overflow:hidden;
  clip-path:none;
  border:2px solid var(--portrait-ring);
  border-radius:13px;
}
.digimon-sprite-stage.hd-evolution-reuse.starter-portrait-reuse>.digimon-sprite{
  display:block;width:100%;height:100%;min-width:0;min-height:0;
  object-fit:contain;object-position:center center;
  border-radius:0;clip-path:none;image-rendering:auto;
  filter:none;
}

/* DigiDungeon: a equipe e os controles de combate compartilham um cartão. */
.dc-popup-window .dc-team-actions>.dc-team-main-heading,
.dc-popup-window .dc-team-actions .dc-actions-heading,
.dc-popup-window .dc-round-result>.dc-block-top{
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:4px;
  text-align:center;
}
.dc-popup-window .dc-team-actions .dc-actions{
  margin-top:14px;
  padding:14px 0 0;
  border:0;
  border-top:1px solid #43658b;
  border-radius:0;
  background:transparent;
}
.dc-popup-window .dc-team-actions .dc-actions-heading>span{
  text-align:center;
}
.dc-popup-window .dc-round-result p{
  text-align:center;
  overflow-wrap:anywhere;
}
/* Confirmação de abandono sobre a janela, sem deslocar o combate. */
.dc-leave-backdrop{
  position:fixed;
  inset:0;
  z-index:2100;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(4,9,24,.88);
}
.dc-leave-dialog{
  box-sizing:border-box;
  width:min(100%,410px);
  border:1px solid #7fa7d1;
  border-radius:20px;
  padding:24px 18px 18px;
  color:#eef6ff;
  background:linear-gradient(155deg,#1d3154,#172443 70%,#1b203d);
  box-shadow:0 20px 65px #000b;
  text-align:center;
}
.dc-leave-icon{display:block;font-size:32px;line-height:1.2}
.dc-leave-dialog h3{
  margin:10px 0;
  font-size:20px;
  line-height:1.35;
}
.dc-leave-dialog p{
  margin:0;
  color:#c4d7ed;
  font-size:14px;
  line-height:1.55;
}
.dc-leave-controls{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin-top:20px;
}
.dc-leave-controls .btn{
  width:100%;
  min-height:49px;
  padding:10px 9px;
  font-size:13px;
  font-weight:750;
  line-height:1.3;
  text-align:center;
}
.dc-leave-controls .dc-leave-danger{
  border-color:#d78b9c;
  background:linear-gradient(135deg,#8c3658,#642c4b);
  color:#fff;
}
@media(max-width:380px){
  .dc-leave-controls{grid-template-columns:1fr}
}


/* DigiGram Explorar: último evento do combate, integrado à rolagem da janela. */
.explore-battle-v1 .duel-log {
  margin:12px 0 14px;
  padding:12px 13px 10px;
  border:1px solid #7965c5;
  border-radius:16px;
  background:linear-gradient(150deg,#1a2445,#151e39 78%);
  box-shadow:inset 0 0 18px #7e57bd16,0 0 10px #7e57bd1a;
  min-width:0;
}
.duel-log-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.duel-log-head strong {
  font-size:15px;
  line-height:1.3;
  color:#f0eaff;
}
.duel-log-head>span {
  font-size:11px;
  line-height:1.2;
  font-weight:750;
  white-space:nowrap;
  color:#bdaaff;
  background:#31275c;
  border:1px solid #625397;
  border-radius:99px;
  padding:5px 9px;
}
.duel-log-location {
  display:block;
  margin:5px 0 8px;
  color:#aebfdd;
  font-size:11px;
  line-height:1.35;
  overflow-wrap:anywhere;
}
.duel-log-events {
  min-height:46px;
  height:auto;
  max-height:none;
  overflow:visible;
  overscroll-behavior:auto;
  touch-action:auto;
}
.duel-log-event {
  display:grid;
  grid-template-columns:24px minmax(0,1fr);
  gap:7px;
  align-items:start;
  padding:8px 6px 8px 2px;
  border-top:1px solid #384466;
  border-radius:7px;
  min-width:0;
}
.duel-log-event.latest {
  background:#4b3c802e;
}
.duel-log-icon {
  display:block;
  font-size:18px;
  line-height:1.3;
  text-align:center;
}
.duel-log-copy {
  min-width:0;
  color:#e1e8f9;
  font-size:13px;
  line-height:1.44;
  overflow-wrap:anywhere;
}
.duel-log-copy>small {
  display:block;
  font-size:10px;
  font-weight:800;
  letter-spacing:.045em;
  color:#a4b4de;
  margin-bottom:2px;
}
.duel-log-event.latest .duel-log-copy {color:#fff}
.duel-log-enemy .duel-log-copy {color:#ffd5dc}
.duel-log-heal .duel-log-copy {color:#b5f4d5}
.duel-log-reward .duel-log-copy {color:#ffe39a}
.duel-log-status .duel-log-copy {color:#d9d3ff}
.duel-value-damage {font-weight:900;color:#ff788a;font-variant-numeric:tabular-nums}
.duel-value-heal {font-weight:900;color:#66e9b2;font-variant-numeric:tabular-nums}
.duel-log-empty {font-size:12px;color:#b6c7e6;margin:9px 0}
@media(max-width:380px){
  .explore-battle-v1 .duel-log {padding:10px}
  .duel-log-copy {font-size:12px}
  .duel-log-event {grid-template-columns:22px minmax(0,1fr);gap:5px}
}
