/* Profile, account and checkout views share the portal shell; these rules stay inside it. */
.portal-v2 .profile-hero-modern { min-height: 246px; margin-bottom: 0; padding: 30px; border-radius: 8px; align-items: center; background: #111a20; box-shadow: none; }
.portal-v2 .profile-hero-modern::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,rgba(11,19,24,.97),rgba(11,19,24,.7) 45%,rgba(11,19,24,.12)),linear-gradient(0deg,rgba(11,19,24,.8),transparent 65%),url('/shared/assets/portal-v2/squad.png') center 45%/cover; pointer-events: none; }
.portal-v2 .profile-hero-modern.has-game-background::before { inset: 0; background-image: linear-gradient(90deg,rgba(11,19,24,.96),rgba(11,19,24,.58) 50%,rgba(11,19,24,.18)),linear-gradient(0deg,rgba(11,19,24,.75),transparent 65%),var(--profile-game-background); background-position: center; background-size: cover; filter: none; opacity: 1; transform: none; }
html[dir=rtl] .portal-v2 .profile-hero-modern::before { background-image: linear-gradient(270deg,rgba(11,19,24,.97),rgba(11,19,24,.7) 45%,rgba(11,19,24,.12)),linear-gradient(0deg,rgba(11,19,24,.8),transparent 65%),url('/shared/assets/portal-v2/squad.png'); }
html[dir=rtl] .portal-v2 .profile-hero-modern.has-game-background::before { background-image: linear-gradient(270deg,rgba(11,19,24,.96),rgba(11,19,24,.58) 50%,rgba(11,19,24,.18)),linear-gradient(0deg,rgba(11,19,24,.75),transparent 65%),var(--profile-game-background); }
.portal-v2 .profile-hero-modern::after { display: none; }
.portal-v2 .profile-hero-modern.has-appearance-banner::before{background-image:linear-gradient(90deg,rgba(11,19,24,.9),rgba(11,19,24,.44) 50%,rgba(11,19,24,.1)),linear-gradient(0deg,rgba(11,19,24,.68),transparent 65%),var(--profile-appearance-banner);background-position:center;background-size:cover}
html[dir=rtl] .portal-v2 .profile-hero-modern.has-appearance-banner::before{background-image:linear-gradient(270deg,rgba(11,19,24,.9),rgba(11,19,24,.44) 50%,rgba(11,19,24,.1)),linear-gradient(0deg,rgba(11,19,24,.68),transparent 65%),var(--profile-appearance-banner)}
.portal-v2 .profile-theme-surface{min-width:0;position:relative;isolation:isolate}
.portal-v2 .profile-theme-surface.has-appearance-background::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background-image:linear-gradient(rgba(6,13,18,.75),rgba(6,13,18,.92)),var(--profile-appearance-page-background);background-position:center;background-size:cover}
.portal-v2 .profile-earned-appearance{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.portal-v2 .profile-earned-appearance span{font-size:10px;line-height:1.4;padding:5px 8px;border:1px solid #49786c;border-radius:5px;background:rgba(17,37,37,.76);color:#a6d6cc;overflow-wrap:anywhere}
.portal-v2 .settings-appearance-editor{display:block}
.portal-v2 .appearance-save-row .button{min-height:38px}
.portal-v2 .profile-hero-modern .hero-identity { align-items: center; gap: 24px; width: 100%; }
.portal-v2 .profile-hero-modern .profile-avatar { display: flex; align-items: center; justify-content: center; flex: none; position: relative; overflow: visible; width: 112px; height: 112px; border-radius: 12px; font-size: 40px; line-height: 1; border-color: #745335; background: #30251c; box-shadow: none; }
.portal-v2 .profile-hero-modern .profile-avatar > span { display: block; margin: 0; padding: 0; max-width: 100%; line-height: 1; white-space: nowrap; }
.portal-v2 .profile-hero-modern .hero-avatar-image { flex: none; width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: inherit; }
.portal-v2 .profile-hero-modern .profile-avatar:has(.avatar-upload) { margin-block-end: 52px; }
.portal-v2 .profile-identity-copy { min-width: 0; }
.portal-v2 .profile-hero-modern .hero-kicker { font-size: 10px; letter-spacing: .16em; margin-bottom: 15px; }
.portal-v2 .profile-hero-modern .hero-title { font-family: Bahnschrift,"Arial Narrow",Arial,sans-serif; font-size: clamp(32px,4vw,48px); margin-bottom: 12px; line-height: 1.12; }
.portal-v2 .profile-hero-modern .hero-meta { font-size: 11px; margin-top: 7px; color: #c2cdd2; }
.portal-v2 .profile-current-rank { color: var(--gold) !important; }
.portal-v2 .profile-cover-actions { position: absolute; inset-block-start: 18px; inset-inline-end: 18px; display: flex; gap: 7px; z-index: 2; }
.portal-v2 .profile-cover-actions .button { min-height: 32px; padding: 6px 11px; font-size: 11px; background: rgba(13,20,25,.68); }
.portal-v2 .profile-cover-actions .share-feedback { top: 39px; }
.portal-v2 .profile-hero-modern .avatar-upload { inset: calc(100% + 8px) 0 auto; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 5px; background: rgba(8,11,15,.82); font-size: 11px; line-height: 1.25; opacity: 1; }
.portal-v2 .profile-hero-modern .avatar-upload input { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; margin: 0; padding: 0; cursor: pointer; }
.portal-v2 .profile-hero-modern .avatar-upload:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.portal-v2 .profile-tabs { margin: 20px 0; padding: 0; gap: 24px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.portal-v2 .profile-tabs a { position: relative; padding: 0 0 14px; border-radius: 0; font-size: 12px; white-space: nowrap; }
.portal-v2 .profile-tabs a[aria-selected="true"] { color: var(--text); background: transparent; box-shadow: inset 0 -2px 0 var(--accent); }
.portal-v2 .profile-tabs a:hover { background: transparent; color: var(--accent); }
.portal-v2 .profile-tab-count { color: var(--muted); font-size: 10px; margin-inline-start: 6px; }
.portal-v2 .profile-stat-grid { grid-template-columns: repeat(4,minmax(0,1fr)); margin-bottom: 18px; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.portal-v2 .profile-stat-grid .stat { min-width: 0; border: 0; border-inline-end: 1px solid var(--line); border-radius: 0; background: none; padding: 17px 21px; }
.portal-v2 .profile-stat-grid .stat:last-child { border-inline-end: 0; }
.portal-v2 .profile-stat-grid .label { font-size: 10px; letter-spacing: .05em; }
.portal-v2 .profile-stat-grid .value { margin-top: 9px; font: 700 28px/1.15 Bahnschrift,"Segoe UI",sans-serif; overflow-wrap: anywhere; }
.portal-v2 .profile-overview-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; }
.portal-v2 .profile-overview-grid > .panel { margin-bottom: 18px; }
.portal-v2 .profile-rank-panel h3 { margin: 17px 0 14px; font-size: 16px; }
.portal-v2 .profile-rank-panel .progress { margin: 18px 0 13px; height: 5px; }
.portal-v2 .profile-rank-panel > p { font-size: 11px; margin: 12px 0 0; }
.portal-v2 .profile-progress-notes { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10px; }
.portal-v2 .profile-progress-notes b { color: var(--text); margin-inline-start: 6px; }
.portal-v2 .profile-collection .panel-heading-row a { color: var(--muted); font-size: 11px; }
.portal-v2 .profile-collection-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 16px; }
.portal-v2 .profile-mini-item { display: grid; align-content: start; min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: #10191e; text-align: center; }
.portal-v2 .profile-mini-item,.portal-v2 .profile-tabs a { text-decoration: none; }
.portal-v2 .profile-mini-item img { width: 100%; height: 76px; object-fit: contain; }
.portal-v2 .profile-mini-item .profile-inventory-fallback { height: 76px; display: grid; place-items: center; }
.portal-v2 .profile-mini-item .profile-inventory-fallback[hidden] { display: none; }
.portal-v2 .profile-mini-item b { margin-top: 8px; color: var(--text); font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.portal-v2 .profile-inventory-grid { grid-template-columns: repeat(auto-fill,minmax(min(100%,180px),1fr)); gap: 13px; }
.portal-v2 .profile-inventory-card { border-radius: 8px; background: var(--surface); }
.portal-v2 .profile-inventory-visual { height: 154px; background: radial-gradient(ellipse at 50% 70%,#263d4959,transparent 70%),#10191e; }
.portal-v2 .profile-inventory-card.is-vip .profile-inventory-visual { background: radial-gradient(ellipse at 50% 70%,#6c442d45,transparent 70%),#10191e; }
.portal-v2 .profile-inventory-copy { padding: 13px; }
.portal-v2 .profile-inventory-copy h3 { font-size: 12px; }
.portal-v2 .profile-invites h2,.portal-v2 .profile-notifications h2 { margin-bottom: 14px; }
.portal-v2 .profile-invite { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin: 8px 0; }
.portal-v2 .profile-invite > div:first-child { display: grid; min-width: 0; gap: 4px; }
.portal-v2 .profile-invite span,.portal-v2 .profile-invite small { color: var(--muted); font-size: 11px; }
.portal-v2 .profile-invite b { overflow-wrap: anywhere; }
.portal-v2 .profile-invite-actions { display: flex; flex: none; flex-wrap: wrap; gap: 8px; }
.portal-v2 .profile-notifications .notice { margin-top: 9px; }
.portal-v2 .settings-page { max-width: none; margin-bottom: 30px; }
.portal-v2 .settings-heading { margin: 0 0 24px; }
.portal-v2 .settings-heading h1 { font-size: clamp(28px,4vw,40px); }
.portal-v2 .settings-card { padding: 21px; border-radius: 8px; background: var(--surface); border-color: var(--line); }
.portal-v2 .settings-card h2 { font-size: 17px; }
.portal-v2 .settings-card p { font-size: 12px; }
.portal-v2 .settings-kicker { font-size: 10px; color: var(--muted) !important; }
.portal-v2 .settings-tier-card { display: grid; grid-template-columns: minmax(0,1.2fr) auto minmax(150px,.9fr); gap: 18px; align-items: center; }
.portal-v2 .settings-tier h2 { color: var(--gold); font-size: 23px; }
.portal-v2 .settings-tier p { margin: 8px 0 0; max-width: 280px; font-size: 11px; }
.portal-v2 .settings-spend { flex-wrap: nowrap; gap: 22px; margin: 0; }
.portal-v2 .settings-spend b { font-size: 19px; white-space: nowrap; }
.portal-v2 .settings-spend span { font-size: 10px; }
.portal-v2 .settings-progress { height: 5px; }
.portal-v2 .settings-progress i { background: var(--accent); }
.portal-v2 .settings-perks { grid-column: 1 / -1; gap: 8px; margin-top: 0; }
.portal-v2 .settings-perks span { padding: 5px 8px; border-radius: 4px; font-size: 10px; }
.portal-v2 .settings-field input { border-radius: 6px; background: #0c1215; }
.portal-v2 .settings-voucher-form { max-width: none; }
.portal-v2 .settings-voucher-form .settings-field { margin-top: 6px; }
.portal-v2 .settings-voucher-history { margin-top: 17px; padding-top: 13px; }
.portal-v2 .settings-voucher-history h3 { font-size: 12px; }
.portal-v2 .settings-voucher-history p { margin: 8px 0 0; }
.portal-v2 .settings-email-details > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 15px; cursor: pointer; }
.portal-v2 .settings-email-details > summary::-webkit-details-marker { display: none; }
.portal-v2 .settings-email-details > summary > span { font-size: 11px; white-space: nowrap; color: var(--muted); }
.portal-v2 .settings-email-details .settings-current { display: block; margin: 5px 0 0; font-size: 12px; }
.portal-v2 .settings-email-content { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 17px; }
.portal-v2 .settings-email-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(130px,.6fr); }
.portal-v2 .settings-email-grid .settings-code { grid-column: auto; max-width: none; }
.portal-v2 .settings-appearance { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.portal-v2 .settings-appearance p { margin: 0; }
.portal-v2 .settings-appearance .button { flex: none; }
.portal-v2 .payment-page { max-width: none; }
.portal-v2 .payment-layout { max-width: none; margin-inline: 0; grid-template-columns: minmax(0,1fr) 278px; gap: 18px; }
.portal-v2 .payment-main { gap: 20px; }
.portal-v2 .payment-balance { padding-bottom: 14px; font-size: 12px; }
.portal-v2 .payment-balance strong { font-size: 16px; }
.portal-v2 .payment-packages { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.portal-v2 .payment-package { min-width: 0; min-height: 154px; gap: 15px; padding: 15px; border-radius: 7px; background: #10191e; box-shadow: none; }
.portal-v2 .payment-package.active { box-shadow: none; background: rgba(255,102,57,.055); }
.portal-v2 .payment-package-name { font-size: 11px; }
.portal-v2 .payment-package strong { font: 700 29px/1.1 Bahnschrift,"Segoe UI",sans-serif; }
.portal-v2 .payment-package strong small { display: block; margin-top: 5px; color: var(--muted); font: 600 10px/1 "Segoe UI",sans-serif; }
.portal-v2 .payment-package-price { font-size: 14px; }
.portal-v2 .payment-bonus { top: 12px; right: 12px; font-size: 9px; }
.portal-v2 .payment-selection { position: sticky; top: 92px; display: grid; gap: 16px; }
.portal-v2 .payment-selection h2 { margin: 0; }
.portal-v2 .payment-selected-name { font-size: 12px; color: var(--muted); }
.portal-v2 .payment-selected-ud { font: 700 30px/1.15 Bahnschrift,"Segoe UI",sans-serif; }
.portal-v2 .payment-summary-row { gap: 15px; font-size: 12px; }
.portal-v2 .payment-promo-hint,.portal-v2 .payment-provider-note { font-size: 11px; margin: 0; line-height: 1.6; }
.portal-v2 .payment-terms { font-size: 11px; }
.portal-v2 .payment-terms input { width: 16px; height: 16px; flex: none; padding: 0; min-height: 0; }
.portal-v2 .payment-review-dialog { width: min(500px,calc(100% - 28px)); max-height: calc(100svh - 40px); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--surface); box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.portal-v2 .payment-review-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.portal-v2 .payment-review-body { padding: 26px; }
.portal-v2 .payment-review-body h2 { font-size: 24px; margin: 0 0 20px; }
.portal-v2 .payment-review-body .payment-actions { justify-content: end; margin-top: 20px; }
.portal-v2 .auth-shell { display: grid; grid-template-columns: minmax(0,1fr) minmax(360px,480px); align-items: center; max-width: 1000px; min-height: 570px; margin: 30px auto; padding: 24px; gap: 36px; }
.portal-v2 .auth-art { min-height: 410px; height: 100%; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(0deg,#11191de8,transparent 75%),url('/shared/assets/portal-v2/squad.png') 58% center/cover; display: flex; align-items: end; padding: 24px; }
.portal-v2 .auth-art img { width: 165px; max-height: 42px; object-fit: contain; }
.portal-v2 .auth-card { width: 100%; border-radius: 10px; padding: 30px; box-shadow: none; background: var(--surface); border-color: var(--line); }
.portal-v2 .auth-card h1 { font-size: 30px; margin-bottom: 12px; }
.portal-v2 .auth-card .auth-sub { font-size: 12px; line-height: 1.7; }
.portal-v2 .character-shell { border-radius: 10px; background: var(--surface); border: 1px solid var(--line); padding: 28px; }
.portal-v2 .profile-directory-table .row-link { display: block; overflow-wrap: anywhere; }
.portal-v2 .profile-directory-table .player-medal { display: block; margin-top: 5px; }
.portal-v2 .profile-directory-table .clan-name { display: grid; gap: 5px; }
.portal-v2 .profile-clan-level { display: none; font-size: 10px; color: var(--muted); }
.portal-v2 #sort-tabs { margin: 0; gap: 18px; flex-wrap: nowrap; max-width: 100%; }
.portal-v2 #pager { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 10px; font-size: 11px; }
@media(max-width:1180px) {
  .portal-v2 .settings-tier-card { grid-template-columns: 1fr 1fr; }
  .portal-v2 .settings-tier-progress { grid-column: 1 / -1; }
  .portal-v2 .payment-layout { grid-template-columns: minmax(0,1fr) 230px; }
  .portal-v2 .payment-packages { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:760px) {
  .portal-v2 .profile-hero-modern { min-height: 240px; padding: 54px 20px 24px; }
  .portal-v2 .profile-hero-modern .hero-identity { gap: 16px; }
  .portal-v2 .profile-hero-modern .profile-avatar { width: 88px; height: 88px; border-radius: 9px; font-size: 32px; }
  .portal-v2 .profile-hero-modern .hero-kicker { font-size: 9px; }
  .portal-v2 .profile-cover-actions { inset-block-start: 10px; inset-inline-end: 10px; }
  .portal-v2 .profile-tabs { gap: 23px; margin: 18px 0; }
  .portal-v2 .profile-tabs a { font-size: 11px; padding-bottom: 13px; }
  .portal-v2 .profile-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .portal-v2 .profile-stat-grid .stat { padding: 15px 17px; }
  .portal-v2 .profile-stat-grid .stat:nth-child(2) { border-inline-end: 0; }
  .portal-v2 .profile-stat-grid .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .portal-v2 .profile-stat-grid .value { font-size: 26px; }
  .portal-v2 .profile-overview-grid { grid-template-columns: 1fr; gap: 0; }
  .portal-v2 .profile-inventory-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .portal-v2 .profile-inventory-visual { height: 130px; }
  .portal-v2 .profile-inventory-copy { padding: 11px; }
  .portal-v2 .profile-inventory-copy h3 { font-size: 11px; }
  .portal-v2 .profile-invite { flex-direction: column; align-items: start; }
  .portal-v2 .profile-invite-actions { width: 100%; }
  .portal-v2 .settings-card { padding: 17px; }
  .portal-v2 .settings-heading { gap: 12px; }
  .portal-v2 .settings-heading .button { padding: 7px 10px; font-size: 10px; }
  .portal-v2 .settings-tier-card { grid-template-columns: 1fr; gap: 17px; }
  .portal-v2 .settings-spend { justify-content: space-between; }
  .portal-v2 .settings-email-grid { grid-template-columns: 1fr; }
  .portal-v2 .settings-email-details > summary { align-items: start; gap: 12px; }
  .portal-v2 .settings-appearance { flex-wrap: wrap; }
  .portal-v2 .payment-layout { grid-template-columns: 1fr; }
  .portal-v2 .payment-selection { position: static; gap: 13px; }
  .portal-v2 .payment-package { min-height: 148px; padding: 13px; }
  .portal-v2 .payment-package strong { font-size: 27px; }
  .portal-v2 .payment-main { gap: 18px; }
  .portal-v2 .payment-toolbar { gap: 13px; align-items: start; }
  .portal-v2 .payment-toolbar .input { min-width: 0; width: 125px; }
  .portal-v2 .payment-promo-entry { flex-wrap: nowrap; }
  .portal-v2 .payment-promo-entry .button { width: auto; }
  .portal-v2 .payment-review-body { padding: 22px 18px; }
  .portal-v2 .auth-shell { display: block; margin: 24px auto; padding: 0 15px; min-height: 0; }
  .portal-v2 .auth-art { min-height: 135px; margin-bottom: 15px; padding: 19px; background-position: 58% 40%; }
  .portal-v2 .auth-art img { width: 130px; }
  .portal-v2 .auth-card { padding: 24px 20px; }
  .portal-v2 .character-shell { padding: 20px 16px; margin: 22px 15px; }
  .portal-v2 .profile-directory-table .profile-secondary { display: none; }
  .portal-v2 .profile-clan-level { display: block; }
  .portal-v2 .profile-directory-table th,.portal-v2 .profile-directory-table td { padding: 13px 9px; }
  .portal-v2 .profile-directory-table .rank-cell { width: 30px; }
  .portal-v2 .profile-directory-table .row-link { font-size: 12px; }
  .portal-v2 #sort-tabs { gap: 18px; }
  .portal-v2 #sort-tabs button { font-size: 10px; white-space: nowrap; }
  .portal-v2 #pager { justify-content: start; }
}
@media(max-width:370px) {
  .portal-v2 .profile-hero-modern { padding-inline: 15px; }
  .portal-v2 .profile-hero-modern .hero-title { font-size: 29px; }
  .portal-v2 .profile-stat-grid .value { font-size: 23px; }
  .portal-v2 .profile-mini-item img,.portal-v2 .profile-mini-item .profile-inventory-fallback { height: 58px; }
  .portal-v2 .profile-mini-item { padding: 6px; }
  .portal-v2 .profile-mini-item b { font-size: 9px; }
  .portal-v2 .settings-email-details > summary { flex-wrap: wrap; }
  .portal-v2 .payment-package-name { font-size: 10px; }
  .portal-v2 .payment-package strong { font-size: 24px; }
  .portal-v2 .payment-bonus { top: 10px; right: 8px; font-size: 8px; }
}

/* Login geometry is present in the HTML before session lookup completes. */
body.portal-login main.auth-shell.v2-page{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,480px);align-content:center;align-items:center;justify-content:stretch;min-height:570px;gap:36px}
body.portal-login .auth-art{position:relative;height:440px;min-height:440px;overflow:hidden;background:#10191d}
body.portal-login .auth-art::after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#11191de8,transparent 75%);pointer-events:none}
body.portal-login .auth-art .auth-scene{position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:cover;object-position:58% center;opacity:0;transition:opacity .15s}
body.portal-login .auth-art .auth-scene.is-loaded{opacity:1}
body.portal-login .auth-art .auth-wordmark{position:relative;z-index:1}
body.portal-login .topnav.v2-topbar .topnav-preferences{display:flex}
@media(max-width:760px){body.portal-login main.auth-shell.v2-page{display:block;min-height:0}body.portal-login .auth-art{height:155px;min-height:155px}body.portal-login .auth-art .auth-scene{object-position:58% 40%}}
