/* VALBLOX account modal (layout-v2 preview): assets/js/vb-account.js inside the shared dialog (vb-modal.css), over
   pages.css (vb-pages.css). Every colour is a token (styles.css :root, re-set by vb-palette.css), so the modal reads
   right under every palette; where a pages.css part it uses has a written surface value (the sunk stat tiles, the
   switches, the field, the even table rows, the XP fill), it is re-set here from the tokens. The frames stay the
   site's own: the dialog's forged rim, the plates' rims and bevels, the bronze level medallion, the rank gems
   (in each rank's identity colour, kept calm: see the ranks below).
   Desktop: one height for every tab (the dialog does not jump), a rail of tabs on the left with Sign out at its foot,
   the pane on the right behind a carved seam; only the pane scrolls. The pane is the "page" container, so pages.css's
   narrow rules (table rows that stack) follow its width. 760px and under: the tabs are one row that scrolls sideways,
   under the dialog's head. */

.vbm--account {
  --vbm-w: 1040px;
  --vba-sunk: linear-gradient(180deg, var(--track) 0%, var(--avatar-bg) 100%);
  --vba-fill: linear-gradient(180deg, var(--lilac-light) 0 30%, var(--lilac) 30% 70%, var(--lilac-deep) 70% 100%);
}
.vbm--account .vbm__dlg { height: min(780px, calc(100vh - 48px)); height: min(780px, calc(100dvh - 48px)); }
.vbm--account .vbm__body { display: flex; padding: 0; overflow: hidden; }

.vba { flex: 1; min-width: 0; min-height: 0; display: grid; grid-template: minmax(0, 1fr) / 220px minmax(0, 1fr); }

/* ---------------------------------------------------------------- the rail */
.vba-nav { min-height: 0; display: flex; flex-direction: column; gap: 16px; padding: 22px 18px 22px 22px; overflow: auto; scrollbar-width: none; }
.vba-tabs { display: flex; flex-direction: column; gap: 8px; }
.vba-tab, .vba-out { width: 100%; height: 46px; justify-content: flex-start; gap: 12px; padding: 0 14px 4px; font-size: 14px; letter-spacing: 1.1px; --c: 10px; --n: 4px; }
.vba-tab .ic, .vba-out .ic { width: 19px; height: 19px; flex: none; color: var(--muted); }
.vba-tab span, .vba-out span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.vba-tab[aria-selected="true"] {
  color: var(--lilac-light); --rim: rgba(var(--lilac-rgb), .75);
  --face: linear-gradient(90deg, rgba(var(--lilac-rgb), .2) 0%, rgba(var(--lilac-rgb), .04) 100%), var(--raised);
  --glow: inset 0 0 14px rgba(var(--lilac-rgb), .2); text-shadow: 0 0 10px rgba(var(--lilac-rgb), .45);
}
.vba-tab[aria-selected="true"] .ic { color: var(--lilac); }
.vba-out { margin-top: auto; color: var(--salmon); --face: var(--vba-sunk); --bt: rgba(var(--lo), .5); --bb: rgba(var(--hi), .3); }
.vba-out .ic { color: var(--salmon); }
.vba-out:not(:disabled):hover { --rim: rgba(var(--salmon-rgb), .55); }

/* ---------------------------------------------------------------- the pane */
.vba-panes {
  position: relative; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 24px 26px 28px 28px;
  container: page / inline-size; scrollbar-width: thin; scrollbar-color: var(--avatar-border) transparent;
  box-shadow: inset 2px 0 0 var(--rule), inset 3px 0 0 rgba(var(--hi), .35);   /* the carved seam, as under the head */
}
.vba-pane { display: flex; flex-direction: column; gap: 22px; outline: none; }
.vba-pane > .shead { margin-bottom: -6px; }

