.web-client { padding-top: 44px; }
.web-client:not(.auth-ready) #appShell { visibility: hidden; }
.web-account { position: fixed; inset: 0 0 auto; height: 44px; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: 14px; }
.web-account strong { margin-left: 12px; color: var(--accent); font-size: 12px; font-weight: 500; }
.web-local-note { color: var(--muted); font-size: 12px; }
.web-gate { position: fixed; z-index: 90; inset: 44px 0 0; display: flex; flex-direction: column; gap: 20px; align-items: center; justify-content: center; padding: 20px; background: var(--bg); text-align: center; }
.web-client .library-head-actions, .web-client #newPackBtn, .web-client #packChipsPerBb,
.web-client .range-import-row, .web-client #renameRangeBtn, .web-client #saveRangeDialogBtn,
.web-client #paintModeToggleBtn, .web-client .range-paint-controls, .web-client #addRangeActionBtn,
.web-client #clearRangeComboBtn, .web-client #rangeDialog .range-help,
.web-client .paint-weight-bar, .web-client .paint-weight-hint { display: none !important; }
.web-client .library-row { cursor: pointer; }
.web-client .home-mode > .trainer > .topbar { display: none; }
.web-client .range-add-option, .web-client .range-name-row { display: none; }
.web-client #rangeDialog { width: min(1260px, calc(100vw - 24px)); max-width: calc(100vw - 24px); }
.web-client .lr-label { min-width: 0; }
.web-client .lr-label strong { overflow-wrap: anywhere; }
.web-client .home-view.library-mode .library-row { grid-template-columns: 16px 18px minmax(0, 1fr); }
.web-client .home-view.library-mode .lr-actions { grid-column: 2 / -1; opacity: 1; pointer-events: auto; justify-content: flex-start; max-width: none; gap: 6px; }
.web-client .home-view.library-mode .library-row.is-folder .lr-actions { display: none; }
.web-client .web-unavailable { color: var(--muted); font-size: 12px; }
.web-client .range-action-readonly { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; }
.web-client .range-action-readonly i { width: 14px; height: 14px; border-radius: 3px; }
.web-client #rangeDialog input:disabled, .web-client #rangeDialog select:disabled { opacity: 1; color: var(--text-2); }
.web-client #webNotice { position: fixed; bottom: 20px; left: 20px; right: 20px; z-index: 500; display: flex; align-items: center; justify-content: space-between; gap: 15px; background: var(--panel-3); border: 1px solid var(--accent); padding: 16px; border-radius: 12px; }
.web-client #webNotice > span { min-width: 0; overflow-wrap: anywhere; }
.web-client #webNotice > button { flex-shrink: 0; }
@media(max-width:600px) { .web-client #webNotice { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom,0px)); flex-wrap: wrap; font-size: 13px; } }
.web-routine li { margin: 12px 0; line-height: 1.6; }
.web-drill-drafts { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 18px; margin: 0 0 20px; }
.web-drill-drafts > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.web-drill-drafts h3 { margin: 0; font-size: 16px; }
.web-drill-drafts p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 6px 0 0; }
.web-draft-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.web-draft-row > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.web-draft-row > div:last-child { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: 8px; }
.web-client .web-drill-builder { width: min(660px,calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; background: var(--bg-2); }
.web-drill-builder .dialog-body { padding: 0 22px; max-height: calc(100dvh - 26px); }
.web-drill-builder header { position: sticky; top: 0; z-index: 2; background: var(--bg-2); padding: 16px 0; margin: 0; gap: 12px; }
.web-drill-builder .eyebrow { font-size: 10px; margin: 0 0 5px; }
.web-drill-builder h2 { font-size: 22px; margin: 0; }
.web-drill-builder section { padding: 18px 0; border-top: 1px solid var(--line); }
.web-drill-builder h3 { font-size: 14px; margin: 0 0 14px; color: var(--accent); }
.web-drill-builder label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; margin-bottom: 12px; min-width: 0; }
.web-drill-builder .input { width: 100%; min-width: 0; min-height: 44px; }
.web-drill-builder .muted, .web-draft-note { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 8px 0 12px; }
.web-drill-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; }
.drill-collections { margin:14px 0 6px;padding:12px;border:1px solid var(--line);border-radius:8px; }
.drill-collections legend { font-size:12px;color:var(--text);padding:0 5px; }
.drill-collections [data-extra-collections] { max-height:250px;overflow:auto; }
.web-drill-builder .drill-collection { gap:12px;padding:12px;border:1px solid var(--line);border-radius:7px;margin:5px 0;cursor:pointer;min-height:52px; }
.drill-collection:has(:checked) { border-color:var(--accent);background:var(--accent-softer); }
.drill-collection input { width:20px;height:20px;flex-shrink:0;accent-color:var(--accent); }
.drill-collection span { min-width:0;overflow-wrap:anywhere; }
.drill-collection strong,.drill-collection small,.drill-matchup strong,.drill-matchup span,.drill-matchup small { display:block; }
.drill-collection small,.drill-matchup small { color:var(--muted);margin-top:5px; }
.drill-matchup { padding:14px;background:var(--panel-2);border:1px solid var(--line);border-radius:8px;margin:8px 0; }
.drill-matchup strong { color:var(--accent);font-size:16px; }
.drill-matchup span { margin-top:7px;font-size:13px; }
.web-drill-node { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); padding: 12px; border-radius: 8px; }
.web-drill-node > div { min-width: 0; }
.web-drill-node output { display: block; margin-top: 5px; font-family: monospace; overflow-wrap: anywhere; }
.web-drill-node button { flex-shrink: 0; }
.web-draft-error { color: #f09b90; font-size: 13px; }
.web-draft-status { color: #91c99a; font-size: 13px; }
.web-drill-builder footer { position: sticky; bottom: 0; z-index: 2; background: var(--bg-2); padding: 12px 0 max(12px,env(safe-area-inset-bottom)); margin: 0; border-top: 1px solid var(--line); }
.web-drill-builder footer .button { min-height: 44px; }
.web-drill-builder .drill-question-settings { margin: 12px 0; }
.web-drill-builder .drill-question-settings summary { cursor: pointer; padding: 14px 0; color: var(--accent); }
.web-drill-builder fieldset { min-width: 0; }
.web-drill-builder label:has(input[type=checkbox]), .web-drill-builder label:has(input[type=radio]) { flex-direction: row; align-items: center; }
.web-drill-builder .adv-bucket-row { display: grid; grid-template-columns:minmax(0,1fr) 72px 32px; gap:6px; min-width: 0; }
.web-drill-builder .adv-bucket-center { width:72px; min-width:0; }
.web-drill-builder .adv-bucket-center .input { width:54px; padding:5px; }
.web-drill-builder .adv-bucket-window { grid-column:1 / 3; grid-row:2; width:auto; text-align:left; font-size:11px; }
.web-drill-builder .adv-bucket-remove { grid-column:3; grid-row:1; min-width:0; padding:6px; }
.web-drill-builder .adv-bucket-row input { min-width: 0; max-width: 100%; }
[hidden] { display: none !important; }
.web-client .table-stage .formation-table .seat { min-width: 0; width: 120px; }
.web-client .table-stage .formation-table .folded-seat { width: 72px; }
@media(max-width:600px) {
  .web-client .table-stage .felt.multi-seat-table { width: 85%; min-height: 330px; height: 330px; margin-top: 60px; margin-bottom: 65px; }
  .web-client .table-stage .formation-table .seat { min-width: 0; width: 96px; }
  .web-client .table-stage .formation-table .seat strong, .web-client .table-stage .formation-table .seat small { padding: 5px; font-size: 10px; }
  .web-client .table-stage .formation-table .folded-seat { width: 52px; }
  .web-client .table-stage .formation-table .folded-seat small { display: none; }
}
@media(max-width:600px) {
  .web-drill-drafts { padding: 14px; }
  .web-drill-drafts > header, .web-draft-row { align-items: stretch; flex-direction: column; gap: 12px; }
  .web-client .web-drill-builder .dialog-body { padding: 0 14px; }
  .web-drill-builder .input { font-size: 16px; }
  .web-drill-fields { grid-template-columns: minmax(0,1fr); }
  .web-drill-builder h2 { font-size: 20px; }
  .web-drill-builder footer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
}
.web-client #openSimBtn:disabled { display: none; }
.web-client .shared-viewer-dialog { position: fixed; inset: 0; margin: 0; padding: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; border: 0; background: #101315; overflow: hidden; }
.shared-viewer-dialog iframe { display: block; width: 100%; height: 100%; border: 0; }
.web-client .app-shell.trainer-mode { height: calc(100dvh - 44px); }
.mobile-panel-head, .mobile-playback-panel { display: none; }
.hud-section-toggle, .hud-display-toggle, .hud-combo-ev { display: none; }
.web-client .mobile-hud .history-row { display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: center; }
.web-client .mobile-hud .history-head { min-width: 0; min-height: 44px; }
.web-client .mobile-hud .history-detail { grid-column: 1 / -1; }
.web-client .mobile-hud .history-study { display: grid; place-items: center; width: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--accent); border-radius: 6px; touch-action: manipulation; }
.web-client .mobile-hud .history-study:hover { background: rgba(255,255,255,.06); }
.web-client .mobile-hud .history-study:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
@media(max-width:720px) {
  .web-account { padding: 0 12px; }
  .web-local-note { display: none; }
  .web-client .home-header { align-items: stretch; }
  .web-client .home-header-title h2 { font-size: 24px; }
  .web-client .library-tree { max-height: none !important; }
  .web-client .library-row { flex-wrap: wrap; min-height: 62px; }
  .web-client .lr-actions { flex-wrap: wrap; }
  .web-client .lr-btn, .web-client .mini-button, .web-client .button { min-height: 40px; }
  .web-client .dialog { max-height: calc(100dvh - 24px); }
  .web-client .range-builder-layout { display: flex; flex-direction: column; }
  .web-client .range-builder-detail { order: -2; min-width: 0; }
  .web-client .range-builder-main { order: -1; }
  .web-client .range-builder-body { max-height: calc(100dvh - 24px); overflow: auto; }
  .web-client .range-editor-grid { grid-template-columns: repeat(13, minmax(0,1fr)); gap: 1px; }
  .web-client .range-editor-cell { min-width: 0; padding: 0; min-height: 30px; border-radius: 3px; }
  .web-client .range-editor-cell label { font-size: 10px; padding: 4px 0; letter-spacing: -0.6px; }
}

@media(max-width:600px) {
  .web-client .mobile-study-entry { display: none; }
  .web-client .mobile-panel-head { display: flex; align-items: center; gap: 6px; position: sticky; top: -16px; z-index: 5; background: #101214; padding: 8px 0; flex-shrink: 0; }
  .web-client .mobile-panel-head strong { margin-right: auto; font-size: 12px; }
  .web-client .mobile-panel-head .button { min-height: 40px; padding: 6px 8px; font-size: 11px; touch-action: manipulation; }
  .web-client .mobile-panel-head [hidden] { display: none; }
  .web-client .trainer-mode .sidebar > .brand { display: none; }
  .web-client .mobile-playback-panel { display: block; flex-shrink: 0; }
  .web-client .mobile-playback-panel h2 { font-size: 12px; margin: 0 0 10px; }
  .web-client .mobile-playback-panel .playback-controls { flex-wrap: wrap; gap: 8px; }
  .web-client .mobile-playback-panel button, .web-client .mobile-playback-panel select { min-height: 40px; touch-action: manipulation; }
  .web-client .trainer-mode .top-actions .button { touch-action: manipulation; }
  /* Use the document's native touch scroll on phones. Nested fixed-height
     scrollers hid choices and could strand the review footer in Safari. */
  html:has(.web-client .trainer-mode) { height: auto; overflow-y: auto; overflow-x: clip; overflow-anchor: none; }
  .web-client:has(.trainer-mode) { height: auto; min-height: 100dvh; overflow: visible; box-sizing: border-box; }
  .web-client .app-shell.trainer-mode { display: block; height: auto; min-height: calc(100dvh - 44px); overflow: visible; }
  .web-client .trainer-mode .trainer { display: block; overflow: visible; }
  .web-client .trainer-mode .topbar { padding: 6px 10px; gap: 4px; flex-shrink: 0; }
  .web-client .trainer-mode #spotLine { display: none; }
  .web-client .trainer-mode .topbar h2#handTitle { font-size: 13px; line-height: 18px; margin: 0; }
  .web-client .trainer-mode .top-actions { gap: 6px; }
  .web-client .trainer-mode .top-actions .button { min-height: 36px; padding: 6px 10px; flex: 1; }
  .web-client .trainer-mode .table-stage,
  .web-client .trainer-mode .table-stage:has(.decision-feedback) { padding: 6px 10px calc(90px + env(safe-area-inset-bottom, 0px) + var(--mobile-scroll-space, 0px)); gap: 6px; overflow: visible; overflow-anchor: none; }
  .web-client .table-toolbar { flex-wrap: nowrap; gap: 4px; }
  .web-client .table-phase { font-size: 9px; letter-spacing: 0; }
  .web-client .table-phase::before { margin-right: 4px; }
  .web-client .playback-controls { gap: 3px; }
  .web-client .playback-controls select, .web-client .playback-controls .button { min-height: 32px; padding: 5px; font-size: 10px; }
  .web-client .watch-switch { padding: 1px; }
  .web-client .watch-switch button { min-height: 30px; padding: 4px 6px; font-size: 10px; }
  .web-client .table-stage .action-trail { min-height: 22px; }
  .web-client .table-stage .trail-pill { padding: 4px 6px; font-size: 9px; }
  .web-client .table-stage .felt { width: 94%; height: clamp(200px, 26dvh, 214px); min-height: 200px; margin: 34px 0 32px; border-width: 8px; }
  .web-client .table-stage:has(.decision-feedback) .felt.multi-seat-table { margin-top: 12px; margin-bottom: 20px; }
  .web-client .table-stage .seat { min-width: 128px; }
  .web-client .table-stage .seat strong, .web-client .table-stage .seat small { padding: 6px 10px; min-height: 28px; font-size: 10px; }
  .web-client .table-stage .seat.hero { bottom: -29px; }
  .web-client .table-stage .seat.villain { top: -35px; }
  .web-client .table-stage .seat .card, .web-client .table-stage .back-cards span { width: 28px; height: 38px; }
  .web-client .table-stage .board .card { width: 30px; height: 43px; padding: 4px; }
  .web-client .table-stage .card .rank { font-size: 17px; }
  .web-client .table-stage .card .suit { font-size: 13px; }
  .web-client .table-stage .pot { top: calc(48% - 40px); font-size: 11px; }
  .web-client .table-stage .pot-chips { top: calc(48% + 26px); font-size: 10px; }
  .web-client .table-stage .chip { width: 15px; }
  .web-client .table-stage .dealer-button { left: calc(50% - 94px); bottom: -17px; width: 21px; height: 21px; }
  .web-client .table-stage .dealer-button.villain-side { top: 2px; bottom: auto; }
  .web-client .table-stage .villain-wager { top: 16%; left: 77%; }
  .web-client .table-stage .hero-wager { top: 90%; left: 77%; }
  .web-client .table-stage .wager-display .chip-display { font-size: 9px; }
  .web-client .table-stage .table-action-badge { font-size: 8px; padding: 3px 5px; }
  .web-client .table-stage .adv-progress { padding: 6px; }
  .web-client .table-stage:not(:has(.feedback-solver-details)) .adv-prog-head { font-size: 11px; min-height: 30px; height: auto; margin: 0; display: flex; align-items: center; justify-content: center; }
  .web-client .table-stage:not(:has(.feedback-solver-details)) .adv-prog-row { display: flex; flex-wrap: nowrap; justify-content: flex-start; align-items: stretch; gap: 4px; min-height: 43px; height: auto; overflow-x: auto; }
  .web-client .table-stage:not(:has(.feedback-solver-details)) .adv-prog-chip { flex: 0 0 132px; min-width: 0; padding: 4px 6px; }
  .web-client .table-stage .apc-val { font-size: 11px; line-height: 1.4; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .web-client .table-stage .apc-val:has(.apc-answer) { display: flex; flex-direction: column; gap: 4px; }
  .web-client .table-stage .apc-answer { order: -1; display: block; }
  .web-client .table-stage .apc-answer::before { content: 'Correct: '; font-weight: 400; }
  .web-client .table-stage .apc-wrong { display: block; font-size: 10px; }
  .web-client .table-stage .adv-prog-board { position: absolute; right: 8px; top: -18px; margin: 0; font-size: 10px; }
  .web-client .table-stage:has(.feedback-solver-details) .adv-prog-board { position: static; }
  .web-client .table-stage .decision-bar { gap: 4px; width: 100%; }
  .web-client .table-stage .rng { height: 22px; font-size: 18px; }
  .web-client .table-stage .rng::before { top: 5px; }
  .web-client .table-stage .actions { grid-template-columns: repeat(6,minmax(0,1fr)); grid-auto-rows: minmax(48px,auto); align-content: start; height: auto; min-height: 102px; overflow: visible; gap: 6px; }
  .web-client .table-stage .actions > .action-button { grid-column: span 2; }
  .web-client .table-stage .feedback-solver-details { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(48px, auto); gap: 6px; }
  .web-client .table-stage .feedback-solver-details > .fsd-row { grid-column: span 2; min-height: 48px; }
  .web-client .table-stage .feedback-solver-details .fsd-body { padding: 3px 5px; min-height: 46px; gap: 2px 8px; }
  .web-client .table-stage .feedback-solver-details .fsd-action,
  .web-client .table-stage .feedback-solver-details .fsd-freq,
  .web-client .table-stage .feedback-solver-details .fsd-ev { line-height: 12px; }
  .web-client .table-stage .feedback-solver-details > .fsd-row:last-child:nth-child(3n+1) { grid-column: 3 / span 2; }
  .web-client .table-stage .feedback-solver-details > .fsd-row:nth-last-child(2):nth-child(3n+1) { grid-column: 2 / span 2; }
  .web-client .table-stage .actions:not(:has(.adv-class-button)) > .action-button:last-child:nth-child(3n+1) { grid-column: 3 / span 2; }
  .web-client .table-stage .actions:not(:has(.adv-class-button)) > .action-button:nth-last-child(2):nth-child(3n+1) { grid-column: 2 / span 2; }
  .web-client .table-stage .actions:has(.adv-class-button) { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .web-client .table-stage .actions:has(.adv-class-button) > .action-button:last-child:nth-child(odd) { grid-column: 2 / span 2; }
  .web-client .mobile-choice-hint { color: var(--accent-text); font-size: 12px; margin: 2px 0 6px; text-align: center; }
  .web-client .table-stage .review-actions:has(button:not(.hidden)) { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; width: 100%; max-width: none; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: #101214; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px #0008; }
  .web-client .table-stage .review-actions .continue-button { min-height: 48px; flex: 1; }
  .web-client .table-stage .action-button { min-height: 48px; padding: 5px; font-size: 11px; touch-action: manipulation; }
  .web-client .table-stage .action-button:hover:not(:disabled) { transform: none; }
  .web-client .table-stage .action-button small { font-size: 10px; }
  .web-client .trainer-mode.analysis-open .rightbar, .web-client .trainer-mode.options-open .sidebar { top: 118px; bottom: 8px; }
  /* Keep the trainer's own colours, counts and frequency bars in a quieter HUD. */
  .web-client .trainer-mode.analysis-open .mobile-hud { top: 44px; right: 0; bottom: 0; width: min(420px,92vw); padding: 12px; gap: 16px; border-radius: 0; background: #101214; overscroll-behavior: contain; }
  .web-client .mobile-hud .mobile-panel-head { top: -12px; padding: 6px 0 10px; border-bottom: 1px solid var(--line); }
  .web-client .mobile-hud > .panel { padding: 8px 0; margin: 0; border: 0; border-radius: 0; background: transparent; }
  .web-client .mobile-hud > .panel > .panel-title { margin-bottom: 8px; min-height: 32px; }
  .web-client .mobile-hud > .panel > .panel-title > h2 { display: none; }
  .web-client .mobile-hud .hud-section-toggle { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; padding: 6px 0; min-height: 32px; font-size: 11px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
  .web-client .hud-section-toggle::before { content: '⌄'; color: var(--accent); }
  .web-client .hud-section-toggle[aria-expanded=false]::before { content: '›'; }
  .web-client .mobile-hud > .hud-collapsed > :not(.panel-title) { display: none !important; }
  .web-client .mobile-hud .stat-grid { gap: 5px; }
  .web-client .mobile-hud .stat-grid > div { padding: 7px 3px; }
  .web-client .mobile-hud .stat-grid span { font-size: 23px; }
  .web-client .mobile-hud .stat-grid label { font-size: 8px; margin-top: 2px; }
  .web-client .mobile-hud .meter { height: 4px; margin: 8px 0; }
  .web-client .mobile-hud .grade-breakdown { gap: 4px; margin: 8px 0; }
  .web-client .mobile-hud .grade-row { padding: 5px 2px; min-height: 0; gap: 3px; }
  .web-client .mobile-hud .grade-row span { font-size: 14px; }
  .web-client .mobile-hud .grade-row label { font-size: 8px; letter-spacing: 0; }
  .web-client .mobile-hud .session-details { font-size: 11px; margin-top: 6px; }
  .web-client .mobile-hud .mini-card { font-size: 11px; min-width: 17px; padding: 3px; }
  .web-client .mobile-hud .strategy-map > .sim-subtitle { display: flex; flex-wrap: wrap; padding: 0; margin: 6px 0; border: 0; }
  .web-client .mobile-hud .strategy-map > .sim-subtitle > span:first-of-type { display: none; }
  .web-client .mobile-hud .strategy-map:not(.hud-show-controls) > .sim-subtitle > .subtitle-right { display: none; }
  .web-client .mobile-hud .strategy-map .hud-display-toggle { display: block; min-height: 32px; padding: 4px 8px; margin-left: auto; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); font-size: 10px; }
  .web-client .mobile-hud .strategy-map > .sim-subtitle::before { display: none; }
  .web-client .mobile-hud .strategy-grid-169 { gap: 1px; padding: 2px; }
  .web-client .mobile-hud .strategy-cell { font-size: clamp(8px,2.8cqw,11px); }
  .web-client .mobile-hud .strategy-breakdown, .web-client .mobile-hud .combo-strategy { padding: 10px; margin-top: 10px; border-radius: 8px; }
  .web-client .mobile-hud .sim-subtitle { margin-bottom: 8px; padding-bottom: 7px; font-size: 10px; letter-spacing: .05em; }
  .web-client .mobile-hud .sim-subtitle .node-id { font-size: 9px; max-width: 50%; overflow-wrap: anywhere; }
  .web-client .mobile-hud .strategy-row { margin-bottom: 9px; }
  .web-client .mobile-hud .strategy-row:last-child { margin-bottom: 0; }
  .web-client .mobile-hud .strategy-row-head { gap: 6px; margin-bottom: 4px; font-size: 11px; }
  .web-client .mobile-hud .strategy-row-head strong { min-width: 0; overflow-wrap: anywhere; font-size: 11px; }
  .web-client .mobile-hud .strategy-row .bar { height: 4px; }
  .web-client .mobile-hud .hud-combo-ev { display: inline; color: var(--muted); font-size: 10px; white-space: nowrap; }
  .web-client .mobile-hud .history-row { border-radius: 6px; margin-bottom: 6px; }
  .web-client .mobile-hud .history-head { gap: 4px; padding: 8px 6px; min-height: 42px; flex-wrap: wrap; }
  .web-client .mobile-hud .history-detail { font-size: 11px; }
}

/* The account controls and main navigation share one header. */
.web-account { display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); }
.web-account > :first-child { grid-column:1;grid-row:1;justify-self:start; }
.web-account-controls { grid-column:3;grid-row:1;justify-self:end;display:flex;align-items:center;gap:12px;white-space:nowrap; }
.web-account-controls a { color:var(--muted);font-size:12px;text-decoration:none; }
.web-account-controls a:hover { color:var(--text); }
.web-account > .hub-nav { grid-column:2;grid-row:1;display:block;padding:0;border:0;min-width:0; }
.web-account .hub-brand { display:none; }
.web-account .hub-nav nav { display:flex;flex-wrap:nowrap;width:auto;gap:6px; }
.web-account .hub-nav nav .button { flex:none;min-height:32px;padding:6px 10px;font-size:13px; }
.web-client .sidebar > .brand { display:none; }
@media(max-width:1100px) {
  .web-client:has(.home-mode) { padding-top:94px; }
  .web-account { grid-template-columns:minmax(0,1fr) auto; }
  .web-client:has(.home-mode) .web-account { height:94px;grid-template-rows:44px 50px;gap:0 8px; }
  .web-account > .hub-nav { grid-column:1 / -1;grid-row:2;justify-self:stretch;overflow-x:auto; }
  .web-account-controls { grid-column:2;grid-row:1;gap:8px; }
  .web-account .hub-nav nav { justify-content:center;gap:2px; }
  .web-account .hub-nav nav .button { min-height:44px;padding:6px;font-size:12px; }
  .web-client:has(.trainer-mode) .web-account > .hub-nav { display:none; }
  .web-account .web-local-note,.web-account strong { display:none; }
}
@media(max-width:360px) {
  .web-account .hub-nav nav .button { padding:6px 4px;font-size:11px; }
}
