/* Shared product shell for every non-Draft tool. The page-specific sheets
   still own each calculator's working layout; this layer supplies the same
   editorial paper, masthead, control geometry, and popover behavior as the
   homepage and Draft Room. */
body.tool-page {
    --tool-paper: #0c0b0f;
    --tool-surface: #121116;
    --tool-surface-raised: #1a1820;
    /* #f4f0e8, not #f4f0f8 -- one character in the blue channel is the
       difference between the warm cream ink the rest of the paper system uses
       (--draft-ink, --home-ink) and a cool violet-white. With the old value,
       navigating from the Draft Board to any tool page shifted the white point
       of every word on screen. */
    --tool-ink: #f4f0e8;
    --tool-muted: #aaa3b1;
    --tool-rule: rgba(255, 255, 255, 0.14);
    --tool-rule-strong: #4d4655;
    --tool-violet: var(--primary);
    --tool-violet-deep: var(--brand-fill);
    --bg: var(--tool-paper);
    --surface: var(--tool-surface);
    --surface-hover: var(--tool-surface-raised);
    --border: var(--tool-rule);
    --border-highlight: var(--tool-rule-strong);
    --text: var(--tool-ink);
    --text-muted: var(--tool-muted);
    margin: 0;
    padding: 0;
    background: var(--tool-paper);
    color: var(--tool-ink);
}

body.tool-page.light-theme {
    --tool-paper: #f5f0e7;
    --tool-surface: #fbf8f2;
    --tool-surface-raised: #f1ebe1;
    --tool-ink: #17161a;
    --tool-muted: #706b63;
    --tool-rule: rgba(23, 22, 26, 0.16);
    --tool-rule-strong: #b9afa1;
    --tool-violet: var(--primary);
    --tool-violet-deep: var(--brand-fill);
    --bg: var(--tool-paper);
    --surface: var(--tool-surface);
    --surface-hover: var(--tool-surface-raised);
    --border: var(--tool-rule);
    --border-highlight: var(--tool-rule-strong);
    --text: var(--tool-ink);
    --text-muted: var(--tool-muted);
}

html { scrollbar-gutter: stable; }
body.tool-page.command-open { overflow: hidden; }

body.tool-page .app-wrapper,
body.tool-page .site-footer {
    width: min(calc(100% - 48px), 1280px);
    max-width: none;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.tool-masthead {
    box-sizing: border-box;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--tool-rule);
}

.tool-brand {
    display: inline-flex;
    align-items: center;
    color: var(--tool-ink);
    font: 700 1.45rem/1 'Barlow Condensed', sans-serif;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.tool-brand strong {
    margin-left: 4px;
    padding: 3px 5px 4px;
    background: var(--tool-violet-deep);
    color: #fff;
    font-size: 0.72em;
    letter-spacing: 0.04em;
}

.tool-masthead-actions { display: flex; align-items: center; gap: 12px; }

body.tool-page .command-trigger {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 7px 8px 7px 12px;
    border: 1px solid var(--tool-rule);
    border-radius: 0;
    background: transparent;
    color: var(--tool-muted);
    font: 600 0.72rem 'Inter', sans-serif;
    cursor: pointer;
}

body.tool-page .command-trigger-icon { display: none; width: 18px; height: 18px; }
body.tool-page .command-trigger kbd { min-width: 24px; padding: 2px 5px; border: 1px solid currentColor; border-radius: 3px; font: 600 0.61rem 'Inter', sans-serif; text-align: center; white-space: nowrap; opacity: 0.7; }

/* Scoped to the masthead, not to body.tool-page as a whole. The base rule in
   styles.css pins this button to the top-right of the viewport; `position:
   static` is only correct for the copy that sits inside the masthead's flex
   row. Any tool-page that has no masthead (the legal pages, 404) would
   otherwise drop the button into normal flow at the top-left of the document. */
body.tool-page .tool-masthead-actions .theme-toggle-btn {
    position: static;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--tool-rule);
    border-radius: 50%;
    background: transparent;
    color: var(--tool-ink);
    box-shadow: none;
    line-height: 1;
}

