/* InazumArcade v289 · targeted release fixes */
#screen-career .career-dashboard-bottom:has(.career-bracket-panel-compact){grid-template-columns:1fr!important;margin-top:6px!important}
#screen-career .career-bracket-panel-compact{width:100%!important;min-width:0!important;padding:10px 12px!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;overflow:visible!important}
#screen-career .career-bracket-compact-head{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0}
#screen-career .career-bracket-compact-head>div{min-width:0}
#screen-career .career-bracket-compact-head>b{flex:0 1 auto;max-width:38%;padding:6px 10px;border-radius:9px;border:1px solid rgba(255,216,76,.35);background:rgba(255,216,76,.07);color:#ffe077;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#screen-career .career-bracket-compact-body{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;min-width:0}
#screen-career .career-bracket-compact-progress{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;min-width:0}
#screen-career .career-bracket-compact-progress span{display:flex;align-items:center;gap:7px;min-width:0;padding:6px 8px;border-radius:8px;border:1px solid rgba(117,193,255,.18);background:rgba(7,24,40,.68);color:#8daabc;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.05em}
#screen-career .career-bracket-compact-progress span i{width:20px;height:20px;display:grid;place-items:center;flex:0 0 20px;border-radius:50%;background:rgba(117,193,255,.1);color:#9ec9e7;font-style:normal;font-size:9px}
#screen-career .career-bracket-compact-progress span.active{border-color:rgba(255,216,76,.58);color:#ffe077;background:rgba(255,216,76,.07)}
#screen-career .career-bracket-compact-progress span.active i{background:#ffd84b;color:#152033}
#screen-career .career-bracket-compact-progress span.done{border-color:rgba(93,229,163,.35);color:#9dffd1}
#screen-career .career-bracket-compact-progress span.done i{background:rgba(93,229,163,.2);color:#9dffd1}
#screen-career .career-bracket-compact-body>.btn{min-width:210px!important;margin:0!important}
.ia-magic-tournament-memory{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important;overflow:hidden!important}
.ia-magic-tournament-memory>div,.ia-magic-tournament-memory>span{min-width:0!important;max-width:100%!important}
.ia-magic-tournament-memory b,.ia-magic-tournament-memory span,.ia-magic-tournament-memory strong{white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important}.ia-magic-tournament-memory b{font-size:clamp(15px,1.35vw,19px)!important}.ia-magic-tournament-memory span{font-size:clamp(13px,1.05vw,16px)!important}
#bossRushShell .bossrush-result>.score.ia-v289-score-counting{font-variant-numeric:tabular-nums;letter-spacing:.02em}
#bossRushShell .bossrush-result>.score.ia-v289-score-counting .ia-v289-score-number{display:inline-block;min-width:3ch}
#iaV289BossScoreDebug{position:fixed;inset:0;z-index:2147482700;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(1,6,16,.88);backdrop-filter:blur(10px)}
#iaV289BossScoreDebug .ia-v289-debug-card{width:min(760px,94vw);max-height:90vh;overflow:auto;padding:20px;border-radius:18px;border:1px solid rgba(255,202,63,.34);background:linear-gradient(180deg,#08234a,#061a39);box-shadow:0 28px 80px rgba(0,0,0,.52)}
#iaV289BossScoreDebug .ia-v289-debug-head{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:12px}
#iaV289BossScoreDebug .ia-v289-debug-head small{color:#7edfff;font-weight:900;letter-spacing:.12em}
#iaV289BossScoreDebug .ia-v289-debug-head h2{margin:3px 0 0;color:#fff}
#iaV289BossScoreDebug .ia-v289-debug-head button{border:1px solid rgba(255,255,255,.18);background:#102c54;color:#fff;border-radius:10px;padding:8px 11px;cursor:pointer}
#iaV289BossScoreDebug .bossrush-result{margin:0!important}
@media(max-width:900px){#screen-career .career-bracket-compact-head{align-items:flex-start;flex-direction:column;gap:7px}#screen-career .career-bracket-compact-head>b{max-width:100%}#screen-career .career-bracket-compact-body{grid-template-columns:1fr}#screen-career .career-bracket-compact-progress{grid-template-columns:repeat(2,minmax(0,1fr))}#screen-career .career-bracket-compact-body>.btn{width:100%;min-width:0!important}.ia-magic-tournament-memory{grid-template-columns:1fr!important;gap:8px!important}}

/* IA V788 bundle separator: original stylesheet rules preserved */
/* InazumArcade v292 · Career UI regression / team theme / FFI QA */
:root{--career-team-accent:#65c9ff;--career-team-accent-2:#ffd42b;--career-team-accent-rgb:101,201,255;--career-team-accent2-rgb:255,212,43}

/* Reported FF-qualified dashboard regression: ONLY remove the old paint clipping.
   Do not alter the training cards, grid, sizing or spacing. */
#screen-career .career-dashboard-grid .career-player-column,
#screen-career .career-dashboard-grid .career-activity-column,
#screen-career .career-dashboard-grid .career-standings-column{contain:none!important;overflow:visible!important}

/* Team accents: intentionally stronger than all previous Career skins. */
#careerRoot.career-team-themed,
#ia290ThemeRoot.career-team-themed{--career-team-accent:#65c9ff;--career-team-accent-2:#ffd42b;--career-team-accent-rgb:101,201,255;--career-team-accent2-rgb:255,212,43;position:relative!important;overflow:visible!important}
#careerRoot.career-team-themed .career-panel,
#careerRoot.career-team-themed .career-club,
#careerRoot.career-team-themed .career-badge,
#careerRoot.career-team-themed .career-stat,
#careerRoot.career-team-themed .career-matchbox,
#careerRoot.career-team-themed .career-market-status,
#careerRoot.career-team-themed .career-big-match,
#ia290ThemeRoot.career-team-themed .career-panel,
#ia290ThemeRoot.career-team-themed .career-badge,
#ia290ThemeRoot.career-team-themed .career-stat{
  border-color:rgba(var(--career-team-accent-rgb),.38)!important;
  box-shadow:inset 0 0 0 1px rgba(var(--career-team-accent-rgb),.10),0 10px 28px rgba(var(--career-team-accent-rgb),.055)!important;
  background-image:
   radial-gradient(150px 100px at 5% 12%,rgba(var(--career-team-accent-rgb),.13),transparent 70%),
   radial-gradient(170px 110px at 98% 86%,rgba(var(--career-team-accent2-rgb),.10),transparent 72%),
   linear-gradient(145deg,rgba(var(--career-team-accent-rgb),.035),rgba(var(--career-team-accent2-rgb),.018))!important;
  transition:border-color .45s ease,box-shadow .45s ease,background-image .45s ease!important;
}
#careerRoot.career-team-themed .career-title,
#careerRoot.career-team-themed .career-selected,
#careerRoot.career-team-themed .career-club.selected>b,
#ia290ThemeRoot.career-team-themed .career-title{color:var(--career-team-accent)!important;text-shadow:0 0 18px rgba(var(--career-team-accent-rgb),.18)!important}
#careerRoot.career-team-themed .career-bar i,
#ia290ThemeRoot.career-team-themed .career-bar i{background:linear-gradient(90deg,var(--career-team-accent),var(--career-team-accent-2))!important;box-shadow:0 0 14px rgba(var(--career-team-accent-rgb),.25)!important}
#careerRoot.career-team-themed .career-club.selected{background-color:rgba(var(--career-team-accent-rgb),.12)!important;border-color:rgba(var(--career-team-accent-rgb),.62)!important}
#careerRoot.career-team-themed .career-week-number{border-color:rgba(var(--career-team-accent-rgb),.55)!important;background:rgba(var(--career-team-accent-rgb),.12)!important;color:var(--career-team-accent-2)!important}

/* Team-change transition: visible but short; name instead of logo. */
.career-team-themed>.career-team-shift{position:absolute!important;inset:0!important;z-index:9999!important;pointer-events:none!important;overflow:hidden!important;opacity:0!important;border-radius:18px!important}
.career-team-themed>.career-team-shift.active{opacity:1!important}
.career-team-shift::before{content:"";position:absolute;inset:-12%;background:radial-gradient(circle at 18% 38%,rgba(var(--career-team-accent-rgb),.52),transparent 24%),radial-gradient(circle at 84% 62%,rgba(var(--career-team-accent2-rgb),.40),transparent 22%),linear-gradient(105deg,transparent 6%,rgba(var(--career-team-accent-rgb),.18) 28%,rgba(var(--career-team-accent2-rgb),.24) 48%,rgba(var(--career-team-accent-rgb),.14) 66%,transparent 88%);transform:translateX(-110%) skewX(-12deg);animation:ia292CareerSweep 1.12s cubic-bezier(.16,.86,.22,1) forwards}
.career-team-shift-name{position:absolute;z-index:4;left:50%;top:18%;transform:translate(-50%,-18px) scale(.82);font-size:clamp(34px,5vw,72px)!important;line-height:1!important;font-weight:1000!important;letter-spacing:.12em!important;text-transform:uppercase;color:#fff!important;text-shadow:0 0 28px rgba(var(--career-team-accent-rgb),.72),0 4px 10px rgba(0,0,0,.55);opacity:0;animation:ia292CareerName 1s cubic-bezier(.2,.82,.2,1) .08s forwards}
.career-team-shift-bloom{position:absolute;display:block;border-radius:50%;opacity:0;transform:scale(.12);background:radial-gradient(circle,rgba(var(--career-team-accent-rgb),.78),rgba(var(--career-team-accent2-rgb),.48) 46%,transparent 72%);animation:ia292CareerBloom 1s ease-out forwards}.career-team-shift-bloom.alt{background:radial-gradient(circle,rgba(var(--career-team-accent2-rgb),.74),rgba(var(--career-team-accent-rgb),.40) 48%,transparent 72%)}
.career-team-shift-bloom.one{width:310px;height:310px;left:-70px;top:0;animation-delay:.04s}.career-team-shift-bloom.two{width:230px;height:230px;right:4%;top:16%;animation-delay:.12s}.career-team-shift-bloom.three{width:390px;height:390px;left:30%;bottom:-180px;animation-delay:.18s}.career-team-shift-bloom.four{width:190px;height:190px;right:12%;bottom:5%;animation-delay:.24s}
.career-team-shift-vine{position:absolute;display:block;height:4px;border-radius:999px;background:linear-gradient(90deg,transparent,rgba(var(--career-team-accent-rgb),.96) 16%,rgba(var(--career-team-accent2-rgb),.94) 80%,transparent);box-shadow:0 0 18px rgba(var(--career-team-accent-rgb),.48);opacity:0;transform-origin:left;animation:ia292CareerVine .78s cubic-bezier(.18,.86,.2,1) forwards}.career-team-shift-vine.v1{width:66%;left:-8%;top:30%;rotate:8deg;animation-delay:.08s}.career-team-shift-vine.v2{width:58%;left:15%;top:52%;rotate:-9deg;animation-delay:.16s}.career-team-shift-vine.v3{width:52%;left:49%;top:74%;rotate:-17deg;animation-delay:.24s}.career-team-shift-vine.v4{width:45%;left:40%;top:36%;rotate:22deg;animation-delay:.30s}
.career-team-shift-node{position:absolute;display:block;width:15px;height:15px;border-radius:50%;background:radial-gradient(circle at 35% 35%,#fff 0 10%,rgba(var(--career-team-accent2-rgb),.98) 20%,rgba(var(--career-team-accent-rgb),.95) 62%,transparent 100%);box-shadow:0 0 18px rgba(var(--career-team-accent-rgb),.55);opacity:0;animation:ia292CareerNode .62s ease-out forwards}.career-team-shift-node.n1{left:22%;top:29%;animation-delay:.26s}.career-team-shift-node.n2{left:59%;top:48%;animation-delay:.34s}.career-team-shift-node.n3{left:77%;top:70%;animation-delay:.42s}.career-team-shift-node.n4{left:43%;top:68%;animation-delay:.50s}
@keyframes ia292CareerSweep{0%{transform:translateX(-110%) skewX(-12deg);opacity:.2}55%{opacity:1}100%{transform:translateX(112%) skewX(-12deg);opacity:0}}
@keyframes ia292CareerName{0%{opacity:0;transform:translate(-50%,-20px) scale(.8);filter:blur(8px)}30%{opacity:1}72%{opacity:1;transform:translate(-50%,0) scale(1);filter:blur(0)}100%{opacity:0;transform:translate(-50%,10px) scale(1.03)}}
@keyframes ia292CareerBloom{0%{opacity:0;transform:scale(.12)}32%{opacity:.84}100%{opacity:0;transform:scale(1.55)}}
@keyframes ia292CareerVine{0%{opacity:0;scale:.05 1}30%{opacity:1}100%{opacity:.05;scale:1 1}}
@keyframes ia292CareerNode{0%{opacity:0;transform:scale(.2)}48%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(1.7)}}

/* Debug preview */
#ia290CareerThemeDebug{position:fixed;inset:0;z-index:2147483400;background:rgba(2,7,15,.84);backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;padding:22px}
#ia290CareerThemeDebug .ia290-career-theme-card{width:min(1120px,96vw);max-height:92vh;overflow:auto;border:1px solid rgba(110,190,255,.22);border-radius:24px;background:#061527;padding:20px;box-shadow:0 30px 90px rgba(0,0,0,.52)}
#ia290CareerThemeDebug .ia290-theme-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:14px}#ia290CareerThemeDebug .ia290-theme-head h2{font-size:28px;margin:3px 0 5px}#ia290CareerThemeDebug .ia290-theme-head p{margin:0;color:#a8c4d8;font-size:13px}
#ia290CareerThemeDebug .ia290-theme-close{width:46px;height:46px;border-radius:12px;background:#0a2238;border:1px solid rgba(110,190,255,.25);color:#fff;font-size:22px}
#ia290CareerThemeDebug .ia290-team-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:8px;margin:14px 0}#ia290CareerThemeDebug .ia290-team-grid button{padding:10px;border-radius:12px;background:#0a2035;color:#fff;border:1px solid rgba(110,190,255,.2);font-weight:900;cursor:pointer}#ia290CareerThemeDebug .ia290-team-grid button.active{border-color:var(--career-team-accent,#65c9ff);box-shadow:0 0 0 1px var(--career-team-accent,#65c9ff) inset}
#ia290CareerThemeDebug .ia290-theme-root{position:relative;overflow:hidden!important;border:1px solid rgba(110,190,255,.2);border-radius:20px;padding:18px;background:#07192a}#ia290CareerThemeDebug .ia290-theme-sample-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}#ia290CareerThemeDebug .ia290-theme-statline{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}

/* FFI sandbox debug bar */
#ia292FfiQaBar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 auto 12px;max-width:1360px;padding:10px 12px;border:1px solid rgba(255,205,77,.34);border-radius:14px;background:linear-gradient(90deg,rgba(61,45,6,.78),rgba(8,26,43,.94));box-shadow:0 12px 26px rgba(0,0,0,.18)}
#ia292FfiQaBar b{color:#ffe275;font-size:13px;letter-spacing:.04em}#ia292FfiQaBar span{color:#b8cddd;font-size:12px;flex:1}#ia292FfiQaBar button{border:1px solid rgba(255,215,92,.32);border-radius:10px;background:#102b43;color:#fff;padding:9px 12px;font-weight:900;cursor:pointer}#ia292FfiQaBar button:last-child{background:#5c1f26;border-color:#c65461}
#ia292QualifiedQaNote{position:sticky;top:70px;z-index:80;margin:0 auto 8px;max-width:760px;text-align:center;padding:9px 12px;border-radius:12px;background:#5b1f27;color:#fff;border:1px solid #cf6170;font-weight:900;cursor:pointer}

/* IA V788 bundle separator: original stylesheet rules preserved */
/* InazumArcade v298 · Career FFI readability / solid-panel fix
   Scoped only to the Career FFI screen. No Career dashboard, training, gameplay,
   bracket logic or other modes are changed here. */

/* Use more of a desktop viewport without making the screen oversized. */
#screen-career .career-intl-wrap.career-intl-expanded{
  width:min(94vw,1500px)!important;
  max-width:1500px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

#screen-career .career-intl-wrap.career-intl-expanded .career-head{
  gap:28px!important;
  margin-bottom:18px!important;
  padding:18px 22px!important;
}
#screen-career .career-intl-wrap.career-intl-expanded .career-title{
  font-size:50px!important;
  line-height:1.02!important;
}
#screen-career .career-intl-wrap.career-intl-expanded .career-sub{
  font-size:15.5px!important;
  line-height:1.45!important;
}
#screen-career .career-intl-wrap.career-intl-expanded .career-badge{
  font-size:14px!important;
  padding:13px 17px!important;
  white-space:nowrap!important;
}

