:root {
  /* One shared scale grows text, artwork, controls and spacing together. */
  font-size: clamp(16px, calc(10px + 1.5vw), 26px);
  color-scheme: dark;
  --bg: #0b1017;
  --panel: #121a24;
  --panel-soft: #192431;
  --line: #263443;
  --text: #edf4f7;
  --muted: #91a2b1;
  --dim: #708192;
  --orange: #36d6c2;
  --orange-soft: #133a3b;
  --green: #45d39b;
  --red: #ff7783;
  --blue: #6aa8ff;
  --radius: 1.0625rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { padding: env(safe-area-inset-top) 0 calc(5.875rem + env(safe-area-inset-bottom)); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
.app-shell { width: min(100%, 43.75rem); min-height: 100dvh; margin: 0 auto; padding: 0.75rem 0.9375rem 1.5rem; }
.page { display: none; animation: appear .18s ease-out; }
.page.active { display: block; }
@keyframes appear { from { opacity: .58; transform: translateY(0.1875rem); } to { opacity: 1; transform: translateY(0); } }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.625rem; margin: 0.4375rem 0 0.9375rem; }
.page-title { min-width: 0; display: flex; align-items: center; gap: 0.625rem; }
.page-title h2 { margin: 0; font-size: clamp(1.375rem, 6vw, 1.6875rem); letter-spacing: -.055em; line-height: 1.1; font-weight: 820; }
.brand-icon { width: 2.1875rem; height: 2.1875rem; flex: 0 0 2.1875rem; display: grid; place-items: center; border-radius: 0.75rem; background: var(--orange); color: #fff; font-size: 1.5rem; line-height: 1; }
.date-chip, .icon-button { height: 2.375rem; flex: 0 0 auto; border: 1px solid #d9d2c4; border-radius: 0.8125rem; background: var(--panel); color: var(--text); cursor: pointer; }
.date-chip { display: inline-flex; align-items: center; gap: 0.4375rem; padding: 0 0.625rem; color: #716d62; font-size: 0.6875rem; font-variant-numeric: tabular-nums; }
.date-chip i, .counter-label i { width: 0.4375rem; height: 0.4375rem; border-radius: 50%; background: var(--green); }
.icon-button { width: 2.375rem; color: var(--orange); font-size: 1.3125rem; line-height: 1; }
.icon-button.spinning, .date-chip.spinning { animation: spin .65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-button:active, .date-chip:active { transform: scale(.97); }
.eyebrow { margin: 0; color: var(--muted); font-size: 0.5625rem; font-weight: 780; letter-spacing: .1em; }
.upgrade-counter { position: relative; min-height: 5.375rem; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 0.6875rem 0.875rem; border: 1px solid var(--line); border-radius: 1.0625rem; background: var(--panel); }
.counter-label { display: flex; align-items: center; gap: 0.4375rem; color: #777264; font-size: 0.6875rem; font-weight: 650; }
.counter-label i { width: 0.4375rem; height: 0.4375rem; border-radius: 0.125rem; background: #bd9416; }
.upgrade-counter strong { margin-top: 0.1875rem; font-size: 1.5625rem; line-height: 1; letter-spacing: -.035em; }
.counter-caption { margin-top: 0.3125rem; color: var(--muted); font-size: 0.5625rem; }
.activity-meta { min-height: 2.0625rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.3125rem 0.125rem 0.4375rem; }
.activity-meta > span:last-child { color: var(--dim); font-size: 0.5625rem; text-align: right; }
.live-pill { display: inline-flex; align-items: center; gap: 0.375rem; color: var(--green); font-size: 0.5625rem; font-weight: 800; letter-spacing: .06em; }
.live-pill i { width: 0.4375rem; height: 0.4375rem; border-radius: 50%; background: var(--green); }
.live-pill.unavailable { color: #b78628; }
.live-pill.unavailable i { background: #b78628; }
.search-wrap { min-width: 0; height: 2.6875rem; display: flex; align-items: center; gap: 0.5625rem; margin: 0 0 0.6875rem; padding: 0 0.75rem; border: 1px solid var(--line); border-radius: 0.9375rem; background: var(--panel); color: var(--muted); }
.search-wrap > span { flex: 0 0 auto; font-size: 1.375rem; line-height: 1; }
.search-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 0.8125rem; }
.search-wrap input::placeholder { color: #aaa596; opacity: 1; }
.section-tools { display: flex; gap: 0.5rem; align-items: center; }
.compact-search { flex: 1; }
.filter-toggle { width: 2.625rem; height: 2.625rem; flex: 0 0 2.625rem; border: 1px solid var(--line); border-radius: 0.875rem; background: var(--panel); color: var(--text); font-size: 1.1875rem; cursor: pointer; }
.stack { display: flex; flex-direction: column; gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: var(--panel); }
.stack:empty { display: none; }
.event-card, .deal-card { width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 0.6875rem 0.625rem; }
.event-card:last-child, .deal-card:last-child { border-bottom: 0; }
.event-head, .deal-head { display: flex; align-items: center; gap: 0.5625rem; }
.gift-thumb { width: 2.8125rem; height: 2.8125rem; flex: 0 0 2.8125rem; object-fit: cover; border-radius: 0.8125rem; background: #e9e4d8; }
.gift-placeholder { display: grid; place-items: center; color: #807969; font-size: 1.3125rem; }
.gift-info { min-width: 0; flex: 1; }
.gift-title { overflow: hidden; color: var(--text); font-size: 0.8125rem; font-weight: 730; line-height: 1.22; text-overflow: ellipsis; white-space: nowrap; }
.gift-subtitle { overflow: hidden; margin-top: 0.25rem; color: var(--muted); font-size: 0.625rem; text-overflow: ellipsis; white-space: nowrap; }
.owner-summary .owner-label { color: var(--muted); font-weight: 650; }
.gift-subtitle.owner-summary { overflow: visible; line-height: 1.4; white-space: normal; }
.owner-summary .owner-username { color: #71e5d7; font-weight: 740; }
.owner-summary .owner-display { color: #c6d2da; font-weight: 620; }
.owner-summary .owner-status { color: #91a2b1; }
.owner-inline-lookup { margin-left: .3rem; padding: 0; border: 0; background: transparent; color: #71e5d7; font: inherit; font-size: .58rem; font-weight: 740; text-decoration: underline; cursor: pointer; }
.owner-inline-lookup:disabled { opacity: .7; text-decoration: none; cursor: wait; }
.event-badge { flex: 0 0 auto; color: #bd443c; font-size: 0.5rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.trait-line { display: flex; flex-wrap: wrap; gap: 0.3125rem; margin-top: 0.4375rem; }
.trait-chip { color: #716d62; background: var(--panel-soft); border-radius: 0.4375rem; padding: 0.25rem 0.375rem; font-size: 0.5625rem; }
.trait-chip small { color: var(--muted); margin-left: 0.25rem; }
.event-foot, .deal-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.375rem; margin-top: 0.375rem; color: var(--muted); font-size: 0.5625rem; }
.event-price, .deal-price { flex: 0 0 auto; color: var(--text); font-size: 0.75rem; font-weight: 760; white-space: nowrap; }
.deal-price { display: flex; flex-direction: column; align-items: flex-end; gap: 0.125rem; }
.deal-price > span { color: var(--muted); font-size: 0.5rem; font-weight: 600; }
.deal-price > strong { color: var(--text); font-size: 0.75rem; font-weight: 760; }
.load-more-button { width: 100%; min-height: 2.5rem; border: 0; background: transparent; color: var(--blue); font-size: 0.6875rem; font-weight: 700; cursor: pointer; }
.load-more-button:disabled { opacity: .6; }
.segmented { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.125rem; padding: 0.1875rem; border-radius: 0.9375rem; background: #e9e5db; }
.segmented button { min-height: 2.125rem; border: 0; border-radius: 0.6875rem; background: transparent; color: #817c70; padding: 0.3125rem 0.1875rem; font-size: 0.625rem; font-weight: 650; cursor: pointer; }
.segmented button.selected { background: var(--panel); color: var(--text); box-shadow: 0 1px 0.1875rem rgba(65,55,38,.14); }
.chip-row { display: flex; gap: 0.3125rem; overflow-x: auto; scrollbar-width: none; padding: 0.5rem 0 0.125rem; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: 1 0 auto; border: 0; border-radius: 0.75rem; background: #ece8de; color: #827d71; padding: 0.5rem 0.625rem; font-size: 0.625rem; font-weight: 650; white-space: nowrap; cursor: pointer; }
.chip.selected { outline: 1px solid #d9d2c4; background: var(--panel); color: var(--text); box-shadow: 0 1px 0.1875rem rgba(65,55,38,.12); }
.inline-note { margin: 0.4375rem 0.125rem 0.5625rem; color: var(--muted); font-size: 0.625rem; line-height: 1.45; }
.map-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.5rem; margin: 0.4375rem 0 0.125rem; }
.map-controls label { min-width: 0; display: block; color: var(--muted); font-size: 0.5625rem; font-weight: 650; }
.map-controls select { width: 100%; min-width: 0; height: 2.5rem; margin-top: 0.25rem; padding: 0 0.5625rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--panel); color: var(--text); font-size: 0.625rem; font-weight: 700; }
.heatmap { display: grid; grid-template-columns: minmax(0,1fr); gap: 0.5rem; margin-top: 0.4375rem; }
.map-empty { grid-column: 1 / -1; }
.map-tile { min-width: 0; min-height: 5.75rem; overflow: hidden; display: grid; grid-template-columns: 1.5rem 2.75rem minmax(0,1fr) auto; align-items: center; gap: 0.5rem; border: 1px solid var(--line); border-radius: 0.9375rem; padding: 0.625rem; background: var(--panel); color: var(--text); text-align: left; cursor: pointer; }
.map-rank { width: 1.5rem; height: 1.5rem; display: grid; place-items: center; border-radius: 0.5625rem; background: var(--orange-soft); color: var(--orange); font-size: 0.625rem; font-weight: 800; }
.map-thumb { width: 2.75rem; height: 2.75rem; object-fit: cover; border-radius: 0.75rem; background: var(--panel-soft); }
.map-placeholder { display: grid; place-items: center; font-size: 1.25rem; }
.map-main { min-width: 0; display: flex; flex-direction: column; gap: 0.3125rem; }
.map-name { max-width: 100%; overflow-wrap: anywhere; color: var(--text); font-size: 0.75rem; font-weight: 760; line-height: 1.2; }
.map-meta { overflow: hidden; max-width: 100%; color: var(--muted); font-size: 0.5625rem; text-overflow: ellipsis; white-space: nowrap; }
.map-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0.25rem; }
.map-stats span { min-width: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 0.5rem; line-height: 1.25; }
.map-stats b { display: block; margin-top: 0.125rem; color: var(--text); font-size: 0.5rem; }
.map-side { min-width: 4.75rem; max-width: 7rem; display: flex; flex-direction: column; align-items: flex-end; gap: 0.3125rem; text-align: right; }
.map-primary { color: var(--orange); font-size: 0.6875rem; font-variant-numeric: tabular-nums; }
.map-side small { color: var(--muted); font-size: 0.5rem; line-height: 1.2; }
.map-tile.up .map-primary { color: var(--green); }
.map-tile.down .map-primary { color: var(--red); }
.top-collections { display: flex; flex-direction: column; gap: 0.4375rem; margin: 0.1875rem 0 0.625rem; padding: 0.6875rem 0.75rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--panel); }
.top-collections:empty { display: none; }
.top-collection { min-width: 0; display: flex; align-items: center; gap: 0.5rem; color: #625e54; font-size: 0.625rem; }
.top-collection-thumb { width: 2.25rem; height: 2.25rem; flex: 0 0 2.25rem; object-fit: cover; border-radius: 0.625rem; background: var(--panel-soft); }
.top-collection-info { min-width: 0; display: flex; flex-direction: column; gap: 0.1875rem; }
.top-collection strong { overflow: hidden; font-size: 0.625rem; text-overflow: ellipsis; white-space: nowrap; }
.top-collection .sales-bar { height: 0.3125rem; overflow: hidden; border-radius: 0.3125rem; background: #e9e5db; }
.top-collection .sales-bar i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.top-collection span { color: var(--muted); white-space: nowrap; }
.market-tag { color: var(--orange); font-size: 0.5rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.deal-card { cursor: pointer; }
.deal-card .deal-meta { display: flex; flex-wrap: wrap; gap: 0.3125rem; margin-top: 0.5rem; }
.meta-pill { color: #777264; border: 1px solid var(--line); border-radius: 0.4375rem; padding: 0.25rem 0.375rem; font-size: 0.5rem; }
.profit-positive { color: #168b58; }
.profit-negative { color: var(--red); }
.filter-panel { margin: 0.375rem 0 0.5rem; padding: 0.6875rem; border: 1px solid var(--line); border-radius: 0.9375rem; background: var(--panel); }
.filter-panel[hidden] { display: none; }
.filter-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.5625rem; }
.filter-grid label { min-width: 0; color: var(--muted); font-size: 0.5625rem; }
.filter-grid input, .filter-grid select { display: block; width: 100%; height: 2.125rem; margin-top: 0.25rem; border: 1px solid var(--line); border-radius: 0.5625rem; background: #fffefa; color: var(--text); padding: 0 0.5rem; outline: 0; font-size: 0.625rem; }
.filter-grid input:focus, .filter-grid select:focus { border-color: #e7a17e; }
.filter-actions { display: flex; justify-content: space-between; align-items: center; gap: 0.375rem; margin-top: 0.5625rem; color: var(--dim); font-size: 0.5625rem; }
.text-button { border: 0; background: none; color: var(--orange); cursor: pointer; padding: 0.1875rem; font-size: 0.625rem; }
.quick-filters { padding-bottom: 0.5625rem; }
.empty-state { text-align: center; border: 1px solid var(--line); border-radius: 1.0625rem; background: var(--panel); padding: 1.4375rem 1rem; color: var(--muted); font-size: 0.6875rem; line-height: 1.55; }
.empty-icon { width: 2.375rem; height: 2.375rem; display: grid; place-items: center; margin: 0 auto 0.625rem; border-radius: 0.8125rem; background: var(--orange-soft); color: var(--orange); font-size: 1.1875rem; }
.empty-state strong { display: block; margin-bottom: 0.3125rem; color: var(--text); font-size: 0.8125rem; }
.dim { color: var(--muted); }
.sales-period { margin: 0.125rem 0.125rem 0.5rem; }
.sales-summary { display: flex; gap: 0.5rem; margin-bottom: 0.625rem; }
.sales-source { flex: 1; min-width: 0; padding: 0.625rem 0.6875rem; border: 1px solid var(--line); border-radius: 0.9375rem; background: var(--panel); }
.sales-source strong { display: block; font-size: 0.625rem; }
.sales-source span { display: block; overflow: hidden; margin-top: 0.3125rem; color: var(--muted); font-size: 0.5625rem; text-overflow: ellipsis; white-space: nowrap; }
.sales-source .sales-bar { height: 0.25rem; overflow: hidden; margin-top: 0.4375rem; border-radius: 0.25rem; background: #e9e5db; }
.sales-source .sales-bar i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.feed-quick-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0.4375rem; margin: 0.4375rem 0 0.1875rem; }
.feed-quick-filters select, .feed-quick-filters input { min-width: 0; height: 2.125rem; border: 1px solid var(--line); border-radius: 0.625rem; background: var(--panel); color: var(--text); padding: 0 0.5rem; font: inherit; font-size: 0.5625rem; }
.feed-currency-note { margin: 0.25rem 0.125rem 0.5rem; font-size: 0.5625rem; }
.feed-signal-tags { display: flex; flex-wrap: wrap; gap: 0.3125rem; margin: 0.4375rem 0; }
.feed-signal-tag, .feed-quality-tag { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 62.4375rem; background: var(--panel-soft); color: var(--muted); padding: 0.25rem 0.4375rem; font-size: 0.5rem; line-height: 1.2; }
.feed-signal-tag.strong { border-color: rgba(52,145,119,.28); background: rgba(52,145,119,.1); color: #26785f; }
.feed-quality-tag { color: var(--orange); }
.feed-card-estimate { margin-top: 0.4375rem; color: var(--muted); font-size: 0.5625rem; line-height: 1.45; }
.feed-deal-card { cursor: pointer; }
.deal-economics { margin-top: 0.5625rem; padding: 0.5625rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--panel-soft); }
.deal-economics-heading { margin-bottom: 0.4375rem; color: var(--text); font-size: 0.625rem; font-weight: 760; }
.deal-economics-grid, .deal-economics-results { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.375rem; }
.deal-economics-grid > div { min-width: 0; display: flex; flex-direction: column; gap: 0.1875rem; }
.deal-economics-grid span { color: var(--muted); font-size: 0.5rem; line-height: 1.25; }
.deal-economics-grid strong { overflow-wrap: anywhere; color: var(--text); font-size: 0.625rem; line-height: 1.25; font-variant-numeric: tabular-nums; }
.deal-economics-results { margin-top: 0.4375rem; }
.deal-economics-result { min-width: 0; display: flex; flex-direction: column; gap: 0.1875rem; }
.deal-economics-result span { color: var(--muted); font-size: 0.5rem; line-height: 1.25; }
.deal-economics-result strong { overflow-wrap: anywhere; color: var(--text); font-size: 0.625rem; line-height: 1.25; font-variant-numeric: tabular-nums; }
.deal-economics-result.positive strong { color: var(--green); }
.deal-economics-result.negative strong { color: var(--red); }
.deal-economics-result.unavailable strong { color: var(--muted); font-size: 0.5625rem; }
.deal-economics-note { margin: 0.4375rem 0 0; color: var(--muted); font-size: 0.5rem; line-height: 1.4; }
.deal-market-link { display: inline-flex; min-height: 2rem; align-items: center; justify-content: center; flex: 0 0 auto; padding: 0.375rem 0.5625rem; border: 1px solid var(--line); border-radius: 0.625rem; background: var(--panel-soft); color: var(--orange); font-size: 0.5625rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.deal-market-link:active { filter: brightness(1.15); }
.deal-market-unavailable { color: var(--muted); font-size: 0.5rem; text-align: right; }
@media (max-width: 440px) { .feed-quick-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.sale-card { display: flex; align-items: center; gap: 0.5625rem; padding: 0.625rem; border-bottom: 1px solid var(--line); background: var(--panel); }
.sale-card:last-child { border-bottom: 0; }
.sale-info { min-width: 0; flex: 1; }
.sale-title { overflow: hidden; font-size: 0.75rem; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.sale-subtitle { overflow: hidden; margin-top: 0.25rem; color: var(--muted); font-size: 0.5625rem; text-overflow: ellipsis; white-space: nowrap; }
.sale-price { flex: 0 0 auto; text-align: right; font-size: 0.6875rem; font-weight: 750; }
.sale-time { margin-top: 0.25rem; color: var(--muted); font-size: 0.5rem; }
.settings-card { margin-bottom: 0.625rem; padding: 0.8125rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--panel); }
.collection-add-description { margin: 0 0 0.6875rem; color: var(--muted); font-size: 0.6875rem; line-height: 1.45; }
.collection-add-form { display: grid; gap: 0.6875rem; margin-top: 0.75rem; }
.collection-add-form[hidden], .collection-add-card[hidden] { display: none; }
.collection-add-form label { display: grid; gap: 0.3125rem; color: var(--muted); font-size: 0.625rem; font-weight: 700; }
.collection-add-form input, .collection-add-form select { width: 100%; min-width: 0; height: 2.625rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--bg); color: var(--text); padding: 0 0.6875rem; font-size: 0.75rem; outline: 0; }
.collection-add-form input:focus, .collection-add-form select:focus { border-color: var(--orange); }
.collection-add-actions { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0.5rem; }
.collection-add-actions .primary-button { min-height: 2.625rem; }
.collection-add-cancel { min-height: 2.625rem; padding: 0 0.875rem; border: 1px solid var(--line); border-radius: 0.875rem; background: var(--panel-soft); color: var(--text); font-size: 0.6875rem; font-weight: 700; cursor: pointer; }
.collection-add-feedback { min-height: 0; margin: 0.5rem 0 0; color: var(--green); font-size: 0.625rem; line-height: 1.4; }
.collection-add-feedback:empty { display: none; }
.collection-add-feedback.error { color: var(--red); }
.source-row { display: flex; align-items: center; justify-content: space-between; gap: 0.625rem; padding: 0.625rem 0; border-bottom: 1px solid var(--line); color: #6f6b60; font-size: 0.6875rem; }
.source-row:last-child { border-bottom: 0; padding-bottom: 0; }
.source-row strong { color: var(--text); font-size: 0.625rem; }
.settings-note p:not(.eyebrow) { margin: 0.625rem 0 0.25rem; font-size: 0.6875rem; }
.settings-note small { color: var(--muted); font-size: 0.5625rem; line-height: 1.4; }
.bottom-nav { position: fixed; z-index: 5; left: 50%; bottom: calc(0.4375rem + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 1.25rem), 41.25rem); display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 0.1875rem; padding: 0.4375rem; border: 1px solid #e9e2d5; border-radius: 1.375rem; background: rgba(255,253,248,.97); box-shadow: 0 0.5rem 1.5rem rgba(75,62,37,.19); backdrop-filter: blur(1rem); }
.nav-item { min-width: 0; min-height: 3.125rem; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 0.1875rem; border: 0; border-radius: 0.875rem; background: transparent; color: #8a8579; padding: 0.25rem 1px; font-size: 0.5rem; font-weight: 620; cursor: pointer; }
.nav-item.active { color: var(--orange); background: #f3eee2; }
.nav-icon { font-size: 1.1875rem; line-height: 1; }
.details-dialog { width: min(100%,43.75rem); max-width: 43.75rem; max-height: min(86dvh,50rem); margin: auto auto 0; border: 1px solid var(--line); border-bottom: 0; padding: 1rem; border-radius: 1.375rem 1.375rem 0 0; background: var(--panel); color: var(--text); box-shadow: 0 -0.9375rem 4.375rem rgba(50,42,28,.22); }
.details-dialog::backdrop { background: rgba(35,31,24,.4); backdrop-filter: blur(0.1875rem); }
.dialog-grabber { width: 2.375rem; height: 0.25rem; margin: -0.3125rem auto 0.9375rem; border-radius: 0.3125rem; background: #d8d2c6; }
.dialog-close { position: absolute; top: 0.6875rem; right: 0.8125rem; width: 1.875rem; height: 1.875rem; border: 0; border-radius: 50%; background: var(--panel-soft); color: var(--muted); font-size: 1.25rem; }
.detail-title { margin: 0 2.375rem 0.25rem 0; font-size: 1.1875rem; }
.detail-subtitle { margin: 0 0 0.9375rem; color: var(--muted); font-size: 0.6875rem; }
.detail-gift-hero { display: block; width: min(58vw, 13.125rem); aspect-ratio: 1; margin: 0 auto 0.9375rem; object-fit: cover; border: 1px solid var(--line); border-radius: 1.375rem; background: var(--panel-soft); box-shadow: 0 0.5rem 1.5rem rgba(65,55,38,.12); }
.detail-gift-hero.gift-placeholder { display: grid; place-items: center; font-size: 2.75rem; }
.detail-section { padding: 0.75rem 0; border-top: 1px solid var(--line); }
.detail-section h3 { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.5625rem; letter-spacing: .1em; text-transform: uppercase; }
.owner-lookup-button { width: 100%; min-height: 2.625rem; margin: 0.4375rem 0 0.125rem; border: 0; border-radius: 0.8125rem; background: #eee9dd; color: var(--ink); font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.owner-lookup-button:disabled { opacity: .62; cursor: wait; }
.market-detail { padding: 0.625rem 0 0.1875rem; border-top: 1px solid var(--line); }
.market-detail:first-child { border-top: 0; padding-top: 0; }
.market-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.625rem; margin-bottom: 0.375rem; font-size: 0.6875rem; }
.market-detail-head span { color: var(--muted); text-align: right; }
.market-detail-row { display: flex; justify-content: space-between; gap: 0.625rem; padding: 0.375rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.625rem; }
.market-detail-row > strong { flex: 0 0 auto; max-width: 42%; color: var(--ink); text-align: right; white-space: nowrap; }
.market-thumb { width: 2.625rem; height: 2.625rem; flex: 0 0 2.625rem; object-fit: cover; border-radius: 0.625rem; background: var(--panel-soft); }
.market-item { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.market-item strong, .market-item small { display: block; overflow-wrap: anywhere; }
.market-item strong { color: var(--ink); font-size: 0.625rem; }
.market-item small { margin-top: 0.1875rem; color: var(--muted); font-size: 0.5625rem; line-height: 1.35; }
.market-state { margin: 0.4375rem 0; padding: 0.5625rem 0.625rem; border-radius: 0.6875rem; background: #f3eee3; color: #716b5e; font-size: 0.625rem; line-height: 1.4; overflow-wrap: anywhere; }
.market-scope { margin: 0.3125rem 0; color: var(--muted); font-size: 0.5625rem; line-height: 1.4; overflow-wrap: anywhere; }
.owner-display-name { min-width: 0; max-width: 68%; overflow-wrap: anywhere; text-align: right; }
.market-subhead { margin: 0.5625rem 0 0.1875rem; color: var(--muted); font-size: 0.5rem; letter-spacing: .1em; }
.detail-row { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.3125rem 0; font-size: 0.6875rem; }
.detail-row span:first-child { color: var(--muted); }
.detail-link { display: inline-flex; margin: 0.3125rem 0.375rem 0.125rem 0; padding: 0.5625rem 0.6875rem; border-radius: 0.625rem; background: var(--orange-soft); color: #cf4819; text-decoration: none; font-size: 0.625rem; font-weight: 700; }
.chart { width: 100%; height: 5.625rem; margin-top: 0.1875rem; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 5.3125rem; max-width: calc(100% - 1.875rem); transform: translate(-50%,0.75rem); opacity: 0; pointer-events: none; border: 1px solid var(--line); border-radius: 0.75rem; background: #312e28; color: #fffdf8; padding: 0.625rem 0.875rem; font-size: 0.6875rem; text-align: center; transition: .18s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@media (min-width: 620px) { .heatmap { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 380px) { .map-tile { grid-template-columns: 1.25rem 2.25rem minmax(0,1fr) auto; gap: 0.375rem; padding: 0.5rem 0.4375rem; } .map-rank { width: 1.25rem; height: 1.25rem; } .map-thumb { width: 2.25rem; height: 2.25rem; } .map-side { min-width: 4.25rem; } .map-name { font-size: 0.6875rem; } }

/* Personalized deal feed and filter editor */
.feed-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0.125rem 0.125rem 0.5rem; color: var(--muted); font-size: 0.5625rem; }
.feed-meta span:first-child { color: #696558; font-weight: 700; }
.feed-tools { margin-bottom: 0.3125rem; }
.filter-toggle { position: relative; }
.filter-count { position: absolute; top: -0.3125rem; right: -0.25rem; min-width: 1.0625rem; height: 1.0625rem; display: grid; place-items: center; border: 0.125rem solid var(--bg); border-radius: 50%; background: var(--orange); color: #fff; font-size: 0.5rem; font-weight: 800; }
.saved-filters { display: flex; flex-direction: column; gap: 0.3125rem; margin: 0 0 0.5625rem; }
.saved-filter { min-width: 0; display: flex; align-items: center; gap: 0.4375rem; padding: 0.3125rem 0.4375rem 0.3125rem 0.625rem; border: 1px solid var(--line); border-radius: 0.8125rem; background: var(--panel); }
.saved-filter.paused { opacity: .65; }
.saved-filter-state { color: var(--green); font-size: 0.5625rem; }
.saved-filter.paused .saved-filter-state { color: var(--muted); }
.saved-filter-name { min-width: 0; flex: 1; overflow: hidden; font-size: 0.625rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.saved-filter-action { width: 1.8125rem; height: 1.8125rem; flex: 0 0 1.8125rem; border: 0; border-radius: 0.5625rem; background: var(--panel-soft); color: #706b60; font-size: 0.8125rem; cursor: pointer; }
.saved-filter-action.delete { color: #ae554a; font-size: 1.125rem; }
.feed-empty { padding: 1.625rem 1.0625rem 1.3125rem; }
.feed-presets { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.375rem; margin: 0.8125rem 0; }
.feed-presets .chip { flex: 0 0 auto; border: 1px solid #ded7c8; background: #fffdf8; }
.primary-button { width: 100%; min-height: 2.75rem; border: 0; border-radius: 0.875rem; background: var(--orange); color: #fff; font-size: 0.75rem; font-weight: 760; cursor: pointer; }
.primary-button:disabled { opacity: .62; cursor: wait; }
.feed-empty .primary-button { margin-top: 0.125rem; }
.matched-filter-tags { display: flex; flex-wrap: wrap; gap: 0.3125rem; margin: 0.5rem 0 0.125rem 3.375rem; }
.matched-filter-tag { padding: 0.25rem 0.4375rem; border-radius: 0.4375rem; background: #f2e4c5; color: #927014; font-size: 0.5rem; font-weight: 750; }
.feed-match-reasons { display: flex; flex-direction: column; gap: 0.1875rem; margin: 0.4375rem 0 0 3.375rem; color: #777264; font-size: 0.5625rem; line-height: 1.35; }
.feed-match-reasons span::before { content: "• "; color: #bd9416; }
.sales-history-panel { margin-top: 0.6875rem; padding: 0 0.625rem 0.625rem; border: 1px solid var(--line); border-radius: 0.9375rem; background: var(--panel); }
.sales-history-panel > summary { padding: 0.75rem 1px; color: #777264; font-size: 0.625rem; font-weight: 720; cursor: pointer; }
.sales-history-panel[open] > summary { margin-bottom: 0.1875rem; border-bottom: 1px solid var(--line); }
.sales-history-panel .search-wrap { margin-top: 0.4375rem; }
.feed-filter-dialog { position: fixed; inset: auto 0 0; width: min(100%, 43.75rem); max-width: 43.75rem; max-height: min(92dvh, 53.75rem); margin: auto auto 0; padding: 0.625rem 1rem 0; overflow: hidden; border: 1px solid var(--line); border-bottom: 0; border-radius: 1.4375rem 1.4375rem 0 0; background: var(--bg); color: var(--text); box-shadow: 0 -1rem 4.375rem rgba(50,42,28,.24); }
.feed-filter-dialog[open] { display: flex; flex-direction: column; }
.feed-filter-dialog::backdrop { background: rgba(35,31,24,.43); backdrop-filter: blur(0.1875rem); }
.feed-filter-dialog .dialog-grabber { flex: 0 0 auto; margin-bottom: 0.625rem; }
.filter-editor-heading { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 0.625rem; padding: 0.125rem 0.1875rem 0.6875rem; border-bottom: 1px solid var(--line); }
.filter-editor-heading h2 { margin: 0.1875rem 2.375rem 0 0; font-size: 1.25rem; letter-spacing: -.04em; }
.filter-editor-heading .dialog-close { top: 1.5rem; right: 1rem; }
.filter-editor-body { min-height: 0; flex: 1; overflow: auto; padding: 0.625rem 0.125rem calc(0.875rem + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.filter-name-label, .filter-number-grid label { display: block; min-width: 0; color: var(--muted); font-size: 0.5625rem; line-height: 1.35; }
.filter-name-label input, .filter-number-grid input, .filter-option-search { width: 100%; height: 2.4375rem; margin-top: 0.3125rem; padding: 0 0.625rem; border: 1px solid var(--line); border-radius: 0.75rem; outline: 0; background: var(--panel); color: var(--text); font-size: 0.75rem; }
.filter-name-label input:focus, .filter-number-grid input:focus, .filter-option-search:focus { border-color: #e7a17e; }
.filter-section { padding: 0.8125rem 0; border-bottom: 1px solid #e8e2d6; }
.filter-section h3 { margin: 0 0 0.5rem; color: #817b6e; font-size: 0.5rem; font-weight: 800; letter-spacing: .13em; }
.filter-hint { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.5625rem; line-height: 1.4; }
.filter-chip-group { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.filter-choice { min-height: 2.125rem; padding: 0.4375rem 0.6875rem; border: 1px solid var(--line); border-radius: 0.6875rem; background: #f1ede4; color: #686458; font-size: 0.625rem; font-weight: 650; cursor: pointer; }
.filter-choice.selected { border-color: #27251f; background: #27251f; color: #fffdf8; }
.currency-filter-block { margin: 0.5rem 0 0; padding: 0.5625rem; border: 1px solid var(--line); border-radius: 0.8125rem; background: rgba(255,253,248,.58); }
.currency-filter-block[hidden] { display: none; }
.currency-filter-title { margin: 0 0 0.375rem; color: #777264; font-size: 0.5625rem; font-weight: 750; }
.filter-number-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0.4375rem; }
.filter-number-grid input { height: 2.3125rem; margin-top: 0.25rem; }
.filter-number-extra { margin-top: 0.5625rem; }
.filter-option-search { margin: 0 0 0.4375rem; }
.filter-option-list { max-height: 8.25rem; overflow: auto; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0.3125rem; padding: 1px 1px 0.25rem; scrollbar-color: #c6bfae transparent; scrollbar-width: thin; }
.filter-option-chip { max-width: 100%; overflow: hidden; padding: 0.4375rem 0.5625rem; border: 1px solid var(--line); border-radius: 0.625rem; background: #f4f0e7; color: #696558; font-size: 0.5625rem; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.filter-option-chip.selected { border-color: #d8b36a; background: #f2e4c5; color: #6e5310; }
.filter-options-empty { padding: 0.3125rem; color: var(--muted); font-size: 0.5625rem; }
.filter-accordion { margin-top: 0.4375rem; padding: 0.5625rem; border: 1px solid var(--line); border-radius: 0.75rem; background: rgba(255,253,248,.64); }
.filter-accordion > summary { color: #6e695e; font-size: 0.625rem; font-weight: 700; cursor: pointer; }
.filter-accordion[open] > summary { margin-bottom: 0.5rem; }
.filter-editor-footer { flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.4375rem; padding: 0.5625rem 0 calc(0.625rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.filter-editor-footer > span { min-height: 0.75rem; color: #a24e42; font-size: 0.5625rem; }
.filter-dm-switch-row { position: relative; display: flex; align-items: center; gap: 0.875rem; margin: 0.8125rem 0 0.125rem; padding: 0.6875rem 0.3125rem; color: var(--text); cursor: pointer; }
.filter-dm-switch-row > span:first-child { min-width: 0; flex: 1; }
.filter-dm-switch-row strong { display: block; font-size: 0.6875rem; font-weight: 650; }
.filter-dm-switch-row small { display: block; margin-top: 0.25rem; color: var(--muted); font-size: 0.5625rem; line-height: 1.35; }
.filter-dm-switch-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.filter-dm-switch { position: relative; width: 3rem; height: 1.75rem; flex: 0 0 3rem; border-radius: 1.25rem; background: #d7d3ca; transition: background .16s; }
.filter-dm-switch::after { content: ""; position: absolute; top: 0.1875rem; left: 0.1875rem; width: 1.375rem; height: 1.375rem; border-radius: 50%; background: white; box-shadow: 0 1px 0.1875rem #0002; transition: transform .16s; }
.filter-dm-switch-row input:checked + .filter-dm-switch { background: #199b62; }
.filter-dm-switch-row input:checked + .filter-dm-switch::after { transform: translateX(1.25rem); }
.filter-dm-switch-row input:focus-visible + .filter-dm-switch { outline: 0.125rem solid var(--orange); outline-offset: 0.125rem; }
@media (max-width: 390px) { .filter-number-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .filter-number-extra label:last-child { grid-column: 1 / -1; } .feed-filter-dialog { padding-left: 0.75rem; padding-right: 0.75rem; } }

/* Dark market terminal skin */
html, body { background: var(--bg); color: var(--text); }
body { background-image: radial-gradient(ellipse at 50% -18%, rgba(36,112,119,.20), transparent 48%); }
.app-shell { width: min(100%, 1440px); }
.page-title h2 { letter-spacing: -.045em; }
.brand-icon { border: 1px solid rgba(54,214,194,.36); background: linear-gradient(145deg,#173c42,#142532); color: #56e2d1; box-shadow: inset 0 1px rgba(255,255,255,.08), 0 0.3125rem 1.25rem rgba(28,190,177,.11); font-size: 1.25rem; }
.date-chip, .icon-button, .search-wrap, .filter-toggle, .upgrade-counter, .stack,
.top-collections, .filter-panel, .empty-state, .sales-source, .settings-card,
.saved-filter, .sales-history-panel, .feed-filter-dialog, .details-dialog { border-color: var(--line); background-color: var(--panel); color: var(--text); }
.date-chip { color: var(--muted); }
.icon-button { color: var(--orange); }
.counter-label, .source-row, .top-collection { color: var(--muted); }
.counter-label i { background: #e7bb55; }
.counter-caption, .activity-meta > span:last-child, .eyebrow, .inline-note { color: var(--muted); }
.live-pill.unavailable { color: #efbd62; }
.search-wrap input::placeholder, .filter-grid input::placeholder { color: #708192; }
.stack { box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,.13); }
.event-card, .deal-card, .sale-card { border-color: rgba(111,137,158,.17); }
.event-card:active, .deal-card:active, .map-tile:active { filter: brightness(1.12); }
.gift-thumb, .map-thumb, .top-collection-thumb, .market-thumb { background: #1b2936; }
.gift-placeholder, .map-placeholder { color: #92a8b7; }
.event-badge { color: #ff8991; }
.trait-chip, .meta-pill { color: #b2c0cb; background: #1a2632; border-color: #2b3b4b; }
.trait-chip small { color: var(--muted); }
.load-more-button, .text-button { color: var(--orange); }
.segmented { background: #0e151e; border: 1px solid var(--line); }
.segmented button { color: var(--muted); }
.segmented button.selected { background: #22313e; color: var(--text); box-shadow: inset 0 0 0 1px #33495a; }
.chip { background: #17222d; color: var(--muted); }
.chip.selected { outline-color: #41616a; background: #1b3036; color: #c9fff5; box-shadow: inset 0 0 0 1px rgba(54,214,194,.15); }
.map-tile { box-shadow: 0 0.1875rem 0.75rem rgba(0,0,0,.12); }
.top-collection { color: var(--text); }
.top-collection .sales-bar, .sales-source .sales-bar { background: #263645; }
.market-tag { color: var(--orange); }
.profit-positive { color: var(--green); }
.profit-negative { color: var(--red); }
.filter-grid input, .filter-grid select, .filter-name-label input, .filter-number-grid input, .filter-option-search { border-color: #304151; background: #0d151e; color: var(--text); }
.filter-grid input:focus, .filter-grid select:focus, .filter-name-label input:focus, .filter-number-grid input:focus, .filter-option-search:focus { border-color: var(--orange); }
.filter-actions { color: var(--muted); }
.empty-icon { background: #173337; color: var(--orange); }
.sales-source span, .sale-subtitle, .sale-time, .source-row { color: var(--muted); }
.source-row { border-color: rgba(111,137,158,.18); }
.source-row strong { color: var(--text); }
.bottom-nav { border-color: #2b3947; background: rgba(15,23,32,.94); box-shadow: 0 0.625rem 2rem rgba(0,0,0,.42); }
.nav-item { color: #8495a4; }
.nav-item.active { color: #55e1d0; background: #193136; }
.details-dialog, .feed-filter-dialog { background: #111923; box-shadow: 0 -1.125rem 4.375rem rgba(0,0,0,.52); }
.details-dialog::backdrop, .feed-filter-dialog::backdrop { background: rgba(2,7,12,.68); }
.dialog-grabber { background: #40515e; }
.dialog-close { background: #1e2b37; color: #b0bfca; }
.detail-gift-hero { border-color: #344451; background: #17232e; box-shadow: 0 0.75rem 2.25rem rgba(0,0,0,.34); }
.detail-section, .market-detail, .market-detail-row, .filter-editor-heading, .filter-section { border-color: rgba(111,137,158,.20); }
.detail-section h3, .market-detail-head span, .market-detail-row, .market-subhead, .market-scope { color: var(--muted); }
.owner-lookup-button { background: #193337; color: #bffff6; }
.market-detail-row > strong, .market-item strong { color: var(--text); }
.market-state { background: #1a2732; color: #b2c0ca; }
.detail-link { background: #173638; color: #7ce7dc; }
.chart { overflow: visible; }
.feed-meta span:first-child, .sales-history-panel > summary, .currency-filter-title, .filter-accordion > summary { color: #b8c6d0; }
.saved-filter-action { background: #20303d; color: #b4c3ce; }
.saved-filter-action.delete { color: #ff8991; }
.feed-presets .chip { border: 1px solid #304151; background: #17222d; }
.primary-button { background: linear-gradient(135deg,#2fcbb8,#168d91); color: #061315; box-shadow: 0 0.375rem 1.25rem rgba(28,193,182,.18); }
.matched-filter-tag { background: #3c351d; color: #f0d276; }
.feed-match-reasons { color: #9cacb8; }
.feed-match-reasons span::before { color: #e8c45e; }
.filter-section h3 { color: #9eb0bd; }
.filter-choice, .filter-option-chip { border-color: #304151; background: #192531; color: #b0bec9; }
.filter-choice.selected { border-color: #4bd8c8; background: #1c4748; color: #ddfffb; }
.filter-option-chip.selected { border-color: #b89647; background: #3c351d; color: #f3db90; }
.currency-filter-block, .filter-accordion { border-color: #2d3e4b; background: #141e28; }
.filter-editor-footer { border-color: rgba(111,137,158,.22); background: #111923; }
.filter-editor-footer > span { color: #ff8991; }
.filter-dm-switch { background: #354654; }
.toast { border-color: #354654; background: #1c2b37; color: #eff8fa; }
button, input, select, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 0.125rem solid var(--orange); outline-offset: 0.125rem; }

/* Market feed cards and currency-separated heatmap */
.feed-market-panel { margin: 0.625rem 0 1rem; padding: 0.6875rem; border: 1px solid var(--line); border-radius: 1.0625rem; background: rgba(17,25,35,.72); }
.feed-market-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.625rem; margin-bottom: 0.5rem; }
.feed-market-heading .eyebrow { margin: 0 0 0.1875rem; color: #7f96a5; font-size: 0.5rem; letter-spacing: .08em; }
.feed-market-heading h3 { margin: 0; color: var(--text); font-size: 0.8125rem; letter-spacing: -.02em; }
.feed-market-count { flex: 0 0 auto; color: #5ee0d0; font-size: 0.625rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.feed-market-category { display: grid; grid-template-columns: 4.5rem minmax(0,1fr); align-items: center; gap: 0.5rem; margin: 0.5rem 0; color: var(--muted); font-size: 0.5625rem; font-weight: 650; }
.feed-market-category select { width: 100%; min-width: 0; height: 2.25rem; padding: 0 0.5625rem; border: 1px solid #304151; border-radius: 0.625rem; background: #121d28; color: var(--text); font: inherit; font-size: 0.625rem; font-weight: 700; }
.feed-market-note { margin: 0.3125rem 0.125rem 0.5rem; font-size: 0.5625rem; }
.feed-market-list { display: flex; flex-direction: column; gap: 0.4375rem; }
.market-row-card { width: 100%; min-width: 0; min-height: 5.6875rem; display: grid; grid-template-columns: 1.375rem 2.625rem minmax(0,1fr) minmax(4.75rem,auto); align-items: center; gap: 0.5rem; padding: 0.5625rem; border: 1px solid #2b3b4b; border-radius: 0.9375rem; background: linear-gradient(135deg,#131e29,#101821); color: var(--text); text-align: left; cursor: pointer; }
.market-row-card:active { filter: brightness(1.12); }
.market-row-rank { width: 1.375rem; height: 1.375rem; display: grid; place-items: center; border-radius: 0.5rem; background: #173538; color: #4ddbc9; font-size: 0.5625rem; font-weight: 800; }
.market-row-thumb { width: 2.625rem; height: 2.625rem; object-fit: cover; border-radius: 0.6875rem; background: #1b2936; }
.market-row-main { min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.market-row-name { overflow: hidden; color: #eef5f8; font-size: 0.6875rem; font-weight: 760; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.market-row-meta { overflow: hidden; color: #9aaebb; font-size: 0.5rem; text-overflow: ellipsis; white-space: nowrap; }
.market-row-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0.25rem; margin-top: 0.125rem; }
.market-row-stats span { min-width: 0; overflow-wrap: anywhere; color: #91a3b0; font-size: 0.4375rem; line-height: 1.2; }
.market-row-stats b { display: block; margin-top: 0.125rem; color: #dce7ec; font-size: 0.4375rem; font-weight: 700; }
.market-row-side { min-width: 0; max-width: 7rem; display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; text-align: right; }
.market-row-side strong { color: #4ddbc9; font-size: 0.625rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.market-row-side small { color: #92a3af; font-size: 0.4375rem; line-height: 1.2; }
.feed-market-more { margin-top: 0.1875rem; }
.feed-market-panel .empty-state { margin-top: 0.3125rem; }

.heatmap { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5625rem; }
.heatmap-market { min-width: 0; overflow: hidden; padding: 0.5rem; border: 1px solid #263846; border-radius: 1rem; background: rgba(14,21,30,.72); }
.heatmap-market-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin: 1px 0.125rem 0.4375rem; color: #dce8ee; font-size: 0.625rem; }
.heatmap-market-heading span { color: #8fa2af; font-size: 0.5rem; }
.heatmap-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); grid-auto-rows: 2.25rem; grid-auto-flow: dense; gap: 0.25rem; }
.map-tile { position: relative; min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.125rem; grid-column: span 1; grid-row: span 1; padding: 0.25rem; border: 1px solid #30404e; border-radius: 0.5rem; background: #17222d; color: var(--text); text-align: left; cursor: pointer; transition: filter .14s, border-color .14s, transform .14s; }
.map-tile.size-md { grid-column: span 2; grid-row: span 1; padding: 0.375rem; }
.map-tile.size-lg { grid-column: span 2; grid-row: span 2; padding: 0.4375rem; }
.map-tile.size-xl { grid-column: span 3; grid-row: span 2; padding: 0.5rem; }
.map-tile.trend-up { border-color: rgba(49,191,150,.54); background: linear-gradient(145deg,rgba(20,142,111,var(--heat-opacity,.12)),#15232d 92%); }
.map-tile.trend-down { border-color: rgba(235,82,91,.48); background: linear-gradient(145deg,rgba(193,53,64,var(--heat-opacity,.12)),#211c25 92%); }
.map-tile.trend-neutral { background: #17222d; }
.map-tile:hover { filter: brightness(1.12); }
.map-tile:active { transform: scale(.985); }
.map-tile-image { position: absolute; top: 0.3125rem; left: 0.3125rem; width: 1.1875rem; height: 1.1875rem; object-fit: cover; border-radius: 0.375rem; background: #1b2936; }
.map-tile-image.gift-placeholder { display: grid; place-items: center; font-size: 0.6875rem; }
.map-tile.size-sm .map-tile-image, .map-tile.size-md .map-tile-image { display: none; }
.map-tile-copy { min-width: 0; width: 100%; display: flex; flex-direction: column; gap: 0.125rem; margin-top: auto; }
.map-tile-label { display: -webkit-box; overflow: hidden; color: #eef4f7; font-size: 0.4375rem; font-weight: 760; line-height: 1.1; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.map-tile-value { overflow: hidden; color: #d0e0e7; font-size: 0.4375rem; font-weight: 740; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.map-tile.trend-up .map-tile-value { color: #70e3bc; }
.map-tile.trend-down .map-tile-value { color: #ff8b92; }
.map-tile-trend { display: none; overflow: hidden; color: #a8b6bf; font-size: 0.5rem; text-overflow: ellipsis; white-space: nowrap; }
.map-tile.size-lg .map-tile-label, .map-tile.size-xl .map-tile-label { font-size: 0.5625rem; }
.map-tile.size-lg .map-tile-value, .map-tile.size-xl .map-tile-value { font-size: 0.5625rem; }
.map-tile.size-lg .map-tile-trend, .map-tile.size-xl .map-tile-trend { display: block; }
.map-empty { grid-column: 1 / -1; }

@media (min-width: 400px) {
  .heatmap-grid { grid-template-columns: repeat(8,minmax(0,1fr)); grid-auto-rows: 2.5rem; }
  .market-row-card { grid-template-columns: 1.5rem 2.875rem minmax(0,1fr) minmax(5.375rem,auto); }
  .market-row-rank { width: 1.5rem; height: 1.5rem; }
  .market-row-thumb { width: 2.875rem; height: 2.875rem; }
  .market-row-name { font-size: 0.75rem; }
}
@media (min-width: 620px) {
  .heatmap-grid { grid-template-columns: repeat(12,minmax(0,1fr)); grid-auto-rows: 2.75rem; }
  .map-tile-label, .map-tile-value { font-size: 0.5rem; }
}
@media (max-width: 360px) {
  .feed-market-panel { padding: 0.5625rem 0.4375rem; }
  .market-row-card { grid-template-columns: 1.25rem 2.25rem minmax(0,1fr) 4.5rem; gap: 0.375rem; padding: 0.4375rem 0.375rem; }
  .market-row-rank { width: 1.25rem; height: 1.25rem; }
  .market-row-thumb { width: 2.25rem; height: 2.25rem; }
  .market-row-side strong { font-size: 0.5625rem; }
  .map-tile.size-xl { grid-column: span 2; }
}

/* Clear owner links, market metrics, saved filter summaries and home digest */
.event-card { display: block; cursor: pointer; }
.event-card:focus-visible { outline: 0.125rem solid var(--orange); outline-offset: -0.125rem; }
.owner-link { color: #71e5d7; font-weight: 740; text-decoration: none; }
.owner-link:active, .owner-link:hover { color: #b7fff4; text-decoration: underline; }
.overview-card { margin: 0.125rem 0 0.6875rem; padding: 0.6875rem; border: 1px solid var(--line); border-radius: 1rem; background: linear-gradient(145deg,rgba(23,36,48,.98),rgba(17,26,36,.98)); box-shadow: 0 0.5rem 1.375rem rgba(0,0,0,.16); }
.overview-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.5625rem; margin-bottom: 0.5625rem; }
.overview-heading .eyebrow { margin-bottom: 0.1875rem; }
.overview-heading strong { display: block; font-size: 0.75rem; }
.overview-heading > span { color: var(--muted); font-size: 0.5625rem; text-align: right; }
.overview-sources { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0.3125rem; }
.overview-source { min-width: 0; display: grid; grid-template-columns: 0.4375rem minmax(0,1fr); align-items: center; column-gap: 0.3125rem; row-gap: 0.1875rem; padding: 0.4375rem; border: 1px solid rgba(111,137,158,.17); border-radius: 0.625rem; background: rgba(8,14,21,.38); }
.overview-source i { width: 0.375rem; height: 0.375rem; grid-row: span 2; border-radius: 50%; background: #8092a1; }
.overview-source > span { min-width: 0; overflow: hidden; color: #b9c7d0; font-size: 0.5rem; text-overflow: ellipsis; white-space: nowrap; }
.overview-source strong { min-width: 0; overflow: hidden; color: #91a2b1; font-size: 0.5rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.overview-source.ready i { background: var(--green); box-shadow: 0 0 0.5rem rgba(69,211,155,.5); }
.overview-source.ready strong { color: #75e0b2; }
.overview-source.partial i { background: #e9bd61; }
.overview-source.partial strong { color: #e9c979; }
.overview-source.offline i { background: #ff7783; }
.overview-source.offline strong { color: #ff9ba3; }
.overview-highlights { margin-top: 0.5625rem; padding-top: 0.5rem; border-top: 1px solid rgba(111,137,158,.17); }
.overview-highlights-heading { display: flex; justify-content: space-between; gap: 0.5rem; color: #dbe5ea; font-size: 0.5625rem; font-weight: 700; }
.overview-highlights-heading span:last-child { color: var(--muted); font-size: 0.5rem; font-weight: 500; }
.overview-highlight-list { display: flex; flex-direction: column; gap: 0.3125rem; margin-top: 0.4375rem; }
.overview-highlight { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 0.5rem; font-size: 0.5625rem; }
.overview-highlight-name { min-width: 0; overflow: hidden; color: #c4d1d9; text-overflow: ellipsis; white-space: nowrap; }
.overview-highlight strong { color: #79e3b7; font-size: 0.5625rem; white-space: nowrap; }
.overview-highlight > span:last-child { color: var(--muted); white-space: nowrap; }
.overview-empty { margin: 0.375rem 0 0; color: var(--muted); font-size: 0.5625rem; line-height: 1.4; }
.market-metric-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0.4375rem; margin: 0.5625rem 0; }
.market-metric { min-width: 0; display: flex; flex-direction: column; gap: 0.25rem; padding: 0.5625rem; border: 1px solid rgba(111,137,158,.18); border-radius: 0.75rem; background: #141f2a; }
.market-metric > span { color: var(--muted); font-size: 0.5625rem; }
.market-metric > strong { min-width: 0; color: var(--text); font-size: 0.6875rem; line-height: 1.35; overflow-wrap: anywhere; }
.market-metric > small { color: #8193a1; font-size: 0.5rem; line-height: 1.35; }
.sales-metric { border-top: 0.125rem solid #50c996; }
.median-metric { border-top: 0.125rem solid #63a8ff; }
.listings-metric { border-top: 0.125rem solid #b38bff; }
.floor-metric { border-top: 0.125rem solid #e9bd61; }
.saved-filter { align-items: flex-start; gap: 0.5rem; padding: 0.5rem; }
.saved-filter-main { min-width: 0; flex: 1; }
.saved-filter-title-line { min-width: 0; display: flex; align-items: center; gap: 0.375rem; }
.saved-filter-state { flex: 0 0 auto; }
.saved-filter-name { font-size: 0.625rem; }
.saved-filter-conditions { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0.375rem 0 0 0.9375rem; }
.saved-filter-condition, .saved-filter-more { max-width: 100%; overflow: hidden; padding: 0.1875rem 0.375rem; border-radius: 0.4375rem; background: #1a2935; color: #aebfca; font-size: 0.5rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.saved-filter-more { color: #71e5d7; background: #193337; }
.saved-filter-actions { flex: 0 0 auto; display: flex; gap: 0.1875rem; }
.saved-filter-action { width: 1.6875rem; height: 1.6875rem; flex-basis: 1.6875rem; }
.saved-filter.paused .saved-filter-condition { opacity: .7; }
@media (max-width: 370px) {
  .overview-card { padding: 0.5625rem; }
  .overview-source { padding: 0.375rem 0.25rem; column-gap: 0.1875rem; }
  .overview-source > span, .overview-source strong { font-size: 0.4375rem; }
  .overview-highlight { grid-template-columns: minmax(0,1fr) auto; }
  .overview-highlight > span:last-child { display: none; }
  .saved-filter-actions { gap: 1px; }
  .saved-filter-action { width: 1.5rem; flex-basis: 1.5rem; }
}

/* Collection market treemap */
#map-periods, #map-scopes { gap: 0.25rem; padding: 0.4375rem 0 1px; }
#map-periods .chip, #map-scopes .chip { min-width: 0; flex: 1 1 0; padding: 0.5rem 0.3125rem; text-align: center; font-size: 0.5625rem; }
#map-periods .chip.selected, #map-scopes .chip.selected { outline-color: rgba(54,214,194,.6); background: #15333a; color: #80f0de; }
#map-note { margin: 0.4375rem 0.125rem 0.5rem; color: #91a2b1; font-size: 0.5625rem; line-height: 1.45; }
.heatmap { display: flex; flex-direction: column; gap: 0.625rem; margin-top: 0.5rem; }
.heatmap-market { min-width: 0; overflow: hidden; padding: 0.4375rem; border: 1px solid #263846; border-radius: 0.8125rem; background: rgba(13,20,29,.8); }
.heatmap-market-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin: 1px 0.125rem 0.4375rem; color: #dce8ee; font-size: 0.625rem; }
.heatmap-market-heading span { color: #8fa2af; font-size: 0.5rem; }
.heatmap-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); grid-auto-rows: 3.625rem; grid-auto-flow: dense; gap: 0.1875rem; }
.map-tile { position: relative; min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0.125rem; grid-column: span 1; grid-row: span 1; padding: 0.25rem; border: 1px solid rgba(155,181,193,.19); border-radius: 0.375rem; background: #17222d; color: #f4f8fa; text-align: center; cursor: pointer; transition: filter .14s, border-color .14s, transform .14s; }
.map-tile.size-md { grid-column: span 2; grid-row: span 2; padding: 0.375rem; }
.map-tile.size-lg { grid-column: span 2; grid-row: span 3; padding: 0.4375rem; }
.map-tile.size-xl { grid-column: span 2; grid-row: span 4; padding: 0.5rem; }
.map-tile.trend-up { border-color: rgba(103,255,177,.43); background: linear-gradient(145deg,rgba(17,193,83,var(--heat-opacity,.2)),rgba(4,111,57,.97)); }
.map-tile.trend-down { border-color: rgba(255,137,144,.48); background: linear-gradient(145deg,rgba(242,57,64,var(--heat-opacity,.2)),rgba(157,31,42,.97)); }
.map-tile.trend-neutral { border-color: #30404e; background: linear-gradient(145deg,#1c2a36,#141d27); }
.map-tile:hover { filter: brightness(1.1); }
.map-tile:active { transform: scale(.985); }
.map-tile-image { position: absolute; top: 0.25rem; left: 50%; width: 1.125rem; height: 1.125rem; object-fit: cover; border-radius: 0.375rem; background: #1b2936; transform: translateX(-50%); }
.map-tile-image.gift-placeholder { display: grid; place-items: center; font-size: 0.6875rem; }
.map-tile.size-sm .map-tile-image { top: 0.1875rem; width: 1rem; height: 1rem; }
.map-tile.size-md .map-tile-image { top: 0.375rem; width: 1.625rem; height: 1.625rem; }
.map-tile.size-lg .map-tile-image { top: 0.5rem; width: 2.125rem; height: 2.125rem; border-radius: 0.5625rem; }
.map-tile.size-xl .map-tile-image { top: 0.75rem; width: 2.875rem; height: 2.875rem; border-radius: 0.75rem; }
.map-tile-copy { min-width: 0; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0.125rem; margin-top: auto; }
.map-tile-label { display: -webkit-box; width: 100%; overflow: hidden; color: #f6fbfd; font-size: 0.4375rem; font-weight: 800; line-height: 1.12; overflow-wrap: anywhere; text-shadow: 0 1px 0.1875rem rgba(0,0,0,.45); -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.map-tile.size-sm .map-tile-label { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-tile-value { display: block; max-width: 100%; overflow: hidden; color: #fff; font-size: 0.4375rem; font-weight: 820; line-height: 1.12; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 0.1875rem rgba(0,0,0,.4); }
.map-tile.trend-up .map-tile-value { color: #d8ffec; }
.map-tile.trend-down .map-tile-value { color: #ffe4e6; }
.map-tile-trend { max-width: 100%; overflow: hidden; color: #fff; font-size: 0.4375rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 0.1875rem rgba(0,0,0,.5); }
.map-tile-trend.no-change, .map-tile-size-note, .map-tile-active { display: none; }
.map-tile.size-md .map-tile-label, .map-tile.size-md .map-tile-value, .map-tile.size-md .map-tile-trend { font-size: 0.5rem; }
.map-tile.size-lg .map-tile-label, .map-tile.size-xl .map-tile-label { font-size: 0.625rem; }
.map-tile.size-lg .map-tile-value, .map-tile.size-xl .map-tile-value, .map-tile.size-lg .map-tile-trend, .map-tile.size-xl .map-tile-trend { font-size: 0.5625rem; }
.map-tile.size-lg .map-tile-copy, .map-tile.size-xl .map-tile-copy { gap: 0.25rem; }
.map-more { margin: 0.125rem 0 0.5rem; border: 1px solid #2e4655; border-radius: 0.75rem; background: #121d27; color: #65dfcf; }
.map-loading { min-height: 11.875rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--panel); color: var(--muted); font-size: 0.625rem; text-align: center; }
.map-loading strong { color: var(--text); font-size: 0.75rem; }
.map-loading-mark { color: #4edcc9; font-size: 1.875rem; animation: mapPulse 1s ease-in-out infinite alternate; }
@keyframes mapPulse { to { opacity: .45; transform: scale(.9); } }
.map-empty { grid-column: 1 / -1; }
@media (min-width: 400px) {
  .heatmap-grid { grid-template-columns: repeat(6,minmax(0,1fr)); grid-auto-rows: 3.625rem; }
  .map-tile.size-lg { grid-column: span 3; grid-row: span 3; }
  .map-tile.size-xl { grid-column: span 3; grid-row: span 4; }
  .map-tile.size-md { grid-column: span 2; grid-row: span 2; }
}
@media (min-width: 620px) {
  .heatmap-grid { grid-template-columns: repeat(8,minmax(0,1fr)); grid-auto-rows: 3.875rem; }
  .map-tile.size-lg { grid-column: span 3; grid-row: span 3; }
  .map-tile.size-xl { grid-column: span 4; grid-row: span 4; }
}
@media (min-width: 900px) {
  .heatmap-grid { grid-template-columns: repeat(12,minmax(0,1fr)); grid-auto-rows: 4.125rem; }
  .map-tile.size-lg { grid-column: span 3; grid-row: span 3; }
  .map-tile.size-xl { grid-column: span 4; grid-row: span 4; }
}
@media (max-width: 350px) {
  #map-periods .chip, #map-scopes .chip { padding-right: 0.1875rem; padding-left: 0.1875rem; font-size: 0.5rem; }
  .heatmap-market { padding: 0.3125rem; }
  .heatmap-grid { grid-auto-rows: 3.375rem; }
  .map-tile { padding: 0.1875rem; }
}

/* Larger collection artwork remains legible on narrow and wide screens. */
.heatmap-grid { grid-auto-rows: 5.25rem; gap: 0.3125rem; }
.map-tile { justify-content: center; border-radius: 0.625rem; padding: 0.3125rem; }
.map-tile.trend-neutral { background: linear-gradient(145deg,#233c4d,#162633); border-color: #375362; }
.map-tile-image, .map-tile.size-sm .map-tile-image, .map-tile.size-md .map-tile-image,
.map-tile.size-lg .map-tile-image, .map-tile.size-xl .map-tile-image {
  position: static; display: block; flex: 0 0 auto; width: 2.125rem; height: 2.125rem;
  margin: auto auto 0.1875rem; border-radius: 0.5625rem; transform: none; object-fit: cover;
}
.map-tile-image.gift-placeholder { display: grid; place-items: center; color: #b5d9e2; font-size: 1.25rem; }
.map-tile.size-lg .map-tile-image { width: 3.25rem; height: 3.25rem; }
.map-tile.size-xl .map-tile-image { width: 4.25rem; height: 4.25rem; }
.map-tile-copy { margin: 0 0 auto; }
.map-tile-label, .map-tile.size-sm .map-tile-label { font-size: 0.5625rem; line-height: 1.15; }
.map-tile-value, .map-tile-trend { font-size: 0.5rem; }
.map-tile.size-md .map-tile-label { font-size: 0.6875rem; }
.map-tile.size-lg .map-tile-label, .map-tile.size-xl .map-tile-label { font-size: 0.8125rem; }
@media (min-width: 400px) { .heatmap-grid { grid-auto-rows: 5.625rem; } }
@media (min-width: 620px) { .heatmap-grid { grid-auto-rows: 5.875rem; } }

/* Direction colours remain distinct from missing market history. */
.map-tile.trend-up { background: #16834d; border-color: #54d894; }
.map-tile.trend-down { background: #b4323e; border-color: #ef7a82; }
.map-tile.trend-neutral { background: #293744; border-color: #526574; }
.map-tile-trend, .map-tile-trend.no-change { display: block; }
.map-tile-trend.no-change { color: #c4d0d8; font-weight: 600; }
.map-tile.trend-up { background: #12844a; border-color: #6adf9c; }
.map-tile.trend-down { background: #bb303b; border-color: #ff8b91; }
.map-tile.trend-neutral { background: #263441; border-color: #536777; }
.owner-copy-button { margin: 0.4375rem 0; padding: 0.5rem 0.75rem; border: 1px solid #39887f; border-radius: 0.5625rem; background: #173b3b; color: #bffff6; font: inherit; font-weight: 700; cursor: pointer; }
.map-tile-floor { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.5rem; color: #dce9ed; }

/* Match the fixed navigation and modal controls to the growing content. */
.bottom-nav {
  width: min(calc(100% - 1.25rem), 80rem, 1400px);
  padding: 0.5rem;
  bottom: calc(0.5rem + env(safe-area-inset-bottom));
}
.nav-item { min-height: 3.25rem; font-size: 0.625rem; line-height: 1.3; }
.nav-icon { font-size: 1.375rem; }
.date-chip, .icon-button { height: 2.75rem; }
.icon-button { width: 2.75rem; }
.filter-toggle { width: 2.75rem; height: 2.75rem; flex-basis: 2.75rem; }
.dialog-close { width: 2.75rem; height: 2.75rem; cursor: pointer; }
.detail-title { margin-right: 3.25rem; }
.details-dialog, .feed-filter-dialog { width: min(100%, 54rem); max-width: 54rem; }
.details-dialog { overflow-y: auto; overscroll-behavior: contain; }
.search-wrap input, .filter-panel input, .filter-panel select { font-size: 0.875rem; }
.detail-row { align-items: flex-start; }
.detail-row > strong { min-width: 0; max-width: 68%; overflow-wrap: anywhere; text-align: right; }
body { scroll-padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }

@media (min-width: 760px) {
  .app-shell { padding-top: 1.25rem; padding-right: 1.5rem; padding-left: 1.5rem; }
  .section-heading { margin-bottom: 1rem; }
  .overview-panel, .settings-card { padding: 1rem; }
  .event-card, .deal-card { padding: 1rem; }
  .details-dialog, .feed-filter-dialog { border-radius: 1.5rem 1.5rem 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .page { animation: none; }
}
