@font-face {
  font-family:Geist; font-style:normal; font-weight:100 900; font-display:swap;
  src:url("/assets/type/Geist.ttf") format("truetype");
}
:root {
  --ui-font:Geist,"Segoe UI",sans-serif; --ui-edge:clamp(16px,2vw,32px);
  --ui-ink:#172820; --ui-muted:#526158; --ui-line:#d6dfd8;
  --ui-paper:#fff; --ui-ground:#edf2ee; --ui-green:#176548; --ui-radius:14px;
}
body:is(.wa-dashboard,.auth-page,.password-page,.app-selector-page,.prediction-page,.share-result-page),
.editing-page :is(.app-header,.subpage-sidebar,.input-panel,dialog,.toast-region) { font-family:var(--ui-font); }
:is(button,input,select,textarea) { font-family:inherit; }
:where(h1,h2,h3) { text-wrap:balance; }
:where(button,a,input,select,textarea,summary):focus-visible { outline:2px solid #399776; outline-offset:3px; }
body :is(.metric,.badge,.table,.member-market-table,.result-auto-market-grid) { font-variant-numeric:tabular-nums; }

/* Entry screens */
body.auth-page, body.password-page {
  background:radial-gradient(ellipse at top left,#dceae0,transparent 52%),var(--ui-ground) !important;
  color:var(--ui-ink); overflow-y:auto; padding:24px;
}
body.auth-page .login-backdrop { display:none; }
body.auth-page .auth-card, body.password-page .panel, body.auth-page .dialog {
  background:var(--ui-paper) !important; color:var(--ui-ink); border:1px solid var(--ui-line);
  border-radius:18px; padding:clamp(22px,3.5vw,40px); box-shadow:0 18px 55px #18392212;
}
body.auth-page .auth-avatar { position:static; transform:none; width:44px; height:44px; border:0; border-radius:12px; box-shadow:none; margin:0 0 18px; }
body.auth-page .auth-avatar svg { width:24px; height:24px; }
body.auth-page .card-brand { justify-content:flex-start; letter-spacing:.09em; font-size:11px; }
body.auth-page .auth-card h2,body.password-page h1 { text-align:left; font-size:clamp(26px,3vw,36px); letter-spacing:-.045em; line-height:1.12; font-weight:650; }
body.auth-page .field-label { position:static; width:auto; height:auto; overflow:visible; clip:auto; clip-path:none; text-align:left; }
body.auth-page .auth-card label,body.password-page label { color:var(--ui-ink); }
body.auth-page .auth-card input,body.password-page input {
  min-height:46px; border:1px solid #bbc9c0; background:#fafcfb !important; color:var(--ui-ink); border-radius:9px;
}
body.password-page p { color:var(--ui-muted); }
body.password-page .message:not(.success) { color:#9b2720; }
body.password-page .message.success { color:var(--ui-green); }
body.auth-page .auth-card :is(.primary-action,.register-action),body.password-page button { min-height:44px; border-radius:9px; letter-spacing:0; }
body.password-page button { background:var(--ui-green); color:white; }

/* Admin workspace */
body.wa-dashboard:not(.trio-member):not(.panel-starting) { background:var(--ui-ground) !important; }
body.wa-dashboard:not(.trio-member) > .login-backdrop { display:none; }
body.wa-dashboard:not(.trio-member) .wa-sidebar {
  background:var(--color-bg-sidebar) !important; border:1px solid var(--ui-line) !important; border-radius:16px;
}
body.wa-dashboard:not(.trio-member) .content-shell {
  background:var(--color-bg-base) !important; border:1px solid var(--ui-line); border-radius:16px;
  backdrop-filter:none; padding:var(--ui-edge);
}
.wa-sidebar .tabs button { border-radius:8px; }
.wa-sidebar .nav-section-label { letter-spacing:.1em; }
body.wa-dashboard:not(.trio-member) .content-shell :is(.card,.status-section,.activity-section,.metric,.status-intro) {
  border:1px solid var(--ui-line); border-radius:var(--ui-radius); box-shadow:0 2px 5px #112d1c06;
  background-color:var(--ui-paper) !important;
}
body.wa-dashboard:not(.trio-member) .content-shell :is(.card,.status-section,.activity-section) { padding:clamp(14px,1.5vw,24px); }
body.wa-dashboard:not(.trio-member) .content-shell :is(.section-heading,.market-set-heading) { align-items:center; }
body.wa-dashboard:not(.trio-member) .content-shell h2 { font-weight:650; letter-spacing:-.035em; line-height:1.18; }
body.wa-dashboard:not(.trio-member) :is(.section-heading,.market-set-heading,.status-intro) h2 { font-size:clamp(19px,1.7vw,27px); }
body.wa-dashboard:not(.trio-member) .status-intro { border-inline-start:4px solid var(--ui-green); padding:var(--ui-edge); }
body.wa-dashboard:not(.trio-member) .status-metrics .metric strong { font-size:clamp(25px,2.5vw,40px); letter-spacing:-.05em; }
body.wa-dashboard:not(.trio-member) .panel.active table th { background:var(--color-bg-card-soft) !important; color:var(--ui-muted); font-size:11px; letter-spacing:.056em; }
body.wa-dashboard:not(.trio-member) :is(button,input,select,textarea) { border-radius:8px; }
body.wa-dashboard:not(.trio-member) :is(.app-dialog,dialog) { border-radius:16px; }
body.wa-dashboard:not(.trio-member) :is(.app-dialog,dialog) h2 { font-size:22px; font-weight:650; letter-spacing:-.035em; }
body.wa-dashboard .app-dialog-actions { gap:8px; }
body.wa-dashboard .member-market-table th { font-weight:600; }
body.wa-dashboard .member-market-table :is(select,input,button) { min-height:38px; }
#users .member-status-switch {
  display:inline-flex; align-items:center; gap:7px; min-height:36px; padding:4px 8px;
  border:1px solid var(--ui-line); background:var(--ui-paper); color:var(--ui-ink); white-space:nowrap;
}
#users .member-status-track {
  display:inline-flex; align-items:center; box-sizing:border-box; width:30px; height:18px;
  padding:2px; border-radius:10px; background:#66736c;
}
#users .member-status-track::before {
  content:""; width:14px; height:14px; border-radius:50%; background:white;
}
#users .member-status-switch[aria-checked="true"] .member-status-track {
  justify-content:flex-end; background:var(--ui-green);
}
#users .member-status-switch:focus-visible { outline:2px solid var(--ui-green); outline-offset:2px; }