/* Call-up banner: keep the existing visual identity, just make it easier to read. */
#screen-career .career-intl-wrap.career-intl-expanded > .career-head + .career-panel{
  padding:18px 20px!important;
  margin-bottom:18px!important;
  background:linear-gradient(135deg,rgba(4,18,33,.99),rgba(7,42,67,.985))!important;
}
#screen-career .career-intl-wrap.career-intl-expanded > .career-head + .career-panel > b{
  font-size:19px!important;
  line-height:1.25!important;
}
#screen-career .career-intl-wrap.career-intl-expanded > .career-head + .career-panel .career-note{
  font-size:14px!important;
  line-height:1.5!important;
  margin-top:7px!important;
}

/* The previous team-accent layer replaced the dark panel background-image with
   accent-only gradients. On FFI this exposed the stadium behind the cards.
   Restore a real opaque base while preserving the club accents. */
#screen-career #careerRoot.career-team-themed .career-intl-wrap.career-intl-expanded .career-intl-grid .career-panel,
#screen-career #careerRoot.ia293-team-theme .career-intl-wrap.career-intl-expanded .career-intl-grid .career-panel,
#screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid .career-panel{
  background:
    radial-gradient(180px 120px at 3% 8%,rgba(var(--ia293-rgb,101,201,255),.10),transparent 72%),
    radial-gradient(190px 130px at 100% 94%,rgba(var(--ia293-rgb2,255,212,43),.065),transparent 74%),
    linear-gradient(155deg,rgba(8,27,45,.992),rgba(4,14,25,.995))!important;
  border-color:rgba(104,205,248,.30)!important;
  box-shadow:0 14px 34px rgba(0,0,0,.28),inset 0 0 0 1px rgba(255,255,255,.02)!important;
  opacity:1!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}

/* Larger but still balanced 3-column layout. */
#screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid{
  grid-template-columns:minmax(350px,1.06fr) minmax(610px,1.62fr) minmax(285px,.90fr)!important;
  gap:20px!important;
  align-items:stretch!important;
}
#screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid > .career-column{
  min-width:0!important;
}
#screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid > .career-column > .career-panel{
  min-height:224px!important;
  padding:21px 22px!important;
  border-radius:17px 6px 17px 6px!important;
}
#screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid .career-panel h3{
  font-size:20px!important;
  margin-bottom:15px!important;
  line-height:1.15!important;
}
#screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid .career-note{
  font-size:14.5px!important;
  line-height:1.55!important;
  color:#aec9d9!important;
}

/* Group table readability. */
#screen-career .career-intl-wrap.career-intl-expanded .career-table{
  font-size:14px!important;
  background:rgba(3,13,23,.72)!important;
  border-radius:10px!important;
  overflow:hidden!important;
}
#screen-career .career-intl-wrap.career-intl-expanded .career-table th,
#screen-career .career-intl-wrap.career-intl-expanded .career-table td{
  padding:10px 9px!important;
  line-height:1.25!important;
}
#screen-career .career-intl-wrap.career-intl-expanded .career-table th{
  font-size:11px!important;
  letter-spacing:.08em!important;
  background:rgba(9,48,72,.92)!important;
  color:#9fe9ff!important;
}
#screen-career .career-intl-wrap.career-intl-expanded .career-table tr:not(:first-child){
  background:rgba(5,18,30,.55)!important;
}
#screen-career .career-intl-wrap.career-intl-expanded .career-table tr.me{
  background:linear-gradient(90deg,rgba(255,213,64,.13),rgba(5,18,30,.64))!important;
}

/* Match history and controls. */
#screen-career .career-intl-wrap.career-intl-expanded .career-intl-match{
  padding:13px 15px!important;
  margin-bottom:9px!important;
  border-radius:11px!important;
  background:rgba(5,20,33,.88)!important;
  border:1px solid rgba(99,199,240,.18)!important;
}
#screen-career .career-intl-wrap.career-intl-expanded .career-intl-match span{
  font-size:15.5px!important;
  line-height:1.4!important;
}
#screen-career .career-intl-wrap.career-intl-expanded .career-intl-match small{
  font-size:11px!important;
}
#screen-career .career-intl-wrap.career-intl-expanded .career-intl-actions{
  gap:12px!important;
  margin-top:18px!important;
}
#screen-career .career-intl-wrap.career-intl-expanded .career-intl-actions .btn{
  min-height:56px!important;
  padding:15px 22px!important;
  font-size:16.5px!important;
}