.tool-status-rail {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--tool-rule);
    color: var(--tool-muted);
    font-size: 0.67rem;
}

body.tool-page .tool-status-rail .data-status-pill {
    width: auto;
    min-width: 0;
    min-height: 0;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--tool-muted);
    font: 600 0.65rem 'Barlow Condensed', sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.tool-page .site-nav { max-width: none; margin: 0; border-bottom: 1px solid var(--tool-rule); }
body.tool-page .site-nav-inner {
    justify-content: flex-start;
    gap: 22px;
    padding: 0;
    overflow-x: auto;
}
body.tool-page .site-nav-link {
    min-height: 42px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--tool-muted);
    font: 600 0.75rem 'Barlow Condensed', sans-serif;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
}
body.tool-page .site-nav-link.is-current { border-bottom-color: var(--tool-violet); background: transparent; color: var(--tool-ink); }

body.tool-page :is(.pr-wrapper, .trade-wrapper, .ss-wrapper, .tf-wrapper, .ww-wrapper, .lh-wrapper) {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 0;
}

body.tool-page :is(.pr-title-row, .trade-title-row, .ss-title-row, .tf-title-row, .ww-title-row, .lh-title-row) {
    position: relative;
    min-height: 108px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0;
    padding: 10px 0 14px;
    border-bottom: 1px solid var(--tool-rule);
    text-align: left;
}

