/* GiftHunter's light theme. The market heatmap keeps its meaningful trend colours. */
:root {
  color-scheme: light;
  --bg: #f7f0ff;
  --panel: #fffaff;
  --panel-soft: #f2e8fc;
  --line: #e7d8f4;
  --text: #351142;
  --ink: #351142;
  --muted: #735e80;
  --dim: #897697;
  --orange: #7138d2;
  --orange-soft: #eadbff;
  --green: #138447;
  --red: #b52d4c;
  --blue: #6741c2;
}
html, body { background: var(--bg); color: var(--text); }
body { background-image: radial-gradient(ellipse at 17% -7%, #ead8ff 0, transparent 41%), radial-gradient(ellipse at 90% 22%, #ffedf5 0, transparent 45%); }
.app-shell { max-width: 1440px; }
.page-title h2 { color: var(--text); }
.brand-icon { border: 1px solid #d7b7fa; background: linear-gradient(145deg,#a967f6,#6933d0); color: white; box-shadow: 0 .25rem .8rem #a778d64a; }
.date-chip, .icon-button, .search-wrap, .filter-toggle, .stack, .top-collections,
.filter-panel, .empty-state, .sales-source, .settings-card, .saved-filter,
.sales-history-panel, .details-dialog, .feed-filter-dialog {
  border-color: var(--line); background: var(--panel); color: var(--text);
  box-shadow: 0 .3rem 1.1rem #68408c12;
}
.date-chip, .counter-label, .counter-caption, .activity-meta > span:last-child,
.eyebrow, .inline-note, .source-row { color: var(--muted); }
.icon-button, .market-tag, .load-more-button, .text-button { color: var(--orange); }
.search-wrap { min-height: 2.9rem; border-radius: 1rem; }
.search-wrap:focus-within, select:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid #8a55de; outline-offset: 2px; }
.search-wrap input::placeholder, .filter-grid input::placeholder { color: #9a83a6; }
.stack { background: transparent; border: 0; box-shadow: none; }
.event-card, .deal-card, .sale-card { border: 1px solid var(--line); border-radius: 1rem; background: rgba(255,252,255,.95); box-shadow: 0 .25rem .9rem #6e418c16; }
.event-card:active, .deal-card:active { filter: brightness(.97); }
.gift-thumb, .map-thumb, .top-collection-thumb, .market-thumb { background: #f0e5fa; }
.gift-placeholder, .map-placeholder { color: #9b6dc5; }
.gift-title, .event-price, .deal-price { color: var(--text); }
.gift-subtitle, .owner-summary .owner-label, .owner-summary .owner-status { color: var(--muted); }
.owner-summary .owner-display { color: #503164; }
.owner-summary .owner-username, .owner-link { color: #6634bd; }
.owner-link:hover { color: #481d96; }
.owner-inline-lookup { color: #6634bd; }
.event-badge { color: #662db7; }
.trait-chip, .meta-pill { color: #593080; background: #edddff; border-color: #e7d4fc; }
.trait-chip:nth-child(2) { background: #ffe4dd; color: #843d47; }
.trait-chip:nth-child(3) { background: #fff0c6; color: #765414; }
.trait-chip small { color: inherit; opacity: .78; }
.segmented, .chip { background: #eee5f6; color: #654d73; }
.segmented button.selected, .chip.selected, #map-periods .chip.selected, #map-scopes .chip.selected {
  outline-color: #d7b9f6; background: #fffaff; color: #622cb8;
  box-shadow: 0 .125rem .5rem #6b4d891c;
}
.map-controls select, .feed-market-category select, .feed-quick-filters select,
.filter-grid input, .filter-grid select, .filter-name-label input, .filter-number-grid input,
.filter-option-search { border-color: var(--line); background: var(--panel); color: var(--text); }
.empty-icon { background: #edddff; color: #6b34c7; }
.source-row, .detail-section, .market-detail, .market-detail-row,
.filter-editor-heading, .filter-section { border-color: var(--line); }
.source-row strong, .market-detail-row > strong, .market-item strong { color: var(--text); }
.bottom-nav { border-color: #e1cff5; background: rgba(255,250,255,.97); box-shadow: 0 .6rem 1.9rem #5430772b; }
.nav-item { color: #705d7b; }
.nav-item.active { color: #fff; background: linear-gradient(145deg,#9b59ee,#6730ca); box-shadow: 0 .25rem .8rem #7b41d549; }
.details-dialog, .feed-filter-dialog { background: #fffaff; box-shadow: 0 -1rem 3rem #36114a50; }
.details-dialog::backdrop, .feed-filter-dialog::backdrop { background: #24102b80; }
.dialog-grabber { background: #d7c4e8; }
.dialog-close, .saved-filter-action { background: #f0e5f9; color: #5c3972; }
.detail-gift-hero { border-color: var(--line); background: #f4e9fc; box-shadow: 0 .6rem 1.5rem #6c3c8229; }
.owner-lookup-button, .owner-copy-button { background: #ead9fd; color: #54249b; border-color: #d8b9f6; }
.market-state { background: #f2e9f8; color: #6e587c; }
.detail-link { background: #eadbff; color: #5924aa; }
.feed-meta span:first-child, .sales-history-panel > summary, .currency-filter-title,
.filter-accordion > summary { color: #604b71; }
.feed-presets .chip, .filter-choice, .filter-option-chip { border-color: var(--line); background: #f3eafa; color: #654878; }
.filter-choice.selected, .primary-button { background: #7138d2; color: white; }
.toast { background: #402251; color: white; }

/* Activity layout follows the supplied visual reference while preserving live data. */
.activity-brand { display: flex; align-items: center; gap: .45rem; margin: .3rem 0 .55rem; color: #3c174f; font-size: .95rem; letter-spacing: -.025em; }
.activity-brand .date-chip { margin-left: auto; }
.activity-brand > span { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: .5rem; background: #e7d3ff; font-size: 1.1rem; }
#page-activity .page-heading { align-items: flex-end; margin: 0 0 .85rem; }
#page-activity .page-title h2 { font-size: clamp(1.85rem, 6.2vw, 3rem); letter-spacing: -.06em; }
.activity-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .4rem; min-width: 0; }
.live-pill { padding: .43rem .6rem; border-radius: 999px; background: #d8f8df; color: #186d39; font-size: .58rem; letter-spacing: .025em; white-space: nowrap; }
.live-pill i { background: #23a74f; }
.live-pill.unavailable { background: #fff0d8; color: #865521; }
.live-pill.unavailable i { background: #bf8325; }
.date-chip { min-height: 2.25rem; padding-inline: .55rem; font-size: .6rem; }
.date-chip > span:first-child { color: #7042a8; font-size: 1rem; }
.upgrade-counter { min-height: 8rem; padding: 1.1rem 1.3rem; border-color: #dec3f4; border-radius: 1.35rem; background: linear-gradient(115deg,#f3dbff 0%,#ead1f8 51%,#ffd9e8 100%); box-shadow: 0 .5rem 1.4rem #a779bd26; }
.counter-label { position: relative; z-index: 1; color: #4c1e63; font-size: .95rem; font-weight: 800; }
.counter-label i { background: #9b58e2; }
.upgrade-counter strong { position: relative; z-index: 1; margin-top: .4rem; color: #41134d; font-size: 2.4rem; }
.counter-caption { position: relative; z-index: 1; color: #654778; font-size: .61rem; }
.counter-art { position: absolute; right: 4%; bottom: -.8rem; color: #7e3cc3; font-size: clamp(4rem, 12vw, 7.5rem); line-height: 1; opacity: .75; transform: rotate(-10deg); pointer-events: none; }
.activity-meta { justify-content: flex-end; min-height: 1.55rem; padding: .25rem .15rem; }
.overview-card { margin: .25rem 0 .8rem; border-color: var(--line); background: transparent; box-shadow: none; padding: 0; }
.overview-heading { padding: .6rem .7rem .3rem; }
.overview-heading strong { color: var(--text); font-size: .83rem; }
.overview-heading > span { color: var(--muted); }
.overview-sources { padding: .3rem .5rem .65rem; }
.overview-source { min-height: 3.35rem; grid-template-columns: 1.3rem minmax(0,1fr); column-gap: .35rem; padding: .48rem; border-color: #e7d8f4; border-radius: .8rem; background: #fffaff; box-shadow: 0 .2rem .6rem #72499616; }
.overview-source i { width: 1.2rem; height: 1.2rem; display: grid; place-items: center; background: #e6d2fc; box-shadow: none; font-size: .7rem; }
.overview-source:nth-child(1) i::after { content: '◇'; color: #3d70c3; }
.overview-source:nth-child(2) i::after { content: '◉'; color: #7a3ac8; }
.overview-source:nth-child(3) i::after { content: '▣'; color: #b76651; }
.overview-source.ready i { background: #e1f7e9; box-shadow: none; }
.overview-source.partial i { background: #fff1d4; }
.overview-source.offline i { background: #ffe2e9; }
.overview-source > span { color: #442351; font-size: .66rem; font-weight: 720; }
.overview-source strong { color: var(--muted); font-size: .58rem; }
.overview-source.ready strong { color: #16804a; }
.overview-source.partial strong { color: #8a5d16; }
.overview-source.offline strong { color: #a5374b; }
.overview-highlights { margin: 0 .5rem .5rem; padding: .65rem .7rem; border: 1px solid var(--line); border-radius: .9rem; background: #fffaff; }
.overview-highlights-heading { color: #4c2462; font-size: .72rem; }
.overview-highlight { padding: .38rem 0; border-top: 1px solid #f0e6f7; font-size: .68rem; }
.overview-highlight-name { color: #523363; }
.overview-highlight strong { color: #6541b4; }
.overview-empty { color: var(--muted); }
#page-activity .search-wrap { margin-bottom: .8rem; }
#activity-content { display: flex; flex-direction: column; gap: .55rem; }
#activity-content .event-card { padding: .75rem; }
#activity-content .gift-thumb { width: 3.8rem; height: 3.8rem; flex-basis: 3.8rem; border-radius: .8rem; }
#activity-content .event-head { gap: .7rem; }
#activity-content .gift-title { font-size: .9rem; }
#activity-content .gift-subtitle { font-size: .58rem; white-space: normal; }
#activity-content .event-price { font-size: .73rem; }
#activity-content .event-foot { margin-top: .55rem; }
.activity-attribution { padding: .45rem .2rem; }
@media (max-width: 420px) {
  .activity-heading-actions { align-items: center; }
  .live-pill { max-width: 10rem; font-size: .56rem; }
  .overview-sources { gap: .25rem; }
  .overview-source { grid-template-columns: 1fr; justify-items: start; min-height: 4.2rem; }
  .overview-source i { grid-row: auto; }
  .overview-source > span, .overview-source strong { max-width: 100%; font-size: .58rem; white-space: normal; }
  .counter-art { right: 1%; opacity: .5; }
  #activity-content .event-price { max-width: 5rem; overflow-wrap: anywhere; text-align: right; white-space: normal; }
}
@media (min-width: 760px) {
  #page-activity { max-width: 1100px; margin-inline: auto; }
  #activity-content { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  #activity-content .empty-state, #activity-content .load-more-button { grid-column: 1 / -1; }
  .overview-source { min-height: 3.6rem; }
}