/* Preserve useful proportions on smaller desktop windows. */
@media(max-width:1380px){
  #screen-career .career-intl-wrap.career-intl-expanded{width:min(96vw,1320px)!important}
  #screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid{
    grid-template-columns:minmax(300px,1fr) minmax(500px,1.5fr) minmax(250px,.88fr)!important;
    gap:16px!important;
  }
  #screen-career .career-intl-wrap.career-intl-expanded .career-title{font-size:44px!important}
}
@media(max-width:1050px){
  #screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid{
    grid-template-columns:1fr 1.35fr!important;
  }
  #screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid > .career-column:last-child{
    grid-column:1 / -1!important;
  }
}
@media(max-width:760px){
  #screen-career .career-intl-wrap.career-intl-expanded{width:94vw!important}
  #screen-career .career-intl-wrap.career-intl-expanded .career-head{padding:14px!important;gap:12px!important}
  #screen-career .career-intl-wrap.career-intl-expanded .career-title{font-size:33px!important}
  #screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid{grid-template-columns:1fr!important}
  #screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid > .career-column:last-child{grid-column:auto!important}
  #screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid > .career-column > .career-panel{min-height:0!important}
}

/* IA V788 bundle separator: original stylesheet rules preserved */
/* InazumArcade v299 · Career finals viewport + champion celebration
   Scope: Career FFI completed screen and the shared FF/FFI champion popup only. */

/* v17 intentionally locks the normal Career dashboard inside the viewport on desktop.
   The FFI tournament screen is taller than that dashboard, especially after the final.
   Give only this wrapper its own vertical scroll area so nothing is clipped outside a
   non-fullscreen browser window. */
@media (min-width:901px){
  #screen-career #careerRoot > .career-intl-wrap.career-intl-expanded{
    box-sizing:border-box!important;
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable!important;
    padding:6px 10px 34px!important;
  }
  #screen-career #careerRoot > .career-intl-wrap.career-intl-expanded::-webkit-scrollbar{width:9px}
  #screen-career #careerRoot > .career-intl-wrap.career-intl-expanded::-webkit-scrollbar-thumb{
    background:rgba(103,205,248,.34);border-radius:999px;border:2px solid rgba(4,14,25,.9)
  }
}

/* Short desktop windows: keep the same readable v298 design, but reduce only the
   vertical footprint of the non-interactive header pieces before scrolling is needed. */
@media (min-width:901px) and (max-height:820px){
  #screen-career .career-intl-wrap.career-intl-expanded .career-head{
    padding:12px 17px!important;margin-bottom:12px!important
  }
  #screen-career .career-intl-wrap.career-intl-expanded .career-title{font-size:40px!important}
  #screen-career .career-intl-wrap.career-intl-expanded > .career-head + .career-panel{
    padding:13px 16px!important;margin-bottom:13px!important
  }
  #screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid{
    gap:14px!important
  }
  #screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid > .career-column > .career-panel{
    min-height:0!important;padding:16px 17px!important
  }
}

/* ===== Shared FF / FFI champion popup ===== */
#career-v44-tournament-popup.career-v299-champion{
  overflow:auto!important;
  background:
    radial-gradient(circle at 50% 42%,rgba(255,214,73,.14),transparent 30%),
    radial-gradient(circle at 18% 16%,rgba(92,214,255,.10),transparent 25%),
    rgba(1,6,13,.86)!important;
  backdrop-filter:blur(9px) saturate(1.08)!important;
  -webkit-backdrop-filter:blur(9px) saturate(1.08)!important;
}
#career-v44-tournament-popup.career-v299-champion .career-v44-tournament-card{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  width:min(720px,94vw)!important;
  max-height:min(90dvh,760px)!important;
  padding:34px 30px 30px!important;
  border-radius:26px!important;
  border:1px solid rgba(255,220,91,.82)!important;
  background:
    radial-gradient(circle at 50% -10%,rgba(255,220,80,.16),transparent 34%),
    linear-gradient(150deg,#061827 0%,#0a2c43 54%,#061521 100%)!important;
  box-shadow:
    0 34px 110px rgba(0,0,0,.78),
    0 0 0 1px rgba(255,255,255,.035) inset,
    0 0 50px rgba(255,211,64,.15)!important;
  animation:ia299ChampionCardIn .48s cubic-bezier(.16,.86,.22,1) both!important;
}
#career-v44-tournament-popup.career-v299-champion.is-ffi .career-v44-tournament-card{
  background:
    radial-gradient(circle at 50% -8%,rgba(255,224,80,.17),transparent 34%),
    radial-gradient(circle at 88% 18%,rgba(75,208,255,.12),transparent 27%),
    linear-gradient(150deg,#051a2b 0%,#07374e 54%,#061620 100%)!important;
  box-shadow:0 34px 110px rgba(0,0,0,.78),0 0 0 1px rgba(255,255,255,.035) inset,0 0 58px rgba(75,208,255,.13)!important;
}
#career-v44-tournament-popup.career-v299-champion .career-v44-tournament-card::after{
  content:"";position:absolute;z-index:-1;left:-30%;top:-20%;width:44%;height:145%;
  transform:rotate(15deg) translateX(-180%);
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.11),transparent);
  animation:ia299ChampionSweep 2.9s ease-in-out .5s infinite;
}
#career-v44-tournament-popup .v299-celebration-rays{
  position:absolute;z-index:-2;left:50%;top:34%;width:620px;height:620px;
  transform:translate(-50%,-50%);opacity:.25;pointer-events:none;
  background:repeating-conic-gradient(from 0deg,rgba(255,220,82,.28) 0 3deg,transparent 3deg 15deg);
  -webkit-mask:radial-gradient(circle,transparent 0 22%,#000 39%,transparent 70%);
  mask:radial-gradient(circle,transparent 0 22%,#000 39%,transparent 70%);
  animation:ia299ChampionRays 18s linear infinite;
}
#career-v44-tournament-popup.is-ffi .v299-celebration-rays{
  background:repeating-conic-gradient(from 0deg,rgba(102,221,255,.30) 0 3deg,transparent 3deg 15deg)
}
#career-v44-tournament-popup .v299-trophy-stage{
  position:relative;width:112px;height:112px;margin:0 auto 6px;display:grid;place-items:center;
}
#career-v44-tournament-popup .v299-trophy-stage>span,
#career-v44-tournament-popup .v299-trophy-stage>b{
  position:absolute;inset:8px;border-radius:50%;border:1px solid rgba(255,221,91,.38);
  box-shadow:0 0 24px rgba(255,210,55,.16);animation:ia299ChampionRing 2.5s ease-out infinite
}
#career-v44-tournament-popup .v299-trophy-stage>b{inset:19px;animation-delay:.7s;border-color:rgba(91,213,255,.30)}
#career-v44-tournament-popup .v299-trophy-stage .v44-icon{
  position:relative;z-index:2;font-size:59px!important;filter:drop-shadow(0 9px 18px rgba(0,0,0,.35)) drop-shadow(0 0 13px rgba(255,220,80,.28));
  animation:ia299ChampionTrophy 2.2s ease-in-out infinite
}
#career-v44-tournament-popup.career-v299-champion .v44-kicker{
  position:relative;z-index:2;margin-top:4px!important;font-size:11.5px!important;letter-spacing:.21em!important;color:#8fe5ff!important
}
#career-v44-tournament-popup.career-v299-champion h2{
  position:relative;z-index:2;margin:8px 0 5px!important;font-size:clamp(31px,4.3vw,43px)!important;line-height:1.02!important;
  color:#ffe36c!important;text-shadow:0 0 24px rgba(255,214,64,.24),0 3px 12px rgba(0,0,0,.5)!important
}
#career-v44-tournament-popup .v299-champion-meta{
  position:relative;z-index:2;display:inline-flex;align-items:center;justify-content:center;
  margin:4px auto 12px;padding:7px 11px;border-radius:999px;
  border:1px solid rgba(255,221,96,.30);background:rgba(255,216,70,.07);
  color:#ffe9a5;font-size:10.5px;font-weight:1000;letter-spacing:.10em;text-transform:uppercase
}
#career-v44-tournament-popup.is-ffi .v299-champion-meta{
  border-color:rgba(101,219,255,.30);background:rgba(80,205,255,.07);color:#bfeeff
}
#career-v44-tournament-popup.career-v299-champion p{
  position:relative;z-index:2;max-width:590px!important;font-size:14px!important;line-height:1.58!important;font-weight:800;color:#e4f4ff!important
}
#career-v44-tournament-popup .v299-champion-line{
  position:relative;z-index:2;display:flex;align-items:center;justify-content:center;gap:10px;width:min(430px,76%);margin:15px auto 0;color:#ffe071
}
#career-v44-tournament-popup .v299-champion-line i{height:1px;flex:1;background:linear-gradient(90deg,transparent,rgba(255,224,113,.54))}
#career-v44-tournament-popup .v299-champion-line i:last-child{background:linear-gradient(90deg,rgba(255,224,113,.54),transparent)}
#career-v44-tournament-popup .v299-champion-line b{font-size:12px;filter:drop-shadow(0 0 8px rgba(255,219,72,.42))}
#career-v44-tournament-popup.career-v299-champion .career-actions{position:relative;z-index:3;margin-top:17px!important}
#career-v44-tournament-popup.career-v299-champion .career-actions .btn{
  min-width:210px;min-height:50px;padding:13px 22px;border-radius:13px!important;font-size:13px!important;font-weight:1000!important;
  box-shadow:0 10px 28px rgba(0,0,0,.28),0 0 20px rgba(255,214,64,.10)
}

/* Lightweight celebratory confetti, deliberately decorative and non-interactive. */
#career-v44-tournament-popup .v299-confetti{position:absolute;z-index:-1;inset:0;overflow:hidden;pointer-events:none}
#career-v44-tournament-popup .v299-confetti i{
  position:absolute;top:-20px;width:7px;height:14px;border-radius:2px;background:#ffe05c;opacity:.78;
  animation:ia299ConfettiFall 3.8s linear infinite
}
#career-v44-tournament-popup .v299-confetti i:nth-child(3n){background:#66dfff;width:5px;height:11px}
#career-v44-tournament-popup .v299-confetti i:nth-child(4n){background:#fff4ba;width:8px;height:8px;border-radius:50%}
#career-v44-tournament-popup .v299-confetti i:nth-child(1){left:6%;animation-delay:-.2s}#career-v44-tournament-popup .v299-confetti i:nth-child(2){left:13%;animation-delay:-2.4s}
#career-v44-tournament-popup .v299-confetti i:nth-child(3){left:20%;animation-delay:-1.2s}#career-v44-tournament-popup .v299-confetti i:nth-child(4){left:27%;animation-delay:-3.1s}
#career-v44-tournament-popup .v299-confetti i:nth-child(5){left:35%;animation-delay:-.7s}#career-v44-tournament-popup .v299-confetti i:nth-child(6){left:42%;animation-delay:-2.8s}
#career-v44-tournament-popup .v299-confetti i:nth-child(7){left:48%;animation-delay:-1.7s}#career-v44-tournament-popup .v299-confetti i:nth-child(8){left:55%;animation-delay:-3.4s}
#career-v44-tournament-popup .v299-confetti i:nth-child(9){left:62%;animation-delay:-.4s}#career-v44-tournament-popup .v299-confetti i:nth-child(10){left:69%;animation-delay:-2.1s}
#career-v44-tournament-popup .v299-confetti i:nth-child(11){left:75%;animation-delay:-1.0s}#career-v44-tournament-popup .v299-confetti i:nth-child(12){left:82%;animation-delay:-3.0s}
#career-v44-tournament-popup .v299-confetti i:nth-child(13){left:88%;animation-delay:-1.5s}#career-v44-tournament-popup .v299-confetti i:nth-child(14){left:93%;animation-delay:-2.6s}
#career-v44-tournament-popup .v299-confetti i:nth-child(15){left:31%;animation-delay:-3.6s}#career-v44-tournament-popup .v299-confetti i:nth-child(16){left:72%;animation-delay:-.9s}