/* TrisPro back office. Member screens keep their own palette. */
body.wa-dashboard.admin-workspace {
  &:has(#users.active) .wa-sidebar { top:4.2dvh; min-height:91.6dvh; max-height:91.6dvh; }
  &:has(#users.active) .wa-sidebar .tabs button { padding-inline:12px; gap:12px; }
  color-scheme:light;
  --ui-ground:#e2e4e8; --ui-paper:#f6f6f8; --ui-line:#ccd0d7;
  --ui-ink:#202124; --ui-muted:#595d63; --ui-green:#303236;
  --color-bg-page:var(--ui-ground); --color-bg-base:var(--ui-ground);
  --color-bg-card:var(--ui-paper); --color-bg-card-soft:#e9ebef;
  --color-bg-sidebar:var(--ui-paper); --color-bg-sidebar-hover:#dfe2e8;
  --color-border:var(--ui-line); --color-accent:#383c40; --color-accent-hover:#202124;
  --color-text-primary:var(--ui-ink); --color-text-secondary:var(--ui-muted); --color-text-secondary-aa:var(--ui-muted);
  --color-status-success-bg:#e0f4e8; --color-status-success-text:#266041;
  --color-status-warning-bg:#fff2d9; --color-status-warning-text-aa:#735619;
  --color-status-error-bg:#fbe9e8; --color-status-error-text:#963a35;
  --focus:#526970;
  color:var(--ui-ink); accent-color:var(--color-accent); background:var(--ui-ground) !important;

  & .content-shell { border-color:transparent; }
  & :is(.panel-loading,.sidebar-product,.sidebar-product strong,.profile-copy strong,.wa-sidebar .tabs button) { color:var(--ui-ink); }
  & :is(.sidebar-product small,.profile-copy small,.nav-section-label) { color:var(--ui-muted); }
  & .wa-sidebar .tabs button { background:transparent; border-color:transparent; }
  & .wa-sidebar .tabs button:is(:hover,.active) { background:var(--color-bg-sidebar-hover); color:var(--ui-ink); }
  & .tabs button.active svg { color:inherit; }
  & .tabs button.active::before { background:transparent; }
  & .app-dialog-head { grid-template-columns:minmax(0,1fr); }
  & .app-dialog-head > .app-dialog-icon { display:none; }
  & :is(.brand-mark,.profile-avatar,.sidebar-footer-actions button,.mobile-drawer-close) {
    background:var(--color-bg-card-soft); color:var(--ui-ink); border-color:var(--ui-line);
  }
  & :is(.sidebar-footer,.section-heading,.member-watch-item,.login-user-history,.upcoming-schedule-item,.market-set-footer) { border-color:var(--ui-line); }
  & :is(.section-heading p,small,.muted,.metric-label,.status-note) { color:var(--ui-muted); }
  & :is(h1,h2,h3,h4,label,legend,.metric strong,.upcoming-schedule-item strong) { color:var(--ui-ink); }
  & :is(dialog,.app-dialog) { background:var(--ui-paper) !important; color:var(--ui-ink); border-color:var(--ui-line); }
  & dialog::backdrop, & .app-dialog-overlay { background:rgb(25 28 33 / 36%); }
  & :is(select,textarea,input:not([type=checkbox],[type=radio])) { background:var(--ui-paper); color:var(--ui-ink); border-color:#b8bdc6; }
  & ::placeholder { color:#666a70; }
  & :is(input,select,textarea,button,summary,a):focus-visible { outline-color:var(--focus); }
  & :is(button.primary,.status-quick-actions button,.section-heading button:not(.danger)) {
    background:var(--ui-paper); color:var(--ui-ink); border-color:#bec0c4;
  }
  & button.primary:hover:not(:disabled), & .status-quick-actions button:hover, & .section-heading button:not(.danger):hover {
    background:var(--color-bg-sidebar-hover); color:var(--ui-ink); border-color:#919398;
  }
  & :is(button.danger,button.danger-confirm) { background:#ae302b; color:white; border-color:#ae302b; }
  & :is(button.danger,button.danger-confirm):hover:not(:disabled) { background:#902620; color:white; }
  & .badge { background:var(--color-bg-card-soft); color:var(--ui-muted); border-color:transparent; }
  & :is(.badge.good,.result-pill.success,.preview-badge) { background:var(--color-status-success-bg); color:var(--color-status-success-text); border-color:transparent; }
  & :is(.badge.warning,.badge.skipped,.result-pill.partial,.preview-simulation-banner) { background:var(--color-status-warning-bg); color:var(--color-status-warning-text-aa); border-color:transparent; }
  & :is(.badge.bad,.result-pill.failed) { background:var(--color-status-error-bg); color:var(--color-status-error-text); border-color:transparent; }
  & #users .member-status-switch[aria-checked="true"] .member-status-track { background:#36784e; }
  & :is(.cp-card-head,.custom-predictions-wrapper .section-heading code,.primary-chip,.prediction-slot button:first-child,#customImageGallery .prediction-channel-options label:has(:checked)) {
    background:var(--color-bg-card-soft); color:var(--ui-ink); border-color:#c6c8cb;
  }
  & #customImageGallery .prediction-channel-options input { accent-color:var(--color-accent); }
}

body.admin-workspace #status {
  & .admin-overview-heading, & .admin-member-section .section-heading {
    display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px;
  }
  & .admin-overview-heading { margin:0 0 20px; }
  & .admin-overview-heading h1 { font-size:clamp(26px,3vw,40px); margin:0; line-height:1.12; letter-spacing:-.045em; }
  & .admin-overview-heading p { margin:.35rem 0 0; color:var(--ui-muted); }
  & .metric { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:6px; padding:clamp(14px,1.6vw,24px); }
  & .metric-icon { display:none; }
  & .metric :is(.metric-label,strong,small) { align-self:flex-start; }
  & .metric .metric-label { font-weight:500; font-size:14px; }
  & .section-heading button.danger { background:var(--ui-paper); color:var(--ui-muted); border-color:var(--ui-line); }
  & .section-heading button.danger:hover:not(:disabled) { background:var(--color-status-error-bg); color:var(--color-status-error-text); }
  & .section-heading button:disabled { color:#76787c; background:#f5f5f6; }
  & .admin-member-section .section-heading { border:0; margin:0 0 12px; }
  & .admin-monitor-scroll { overflow:auto; max-height:55dvh; overscroll-behavior:contain; }
  & .admin-monitor-table { width:100%; border-collapse:separate; border-spacing:0; font-size:14px; }
  & .admin-monitor-table :is(td,th) {
    padding:12px 14px; text-align:left; border:0; border-bottom:1px solid var(--ui-line);
    background:var(--ui-paper) !important; color:var(--ui-ink); vertical-align:middle;
  }
  & .admin-monitor-table thead th { position:sticky; top:0; z-index:1; color:var(--ui-muted); text-transform:none; letter-spacing:0; font-size:13px; font-weight:500; }
  & .admin-monitor-table tbody th { font-size:14px; text-transform:none; letter-spacing:0; font-weight:600; }
  & .admin-monitor-table tr:last-child td, & .admin-monitor-table tbody tr:last-child th { border-bottom:0; }
  & .admin-monitor-table .badge { white-space:nowrap; }
  & .monitor-errors { margin-top:12px; font-size:13px; color:var(--ui-muted); }
  & .monitor-errors summary { cursor:pointer; }
  & .monitor-errors .member-watch-item { margin-block:8px; }
}
@media (max-width:760px) {
  body.admin-workspace #status .admin-status-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.admin-workspace #status .admin-member-section .section-heading { flex-direction:row; text-align:left; }
  body.admin-workspace #status .admin-monitor-table { min-width:34rem; }
}

/* Proportions from the approved TrisPro desktop mockup. */
body.wa-dashboard.admin-workspace {
  --ui-ground:#e2e4e8;
  --ui-radius:20px;
  & .app-shell { width:calc(100% - 4.4vw); max-width:none; grid-template-columns:17.5% minmax(0,1fr); gap:1.9vw; padding:4.2dvh 0; height:auto; min-height:100dvh; }
  & .wa-sidebar { top:40px; min-height:calc(100dvh - 80px); max-height:calc(100dvh - 80px); border:0 !important; border-radius:20px; padding:24px 12px; gap:30px; }
  & .sidebar-product { gap:14px; padding:8px 12px; }
  & .sidebar-product strong { font-size:24px; font-weight:700; letter-spacing:-.025em; }
  & .sidebar-product small { font-size:16px; margin-top:4px; }
  & .brand-mark { background:transparent; border:0; width:38px; height:38px; }
  & .brand-mark svg { width:34px; height:34px; }
  & .wa-sidebar .tabs { gap:8px; }
  & .wa-sidebar .tabs button { min-height:58px; padding:14px 18px; font-size:18px; gap:16px; border-radius:12px; font-weight:500; }
  & .wa-sidebar .tabs button svg { width:24px; height:24px; }
  & .content-shell { padding:20px 0 0; border:0; border-radius:0; height:auto; min-height:0; max-height:none; overflow:visible; scrollbar-gutter:auto; }
  & .panel-stack { padding-top:0; }
  & .content-shell :is(.status-section,.metric) { border:0; box-shadow:none; }
  & .sidebar-footer { grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; }
  & .sidebar-profile { grid-template-columns:34px minmax(0,1fr); padding:4px 2px; gap:8px; }
  & .profile-avatar { background:transparent; border:0; width:38px; height:38px; }
  & .profile-avatar svg { width:32px; height:32px; }
  & .profile-copy strong { font-size:18px; }
  & .profile-copy small { font-size:16px; margin-top:4px; }
  & .sidebar-footer-actions { display:flex; align-items:center; justify-content:flex-end; gap:4px; }
  & .sidebar-footer-actions button { padding:6px; width:30px; min-height:30px; border:0; background:transparent; }
  & .sidebar-footer-actions button span { display:none; }
}
body.admin-workspace #status {
  & .admin-overview-heading { margin-bottom:36px; }
  & .admin-overview-heading h1 { font-size:44px; font-weight:700; letter-spacing:-.03em; }
  & .admin-overview-heading p { font-size:20px; margin-top:6px; }
  & .status-quick-actions button { font-size:18px; min-height:52px; padding:12px 22px; border-radius:13px; }
  & .status-metrics { gap:14px; margin-bottom:30px; }
  & .metric { min-height:148px; padding:22px 26px; justify-content:flex-start; gap:20px; }
  & .metric .metric-label { font-size:20px; }
  & .metric strong { font-size:48px; font-weight:700; letter-spacing:-.03em; }
  & .metric small { display:none; }
  & .admin-command-layout { display:flex; flex-direction:column; gap:30px; }
  & .admin-command-layout > * { width:100%; }
  & :is(.admin-member-section,.admin-timeline) { padding:24px; }
  & :is(.admin-member-section,.admin-timeline) h2 { font-size:27px; font-weight:700; letter-spacing:-.025em; }
  & .admin-member-section .section-heading { margin-bottom:24px; }
  & .admin-member-section .section-heading > .badge { font-size:16px; padding:6px 14px; }
  & .admin-monitor-table { font-size:20px; table-layout:fixed; }
  & .admin-monitor-table th:nth-child(1) { width:23%; }
  & .admin-monitor-table th:nth-child(2) { width:25%; }
  & .admin-monitor-table th:nth-child(3) { width:21%; }
  & .admin-monitor-table :is(td,th) { padding:17px 10px; font-size:20px; }
  & .admin-monitor-table thead th { font-size:18px; font-weight:500; }
  & .admin-monitor-table tbody th { font-size:21px; font-weight:600; }
  & .admin-monitor-table .badge { font-size:18px; border-radius:10px; padding:5px 14px; }
  & .admin-timeline .section-heading { border:0; padding:0; margin-bottom:24px; }
  & .admin-timeline-scroll { overflow:visible; max-height:none; }
  & .admin-timeline table { width:100%; border-collapse:collapse; margin:0; font-size:19px; }
  & .admin-timeline :is(td,th) { padding:18px 10px; border:0; border-bottom:1px solid var(--ui-line); text-align:left; background:var(--ui-paper) !important; color:var(--ui-ink); text-transform:none; letter-spacing:0; font-size:19px; }
  & .admin-timeline td:first-child { white-space:nowrap; width:18%; }
  & .admin-timeline th { width:36%; }
  & .admin-timeline tr:last-child > * { border-bottom:0; }
  & .delivery-dot { display:inline-block; width:12px; height:12px; border-radius:50%; background:#91dcb5; margin-right:22px; }
  & .delivery-dot.partial { background:#e4c887; }
  & .admin-history-details > summary { cursor:pointer; color:var(--ui-muted); font-size:13px; }
  & .admin-history-details[open] > section { margin-top:14px; }
}
@media (max-width:1100px) {
  body.wa-dashboard.admin-workspace {
    & .app-shell { width:calc(100% - 32px); grid-template-columns:210px minmax(0,1fr); gap:20px; padding:20px 0; }
    & .wa-sidebar { top:20px; min-height:calc(100dvh - 40px); max-height:calc(100dvh - 40px); }
    & .sidebar-product strong { font-size:20px; }
    & .wa-sidebar .tabs button { font-size:15px; padding-inline:12px; }
  }
  body.admin-workspace #status {
    & .metric { padding:20px; min-height:130px; }
    & .metric .metric-label { font-size:15px; }
    & .metric strong { font-size:36px; }
    & .admin-monitor-table :is(td,th), & .admin-monitor-table tbody th { font-size:16px; }
    & .admin-monitor-table .badge { font-size:14px; }
  }
}
@media (max-width:760px) {
  body.wa-dashboard.admin-workspace {
    & .app-shell { display:block; width:calc(100% - 24px); padding:12px 0; }
    & .content-shell { padding-top:0; }
    & .wa-sidebar { min-height:0; max-height:100dvh; top:0; }
  }
  body.admin-workspace #status {
    & .admin-overview-heading { margin-bottom:24px; }
    & .admin-overview-heading h1 { font-size:32px; }
    & .admin-overview-heading p { font-size:16px; }
    & .status-quick-actions button { font-size:15px; min-height:42px; }
    & .metric { gap:12px; }
    & :is(.admin-member-section,.admin-timeline) { padding:18px; }
    & :is(.admin-member-section,.admin-timeline) h2 { font-size:23px; }
    & .admin-timeline table { min-width:540px; }
    & .admin-timeline-scroll { overflow-x:auto; }
  }
}

/* Keep the Status overview proportional to the desktop viewport. */
@media (min-width:1101px) {
  body.wa-dashboard.admin-workspace:has(#status.active) {
    & .app-shell { padding-bottom:0; }
    & .content-shell { padding-top:1.5dvh; }
    & .wa-sidebar { top:4.2dvh; min-height:91.6dvh; max-height:91.6dvh; }
  }
  body.admin-workspace #status {
    & .admin-overview-heading { margin-bottom:3.2dvh; }
    & .admin-overview-heading h1 { font-size:clamp(32px,4.3dvh,44px); line-height:1.12; }
    & .admin-overview-heading p { font-size:clamp(16px,2.1dvh,21px); line-height:1.35; }
    & .status-quick-actions button { font-size:clamp(15px,1.9dvh,19px); min-height:5.5dvh; padding:1dvh 22px; }
    & .status-metrics { gap:14px; margin-bottom:3.2dvh; }
    & .metric { min-height:15.3dvh; padding:2.2dvh 26px; gap:2dvh; }
    & .metric .metric-label { font-size:clamp(15px,2.1dvh,21px); line-height:1.3; }
    & .metric strong { font-size:clamp(32px,5dvh,51px); line-height:1; }
    & .admin-command-layout { gap:3dvh; }
    & :is(.admin-member-section,.admin-timeline) { padding:2.2dvh 24px; }
    & :is(.admin-member-section,.admin-timeline) h2 { font-size:clamp(21px,2.8dvh,29px); line-height:1.2; }
    & :is(.admin-member-section,.admin-timeline) .section-heading { margin-bottom:1.5dvh; padding-bottom:1.7dvh; }
    & .admin-monitor-table :is(td,th) { padding:1.55dvh 10px; line-height:1.35; font-size:clamp(15px,2.1dvh,22px); }
    & .admin-monitor-table thead th { font-size:clamp(14px,1.95dvh,20px); }
    & .admin-monitor-table tbody th { font-size:clamp(16px,2.2dvh,23px); }
    & .admin-monitor-table .badge { font-size:clamp(14px,1.9dvh,20px); line-height:1.3; padding:4px 14px; }
    & .admin-timeline :is(td,th) { font-size:clamp(15px,2.1dvh,22px); padding:1.55dvh 10px; line-height:1.35; }
    & .admin-history-details { margin-top:-1.5dvh; }
  }
}
body.wa-dashboard.admin-workspace #status {
  & :is(.metric,.admin-member-section,.admin-timeline) { border:1px solid var(--ui-line); box-shadow:0 3px 12px #20212404; }
  & :is(.admin-member-section,.admin-timeline) .section-heading { border-bottom:1px solid var(--ui-line); }
}

/* The users list shares the sidebar's grid row; only its records scroll. */
body.wa-dashboard .app-shell:has(#users.active) {
  height:100dvh;
  min-height:0;
  grid-template-rows:minmax(0,1fr);
}
body.wa-dashboard .content-shell:has(#users.active) {
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
  scrollbar-gutter:auto;
}
body.wa-dashboard .panel-stack:has(> #users.active),
#users.active,
#users.active > .card {
  display:flex;
  flex-direction:column;
  flex:1 1 0;
  min-height:0;
  min-width:0;
}
body.wa-dashboard .panel-stack:has(> #users.active) { padding-top:0; }
#users .section-heading { flex:none; }
#users .users-table-scroll {
  flex:1 1 0;
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  scroll-padding-top:3rem;
}
#users .users-table-scroll:focus-visible { outline:2px solid var(--ui-green); outline-offset:-2px; }
#users .users-table-scroll table { width:100%; margin:0; overflow:visible; }
#users .users-table-scroll th { position:sticky; top:0; z-index:1; }
@media (min-width:761px) {
  body.wa-dashboard .content-shell:has(#users.active) { padding:0; }
}

@supports (appearance:base-select) {
  body.wa-dashboard.admin-workspace #users .member-set-controls select,
  body.wa-dashboard.admin-workspace #users .member-set-controls select::picker(select) {
    appearance:base-select;
  }
  body.wa-dashboard.admin-workspace #users .member-set-controls select {
    align-items:center;
    padding:10px 12px;
  }
  body.wa-dashboard.admin-workspace #users .member-set-controls select::picker(select) {
    margin-top:4px;
    padding:4px;
    border:1px solid var(--ui-line);
    border-radius:10px;
    background:var(--ui-paper);
    color:var(--ui-ink);
    box-shadow:0 6px 20px #20212418;
  }
  body.wa-dashboard.admin-workspace #users .member-set-controls option {
    min-height:36px;
    padding:6px 8px;
    border-radius:6px;
    font-size:inherit;
  }
  body.wa-dashboard.admin-workspace #users .member-set-controls option:is(:hover,:focus,:checked) {
    background:var(--color-bg-card-soft);
    color:var(--ui-ink);
  }
}

