/* Shared Material components. Page-specific layouts remain in theme.css. */
:root {
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-full: 999px;
  --md-sys-motion-duration-short: 160ms;
  --md-sys-motion-easing-standard: cubic-bezier(.2, 0, 0, 1);
  --md-sys-typescale-headline-small-size: 24px;
  --md-sys-typescale-title-large-size: 22px;
  --md-sys-typescale-title-medium-size: 16px;
  --md-sys-typescale-body-medium-size: 14px;
  --md-sys-typescale-label-large-size: 14px;
}
html body.workspace-shell { background: var(--md-sys-color-surface); }
html body.workspace-shell h1 { font-size: 32px!important; font-weight: 400!important; letter-spacing: 0; line-height: 1.25; }
html body.workspace-shell h2 { font-size: 22px!important; font-weight: 500!important; letter-spacing: 0; }
html body.workspace-shell button { font-size: 14px!important; font-weight: 500!important; letter-spacing: .1px; }
html body.workspace-shell .site-header { background: var(--md-sys-color-surface-container); border: 0; }
html body.workspace-shell .primary-navigation { gap: 8px; }
html body.workspace-shell .primary-navigation a { display: flex; align-items: center; gap: 8px; border-radius: var(--md-sys-shape-corner-full); min-height: 48px; padding: 10px 20px; }
html body.workspace-shell .primary-navigation a .material-symbols-rounded { font-size: 20px; }
html body.workspace-shell .primary-navigation a[aria-current] { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
html body.workspace-shell .primary-navigation a[aria-current] .material-symbols-rounded { font-variation-settings: 'FILL' 1; }
html body.workspace-shell .header-actions button { border: 0; border-radius: 999px; min-height: 48px; height: 48px; }
html body.workspace-shell .header-actions .header-inventory { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); padding-inline: 20px; }
html body.workspace-shell .header-actions .header-theme { width: 48px; }
html body.workspace-shell :is(.home-actions a,.filled-button,.tonal-button,.text-button,.quick-add,#clearFiltersBttn,#calc-apply-trade,.calc-qty-btn,.calc-settings-btn,.calc-clear-btn,.detail-link,.workspace-tabs a,.help-navigation a,.catalog-filters summary) { border-radius: var(--md-sys-shape-corner-full)!important; }
html body.workspace-shell :is(.filled-button,.tonal-button,.text-button) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 10px 24px; border: 0; box-shadow: none; text-decoration: none; white-space: nowrap; }
html body.workspace-shell .filled-button { color: var(--md-sys-color-on-primary); background: var(--md-sys-color-primary); }
html body.workspace-shell .tonal-button { color: var(--md-sys-color-on-secondary-container); background: var(--md-sys-color-secondary-container); }
html body.workspace-shell .text-button { color: var(--md-sys-color-primary); background: transparent; }
html body.workspace-shell .destructive-button { color: var(--md-sys-color-error); }
html body.workspace-shell .icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--md-sys-color-on-surface-variant); flex: 0 0 40px; }
html body.workspace-shell :is(button,a,summary) { -webkit-tap-highlight-color: transparent; }
html body.workspace-shell :is(.filled-button,.tonal-button,.text-button,.icon-button,.quick-add,.palette-option,.primary-navigation a,.header-actions button,.home-actions a,.workspace-tabs a,.help-navigation a,.category-tile,.trend-card,.card-open) { transition: background var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard), box-shadow var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard); }
html body.workspace-shell :is(.icon-button,.text-button,.primary-navigation a,.workspace-tabs a,.help-navigation a):hover { background: color-mix(in srgb,var(--md-sys-color-on-surface) 8%,transparent); }
html body.workspace-shell .filled-button:hover { background: color-mix(in srgb,var(--md-sys-color-on-primary) 8%,var(--md-sys-color-primary)); box-shadow: 0 1px 3px #0003; }
html body.workspace-shell .tonal-button:hover { background: color-mix(in srgb,var(--md-sys-color-on-secondary-container) 8%,var(--md-sys-color-secondary-container)); }
html body.workspace-shell :is(button,a,summary):focus-visible { outline: 3px solid var(--md-sys-color-primary); outline-offset: 3px; }
html body.workspace-shell :is(.catalog-toolbar,.trade-builder,.trade-review,.category-tile,.catalog-card .itemcell,.article,.empty-state) { border: 0!important; background: var(--md-sys-color-surface-container-low); }
html body.workspace-shell .catalog-toolbar { border-radius: 28px; padding: 24px; margin-top: 24px; }
html body.workspace-shell .catalog-main-controls { gap: 16px; }
html body.workspace-shell .field { gap: 0; background: var(--md-sys-color-surface-container-highest); padding-top: 8px; border-radius: 4px 4px 0 0; font-size: 12px; }
html body.workspace-shell .field { text-indent: 16px; }
html body.workspace-shell .field :is(input,select) { min-height: 42px!important; border: 0!important; border-bottom: 1px solid var(--md-sys-color-outline)!important; border-radius: 0!important; background: transparent!important; padding: 4px 16px 10px!important; margin: 0!important; width: 100%!important; text-indent: 0; }
html body.workspace-shell .field :is(input,select):focus { border-bottom: 2px solid var(--md-sys-color-primary)!important; outline: 0; }
html body.workspace-shell .field:focus-within { color: var(--md-sys-color-primary); }
html body.workspace-shell select option { background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface); }
html body.workspace-shell .catalog-filters summary { border: 1px solid var(--md-sys-color-outline); background: transparent; min-height: 40px; }
html body.workspace-shell .catalog-card .itemcell { border-radius: 16px; padding: 20px!important; }
html body.workspace-shell .card-open { border-radius: 12px; }
html body.workspace-shell .card-open:hover { background: color-mix(in srgb,var(--md-sys-color-on-surface) 8%,transparent); }
html body.workspace-shell .card-footer { border-top: 0; padding-top: 12px; }
html body.workspace-shell .card-stability { border-radius: 8px; padding: 4px 8px; }
html body.workspace-shell .card-value-row strong { font-size: 22px; font-weight: 500; }
html body.workspace-shell .quick-add { min-height: 40px; padding: 8px 16px; }
html body.workspace-shell .category-tile { border-radius: 20px; }
html body.workspace-shell .category-tile:hover { background: var(--md-sys-color-surface-container-high); }
html body.workspace-shell .breadcrumbs { margin-bottom: 20px; }
html body.workspace-shell .home-page .title-area { display: block; margin: 12px 0 32px!important; }
html body.workspace-shell .pv-hero-title { max-width: none!important; font-size: 36px!important; font-weight: 400!important; letter-spacing: -.3px; margin-bottom: 28px!important; }
.home-tools { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 16px; }
.home-browse { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); border-radius: 28px; padding: 32px; }
html body.workspace-shell .home-browse h2 { margin: 0 0 20px; }
.home-category-links { display: flex; flex-wrap: wrap; gap: 8px; }
html body.workspace-shell .home-category-links a { display: inline-flex; min-height: 40px; align-items: center; gap: 6px; border: 1px solid currentColor; border-radius: 999px; padding: 8px 16px; text-decoration: none; font-size: 14px; color: inherit; }
.home-side-tools { display: flex; flex-direction: column; gap: 8px; }
html body.workspace-shell .home-tool { display: flex; align-items: center; gap: 16px; flex: 1; width: 100%; padding: 24px; border: 0; border-radius: 24px; color: var(--md-sys-color-on-secondary-container); background: var(--md-sys-color-secondary-container); text-decoration: none; text-align: left; }
html body.workspace-shell .home-tool+.home-tool { background: var(--md-sys-color-tertiary-container); color: var(--md-sys-color-on-tertiary-container); }
.home-tool .material-symbols-rounded { font-size: 28px; }
.home-tool strong { flex: 1; font-size: 18px; font-weight: 500; }
html body.workspace-shell .trend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; max-width: none; margin: 16px 0 0; }
html body.workspace-shell .trend-card { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 16px 0; min-width: 0; min-height: 80px; border: 0; border-bottom: 1px solid var(--md-sys-color-outline-variant); background: transparent; border-radius: 0; text-align: left; }
.trend-card img { width: 48px; height: 48px; object-fit: contain; }
html body.workspace-shell .trend-card h3 { font-size: 16px!important; margin: 0!important; color: var(--md-sys-color-on-surface); }
html body.workspace-shell .trend-card p { font-size: 12px!important; margin: 4px 0 0!important; }
.trend-value { font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 500; color: var(--md-sys-color-primary); }
html body.workspace-shell #main.trade-page { max-width: 1320px!important; }
html body.workspace-shell #calc-wrap { grid-template-columns: minmax(0,.95fr) minmax(0,1.1fr)!important; gap: 24px; }
html body.workspace-shell .trade-builder { padding: 28px; border-radius: 28px; }
html body.workspace-shell #calc-panel { display: flex!important; flex-direction: column; gap: 28px!important; }
html body.workspace-shell .trade-review { padding: 28px; border-radius: 28px; }
html body.workspace-shell .workspace-heading { margin-bottom: 24px; align-items: center; }
html body.workspace-shell .workspace-heading h2 { font-size: 22px!important; margin: 0!important; }
html body.workspace-shell .step-number { height: 32px; flex-basis: 32px; border-radius: 50%; font-size: 14px; background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
html body.workspace-shell .calc-side-header { font-size: 16px!important; color: var(--md-sys-color-on-surface); margin-bottom: 16px!important; }
html body.workspace-shell .calc-slot { min-height: 132px!important; border: 0; border-radius: 16px!important; background: var(--md-sys-color-surface-container-high)!important; }
html body.workspace-shell .calc-slot-img { width: 64px!important; height: 64px!important; }
html body.workspace-shell .calc-slot-name { font-size: 12px!important; }
html body.workspace-shell .calc-slot-add { background: var(--md-sys-color-secondary-container)!important; }
html body.workspace-shell .calc-slot-empty { display: none!important; }
html body.workspace-shell .trade-graph { width: 100%; max-width: none; }
html body.workspace-shell .graph-explanation h3 { font-size: 22px!important; font-weight: 400!important; margin: 0 0 20px!important; }
html body.workspace-shell .graph-offer-cards { margin: 0 0 24px; gap: 16px; }
html body.workspace-shell .graph-offer-card { padding: 18px!important; border: 0; border-radius: 20px!important; text-align: left; }
html body.workspace-shell .graph-offer-card.give { background: var(--md-sys-color-primary-container)!important; color: var(--md-sys-color-on-primary-container); }
html body.workspace-shell .graph-offer-card.receive { background: var(--md-sys-color-tertiary-container)!important; color: var(--md-sys-color-on-tertiary-container); }
html body.workspace-shell .graph-offer-card strong { font-size: 30px!important; font-weight: 500; color: inherit; }
html body.workspace-shell .graph-offer-card span,html body.workspace-shell .graph-offer-card small { color: inherit; }
html body.workspace-shell .graph-offer-card small { font-size: 12px!important; }
html body.workspace-shell .trade-graph svg { width: 100%; height: 240px; }
html body.workspace-shell .trade-graph .graph-label { font-size: 16px; }
html body.workspace-shell .trade-graph .graph-track { stroke-width: 4; opacity: .75; }
html body.workspace-shell .trade-graph figcaption { font-size: 12px!important; margin-top: 8px; }
html body.workspace-shell :is(#calc-apply-trade) { width: auto; min-width: 200px; min-height: 48px; padding: 12px 24px!important; font-size: 14px!important; display: inline-flex; justify-content: center; margin-right: 12px!important; }
html body.workspace-shell #popUp { background: var(--md-sys-color-surface-container-high); border: 0!important; }
html body.workspace-shell :is(.calc-modal,.calc-qty-dialog) { background: var(--md-sys-color-surface-container-high)!important; color: var(--md-sys-color-on-surface); border: 0!important; border-radius: 28px!important; }
html body.workspace-shell .calc-qty-title { font-size: 22px!important; font-weight: 400!important; line-height: 1.4; text-align: left!important; }
html body.workspace-shell .calc-qty-dialog { padding: 24px!important; text-align: left!important; }
html body.workspace-shell .calc-settings-option { display: flex!important; align-items: center; justify-content: space-between; gap: 12px; }
html body.workspace-shell .calc-settings-checkbox-row { display: flex; align-items: center; flex: 1; gap: 12px; font-size: 14px!important; }
html body.workspace-shell .calc-settings-checkbox-row input { flex: 0 0 18px; }
html body.workspace-shell .calc-settings-help-text { margin-top: 12px; padding: 12px; background: var(--md-sys-color-surface-container-highest); border-radius: 12px; font-size: 14px!important; line-height: 1.5; color: var(--md-sys-color-on-surface-variant); }
html body.workspace-shell .calc-qty-actions { justify-content: flex-end; gap: 8px; margin-top: 24px; }
html body.workspace-shell .calc-qty-btn { min-height: 40px; padding: 10px 24px; }
html body.workspace-shell .calc-qty-btn-cancel { background: transparent; color: var(--md-sys-color-primary); }
html body.workspace-shell .calc-settings-help { border: 0; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: transparent; color: var(--md-sys-color-primary); display: inline-grid; place-items: center; }
html body.workspace-shell .calc-modal-close { width: 40px; height: 40px; min-height: 40px; top: 16px; right: 16px; border: 0; border-radius: 50%; font-size: 24px!important; background: transparent; color: var(--md-sys-color-on-surface); }
html body.workspace-shell .picker-title { margin: 0 48px 20px 0!important; font-size: 24px!important; font-weight: 400!important; }
html body.workspace-shell .calc-modal #calc-modal-tabs { justify-content: flex-start; padding: 0; margin: 0 0 14px; }
html body.workspace-shell .calc-modal .field { max-width: 320px; text-align: left; }
html body.workspace-shell #calc-modal-tabs .field { max-width: 320px; }
html body.workspace-shell #calc-modal-search { border: 0; border-radius: 999px; min-height: 48px; background: var(--md-sys-color-surface-container-highest); padding-inline: 20px; }
html body.workspace-shell #calc-modal .calc-modal { display: flex; flex-direction: column; overflow: hidden!important; border-radius: 28px!important; padding: 24px!important; }
html body.workspace-shell #calc-modal-grid { grid-auto-rows: max-content; align-content: start; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; flex: 1 1 auto; }
html body.workspace-shell #calc-modal-search { flex: 0 0 auto; border-radius: 999px!important; outline-color: var(--md-sys-color-primary); }
html body.workspace-shell #calc-modal-search:focus { box-shadow: none!important; outline: 2px solid var(--md-sys-color-primary); outline-offset: -2px; }
html body.workspace-shell .calc-modal-overlay { overflow: hidden; backdrop-filter: none; background: color-mix(in srgb,var(--md-sys-color-scrim) 40%,transparent); }
html:has(.calc-modal-overlay[style*="display: flex"]) { overflow: hidden; }
html body.workspace-shell .calc-grid-item { border: 0!important; border-radius: 16px!important; background: var(--md-sys-color-surface-container)!important; }
html body.workspace-shell .calc-grid-item { min-width: 0; overflow: hidden; }
html body.workspace-shell .calc-grid-item img { flex: 0 0 44px; }
html body.workspace-shell .calc-grid-item-copy { min-width: 0; flex: 1; }
html body.workspace-shell .calc-grid-item-name { overflow-wrap: anywhere; line-height: 1.4; }
html body.workspace-shell .calc-grid-item-components { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; margin-top: 4px; font-size: 11px; line-height: 1.4; color: var(--md-sys-color-on-surface-variant); }
html body.workspace-shell #pv-dialog-backdrop { background: color-mix(in srgb,var(--md-sys-color-scrim) 40%,transparent); backdrop-filter: none; }
html body.panel-open { overflow: hidden; }
html:has(body.panel-open) { overflow: hidden; scrollbar-gutter: stable; }
html.pv-no-inv-calc body.workspace-shell #invCalc.inventory-status,html.pv-no-inv-calc body.workspace-shell .quick-add { display: none!important; }
html body.workspace-shell :is(#pv-appearance-dialog,#pv-inventory-dialog) { position: fixed; top: 50%!important; left: 50%!important; transform: translate(-50%,-50%)!important; width: min(820px,calc(100vw - 48px))!important; max-width: calc(100vw - 48px)!important; max-height: min(840px,calc(100dvh - 48px))!important; padding: 0!important; border: 0!important; border-radius: 28px; overflow: hidden!important; background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface); text-align: left!important; box-shadow: 0 8px 28px #0004; flex-direction: column; gap: 0; }
html body.workspace-shell #pv-appearance-dialog[style*="display: block"] { display: flex!important; }
html body.workspace-shell .dialog-heading { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 24px 16px; }
html body.workspace-shell .dialog-heading h2 { margin: 0!important; font-size: 24px!important; font-weight: 400!important; text-align: left!important; outline: none; }
.dialog-heading-actions { display: flex; gap: 4px; }
.dialog-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.settings-content { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); align-items: start; gap: 28px; padding: 8px 24px 24px; }
.settings-controls { min-width: 0; }
html body.workspace-shell .settings-group { margin: 0 0 24px; padding: 0; border: 0; min-width: 0; }
.settings-group legend { margin: 0 0 12px; font-size: 14px; font-weight: 500; color: var(--md-sys-color-on-surface-variant); }
html body.workspace-shell .pv-seg-row { border: 1px solid var(--md-sys-color-outline); border-radius: 999px; background: transparent; gap: 0; padding: 0; overflow: hidden; }
html body.workspace-shell .pv-seg-btn { display: inline-flex; flex: 1 1 0; justify-content: center; align-items: center; gap: 8px; min-height: 40px; padding: 10px 12px; margin: 0; border: 0; border-radius: 0; background: transparent; color: var(--md-sys-color-on-surface); font-size: 14px!important; }
html body.workspace-shell .pv-seg-btn+.pv-seg-btn { border-left: 1px solid var(--md-sys-color-outline); }
html body.workspace-shell .pv-seg-btn.pv-active { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
html body.workspace-shell .pv-seg-btn.pv-active::before { content: 'check'; font-family: 'Material Symbols Rounded'; font-size: 18px; line-height: 1; }
html body.workspace-shell .pv-seg-btn.pv-active>.material-symbols-rounded { display: none; }
html body.workspace-shell .layout-options .pv-seg-btn { flex-direction: column; gap: 6px; min-height: 72px; padding-inline: 4px; font-size: 12px!important; }
html body.workspace-shell .layout-options .pv-seg-btn.pv-active>.material-symbols-rounded { display: inline; }
html body.workspace-shell .layout-options .pv-seg-btn.pv-active::before { display: none; }
.palette-options { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 16px; }
html body.workspace-shell .palette-option { min-width: 0; border: 2px solid transparent; border-radius: 16px; padding: 6px; color: var(--md-sys-color-on-surface-variant); background: transparent; }
.palette-option>span { display: grid; width: 100%; aspect-ratio: 1.35; max-height: 48px; border-radius: 12px; background: conic-gradient(var(--swatch) 0 50%,var(--swatch-secondary) 50% 75%,var(--swatch-tertiary) 75% 100%); }
.palette-option small { display: block; margin-top: 6px; font-size: 12px; }
html body.workspace-shell .palette-option[aria-pressed="true"] { border-color: var(--md-sys-color-primary); }
.hue-label { display: flex; justify-content: space-between; margin: 16px 0 8px; font-size: 12px; color: var(--md-sys-color-on-surface-variant); }
html body.workspace-shell #pv-appearance-hue { width: 100%; height: 32px; min-height: 32px; border: 0; background: transparent; accent-color: var(--md-sys-color-primary); }
html body.workspace-shell #pv-appearance-hue::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(to right,#e85d5d 0%,#e8d65d 16.67%,#65c96c 33.33%,#5dccce 50%,#6881e0 66.67%,#c46bd6 83.33%,#e85d5d 100%); }
html body.workspace-shell #pv-appearance-hue::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -6px; border: 2px solid var(--md-sys-color-on-surface); border-radius: 50%; background: var(--slider-color,var(--md-sys-color-primary)); box-shadow: 0 1px 3px #0004; }
html body.workspace-shell #pv-appearance-hue::-moz-range-track { height: 8px; border-radius: 999px; background: linear-gradient(to right,#e85d5d 0%,#e8d65d 16.67%,#65c96c 33.33%,#5dccce 50%,#6881e0 66.67%,#c46bd6 83.33%,#e85d5d 100%); }
html body.workspace-shell #pv-appearance-hue::-moz-range-progress { height: 8px; background: transparent; }
html body.workspace-shell #pv-appearance-hue::-moz-range-thumb { width: 20px; height: 20px; border: 2px solid var(--md-sys-color-on-surface); border-radius: 50%; background: var(--slider-color,var(--md-sys-color-primary)); box-shadow: 0 1px 3px #0004; }
html body.workspace-shell .blackout-option { display: flex!important; width: 100%; align-items: center; gap: 10px; border: 1px solid var(--md-sys-color-outline); border-radius: 999px; padding: 10px 12px; color: var(--md-sys-color-on-surface); background: transparent; margin-top: 12px; font-size: 12px!important; }
html body.workspace-shell .blackout-option[style*="display: none"] { display: none!important; }
.blackout-option .selection-mark { margin-left: auto; visibility: hidden; }
.blackout-option[aria-pressed="true"] .selection-mark { visibility: visible; }
html body.workspace-shell .blackout-option[aria-pressed="true"] { background: var(--md-sys-color-secondary-container); }
.settings-toggles { border-top: 1px solid var(--md-sys-color-outline-variant); }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; font-size: 14px; cursor: pointer; }
.switch-row small { display: block; font-size: 12px; line-height: 1.45; color: var(--md-sys-color-on-surface-variant); margin-top: 4px; }
html body.workspace-shell input.material-switch { appearance: none; width: 52px; min-width: 52px; height: 32px; min-height: 32px; padding: 0; margin: 0; border: 2px solid var(--md-sys-color-outline); border-radius: 999px; background: var(--md-sys-color-surface-container-highest); position: relative; cursor: pointer; }
.material-switch::before { content: ''; position: absolute; width: 16px; height: 16px; top: 6px; left: 6px; border-radius: 50%; background: var(--md-sys-color-outline); transition: transform 160ms; }
html body.workspace-shell input.material-switch:checked { border-color: var(--md-sys-color-primary); background: var(--md-sys-color-primary); }
.material-switch:checked::before { width: 24px; height: 24px; top: 2px; left: 2px; transform: translateX(20px); background: var(--md-sys-color-on-primary); }
.material-switch:disabled { opacity: .4; cursor: not-allowed; }
.theme-preview { background: var(--md-sys-color-surface); color: var(--md-sys-color-on-surface); border-radius: 24px; padding: 16px; position: sticky; top: 0; min-width: 0; }
.preview-label { display: block; font-size: 12px; color: var(--md-sys-color-on-surface-variant); margin: 0 0 20px; }
.preview-appbar { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.preview-appbar strong { flex: 1; font-size: 14px; font-weight: 500; }
.preview-item { background: var(--md-sys-color-surface-container-low); border-radius: 16px; padding: 16px; }
.preview-item img { display: block; width: 100%; height: 108px; object-fit: contain; margin-bottom: 12px; }
html body.workspace-shell .preview-item h3 { font-size: 18px!important; margin: 0 0 10px!important; color: inherit; }
.preview-chip { display: inline-block; font-size: 11px; border-radius: 8px; padding: 4px 8px; background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.preview-value { display: flex; justify-content: space-between; align-items: center; font-size: 12px; padding: 20px 0; }
.preview-value strong { font-size: 20px; font-weight: 500; }
.preview-action { display: flex; align-items: center; justify-content: center; gap: 4px; border-radius: 999px; padding: 12px 8px; background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); font-size: 12px; }
.preview-tones { display: flex; height: 24px; margin-top: 16px; border-radius: 999px; overflow: hidden; }
.preview-tones i { flex: 1; background: var(--md-sys-color-primary); }
.preview-tones i:nth-child(2) { background: var(--md-sys-color-primary-container); }
.preview-tones i:nth-child(3) { background: var(--md-sys-color-secondary-container); }
.preview-tones i:nth-child(4) { background: var(--md-sys-color-tertiary-container); }
.preview-tones i:nth-child(5) { background: var(--md-sys-color-surface-container-highest); }
.dialog-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 8px; padding: 16px 24px 24px; background: var(--md-sys-color-surface-container-high); }
.dialog-actions>span[role="status"] { flex: 1; font-size: 12px; color: var(--md-sys-color-on-surface-variant); }
.inventory-summary { display: flex; justify-content: space-between; align-items: end; padding: 20px 24px; margin: 0 24px 20px; border-radius: 20px; background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); }
html body.workspace-shell #pv-inventory-summary { text-align: left; color: var(--md-sys-color-on-primary-container); padding: 20px 24px; }
.inventory-summary>div { display: flex; flex-direction: column; gap: 4px; }
.inventory-summary strong { font-size: 32px; line-height: 1.2; font-weight: 500; font-variant-numeric: tabular-nums; }
.inventory-summary span,.inventory-summary small { font-size: 12px; }
.inventory-summary .inventory-count { align-items: flex-end; text-align: right; }
.inventory-summary .inventory-count strong { font-size: 24px; }
.inventory-toolbar { display: flex; gap: 16px; flex: 0 0 auto; align-items: stretch; padding: 0 24px 16px; }
.inventory-search { display: flex; align-items: center; gap: 12px; background: var(--md-sys-color-surface-container-highest); border-radius: 999px; padding: 0 16px; flex: 1; min-width: 0; }
html body.workspace-shell .inventory-search input { border: 0; min-width: 0; width: 100%; padding: 12px 0; background: transparent; min-height: 48px; }
.inventory-sort { display: flex; flex-direction: column; font-size: 11px; color: var(--md-sys-color-on-surface-variant); gap: 0; }
html body.workspace-shell .inventory-sort select { padding: 4px 12px; min-height: 28px; background: transparent; border-radius: 8px; font-size: 12px!important; }
html body.workspace-shell #pv-inventory-list { padding: 0 24px!important; overflow-y: auto; min-height: 120px; overscroll-behavior: contain; scrollbar-width: thin; }
.inventory-item { display: grid; grid-template-columns: 56px minmax(0,1fr) auto auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--md-sys-color-outline-variant); }
html body.workspace-shell #pv-inventory-list>.inventory-item { padding: 16px 0!important; }
.inventory-item:last-child { border-bottom: 0; }
.inventory-item .pv-inventory-row-img { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; background: var(--md-sys-color-surface-container); padding: 4px; }
html body.workspace-shell .inventory-item-details { display: flex; flex-direction: column; gap: 4px; color: var(--md-sys-color-on-surface); min-width: 0; text-decoration: none; }
.inventory-item-name { font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.inventory-item-details small,.inventory-item-total small { display: block; font-size: 12px; color: var(--md-sys-color-on-surface-variant); }
.inventory-item-total { text-align: right; }
.inventory-item-total strong { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
html body.workspace-shell .pv-inventory-row-adjust { display: inline-flex; align-items: center; gap: 0; margin: 0; border-radius: 999px; background: var(--md-sys-color-surface-container-highest); }
html body.workspace-shell .pv-inventory-row-adjust .icon-button { border: 0; border-radius: 999px; margin: 0; color: var(--md-sys-color-primary); }
.inventory-quantity { min-width: 24px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.inventory-empty { text-align: center; padding: 36px 12px; }
html body.workspace-shell #pv-inventory-list>.inventory-empty { padding: 36px 12px!important; }
.inventory-empty>.material-symbols-rounded { font-size: 40px!important; color: var(--md-sys-color-primary); margin-bottom: 12px; }
html body.workspace-shell .inventory-empty h3 { font-size: 20px!important; margin: 0 0 8px; }
.inventory-empty p { color: var(--md-sys-color-on-surface-variant); margin: 0 0 20px; }
html body.workspace-shell #inventory-undo-btn[hidden] { display: none!important; }
html body.workspace-shell #pv-inventory-refresh-btn.pv-spin-once .material-symbols-rounded { animation: pv-spin-once .4s ease; }
@media (max-width:1000px) {
 html body.workspace-shell .site-header-inner { gap: 12px; }
 html body.workspace-shell .primary-navigation a { padding: 10px 12px; }
 html body.workspace-shell .primary-navigation a .material-symbols-rounded { display: none; }
 html body.workspace-shell #calc-panel { gap: 20px!important; }
}
@media (min-width:701px) and (max-width:1100px) {
 html body.workspace-shell #calc-wrap { grid-template-columns: 1fr!important; }
 html body.workspace-shell #calc-panel { display: grid!important; grid-template-columns: 1fr 1fr; }
}
@media (max-width:700px) {
 html body.workspace-shell #calc-wrap { grid-template-columns: 1fr!important; }
 .home-tools { grid-template-columns: 1fr; }
 .home-side-tools { flex-direction: row; }
 html body.workspace-shell .home-tool { padding: 20px; flex-wrap: wrap; }
 html body.workspace-shell .home-tool strong { font-size: 16px; }
 html body.workspace-shell .home-tool>span:last-child { display: none; }
 html body.workspace-shell .pv-hero-title { font-size: 28px!important; }
 html body.workspace-shell .home-browse { padding: 24px; }
 html body.workspace-shell .trend-grid { grid-template-columns: 1fr; }
 html body.workspace-shell #calc-panel { display: flex!important; gap: 28px!important; }
 html body.workspace-shell :is(.trade-builder,.trade-review) { padding: 24px 20px; }
 html body.workspace-shell .trade-graph svg { height: 240px; }
 html body.workspace-shell .graph-offer-card { padding: 16px!important; }
 html body.workspace-shell .graph-offer-card strong { font-size: 28px!important; }
 html body.workspace-shell .graph-offer-card small { font-size: 11px!important; }
 html body.workspace-shell .graph-explanation h3 { font-size: 22px!important; }
 html body.workspace-shell :is(#calc-apply-trade) { width: 100%; margin-right: 0!important; }
 html body.workspace-shell .primary-navigation a { padding: 8px 12px; font-size: 12px; min-height: 40px; }
 html body.workspace-shell .primary-navigation { gap: 4px; }
 html body.workspace-shell :is(#pv-appearance-dialog,#pv-inventory-dialog) { width: calc(100vw - 24px)!important; max-width: calc(100vw - 24px)!important; max-height: calc(100dvh - 24px)!important; border-radius: 28px; }
 html body.workspace-shell .dialog-heading { padding: 20px 20px 12px; }
 .settings-content { grid-template-columns: 1fr; padding: 8px 20px 16px; gap: 8px; }
 .theme-preview { position: static; display: grid; grid-template-columns: 1fr; padding: 16px; }
 .preview-appbar,.preview-tones { display: none; }
 .preview-label { margin-bottom: 12px; }
 .preview-item { display: grid; grid-template-columns: 64px 1fr; gap: 8px 12px; align-items: center; padding: 12px; }
 .preview-item img { grid-row: span 2; width: 64px; height: 64px; margin: 0; }
 html body.workspace-shell .preview-item h3 { margin: 0!important; }
 .preview-chip { justify-self: start; }
 .preview-value { grid-column: 1/-1; padding: 8px 0; }
 .preview-action { grid-column: 1/-1; }
 .dialog-actions { padding: 12px 20px 20px; }
 .inventory-summary { padding: 16px 20px; margin: 0 20px 16px; flex: 0 0 auto; }
 .inventory-summary strong { font-size: 28px; }
 .inventory-summary .inventory-count strong { font-size: 22px; }
 .inventory-toolbar { padding: 0 20px 12px; gap: 10px; }
 html body.workspace-shell #pv-inventory-list { padding: 0 20px!important; }
 .inventory-item { grid-template-columns: 48px minmax(0,1fr) auto; gap: 8px 12px; padding: 16px 0; }
 .inventory-item .pv-inventory-row-img { width: 48px; height: 48px; }
 .inventory-item-total { grid-column: 2; grid-row: 2; text-align: left; display: flex; align-items: center; gap: 8px; }
 .inventory-item-total strong { font-size: 14px; }
 .inventory-item-total small { font-size: 11px; }
 .inventory-item-name { font-size: 14px; }
 html body.workspace-shell .inventory-item-details { grid-column: 2/-1; }
 html body.workspace-shell .pv-inventory-row-adjust { grid-column: 3; grid-row: 2; flex-direction: row; }
 .inventory-actions { flex-wrap: wrap; }
 .inventory-actions>span[role="status"] { flex: 1 1 20px; }
}
@media (prefers-reduced-motion: reduce) {
 html { scroll-behavior: auto; }
 html body.workspace-shell :is(button,a,summary),.material-switch::before { transition: none!important; }
}
/* Trade direction is fixed across appearance palettes. */
html body.workspace-shell .offer-give { background: var(--md-sys-color-surface-container)!important; color: var(--md-sys-color-on-surface); border-radius: 24px; padding: 20px!important; }
html body.workspace-shell .offer-receive { background: var(--md-sys-color-surface-container)!important; color: var(--md-sys-color-on-surface); border-radius: 24px; padding: 20px!important; }
html body.workspace-shell :is(.offer-give,.offer-receive) .calc-side-header { color: inherit!important; }
html body.workspace-shell .graph-offer-card.give { background: #5b2028!important; color: #ffe0e2!important; }
html body.workspace-shell .graph-offer-card.receive { background: #154d35!important; color: #d3fbe2!important; }
html body.workspace-shell .trade-graph .graph-your { stroke: #e7707f!important; fill: #e7707f!important; }
html body.workspace-shell .trade-graph .graph-their { stroke: #36a96d!important; fill: #36a96d!important; }
.trade-confirm-action { display: flex; justify-content: center; margin-top: 24px; }
html body.workspace-shell #calc-apply-trade { margin: 0!important; max-width: 100%; }
html body.workspace-shell .trade-indicators { padding: 0!important; border: 0!important; }
.home-layout { display: grid; grid-template-columns: minmax(0,1fr) 240px; gap: 32px; align-items: start; }
.home-primary { min-width: 0; }
.home-search-section { position: relative; z-index: 5; margin-bottom: 24px; }
.home-search-field { display: flex; align-items: center; gap: 12px; padding: 6px 16px; border-radius: 999px; background: var(--md-sys-color-surface-container-high); color: var(--md-sys-color-on-surface-variant); }
html body.workspace-shell #pv-item-search { flex: 1; width: 100%; min-width: 0; min-height: 48px; padding: 8px 0; border: 0!important; border-radius: 0; background: transparent; color: var(--md-sys-color-on-surface); font-size: 16px!important; outline: none; }
.home-search-field:focus-within { outline: 2px solid var(--md-sys-color-primary); }
#pv-search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: min(440px,60dvh); overflow: auto; overscroll-behavior: contain; padding: 8px; border-radius: 20px; box-shadow: 0 8px 24px #0004; background: var(--md-sys-color-surface-container-high); }
html body.workspace-shell .home-search-result { width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; padding: 12px; border: 0; border-radius: 12px; background: transparent; color: var(--md-sys-color-on-surface); }
.home-search-result img { width: 44px; height: 44px; object-fit: contain; flex: 0 0 44px; }
.home-search-result span { min-width: 0; }
.home-search-result strong,.home-search-result small { display: block; overflow-wrap: anywhere; }
.home-search-result small { color: var(--md-sys-color-on-surface-variant); margin-top: 4px; }
html body.workspace-shell .home-search-result:hover,html body.workspace-shell .home-search-result[aria-selected="true"] { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.search-message { padding: 12px; margin: 0; }
.home-feature-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
html body.workspace-shell .home-feature-links .home-tool { padding: 20px; flex-wrap: wrap; gap: 12px; }
.home-feature-links .home-tool strong { flex-basis: 100%; font-size: 16px; }
.home-feature-links .home-tool>span:last-child { display: none; }
.home-categories { border-radius: 24px; padding: 24px; background: var(--md-sys-color-surface-container); }
html body.workspace-shell .home-categories h2 { font-size: 18px!important; margin: 0 0 16px!important; }
.home-categories nav { display: flex; flex-direction: column; gap: 4px; }
html body.workspace-shell .home-categories a { display: flex; justify-content: space-between; align-items: center; border-radius: 999px; padding: 10px 16px; text-decoration: none; color: var(--md-sys-color-on-surface-variant); font-size: 14px; }
.home-categories a:hover { background: var(--md-sys-color-secondary-container); }
.future-feature-space { min-height: 50vh; }
@media(max-width:800px) { .home-layout { grid-template-columns: 1fr; }.home-categories nav { flex-direction: row; flex-wrap: wrap; }.home-categories { padding: 20px; } }
@media(max-width:480px) { .home-feature-links { grid-template-columns: 1fr; }html body.workspace-shell .home-feature-links .home-tool { flex-wrap: nowrap; padding: 20px; }.home-feature-links .home-tool strong { flex-basis: auto; } }

.sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
.home-feature-links { margin-bottom: 32px; }

html body.workspace-shell .calc-disclaimers { text-align:center!important;list-style-position:inside;padding:0!important;margin:16px auto 24px;max-width:900px; }
html body.workspace-shell .calc-disclaimers li { margin:8px 0; }

html body.workspace-shell .site-header-inner { display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:16px; }
html body.workspace-shell .primary-navigation { justify-content:center;gap:8px; }
html body.workspace-shell .header-actions { justify-self:end; }
@media(max-width:1050px) { html body.workspace-shell .site-header-inner { display:flex;flex-wrap:wrap;justify-content:space-between; }html body.workspace-shell .primary-navigation { order:3;flex-basis:100%;width:100%;justify-content:center;margin-top:8px;gap:8px; } }
@media(max-width:480px) { html body.workspace-shell .primary-navigation { gap:2px; }html body.workspace-shell .primary-navigation a { padding:8px;font-size:11px; } }
html body.workspace-shell .premium-coming-soon{font-size:clamp(40px,8vw,88px)!important;font-weight:800!important;text-align:center;padding:100px 16px}
.vote-reminder{background:var(--md-sys-color-surface-container-high);color:var(--md-sys-color-on-surface);border:0;border-radius:28px;padding:28px;max-width:420px;width:calc(100% - 64px);box-sizing:border-box;text-align:center}
.vote-reminder::backdrop{background:rgba(0,0,0,.6)}
.vote-reminder h2{margin-top:0}.vote-reminder .vote-reminder-actions{display:flex;gap:12px;justify-content:center;margin-top:24px;flex-wrap:wrap}
@media(min-width:1051px){html body.workspace-shell .primary-navigation a{padding-inline:14px}}
@media(max-width:480px){html body.workspace-shell .primary-navigation a{gap:3px;padding-inline:6px;font-size:10px}html body.workspace-shell .primary-navigation a .material-symbols-rounded{font-size:17px}}
html body.workspace-shell .vote-reminder h2{text-align:center!important;width:100%;max-width:none}
html body.workspace-shell .vote-reminder-opt-out{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:20px;font-size:13px;cursor:pointer}
.vote-reminder-opt-out input{width:16px;height:16px;accent-color:var(--md-sys-color-primary)}
html.pv-navigating{cursor:progress}
html.pv-navigating::after{content:"";position:fixed;inset:0 auto auto 0;height:3px;width:35%;background:var(--md-sys-color-primary);z-index:10000;animation:pv-navigation-progress 1s ease-in-out infinite;pointer-events:none}
@keyframes pv-navigation-progress{from{transform:translateX(-100%)}to{transform:translateX(300%)}}
@media(prefers-reduced-motion:reduce){html.pv-navigating::after{width:100%;animation:none}}

.recent-changes-empty {grid-column:1/-1;text-align:center;padding:24px;color:var(--md-sys-color-on-surface-variant);}

.change-pagination { display:flex; justify-content:center; align-items:center; gap:16px; margin:16px auto 8px; font-size:13px; }
.change-pagination button { width:36px; height:36px; min-width:36px; font-size:24px; }
.change-pagination button:disabled { opacity:.35; cursor:default; }
.trend-value { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.value-direction { font-size:18px; font-weight:700; }
.value-increase { color:#168447; }
.value-decrease { color:#d84040; }
html[data-theme="dark"] .value-increase { color:#77d99b; }
html[data-theme="dark"] .value-decrease { color:#ff9292; }