@keyframes ia299ChampionCardIn{0%{opacity:0;transform:translateY(18px) scale(.92);filter:blur(4px)}55%{opacity:1;transform:translateY(-3px) scale(1.012);filter:blur(0)}100%{opacity:1;transform:none}}
@keyframes ia299ChampionSweep{0%,56%{transform:rotate(15deg) translateX(-180%)}78%,100%{transform:rotate(15deg) translateX(430%)}}
@keyframes ia299ChampionRays{to{transform:translate(-50%,-50%) rotate(360deg)}}
@keyframes ia299ChampionRing{0%{opacity:.65;transform:scale(.72)}70%{opacity:.08;transform:scale(1.18)}100%{opacity:0;transform:scale(1.26)}}
@keyframes ia299ChampionTrophy{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-5px) rotate(2deg)}}
@keyframes ia299ConfettiFall{0%{transform:translate3d(0,-18px,0) rotate(0deg);opacity:0}10%{opacity:.78}100%{transform:translate3d(28px,620px,0) rotate(520deg);opacity:0}}

@media (max-height:680px){
  #career-v44-tournament-popup.career-v299-champion{align-items:flex-start!important;padding:12px!important}
  #career-v44-tournament-popup.career-v299-champion .career-v44-tournament-card{margin:auto;padding:20px 22px 18px!important;max-height:none!important}
  #career-v44-tournament-popup .v299-trophy-stage{width:82px;height:82px;margin-bottom:1px}
  #career-v44-tournament-popup .v299-trophy-stage .v44-icon{font-size:45px!important}
  #career-v44-tournament-popup.career-v299-champion h2{font-size:30px!important;margin:5px 0 3px!important}
  #career-v44-tournament-popup .v299-champion-meta{margin-bottom:8px;padding:5px 9px}
  #career-v44-tournament-popup .v299-champion-line{margin-top:9px}
  #career-v44-tournament-popup.career-v299-champion .career-actions{margin-top:11px!important}
}
@media (max-width:650px){
  #career-v44-tournament-popup.career-v299-champion .career-v44-tournament-card{padding:25px 18px 22px!important}
  #career-v44-tournament-popup .v299-champion-meta{max-width:92%;white-space:normal;text-align:center}
}
@media (prefers-reduced-motion:reduce){
  #career-v44-tournament-popup.career-v299-champion *,
  #career-v44-tournament-popup.career-v299-champion *::before,
  #career-v44-tournament-popup.career-v299-champion *::after{animation:none!important}
}

/* IA V788 bundle separator: original stylesheet rules preserved */
/* InazumArcade v301 · BossRush Endless action-row visual fix
   ONLY fixes the Endless Contracts/Shop row geometry introduced by the
   larger contract-detail card. The existing chrome material on the main
   "GIOCA LA PARTITA" CTA is intentionally untouched. */

/* Desktop Endless: v199 enlarged the action grid/card to 230px but left the
   parent unified row at the older 205px, so the contract card overflowed into
   the chrome CTA. Give the row the same real height and stretch BOTH cards to
   it, keeping Contracts and Shop aligned. */
@media (min-width:1181px) and (min-height:821px){
  #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified{
    grid-template-rows:minmax(0,1fr) 230px 64px !important;
  }
}

/* For both normal and short desktop heights, make the two existing action
   cards fill the action row instead of letting only the contract card grow. */
@media (min-width:1181px){
  #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified > .brx-actions-grid{
    align-items:stretch !important;
    overflow:hidden !important;
  }
  #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified > .brx-actions-grid > .brx-action-card.contracts,
  #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified > .brx-actions-grid > .brx-action-card.shop{
    height:100% !important;
    min-height:0 !important;
    max-height:none !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
  }
}

/* v302 · targeted Endless contract-detail containment fix.
   Keep the on-screen contract explanation (it is useful for Endless), but make
   it a real fourth band INSIDE the contract card instead of an absolutely
   positioned layer that can peek outside the card near the main CTA. Nothing
   else in the BossRush layout or chrome is changed. */
#bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card.contracts.br-endless-auto-contract{
  grid-template-rows:56px 20px minmax(0,1fr) 29px !important;
  align-content:stretch !important;
  row-gap:5px !important;
}
#bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card.contracts.br-endless-auto-contract .br-endless-contract-detail{
  position:relative !important;
  grid-row:3 !important;
  left:auto !important;
  right:auto !important;
  top:auto !important;
  bottom:auto !important;
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  margin:0 !important;
  align-self:stretch !important;
  box-sizing:border-box !important;
  padding:5px 7px !important;
  gap:2px !important;
  overflow:hidden !important;
}
#bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card.contracts.br-endless-auto-contract .br-endless-contract-detail > span{
  min-height:0 !important;
  font-size:11.5px !important;
  line-height:1.18 !important;
  white-space:normal !important;
  overflow:hidden !important;
  text-overflow:clip !important;
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:2 !important;
  line-clamp:2 !important;
}
#bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card.contracts.br-endless-auto-contract .br-endless-contract-detail b{
  font-size:10.5px !important;
  line-height:1.15 !important;
}
#bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card.contracts.br-endless-auto-contract .brx-card-btn{
  grid-row:4 !important;
}
@media (min-width:1181px) and (max-height:820px){
  #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card.contracts.br-endless-auto-contract{
    grid-template-rows:53px 19px minmax(0,1fr) 27px !important;
    row-gap:4px !important;
  }
  #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card.contracts.br-endless-auto-contract .br-endless-contract-detail{
    padding:4px 6px !important;
    gap:1px !important;
  }
  #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card.contracts.br-endless-auto-contract .br-endless-contract-detail > span{
    font-size:10.8px !important;
    line-height:1.16 !important;
  }
  #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card.contracts.br-endless-auto-contract .br-endless-contract-detail b{
    font-size:10px !important;
  }
}

/* v303 · surgical fix only: the global generic `.rules` class adds
   26/30/30px padding. In Endless the third contract-detail line also uses
   class="rules", so that unrelated global padding was expanding the line and
   covering OBIETTIVO/RICOMPENSA. Reset only that one nested line. */
#bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card.contracts.br-endless-auto-contract .br-endless-contract-detail > span.rules{
  padding:0 !important;
}

/* IA V788 bundle separator: original stylesheet rules preserved */
/* InazumArcade v317 · Galaxy Scout encounter readability (desktop only). */
html:not(.ia-real-phone-mode) #galaxyDominationOverlay .gd-scout-brief-card{
  width:min(680px,calc(100vw - 96px));
  max-height:calc(100vh - 190px);
  overflow-y:auto;overflow-x:hidden;scrollbar-width:none;
  padding:30px 36px 28px;border-radius:24px;
}
html:not(.ia-real-phone-mode) #galaxyDominationOverlay .gd-scout-brief-card::-webkit-scrollbar{width:0;height:0}
html:not(.ia-real-phone-mode) #galaxyDominationOverlay .gd-scout-brief-card .radar{width:132px;height:132px;margin-bottom:17px}
html:not(.ia-real-phone-mode) #galaxyDominationOverlay .gd-scout-brief-card small{font-size:10px;letter-spacing:.18em}
html:not(.ia-real-phone-mode) #galaxyDominationOverlay .gd-scout-brief-card h2{margin:7px 0 10px;font-size:34px;line-height:1.05}
html:not(.ia-real-phone-mode) #galaxyDominationOverlay .gd-scout-brief-card p{max-width:565px;margin-bottom:20px;font-size:14px;line-height:1.55}
html:not(.ia-real-phone-mode) #galaxyDominationOverlay .gd-scout-brief-meta{gap:11px;margin:16px 0 21px}
html:not(.ia-real-phone-mode) #galaxyDominationOverlay .gd-scout-brief-meta span{min-width:112px;padding:11px 13px;border-radius:12px;font-size:10px;line-height:1.2}
html:not(.ia-real-phone-mode) #galaxyDominationOverlay .gd-scout-brief-meta b{font-size:18px;margin-bottom:4px}
html:not(.ia-real-phone-mode) #galaxyDominationOverlay .gd-scout-brief-card .gd-btn{min-height:46px;padding:0 18px;font-size:11px}
@media (max-height:760px) and (min-width:801px){
  html:not(.ia-real-phone-mode) #galaxyDominationOverlay .gd-scout-brief-card{width:min(630px,calc(100vw - 70px));max-height:calc(100vh - 145px);padding:20px 28px 19px}
  html:not(.ia-real-phone-mode) #galaxyDominationOverlay .gd-scout-brief-card .radar{width:94px;height:94px;margin-bottom:10px}
  html:not(.ia-real-phone-mode) #galaxyDominationOverlay .gd-scout-brief-card h2{font-size:29px;margin:5px 0 7px}
  html:not(.ia-real-phone-mode) #galaxyDominationOverlay .gd-scout-brief-card p{font-size:12.5px;margin-bottom:12px}
  html:not(.ia-real-phone-mode) #galaxyDominationOverlay .gd-scout-brief-meta{margin:10px 0 13px}
}

/* IA V788 bundle separator: original stylesheet rules preserved */
/* =====================================================================
   InazumArcade v319 · Recent UI phone recalibration (v289 → v318 audit)
   Scope is deliberately PHONE-ONLY. Desktop/tablet layouts and gameplay
   logic are untouched. The phone runtime is class-based because landscape
   phones such as 915×412 sit above many ordinary max-width breakpoints.
   ===================================================================== */

html.ia-real-phone-mode{
  --ia319-phone-nav:61px;
  --ia319-phone-gap:8px;
}

/* ---------- CAREER · v289 compact FF bracket / recent tournament cards ---------- */
html.ia-real-phone-mode #screen-career .career-dashboard-bottom:has(.career-bracket-panel-compact){
  grid-template-columns:1fr!important;
}
html.ia-real-phone-mode #screen-career .career-bracket-panel-compact{
  width:100%!important;min-width:0!important;padding:10px!important;overflow:visible!important;
}
html.ia-real-phone-mode #screen-career .career-bracket-compact-head{
  flex-direction:column!important;align-items:flex-start!important;gap:6px!important;
}
html.ia-real-phone-mode #screen-career .career-bracket-compact-head>b{
  max-width:100%!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
}
html.ia-real-phone-mode #screen-career .career-bracket-compact-body{grid-template-columns:1fr!important;gap:8px!important}
html.ia-real-phone-mode #screen-career .career-bracket-compact-progress{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
html.ia-real-phone-mode #screen-career .career-bracket-compact-body>.btn{width:100%!important;min-width:0!important}
html.ia-real-phone-mode .ia-magic-tournament-memory{grid-template-columns:1fr!important;gap:8px!important}