body.tool-page :is(.pr-title-row, .trade-title-row, .ss-title-row, .tf-title-row, .ww-title-row, .lh-title-row)::before {
    display: block;
    margin-bottom: 4px;
    color: var(--tool-violet);
    font: 700 0.68rem 'Barlow Condensed', sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.pr-title-row::before { content: 'League intelligence / 04'; }
.trade-title-row::before { content: 'Trade workspace / 02'; }
.ss-title-row::before { content: 'Lineup lab / 03'; }
.tf-title-row::before { content: 'Trade discovery / 05'; }
.ww-title-row::before { content: 'Waiver room / 06'; }
.lh-title-row::before { content: 'League archive / 07'; }

body.tool-page :is(.pr-title-row, .trade-title-row, .ss-title-row, .tf-title-row, .ww-title-row, .lh-title-row) h2 {
    margin: 0;
    color: var(--tool-ink);
    font: 600 clamp(1.75rem, 2.7vw, 2.8rem)/0.95 'Barlow Condensed', sans-serif;
    letter-spacing: -0.02em;
}

body.tool-page :is(.pr-title-row, .trade-title-row, .ss-title-row, .tf-title-row, .ww-title-row, .lh-title-row) > p {
    max-width: 820px;
    margin: 7px 0 0;
    color: var(--tool-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

body.tool-page :is(.pr-control-bar, .trade-control-bar, .ss-control-bar, .tf-control-bar, .ww-control-bar, .lh-control-bar) {
    position: relative;
    margin: 22px 0 0;
    border: 1px solid var(--tool-rule);
    border-radius: 0;
    background: var(--tool-surface);
    box-shadow: none;
    overflow: visible;
}

body.tool-page :is(.pr-control-bar-row, .trade-control-bar-row, .ss-control-bar-row, .tf-control-bar-row, .ww-control-bar-row, .lh-control-bar-row) {
    gap: 10px 16px;
    padding: 12px 14px;
}

body.tool-page :is(.pr-control-bar-method, .trade-control-bar-method, .ss-control-bar-method, .tf-control-bar-method, .ww-control-bar-method, .lh-control-bar-method) {
    color: var(--tool-muted);
    font-size: 0.72rem;
    line-height: 1.45;
}

body.tool-page :is(.pr-control-bar-row-bottom, .trade-control-bar-row-bottom, .ss-control-bar-row-bottom, .tf-control-bar-row-bottom, .ww-control-bar-row-bottom, .lh-control-bar-row-bottom) {
    border-top: 1px solid var(--tool-rule);
    background: transparent;
}

body.tool-page .trade-control-bar-row-bottom .trade-sample-prompt {
    margin: 0 0 0 auto !important;
    color: var(--tool-muted);
    text-align: right;
}

body.tool-page .sleeper-sync-box-inline { position: relative; width: 124px; min-width: 124px; margin: 0; }
body.tool-page .sleeper-sync-box-inline .sleeper-sync-toggle-btn {
    width: 124px;
    height: 36px;
    min-height: 36px;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid var(--tool-rule);
    border-radius: 0;
    background: transparent;
    color: var(--tool-muted);
    font: 600 0.7rem 'Barlow Condensed', sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.tool-page .tool-sync-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    width: min(320px, calc(100vw - 32px));
    max-height: min(520px, calc(100dvh - 150px));
    box-sizing: border-box;
    margin: 0;
    padding: 14px;
    overflow-y: auto;
    border: 1px solid var(--tool-rule-strong);
    border-radius: 0;
    background: var(--tool-surface);
    box-shadow: 0 18px 42px rgba(20, 16, 26, 0.22);
}

.tool-sync-popover-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--tool-rule); }
.tool-sync-popover-head strong { display: block; color: var(--tool-ink); font-size: 0.88rem; }
.tool-sync-popover-head span { display: block; margin-top: 2px; color: var(--tool-muted); font-size: 0.68rem; }
.tool-sync-popover-close { width: 32px; height: 32px; flex: 0 0 32px; padding: 0; border: 1px solid var(--tool-rule); border-radius: 50%; background: transparent; color: var(--tool-ink); font: 400 1.25rem/1 'Inter', sans-serif; cursor: pointer; }
.tool-sync-popover-note { margin: 11px 0; color: var(--tool-muted); font-size: 0.72rem; line-height: 1.45; }
body.tool-page .tool-sync-popover :is(.league-provider-option, .sleeper-sync-input, .sleeper-sync-connect-btn, .sleeper-sync-disconnect-btn) { min-height: 42px; border-radius: 0; }
/* The 42px above is the height of this shell's text inputs. A platform
   button is a logo plate rather than a line of text, so it keeps its own
   taller box -- but not its rounded corners, which belong to the rest of
   the app, not to this square-cornered popover. */
body.tool-page .tool-sync-popover .league-provider-option { min-height: 48px; }
body.tool-page .tool-sync-popover :is(.sleeper-sync-input, select):focus-visible { outline: none; border-color: var(--tool-ink); background: var(--tool-surface-raised); box-shadow: inset 0 0 0 1px var(--tool-rule-strong); }

body.tool-page :is(.pr-empty-state, .ss-empty-state, .tf-empty-state, .ww-empty-state, .lh-empty-state) {
    min-height: 250px;
    box-sizing: border-box;
    margin: 0;
    padding: 54px 24px;
    border: 1px solid var(--tool-rule);
    border-top: 0;
    border-radius: 0;
    background: var(--tool-surface);
    color: var(--tool-muted);
}

/* Working surfaces use the same square, ruled geometry as the Draft Room.
   Small semantic badges and genuine circular controls keep their shape. */
body.tool-page :is(
    .pr-table-wrap,
    .trade-side,
    .trade-needs-panel,
    .trade-result-bar,
    .trade-balance-card,
    .ss-lineup-col,
    .tf-my-team-picker,
    .tf-player-list,
    .tf-opponent-needs,
    .tf-opportunities-list,
    .tf-trade-card,
    .ww-my-team-picker,
    .ww-player-list,
    .ww-recommendations-list,
    .lh-hero-tile,
    .lh-trophy-card,
    .lh-table-scroll,
    .lh-record-card,
    .lh-manager-badge
) {
    border-color: var(--tool-rule);
    border-radius: 0;
    background: var(--tool-surface);
    box-shadow: none;
}

body.tool-page .trade-builder { margin-top: 18px; }
body.tool-page .trade-side { min-height: 360px; padding: 18px; }
body.tool-page :is(input, select, textarea) { border-radius: 0; }

/* A populated workspace gets one consistent breath after its control rail.
   Empty states remain attached to the rail as one continuous surface. */
body.tool-page :is(
    .pr-table-wrap,
    .ss-controls-bar,
    .tf-content-grid,
    .ww-content-grid,
    .lh-content > .lh-hero
) { margin-top: 18px; }

body.tool-page :is(.trade-builder, .trade-sides-grid, .ss-lineup-columns, .tf-content-grid, .ww-content-grid) { gap: 18px; }
body.tool-page :is(.tf-section-header, .ww-section-header) { margin-bottom: 10px; }
body.tool-page #tfMyNeedsChips { min-height: 37px; align-items: center; justify-content: flex-start; gap: 6px; }
body.tool-page .lh-hero { gap: 10px; margin-bottom: 24px; }
body.tool-page .lh-section { margin-bottom: 24px; }
body.tool-page .lh-section-head { margin-bottom: 10px; }

body.tool-page :is(
    .ss-mode-toggle,
    .ss-mode-btn,
    .tf-find-btn,
    .ww-pos-filter-btn,
    .ww-waiver-type-control,
    .ww-waiver-type-btn,
    .calculate-trade-btn,
    .trade-verdict
) { border-radius: 0; }

/* Player information is a ruled list everywhere, rather than a collection
   of detached rounded chips. The one-pixel position edge matches the Draft
   Board and the position label has one consistent footprint on every tool. */
body.tool-page :is(.pos-tint-QB, .pos-tint-RB, .pos-tint-WR, .pos-tint-TE, .pos-tint-K, .pos-tint-DST) {
    border-left-width: 1px;
}

body.tool-page :is(
    .trade-list-row,
    .keeper-search-results .trade-clickable-row,
    .pr-slot-row,
    .ss-slot-row,
    .tf-player-row,
    .ww-player-row,
    .ww-rec-card
) {
    margin-top: 0;
    margin-bottom: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--tool-rule);
    padding: 7px 10px;
}

