/* Team Base: a working space, with functional chrome and solid content. */
:root {
  color-scheme: dark;
  --bg: #090a0e;
  --canvas: #101116;
  --paper: #1b1c24;
  --surface: #1b1c24;
  --raised: #24252e;
  --ink: #f3f1f7;
  --muted: #a8a7b4;
  --quiet: #898995;
  --purple: #a978db;
  --purple-dark: #d5b5f0;
  --purple-pale: #2c2338;
  --gold: #d9bc7c;
  --gold-dark: #dfc58e;
  --cream: #28251d;
  --green: #9bccb6;
  --green-pale: #1b2c25;
  --red: #efa8b5;
  --red-pale: #33232b;
  --border: #ffffff12;
  --line: #ffffff0c;
  --radius: .875rem;
  --font: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", "Segoe UI", system-ui, sans-serif;
  font: 100%/1.5 var(--font);
  font-optical-sizing: auto;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); scroll-padding-top: 5.5rem; }
body { margin: 0; color: var(--ink); background: var(--bg); font-size: .9375rem; line-height: 1.6; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, a, summary { touch-action: manipulation; }
button, summary { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--purple-dark); text-underline-offset: .2em; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 2rem; line-height: 1.25; letter-spacing: -.025em; font-weight: 700; }
h2 { font-size: 1.1875rem; line-height: 1.4; letter-spacing: -.015em; font-weight: 650; }
h3 { font-size: .9375rem; line-height: 1.45; font-weight: 650; letter-spacing: -.005em; }
p { color: var(--muted); }
small, .subtle, .help { font-size: .8125rem; line-height: 1.6; color: var(--muted); }
strong { font-weight: 650; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
::selection { background: #704994; color: #fff; }
.ui-icon { display: inline-block; vertical-align: middle; flex: none; width: 1.1875rem; height: 1.1875rem; }
.skip-link { position: fixed; z-index: 200; inset: -6rem auto auto 1rem; padding: .75rem 1rem; background: var(--paper); border: 1px solid var(--purple); border-radius: .625rem; }
.skip-link:focus { top: 1rem; }
/* App structure: one predictable navigation edge and a restrained floating toolbar. */
.app-shell { display: grid; grid-template-columns: 14rem minmax(0, 1fr); min-height: 100dvh; }
.workspace-sidebar { position: sticky; top: 0; align-self: start; height: 100dvh; padding: 1.625rem 1rem 1rem; background: #14141bcc; backdrop-filter: blur(24px) saturate(115%); border-right: 1px solid #ffffff08; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: .6875rem; color: var(--ink); text-decoration: none; font-size: .9375rem; font-weight: 650; letter-spacing: -.015em; min-height: 3rem; padding: 0 .375rem; }
.brand img { width: 2.375rem; height: 2.375rem; object-fit: contain; flex: none; }
.brand small { display: block; font-size: .75rem; font-weight: 450; color: var(--muted); margin-top: .125rem; letter-spacing: .015em; }
.nav-group { margin-top: 2rem; }
.nav-label { color: var(--quiet); font-size: .75rem; font-weight: 600; padding: 0 .8125rem; margin-bottom: .625rem; letter-spacing: .035em; }
#nav { display: grid; gap: .3125rem; }
#nav a, #mobile-nav a { display: flex; align-items: center; gap: .75rem; min-height: 2.8125rem; padding: .625rem .8125rem; border-radius: .5rem; color: var(--muted); text-decoration: none; font-size: .875rem; font-weight: 500; line-height: 1.4; }
#nav a > span:first-child, #mobile-nav a > span:first-child { display: flex; align-items: center; justify-content: center; width: 1.25rem; flex: none; color: #9695a6; }
#nav a:hover, #mobile-nav a:hover { color: var(--ink); background: #ffffff05; }
#nav a.active, #mobile-nav a.active { color: #e5cffa; background: #a978db20; font-weight: 600; }
#nav a > span:last-child, #mobile-nav a > span:last-child { min-width: 0; width: auto; flex: 1; justify-content: flex-start; }
#nav a.active > span:first-child, #mobile-nav a.active > span:first-child { color: #c39ae7; }
.sidebar-note { margin: auto .8125rem 0; padding-top: 2rem; color: var(--quiet); font-size: .75rem; line-height: 1.7; }
.workspace-main { min-width: 0; background: var(--canvas); }
.workspace-toolbar { min-height: 4rem; padding: .5rem 2rem; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #101116db; backdrop-filter: blur(20px) saturate(120%); }
.toolbar-context { color: #b8b6c3; font-size: .8125rem; font-weight: 550; display: flex; align-items: center; gap: .625rem; }
.toolbar-context .ui-icon { color: var(--quiet); width: 1rem; height: 1rem; }
.toolbar-context small { color: var(--quiet); }
.mobile-nav-trigger { display: none; }
.account { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.account-balance { color: var(--muted); font-size: .75rem; line-height: 1.3; text-align: right; }
.account-balance strong { display: block; font-size: .8125rem; color: var(--ink); font-weight: 600; margin-top: .1875rem; font-variant-numeric: tabular-nums; }
.persona-control { display: grid; gap: .125rem; max-width: 12.5rem; }
.persona-control label { color: var(--quiet); font-size: .75rem; }
.persona-control select { min-height: 2rem; padding: .1875rem 1.5rem .1875rem .5rem; font-size: .75rem; }
.wrap { width: min(70rem, calc(100% - 4rem)); margin-inline: auto; }
#main:focus { outline: none; }
.main { width: min(70rem, calc(100% - 4rem)); margin-inline: auto; min-height: calc(100dvh - 8rem); padding: 2rem 0 3rem; }
.notice-wrap:empty { display: none; }
.notice-wrap { width: min(70rem, calc(100% - 4rem)); margin-inline: auto; padding-top: 1rem; }
.footer { width: min(70rem, calc(100% - 4rem)); margin-inline: auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; color: #7f7f8d; padding-block: 1rem 1.5rem; font-size: .75rem; }
.test-strip { background: #282419; color: #cfb57f; padding: .3125rem 1rem; font-size: .75rem; }
.test-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; width: 100%; }
.status-dot { display: inline-block; height: .3125rem; width: .3125rem; background: var(--gold); border-radius: 50%; margin-right: .5rem; vertical-align: middle; }
.prototype-tag { color: #bca774; font-size: .75rem; }
/* Controls respond as soon as they are pressed. */
.btn, .mobile-nav-trigger { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; padding: .625rem .9375rem; border: 1px solid #ffffff12; border-radius: .5625rem; background: #292a34; color: #e6e3ed; font-size: .8125rem; font-weight: 550; line-height: 1.4; text-align: center; text-decoration: none; }
.mobile-nav-trigger { display: none; }
.btn:hover:not(:disabled), .mobile-nav-trigger:hover { background: #343540; }
.btn:active:not(:disabled), .mobile-nav-trigger:active { transform: scale(.97); background: #3b3b47; }
.btn.primary { background: #8757b5; color: #fff; border-color: #a578cd; }
.btn.primary:hover:not(:disabled) { background: #905fbf; }
.btn.primary:active:not(:disabled) { background: #8153ad; }
.btn.gold { background: #dbc18c; color: #262016; border-color: #e1c997; }
.btn.gold:hover:not(:disabled) { background: #e7d0a5; }
.btn.danger { color: #f0a9b7; background: #38262e; border-color: #6b3c4a; }
.btn.danger:hover:not(:disabled) { background: #462b36; }
.btn.ghost, .btn.muted-link { background: transparent; color: var(--purple-dark); border-color: transparent; }
.btn.ghost:hover:not(:disabled), .btn.muted-link:hover:not(:disabled) { background: #a978db12; }
.btn.small { font-size: .75rem; min-height: 2.75rem; padding: .5rem .75rem; }
.btn.wide { width: 100%; }
.btn:disabled, .btn.primary:disabled, .btn.gold:disabled, .btn.danger:disabled { background: #262730; color: #878793; border-color: #ffffff0a; box-shadow: none; }
.actions, .page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.page-heading, .page-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.875rem; }
.page-heading > div:first-child, .page-intro > div:first-child { min-width: 0; }
.page-heading p, .page-intro p { margin-top: .625rem; max-width: 43rem; font-size: .875rem; line-height: 1.75; }
.page-heading .actions, .page-intro .actions { flex: none; padding-top: .125rem; }
.eyebrow { color: var(--muted); font-size: .75rem; font-weight: 500; margin-bottom: .375rem; letter-spacing: .025em; }
.page-heading .eyebrow, .page-intro .eyebrow { display: none; }
/* Solid grouped content. Outside edges identify a task; inside rows carry data. */
.workspace-panel, .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; padding: 1.5rem; }
.workspace-panel { padding: 0; }
.panel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.125rem 1.5rem; min-width: 0; border-bottom: 1px solid var(--line); }
.panel-toolbar h2 { font-size: 1rem; }
.panel-toolbar p { margin-top: .1875rem; font-size: .8125rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.125rem; min-width: 0; }
.section-head h2 { font-size: 1.0625rem; }
.section-head p { font-size: .8125rem; margin-top: .25rem; }
.section-gap { margin-top: 1.5rem; }
.stack { display: grid; gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.layout-main { display: grid; grid-template-columns: minmax(0, 1fr) 18.75rem; gap: 1.5rem; align-items: start; }
.badge { display: inline-flex; align-items: center; gap: .3125rem; max-width: 100%; padding: .1875rem .5rem; border-radius: .3125rem; font-size: .75rem; font-weight: 550; color: #c7b5db; background: #a978db14; line-height: 1.6; overflow-wrap: anywhere; }
.badge.gold { color: #dec48d; background: #d9bc7c12; }
.badge.green { color: #a7d2bd; background: #93c8b21a; }
.badge.red { color: #f0b0bd; background: #f098ac14; }
.metric-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 1.75rem; margin-bottom: 1.75rem; }
.metric, .stat { display: grid; gap: .1875rem; min-width: 0; }
.metric strong, .stat > strong { font-size: 1.5rem; font-weight: 650; letter-spacing: -.025em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.metric-label, .metric .stat-info, .stat-info, .stat-label { color: var(--muted); font-size: .75rem; }
.metric small, .stat small { font-size: .75rem; }
.stat-info { display: flex; align-items: center; gap: .375rem; }
.stat-icon { display: none; }
.metric.gold strong, .stat.gold > strong { color: var(--gold); }
.metric.green strong, .stat.green > strong { color: var(--green); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; margin-bottom: 1.75rem; }
.progress, .split-bar, .bar-track { display: flex; height: .3125rem; background: #ffffff0c; border-radius: .25rem; overflow: hidden; }
.progress > span, .bar-track > span, .split-bar > i, .split-bar > span { display: block; height: 100%; background: #b18acb; border-radius: inherit; }
.progress.gold > span, .split-bar > i.event, .split-bar > span.event { background: #cfb478; }
.split-bar > i.spend, .split-bar > span.spend { background: #a978db; }
/* Directory and reusable team selectors. */
.directory-panel .panel-toolbar, .guild-directory .panel-toolbar { gap: 1.5rem; }
.search-bar { min-width: 10rem; width: 17rem; }
.search-bar input { width: 100%; }
#guild-grid { display: block; }
.guild-row, .guild-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem 1.5rem; align-items: center; padding: 1.25rem 1.5rem; border: 0; border-radius: 0; background: transparent; }
.guild-row + .guild-row, .guild-card + .guild-card { border-top: 1px solid var(--line); }
.guild-directory-row { grid-template-columns: 3rem minmax(0, 1fr) 8.5rem auto; gap: 1.125rem; }
.guild-directory-copy { min-width: 0; }
.guild-name-line { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.guild-directory-copy .guild-description { margin-top: .3125rem; }
.guild-directory-copy .row-meta { display: block; margin-top: .375rem; color: var(--quiet); font-size: .75rem; }
.guild-directory-stats { display: grid; gap: .1875rem; color: #bcb8c7; font-size: .75rem; font-variant-numeric: tabular-nums; }
.guild-directory-stats > span:first-child { color: #d3bd97; font-weight: 550; }
.guild-directory-stats .subtle { font-size: .75rem; color: var(--quiet); }
.row-action { flex: none; }

.card-head, .guild-row-main, .row-leading { display: flex; gap: .875rem; align-items: center; min-width: 0; }
.card-head > div:last-child { min-width: 0; }
.card-head h3 { margin-bottom: .25rem; }
.card-head .badge + .badge { margin-left: .3125rem; }
.guild-avatar { display: grid; place-items: center; flex: none; overflow: hidden; width: 3rem; height: 3rem; border-radius: .75rem; background: #30253c; color: #d1b2e9; font-size: 1.375rem; font-weight: 650; position: relative; isolation: isolate; }
.guild-avatar.gold { background: #393224; color: #ddc58f; }
.guild-avatar.green { background: #263a32; color: #b5d9c9; }
.guild-monogram { display: grid; place-items: center; width: 100%; height: 100%; }
.guild-avatar img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; z-index: 1; opacity: 0; }
.guild-avatar.has-image img { opacity: 1; }
.guild-description { color: var(--muted); font-size: .8125rem; line-height: 1.6; overflow-wrap: anywhere; }
.guild-row-copy, .row-body { min-width: 0; }
.guild-row-copy h3 { font-size: .9375rem; }
.guild-row-copy p { margin-top: .3125rem; }
.guild-row .card-meta, .guild-card .card-meta { grid-column: 1; padding-left: 3.875rem; }
.guild-row .actions, .guild-card .actions { grid-column: 2; grid-row: 1 / span 3; justify-content: flex-end; }
.guild-card > .guild-description { grid-column: 1; padding-left: 3.875rem; }
.guild-card > .progress { display: none; }
.card-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: var(--muted); font-size: .75rem; }
.guild-row-meta { display: flex; gap: 1rem; align-items: center; color: var(--muted); font-size: .75rem; }
.guild-tablist { display: grid; gap: .5rem; min-width: 0; }
.guild-tab { display: flex; align-items: center; gap: .75rem; width: 100%; min-width: 0; min-height: 4.25rem; padding: .8125rem 1rem; border: 1px solid transparent; border-radius: .5625rem; background: transparent; color: var(--ink); text-align: left; }
.guild-tab + .guild-tab { border-top-color: var(--line); }
.guild-tab:hover { background: #ffffff04; }
.guild-tab.active, .guild-tab[aria-pressed="true"] { background: #a978db13; border-color: #a978db36; }
.guild-tab .guild-avatar { height: 2.5rem; width: 2.5rem; font-size: 1.125rem; border-radius: .625rem; }
.guild-tab-copy { display: grid; gap: .1875rem; min-width: 0; }
.guild-tab-copy strong { font-size: .8125rem; overflow-wrap: anywhere; }
.guild-tab-copy small, .guild-tab-detail { font-size: .75rem; color: var(--muted); }
.guild-tab-state { margin-left: auto; flex: none; color: var(--purple-dark); font-size: .75rem; }
.guild-switcher, .team-switcher, .guild-picker { margin-bottom: 1.5rem; }
.guild-switcher > summary, .team-switcher > summary { min-height: 3.25rem; padding: .75rem 1rem; }
.guild-picker { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.guild-picker .section-head { margin-bottom: .5rem; }
.team-switcher { padding: 0 .625rem; }
.team-switcher > summary { padding-inline: .375rem; gap: .875rem; font-size: .8125rem; }
.team-switcher > summary .subtle { font-size: .75rem; }
.team-switcher > .actions { padding: .5rem .375rem .75rem; }
.guild-switcher .guild-tablist, .team-switcher .guild-tablist { padding: .5rem; border-top: 1px solid var(--line); }
.guild-switcher .section-head, .team-switcher .section-head { padding: .75rem 1rem; margin: 0; }
/* Native disclosures keep secondary detail close to the object it describes. */
details { min-width: 0; }
summary { display: flex; align-items: center; gap: .75rem; list-style: none; min-height: 2.75rem; font-size: .8125rem; font-weight: 550; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "⌄"; color: var(--quiet); font-size: 1rem; margin-left: auto; flex: none; transform: rotate(0); }
details[open] > summary::after { transform: rotate(180deg); }
summary .badge { margin-left: .25rem; }
.detail-disclosure, .details, .event-rewards, .rules-disclosure { margin-top: 1.25rem; }
.detail-disclosure { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .25rem 1.25rem; }
.detail-disclosure > :not(summary) { margin-bottom: 1rem; }
.details > p, .detail-disclosure > p { margin-top: .375rem; }
.details > .compact-list { margin-top: .75rem; }
/* Team workbench: one roster surface, a quiet inset inspector. */
.team-summary { padding: 0; margin-bottom: 1.5rem; }
.team-identity { display: grid; grid-template-columns: 3.75rem minmax(0, 1fr) auto; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.team-identity > .guild-avatar { width: 3.75rem; height: 3.75rem; border-radius: .9375rem; font-size: 1.75rem; }
.team-identity > div { min-width: 0; }
.team-identity h1 { font-size: 1.875rem; }
.team-identity p { font-size: .8125rem; margin-top: .375rem; }
.team-identity .actions { max-width: 23rem; justify-content: flex-end; }
.team-identity .eyebrow { margin: 0 0 .25rem; color: var(--muted); }
.team-overview { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin: 1rem 0; }
.team-overview .stat { display: flex; align-items: baseline; gap: .5rem; }
.team-overview .stat > strong { font-size: .9375rem; }
.team-overview .stat small { display: none; }
.team-overview .stat-info { font-size: .75rem; }
.team-capacity, .team-capacity-line, .team-summary-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; color: var(--muted); font-size: .8125rem; }
.team-capacity .btn { min-height: 2.75rem; }
.team-checkin-strip, .checkin-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .875rem 1rem; border: 1px solid var(--border); border-radius: .75rem; background: #1a1b22; margin-bottom: 1.5rem; }
.team-checkin-strip > div, .checkin-strip > div { min-width: 0; flex: 1; }
.checkin-strip > div > strong { display: block; font-size: .8125rem; margin-bottom: .1875rem; }
.team-checkin-strip h2, .checkin-strip h2 { font-size: .875rem; }
.team-checkin-strip p, .checkin-strip p { font-size: .75rem; }
.team-checkin-strip .checkin-note, .checkin-strip .checkin-note { font-size: .75rem; }
.team-view, .team-view-tabs { margin-bottom: 1.25rem; }
.team-workspace, .team-workbench { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; }
.team-workspace .roster-panel, .team-workbench .roster-panel { padding: 1.5rem; border: 0; border-radius: 0; background: transparent; }
.team-workspace .inspector, .team-workbench .inspector { padding: 1.5rem; background: #17181f; border-left: 1px solid var(--line); border-radius: 0 .875rem .875rem 0; }
.team-workspace .level-card { padding: 0; border: 0; background: transparent; }
.team-dashboard { grid-template-columns: minmax(0, 1fr) 18rem; }
.team-section { min-width: 0; }
.team-primary, .team-sidebar { min-width: 0; }
.team-section.roster-panel, .team-section.team-schedule, .team-section.team-ledger { padding: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.team-workspace .team-section.roster-panel, .team-workbench .team-section.roster-panel { background: transparent; border: 0; border-radius: 0; }
.panel-heading { gap: .625rem; align-items: flex-start; }
.panel-heading-copy { min-width: 0; flex: 1; }
.panel-heading h2 { font-size: 1rem; }
.panel-heading p { font-size: .75rem; margin-top: .1875rem; }
.panel-symbol { display: none; }
.panel-heading > .btn { margin: -.4375rem -.375rem 0 0; }
.member-table { display: grid; }
.member-row { display: grid; grid-template-columns: 1.5rem 2.5rem minmax(0, 1fr) 8rem auto; gap: .75rem; align-items: center; padding: 1.0625rem 0; border-bottom: 1px solid var(--line); min-width: 0; }
.member-row:last-child { border-bottom: 0; }
.rank { color: var(--quiet); font-size: .75rem; font-weight: 550; font-variant-numeric: tabular-nums; }
.rank.top { color: var(--gold); }
.member-avatar { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; background: #2d2938; color: #c5b3d7; font-weight: 600; border-radius: 50%; }
.member-avatar.tone-1 { background: #2c3430; color: #bed0c4; }
.member-avatar.tone-2 { background: #363027; color: #d3c19f; }
.member-name, .name-block { min-width: 0; }
.member-name strong { display: block; font-size: .875rem; overflow-wrap: anywhere; }
.member-name small { display: block; font-size: .75rem; margin-top: .1875rem; }
.member-contribution { min-width: 0; }
.contribution-top { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.contribution-top strong { font-size: .8125rem; color: #c5a8de; white-space: nowrap; }
.contribution-top small { font-size: .75rem; }
.member-actions { display: flex; align-items: flex-end; flex-direction: column; gap: .1875rem; }
.member-actions .btn { font-size: .75rem; min-height: 2.75rem; padding: .5rem .25rem; }
.member-actions .badge { font-size: .75rem; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; margin: .75rem 0 .1875rem; color: var(--muted); font-size: .75rem; }
.legend i, .legend > span::before { display: inline-block; height: .4375rem; width: .4375rem; border-radius: .125rem; margin-right: .375rem; background: var(--purple); }
.legend > span::before { content: ""; }
.legend i.event, .legend > span.event::before { background: var(--gold); }
.roster-note { margin-top: 1rem; font-size: .75rem; line-height: 1.7; }
.level-card { position: relative; }
.growth-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1.5rem; }
.growth-heading h2 { font-size: 1rem; }
.growth-level { color: var(--gold); font-size: .8125rem; }
.growth-total { color: var(--muted); font-size: .8125rem; margin-bottom: 1.125rem; }
.growth-total strong { color: var(--gold); font-size: 2rem; letter-spacing: -.04em; font-weight: 600; font-variant-numeric: tabular-nums; }
.milestone-heading { margin-top: 1.75rem; font-size: .8125rem; }
.my-contribution { font-size: .75rem; color: var(--muted); text-align: right; }
.team-workbench .level-rules { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: .625rem 0 0; margin-top: 1rem; }
.team-activity > section { padding: 1.5rem; }
.team-activity > section + section { border-top: 1px solid var(--line); }
.team-management { padding-inline: 1.5rem; }
.team-management > details { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; }
.team-management > details + details { border-top: 1px solid var(--line); }
.team-management .team-retention-note { margin: 0; padding: 1.25rem 0; border-top: 1px solid var(--line); }

.level-heading { display: flex; align-items: center; gap: .8125rem; margin-bottom: 1.5rem; }
.level-number { color: var(--gold); font-size: 2rem; font-weight: 650; line-height: 1; letter-spacing: -.04em; }
.level-heading strong { display: block; font-size: .875rem; color: var(--ink); margin-top: .1875rem; }
.level-heading small { font-size: .75rem; }
.level-mark { display: none; }
.level-card .card-meta { justify-content: space-between; margin-bottom: .625rem; gap: .5rem; font-size: .75rem; }
.level-card .card-meta strong { font-size: .75rem; }
.level-next-copy { display: block; margin-top: .75rem; font-size: .75rem; }
.milestones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .875rem 1rem; margin: 1.5rem 0 1rem; }
.milestone { display: grid; gap: .1875rem; }
.milestone strong { font-size: .8125rem; color: #c5bfae; }
.milestone small { font-size: .75rem; color: var(--quiet); }
.milestone.complete strong { color: var(--gold); }
.level-rules { border-top: 1px solid var(--line); padding-top: .625rem; }
.level-rules summary { color: var(--muted); font-size: .75rem; }
.level-rules p { font-size: .75rem; line-height: 1.8; margin: .5rem 0 0; }
.team-retention-note { font-size: .75rem; line-height: 1.8; color: var(--quiet); margin-top: 1rem; }
.team-panel-empty { display: grid; justify-items: start; gap: .4375rem; padding: 1.375rem 0 1rem; }
.team-panel-empty h3 { font-size: .9375rem; }
.team-panel-empty p { max-width: 30rem; font-size: .8125rem; }
.team-panel-empty .btn { margin-top: .5rem; }
.panel-empty-symbol { color: var(--quiet); margin-bottom: .3125rem; }
.team-settings-disclosure, .team-applications, .team-notifications { padding: 0 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.team-settings-disclosure > summary, .team-applications > summary, .team-notifications > summary { min-height: 4.5rem; }
.disclosure-copy { display: grid; gap: .1875rem; min-width: 0; }
.disclosure-copy strong { font-size: .875rem; }
.disclosure-copy small { font-size: .75rem; color: var(--muted); font-weight: 400; }
.team-settings-disclosure > .card, .team-applications > .card, .team-notifications > .card { padding: 0 0 1.25rem; background: transparent; border: 0; border-radius: 0; }
.team-settings-disclosure > .card > h3 { display: none; }
.team-settings-disclosure .details, .team-settings-disclosure .danger-zone { margin-top: 1.25rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.team-settings-disclosure .details p { margin-top: .625rem; font-size: .75rem; }
.team-schedule .match-preview-list { margin-top: .25rem; }
.match-preview-row { display: grid; grid-template-columns: 3.125rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1rem 0; border-top: 1px solid var(--line); }
.match-preview-date { display: grid; justify-items: center; gap: .125rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.match-preview-date small { color: var(--muted); font-size: .75rem; }
.match-preview-date strong { color: var(--ink); font-size: 1.5rem; font-weight: 600; letter-spacing: -.03em; }
.match-preview-copy strong { display: block; font-size: .875rem; overflow-wrap: anywhere; }
.match-preview-copy small { display: block; font-size: .75rem; margin-top: .3125rem; }
.team-ledger { margin-top: 0; }
.ledger-entry { display: grid; grid-template-columns: 1.875rem minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.ledger-entry:last-child { border: 0; }
.ledger-symbol { color: var(--quiet); display: flex; align-items: center; }
.ledger-symbol.reversal { color: var(--red); }
.ledger-entry-copy { display: grid; gap: .25rem; min-width: 0; }
.ledger-entry-copy strong { font-size: .8125rem; overflow-wrap: anywhere; }
.ledger-entry-copy time { font-size: .75rem; color: var(--muted); }
/* Balances are one shared account, followed by a conventional ledger. */
.wallet-overview { padding: 1.5rem; }
.wallet-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 16.5rem; padding: 0; }
.wallet-balance-main { min-width: 0; padding: 1.5rem; }
.wallet-balance-main > .panel-toolbar { padding: 0 0 1.125rem; margin-bottom: 1.5rem; }
.wallet-balance-main > .subtle { font-size: .75rem; margin-top: 1.5rem; }
.wallet-bonus { margin: 0; padding: 1.5rem; background: #17181f; border-left: 1px solid var(--line); border-radius: 0 .875rem .875rem 0; }
.wallet-bonus h3 { font-size: .875rem; }
.wallet-bonus > strong { display: block; font-size: 1.25rem; color: var(--gold); margin: .875rem 0; }
.wallet-bonus p { font-size: .75rem; line-height: 1.8; }
.wallet-destinations, .wallet-ledger { margin-top: 1.5rem; }
.wallet-ledger { padding: 1.5rem; }
.wallet-balances { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.wallet-balances .stat, .wallet-balances .metric { padding: .25rem 0; gap: .625rem; }
.wallet-balances .stat + .stat, .wallet-balances .metric + .metric { border-left: 1px solid var(--line); padding-left: 2rem; }
.wallet-balances .stat > strong, .wallet-balances .metric > strong { font-size: 2.375rem; letter-spacing: -.04em; }
.wallet-balances .stat-label, .wallet-balances .metric > span { font-size: .8125rem; }
.wallet-balances .stat small { font-size: .75rem; }
.wallet-overview .panel-toolbar { padding: 0 0 1.125rem; margin-bottom: 1.5rem; }
.wallet-overview .callout { margin-top: 1.25rem; }
.wallet-sync { margin-bottom: 1rem; }
.wallet-sync-status.callout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .25rem 1rem; align-items: center; padding: .75rem 1rem; border: 1px solid var(--border); border-left: 2px solid #ab9567; background: #1a1b22; color: var(--muted); }
.wallet-sync-status.red { border-left-color: #c88798; }
.wallet-sync-status.red > strong { color: #e4a2b1; }
.wallet-sync-status > strong { color: #cfbea0; font-size: .8125rem; }
.wallet-sync-status > p { margin: 0; font-size: .75rem; }
.wallet-sync-status > p:first-of-type { text-align: right; }
.wallet-sync-status > p:nth-of-type(2) { grid-column: 1; grid-row: 2; }
.wallet-sync-status > details { grid-column: 2; grid-row: 2; margin: 0; }
.wallet-sync-status > details > summary { justify-content: flex-end; min-height: 2.5rem; font-size: .75rem; font-weight: 500; color: #bda8cf; gap: .5rem; }
.wallet-sync-status > details > summary::after { margin-left: 0; }
.wallet-sync-status > details[open] { grid-column: 1 / -1; grid-row: 3; }
.wallet-sync-status > details[open] > summary { justify-content: flex-start; }
.wallet-sync-status > details[open] > summary::after { margin-left: auto; }
.wallet-sync-status > details > p, .wallet-sync-status > details > ul { margin: .5rem 0; font-size: .75rem; line-height: 1.75; }
.wallet-sync-status > .btn { grid-column: 1 / -1; justify-self: start; }

.wallet-guilds { display: grid; }
.wallet-guild { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: center; background: transparent; border: 0; border-radius: 0; padding: 1rem 1.5rem; }
.wallet-guild + .wallet-guild { border-top: 1px solid var(--line); }
.wallet-guild .actions { grid-column: 3; grid-row: auto; justify-content: flex-end; }
.wallet-guild > p, .wallet-guild .membership-info { grid-column: 1; padding-left: 3.875rem; font-size: .75rem; }
.wallet-guild .membership-info { display: flex; gap: .375rem; }
.wallet-history .compact-row { padding-block: 1rem; }
.history-description { display: grid; gap: .25rem; min-width: 0; }
.history-description strong { font-size: .8125rem; overflow-wrap: anywhere; }
.history-description small { font-size: .75rem; }
.history-source { font-size: .75rem !important; color: var(--quiet); overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, monospace; }
/* The three slots are a mode selector. One spacious editor owns the current slot. */
.loadout-slotlist, .loadout-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-bottom: 1.25rem; }
.loadout-slot { display: flex; align-items: center; gap: .75rem; padding: .8125rem 1rem; border: 1px solid var(--border); border-radius: .6875rem; background: #1a1b23; color: var(--muted); text-align: left; min-width: 0; min-height: 5rem; }
.loadout-slot:hover { background: #22232c; }
.loadout-slot.active, .loadout-slot[aria-selected="true"], .loadout-slot[aria-pressed="true"] { border-color: #b183da80; background: #2a2234; color: var(--ink); }
.loadout-slot .part-photo { width: 2.75rem; height: 2.75rem; flex-basis: 2.75rem; }
.loadout-slot > span:not(.part-photo) { display: grid; gap: .1875rem; min-width: 0; }
.loadout-slot strong { display: block; font-size: .875rem; }
.loadout-slot small { display: block; font-size: .75rem; color: var(--muted); }
.loadout-slot .badge { font-size: .75rem; }
.loadout-workspace { display: grid; grid-template-columns: minmax(13rem, .85fr) minmax(0, 1.3fr); align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.loadout-preview { padding: 2rem 1.75rem; display: grid; justify-items: center; text-align: center; gap: 1rem; min-width: 0; }
.loadout-preview > .part-photo, .loadout-main-photo > .part-photo { width: min(100%, 15rem); height: auto; aspect-ratio: 1; flex-basis: auto; border-radius: .875rem; }
.loadout-preview > .part-photo img, .loadout-main-photo > .part-photo img { width: 100%; height: 100%; }
.loadout-preview h2 { font-size: 1.0625rem; overflow-wrap: anywhere; }
.loadout-preview > .loadout-top { width: 100%; margin: 0; padding: 0 0 1rem; align-self: start; }
.loadout-main-photo { width: min(100%, 14rem); padding: .5rem; }
.loadout-preview-empty { display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: .375rem; border: 1px solid #ffffff08; border-radius: .875rem; background: #22232b; color: #a19baa; font-size: .75rem; line-height: 1.6; text-align: center; }
.preview-parts { width: 100%; display: grid; gap: .75rem; text-align: left; }
.preview-part { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: .625rem; align-items: baseline; min-width: 0; }
.preview-part small { font-size: .75rem; color: var(--quiet); }
.preview-part strong { font-size: .75rem; font-weight: 500; overflow-wrap: anywhere; }
.loadout-preview p { font-size: .8125rem; line-height: 1.65; }
.loadout-preview .loadout-summary { background: transparent; border: 0; padding: 0; width: 100%; }
.loadout-editor { padding: 1.75rem; border-left: 1px solid var(--line); min-width: 0; }
.loadout-editor > .panel-toolbar { padding: 0 0 1rem; margin-bottom: 1.25rem; }
.loadout-editor > .panel-toolbar h3 { font-size: .875rem; }
.loadout-editor > .panel-toolbar > span { font-size: .75rem; }
.loadout-editor .loadout-card { padding: 0; background: transparent; border: 0; }
.loadout-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; }
.loadout-title { display: flex; align-items: center; gap: .625rem; min-width: 0; }
.loadout-title h2 { font-size: 1.0625rem; }
.slot-index { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.part-field { min-width: 0; margin-top: 1.25rem; position: relative; }
.part-field:first-of-type { margin-top: 0; }
.part-label { display: flex; justify-content: space-between; gap: .75rem; margin-bottom: .625rem; align-items: baseline; font-size: .8125rem; font-weight: 550; }
.part-label small { color: var(--quiet); font-size: .75rem; letter-spacing: .05em; }
.part-search { position: relative; }
.part-search input { width: 100%; min-height: 3rem; }
.part-results-panel { position: relative; margin-top: .5rem; background: #24252f; border: 1px solid #ffffff1b; border-radius: .625rem; padding: .5rem; box-shadow: 0 .5rem 1.5rem #0003; z-index: 10; }
.part-results-caption { color: var(--muted); font-size: .75rem; font-weight: 600; padding: .25rem .375rem .5rem; }
.part-results { display: grid; gap: .1875rem; max-height: 21rem; overflow-y: auto; overscroll-behavior: contain; scroll-padding: .5rem; scrollbar-width: thin; scrollbar-color: #5a5068 transparent; }
.part-option { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 4.5rem; padding: .5rem; border: 1px solid transparent; border-radius: .4375rem; color: var(--ink); background: transparent; text-align: left; line-height: 1.45; }
.part-option:hover, .part-option.active, .part-option[aria-selected="true"] { background: #a978db24; border-color: #bd98df42; }
.part-option:active { background: #a978db32; }
.part-option:disabled { color: var(--quiet); background: #ffffff04; }
.part-option strong { display: block; font-size: .8125rem; }
.part-option small { display: block; font-size: .75rem; margin-top: .25rem; }
.part-search-status { display: grid; justify-items: start; gap: .5rem; padding: .5rem .375rem; font-size: .75rem; color: var(--muted); }
.part-photo { display: grid; place-items: center; position: relative; overflow: hidden; flex: none; flex-basis: 3.375rem; width: 3.375rem; height: 3.375rem; background: #e8e7eb; border: 1px solid #ffffff0d; border-radius: .5rem; color: #5b5964; isolation: isolate; }
.part-photo img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; opacity: 0; z-index: 1; }
.part-photo.has-image img { opacity: 1; }
.part-photo-fallback { font-size: .5625rem; text-align: center; padding: .25rem; line-height: 1.3; }
.part-photo.has-image .part-photo-fallback { visibility: hidden; }
.part-copy { min-width: 0; flex: 1; }
.part-copy strong { overflow-wrap: anywhere; }
.selected-part { display: flex; align-items: center; gap: .8125rem; padding: .8125rem; border: 1px solid var(--border); border-radius: .625rem; background: #22232d; min-width: 0; }
.selected-part strong { display: block; font-size: .875rem; line-height: 1.5; }
.selected-part small { display: block; font-size: .75rem; margin-top: .1875rem; }
.selected-part .part-photo { height: 3.75rem; width: 3.75rem; flex-basis: 3.75rem; }
.btn.remove-part { min-width: 2.75rem; min-height: 2.75rem; font-size: 1.375rem; padding: .125rem; border: 0; background: transparent; color: var(--muted); flex: none; }
.btn.remove-part:hover { color: var(--ink); background: #ffffff09; }
.part-source { display: inline-flex; align-items: center; min-height: 2.75rem; padding-top: .3125rem; font-size: .75rem; color: #bca6cd; text-decoration: none; }
.part-source:hover { text-decoration: underline; }
.part-unneeded { padding: .9375rem; background: #28261f; color: #cab782; border-radius: .625rem; font-size: .8125rem; line-height: 1.65; }
.part-unneeded strong { font-size: .8125rem; }
.part-empty-message, .pending-note { color: var(--muted); font-size: .75rem; margin-top: .5rem; overflow-wrap: anywhere; }
.save-dock, .save-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; position: sticky; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 20; margin-top: 1.25rem; background: #25232de8; backdrop-filter: blur(18px); border: 1px solid #ffffff1b; border-radius: .75rem; box-shadow: 0 .25rem 1.5rem #0003; }
.save-dock strong { font-size: .8125rem; }
.save-dock small { display: block; font-size: .75rem; margin-top: .1875rem; }
.loadout-display { display: grid; gap: 1rem; }
.loadout-summary { display: grid; gap: .5rem; min-width: 0; padding: 1rem; background: #20212b; border-radius: .625rem; }
.loadout-summary h3 { font-size: .8125rem; margin-bottom: .25rem; }
.loadout-summary .selected-part { background: transparent; border: 0; padding: .4375rem 0; }
/* Agenda: dates are navigation, people are context, the useful action is always at right. */
.segmented-control, .analytics-tabs { display: inline-flex; align-items: stretch; gap: .25rem; padding: .25rem; background: #22232b; border-radius: .625rem; flex-wrap: wrap; }
.segmented-control .btn, .analytics-tabs .btn, .segmented-control > button { background: transparent; border: 1px solid transparent; color: var(--muted); min-height: 2.5rem; padding: .5rem .875rem; border-radius: .4375rem; font-size: .8125rem; }
.segmented-control .active, .analytics-tabs .active, .segmented-control [aria-selected="true"], .segmented-control [aria-pressed="true"] { color: var(--ink); background: #51405f; border-color: #a18ab52b; box-shadow: 0 1px 3px #0002; }
.segmented-control .btn:hover:not(.active), .analytics-tabs .btn:hover:not(.active) { background: #ffffff05; color: var(--ink); }
.event-filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.event-team-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .875rem; }
.btn.event-team-filter { background: transparent; border-color: var(--border); color: var(--muted); padding: .5rem .75rem; }
.btn.event-team-filter.active { color: var(--ink); background: #a978db15; border-color: #a978db55; }
.event-team-filter .guild-avatar { height: 1.5rem; width: 1.5rem; font-size: .75rem; border-radius: .375rem; }
.event-feed-caption { font-size: .75rem; color: var(--quiet); margin-bottom: 1rem; }
.event-date-boundary { display: flex; align-items: baseline; gap: .5rem; color: var(--muted); font-size: .75rem; margin-bottom: 1rem; }
.event-date-boundary > span { font-weight: 550; }
.event-date-boundary > time { font-variant-numeric: tabular-nums; }
.event-date-boundary::after { content: ""; display: block; height: 1px; flex: 1; background: var(--line); align-self: center; margin-left: .5rem; }
.agenda-list, .event-grid { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.event-row, .event-card { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr) auto; align-items: start; gap: 1.25rem; padding: 1.5rem; background: transparent; border: 0; border-radius: 0; min-width: 0; }
.event-row + .event-row, .event-card + .event-card { border-top: 1px solid var(--line); }
.event-date { display: grid; gap: .3125rem; justify-items: center; align-self: start; min-width: 0; padding: .125rem 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.event-date > span, .event-date > small { font-size: .75rem; line-height: 1.2; text-align: center; }
.event-date strong { font-size: 2rem; font-weight: 550; color: #e0dce8; line-height: 1; letter-spacing: -.05em; }
.event-body { min-width: 0; display: grid; gap: .625rem; }
.event-body h3 { font-size: 1rem; font-weight: 650; overflow-wrap: anywhere; }
.event-info { display: flex; flex-wrap: wrap; gap: .3125rem 1rem; color: var(--muted); font-size: .75rem; }
.event-info > span { display: inline-flex; align-items: center; gap: .3125rem; }
.event-info .ui-icon { width: .875rem; height: .875rem; color: #95909e; }
.event-status { display: flex; flex-wrap: wrap; gap: .375rem; align-items: center; }
.event-status .badge { background: transparent; padding: 0; font-size: .75rem; }
.event-status .badge + .badge { margin-left: .25rem; }
.event-status .badge::before { content: ""; display: inline-block; height: .25rem; width: .25rem; background: currentColor; border-radius: 50%; margin-right: .125rem; }
.event-action, .event-row > .actions { align-self: center; max-width: 11rem; display: grid; gap: .5rem; }
.event-action .btn { width: 100%; }
.team-participants { min-width: 0; }
.participant-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin-bottom: .375rem; }
.participant-heading strong { font-size: .75rem; color: #c4b6d2; }
.participant-heading small { font-size: .75rem; color: var(--quiet); }
.participant-chips { display: flex; flex-wrap: wrap; gap: .375rem; }
.participant-chip { padding: .125rem .4375rem; background: #ffffff05; border-radius: .25rem; color: #bbb4c5; font-size: .75rem; overflow-wrap: anywhere; max-width: 100%; }
.participant-chip.is-me { color: #acd3be; background: #8bbba113; }
.registration-status { color: #a5cbb7; font-size: .75rem; }
.registration-status.is-ended { color: var(--quiet); }
.event-banner { display: contents; }
.event-emblem { display: none; }
.event-rewards { border: 1px solid var(--border); border-radius: var(--radius); padding: .25rem 1.25rem; background: #181920; }
.event-rewards > summary { min-height: 3.75rem; font-size: .8125rem; }
.event-rewards > summary > span { color: var(--quiet); font-size: .75rem; font-weight: 400; }
.event-rewards > p { margin: 0 0 1rem; font-size: .75rem; }
.event-reward-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: .5rem 0 1.25rem; }
.event-reward-items > div { display: grid; gap: .3125rem; }
.event-reward-items strong { color: var(--gold); font-size: .9375rem; }
.event-reward-items small { font-size: .75rem; }
/* Award marks remain quiet, distinct gold / silver / bronze objects. */
.event-podium { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.podium-result { display: flex; align-items: center; gap: .5rem; padding: .5rem .625rem; border-radius: .5rem; background: #d9bc7c0a; color: #dec58d; }
.podium-place-2 { color: #c1c5d2; background: #bbc2d409; }
.podium-place-3 { color: #d4a58c; background: #c28b690c; }
.podium-medallion { position: relative; width: 2rem; height: 2.375rem; display: grid; justify-items: center; flex: none; }
.podium-medal-disc { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border: 1px solid currentColor; border-radius: 50%; font-size: .8125rem; font-weight: 700; background: #242126; z-index: 1; }
.podium-medallion::before, .podium-medallion::after { content: ""; position: absolute; width: .4375rem; height: .875rem; top: 1.25rem; background: currentColor; opacity: .5; }
.podium-medallion::before { left: .5rem; transform: rotate(15deg); }
.podium-medallion::after { right: .5rem; transform: rotate(-15deg); }
.podium-copy { display: grid; min-width: 0; gap: .0625rem; }
.podium-label { color: inherit; font-size: .75rem; }
.podium-nickname { color: var(--ink); font-size: .75rem; overflow-wrap: anywhere; }
/* Analytics compares the same rank in two columns, without separate dashboard tiles. */
.analytics-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.analytics-comparison > .analytics-panel + .analytics-panel { border-left: 1px solid var(--line); }
.analytics-tabs { margin-bottom: 1.25rem; }
.analytics-panel { min-width: 0; padding: 1.5rem; background: transparent; border: 0; border-radius: 0; }
.analytics-panel .eyebrow { font-size: .75rem; margin-bottom: .25rem; color: var(--muted); }
.analytics-panel h2 { font-size: 1.0625rem; margin-bottom: 1.25rem; }
.analytics-panel > .panel-toolbar { padding: 0 0 1.125rem; }
.analytics-panel > .panel-toolbar h2 { margin: 0; }
.analytics-panel > .panel-toolbar p { margin-top: .375rem; }
.analytics-ranking { display: grid; }
.bar-item { display: grid; grid-template-columns: 1.25rem 3rem minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .875rem 0; border-bottom: 1px solid var(--line); min-width: 0; }
.bar-item:last-child { border-bottom: 0; }
.analytics-part-preview { display: flex; justify-content: center; align-items: center; min-width: 0; width: 3rem; }
.analytics-part-preview .part-photo { width: 3rem; height: 3rem; flex-basis: 3rem; border-radius: .4375rem; }
.analytics-part-preview.is-combo { gap: .125rem; flex-wrap: wrap; }
.analytics-part-preview.is-combo .part-photo { width: 1.375rem; height: 1.375rem; flex-basis: 1.375rem; border-radius: .1875rem; }
.analytics-part-preview.is-combo .part-photo-fallback { font-size: .3125rem; }
.analytics-part-placeholder { display: grid; place-items: center; width: 3rem; height: 3rem; color: var(--muted); background: #292833; border-radius: .4375rem; }
.analytics-row-copy { min-width: 0; }
.analytics-row-copy > strong { display: block; font-size: .8125rem; line-height: 1.5; overflow-wrap: anywhere; }
.analytics-row-copy .bar-track { height: .25rem; margin-top: .4375rem; margin-bottom: .25rem; }
.analytics-row-copy > small { font-size: .75rem; color: var(--quiet); }
.count { font-size: .8125rem; font-weight: 550; color: #c6b6d6; font-variant-numeric: tabular-nums; white-space: nowrap; }
.analytics-empty { color: var(--muted); font-size: .8125rem; padding: 2rem 0; line-height: 1.8; }
/* Form, error, and payment surfaces retain the same trustworthy visual language. */
.callout { background: #24212c; border: 1px solid #b594d11e; border-radius: .625rem; color: #c3b5cf; font-size: .8125rem; line-height: 1.75; padding: .875rem 1rem; }
.callout p { color: inherit; margin-top: .25rem; }
.callout strong { color: inherit; }
.callout.gold:not(.wallet-sync-status) { background: #29261c; color: #cfbd8c; border-color: #bca2642a; }
.callout.green { background: #1d2a24; color: #a8c9b8; border-color: #8eb49c21; }
.callout.red:not(.wallet-sync-status) { background: #30212a; color: #edb0be; border-color: #db8ca52a; }
.callout ul { padding-left: 1.25rem; margin-block: .375rem 0; }
.callout li + li { margin-top: .3125rem; }
#main > .callout { margin-bottom: 1.25rem; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea, .input { min-height: 2.875rem; padding: .6875rem .8125rem; background: #14151b; border: 1px solid #ffffff20; border-radius: .5625rem; color: var(--ink); line-height: 1.4; max-width: 100%; }
input::placeholder, textarea::placeholder { color: #84828f; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: #ad80d2; }
textarea { min-height: 6.25rem; resize: vertical; }
.field { display: grid; gap: .5rem; margin-bottom: 1.25rem; min-width: 0; }
.field > label, .field-label { font-size: .8125rem; font-weight: 550; color: #d7d1df; }
.field input, .field textarea, .field select { width: 100%; }
.field .help { font-size: .75rem; }
.two-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.checkbox-row { display: flex; align-items: flex-start; gap: .6875rem; min-height: 2.75rem; font-size: .8125rem; line-height: 1.65; cursor: pointer; }
.checkbox-row input { height: 1.125rem; width: 1.125rem; flex: none; accent-color: #ab7ed2; margin: .1875rem 0 0; }
.checkbox-row small { font-size: .75rem; }
.details input[readonly] { width: 100%; margin-top: .75rem; font-size: .75rem; }
.compact-list { display: grid; }
.compact-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9375rem 0; border-bottom: 1px solid var(--line); min-width: 0; }
.compact-row:last-child { border-bottom: 0; }
.compact-row > div { min-width: 0; }
.compact-row strong { display: block; font-size: .8125rem; }
.compact-row small { display: block; font-size: .75rem; }
.compact-row .actions { flex: none; }
.danger-zone { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.price-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.25rem 0; padding: 1.125rem; border-radius: .625rem; background: #25232c; font-size: .875rem; }
.price-summary small { display: block; font-size: .75rem; margin-top: .25rem; }
.price-summary > strong { color: var(--gold); font-size: 1.5rem; letter-spacing: -.025em; white-space: nowrap; }
.pay-status { display: grid; gap: .375rem; padding: .9375rem 1rem; border-radius: .625rem; background: #28241c; color: #d3bd86; margin: 1rem 0; }
.pay-status small { color: #b3a98e; font-size: .75rem; }
.pending-card { margin-bottom: 1.5rem; }
.pending-card h3 { color: var(--gold); }
.pending-card p { font-size: .8125rem; margin-top: .3125rem; }
.donation-guild-choices { max-height: 17rem; overflow-y: auto; overscroll-behavior: contain; }
.donation-preview { margin: 1.25rem 0; padding: 0 1rem; background: #20212a; border-radius: .625rem; }
.donation-preview > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .875rem 0; border-bottom: 1px solid var(--line); font-size: .8125rem; }
.donation-preview > div:last-child { border: 0; }
.donation-preview strong { text-align: right; overflow-wrap: anywhere; }
.guild-logo-editor { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.25rem; }
.guild-logo-preview { display: flex; align-items: center; gap: 1rem; margin: .875rem 0; }
.guild-logo-preview .guild-avatar { width: 4.5rem; height: 4.5rem; border-radius: 1rem; font-size: 1.75rem; }
.logo-file-input { display: block; width: 100%; min-width: 0; font-size: .75rem; margin-top: .75rem; padding: .375rem 0; }
.logo-file-input::file-selector-button { font: inherit; min-height: 2.75rem; border: 1px solid var(--border); border-radius: .5rem; padding: .5rem .75rem; margin-right: .625rem; color: var(--ink); background: #2d2d39; cursor: pointer; }
.logo-editor-status { font-size: .75rem; margin: .625rem 0; overflow-wrap: anywhere; }
.logo-editor-status.error { color: var(--red); }
.notification-card { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: .75rem; padding: 1.125rem 0; border-top: 1px solid var(--line); }
.notification-card .list-avatar { color: var(--muted); }
.notification-card h3 { font-size: .875rem; }
.notification-card p { font-size: .8125rem; margin-top: .3125rem; }
.notification-card small { display: block; font-size: .75rem; margin-top: .375rem; }
.notification-card .details { margin-top: .5rem; }
.notification-card .actions { margin-top: .75rem; }
.invitation-card { margin-bottom: 1.5rem; }
.invitation-card h2 { margin: .625rem 0 .5rem; }
.invitation-card p { font-size: .875rem; margin-bottom: 1rem; }
.empty, .empty-state { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 3.5rem 2rem; display: grid; justify-items: center; text-align: center; min-width: 0; }
.empty-icon { color: #a19aa9; display: flex; margin-bottom: 1rem; }
.empty-icon .ui-icon { width: 1.75rem; height: 1.75rem; stroke-width: 1.4; }
.empty h3 { font-size: 1rem; margin-bottom: .5rem; }
.empty p { font-size: .8125rem; max-width: 30rem; line-height: 1.8; }
.empty .btn { margin-top: 1.25rem; }
.workspace-panel > .empty { border: 0; background: transparent; }
.login-card { width: min(100%, 34rem); margin: 3rem auto; padding: 2.25rem; }
.login-card .eyebrow { display: none; }
.login-card h1 { font-size: 1.75rem; margin-bottom: .875rem; }
.login-card p { font-size: .875rem; margin-bottom: 1.5rem; line-height: 1.8; }
.loading { margin: 3rem auto; max-width: 34rem; text-align: center; padding: 3rem 1.5rem; }
.loading h1 { font-size: 1.375rem; margin-top: 1.5rem; }
.loading p { font-size: .875rem; margin-top: .5rem; }
.spinner { display: inline-block; width: 1.5rem; height: 1.5rem; border: 2px solid #ffffff15; border-top-color: #b997d8; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#toast { position: fixed; z-index: 120; left: calc(50% + 7rem); bottom: max(1.5rem, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(34rem, calc(100% - 2rem)); pointer-events: none; }
.toast-text { color: #e9e3f0; background: #30283aee; border: 1px solid #d3b6ec30; border-radius: .6875rem; box-shadow: 0 .5rem 2rem #0005; padding: .875rem 1.125rem; font-size: .8125rem; backdrop-filter: blur(14px); }
#toast.error .toast-text { background: #3b2631f5; border-color: #db91a640; color: #f0bcc7; }
dialog { background: #202029ed; backdrop-filter: blur(24px) saturate(115%); color: var(--ink); border: 1px solid #ffffff24; border-radius: 1rem; box-shadow: 0 2rem 6rem #0008; padding: 0; width: min(38rem, calc(100% - 2rem)); max-width: 100%; max-height: min(88dvh, 54rem); overflow: auto; overscroll-behavior: contain; }
dialog::backdrop { background: #0009; }
.dialog-inner { padding: 1.75rem; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.dialog-head h2 { font-size: 1.25rem; line-height: 1.5; padding-top: .25rem; }
.btn.dialog-close { flex: none; width: 2.75rem; height: 2.75rem; min-height: 2.75rem; padding: .125rem; background: #ffffff06; border: 0; border-radius: 50%; color: var(--muted); font-size: 1.5rem; margin-top: -.25rem; }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: 1.5rem; }
.dialog-inner > p, .dialog-inner > div > p { font-size: .875rem; line-height: 1.8; }
.dialog-error { color: var(--red); font-size: .8125rem; margin-top: .875rem; overflow-wrap: anywhere; }
.dialog-error:empty { display: none; }
#navigation-dialog { width: min(23rem, calc(100% - 1.5rem)); max-height: calc(100dvh - 6rem); margin: 4.75rem auto auto .75rem; background: #22212bf5; }
.navigation-dialog-inner, .navigation-sheet { padding: .75rem; }
.navigation-dialog-head, .navigation-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .3125rem .625rem .75rem; }
.navigation-dialog-head h2, .navigation-head h2 { font-size: 1rem; }
#navigation-dialog .nav-group { margin-top: 0; }
#navigation-dialog { padding: .75rem; }
#navigation-close { font-size: .75rem; border-radius: .4375rem; width: auto; padding-inline: .625rem; }
#mobile-nav { display: grid; gap: .25rem; padding-bottom: .25rem; }
#mobile-nav a { min-height: 3rem; padding-inline: .875rem; }
/* Medium canvases collapse inspectors before content becomes cramped. */
@media (max-width: 1199px) {
  .team-workspace, .team-workbench { grid-template-columns: minmax(0, 1fr) 15rem; }
  .member-row { grid-template-columns: 1.25rem 2.25rem minmax(0, 1fr) 6.75rem; gap: .625rem; }
  .member-avatar { height: 2.25rem; width: 2.25rem; }
  .member-actions { grid-column: 3 / -1; flex-direction: row; align-items: center; justify-content: flex-start; gap: .75rem; }
  .team-identity { grid-template-columns: 3.75rem minmax(0, 1fr); }
  .team-identity .actions { grid-column: 2; justify-content: flex-start; max-width: none; }
  .bar-item { grid-template-columns: 1rem 2.625rem minmax(0, 1fr) auto; gap: .625rem; }
  .analytics-part-preview, .analytics-part-preview .part-photo { width: 2.625rem; height: 2.625rem; flex-basis: 2.625rem; }
}
@media (max-width: 899px) {
  .app-shell { display: block; }
  .workspace-sidebar { display: none; }
  .workspace-toolbar { padding: .5rem 1rem; min-height: 4rem; gap: .75rem; }
  .mobile-nav-trigger { display: inline-flex; font-size: .8125rem; padding-inline: .75rem; min-height: 2.75rem; }
  .toolbar-context { display: flex; }
  #page-context { display: none; }
  .wrap { width: calc(100% - 2rem); }
  .main { width: calc(100% - 2rem); padding: 1.5rem 0 2rem; }
  .notice-wrap, .footer { width: calc(100% - 2rem); }
  .team-workspace, .team-workbench { grid-template-columns: minmax(0, 1fr) 15.5rem; }
  .team-identity .actions { grid-column: auto; }
  .team-identity { grid-template-columns: 3.5rem minmax(0, 1fr) auto; }
  .team-identity > .guild-avatar { width: 3.5rem; height: 3.5rem; }
  .account { margin-left: auto; }
  #toast { left: 50%; }
  .footer { padding-bottom: calc(1.25rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 699px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.125rem; }
  .page-heading, .page-intro { margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }
  .page-heading > div:first-child, .page-intro > div:first-child { flex: 1 1 100%; }
  .page-heading p, .page-intro p { font-size: .8125rem; line-height: 1.7; margin-top: .5rem; }
  .page-heading .actions, .page-intro .actions { padding: 0; }
  .workspace-panel, .card { border-radius: .75rem; }
  .card { padding: 1.125rem; }
  .workspace-panel { padding: 0; }
  .panel-toolbar { padding: 1rem; flex-wrap: wrap; gap: .875rem; }
  .panel-toolbar .search-bar { width: 100%; }
  .metric-strip { gap: 1rem 1.5rem; margin-bottom: 1.5rem; }
  .metric strong, .stat > strong { font-size: 1.375rem; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .guild-row, .guild-card { padding: 1.125rem 1rem; gap: .625rem; }
  .guild-row .actions, .guild-card .actions { grid-column: 1 / -1; grid-row: auto; justify-content: flex-start; padding-left: 3.75rem; }
  .guild-row .card-meta, .guild-card .card-meta, .guild-card > .guild-description { padding-left: 3.75rem; }
  .guild-directory-row { grid-template-columns: 2.875rem minmax(0, 1fr); gap: .625rem .875rem; }
  .guild-directory-row > .guild-avatar { grid-row: 1 / span 2; }
  .guild-directory-stats { display: flex; flex-wrap: wrap; gap: .375rem 1rem; grid-column: 2; font-size: .75rem; }
  .guild-directory-row > .row-action { grid-column: 2; margin-top: .25rem; }
  .guild-row-meta { flex-wrap: wrap; gap: .3125rem .875rem; }
  .guild-avatar { width: 2.875rem; height: 2.875rem; }
  .guild-tab { padding: .75rem .625rem; gap: .625rem; }
  .guild-tab-state { font-size: .75rem; }
  .guild-tab-copy strong { font-size: .8125rem; }
  .guild-tab-copy small { font-size: .75rem; }
  .guild-tab-detail { display: none; }
  .team-identity { grid-template-columns: 3.25rem minmax(0, 1fr); gap: .875rem; }
  .team-identity > .guild-avatar { height: 3.25rem; width: 3.25rem; border-radius: .8125rem; }
  .team-identity > div { min-width: 0; }
.team-identity h1 { font-size: 1.625rem; }
  .team-identity .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .team-capacity, .team-capacity-line { font-size: .75rem; gap: .25rem .75rem; }
  .team-checkin-strip, .checkin-strip { align-items: flex-start; padding: .875rem; gap: .625rem; }
  .team-checkin-strip > div, .checkin-strip > div { flex-basis: 50%; }
  .checkin-note { flex-basis: 100%; }
  .team-workspace, .team-workbench, .team-dashboard { grid-template-columns: 1fr; }
  .team-workspace .roster-panel, .team-workbench .roster-panel, .team-section.roster-panel, .team-section.team-schedule, .team-section.team-ledger { padding: 1.125rem; }
  .team-workspace .inspector, .team-workbench .inspector { padding: 1.25rem 1.125rem; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 .75rem .75rem; }
  .team-workspace .level-card { display: block; padding: 0; }
  .level-heading { margin-bottom: 1.125rem; }
  .milestones { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
  .member-row { grid-template-columns: 1.125rem 2.25rem minmax(0, 1fr) 5.5rem; gap: .5rem; padding: .9375rem 0; }
  .member-name strong { font-size: .8125rem; }
  .member-name small { font-size: .75rem; }
  .member-actions { grid-column: 3 / -1; gap: .75rem; }
  .member-actions .btn { min-height: 2.75rem; padding: .375rem 0; }
  .contribution-top strong { font-size: .75rem; }
  .contribution-top small { display: none; }
  .panel-heading { flex-wrap: wrap; gap: .5rem; }
  .panel-heading-copy { flex-basis: 50%; }
  .panel-heading > .btn { margin: -.375rem -.5rem 0 0; font-size: .75rem; padding-inline: .5rem; }
  .roster-note { font-size: .75rem; }
  .match-preview-row { grid-template-columns: 2.625rem minmax(0, 1fr); gap: .625rem; }
  .match-preview-row > .btn, .match-preview-row > .badge { grid-column: 2; justify-self: start; }
  .match-preview-copy strong { font-size: .8125rem; }
  .ledger-entry { grid-template-columns: 1.25rem minmax(0, 1fr) auto; gap: .625rem; }
  .ledger-entry-copy strong { font-size: .75rem; }
  .ledger-entry .badge { font-size: .75rem; }
  .wallet-sync-status.callout { display: block; padding: .875rem; }
  .wallet-sync-status > p:first-of-type { text-align: left; margin-top: .3125rem; }
  .wallet-sync-status > p:nth-of-type(2) { margin-top: .3125rem; }
  .wallet-sync-status > details { margin-top: .375rem; }
  .wallet-sync-status > details > summary { justify-content: flex-start; min-height: 2.75rem; }
  .wallet-sync-status > details > summary::after { margin-left: auto; }
  .wallet-overview { padding: 1.125rem; }
  .wallet-workspace { display: block; }
  .wallet-balance-main { padding: 1.125rem; }
  .wallet-bonus { padding: 1.125rem; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 .75rem .75rem; }
  .wallet-bonus > strong { margin: .5rem 0; }
  .wallet-ledger { padding: 1.125rem; }
  .team-activity > section { padding: 1.125rem; }
  .team-management { padding-inline: 1.125rem; }
  .wallet-balances { gap: 1rem; }
  .wallet-balances .stat + .stat, .wallet-balances .metric + .metric { padding-left: 1rem; }
  .wallet-balances .stat > strong, .wallet-balances .metric > strong { font-size: 2rem; }
  .wallet-balances .stat-label, .wallet-balances .metric > span { font-size: .75rem; }
  .wallet-guild { padding: 1rem; }
  .wallet-guild { grid-template-columns: 2.875rem minmax(0, 1fr); }
  .wallet-guild .actions { grid-column: 2; grid-row: auto; padding-left: 0; justify-content: flex-start; }
  .wallet-guild > p, .wallet-guild .membership-info { padding-left: 3.75rem; }
  .loadout-slotlist, .loadout-slots { gap: .375rem; margin-bottom: 1rem; }
  .loadout-slot { padding: .75rem .375rem; gap: .375rem; display: grid; justify-items: center; text-align: center; min-height: 6.125rem; border-radius: .5625rem; }
  .loadout-slot .part-photo { width: 2.375rem; height: 2.375rem; flex-basis: 2.375rem; }
  .loadout-slot strong { font-size: .75rem; }
  .loadout-slot small { font-size: .75rem; }
  .loadout-workspace { grid-template-columns: 1fr; border-radius: .75rem; }
  .loadout-preview { grid-template-columns: 5.5rem minmax(0, 1fr); align-items: center; justify-items: start; text-align: left; padding: 1.125rem; gap: 1rem; }
  .loadout-preview > .part-photo, .loadout-main-photo > .part-photo { width: 5.5rem; height: 5.5rem; border-radius: .625rem; grid-row: 1 / span 3; }
  .loadout-preview h2 { font-size: .875rem; }
  .loadout-preview p { font-size: .75rem; }
  .loadout-preview > .badge { grid-column: 2; }
  .loadout-preview > .loadout-top { grid-column: 1 / -1; padding: 0 0 .875rem; }
  .loadout-main-photo { width: 5.5rem; padding: 0; }
  .loadout-main-photo > .part-photo { width: 5.5rem; height: 5.5rem; }
  .preview-parts { gap: .375rem; }
  .preview-part { grid-template-columns: 2rem minmax(0, 1fr); gap: .375rem; }
  .preview-part strong { font-size: .75rem; }
  .loadout-editor { border: 0; border-top: 1px solid var(--line); padding: 1.125rem; }
  .part-search input { font-size: 1rem; }
  .selected-part { gap: .625rem; padding: .6875rem; }
  .selected-part .part-photo { width: 3.25rem; height: 3.25rem; flex-basis: 3.25rem; }
  .selected-part strong { font-size: .8125rem; }
  .part-option { gap: .625rem; min-height: 4.5rem; }
  .part-option strong { font-size: .8125rem; }
  .part-results { max-height: 19rem; }
  .save-dock, .save-toolbar { gap: .75rem; padding: .875rem; border-radius: .6875rem; bottom: max(.5rem, env(safe-area-inset-bottom)); }
  .save-dock > div { min-width: 0; }
  .save-dock strong { font-size: .75rem; }
  .save-dock small { font-size: .75rem; }
  .save-dock .btn { padding-inline: .75rem; font-size: .75rem; flex: none; max-width: 48%; }
  .event-filter-bar { align-items: flex-start; flex-direction: column; gap: .5rem; }
  .event-scope-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .event-scope-filters .btn { padding-inline: .375rem; font-size: .75rem; }
  .event-team-filters { gap: .375rem; }
  .btn.event-team-filter { font-size: .75rem; }
  .event-row, .event-card { grid-template-columns: 2.75rem minmax(0, 1fr); gap: .75rem; padding: 1.125rem 1rem; }
  .event-date strong { font-size: 1.75rem; }
  .event-date > span, .event-date > small { font-size: .75rem; }
  .event-body h3 { font-size: .875rem; line-height: 1.55; }
  .event-info { font-size: .75rem; gap: .3125rem; flex-direction: column; }
  .event-action, .event-row > .actions { grid-column: 2; max-width: none; display: flex; flex-wrap: wrap; }
  .event-action .btn { width: auto; min-height: 2.75rem; font-size: .75rem; }
  .event-body .actions { justify-content: flex-start; }
  .event-rewards { padding-inline: 1rem; }
  .event-rewards > summary { flex-wrap: wrap; gap: .25rem .5rem; padding-block: .75rem; }
  .event-rewards > summary > span { display: none; }
  .event-reward-items { grid-template-columns: 1fr; gap: 1rem; }
  .event-podium { gap: .375rem; }
  .podium-result { padding: .375rem; }
  .analytics-comparison { grid-template-columns: 1fr; }
  .analytics-comparison > .analytics-panel + .analytics-panel { border-left: 0; border-top: 1px solid var(--line); }
  .analytics-panel { padding: 1.125rem; }
  .analytics-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; margin-bottom: 1rem; }
  .analytics-tabs .btn { font-size: .75rem; padding-inline: .25rem; }
  .event-scope-filters.analytics-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 0; }
  .bar-item { grid-template-columns: 1rem 2.75rem minmax(0, 1fr) auto; gap: .625rem; }
  .analytics-part-preview, .analytics-part-preview .part-photo { width: 2.75rem; height: 2.75rem; flex-basis: 2.75rem; }
  .analytics-row-copy > strong { font-size: .8125rem; }
  .count { font-size: .75rem; }
  .two-fields { gap: .75rem; }
  .callout { padding: .8125rem .875rem; font-size: .75rem; }
  .compact-row { gap: .75rem; }
  .compact-row .actions { flex-wrap: wrap; justify-content: flex-end; }
  .compact-row > .badge { flex: none; }
  .detail-disclosure { padding-inline: 1rem; }
  .empty { padding: 2.5rem 1.25rem; }
  .empty p { font-size: .8125rem; }
  dialog { border-radius: .875rem; max-height: calc(100dvh - 2rem); }
  .dialog-inner { padding: 1.25rem; }
  .dialog-head { margin-bottom: 1.125rem; }
  .dialog-head h2 { font-size: 1.125rem; }
  .dialog-actions { align-items: stretch; }
  .dialog-actions .btn { flex: 1 1 7rem; }
  .price-summary { padding: .875rem; }
  .price-summary > strong { font-size: 1.25rem; }
  .donation-preview { padding-inline: .75rem; }
  .donation-preview > div { gap: .75rem; font-size: .75rem; }
  .login-card { padding: 1.5rem; margin-top: 1rem; }
  .login-card .actions { flex-direction: column; align-items: stretch; }
  .persona-control { max-width: 8rem; }
  .persona-control label { display: none; }
  .persona-control select { min-height: 2rem; font-size: .75rem; padding-inline: .375rem; }
  .test-detail { display: none; }
  .account { gap: .5rem; }
  .account-balance { font-size: .75rem; }
  .account-balance strong { font-size: .75rem; }
  .footer > span:last-child { display: none; }
}
@media (max-width: 359px) {
  .workspace-toolbar { gap: .5rem; }
  .mobile-nav-trigger { font-size: .75rem; gap: .375rem; padding-inline: .625rem; }
  .account-balance { max-width: 7.5rem; overflow-wrap: anywhere; }
  .persona-control { max-width: 6rem; }
  .persona-control select { max-width: 6rem; }
  .segmented-control:not(.analytics-tabs):not(.event-scope-filters) .btn { padding-inline: .625rem; font-size: .75rem; }
  .member-row { grid-template-columns: 1rem 2rem minmax(0, 1fr) 4.5rem; gap: .375rem; }
  .member-avatar { height: 2rem; width: 2rem; font-size: .8125rem; }
  .contribution-top strong { font-size: .75rem; }
  .member-name strong { font-size: .75rem; }
  .milestone strong { font-size: .75rem; }
  .milestone small { font-size: .75rem; }
  .loadout-preview { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .loadout-preview > .part-photo, .loadout-main-photo > .part-photo { width: 4.5rem; height: 4.5rem; }
  .selected-part { padding: .5rem; }
  .selected-part .part-photo { width: 2.75rem; height: 2.75rem; flex-basis: 2.75rem; }
  .selected-part .remove-part { min-width: 2.5rem; }
  .event-row { padding-inline: .875rem; }
}
/* Three separate accessibility preferences, not one blanket motion switch. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .btn:active:not(:disabled), .mobile-nav-trigger:active { transform: none; }
  .spinner { border-color: #c3a5df; opacity: .65; }
}
@media (prefers-reduced-transparency: reduce) {
  .workspace-sidebar { background: #14141b; backdrop-filter: none; }
  .workspace-toolbar { background: #101116; backdrop-filter: none; }
  .save-dock, .save-toolbar { background: #25232d; backdrop-filter: none; }
  dialog, #navigation-dialog { background: #22212b; backdrop-filter: none; }
  .toast-text { background: #30283a; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --muted: #cbc8d5; --quiet: #bcb7c7; --border: #ffffff4d; --line: #ffffff32; }
  .workspace-sidebar, .workspace-toolbar, .save-dock, dialog { background: #17171e; backdrop-filter: none; border-color: #ffffff70; }
  .btn, input, select, textarea, .guild-tab.active { border-color: #c4a7d8; }
  .badge { color: #e4c8fb; }
  .badge.green { color: #b9e9d1; }
  .badge.gold { color: #f3d7a3; }
}