/* v292/v293 club-theme transition titles can otherwise spill outside a 915px
   landscape phone because their desktop typography scales from viewport width. */
html.ia-real-phone-mode .career-team-shift-name,
html.ia-real-phone-mode .ia293-team-fx .ia293-fx-name{
  width:min(88vw,640px)!important;max-width:88vw!important;white-space:normal!important;
  text-align:center!important;overflow-wrap:anywhere!important;font-size:clamp(24px,6vw,38px)!important;
}

/* ---------- CAREER FFI · v298/v299 ---------- */
html.ia-real-phone-mode #screen-career #careerRoot>.career-intl-wrap.career-intl-expanded,
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded{
  width:100%!important;max-width:none!important;height:auto!important;max-height:none!important;
  min-height:0!important;margin:0!important;padding:7px!important;overflow:visible!important;
  scrollbar-gutter:auto!important;box-sizing:border-box!important;
}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-head{
  display:flex!important;flex-wrap:wrap!important;align-items:flex-start!important;gap:8px!important;
  margin-bottom:9px!important;padding:11px 12px!important;
}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-head>div:first-child{
  flex:1 1 520px!important;min-width:0!important;
}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-title{
  font-size:clamp(27px,5.5vw,36px)!important;line-height:1!important;overflow-wrap:anywhere!important;
}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-sub{
  font-size:12px!important;line-height:1.4!important;
}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-badge{
  flex:0 1 auto!important;max-width:100%!important;padding:8px 10px!important;font-size:11px!important;
  line-height:1.2!important;white-space:normal!important;text-align:center!important;
}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded>.career-head+.career-panel{
  padding:11px 12px!important;margin-bottom:9px!important;
}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded>.career-head+.career-panel>b{font-size:15px!important}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded>.career-head+.career-panel .career-note{font-size:12px!important}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid{
  grid-template-columns:1fr!important;gap:9px!important;align-items:start!important;
}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid>.career-column:last-child{grid-column:auto!important}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid>.career-column>.career-panel{
  min-height:0!important;padding:12px!important;border-radius:13px 5px 13px 5px!important;
}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid .career-panel h3{
  font-size:16px!important;margin-bottom:9px!important;
}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-intl-grid .career-note{font-size:12px!important;line-height:1.42!important}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-table{font-size:11.5px!important;table-layout:fixed!important;width:100%!important}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-table th,
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-table td{padding:7px 6px!important;overflow-wrap:anywhere!important}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-table th{font-size:9px!important}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-intl-match{padding:9px 10px!important;margin-bottom:6px!important}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-intl-match span{font-size:12.5px!important;line-height:1.3!important}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-intl-match small{font-size:9.5px!important}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-intl-actions{display:grid!important;grid-template-columns:1fr!important;gap:7px!important;margin-top:10px!important}
html.ia-real-phone-mode #screen-career .career-intl-wrap.career-intl-expanded .career-intl-actions .btn{width:100%!important;min-height:43px!important;padding:9px 12px!important;font-size:12px!important}

/* Champion popup: use the overlay as the only scroller on phones. This avoids
   a short 390/412px landscape viewport creating nested scrollbars. */
html.ia-real-phone-mode.ia-phone-landscape #career-v44-tournament-popup.career-v299-champion{
  inset:var(--ia319-phone-nav) 0 0!important;align-items:flex-start!important;justify-content:center!important;
  padding:7px 8px calc(22px + env(safe-area-inset-bottom))!important;overflow-y:auto!important;overflow-x:hidden!important;
  overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;
}
html.ia-real-phone-mode #career-v44-tournament-popup.career-v299-champion .career-v44-tournament-card{
  width:100%!important;max-width:720px!important;max-height:none!important;overflow:hidden!important;
  margin:0 auto!important;padding:13px 16px 15px!important;border-radius:17px!important;
}
html.ia-real-phone-mode #career-v44-tournament-popup .v299-trophy-stage{width:64px!important;height:64px!important;margin-bottom:0!important}
html.ia-real-phone-mode #career-v44-tournament-popup .v299-trophy-stage .v44-icon{font-size:36px!important}
html.ia-real-phone-mode #career-v44-tournament-popup.career-v299-champion .v44-kicker{font-size:9px!important;margin-top:1px!important}
html.ia-real-phone-mode #career-v44-tournament-popup.career-v299-champion h2{font-size:clamp(24px,5.3vw,30px)!important;margin:3px 0!important}
html.ia-real-phone-mode #career-v44-tournament-popup .v299-champion-meta{margin:3px auto 6px!important;padding:4px 8px!important;font-size:8.5px!important}
html.ia-real-phone-mode #career-v44-tournament-popup.career-v299-champion p{font-size:11.5px!important;line-height:1.4!important}
html.ia-real-phone-mode #career-v44-tournament-popup .v299-champion-line{margin-top:6px!important}
html.ia-real-phone-mode #career-v44-tournament-popup.career-v299-champion .career-actions{margin-top:8px!important}
html.ia-real-phone-mode #career-v44-tournament-popup.career-v299-champion .career-actions .btn{width:100%!important;min-width:0!important;min-height:43px!important;padding:9px 12px!important;font-size:11.5px!important}
html.ia-real-phone-mode #career-v44-tournament-popup .v299-celebration-rays{width:380px!important;height:380px!important}

/* ---------- BOSSRUSH ENDLESS · v300-v305 + v309 test window ---------- */
html.ia-real-phone-mode #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified{
  padding:7px!important;gap:8px!important;
}
html.ia-real-phone-mode #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified>.brx-hero{
  min-height:250px!important;height:auto!important;
}
html.ia-real-phone-mode #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified>.brx-actions-grid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;height:auto!important;gap:8px!important;overflow:visible!important;
}
html.ia-real-phone-mode #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card{
  min-width:0!important;height:190px!important;min-height:190px!important;max-height:none!important;overflow:hidden!important;
}
html.ia-real-phone-mode #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card.contracts.br-endless-auto-contract{
  grid-template-rows:46px 18px minmax(0,1fr) 34px!important;row-gap:4px!important;
}
html.ia-real-phone-mode #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card.contracts.br-endless-auto-contract .br-endless-contract-detail{
  padding:4px 6px!important;gap:1px!important;
}
html.ia-real-phone-mode #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card.contracts.br-endless-auto-contract .br-endless-contract-detail>span{
  font-size:10px!important;line-height:1.16!important;-webkit-line-clamp:2!important;line-clamp:2!important;
}
html.ia-real-phone-mode #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card.contracts.br-endless-auto-contract .br-endless-contract-detail b{font-size:9.5px!important}
html.ia-real-phone-mode #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified>.brx-play{min-height:54px!important;height:54px!important}

/* Recent Endless dialogs: one document scroll, no inner card scrollbars. */
html.ia-real-phone-mode.ia-phone-landscape :is(#brxInventoryOverlay,.br-v4-build-overlay,.br-endless-history-overlay,.br-shop-confirm,#bossRushMatchOverlay){
  inset:var(--ia319-phone-nav) 0 0!important;align-items:flex-start!important;justify-content:center!important;
  padding:7px 8px calc(22px + env(safe-area-inset-bottom))!important;overflow-y:auto!important;overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch!important;overscroll-behavior:contain!important;
}
html.ia-real-phone-mode :is(#brxInventoryOverlay .brx-inventory-modal,.br-v4-build-card,.br-endless-history-card,.br-shop-confirm-card,#bossRushMatchOverlay .br-match-card){
  width:100%!important;max-width:820px!important;max-height:none!important;height:auto!important;overflow:visible!important;margin:0 auto 18px!important;
}
html.ia-real-phone-mode #brxInventoryOverlay .brx-inventory-modal{padding:12px!important;border-radius:14px!important}
html.ia-real-phone-mode #brxInventoryOverlay .brx-inventory-modal-head{gap:8px!important;margin-bottom:9px!important}
html.ia-real-phone-mode #brxInventoryOverlay .brx-inventory-modal-head h2{font-size:18px!important}
html.ia-real-phone-mode #brxInventoryOverlay .brx-inventory-modal-head p{font-size:11px!important;line-height:1.32!important}
html.ia-real-phone-mode #brxInventoryOverlay .brx-inventory-close{min-height:42px!important;padding:7px 9px!important}
html.ia-real-phone-mode #brxInventoryOverlay .brx-inventory-full-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
html.ia-real-phone-mode #brxInventoryOverlay .brx-inventory-full-item{min-height:100px!important;padding:9px!important}
html.ia-real-phone-mode .br-v4-build-card{padding:12px!important;border-radius:14px!important}
html.ia-real-phone-mode .br-v4-build-head{gap:8px!important;margin-bottom:9px!important}
html.ia-real-phone-mode .br-v4-build-head h2{font-size:20px!important}
html.ia-real-phone-mode .br-v4-build-head p{font-size:11px!important}
html.ia-real-phone-mode .br-v4-build-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
html.ia-real-phone-mode .br-v4-build-section{padding:10px!important}
html.ia-real-phone-mode .br-endless-history-card{padding:12px!important;border-radius:14px!important}
html.ia-real-phone-mode .br-endless-history-row{grid-template-columns:32px minmax(0,1fr) 72px!important;gap:7px!important;min-height:58px!important;padding:8px!important}
html.ia-real-phone-mode .br-endless-history-row>div:last-child{display:none!important}
html.ia-real-phone-mode .br-shop-confirm-card{max-width:560px!important;padding:15px!important;border-radius:15px!important}
html.ia-real-phone-mode .br-shop-confirm-card h2{font-size:20px!important}
html.ia-real-phone-mode .br-shop-confirm-name{font-size:17px!important}
html.ia-real-phone-mode .br-shop-confirm-card p{font-size:12px!important;line-height:1.4!important}
html.ia-real-phone-mode .br-shop-confirm-actions{gap:7px!important}
html.ia-real-phone-mode .br-shop-confirm-actions button{min-height:43px!important;font-size:11px!important}
html.ia-real-phone-mode #bossRushMatchOverlay .br-match-card{padding:12px!important;border-radius:15px!important}
html.ia-real-phone-mode #bossRushMatchOverlay .br-match-teams{margin:8px 0!important;gap:6px!important}
html.ia-real-phone-mode #bossRushMatchOverlay .br-match-team{padding:8px!important}
html.ia-real-phone-mode #bossRushMatchOverlay .br-match-feed{height:180px!important;min-height:180px!important;max-height:180px!important}