body.tool-page :is(
    .trade-list-row,
    .keeper-search-results .trade-clickable-row,
    .pr-slot-row,
    .ss-slot-row,
    .tf-player-row,
    .ww-player-row,
    .ww-rec-card
):last-child { border-bottom: 0; }

/* Trade Calculator rows have a deliberate three-column grid for player,
   value, and remove action. Keep the action column flush right, while giving
   the player name a small, consistent gap after its colored position line. */
body.tool-page .trade-side .trade-list-row {
    padding-left: 8px;
    padding-right: 0;
}

body.tool-page :is(.pr-team-modal-list, .ss-slot-list, .tf-player-list, .ww-player-list, .ww-recommendations-list) { gap: 0; }

body.tool-page .keeper-result-pos {
    min-width: 28px;
    height: 20px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    padding: 0 5px;
    border: 1px solid var(--tool-rule);
    border-radius: 0;
    background: transparent;
    color: var(--tool-muted);
    font: 700 0.6rem/1 'Inter', sans-serif;
    letter-spacing: 0;
    text-transform: uppercase;
    vertical-align: middle;
}

body.tool-page :is(.keeper-result-name, .trade-list-name) > .keeper-result-pos { margin-left: 6px; }

/* Trade search results attach directly to their input and share its width.
   This removes the curved position hooks and the floating-chip effect. */
body.tool-page .trade-side .keeper-search-wrapper { margin-bottom: 0; }
body.tool-page .trade-side .keeper-search-results:not(:empty) {
    box-sizing: border-box;
    margin: 0 0 10px;
    border: 1px solid var(--tool-rule);
    border-top: 0;
    background: var(--tool-surface);
}
body.tool-page .trade-side .keeper-search-results .trade-clickable-row { margin-left: 0; margin-right: 0; }
body.tool-page .trade-list { margin-left: 0; margin-right: 0; }