/* pages.css parts with written surfaces: the same parts from the tokens */
.vbm--account .stat > .plate, .vbm--account .pnl--sunk > .plate, .vbm--account .minput { --face: var(--vba-sunk); }
.vbm--account .sw::before { background: var(--vba-sunk); }
.vbm--account .dtab__row:nth-child(even) > .plate { --face: linear-gradient(var(--raised-b) 0%, var(--chat-card) 100%); }
.vbm--account .xp__track i { background: var(--vba-fill); }
.vbm--account .stat__v small { font-size: 13px; font-weight: 400; letter-spacing: .3px; color: var(--muted); }

.vba-wait { opacity: .8; }
.vba-fail { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-bottom: 18px; }
.vba-foot, .vba-txt { font-family: "Skranji", sans-serif; font-size: 13px; line-height: 19px; letter-spacing: .3px; color: var(--muted); }
.vba-foot b, .vba-txt b { font-weight: 700; color: var(--white); }
.vba-foot a { color: var(--lilac); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(var(--lilac-rgb), .4); }
.vba-foot a:hover { color: var(--lilac-light); }
.vba-plus { color: var(--green) !important; }
.vba-minus { color: var(--white); }
.vba-dim { color: var(--muted) !important; }
.vba-gold { color: var(--gold) !important; }
.vba-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--green); }
.vba-ok .ic { width: 15px; height: 15px; flex: none; }
.vba-copy.is-copied { color: var(--green); }

/* ---------------------------------------------------------------- Account: who */
.vba-who { display: flex; align-items: center; gap: 16px; min-width: 0; }
.vba-who__av { width: 64px; height: 64px; padding: 3px; flex: none; }
.vba-who__av img { width: 58px; height: 58px; }
.vba-who__txt { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vba-who__name {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 24px; line-height: 30px; letter-spacing: 1.2px;
  color: var(--player); text-transform: uppercase; text-shadow: 0 0 10px rgba(var(--player-glow), .3);
}
.vba-who__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font-family: "Skranji", sans-serif; font-size: 13px; line-height: 20px; letter-spacing: .3px; color: var(--muted); }
.vba-who__meta b { font-weight: 700; color: var(--white); }
.vba-who__id { display: inline-flex; align-items: center; gap: 6px; }
.vba-who__id .btn--sq { width: 26px; height: 26px; --c: 6px; }
.vba-who__id .btn--sq .ic { width: 13px; height: 13px; }

