.history-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 8px 0; padding: 8px 14px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-muted); color: var(--color-primary); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.history-toggle[aria-expanded="true"] { border-color: var(--color-primary); }
.price-history-panel { margin: 8px 0 20px; padding: 16px 12px; border: 1px solid var(--color-border); border-radius: 18px; background: var(--color-card); }
.price-history-panel[hidden] { display: none; }
.price-history-panel h3, .similar-section h3 { margin: 0 0 12px; font-size: 16px; }
.history-periods { display: flex; gap: 6px; width: fit-content; padding: 4px; margin-bottom: 20px; border-radius: 12px; background: var(--color-muted); }
.history-periods button { min-height: 44px; padding: 8px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--color-muted-foreground); font: inherit; font-size: 12px; cursor: pointer; }
.history-periods button[aria-pressed="true"] { background: var(--color-card); color: var(--color-primary); box-shadow: 0 1px 4px #0f172a0a; }
.history-overview { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.history-caption { display: block; margin: 6px 0; color: var(--color-muted-foreground); font-size: 11px; line-height: 1.5; }
.history-current { display: block; color: var(--color-foreground); font-size: 25px; letter-spacing: -.8px; }
.history-change { padding: 7px 9px; border-radius: 9px; background: var(--color-muted); color: var(--color-muted-foreground); font-size: 11px; white-space: nowrap; }
.history-change.is-down { color: #166534; background: #ecfdf5; }
.history-chart { margin-top: 12px; color: var(--color-primary); }
.history-chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.history-gridline { stroke: var(--color-border); stroke-width: 1; stroke-dasharray: 3 5; }
.history-axis { fill: var(--color-muted-foreground); font-size: 10px; font-family: inherit; }
.history-line { stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; fill: none; }
.history-dot { fill: var(--color-card); stroke: currentColor; stroke-width: 2; }
.history-dot.is-selected { fill: currentColor; stroke: var(--color-card); stroke-width: 2.5; }
.history-tooltip { min-height: 20px; margin: 4px 0 12px; color: var(--color-foreground); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.history-facts { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--color-border); font-size: 12px; }
.history-empty { padding: 16px 0; color: var(--color-muted-foreground); font-size: 13px; line-height: 1.6; }
.history-table { font-size: 12px; margin-top: 12px; }
.history-table summary { padding: 10px 0; cursor: pointer; }
.history-table table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.history-table td { padding: 6px 0; border-bottom: 1px solid var(--color-border); }
.history-table td:last-child { text-align: right; }
.history-table button { min-height: 44px; padding: 4px 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.similar-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--color-border); }
.similar-section[hidden] { display: none; }
.similar-list { display: flex; gap: 12px; padding: 4px 2px 12px; overflow-x: auto; scroll-snap-type: x proximity; }
.similar-card { flex: 0 0 160px; display: flex; flex-direction: column; gap: 7px; padding: 0 0 12px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-card); color: var(--color-foreground); text-align: left; font: inherit; cursor: pointer; overflow: hidden; scroll-snap-align: start; }
.similar-card > img { width: 100%; height: 104px; object-fit: cover; background: var(--color-muted); }
.similar-card > :not(img) { margin-inline: 10px; }
.similar-card strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; font-size: 12px; line-height: 17px; }
.similar-card .similar-venue { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-muted-foreground); font-size: 10px; }
.similar-card .platform-badge { align-self: flex-start; }
.similar-card b { font-size: 14px; }
.similar-card small { color: var(--color-muted-foreground); font-size: 10px; }
.history-toggle:focus-visible, .history-periods button:focus-visible, .history-table button:focus-visible, .similar-card:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .price-history-panel { animation: explore-reveal .22s ease-out; } .similar-card { transition: border-color .18s ease; } .similar-card:hover { border-color: var(--color-primary); } }
@keyframes explore-reveal { from { opacity: 0; } to { opacity: 1; } }
.view-switch { display: flex; width: fit-content; gap: 4px; padding: 4px; margin: 8px 0 12px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-muted); }
body.is-map-view .controls { position: static; }
.view-switch button { min-height: 40px; padding: 8px 18px; border: 0; border-radius: 9px; background: transparent; color: var(--color-muted-foreground); font: inherit; font-size: 13px; cursor: pointer; }
.view-switch button[aria-pressed="true"] { background: var(--color-card); color: var(--color-primary); box-shadow: 0 1px 4px #0f172a0a; }
#map-view[hidden], #grid[hidden] { display: none; }
.deal-map-canvas { height: min(64vh, 560px); min-height: 320px; width: 100%; border: 1px solid var(--color-border); border-radius: 18px; background: var(--color-muted); isolation: isolate; }
.map-status { min-height: 40px; margin: 8px 0; }
.deal-map-marker { background: transparent; border: 0; }
.deal-map-price { height: 32px; display: flex; align-items: center; justify-content: center; padding: 4px 7px; border: 2px solid white; border-radius: 14px; background: var(--color-primary); color: white; box-shadow: 0 2px 7px #0f172a26; font: 700 12px/1.2 system-ui, sans-serif; white-space: nowrap; }
.deal-map-price.is-closed { background: #64748b; }
.deal-map-popup { font: 13px/1.4 system-ui, sans-serif; min-width: 180px; }
.deal-map-popup > strong { display: block; font-size: 15px; margin: 4px 0; }
.deal-map-popup .map-popup-address { margin: 6px 0 12px; font-size: 11px; color: #475569; }
.map-offer { display: grid; width: 100%; gap: 4px; text-align: left; min-height: 52px; padding: 10px 0; border: 0; border-top: 1px solid #fceae1; background: white; color: #0f172a; font: inherit; cursor: pointer; }
.map-offer small { color: #475569; font-size: 10px; }
.map-offer b { color: #c2410c; }
.map-directory { margin: 12px 0; font-size: 13px; }
.map-directory summary { padding: 12px 0; cursor: pointer; }
.map-directory ul { list-style: none; padding: 0; margin: 0; }
.map-directory button { min-height: 44px; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--color-border); background: transparent; color: var(--color-foreground); font: inherit; text-align: left; cursor: pointer; }
.deal-map-canvas .leaflet-control-attribution { font-size: 10px; }
.view-switch button:focus-visible, .map-offer:focus-visible, .map-directory button:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }

.history-notice { margin: 8px 0; color: var(--color-muted-foreground); font-size: 12px; line-height: 1.5; }
.history-table th { padding: 8px 0; text-align: left; border-bottom: 1px solid var(--color-border); }
.history-table th:last-child { text-align: right; }
.history-overview { flex-wrap: wrap; }
.history-current, .history-change { overflow-wrap: anywhere; max-width: 100%; }
.map-directory-offers { padding-inline: 12px; }
.map-directory .deal-map-popup { min-width: 0; }
.map-directory-offers small { overflow-wrap: anywhere; }