/* ---------- CAREER STORY · v306/v307 ---------- */
html.ia-real-phone-mode.ia-phone-landscape :is(.career-v306-overlay,.career-v306-secret-overlay,.career-v306-debug-menu,.career-v306-debug-end){
  inset:var(--ia319-phone-nav) 0 0!important;place-items:start center!important;
  padding:7px 8px calc(22px + env(safe-area-inset-bottom))!important;overflow-y:auto!important;overflow-x:hidden!important;
  overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;
}
html.ia-real-phone-mode :is(.career-v306-card,.career-v306-secret-card,.career-v306-debug-card){
  width:100%!important;max-width:1000px!important;min-height:0!important;max-height:none!important;height:auto!important;
  overflow:visible!important;margin:0 auto 18px!important;border-radius:16px!important;
}
html.ia-real-phone-mode .career-v306-card{padding:14px 16px!important}
html.ia-real-phone-mode .career-v306-head{gap:10px!important;align-items:center!important}
html.ia-real-phone-mode .career-v306-head>span{width:50px!important;height:50px!important;flex-basis:50px!important;border-radius:14px!important;font-size:26px!important}
html.ia-real-phone-mode .career-v306-head small{font-size:8px!important;margin-bottom:2px!important}
html.ia-real-phone-mode .career-v306-head h2{font-size:clamp(22px,4.4vw,29px)!important;line-height:1!important}
html.ia-real-phone-mode .career-v306-copy{margin:9px 0 10px!important;font-size:11.5px!important;line-height:1.4!important;max-width:none!important}
html.ia-real-phone-mode .career-v306-choices{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
html.ia-real-phone-mode .career-v306-choices button{min-height:76px!important;padding:9px 27px 9px 10px!important;border-radius:11px!important}
html.ia-real-phone-mode .career-v306-choices b{font-size:10.5px!important;margin-bottom:3px!important}
html.ia-real-phone-mode .career-v306-choices small{font-size:9px!important;line-height:1.28!important}
html.ia-real-phone-mode .career-v306-choices em{right:8px!important;font-size:16px!important}
html.ia-real-phone-mode .career-v306-resolution{margin-top:9px!important;padding:10px 12px!important}
html.ia-real-phone-mode .career-v306-resolution b{font-size:11.5px!important;line-height:1.4!important}
html.ia-real-phone-mode .career-v306-resolve-action{min-height:42px!important;margin-top:7px!important;padding:9px 12px!important}
html.ia-real-phone-mode .career-v306-secret-card{padding:13px 16px!important}
html.ia-real-phone-mode .career-v306-secret-card header h2{font-size:27px!important}
html.ia-real-phone-mode .career-v306-secret-score{margin:8px auto!important;padding:9px 11px!important;gap:8px!important}
html.ia-real-phone-mode .career-v306-secret-score strong{font-size:27px!important}
html.ia-real-phone-mode .career-v306-secret-card>p{font-size:11px!important;line-height:1.35!important;margin-bottom:8px!important}
html.ia-real-phone-mode .career-v306-secret-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
html.ia-real-phone-mode .career-v306-secret-actions button{min-height:74px!important;padding:8px!important}
html.ia-real-phone-mode .career-v306-secret-actions span{font-size:21px!important}
html.ia-real-phone-mode .career-v306-secret-actions b{font-size:10px!important;margin:3px 0 2px!important}
html.ia-real-phone-mode .career-v306-secret-actions small{font-size:8.5px!important;line-height:1.25!important}
html.ia-real-phone-mode .career-v306-secret-result{margin-top:8px!important;padding:10px!important}
html.ia-real-phone-mode .career-v306-debug-card header{padding:12px 14px!important;gap:9px!important}
html.ia-real-phone-mode .career-v306-debug-card header h2{font-size:21px!important}
html.ia-real-phone-mode .career-v306-debug-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;padding:10px!important}
html.ia-real-phone-mode .career-v306-debug-grid button{min-height:48px!important;padding:8px!important}
html.ia-real-phone-mode .career-v306-debug-grid span{font-size:19px!important}
html.ia-real-phone-mode .career-v306-debug-end>div{width:100%!important;max-width:720px!important;padding:16px!important}
html.ia-real-phone-mode .career-v306-debug-stats{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;margin:10px 0!important}

/* Final-memory sequence: preserve the floating-thought aesthetic but fit the
   narrow phone height. Memories remain animated, not converted into cards. */
html.ia-real-phone-mode .career-v306-memory{max-width:58vw!important;padding:10px!important}
html.ia-real-phone-mode .career-v306-memory-last{bottom:17%!important;width:88vw!important}
html.ia-real-phone-mode .career-v306-memory-last b{font-size:clamp(20px,5vw,30px)!important}
html.ia-real-phone-mode .career-v306-memory-go{bottom:4%!important;min-width:210px!important;min-height:42px!important;padding:9px 16px!important}

/* ---------- GALAXY · v316 encyclopedia + v317/v318 Scout/Hardcore UI ---------- */
/* v317 deliberately enlarged Scout on desktop only; explicitly size the phone
   counterpart so 915×412 phones do not accidentally use a tablet-like layout. */