/* ---------------------------------------------------------------- Account: level (the pane's one heavy panel) */
.vba-lvl { padding: 24px 26px 22px 24px; outline: none; }
.vba-lvl > .plate {
  --face:
    radial-gradient(46% 110% at 0% 0%, rgba(var(--lilac-rgb), .09) 0%, rgba(var(--lilac-rgb), 0) 100%),
    radial-gradient(40% 90% at 100% 100%, rgba(var(--gold-rgb), .06) 0%, rgba(var(--gold-rgb), 0) 100%),
    linear-gradient(122deg, var(--card) 0%, var(--card-b) 100%);
}
.vba-lvl:focus-visible > .plate { --rim: var(--lilac); }
.vba-lvl__main {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: "badge who perks" "badge xp perks";
  column-gap: 24px; row-gap: 12px; align-items: end;
}
.vba-lvl__who { grid-area: who; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vba-lvl__xp { grid-area: xp; align-self: start; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.vba-lvl__t { font-size: 20px; line-height: 26px; letter-spacing: 1.1px; color: var(--white); text-transform: uppercase; }
.vba-lvl__rank { color: rgb(var(--rk-rgb)); text-shadow: 0 0 10px rgba(var(--rk-rgb), .3); }
.vba-lvl__dot { color: var(--muted); }
/* under the bar: the XP on the left, the next level on the right, never wrapped (the title already names this level,
   so pages.css's left label steps out: high levels have long XP numbers) */
.vba-lvl .xp__lbls { display: flex; justify-content: space-between; gap: 12px; white-space: nowrap; }
.vba-lvl .xp__lbls > :first-child { display: none; }
.vba-lvl__hint { font-family: "Skranji", sans-serif; font-size: 13px; line-height: 19px; letter-spacing: .3px; color: var(--muted); }
.vba-lvl__hint b { font-weight: 700; color: var(--white); }
.vba-lvl__perks { grid-area: perks; align-self: stretch; display: flex; align-items: center; gap: 20px; min-width: 0; }
.vba-lvl__perks::before { content: ""; flex: none; align-self: stretch; width: 2px; background: var(--rule); box-shadow: 1px 0 0 rgba(var(--hi), .35); }   /* the carved seam */

/* the level medallion: a bronze octagon (rim, eight bevel facets lit from the top-left, dark face), as on rewards.html */
.vba-badge {
  grid-area: badge; align-self: center; position: relative; isolation: isolate; width: 96px; height: 96px; display: grid; place-content: center; justify-items: center;
  --k: 28px; --ki: calc(var(--k) - 2px * .4142); --kf: calc(var(--ki) + 7px * .4142);
  background: var(--bz5);
  clip-path: polygon(var(--k) 0, calc(100% - var(--k)) 0, 100% var(--k), 100% calc(100% - var(--k)), calc(100% - var(--k)) 100%, var(--k) 100%, 0 calc(100% - var(--k)), 0 var(--k));
}
.vba-badge::before, .vba-badge::after { content: ""; position: absolute; z-index: -1; }
.vba-badge::before {
  inset: 2px;
  background: conic-gradient(from -22.5deg, var(--bz1) 0 45deg, var(--bz2) 45deg 90deg, var(--bz4) 90deg 135deg, var(--bz5) 135deg 225deg,
                             var(--bz4) 225deg 270deg, var(--bz2) 270deg 315deg, var(--bz0) 315deg 360deg);
  clip-path: polygon(var(--ki) 0, calc(100% - var(--ki)) 0, 100% var(--ki), 100% calc(100% - var(--ki)), calc(100% - var(--ki)) 100%, var(--ki) 100%, 0 calc(100% - var(--ki)), 0 var(--ki));
}
.vba-badge::after {
  inset: 9px;
  background: radial-gradient(70% 70% at 50% 38%, rgba(var(--lilac-rgb), .2) 0%, rgba(var(--lilac-rgb), 0) 100%), linear-gradient(180deg, var(--avatar-bg) 0%, var(--hero-dark) 100%);
  box-shadow: inset 0 2px 0 rgba(var(--lo), .8);
  clip-path: polygon(calc(var(--kf) - 7px) 0, calc(100% - var(--kf) + 7px) 0, 100% calc(var(--kf) - 7px), 100% calc(100% - var(--kf) + 7px),
                     calc(100% - var(--kf) + 7px) 100%, calc(var(--kf) - 7px) 100%, 0 calc(100% - var(--kf) + 7px), 0 calc(var(--kf) - 7px));
}
.vba-badge__n { font-family: "Skranji", sans-serif; font-weight: 700; font-size: 34px; line-height: 36px; letter-spacing: 1px; color: var(--level-low); text-shadow: 0 0 14px color-mix(in srgb, currentColor 45%, transparent), 0 2px 0 rgba(var(--lo), .8); }
.vba-badge.lvl--mid .vba-badge__n { color: var(--level-mid); }
.vba-badge.lvl--high .vba-badge__n { color: var(--level-high); }
.vba-badge__k { margin-top: 1px; font-size: 10px; line-height: 12px; letter-spacing: 1.3px; color: var(--muted); text-transform: uppercase; }

/* perks now and at the next rank */
.vba-perks { flex: 1; min-width: 0; border-collapse: collapse; font-family: "Skranji", sans-serif; }
.vba-perks th, .vba-perks td { padding: 5px 0 6px; text-align: left; font-weight: 400; white-space: nowrap; }
.vba-perks td { padding-left: 12px; }
.vba-perks thead th { padding-top: 0; padding-bottom: 8px; font-family: "GoldenSmile", sans-serif; font-size: 13px; line-height: 16px; letter-spacing: 1px; color: var(--white); text-transform: uppercase; }
.vba-perks thead th:not(:first-child) { padding-left: 12px; }
.vba-perks thead th small { display: block; font-family: "Skranji", sans-serif; font-size: 11px; letter-spacing: .4px; color: var(--muted); text-transform: none; }
.vba-perks thead th[class^="rk-"] { color: rgb(var(--rk-rgb)); }   /* each rank in its identity colour */
.vba-perks tbody tr + tr > * { box-shadow: inset 0 1px 0 rgba(var(--hi), .45); }
.vba-perks tbody th { font-size: 13px; letter-spacing: .4px; color: var(--muted); }
.vba-perks tbody td { font-weight: 700; font-size: 14px; letter-spacing: .5px; color: var(--white); }
.vba-perks tbody td:nth-child(3) { color: var(--gold); }

/* the six ranks: a carved track through six gems. Each rank has one identity colour everywhere (as on rewards.html): the
   token --rank-<rank>-rgb (styles.css :root, the same under every palette), through the class rk-<rank>. Calm on purpose,
   one strong rank colour at a time: the ranks behind you in their colour at a lower value and saturation, yours in its
   full colour inside the highlight's ring, the ranks ahead iron with their names only faintly tinted. The track: a quiet
   line up to your rank, the highlight for the way to the next. */
.vbm--account .rk-thrall { --rk-rgb: var(--rank-thrall-rgb); }
.vbm--account .rk-karl { --rk-rgb: var(--rank-karl-rgb); }
.vbm--account .rk-huscarl { --rk-rgb: var(--rank-huscarl-rgb); }
.vbm--account .rk-jarl { --rk-rgb: var(--rank-jarl-rgb); }
.vbm--account .rk-konung { --rk-rgb: var(--rank-konung-rgb); }
.vbm--account .rk-einherjar { --rk-rgb: var(--rank-einherjar-rgb); }
.vba-ranks {
  list-style: none; position: relative; margin: 22px 0 0; padding: 18px 0 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  box-shadow: inset 0 1px 0 var(--rim-iron), inset 0 2px 0 rgba(var(--hi), .5);
}
.vba-ranks::before {
  content: ""; position: absolute; top: 28px; left: calc(100% / 12); right: calc(100% / 12); height: 4px;
  background: linear-gradient(90deg, color-mix(in oklab, var(--muted) 45%, var(--track)) 0 var(--done), var(--lilac) var(--done) var(--prog), transparent var(--prog)), var(--track);
  box-shadow: inset 0 1px 0 rgba(var(--lo), .8);
}
.vba-rank { --rk: rgb(var(--rk-rgb)); position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.vba-rank__gem { position: relative; width: 24px; height: 24px; margin-bottom: 4px; }
.vba-rank__gem i {
  position: absolute; inset: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  background: conic-gradient(var(--g1) 0 90deg, var(--g4) 90deg 180deg, var(--g3) 180deg 270deg, var(--g0) 270deg 360deg);
}
.vba-rank__gem i::before { content: ""; position: absolute; inset: 4.5px; background: var(--g2); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
/* the facets, lit from the top-left: g0 top-left (lightest), g1 top-right, g2 the table, g3 bottom-left, g4 bottom-right */
.vba-rank.is-done {
  --g0: color-mix(in oklab, var(--rk) 50%, var(--iron-hi2)); --g1: color-mix(in oklab, var(--rk) 44%, var(--iron-hi1));
  --g2: color-mix(in oklab, var(--rk) 40%, var(--iron-hi1)); --g3: color-mix(in oklab, var(--rk) 32%, var(--iron-lo1));
  --g4: color-mix(in oklab, var(--rk) 26%, var(--iron-lo2));
}
.vba-rank.is-now {
  --g0: color-mix(in oklab, var(--rk) 55%, var(--white)); --g1: color-mix(in oklab, var(--rk) 78%, var(--white)); --g2: var(--rk);
  --g3: color-mix(in oklab, var(--rk) 62%, var(--iron-lo2)); --g4: color-mix(in oklab, var(--rk) 40%, var(--iron-lo2));
}
.vba-rank.is-now .vba-rank__gem { filter: drop-shadow(0 0 6px rgba(var(--lilac-rgb), .45)); }
.vba-rank.is-now .vba-rank__gem::before {   /* the highlight's ring: a 2px diamond outline, 3px clear of the gem */
  content: ""; position: absolute; inset: -6px; background: var(--lilac);
  clip-path: polygon(evenodd, 50% 0, 100% 50%, 50% 100%, 0 50%, 50% 0, 50% 2.83px, 2.83px 50%, 50% calc(100% - 2.83px), calc(100% - 2.83px) 50%, 50% 2.83px);
}
.vba-rank.is-next { --g0: var(--iron-hi2); --g1: var(--iron-hi1); --g2: var(--raised-b); --g3: var(--iron-lo1); --g4: var(--iron-lo2); }
.vba-rank__name { max-width: 100%; overflow-wrap: anywhere; font-size: 13px; line-height: 16px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.vba-rank__lv { font-family: "Skranji", sans-serif; font-size: 12px; line-height: 15px; letter-spacing: .3px; color: var(--muted); opacity: .75; }
.vba-rank.is-done .vba-rank__name { color: color-mix(in oklab, var(--rk) 58%, var(--muted)); }
.vba-rank.is-now .vba-rank__name { color: var(--rk); text-shadow: 0 0 10px rgba(var(--rk-rgb), .35); }
.vba-rank.is-now .vba-rank__lv { color: var(--lilac-light); opacity: 1; }
.vba-rank.is-next .vba-rank__name { color: color-mix(in oklab, var(--rk) 16%, var(--muted)); }

.vba-lvl__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-top: 18px; }
.vba-lvl__foot p { font-family: "Skranji", sans-serif; font-size: 13px; line-height: 18px; letter-spacing: .3px; color: var(--muted); }
/* the coins to the next rank, one line under the track, a link to the ladder on rewards.html#vip */
.vba-vip { margin-top: 16px; }
.vba-vip a {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; text-decoration: none;
  font-family: "Skranji", sans-serif; font-size: 14px; line-height: 18px; letter-spacing: .3px; color: var(--muted);
  background: rgba(var(--hi), .22); box-shadow: inset 0 1px 0 rgba(var(--hi), .45), inset 0 -1px 0 rgba(var(--lo), .6);
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
}
.vba-vip a > .ic { flex: none; width: 16px; height: 16px; color: var(--gold); }
.vba-vip a > span:first-of-type { flex: 1 1 auto; min-width: 0; }
.vba-vip b { font-weight: 700; color: var(--white); }
.vba-vip [class^="rk-"] { color: rgb(var(--rk-rgb)); }
.vba-vip__go { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; letter-spacing: .4px; color: var(--lilac-light); }
.vba-vip__go .ic { width: 12px; height: 12px; }
.vba-vip a:hover { background: rgba(var(--lilac-rgb), .1); }
.vba-vip a:hover .vba-vip__go { color: var(--white); }
.vba-vip a:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--lilac); }   /* the clip-path would cut an outline */

.vba-stats .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.vba-note { margin-top: 12px; }

/* ---------------------------------------------------------------- tables, filters */
.vba-filter { grid-auto-columns: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.vba-filter .btn { padding: 0 14px 4px; }
.vba-pick { height: 40px; min-width: 200px; padding-right: 12px; position: relative; }
.vba-pick select { appearance: none; -webkit-appearance: none; padding-right: 22px; line-height: 38px; cursor: pointer; color-scheme: dark; }
.vba-pick select option { background: var(--dropdown); color: var(--white); }
.vba-pick__chev { position: absolute; right: 12px; top: 50%; width: 14px !important; height: 14px !important; margin-top: -7px; pointer-events: none; color: var(--muted); }
.vba-kind { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vba-kind .ic { width: 18px; height: 18px; flex: none; color: var(--lilac); }
.vba-kind b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; color: var(--white); }
.vba-verify { display: inline-flex; flex: none; margin-left: -4px; padding: 3px; border-radius: 6px; color: var(--muted); opacity: .8; }
.vba-kind .vba-verify .ic { width: 14px; height: 14px; color: inherit; }
.vba-verify:hover, .vba-verify:focus-visible { opacity: 1; color: var(--lilac); }
.vba-x { font-size: 15px; color: var(--white); }
.vba-more { display: flex; justify-content: center; margin-top: -8px; }
.vba-more [hidden] { display: none; }

/* ---------------------------------------------------------------- Affiliates */
.vba-aff { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px 28px; padding: 22px 24px; }
.vba-aff__code, .vba-aff__tier { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.vba-aff__c { font-size: 26px; line-height: 32px; letter-spacing: 2px; color: var(--white); text-transform: uppercase; }
.vba-aff__link { height: 44px; }
.vba-aff__link code { font-family: "Skranji", sans-serif; font-size: 14px; line-height: 42px; color: var(--muted); }
.vba-aff__t { font-family: "Skranji", sans-serif; font-size: 13px; letter-spacing: .3px; color: var(--muted); }
.vba-aff__t b { font-family: "GoldenSmile", sans-serif; font-weight: 400; font-size: 20px; line-height: 26px; letter-spacing: 1.1px; color: var(--lilac-light); text-transform: uppercase; margin-right: 6px; }
.vba-aff__hint { font-family: "Skranji", sans-serif; font-size: 13px; line-height: 18px; letter-spacing: .3px; color: var(--muted); }
.vba-aff__hint b { font-weight: 700; color: var(--white); }
.vba-aff__tier .xp { margin-top: 4px; }
.vba-aff__stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.vba-sub { margin-left: 6px; }

/* ---------------------------------------------------------------- Settings */
.vba-sws { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.vba-set2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px 28px; align-items: start; }
.vba-set2 > section { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.vba-set2 .shead { margin-bottom: 2px; }
.vba-rbx { width: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 14px 16px; }
.vba-rbx__av { width: 44px; height: 44px; padding: 2px; flex: none; }
.vba-rbx__av img { width: 40px; height: 40px; }
.vba-rbx__who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-family: "Skranji", sans-serif; font-size: 13px; letter-spacing: .3px; }
.vba-rbx__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: "GoldenSmile", sans-serif; font-weight: 400; font-size: 16px; letter-spacing: 1.1px; color: var(--player); text-transform: uppercase; }
.vba-rbx__id { display: flex; flex-direction: column; align-items: flex-end; font-family: "Skranji", sans-serif; font-size: 12px; letter-spacing: .3px; color: var(--muted); }
.vba-rbx__id b { font-size: 14px; color: var(--white); }

/* ---------------------------------------------------------------- narrow panes */
@container page (max-width: 640px) {
  .vba-lvl { padding: 20px 18px; }
  .vba-lvl__main { grid-template-columns: 76px minmax(0, 1fr); grid-template-areas: "badge who" "xp xp" "perks perks"; row-gap: 16px; column-gap: 16px; align-items: center; }
  .vba-badge { width: 76px; height: 76px; --k: 22.5px; align-self: start; }
  .vba-badge::after { inset: 7px; }
  .vba-badge__n { font-size: 27px; line-height: 30px; }
  .vba-badge__k { font-size: 9px; letter-spacing: 1.1px; }
  .vba-lvl__perks::before { display: none; }
  .vba-lvl__perks { padding-top: 14px; box-shadow: inset 0 1px 0 var(--rim-iron), inset 0 2px 0 rgba(var(--hi), .5); }
  .vba-ranks { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .vba-ranks::before { display: none; }
  .vba-aff, .vba-set2 { grid-template-columns: minmax(0, 1fr); }
  .vba-pick { min-width: 0; flex: 1; }
  .vba-pane > .shead { align-items: stretch; flex-direction: column; }
  .vba-pane > .shead > .seg, .vba-pane > .shead > .minput { width: 100%; }
  .vba-pane > .shead > .btn { align-self: flex-start; }
}

/* the tables on a narrow pane: the kind and the time on one line, the amounts under them (pages.css stacks every
   cell in two columns, which makes a long history twice as tall) */
@container page (max-width: 700px) {
  .vbm--account .vba-table .dtab__row { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; row-gap: 6px; padding: 10px 14px 12px; }
  .vbm--account .vba-table .dtab__row > .plate + .dtab__c { grid-column: 1 / 3; }
  .vbm--account .vba-table .dtab__row > .dtab__c:nth-child(3) { grid-column: 3; justify-content: flex-end; text-align: right; font-size: 13px; }
  .vbm--account .vba-table .dtab__row > .dtab__c:nth-child(3) .dtab__lbl { display: none; }
  .vbm--account .vba-table .amt .num, .vbm--account .vba-x { font-size: 14px; }
}

/* ---------------------------------------------------------------- narrow dialog: the tabs as one row */
@container page (max-width: 760px) {
  .vba { grid-template: auto minmax(0, 1fr) / minmax(0, 1fr); }
  .vba-nav {
    flex-direction: row; align-items: center; gap: 8px; padding: 12px 16px; overflow-x: auto; overflow-y: hidden;
    box-shadow: inset 0 -2px 0 var(--rule), inset 0 -3px 0 rgba(var(--hi), .35);
  }
  .vba-tabs { flex-direction: row; gap: 8px; }
  .vba-tab, .vba-out { width: auto; flex: none; height: 40px; padding: 0 14px 3px; gap: 8px; font-size: 13px; --c: 9px; --n: 3px; }
  .vba-tab .ic, .vba-out .ic { width: 16px; height: 16px; }
  .vba-out { margin: 0 0 0 8px; }
  .vba-panes { padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); box-shadow: none; }
  .vba-pane { gap: 18px; }
  .vba-who__av { width: 52px; height: 52px; }
  .vba-who__av img { width: 46px; height: 46px; }
  .vba-who__name { font-size: 20px; line-height: 26px; }
}
@media (max-width: 600px) {
  .vbm--account .vbm__dlg { height: 100%; }
}

/* "Open affiliates page": the back arrow, turned forward */
.vba .ic--fwd { transform: scaleX(-1); }

/* ---------------------------------------------------------------- players' pictures (valblox.pic, vb-account.js)
   A picture from the server (an upload or the Roblox headshot) fills the site's chamfered avatar frame edge to edge;
   the mark keeps its own padding. The "Change picture" badge sits on a corner of my own picture (the account
   window, the profile); it opens the picture editor (vb-avatar.js, vb-avatar.css). */
.avatar.avatar--pic img { object-fit: cover; padding: 0; background: var(--avatar-bg); }
.vpic-badge {
  position: absolute; z-index: 2; width: 28px; height: 28px; padding: 2px; display: grid; place-items: center; border: 0; cursor: pointer;
  background: var(--rim-iron); color: var(--lilac-light);
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
  filter: drop-shadow(0 2px 3px rgba(4, 7, 12, .55));
}
.vpic-badge::before {
  content: ""; position: absolute; inset: 1px; z-index: -1;
  background: linear-gradient(rgba(var(--hi), .5) 0 50%, rgba(var(--lo), .6) 50% 100%), var(--raised);
  clip-path: polygon(6.6px 0, calc(100% - 6.6px) 0, 100% 6.6px, 100% calc(100% - 6.6px), calc(100% - 6.6px) 100%, 6.6px 100%, 0 calc(100% - 6.6px), 0 6.6px);
}
.vpic-badge::after {
  content: ""; position: absolute; inset: 2px; z-index: -1; background: linear-gradient(180deg, var(--raised-a) 0%, var(--raised-b) 100%);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}
.vpic-badge { isolation: isolate; }
.vpic-badge__ic { width: 15px; height: 15px; }
.vpic-badge:hover { filter: drop-shadow(0 2px 3px rgba(4, 7, 12, .55)) brightness(1.15); color: var(--white); }
.vpic-badge:focus-visible { outline: 2px solid var(--lilac-light); outline-offset: 2px; }
.vpic-badge[hidden] { display: none; }
[data-pic-edit]:not(button) { cursor: pointer; }
[data-pic-edit]:not(button):hover img { filter: brightness(1.1); }

/* the account window: the badge on the bottom-right corner of the 64px avatar */
.vba-who__pic { position: relative; flex: none; display: block; }
.vba-who__edit { right: -7px; bottom: -6px; }
/* the profile page: the top-right corner of the big framed avatar (the level chip has the bottom-right) */
.prf-av__edit { top: -6px; right: -8px; width: 34px; height: 34px; }
.prf-av__edit .vpic-badge__ic { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- the "link an email" mark (vb-account.js, owner
   27 Nov 2026): a small static gold "!" for a player whose only way in is Roblox. On the header chip (top-right of
   the avatar, inside the chip's chamfer), on the Settings tab, and in front of the "Link an email" line in Settings.
   No motion: it stays put until an email is linked. */
.vmark {
  flex: none; display: inline-grid; place-items: center; width: 17px; height: 17px; padding: 0 0 1px;
  font: 700 12px/1 "Skranji", sans-serif; letter-spacing: 0; text-transform: none; color: rgb(var(--gold-lo));
  background: linear-gradient(180deg, var(--bz1) 0%, var(--gold) 55%, var(--bz3) 100%);
  clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
  cursor: help;
}
.bar__user .vmark--chip { position: absolute; z-index: 3; top: 3px; right: 3px; width: 15px; height: 15px; font-size: 11px;
  filter: drop-shadow(0 1px 1px rgba(4, 7, 12, .6)); }
.vba-tab .vmark--tab { margin-left: auto; }
.vba-mail { display: flex; align-items: flex-start; gap: 9px; }
.vba-mail .vmark { margin-top: 1px; }

/* link an email, at the top of the Account tab (owner, 27 Nov 2026: no trip to another page) */
.vba-mailcard { position: relative; display: grid; gap: 10px; padding: 16px 18px; margin-bottom: 14px; }
.vba-mailcard__head { display: flex; gap: 10px; align-items: flex-start; }
.vba-mailcard__head .vmark { flex: none; margin-top: 3px; }
.vba-mailcard__t { margin: 0 0 2px; font-family: "GoldenSmile", system-ui, sans-serif; font-weight: 400; font-size: 17px; letter-spacing: .5px; color: var(--gold); }
.vba-mailcard .vba-txt { margin: 0; }
.vba-mailcard__form { display: flex; gap: 8px; flex-wrap: wrap; }
.vba-mailcard__form .minput { flex: 1 1 220px; min-width: 0; }
.vba-mailcard__form .minput input { width: 100%; }
.vba-mailcard__alt { display: flex; gap: 8px; margin: 0; }
.vba-mailcard__msg { margin: 0; min-height: 1.2em; font-size: 13px; color: var(--muted); }
.vba-mailcard__msg:empty { display: none; }
.vba-mailcard__msg.is-ok { color: var(--green); }
.vba-mailcard__msg.is-err { color: var(--salmon); }