/* Shared tool command launcher. */
.tool-command-backdrop { position: fixed; inset: 0; z-index: 999; box-sizing: border-box; padding: 12vh 20px 20px; background: rgba(8, 7, 10, 0.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tool-command-backdrop[hidden] { display: none; }
.tool-command-palette { width: min(620px, 100%); max-height: min(650px, 76vh); margin: 0 auto; overflow: hidden; border: 1px solid #4d4655; background: #121116; color: #f4f0f8; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.tool-command-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 16px; border-bottom: 1px solid #302b36; }
.tool-command-head h2 { margin: 0; font: 700 1rem 'Barlow Condensed', sans-serif; letter-spacing: 0.04em; text-transform: uppercase; }
.tool-command-close { min-width: 44px; height: 32px; border: 1px solid #4d4655; border-radius: 0; background: transparent; color: #aaa3b1; cursor: pointer; }
.tool-command-search { width: 100%; height: 48px; box-sizing: border-box; padding: 0 16px; border: 0; border-bottom: 1px solid #302b36; border-radius: 0; outline: 0; background: #0c0b0f; color: #f4f0f8; font: 500 0.88rem 'Inter', sans-serif; }
.tool-command-results { max-height: min(475px, 58vh); overflow-y: auto; padding: 8px; }
.tool-command-results a { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; min-height: 48px; padding: 4px 10px; color: #f4f0f8; text-decoration: none; }
.tool-command-results a.is-current { background: #241f2a; }
.tool-command-results strong { font-size: 0.78rem; }
.tool-command-results small { color: #8f8798; font-size: 0.68rem; }
.tool-command-index { color: #8b5cf6; font: 700 0.68rem 'Barlow Condensed', sans-serif; letter-spacing: 0.08em; }
.tool-command-empty { padding: 24px 12px; color: #8f8798; font-size: 0.78rem; text-align: center; }

body.tool-page :is(a, button, input, select, summary):focus-visible { outline: 2px solid var(--tool-violet); outline-offset: 3px; }

@media (hover: hover) {
    body.tool-page .command-trigger:hover,
    body.tool-page .tool-masthead-actions .theme-toggle-btn:hover,
    .tool-sync-popover-close:hover { border-color: var(--tool-rule-strong); color: var(--tool-ink); }
    body.tool-page .site-nav-link:hover { border-bottom-color: var(--tool-rule-strong); background: transparent; color: var(--tool-ink); }
    .tool-command-results a:hover { background: #241f2a; }
}

@media (max-width: 820px) {
    body.tool-page .app-wrapper,
    body.tool-page .site-footer { width: min(calc(100% - 32px), 1280px); }
    .tool-masthead { height: 70px; }
    body.tool-page .command-trigger { width: 44px; height: 44px; justify-content: center; padding: 0; }
    body.tool-page .command-trigger span,
    body.tool-page .command-trigger kbd { display: none; }
    body.tool-page .command-trigger-icon { display: block; }
    body.tool-page .tool-masthead-actions .theme-toggle-btn { width: 44px; height: 44px; }
    .tool-status-rail > span:last-child { display: none; }
    body.tool-page :is(.pr-control-bar-row, .trade-control-bar-row, .ss-control-bar-row, .tf-control-bar-row, .ww-control-bar-row, .lh-control-bar-row) { align-items: flex-start; }
    body.tool-page .ss-lineup-columns { grid-template-columns: minmax(0, 1fr); }
    body.tool-page :is(.ss-lineup-col, .ss-slot-list, .ss-slot-row) { min-width: 0; }
    body.tool-page .tool-sync-popover { max-height: calc(100dvh - 120px); }
    .tool-sync-popover-close { width: 44px; height: 44px; flex-basis: 44px; }
}

@media (max-width: 900px) {
    body.tool-page :is(.tf-section-header, .ww-section-header) p { min-height: 0; }
    body.tool-page :is(.tf-content-grid, .ww-content-grid) { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    body.tool-page :is(.tf-content-grid, .ww-content-grid) > * { min-width: 0; }
    body.tool-page .ww-pos-filter { width: 100%; box-sizing: border-box; }
}

@media (max-width: 720px) {
    .tool-status-rail { min-height: 34px; }
    body.tool-page .site-nav-inner { gap: 18px; }
}

@media (max-width: 640px) {
    body.tool-page :is(.pr-title-row, .trade-title-row, .ss-title-row, .tf-title-row, .ww-title-row, .lh-title-row) { min-height: 0; padding: 15px 0; }
    body.tool-page :is(.pr-title-row, .trade-title-row, .ss-title-row, .tf-title-row, .ww-title-row, .lh-title-row) h2 { font-size: 2rem; }
    body.tool-page :is(.pr-control-bar, .trade-control-bar, .ss-control-bar, .tf-control-bar, .ww-control-bar, .lh-control-bar) { margin-top: 14px; }
    body.tool-page :is(.pr-control-bar-row, .trade-control-bar-row, .ss-control-bar-row, .tf-control-bar-row, .ww-control-bar-row, .lh-control-bar-row) { padding: 10px; gap: 10px; }
    body.tool-page :is(.pr-table-wrap, .ss-controls-bar, .tf-content-grid, .ww-content-grid, .lh-content > .lh-hero, .trade-builder) { margin-top: 14px; }
    body.tool-page .trade-side { min-height: 0; padding: 14px; }
    body.tool-page :is(.trade-builder, .trade-sides-grid, .ss-lineup-columns) { gap: 14px; }
    body.tool-page .trade-settings-bar-actions { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
    body.tool-page .trade-control-bar-row-bottom .trade-sample-prompt { width: 100%; margin-left: 0 !important; text-align: left; }
    body.tool-page .trade-settings-bar-actions :is(.sleeper-sync-toggle-btn, .clear-draft-btn),
    body.tool-page :is(.trade-search-input, .trade-team-picker, .calculate-trade-btn, .ss-mode-btn, .ww-pos-filter-btn, .ww-waiver-type-btn),
    body.tool-page .ss-control select#ssWeekSelect { min-height: 44px; }
    body.tool-page .ss-controls-bar { gap: 12px; margin-bottom: 14px; }
    body.tool-page :is(.pr-empty-state, .ss-empty-state, .tf-empty-state, .ww-empty-state, .lh-empty-state) { min-height: 220px; padding: 36px 18px; }
    body.tool-page .sleeper-sync-box-inline { width: 100%; min-width: 0; }
    body.tool-page .sleeper-sync-box-inline .sleeper-sync-toggle-btn { width: 100%; min-height: 44px; }
    body.tool-page .tool-sync-popover :is(.league-provider-option, .sleeper-sync-input, .sleeper-sync-connect-btn, .sleeper-sync-disconnect-btn) { min-height: 44px; }
    body.tool-page .tool-sync-popover .league-provider-option { min-height: 50px; }
    body.tool-page .lh-hero { margin-bottom: 20px; }
    body.tool-page .lh-section { margin-bottom: 22px; }
    body.tool-page .site-footer { margin-top: 48px; }
    .tool-command-backdrop { display: flex; align-items: flex-start; padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); }
    .tool-command-backdrop[hidden] { display: none; }
    .tool-command-palette { max-height: calc(100dvh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
    .tool-command-results a { grid-template-columns: 28px 1fr; }
    .tool-command-results small { display: none; }
}

@media (max-width: 480px) {
    .tool-brand { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
    body.tool-page *,
    body.tool-page *::before,
    body.tool-page *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