/* Member management uses the same type scale and surfaces as Status. */
body.wa-dashboard.admin-workspace {
  & #users > .card { width:100%; box-sizing:border-box; border:1px solid var(--ui-line); border-radius:20px; padding:clamp(18px,2.2dvh,24px); box-shadow:0 3px 12px #20212404; }
  & #users .section-heading { gap:16px; margin:0 0 20px; padding-bottom:20px; border-bottom:1px solid var(--ui-line); }
  & #users .section-heading h2 { margin:0; font-size:clamp(21px,2.8dvh,29px); line-height:1.2; font-weight:700; letter-spacing:-.025em; }
  & #users .section-heading .actions { margin:0; }
  & #users :is(button,select) { font-size:clamp(14px,1.8dvh,18px); line-height:1.35; min-height:40px; border-radius:10px; }
  & #users .section-heading button,
  & #users .users-table-scroll :is(button,select) { min-height:48px; font-size:clamp(16px,1.85dvh,18px); }
  & #users .section-heading button { padding:10px 22px; }
  & #users .users-table-scroll { border:1px solid var(--ui-line); border-radius:12px; scrollbar-width:thin; scrollbar-gutter:stable; }
  & #users .users-table-scroll table { min-width:1128px; table-layout:fixed; border-collapse:separate; border-spacing:0; }
  & #users .users-number-column { width:48px; }
  & #users .users-username-column,
  & #users .users-web-column { width:auto; }
  & #users .users-role-column { width:108px; }
  & #users .users-status-column { width:184px; }
  & #users .users-market-column { width:268px; }
  & #users .users-action-column { width:200px; }
  & #users .users-table-scroll :is(th,td) { padding:clamp(12px,1.55dvh,17px) 14px; text-align:left; vertical-align:middle; border:0; border-bottom:1px solid var(--ui-line); line-height:1.4; }
  & #users .users-table-scroll th { background:var(--color-bg-card-soft) !important; color:var(--ui-muted); font-size:clamp(14px,1.8dvh,18px); font-weight:500; letter-spacing:0; text-transform:none; white-space:nowrap; }
  & #users .users-table-scroll td { font-size:clamp(15px,2dvh,20px); color:var(--ui-ink); background:var(--ui-paper); }
  & #users .users-table-scroll :is(th,td):first-child { text-align:center; white-space:nowrap; }
  & #users td[data-label="No."] { color:var(--ui-muted); font-variant-numeric:tabular-nums; }
  & #users td[data-label="Username"] { font-weight:600; }
  & #users td:is([data-label="Username"],[data-label="Web"]) { overflow-wrap:anywhere; }
  & #users .users-table-scroll tr:last-child td { border-bottom:0; }
  & #users .table-actions { display:table-cell; white-space:nowrap; }
  & #users .member-set-controls { display:flex; align-items:center; gap:8px; width:max-content; }
  & #users .member-set-controls select { flex:none; min-width:0; width:6.4em; margin:0; }
  & #users .member-set-controls button { flex:none; padding:10px 18px; }
  & #users .member-account-action { width:100%; min-width:9.5em; padding:10px 20px; justify-content:center; }
  & #users .member-account-action svg { width:18px; height:18px; }
  & #users .member-status-switch {
    display:inline-grid; grid-template-columns:40px 6em; align-items:center; justify-content:start;
    gap:8px; padding:6px 0; text-align:left; border:0; background:transparent; box-shadow:none;
  }
  & #users .member-status-track { width:40px; height:24px; padding:3px; border-radius:12px; }
  & #users .member-status-track::before { width:18px; height:18px; }
  & :is(#registrationDialog,.admin-user-dialog) { width:min(520px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); overflow-y:auto; padding:clamp(20px,2.6dvh,28px); border:1px solid var(--ui-line); border-radius:20px; box-shadow:0 18px 70px #20212424; }
  & :is(#registrationDialog,.admin-user-dialog) h2 { font-size:clamp(21px,2.8dvh,27px); font-weight:700; line-height:1.2; margin:0; }
  & :is(#registrationDialog,.admin-user-dialog) :is(.user-form,.admin-user-form) { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; margin-top:22px; }
  & :is(#registrationDialog,.admin-user-dialog) label { display:grid; gap:7px; font-size:15px; font-weight:500; color:var(--ui-muted); }
  & :is(#registrationDialog,.admin-user-dialog) :is(input,select) { min-height:44px; width:100%; box-sizing:border-box; padding:10px 12px; font-size:16px; line-height:1.35; border:1px solid #b8bdc6; border-radius:10px; background:var(--ui-paper); color:var(--ui-ink); }
  & .admin-user-dialog input:disabled { background:var(--color-bg-card-soft); color:var(--ui-muted); opacity:1; }
  & .admin-user-dialog .app-dialog-head { padding-bottom:18px; border-bottom:1px solid var(--ui-line); align-items:flex-start; }
  & .admin-user-dialog .app-dialog-head p { margin:8px 0 0; color:var(--ui-muted); font-size:15px; }
  & #registrationTitle { padding-bottom:18px; border-bottom:1px solid var(--ui-line); }
  & :is(#registrationDialog,.admin-user-dialog) :is(.actions,.admin-user-actions) { margin-top:22px; padding-top:18px; border-top:1px solid var(--ui-line); gap:10px; }
  & :is(#registrationDialog,.admin-user-dialog) button { min-height:44px; padding:10px 16px; font-size:15px; line-height:1.35; border-radius:10px; }
  & .admin-user-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  & .admin-user-actions button { width:100%; min-width:0; }
  & form.admin-user-dialog { display:grid; grid-template-rows:auto minmax(0,1fr) auto; overflow:hidden; box-sizing:border-box; }
  & .admin-user-dialog .admin-user-form { overflow-y:auto; min-height:0; padding:3px; margin-inline:-3px; }
  & .admin-account-tools { display:flex; flex-wrap:wrap; gap:10px; }
  & .admin-account-tools button { flex:1 1 auto; }
  & #registrationError:empty { display:none; }
}
body.wa-dashboard.admin-workspace:has(#users.active) .app-dialog:not(.admin-user-dialog) {
  width:min(480px,calc(100vw - 32px)); padding:24px; border:1px solid var(--ui-line); border-radius:20px;
  & h2 { font-size:24px; line-height:1.2; }
  & p { font-size:16px; line-height:1.5; }
  & input { min-height:44px; padding:10px 12px; font-size:16px; border-radius:10px; }
  & button { min-height:44px; padding:10px 16px; font-size:15px; border-radius:10px; }
  & .app-dialog-actions { border-top:1px solid var(--ui-line); padding-top:18px; margin-top:20px; gap:10px; }
}
@media (max-width:760px) {
  body.wa-dashboard.admin-workspace #users .users-table-scroll {
    & :is(table,thead,tbody,tr,th,td) { display:revert; }
    & td::before { display:none; }
  }
}

/* Market sets share the management table and dialog typography. */
body.wa-dashboard.admin-workspace {
  &:has(#marketSets.active) .wa-sidebar .tabs button { padding-inline:12px; gap:12px; }
  & #marketSetManager { padding:clamp(18px,2.2dvh,24px); border:1px solid var(--ui-line); border-radius:20px; box-shadow:0 3px 12px #20212404; }
  & .market-set-heading { margin:0 0 20px; padding-bottom:20px; border-bottom:1px solid var(--ui-line); flex-wrap:wrap; gap:16px; }
  & #marketSetManager .market-set-heading h2 { font-size:clamp(21px,2.8dvh,29px); line-height:1.2; font-weight:700; letter-spacing:-.025em; }
  & #marketSetManager button { min-height:40px; padding:10px 16px; font-size:clamp(14px,1.8dvh,18px); line-height:1.35; border-radius:10px; }
  & .market-sets-table-scroll { overflow:auto; max-height:66dvh; border:1px solid var(--ui-line); border-radius:12px; scrollbar-width:thin; }
  & .market-sets-table-scroll table { width:100%; margin:0; border-collapse:separate; border-spacing:0; }
  & .market-sets-table-scroll :is(th,td) { padding:clamp(12px,1.55dvh,17px) 14px; text-align:left; vertical-align:middle; line-height:1.4; border:0; border-bottom:1px solid var(--ui-line); }
  & #marketSetManager .market-sets-table-scroll th { position:sticky; top:0; z-index:1; background:var(--color-bg-card-soft) !important; color:var(--ui-muted); font-size:clamp(14px,1.8dvh,18px); font-weight:500; letter-spacing:0; text-transform:none; }
  & .market-sets-table-scroll td { font-size:clamp(15px,2dvh,20px); color:var(--ui-ink); background:var(--ui-paper); }
  & .market-sets-table-scroll td:first-child { font-weight:600; }
  & .market-sets-table-scroll tr:last-child td { border-bottom:0; }
  & .market-sets-table-scroll :is(th,td):last-child { width:1%; white-space:nowrap; }
  & #marketSetManager > p { margin:0; padding:20px 0; font-size:16px; color:var(--ui-muted); }
  & #marketSetDialog { width:min(1200px,calc(100vw - 40px)); height:min(760px,calc(100dvh - 48px)); padding:0; border:1px solid var(--ui-line); border-radius:20px; box-shadow:0 18px 70px #20212424; }
  & #marketSetTitle { padding:22px 26px; font-size:clamp(21px,2.8dvh,27px); font-weight:700; line-height:1.2; }
  & #marketSetDialog .market-set-body { grid-template-columns:minmax(260px,1fr) minmax(0,1.7fr); gap:26px; padding:24px 26px; }
  & #marketSetDialog .market-set-fields { padding-right:26px; gap:10px; }
  & #marketSetDialog .market-set-times { gap:12px; }
  & #marketSetDialog label { color:var(--ui-muted); font-size:15px; font-weight:500; line-height:1.4; }
  & #marketTimesTitle { font-size:19px; font-weight:600; color:var(--ui-ink); }
  & #marketSetDialog :is(small,output,.market-times-empty) { font-size:14px; line-height:1.5; }
  & #marketSetDialog :is(input,textarea) { box-sizing:border-box; min-height:44px; padding:10px 12px; border:1px solid #b8bdc6; border-radius:10px; background:var(--ui-paper); color:var(--ui-ink); font-size:16px; line-height:1.5; }
  & #marketSetDialog textarea { width:100%; line-height:1.65; }
  & #marketResultTimes { column-gap:20px; scrollbar-width:thin; }
  & #marketResultTimes label { padding:12px 0; gap:12px; color:var(--ui-ink); border-color:var(--ui-line); }
  & #marketResultLinks label { color:var(--ui-ink); }
  & #marketSetDialog .market-set-tabs button { background:var(--ui-paper); color:var(--ui-muted); border:1px solid var(--ui-line); }
  & #marketSetDialog .market-set-tabs button[aria-pressed="true"] { background:var(--color-bg-card-soft); color:var(--ui-ink); border-color:#b8bdc6; font-weight:600; }
  & #marketSetDialog input[type=time] { flex:none; width:8.5em; min-height:42px; padding:8px 10px; font-size:15px; }
  & #marketResultTimes .market-time-row input[type=time] { width:100%; }
  & #marketSetDialog .market-set-footer { padding:18px 26px; background:var(--color-bg-card-soft); border-top:1px solid var(--ui-line); }
  & #marketSetDialog [data-delete-set] { margin-right:auto; }
  & #marketSetDialog .actions { gap:10px; }
  & #marketSetDialog button { min-height:44px; padding:10px 16px; font-size:15px; line-height:1.35; border-radius:10px; }
}
@media (max-width:700px) {
  body.wa-dashboard.admin-workspace {
    & #marketSetDialog { width:calc(100vw - 24px); height:calc(100dvh - 32px); }
    & #marketSetTitle { padding:18px; }
    & #marketSetDialog .market-set-body { display:flex; padding:18px; gap:24px; }
    & #marketSetDialog .market-set-fields { padding:0 0 20px; border-right:0; border-bottom:1px solid var(--ui-line); }
    & #marketSetDialog .market-set-footer { padding:14px 18px; }
    & .market-sets-table-scroll table { min-width:440px; }
    & .market-sets-table-scroll :is(table,thead,tbody,tr,th,td) { display:revert; }
    & .market-sets-table-scroll td::before { display:none; }
  }
}

/* Custom prediction editing and attachment controls follow the admin system. */
body.wa-dashboard.admin-workspace {
  & :is(#customPredictions,#customResults) .custom-predictions-wrapper { padding:clamp(18px,2.2dvh,24px); border:1px solid var(--ui-line); border-radius:20px; box-shadow:0 3px 12px #20212404; }
  & :is(#customPredictions,#customResults) .section-heading { gap:16px; margin:0 0 22px; padding-bottom:20px; border-bottom:1px solid var(--ui-line); }
  & :is(#customPredictions,#customResults) .section-heading h2 { margin:0; font-size:clamp(21px,2.8dvh,29px); line-height:1.2; font-weight:700; letter-spacing:-.025em; }
  & :is(#customPredictions,#customResults) .section-heading p { margin:8px 0 0; font-size:15px; line-height:1.5; color:var(--ui-muted); }
  & :is(#customPredictions,#customResults) .custom-pred-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:26px; }
  & :is(#customPredictions,#customResults) .custom-pred-form-col { min-width:0; gap:18px; }
  & :is(#customPredictions,#customResults) .cp-field-label { font-size:15px; line-height:1.4; text-transform:none; letter-spacing:0; gap:8px; color:var(--ui-muted); }
  & :is(#customPredictions,#customResults) .custom-pred-select { min-height:44px; padding:10px 12px; font-size:16px; font-weight:500; border-radius:10px; background:var(--ui-paper); }
  & :is(#customPredictions,#customResults) .cp-card { border-radius:12px; border-color:var(--ui-line); }
  & :is(#customPredictions,#customResults) .cp-card-head { padding:12px 14px; background:var(--color-bg-card-soft); border-bottom:1px solid var(--ui-line); flex-wrap:wrap; gap:8px; }
  & :is(#customPredictions,#customResults) .cp-card-title { font-size:15px; letter-spacing:0; text-transform:none; }
  & :is(#customPredictions,#customResults) .cp-card-hint { font-size:13px; color:var(--ui-muted); }
  & :is(#customPredictions,#customResults) .cp-tag-rows { padding:14px; gap:12px; }
  & :is(#customPredictions,#customResults) .chips-group { flex-wrap:wrap; gap:7px; }
  & :is(#customPredictions,#customResults) .chip-cat { font-size:13px; color:var(--ui-muted); }
  & :is(#customPredictions,#customResults) .tag-chip { min-height:36px; padding:7px 10px; font-size:13px; border-radius:8px; background:var(--color-bg-card-soft); color:var(--ui-ink); border-color:var(--ui-line); }
  & :is(#customTemplateTextarea,#resultTemplateTextarea) { font-size:15px; line-height:1.65; padding:14px; border-radius:12px; border-color:#b8bdc6; min-height:280px; }
  & #customImageGallery > button, & :is(#saveCustomTemplateBtn,#saveResultTemplate) { min-height:44px; padding:10px 16px; font-size:15px; border-radius:10px; }
  & :is(#saveCustomTemplateBtn,#saveResultTemplate) { background:#303236; color:white; border-color:#303236; box-shadow:none; }
  & :is(#customPredictions,#customResults) .custom-pred-actions { gap:12px; margin:0; }
  & :is(#customPredictions,#customResults) .custom-pred-preview-col { min-width:0; padding:18px; border:1px solid var(--ui-line); border-radius:12px; background:var(--ui-paper); }
  & :is(#customPredictions,#customResults) .preview-header { padding-bottom:14px; margin-bottom:14px; border-bottom:1px solid var(--ui-line); font-size:16px; }
  & :is(#customPredictions,#customResults) .preview-simulation-banner { padding:12px; font-size:13px; line-height:1.5; border-radius:10px; }
  & :is(#customPredictions,#customResults) .preview-hint { font-size:13px; line-height:1.5; color:var(--ui-muted); }
  & #customImageGallery .prediction-image-dialog { width:min(740px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); padding:24px; border:1px solid var(--ui-line); border-radius:20px; box-shadow:0 18px 70px #20212424; overflow:auto; }
  & #customImageGallery .prediction-image-dialog h3 { padding-bottom:18px; border-bottom:1px solid var(--ui-line); font-size:24px; line-height:1.2; font-weight:700; }
  & #customImageGallery :is(p,small,legend) { color:var(--ui-muted); font-size:14px; line-height:1.5; }
  & #customImageGallery .prediction-slots { grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin:20px 0 14px; }
  & #customImageGallery .prediction-slot { min-width:0; gap:8px; }
  & #customImageGallery .prediction-slot button { min-height:40px; padding:8px; font-size:14px; border-radius:10px; }
  & #customImageGallery .prediction-slot button:first-child { min-height:112px; background:var(--color-bg-card-soft); color:var(--ui-ink); border-color:#bfc1c6; }
  & #customImageGallery .prediction-slot img { height:72px; }
  & #customImageGallery .prediction-image-delivery { margin-top:20px; padding-top:20px; border-color:var(--ui-line); }
  & #customImageGallery .prediction-image-delivery label { font-size:15px; line-height:1.4; }
  & #customImageGallery .prediction-channel-options { gap:10px; }
  & #customImageGallery .prediction-channel-options label { min-height:44px; padding:10px; border-radius:10px; border-color:var(--ui-line); color:var(--ui-ink); background:var(--ui-paper); }
  & #customImageGallery .prediction-channel-options label:has(:checked) { border-color:#919398; background:var(--color-bg-sidebar-hover); color:var(--ui-ink); }
  & #customImageGallery .prediction-dialog-actions { margin-top:20px; padding-top:18px; border-top:1px solid var(--ui-line); }
  & #customImageGallery .prediction-dialog-actions button { min-height:44px; padding:10px 18px; font-size:15px; border-radius:10px; }
}
@media (max-width:1000px) {
  body.wa-dashboard.admin-workspace :is(#customPredictions,#customResults) .custom-pred-grid { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:600px) {
  body.wa-dashboard.admin-workspace #customImageGallery {
    & .prediction-image-dialog { padding:20px; }
    & .prediction-slots { grid-template-columns:repeat(2,minmax(0,1fr)); }
    & .prediction-channel-options { grid-template-columns:minmax(0,1fr); }
  }
}

body.wa-dashboard.admin-workspace {
  & #status .member-history-button { display:inline-flex; align-items:center; gap:8px; padding:4px 0; border:0; background:transparent; cursor:pointer; }
  & #status .member-history-button:hover { background:var(--color-bg-card-soft); border-radius:10px; }
  & #status .member-history-button svg { width:18px; height:18px; color:var(--ui-muted); }
  & .member-delivery-dialog { box-sizing:border-box; width:min(1050px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); padding:0; border:1px solid var(--ui-line); border-radius:20px; color:var(--ui-ink); background:var(--ui-paper); box-shadow:0 18px 70px #20212424; }
  & .member-delivery-dialog[open] { display:flex; flex-direction:column; }
  & .member-delivery-dialog header { padding:22px 24px; border-bottom:1px solid var(--ui-line); }
  & .member-delivery-dialog h2 { margin:0; font-size:24px; line-height:1.25; overflow-wrap:anywhere; }
  & .member-delivery-dialog header p { margin:8px 0 0; font-size:15px; color:var(--ui-muted); }
  & .member-delivery-body { overflow:auto; min-height:0; padding:0 24px; overscroll-behavior:contain; }
  & .member-delivery-body table { width:100%; border-collapse:collapse; min-width:680px; font-size:15px; }
  & .member-delivery-body :is(th,td) { padding:14px 12px; line-height:1.5; text-align:left; border-bottom:1px solid var(--ui-line); vertical-align:top; }
  & .member-delivery-body thead th { position:sticky; top:0; background:var(--color-bg-card-soft); color:var(--ui-muted); font-weight:500; }
  & .member-delivery-body tbody th { font-weight:600; }
  & .member-delivery-body small { display:block; margin-top:4px; color:var(--ui-muted); }
  & .member-delivery-dialog footer { display:flex; justify-content:flex-end; padding:18px 24px; border-top:1px solid var(--ui-line); }
  & .member-delivery-dialog button { min-height:44px; padding:10px 16px; border-radius:10px; font-size:15px; }
}

body.wa-dashboard.admin-workspace {
  & #status .admin-monitor-table th:nth-child(1) { width:18%; }
  & #status .admin-monitor-table th:nth-child(2) { width:17%; }
  & #status .admin-monitor-table th:nth-child(3) { width:15%; }
  & #status .admin-monitor-table th:nth-child(4) { width:27%; }
  & #status .admin-monitor-table th:nth-child(5) { width:23%; }
  & #status .member-activity-button { display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:8px 12px; font-size:clamp(14px,1.9dvh,18px); border:1px solid var(--ui-line); border-radius:10px; background:var(--color-bg-card-soft); color:var(--ui-ink); }
  & .member-activity-button svg { width:18px; height:18px; }
  & .member-activity-list article { padding:18px 0; border-bottom:1px solid var(--ui-line); font-size:15px; line-height:1.5; }
  & .member-activity-list article:last-child { border-bottom:0; }
  & .member-activity-list article > div { display:flex; align-items:center; justify-content:space-between; gap:12px; }
  & .member-activity-list time { display:block; margin-top:8px; color:var(--ui-muted); font-size:14px; }
  & .member-activity-list p { margin:8px 0 0; }
}
@media (min-width:761px) {
  body.wa-dashboard.admin-workspace:has(#status.active) .panel-stack { height:100%; }
  body.wa-dashboard.admin-workspace #status.active { display:flex; flex-direction:column; height:100%; min-height:0; }
  body.admin-workspace #status {
    & .admin-overview-heading, & .status-metrics { flex:none; }
    & .admin-command-layout { flex:1; min-height:0; }
    & .admin-member-section { display:flex; flex-direction:column; flex:1; min-height:0; }
    & .admin-member-section .section-heading { flex:none; }
    & .admin-monitor-scroll { flex:1; min-height:0; max-height:none; }
  }
}
@media (max-width:1100px) {
  body.wa-dashboard.admin-workspace #status .admin-monitor-table { min-width:740px; }
}

body.wa-dashboard.admin-workspace .sidebar-product {
  padding:12px;
  & .brand-mark, & small { display:none; }
  & strong { display:inline-flex; white-space:nowrap; font-size:clamp(32px,2.7vw,42px); line-height:1.1; font-weight:800; letter-spacing:-1.7px; }
  & .tris-wordmark-bright { color:#1677e8; }
  & .tris-wordmark-dark { color:#202124; }
}

/* One viewport frame prevents layout changes from leaving page overflow. */
@media (min-width:761px) {
  body.wa-dashboard.admin-workspace {
    & .app-shell { box-sizing:border-box; height:100dvh; min-height:0; grid-template-rows:minmax(0,1fr); align-items:stretch; padding:4.2dvh 0; }
    & .wa-sidebar { top:4.2dvh; height:100%; min-height:0; max-height:100%; }
    & .wa-sidebar .tabs button { padding-inline:12px; gap:12px; }
    & .content-shell { box-sizing:border-box; height:100%; min-height:0; max-height:100%; overflow-y:auto; overflow-x:hidden; scrollbar-width:thin; }
    & .panel-stack { min-width:0; transform:none; transition:opacity 150ms ease; will-change:opacity; }
    & .panel-stack.is-fading { transform:none; }
    &:has(#status.active) .app-shell { padding-bottom:4.2dvh; }
    &:has(#status.active) .wa-sidebar,
    &:has(#users.active) .wa-sidebar { min-height:0; max-height:100%; }
  }
}

/* Work surfaces keep the message and poster previews in their original type. */
:is(.prediction-page,.share-result-page) :is(.hdr-title,.result-header h1,.prediction-dialog h2),
.editing-page :is(.panel-heading h1,.app-header strong,dialog h2) { letter-spacing:-.035em; line-height:1.18; }
:is(.prediction-page,.share-result-page) :is(.editor-toolbar,.card,.input-pane,.output-pane,.prediction-dialog),
.editing-page :is(.input-panel fieldset,.fb-group,dialog) { border-radius:12px; }
.editing-page :is(.app-header,.panel-heading,.subpage-sidebar > header) { padding-inline:16px; }
.editing-page .input-panel { scrollbar-gutter:stable; }
:is(.prediction-page,.share-result-page,.editing-page) dialog::backdrop { background:#0d1715a8; }
@media (min-width:761px) {
  body.wa-dashboard:not(.trio-member) .content-shell table td { padding-block:11px; }
}
@media (max-width:760px) {
  body.wa-dashboard:not(.trio-member) .content-shell { padding:12px; border-radius:12px; }
  body.wa-dashboard .content-shell .actions { row-gap:8px; }
  body.wa-dashboard :is(.app-dialog-actions,.market-set-heading,.member-set-controls) button { min-height:42px; }
}
@media (prefers-reduced-motion:no-preference) and (hover:hover) {
  :is(.wa-dashboard,.auth-page,.password-page,.editing-page,.prediction-page,.share-result-page) button:not(:disabled):active { translate:0 1px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}

body.admin-workspace #resultTemplateTextarea { font-family:"SFMono-Regular",Consolas,monospace; resize:vertical; width:100%; box-sizing:border-box; }
body.admin-workspace #resultPreviewText { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; font-family:inherit; font-size:15px; line-height:1.65; }
