@charset "UTF-8";
:root {
  color-scheme: dark;
  --bg: #101519;
  --surface: #172026;
  --surface-2: #1d2931;
  --line: #2b3942;
  --text: #edf2f4;
  --muted: #9aadb9;
  --dim: #718795;
  --accent: #c7ef78;
  --accent-soft: #c7ef7810;
  --amber: #e6bb78;
  --font: Inter, "Segoe UI", Arial, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --default-columns: 5;
  --card-scale: 1;
}
* { box-sizing: border-box; }
html { height: 100%; background: var(--bg); }
body { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; color: var(--text); background: var(--bg); font: 13px/1.45 var(--font); -webkit-font-smoothing: antialiased; padding: env(safe-area-inset-top,0) env(safe-area-inset-right,0) env(safe-area-inset-bottom,0) env(safe-area-inset-left,0); }
button, input, select { font: inherit; border-radius: 7px; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .42; cursor: not-allowed; }
button, a, input, select, summary { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select { min-width: 0; }
button, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.topbar { flex: none; height: 62px; padding: 6px 14px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); background: #151e24; min-width: 0; }
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); border: 1px solid #52633e; border-radius: 9px; }
.brand-mark .icon { width: 26px; height: 26px; stroke-width: 1.35; }
.brand-name { font-size: 14px; font-weight: 750; letter-spacing: .7px; line-height: 1.15; }
.brand-name>span { color: var(--accent); }
.brand-name small { display: block; font-size: 7px; color: var(--dim); font-weight: 500; margin-top: 4px; letter-spacing: 1.2px; }
.live-status { flex-shrink: 0; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.connection-pill { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.connection-pill i, .capture-indicator { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #657987; flex-shrink: 0; }
.connection-pill.connected i, .capture-indicator.running { background: var(--accent); }
.connection-pill.error i, .capture-indicator.waiting { background: var(--amber); }
.capture-heading { display: flex; align-items: center; gap: 6px; color: #c8d5dd; font-size: 10px; white-space: nowrap; }
.noise-quick { display: flex; flex: 0 0 132px; width: 132px; height: 44px; border: 1px solid #3a4c56; border-radius: 7px; overflow: hidden; background: #111b21; }
.noise-switch { display: flex; flex: 1; min-width: 0; flex-direction: column; justify-content: center; gap: 2px; padding: 3px 7px; cursor: pointer; }
.noise-switch-heading { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: #d3dfd7; }
.noise-switch input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.noise-switch input:disabled { cursor: not-allowed; }
.noise-quick-status { display: block; min-height: 12px; color: var(--muted); font-size: 10px; line-height: 12px; white-space: nowrap; }
.noise-reset { display: grid; place-items: center; flex: 0 0 44px; width: 44px; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 8px; background: #1b292e; color: #bbcdbb; }
.noise-reset .icon { width: 18px; height: 18px; }
.noise-reset:hover:not(:disabled) { color: var(--accent); background: #2a3827; }
.noise-quick[data-state=ready] .noise-quick-status { color: var(--accent); }
.noise-quick[data-state=learning] .noise-quick-status, .noise-quick[data-state=busy] .noise-quick-status { color: var(--amber); }
.activity-badge { flex: 0 0 178px; width: 178px; height: 42px; padding: 4px 7px; position: relative; overflow: hidden; contain: layout paint; border: 1px solid #3a4c56; border-radius: 7px; background: #111b21; }
.activity-badge::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: #c7ef7833; opacity: 0; }
.activity-badge[data-flash=on] { border-color: #b3d971; background: #253222; }
.activity-badge[data-flash=on][data-pulse=a]::before { animation: activity-pulse-a 1.3s ease-out both; }
.activity-badge[data-flash=on][data-pulse=b]::before { animation: activity-pulse-b 1.3s ease-out both; }
.activity-update { display: flex; align-items: center; justify-content: space-between; gap: 4px; position: relative; color: #cfddd0; font-size: 10px; line-height: 15px; white-space: nowrap; }
.activity-update-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#activity-count, #activity-time { font-family: var(--mono); font-variant-numeric: tabular-nums; }
#activity-time { flex-shrink: 0; color: #b9c9d0; font-size: 10px; }
.activity-badge[data-state=pending] .activity-update { color: var(--muted); }
.activity-stages { display: flex; align-items: center; justify-content: space-between; gap: 7px; position: relative; margin-top: 1px; }
.activity-stage { display: inline-flex; align-items: center; gap: 4px; color: #8297a4; font-size: 9px; line-height: 13px; white-space: nowrap; }
.activity-stage i { width: 5px; height: 5px; flex-shrink: 0; border: 1px solid currentColor; border-radius: 50%; }
.activity-state { min-width: 9px; font-family: var(--mono); text-align: center; }
.activity-stage[data-state=active] { color: var(--accent); }
.activity-stage[data-state=active] i { background: currentColor; }
.activity-stage[data-state=muted], .activity-stage[data-state=disconnected] { color: var(--amber); }
@keyframes activity-pulse-a { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes activity-pulse-b { 0% { opacity: 1; } 100% { opacity: 0; } }
.header-actions { display: flex; flex-shrink: 0; gap: 7px; align-items: center; margin-left: auto; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 40px; padding: 9px 13px; border: 1px solid var(--line); background: var(--surface-2); color: #cad7df; font-size: 12px; font-weight: 600; white-space: nowrap; }
.button .icon { width: 18px; height: 18px; }
.button:hover:not(:disabled) { border-color: #72845c; color: var(--accent); }
.button-primary { background: var(--accent); color: #25321a; border-color: var(--accent); }
.button-primary.is-running { background: #283426; color: var(--accent); border-color: #5c7146; }
.button-primary:hover:not(:disabled) { background: #34432c; }
.capture-button { width: 42px; height: 42px; padding: 0; }
.capture-button>span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.browser-capture-button { height: 42px; }
.browser-source-help, .browser-trace { padding: 14px; }
.browser-trace .button { width: 100%; }
.browser-trace .setting-help { overflow-wrap: anywhere; }
@media (max-width:1100px) {
  .browser-capture-button { width: 42px; height: 42px; padding: 0; }
  .browser-capture-button>span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
}
.settings-toggle { height: 42px; }
.icon-button { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 8px; background: transparent; border: 0; color: var(--muted); }
.icon-button:hover { background: var(--surface-2); color: var(--text); }
.detection-summary { flex: 1; min-width: 0; max-width: 640px; margin-left: auto; border-left: 1px solid var(--line); padding-left: 18px; }
.summary-idle, .summary-result { display: flex; align-items: center; gap: 10px; min-width: 0; }
.summary-icon { width: 30px; height: 30px; color: #88a292; flex-shrink: 0; display: grid; place-items: center; }
.summary-result .summary-icon { color: var(--accent); }
.summary-icon .icon { width: 23px; height: 23px; }
.summary-result-text { flex: 1; min-width: 0; }
.summary-result-text h2 { font-size: 13px; line-height: 1.3; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-result-text p { font-size: 10px; margin: 3px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.action-divider { margin: 0 5px; color: var(--dim); }
.summary-score { flex-shrink: 0; text-align: right; }
.summary-score strong { font: 20px/1.2 var(--mono); color: var(--accent); display: block; }
.summary-score span { display: block; color: var(--dim); font-size: 7px; letter-spacing: .8px; }
.summary-result-meta { margin-left: 7px; color: var(--dim); font-family: var(--mono); }
.summary-live-label { display: none; }
.workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) 108px; }
.results-workspace { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.results-toolbar { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 10px; padding: 3px 12px; border-bottom: 1px solid var(--line); }
.toolbar-navigation { display: flex; align-items: center; gap: 10px; min-width: 0; }
.language-control { display: flex; flex-shrink: 0; }
.language-control select { height: 36px; min-width: 60px; padding: 5px 7px; border: 1px solid #3a4c56; background: #172026; color: var(--muted); font: 11px var(--mono); cursor: pointer; }
.language-control select:hover { border-color: #72845c; color: var(--accent); }
.view-tabs { display: flex; gap: 3px; flex-shrink: 0; }
.view-tab { min-height: 40px; border: 1px solid transparent; background: transparent; padding: 9px 10px; font-size: 12px; color: var(--muted); }
.view-tab.active { background: var(--accent-soft); color: var(--accent); border-color: #475a36; }
.price-filter { display: flex; align-items: center; gap: 7px; min-width: 0; }
.price-caption { color: var(--muted); font-size: 11px; white-space: nowrap; }
.price-presets { display: flex; gap: 4px; }
.price-preset { min-height: 40px; min-width: 44px; border: 1px solid var(--line); background: #19232b; padding: 7px 9px; font-size: 12px; font-weight: 600; color: #aabdc9; }
.price-preset.active { color: var(--accent); border-color: #819c55; background: #293722; }
.custom-price { display: block; min-width: 0; }
.custom-price input { width: 112px; min-height: 40px; padding: 7px 9px; border: 1px solid #3a4c58; background: #10191f; color: var(--text); font: 12px var(--mono); -moz-appearance: textfield; }
.custom-price input::placeholder { font: 11px var(--font); color: var(--dim); }
.custom-price input::-webkit-inner-spin-button, .custom-price input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.custom-price input.is-active { border-color: #819c55; color: var(--accent); }
.results-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 0 12px 10px; }
.results-heading { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 8px; }
.results-heading>div { display: flex; align-items: center; min-width: 0; gap: 8px; }
.results-heading h1 { margin: 0; color: #afbfca; font-size: 11px; font-weight: 500; }
.result-count { padding: 1px 6px; color: var(--accent); background: #263126; border-radius: 4px; font: 10px var(--mono); }
.filtered-hint, .sort-label { color: var(--dim); font-size: 10px; white-space: nowrap; }
.result-tools { flex-shrink: 0; }
.text-button { background: transparent; border: 0; color: var(--muted); font-size: 11px; padding: 7px 2px; }
.text-button:hover { color: var(--accent); }
.results-grid { display: grid; grid-template-columns: repeat(var(--grid-columns,var(--default-columns)),minmax(0,1fr)); align-items: start; gap: 9px; }
.item-card { container-type: inline-size; min-width: 0; border: 1px solid #31404a; border-radius: 8px; overflow: hidden; background: var(--surface); content-visibility: auto; contain-intrinsic-size: auto 205px; }
.item-card:hover { border-color: #5c6e78; }
.rarity-mythic { --rarity: #f28d84; --rarity-rgb: 242,141,132; }
.rarity-legendary { --rarity: #e8c071; --rarity-rgb: 232,192,113; }
.rarity-epic { --rarity: #bb9eea; --rarity-rgb: 187,158,234; }
.rarity-rare { --rarity: #87bce3; --rarity-rgb: 135,188,227; }
.rarity-uncommon { --rarity: #8acba8; --rarity-rgb: 138,203,168; }
.rarity-common { --rarity: #b1bdc6; --rarity-rgb: 177,189,198; }
.item-card::before { content: ""; display: block; height: 2px; background: var(--rarity,#8a9ca9); }
.item-card-top { display: flex; align-items: center; justify-content: space-between; gap: 3px; padding: calc(6px * var(--card-scale)) calc(8px * var(--card-scale)) 0; }
.rarity-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--rarity); font-size: clamp(8px,calc(9px * var(--card-scale)),12px); }
.item-size { font: clamp(9px,calc(10px * var(--card-scale)),12px) var(--mono); color: #b6c6d1; white-space: nowrap; }
.item-image-area { height: calc(70px * var(--card-scale)); margin: 3px 8px; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse,rgba(var(--rarity-rgb,170,180,190),.065),transparent 72%); }
.item-image-area img { width: 112px; height: 90%; max-width: 94%; object-fit: contain; filter: drop-shadow(0 4px 6px #0003); }
.image-placeholder { width: 32px; height: 32px; color: var(--dim); }
.item-info { padding: 0 calc(8px * var(--card-scale)) calc(7px * var(--card-scale)); }
.item-name { font-size: clamp(10px,calc(12px * var(--card-scale)),16px); font-weight: 550; line-height: 1.3; height: 2.6em; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.item-category { font-size: clamp(8px,calc(9px * var(--card-scale)),12px); color: var(--dim); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin: 0 0 5px; }
.item-meta { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.item-sound { display: flex; align-items: center; gap: 3px; min-width: 0; color: var(--dim); font-size: 9px; white-space: nowrap; }
.item-sound .icon { width: 11px; height: 11px; }
.item-price { color: #e0e9d7; font: clamp(10px,calc(12px * var(--card-scale)),15px) var(--mono); white-space: nowrap; margin-left: auto; }
.item-actions { display: flex; border-top: 1px solid var(--line); background: #141d23; }
.sample-button { min-width: 0; display: flex; align-items: center; justify-content: center; flex: 1; gap: 4px; min-height: 34px; padding: 6px 2px; border: 0; border-radius: 0; background: transparent; color: #a3b6c3; font-size: clamp(9px,calc(10px * var(--card-scale)),12px); }
.sample-button+.sample-button { border-left: 1px solid var(--line); }
.sample-button .icon { width: 11px; height: 11px; }
.sample-button.playing, .sample-button:hover:not(:disabled) { color: var(--accent); background: #2b3726; }
.empty-state { min-height: 180px; height: calc(100% - 68px); padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted); }
.empty-icon { color: #6e927a; width: 36px; height: 36px; margin-bottom: 10px; stroke-width: 1.2; }
.empty-state h2 { color: #c6d5dd; font-size: 16px; margin: 0 0 6px; font-weight: 550; }
.empty-state p { max-width: 430px; font-size: 12px; line-height: 1.6; margin: 0 0 13px; }
.results-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; padding: 16px 0 4px; font-size: 9px; color: var(--dim); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.donate-link { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; color: var(--accent); font-size: 11px; }
.donate-link .icon { width: 14px; height: 14px; }
.donate-link .external-icon { width: 11px; height: 11px; }
.donate-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.support-panel { padding: 14px; }
.support-panel .button { width: 100%; margin: 8px 0 10px; }
.support-panel>.text-button { font-size: 11px; }
.disclaimer-banner { position: fixed; z-index: 25; left: max(16px,env(safe-area-inset-left,0px)); bottom: max(16px,env(safe-area-inset-bottom,0px)); width: min(760px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; display: flex; align-items: flex-end; gap: 20px; padding: 20px; border: 1px solid #637749; border-radius: 12px; background: #192329; box-shadow: 0 12px 48px #0009; }
.disclaimer-copy { min-width: 0; }
.disclaimer-copy h2 { margin: 0 0 8px; color: var(--text); font-size: 15px; line-height: 1.35; }
.disclaimer-copy p { margin: 0; color: #b1c0c9; font-size: 12px; line-height: 1.65; }
.disclaimer-banner .button { flex-shrink: 0; min-width: 94px; }
.size-rail { min-height: 0; padding: 8px 6px; border-left: 1px solid var(--line); background: #172127; display: flex; flex-direction: column; align-items: stretch; gap: 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.size-heading { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10px; line-height: 1.3; color: var(--muted); }
.size-heading strong { font: 12px var(--mono); color: var(--accent); }
.size-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.size-chip { min-width: 44px; min-height: 50px; border: 1px solid #3c4f5c; background: #1c2931; color: #a6bbc8; border-radius: 7px; display: grid; place-items: center; padding: 4px; }
.size-chip.active { background: #34452a; color: var(--accent); border-color: #b0ce6d; box-shadow: inset 0 0 0 1px #b0ce6d; }
.size-chip:hover { border-color: #a4ba79; }
.size-chip.size-all { grid-column: 1/-1; min-height: 44px; }
.size-all .icon { width: 23px; height: 23px; }
.cell-grid { display: grid; gap: 2px; place-content: center; }
.cell-grid i { display: block; width: 8px; height: 8px; background: currentColor; opacity: .9; border-radius: 1px; }
.rail-hint { color: #8298a5; font-size: 8px; text-align: center; }
.drawer-backdrop { position: fixed; inset: 0; border: 0; border-radius: 0; background: #060c11aa; z-index: 30; }
.settings-drawer { position: fixed; z-index: 40; top: 0; bottom: 0; right: 0; width: min(430px,100vw); display: flex; flex-direction: column; background: #10181e; box-shadow: -12px 0 45px #0006; border-left: 1px solid #3a4a55; padding-top: env(safe-area-inset-top,0); padding-right: env(safe-area-inset-right,0); padding-bottom: env(safe-area-inset-bottom,0); }
.drawer-heading { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; min-height: 65px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.drawer-heading h2 { font-size: 16px; font-weight: 650; margin: 0; }
.drawer-heading p { margin: 3px 0 0; font-size: 10px; color: var(--dim); }
.drawer-content { overflow: auto; overscroll-behavior: contain; min-height: 0; padding: 12px; }
.panel { margin-bottom: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.panel-heading h2 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12px; font-weight: 600; }
.panel-heading h2 .icon { width: 15px; height: 15px; color: var(--muted); }
.range-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: #bccbd4; }
.range-heading output { color: var(--accent); font: 11px var(--mono); white-space: nowrap; }
.display-range { display: flex; align-items: center; gap: 7px; margin: 8px 0 14px; }
.display-range input { flex: 1; min-width: 45px; }
.step-button, .auto-button { flex-shrink: 0; min-width: 38px; min-height: 40px; border: 1px solid #3b4c58; background: #223039; color: #bdccd6; padding: 6px; font-size: 18px; }
.auto-button { font-size: 11px; }
.auto-button[aria-pressed=true] { color: var(--accent); border-color: #768f50; background: #2b3625; }
input[type=range] { accent-color: var(--accent); cursor: pointer; min-height: 26px; }
.setting-help, .settings-content p { font-size: 11px; color: var(--muted); line-height: 1.65; margin: 10px 0 0; }
.field-label { display: block; font-size: 11px; color: #b1c2ce; margin-bottom: 6px; }
.search-field { display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #3c4e5b; background: #101a21; border-radius: 7px; margin-bottom: 12px; }
.search-field .icon { color: var(--dim); width: 16px; height: 16px; }
.search-field input { flex: 1; width: 100%; border: 0; background: transparent; color: var(--text); min-height: 40px; font-size: 13px; }
.search-field kbd { font: 10px var(--mono); color: var(--dim); border: 1px solid var(--line); padding: 0 4px; border-radius: 3px; }
.filter-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-fields>div { min-width: 0; }
.field-select, .device-control select { width: 100%; background: #101a21; border: 1px solid #3c4e5b; color: #ced9df; min-height: 40px; padding: 8px; font-size: 11px; }
.check-label { display: flex; align-items: center; gap: 9px; min-height: 36px; margin-top: 8px; font-size: 12px; color: #b3c3ce; cursor: pointer; }
.check-label input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
.history-panel { padding-bottom: 0; }
.history-list { margin: 0 -14px; max-height: 300px; overflow-y: auto; }
.history-empty { padding: 0 14px 15px; margin: 0; color: var(--dim); font-size: 11px; }
.history-entry { display: flex; align-items: center; width: 100%; gap: 10px; padding: 10px 14px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; }
.history-entry.active { background: var(--accent-soft); }
.history-entry>i { display: grid; place-items: center; min-width: 32px; height: 32px; font: 11px var(--mono); font-style: normal; border: 1px solid #455764; border-radius: 6px; color: var(--accent); }
.history-entry-main { flex: 1; min-width: 0; }
.history-entry-main strong { display: block; font-size: 11px; font-weight: 500; }
.history-entry-main small { display: block; margin-top: 2px; font: 10px var(--mono); color: var(--dim); }
.history-score { color: var(--muted); font: 11px var(--mono); }
.match-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 12px; }
.match-chip { min-height: 36px; border: 1px solid #3b4c57; background: #1b2932; color: var(--muted); padding: 6px 8px; font-size: 11px; }
.match-chip.active { color: var(--accent); border-color: #6a814b; background: #2a3825; }
.match-chip small { margin-left: 6px; color: var(--dim); font: 10px var(--mono); }
.settings-panel, .obs-setup { padding: 0; }
.settings-panel>summary, .obs-setup>summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; min-height: 48px; cursor: pointer; padding: 12px 14px; font-size: 12px; }
.settings-panel>summary::-webkit-details-marker, .obs-setup>summary::-webkit-details-marker { display: none; }
.settings-panel>summary>.icon, .obs-setup>summary>.icon { width: 14px; height: 14px; }
.settings-panel[open]>summary>.icon, .obs-setup[open]>summary>.icon { transform: rotate(180deg); }
.settings-content, .obs-setup-content { padding: 2px 14px 14px; }
.settings-content>input[type=range] { width: 100%; margin: 6px 0 0; }
.range-labels { display: flex; justify-content: space-between; font-size: 9px; color: var(--dim); }
.settings-footnote { border-top: 1px solid var(--line); padding-top: 10px; }
.small-tag { font: 9px var(--mono); color: var(--dim); }
.stream-source { display: flex; align-items: center; gap: 7px; color: #c0d0d9; font-size: 11px; }
.stream-source>.icon { width: 16px; height: 16px; color: var(--dim); }
.stream-state { margin-left: auto; background: #27343d; color: #bccbd4; font-size: 10px; padding: 3px 7px; border-radius: 4px; }
.stream-state.active { background: #2b3b25; color: var(--accent); }
.stream-state.waiting { background: #393123; color: var(--amber); }
.stream-state.error { background: #402a27; color: #f3a297; }
.stream-info { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 9px; font-size: 10px; color: var(--dim); margin: 10px 0; }
.device-control { display: flex; align-items: center; gap: 5px; }
.device-control select { flex: 1; }
.signal-panel { margin-top: 14px; }
.signal-label { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-bottom: 5px; }
.signal-meter { height: 5px; background: #0c141a; border-radius: 4px; overflow: hidden; }
.signal-fill { width: 100%; height: 100%; background: var(--accent); transform-origin: left center; transform: scaleX(0); }
.performance { display: flex; justify-content: space-between; margin-top: 10px; color: var(--dim); font-size: 10px; }
.performance strong { font: 11px var(--mono); color: #c3d0d9; }
.obs-setup>summary>span { display: flex; align-items: center; gap: 8px; }
.obs-setup>summary>span>.icon { width: 16px; height: 16px; color: var(--accent); }
.obs-connection-fields { display: flex; flex-direction: column; gap: 10px; }
.copy-field { display: flex; align-items: center; gap: 8px; background: #101a21; border: 1px solid #3c4e5b; border-radius: 7px; padding: 0 9px; }
.copy-field input { flex: 1; min-width: 0; border: 0; background: transparent; color: #cfddcf; min-height: 40px; font-size: 12px; }
.copy-field .text-button { color: var(--accent); flex-shrink: 0; }
.obs-setup-status { color: #c3d6bb; font-size: 11px; margin: 10px 0 0; }
.obs-instructions p { color: var(--muted); font-size: 11px; line-height: 1.75; margin: 12px 0 0; }
.obs-instructions strong { color: #cad7de; }
.file-panel>.button { width: 100%; }
.source-note { padding: 0 4px 8px; color: var(--dim); font-size: 10px; line-height: 1.8; }
.source-note p { margin: 0 0 4px; }
.source-note a { color: #acbfc9; }
.source-note .icon { width: 12px; height: 12px; }
.source-note>span { display: block; }
.notice { position: fixed; top: calc(env(safe-area-inset-top,0) + 67px); left: 12px; right: 122px; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 13px; background: #382b23; border: 1px solid #725039; color: #f0c999; border-radius: 8px; box-shadow: 0 6px 20px #0006; font-size: 12px; }
.notice>span { flex: 1; min-width: 0; }
.notice.error { background: #392927; border-color: #85534a; color: #f6b1a3; }
.notice.info { background: #213441; border-color: #41677d; color: #c4deec; }
.preview-toast { position: fixed; z-index: 60; bottom: calc(env(safe-area-inset-bottom,0) + 10px); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 4px 5px 4px 12px; border-radius: 8px; background: #293a2c; border: 1px solid #759151; color: #d8eac9; font-size: 11px; max-width: calc(100vw - 25px); box-shadow: 0 5px 20px #0006; }
.preview-toast>span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-toast>.icon { width: 16px; height: 16px; color: var(--accent); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #3b505d; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
@media (min-width:1000px) { :root { --default-columns: 6; } }
@media (min-width:1300px) { :root { --default-columns: 7; } }
@media (max-width:1250px) { .brand-name { display: none; } .topbar { gap: 12px; } .settings-toggle>span { display: none; } .settings-toggle { width: 42px; padding: 0; } }
@media (max-width:1000px) { .topbar>.brand { display: none; } .live-status { max-width: 132px; } .capture-heading>span:last-child, .connection-pill>span { overflow: hidden; text-overflow: ellipsis; } }
@media (max-width:850px) {
  .topbar { height: 52px; padding: 4px 8px; gap: 8px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 7px; }
  .brand-mark .icon { width: 23px; height: 23px; }
  .detection-summary { padding-left: 10px; }
  .summary-icon { display: none; }
  .summary-result-text h2 { font-size: 12px; }
  .summary-result-text p { font-size: 9px; }
  .summary-score strong { font-size: 17px; }
  .capture-heading { font-size: 9px; }
  .connection-pill { font-size: 9px; }
  .activity-badge { flex-basis: 166px; width: 166px; height: 40px; padding: 3px 6px; }
  .activity-update { font-size: 9px; }
  #activity-time { font-size: 9px; }
  .results-toolbar { min-height: 44px; padding: 2px 8px; gap: 7px; }
  .view-tab { min-height: 38px; padding: 8px; font-size: 11px; }
  .price-filter { gap: 5px; }
  .price-caption { font-size: 10px; }
  .price-preset { min-height: 38px; padding: 7px; min-width: 42px; font-size: 11px; }
  .custom-price input { min-height: 38px; width: 102px; font-size: 12px; }
  .results-scroll { padding: 0 8px 8px; }
  .results-grid { gap: 7px; }
  .results-heading { min-height: 31px; }
  .item-sound { display: none; }
  .notice { top: calc(env(safe-area-inset-top,0) + 56px); }
}
@media (max-width:750px) and (orientation:landscape) {
  .live-status { display: none; }
  .capture-heading>span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .connection-pill>span { overflow: hidden; text-overflow: ellipsis; }
  .detection-summary { padding-left: 8px; }
  .summary-result { gap: 6px; }
  .summary-score strong { font-size: 15px; }
  .summary-score span { font-size: 6px; letter-spacing: .3px; }
  .price-caption { display: none; }
  .custom-price input { width: 96px; }
  .filtered-hint { display: none; }
}
@media (max-height:500px) and (orientation:landscape) {
  .topbar { height: 52px; }
  .results-toolbar { min-height: 44px; }
  .item-category { display: none; }
  .item-image-area { height: calc(62px * var(--card-scale)); }
  .results-footer { padding-top: 12px; }
  .size-rail { padding-top: 7px; gap: 6px; }
  .size-chip { min-height: 48px; }
  .size-heading { flex-direction: row; justify-content: center; gap: 6px; font-size: 9px; }
  .size-heading strong { font-size: 10px; }
  .empty-state { min-height: 150px; padding: 12px; }
  .empty-icon { width: 28px; height: 28px; margin-bottom: 6px; }
  .empty-state h2 { font-size: 14px; }
  .empty-state p { font-size: 11px; }
  .empty-state .button { min-height: 36px; }
}
@media (max-width:649px) { :root { --default-columns: 3; } }
@media (max-width:479px) { :root { --default-columns: 2; } }
@media (max-width:600px) and (orientation:portrait) {
  .topbar { height: 94px; display: grid; grid-template-columns: 30px minmax(0,1fr) 166px; grid-template-rows: 40px 40px; gap: 4px 9px; padding: 4px 8px 6px; }
  .live-status { display: none; }
  .noise-quick { grid-column: 1/3; grid-row: 1; height: 40px; }
  .connection-pill, .capture-heading { max-width: 100%; }
  .connection-pill>span, .capture-heading>span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .detection-summary { grid-column: 1/3; grid-row: 2; width: 100%; max-width: none; padding: 0 2px; border: 0; }
  .activity-badge { grid-column: 3; grid-row: 2; }
  .header-actions { grid-column: 3; grid-row: 1; gap: 5px; }
  .summary-score strong { font-size: 19px; }
  .summary-result-text p { font-size: 10px; }
  .capture-button, .settings-toggle { width: 38px; height: 38px; min-height: 38px; }
  .workspace { grid-template-columns: minmax(0,1fr) 64px; }
  .size-rail { padding: 8px 7px; }
  .size-grid { grid-template-columns: 1fr; }
  .size-chip { min-height: 48px; }
  .size-chip.size-all { grid-column: auto; }
  .rail-hint { font-size: 8px; }
  .results-toolbar { flex-wrap: wrap; justify-content: flex-start; gap: 3px; padding-bottom: 6px; }
  .view-tabs { width: 100%; }
  .toolbar-navigation { width: 100%; gap: 6px; }
  .toolbar-navigation .view-tabs { width: auto; flex: 1; min-width: 0; }
  .view-tab { flex: 1; min-height: 36px; }
  .price-filter { width: 100%; }
  .price-caption { display: none; }
  .price-presets { gap: 3px; }
  .price-preset { min-width: 39px; padding: 6px; min-height: 38px; }
  .custom-price { flex: 1; }
  .custom-price input { width: 100%; padding: 6px; font-size: 12px; }
  .custom-price input::placeholder { font-size: 10px; }
  .results-heading { flex-wrap: wrap; padding: 6px 0; gap: 1px; }
  .results-heading h1 { font-size: 10px; }
  .filtered-hint, .sort-label, .results-footer>span:last-child { display: none; }
  .item-card-top { padding-left: 6px; padding-right: 6px; }
  .item-info { padding-left: 6px; padding-right: 6px; }
  .item-category { display: none; }
  .item-image-area { height: calc(66px * var(--card-scale)); }
  .sample-button { font-size: 9px; gap: 2px; }
  .sample-button .icon { width: 10px; height: 10px; }
  .results-footer { font-size: 8px; line-height: 1.7; }
  .footer-links #footer-mode { display: none; }
  .disclaimer-banner { left: max(8px,env(safe-area-inset-left,0px)); bottom: max(8px,env(safe-area-inset-bottom,0px)); width: calc(100vw - 16px); padding: 16px; gap: 12px; flex-direction: column; align-items: stretch; }
  .disclaimer-banner .button { align-self: flex-end; }
  .notice { top: calc(env(safe-area-inset-top,0) + 98px); right: 73px; left: 7px; font-size: 11px; }
}
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } .activity-badge::before { animation: none !important; opacity: 0 !important; } }

/* Dense grids retain full prices and usable sound buttons. */
@container (max-width:110px) {
  .item-info { padding-left: 5px; padding-right: 5px; }
  .item-card-top { padding-left: 5px; padding-right: 5px; }
  .item-price { font-size: clamp(8px,calc(10px * var(--card-scale)),11px); }
  .sample-button { font-size: 9px; gap: 0; padding-left: 1px; padding-right: 1px; }
  .sample-button .icon { display: none; }
  .item-category { display: none; }
}
@container (max-width:82px) {
  .rarity-label { font-size: 0; }
  .rarity-label::before { content: ""; display: block; width: 6px; height: 6px; background: var(--rarity); border-radius: 50%; }
  .item-price { font-size: 8px; }
  .sample-button { font-size: 8px; }
  .item-image-area { margin-left: 3px; margin-right: 3px; }
}