html.ia-real-phone-mode #galaxyDominationOverlay .gd-scout-brief-card{
  width:100%!important;max-width:720px!important;max-height:none!important;overflow:visible!important;
  padding:14px 16px!important;border-radius:16px!important;margin:0 auto 18px!important;
}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-scout-brief-card .radar{width:72px!important;height:72px!important;margin-bottom:7px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-scout-brief-card small{font-size:8px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-scout-brief-card h2{font-size:24px!important;margin:3px 0 5px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-scout-brief-card p{font-size:11px!important;line-height:1.4!important;margin-bottom:8px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-scout-brief-meta{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin:8px 0 10px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-scout-brief-meta span{min-width:0!important;padding:7px!important;font-size:8px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-scout-brief-meta b{font-size:14px!important;margin-bottom:2px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-scout-brief-card .gd-btn{min-height:42px!important;font-size:10px!important;padding:0 12px!important}

/* Hardcore hub/confirm was authored after the original phone pass. Force the
   class-based phone layout even on 915px-wide landscape devices. */
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-modal{
  position:fixed!important;inset:var(--ia319-phone-nav) 0 0!important;display:flex!important;
  align-items:flex-start!important;justify-content:center!important;padding:7px 8px calc(22px + env(safe-area-inset-bottom))!important;
  overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior:contain!important;
}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-card{
  width:100%!important;max-width:900px!important;max-height:none!important;overflow:visible!important;
  margin:0 auto 18px!important;padding:14px!important;border-radius:16px!important;
}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-card.compact{max-width:590px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-card h2{font-size:23px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-card p{font-size:10.5px!important;line-height:1.4!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-path{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:5px!important;margin:9px 0!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-path span{min-height:50px!important;padding:5px!important;font-size:13px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-path span b{font-size:7px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-stats{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;margin:8px 0!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-stats>div{padding:8px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-stats b{font-size:15px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-reward,
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-win-reward{grid-template-columns:58px 1fr!important;gap:9px!important;margin:8px 0!important;padding:8px 10px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-reward img,
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-win-reward img{width:56px!important;height:56px!important}

/* Hardcore constellation in the hub: retain the map instead of flattening it,
   but scale node labels/orbits for landscape-phone height. */
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hardcore-dashboard{padding:12px!important;min-width:0!important;overflow:visible!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-route-map{min-height:300px!important;height:300px!important;overflow:visible!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-stage{width:88px!important;height:106px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-stage-orbit{top:6px!important;width:70px!important;height:70px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-stage-core{top:11px!important;width:57px!important;height:57px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-stage-num{top:26px!important;height:23px!important;min-width:23px!important;font-size:9px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-stage b{top:74px!important;width:118px!important;font-size:8.5px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-stage small{top:87px!important;width:122px!important;font-size:5.6px!important}
html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-stage em{top:99px!important;width:122px!important;font-size:5.4px!important}

/* v316 playbook: 915px landscape is a phone even though it exceeds the old
   760px breakpoint. Two compact columns are readable and avoid huge vertical
   scrolling; diagrams themselves keep their full SVG viewBox. */
html.ia-real-phone-mode .gd-v204-playbook{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
html.ia-real-phone-mode .gd-v204-diagram{padding:8px!important;gap:5px!important;border-radius:11px!important}
html.ia-real-phone-mode .gd-v204-diagram svg{height:112px!important}
html.ia-real-phone-mode .gd-v204-diagram>b{font-size:11.5px!important;line-height:1.2!important}
html.ia-real-phone-mode .gd-v204-diagram>span{font-size:10.5px!important;line-height:1.35!important}

/* ---------- Small landscape phones (740–800-ish CSS px) ---------- */
@media(max-width:800px){
  html.ia-real-phone-mode #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified>.brx-actions-grid{grid-template-columns:1fr!important}
  html.ia-real-phone-mode #bossRushShell[data-ia-endless-ui="1"].brx-shell .brx15-unified .brx-action-card{height:178px!important;min-height:178px!important}
  html.ia-real-phone-mode .br-v4-build-grid{grid-template-columns:1fr!important}
  html.ia-real-phone-mode .career-v306-choices,
  html.ia-real-phone-mode .career-v306-secret-actions{grid-template-columns:1fr!important}
  html.ia-real-phone-mode .career-v306-debug-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-path{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  html.ia-real-phone-mode #galaxyDominationOverlay .gd-hc-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html.ia-real-phone-mode .gd-v204-playbook{grid-template-columns:1fr!important}
  html.ia-real-phone-mode .gd-v204-diagram:last-child:nth-child(odd){grid-column:auto!important}
}

/* Portrait is blocked by the existing rotate-phone screen. Keep any dialog
   underneath harmless if the browser briefly reports portrait during rotation. */
html.ia-real-phone-mode.ia-phone-portrait :is(.career-v306-overlay,.career-v306-secret-overlay,#career-v44-tournament-popup.career-v299-champion,#brxInventoryOverlay,.br-v4-build-overlay,.br-endless-history-overlay,.br-shop-confirm,#bossRushMatchOverlay,#galaxyDominationOverlay .gd-hc-modal){
  overflow:hidden!important;
}

/* ---------- Recent QA/debug surfaces that are intentionally user-accessible ---------- */
html.ia-real-phone-mode.ia-phone-landscape :is(#iaV289BossScoreDebug,#ia290CareerThemeDebug){
  inset:var(--ia319-phone-nav) 0 0!important;align-items:flex-start!important;justify-content:center!important;
  padding:7px 8px calc(22px + env(safe-area-inset-bottom))!important;overflow-y:auto!important;overflow-x:hidden!important;
}
html.ia-real-phone-mode :is(#iaV289BossScoreDebug .ia-v289-debug-card,#ia290CareerThemeDebug .ia290-career-theme-card){
  width:100%!important;max-width:1000px!important;max-height:none!important;height:auto!important;overflow:visible!important;margin:0 auto 18px!important;padding:12px!important;border-radius:15px!important;
}
html.ia-real-phone-mode #ia290CareerThemeDebug .ia290-theme-head{gap:8px!important;margin-bottom:8px!important}
html.ia-real-phone-mode #ia290CareerThemeDebug .ia290-theme-head h2{font-size:21px!important}
html.ia-real-phone-mode #ia290CareerThemeDebug .ia290-team-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin:8px 0!important}
html.ia-real-phone-mode #ia290CareerThemeDebug .ia290-theme-sample-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
html.ia-real-phone-mode #ia292FfiQaBar{width:100%!important;max-width:none!important;padding:8px!important;gap:6px!important}
html.ia-real-phone-mode #ia292FfiQaBar span{flex:1 1 100%!important;font-size:10px!important}
html.ia-real-phone-mode #ia292FfiQaBar button{min-height:42px!important;padding:7px 9px!important;font-size:10px!important}

/* v338 · keep the final-memory card centered on real phones too. */
html.ia-real-phone-mode .career-v306-memory-last{
  top:50%!important;
  bottom:auto!important;
  transform:translate(-50%,-50%)!important;
}

/* IA V788 bundle separator: original stylesheet rules preserved */
/* =====================================================================
   InazumArcade v339 · phone audit for recent UI (v320 → v338)
   v319 already covers v289 → v318. This layer is loaded LAST and keeps
   desktop/tablet untouched by scoping every rule to ia-real-phone-mode.
   Goal: readable typography, real scroll ownership, 44px touch targets,
   no viewport clipping on both portrait and short landscape phones.
   ===================================================================== */

html.ia-real-phone-mode{
  --ia339-safe-top:max(8px,env(safe-area-inset-top));
  --ia339-safe-right:max(8px,env(safe-area-inset-right));
  --ia339-safe-bottom:max(12px,env(safe-area-inset-bottom));
  --ia339-safe-left:max(8px,env(safe-area-inset-left));
}

/* ---------- COMMON RECENT MODALS ---------- */
html.ia-real-phone-mode body #galaxyDominationOverlay :is(
  .gd320-overlay,.gd320-combo-overlay,.gd320-lab-overlay,.gd320-invasion-alert,
  .gd323-tactics-overlay,.gd335-halftime-overlay,.gd335-subs-overlay,
  .gd336-halftime-overlay,.gd336-subs-overlay,.gd338-subs-overlay
){
  position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;
  box-sizing:border-box!important;padding:var(--ia339-safe-top) var(--ia339-safe-right) var(--ia339-safe-bottom) var(--ia339-safe-left)!important;
  overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;align-items:flex-start!important;justify-content:center!important;
}
html.ia-real-phone-mode body #galaxyDominationOverlay :is(
  .gd320-card,.gd320-invasion-card,.gd323-tactics-card,.gd335-halftime-card,
  .gd335-subs-card,.gd336-subs-card,.gd338-subs-card
){
  width:100%!important;max-width:760px!important;min-width:0!important;height:auto!important;max-height:none!important;
  margin:0 auto 16px!important;box-sizing:border-box!important;overflow:visible!important;
}
html.ia-real-phone-mode body #galaxyDominationOverlay :is(
  .gd320-card,.gd320-invasion-card,.gd323-tactics-card,.gd335-halftime-card,.gd335-subs-card
) :is(button,.gd-btn){min-height:44px!important;touch-action:manipulation!important}

/* ---------- HISSATSU TACTICS · v320/v323 ---------- */
html.ia-real-phone-mode body #galaxyDominationOverlay .gd323-tactics-card{padding:14px!important;border-radius:16px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd323-tactics-head{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;margin-bottom:10px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd323-tactics-head h3{font-size:clamp(23px,5.5vw,30px)!important;line-height:1.05!important;margin:3px 0!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd323-tactics-head p{font-size:13px!important;line-height:1.42!important;margin:0!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd323-tactics-gauge{display:flex!important;min-width:0!important;width:100%!important;padding:8px 10px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd323-tactics-card .gd320-tactic-grid{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd323-tactics-card .gd320-tactic-grid button{padding:12px!important;min-height:72px!important;text-align:left!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd323-tactics-card .gd320-tactic-grid strong{font-size:15px!important;line-height:1.25!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd323-tactics-card .gd320-tactic-grid span{font-size:12px!important;line-height:1.38!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd323-tactics-card .gd320-tactic-grid small{font-size:10px!important;line-height:1.3!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd323-tactics-foot{display:flex!important;flex-wrap:wrap!important;gap:7px!important;align-items:center!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd323-tactics-foot small{display:block!important;flex:1 1 180px!important;font-size:10px!important;line-height:1.35!important}

/* ---------- HISSATSU LAB · v320-v325 ---------- */
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab-overlay{display:flex!important;padding-top:var(--ia339-safe-top)!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab{
  width:100%!important;max-width:780px!important;height:auto!important;max-height:none!important;min-height:0!important;
  margin:0 auto 14px!important;overflow:hidden!important;border-radius:16px!important;
}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab>header{position:sticky!important;top:0!important;z-index:4!important;display:flex!important;flex-wrap:wrap!important;gap:8px!important;padding:12px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab>header>div{flex:1 1 220px!important;min-width:0!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab>header h2{font-size:24px!important;line-height:1.05!important;margin:3px 0!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab>header small{font-size:9px!important;line-height:1.3!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab>header button{min-height:44px!important;padding:8px 12px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab-body{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto auto!important;max-height:none!important;height:auto!important;overflow:visible!important;min-height:0!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab-body nav{
  display:flex!important;gap:7px!important;overflow-x:auto!important;overflow-y:hidden!important;max-height:none!important;
  padding:9px!important;scroll-snap-type:x proximity!important;overscroll-behavior-x:contain!important;scrollbar-width:thin!important;
}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab-player{flex:0 0 min(44vw,190px)!important;min-height:58px!important;padding:9px!important;scroll-snap-align:start!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab-player b{font-size:12px!important;white-space:normal!important;line-height:1.2!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab-player small{font-size:9px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab-body main{padding:11px!important;max-height:none!important;overflow:visible!important;min-width:0!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab-intro{padding:11px!important;margin-bottom:9px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab-intro h3{font-size:18px!important;line-height:1.15!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-lab-intro p{font-size:11.5px!important;line-height:1.45!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-tech-card{padding:11px!important;margin-bottom:8px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-tech-card h4{font-size:16px!important;line-height:1.15!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-tech-card :is(p,span,small){font-size:11px!important;line-height:1.4!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-tech-levels{display:flex!important;flex-wrap:wrap!important;gap:6px!important}

/* ---------- CHAIN / COMBINATE / INVASION · v320-v321 ---------- */
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-card{padding:13px!important;border-radius:15px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-card h3{font-size:23px!important;line-height:1.08!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-card p{font-size:12px!important;line-height:1.42!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-combo-list{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-combo-card{min-width:0!important;padding:11px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-combo-card b{font-size:14px!important;line-height:1.25!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-combo-card :is(span,small){font-size:11px!important;line-height:1.35!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-invasion-card{padding:15px!important;border-radius:16px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-invasion-card h2{font-size:26px!important;line-height:1.05!important;overflow-wrap:anywhere!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-invasion-card p{font-size:12px!important;line-height:1.45!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-invasion-meta{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-invasion-meta span{min-width:0!important;padding:8px!important;font-size:10px!important;overflow-wrap:anywhere!important}

/* ---------- GALAXY MAIN HEADER · v327 stack ---------- */
html.ia-real-phone-mode body #galaxyDominationOverlay .gd327-mode-stack{width:108px!important;min-width:108px!important;gap:4px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd327-mode-stack>.gd-btn{height:34px!important;min-height:34px!important;padding:5px 7px!important;font-size:9px!important;white-space:normal!important;line-height:1.05!important}
html.ia-real-phone-mode.ia-phone-portrait body #galaxyDominationOverlay .gd327-mode-stack{width:92px!important;min-width:92px!important}

/* ---------- SQUAD MANAGER + MATCH BENCH · v335/v338 ---------- */
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager{
  position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;overflow-y:auto!important;overflow-x:hidden!important;
  padding:var(--ia339-safe-top) var(--ia339-safe-right) var(--ia339-safe-bottom) var(--ia339-safe-left)!important;
  box-sizing:border-box!important;-webkit-overflow-scrolling:touch!important;overscroll-behavior:contain!important;
}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-squad-shell{
  width:100%!important;max-width:900px!important;height:auto!important;max-height:none!important;min-height:0!important;margin:0 auto 18px!important;overflow:visible!important;border-radius:15px!important;
}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-squad-head{display:flex!important;flex-wrap:wrap!important;gap:8px!important;padding:11px 12px!important;position:sticky!important;top:0!important;z-index:8!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-squad-head>div{flex:1 1 220px!important;min-width:0!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-squad-head h2{font-size:24px!important;line-height:1.05!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-squad-head small{font-size:8.5px!important;line-height:1.3!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-squad-head .gd-btn{min-height:44px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-squad-main{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;padding:8px!important;overflow:visible!important;min-height:0!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-squad-box{min-width:0!important;height:auto!important;min-height:0!important;overflow:visible!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-lineup-zone{min-height:420px!important;overflow:hidden!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-roster-pane{display:grid!important;grid-template-rows:auto auto auto auto auto!important;max-height:none!important;overflow:visible!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd335-match-bench{margin:7px!important;overflow:visible!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd335-bench-head{padding:9px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd335-bench-head b{font-size:12px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd335-bench-head span{font-size:10px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd335-bench-slots{grid-template-columns:1fr!important;gap:6px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd335-bench-slot{min-height:48px!important;padding:8px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd335-bench-slot b{font-size:12px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-bench-list{max-height:360px!important;min-height:160px!important;overflow-y:auto!important;overflow-x:hidden!important;padding:7px!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-bench-card{min-height:58px!important;padding:8px 96px 8px 8px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-bench-card b{font-size:12px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-bench-card small{font-size:9.5px!important;line-height:1.25!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd335-bench-toggle{right:7px!important;min-width:82px!important;min-height:38px!important;padding:6px!important;font-size:9px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-player-detail{max-height:none!important;overflow:visible!important;padding:11px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd335-resource-preview span{font-size:10.5px!important;line-height:1.35!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-prematch-footer{position:static!important;display:grid!important;grid-template-columns:1fr!important;gap:8px!important;padding:10px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-prematch-ready{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd-prematch-ready .gd-btn{grid-column:1/-1!important;min-height:46px!important}

/* ---------- HALFTIME · v335/v336 ---------- */
html.ia-real-phone-mode body #galaxyDominationOverlay .gd335-halftime-card{padding:15px!important;border-radius:16px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd335-halftime-card>small{font-size:9px!important;line-height:1.3!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd335-halftime-card h2{font-size:29px!important;margin:5px 0 8px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd335-half-score{gap:8px!important;margin:9px 0!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd335-half-score>b{font-size:38px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd335-half-score span{font-size:10px!important;line-height:1.35!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd335-halftime-card p{font-size:12px!important;line-height:1.43!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd335-half-actions{grid-template-columns:1fr!important;gap:7px!important;margin-top:10px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd335-half-actions .gd-btn{width:100%!important;min-height:46px!important;font-size:11px!important}

/* ---------- SUBSTITUTIONS · v335-v338 ---------- */
html.ia-real-phone-mode body #galaxyDominationOverlay .gd338-subs-card{padding:13px!important;border-radius:16px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd338-subs-card header{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd338-subs-card header>div{flex:1 1 220px!important;min-width:0!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd338-subs-card header small{font-size:9px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd338-subs-card h2{font-size:25px!important;line-height:1.05!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd338-subs-card header p{font-size:11.5px!important;line-height:1.4!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd338-subs-card header .gd-btn{min-height:44px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd335-subs-grid{grid-template-columns:1fr!important;gap:8px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd335-subs-grid section{padding:9px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd338-subs-card .gd335-sub-list{max-height:250px!important;overflow-y:auto!important;padding-right:3px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd335-sub-card{min-height:54px!important;padding:8px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd335-sub-card b{font-size:12.5px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd335-sub-card :is(small,em){font-size:9.5px!important;line-height:1.25!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd336-sub-plan{padding:9px!important;margin:8px 0!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd336-plan-row{grid-template-columns:20px minmax(0,1fr) 18px minmax(0,1fr)!important;gap:5px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd336-plan-row b{font-size:10.5px!important;white-space:normal!important;line-height:1.2!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd336-plan-actions{display:block!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd336-add-sub{width:100%!important;min-width:0!important;min-height:44px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd335-subs-status{font-size:11px!important;line-height:1.4!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gd336ConfirmSubs{min-height:46px!important;font-size:11px!important}

/* Landscape phones can profitably show the two substitution lists side by side. */
html.ia-real-phone-mode.ia-phone-landscape body #galaxyDominationOverlay .gd338-subs-card{max-width:900px!important}
html.ia-real-phone-mode.ia-phone-landscape body #galaxyDominationOverlay .gd335-subs-grid{grid-template-columns:1fr 1fr!important}
html.ia-real-phone-mode.ia-phone-landscape body #galaxyDominationOverlay .gd338-subs-card .gd335-sub-list{max-height:44dvh!important}

/* ---------- KICK OFF / SET PIECES + phone dock ---------- */
html.ia-real-phone-mode body #galaxyDominationOverlay #gd57SetPiecePanel.gd336-kickoff-panel{max-width:min(92vw,520px)!important;padding:12px!important;overflow:visible!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gd57SetPiecePanel.gd336-kickoff-panel>b{font-size:15px!important;line-height:1.25!important;white-space:normal!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gd57SetPiecePanel.gd336-kickoff-panel>#gd57ReadySetPiece{width:100%!important;min-height:44px!important;font-size:11px!important;white-space:normal!important}
html.ia-real-phone-mode body #galaxyDominationOverlay #gd57SetPiecePanel .gd335-setpiece-subs{width:100%!important;min-height:44px!important;margin-top:7px!important}
html.ia-real-phone-mode body #iaGalaxyPhoneDock .ia-gd-phone-actions :is(.ia-gd-subs,.ia-gd-tactics){min-height:44px!important;font-size:10px!important;padding:7px 9px!important;white-space:normal!important;line-height:1.15!important}

/* ---------- MODE ENCYCLOPEDIA · new long Galaxy manual ---------- */
html.ia-real-phone-mode body #iaModeEncyclopedia{position:fixed!important;inset:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:var(--ia339-safe-top) var(--ia339-safe-right) var(--ia339-safe-bottom) var(--ia339-safe-left)!important;-webkit-overflow-scrolling:touch!important}
html.ia-real-phone-mode body #iaModeEncyclopedia .ia-mode-ency-card{width:100%!important;max-width:900px!important;height:auto!important;max-height:none!important;overflow:visible!important;margin:0 auto 16px!important}
html.ia-real-phone-mode body #iaModeEncyclopedia .ia-mode-ency-head{position:sticky!important;top:0!important;z-index:5!important;display:flex!important;flex-wrap:wrap!important;gap:8px!important;padding:12px!important}
html.ia-real-phone-mode body #iaModeEncyclopedia .ia-mode-ency-head>div{flex:1 1 220px!important;min-width:0!important}
html.ia-real-phone-mode body #iaModeEncyclopedia .ia-mode-ency-head h2{font-size:23px!important;line-height:1.08!important}
html.ia-real-phone-mode body #iaModeEncyclopedia .ia-mode-ency-head p{font-size:11px!important;line-height:1.4!important}
html.ia-real-phone-mode body #iaModeEncyclopedia .ia-mode-ency-head .btn{min-height:44px!important}
html.ia-real-phone-mode body #iaModeEncyclopedia .ia-mode-ency-grid{grid-template-columns:1fr!important;gap:8px!important;padding:9px!important}
html.ia-real-phone-mode body #iaModeEncyclopedia .ia-mode-ency-section{padding:11px!important;min-width:0!important}
html.ia-real-phone-mode body #iaModeEncyclopedia .ia-mode-ency-section h3{font-size:14px!important;line-height:1.25!important}
html.ia-real-phone-mode body #iaModeEncyclopedia .ia-mode-ency-section p{font-size:11.5px!important;line-height:1.48!important}
html.ia-real-phone-mode body #iaModeEncyclopedia .gd-ency-playbook{grid-template-columns:1fr!important;gap:8px!important}
html.ia-real-phone-mode body #iaModeEncyclopedia .gd-ency-tech-grid{grid-template-columns:1fr!important;gap:6px!important}
html.ia-real-phone-mode body #iaModeEncyclopedia .gd-ency-legend{grid-template-columns:1fr!important;gap:6px!important}

/* ---------- CAREER recent narrative/debug surfaces ---------- */
html.ia-real-phone-mode body .career-v306-memory-last{
  top:50%!important;bottom:auto!important;left:50%!important;transform:translate(-50%,-50%)!important;
  width:min(92vw,640px)!important;max-height:70dvh!important;overflow-y:auto!important;padding:13px!important;
}
html.ia-real-phone-mode body .career-v306-memory-last h3{font-size:clamp(23px,6vw,32px)!important}
html.ia-real-phone-mode body .career-v306-final-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:4px!important}
html.ia-real-phone-mode body .career-v306-final-grid>span{min-width:0!important;padding:7px 3px!important}
html.ia-real-phone-mode body .career-v306-final-grid b{font-size:15px!important}
html.ia-real-phone-mode body .career-v306-final-grid em{font-size:6.5px!important;line-height:1.2!important}
html.ia-real-phone-mode body .career-v306-memory-go{min-height:44px!important;bottom:max(3%,env(safe-area-inset-bottom))!important}
html.ia-real-phone-mode body .career-v306-resolve-action{min-height:44px!important;font-size:11px!important}
html.ia-real-phone-mode body .ia306-debug-entry-actions{display:grid!important;grid-template-columns:1fr!important;gap:7px!important}
html.ia-real-phone-mode body .ia306-debug-entry-actions button{min-height:44px!important;white-space:normal!important}

/* ---------- latest Galaxy debug/test lab ---------- */
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-debug-panel{position:fixed!important;inset:auto var(--ia339-safe-right) var(--ia339-safe-bottom) var(--ia339-safe-left)!important;width:auto!important;max-width:none!important;max-height:76dvh!important;overflow-y:auto!important;padding:10px!important;border-radius:13px!important}
html.ia-real-phone-mode body #galaxyDominationOverlay .gd320-debug-panel button{min-height:42px!important;padding:7px 8px!important;font-size:9.5px!important;white-space:normal!important}

/* ---------- portrait-specific simplification ---------- */
html.ia-real-phone-mode.ia-phone-portrait body #galaxyDominationOverlay #gdSquadManager .gd-lineup-zone{min-height:480px!important}
html.ia-real-phone-mode.ia-phone-portrait body #galaxyDominationOverlay .gd320-invasion-meta{grid-template-columns:1fr!important}
html.ia-real-phone-mode.ia-phone-portrait body #galaxyDominationOverlay .gd335-half-score>b{font-size:33px!important}
html.ia-real-phone-mode.ia-phone-portrait body #galaxyDominationOverlay .gd323-tactics-card .gd320-tactic-grid button{min-height:82px!important}

/* ---------- short landscape phones ---------- */
html.ia-real-phone-mode.ia-phone-landscape body #galaxyDominationOverlay .gd323-tactics-card,
html.ia-real-phone-mode.ia-phone-landscape body #galaxyDominationOverlay .gd335-halftime-card,
html.ia-real-phone-mode.ia-phone-landscape body #galaxyDominationOverlay .gd338-subs-card{
  margin-bottom:8px!important;
}
html.ia-real-phone-mode.ia-phone-landscape body #galaxyDominationOverlay .gd323-tactics-card .gd320-tactic-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html.ia-real-phone-mode.ia-phone-landscape body #galaxyDominationOverlay .gd323-tactics-card .gd320-tactic-grid button{min-height:68px!important;padding:9px!important}
html.ia-real-phone-mode.ia-phone-landscape body #galaxyDominationOverlay .gd320-lab-body nav{max-height:82px!important}
html.ia-real-phone-mode.ia-phone-landscape body #galaxyDominationOverlay .gd320-lab-player{flex-basis:150px!important;min-height:52px!important}

/* Reduced motion does not change layout or readability. */
@media(prefers-reduced-motion:reduce){
  html.ia-real-phone-mode body #galaxyDominationOverlay :is(.gd320-overlay,.gd320-lab-overlay,.gd320-invasion-alert,.gd323-tactics-overlay,.gd335-halftime-overlay,.gd335-subs-overlay){animation:none!important}
}

/* IA V788 bundle separator: original stylesheet rules preserved */
/* InazumArcade v345 · Galaxy-only regression guard.
   Touch/readability adjustments only. No colors, borders or non-Galaxy UI. */
html.ia-real-phone-mode body #galaxyDominationOverlay .gd327-mode-stack>.gd-btn{
  height:42px!important;
  min-height:44px!important;
  padding:7px 8px!important;
  font-size:10.5px!important;
  line-height:1.1!important;
}
html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd335-bench-toggle{
  min-width:88px!important;
  min-height:42px!important;
  padding:7px 8px!important;
  font-size:10.5px!important;
  line-height:1.1!important;
}
@media(max-width:390px){
  html.ia-real-phone-mode body #galaxyDominationOverlay .gd327-mode-stack{width:98px!important;min-width:98px!important}
  html.ia-real-phone-mode body #galaxyDominationOverlay .gd327-mode-stack>.gd-btn{font-size:10px!important}
  html.ia-real-phone-mode body #galaxyDominationOverlay #gdSquadManager .gd335-bench-toggle{min-width:84px!important;font-size:10px!important}
}
