@charset "UTF-8";

/* Catalog-specific layout tokens; shared colors and type live in design-tokens.css. */
:root {
  --sidebar-width: 248px;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--canvas);
  font-size: 14px;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, a, summary { touch-action: manipulation; }
button, summary { cursor: pointer; }
button { background: none; }
button, select, input { color: var(--ink); }
a { color: inherit; }
button:disabled { cursor: default; color: var(--muted); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
}
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--ink); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; padding: 12px 20px; background: var(--accent); color: var(--ink); z-index: 40; border-radius: var(--radius); }
.skip-link:focus { top: 12px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Workspace chrome */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; overflow-y: auto; background: var(--surface-1); border-right: 1px solid var(--line); padding: 0 16px; }
.wordmark { display: flex; flex-shrink: 0; align-items: center; min-height: 64px; text-decoration: none; }
.wordmark__image { display: block; width: 216px; max-width: 100%; height: auto; }
.auth-wordmark { display: block; width: 190px; max-width: calc(100% - 56px); height: auto; }
.preview-badge { font-size: 10px; font-weight: 400; color: var(--muted); border: 1px solid var(--line-strong); padding: 2px 5px; border-radius: 4px; margin-left: auto; letter-spacing: 0; }
.workspace-nav { padding: 13px 0 20px; }
.workspace-more > summary { display: none; }
.workspace-more:not([open]) > div { display: none; }
.nav-label { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin: 0 8px 10px; }
.nav-item, .nav-coming { display: flex; align-items: center; gap: 9px; padding: 9px 10px; font-size: 13px; border-radius: 6px; margin: 0 0 3px; text-decoration: none; }
.nav-item svg, .nav-coming svg { width: 16px; height: 16px; color: var(--muted); }
.nav-item.selected { background: var(--surface-4); color: var(--ink); }
.nav-item:hover { background: #202123; }
.nav-item.selected svg { color: var(--ink-muted); }
.nav-indicator { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-muted); margin-left: auto; }
.nav-coming { color: var(--muted); }
.nav-coming > span { margin-left: auto; font-size: 10px; }
.workspace { height: 100dvh; min-height: 480px; display: flex; flex-direction: column; margin-left: var(--sidebar-width); background: var(--canvas); }
.site-header { min-height: 56px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 14px; font-size: 12px; white-space: nowrap; }
.breadcrumb > span:first-child, .breadcrumb > span:nth-child(2) { color: var(--muted); }
.account-area { display: flex; align-items: center; gap: 12px; min-width: 0; }
.account-note { font-size: 11px; color: var(--muted); max-width: 235px; text-align: right; line-height: 1.4; }
.quiet-button { display: inline-flex; gap: 7px; align-items: center; border: 1px solid var(--line-strong); padding: 6px 10px; border-radius: var(--radius); min-height: 32px; font-size: 12px; white-space: nowrap; background: var(--surface-2); }
.quiet-button svg { width: 14px; height: 14px; }
.soon-label { font-size: 10px; padding-left: 5px; border-left: 1px solid var(--line-strong); }
.intro { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-shrink: 0; padding: 20px 28px 12px; }
.heading-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
h1 { font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -.6px; margin: 0; }
.intro p { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 8px 0 0; max-width: 76ch; }
.intro-links { font-size: 12px !important; }
.intro-links a { color: var(--ink-muted); text-underline-offset: 3px; }
.intro-links a:hover { color: var(--ink); }
.catalog-research { flex-shrink: 0; padding: 0 28px 20px; }
.catalog-research h2 { font-size: 13px; font-weight: 500; margin: 0; }
.catalog-research p { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 6px 0 10px; }
.catalog-research p a { color: var(--ink-muted); text-underline-offset: 3px; }
.catalog-research > div { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.catalog-research > div a { font-size: 12px; color: var(--ink-muted); text-underline-offset: 3px; }
.catalog-research > div span { display: inline-block; font-size: 11px; color: var(--muted); margin-left: 4px; text-decoration: none; }
.catalog-research a:hover, .research-link:hover { color: var(--accent-hover); }
.research-link { display: block; font-size: 11px; margin-top: 4px; color: var(--ink-muted); text-underline-offset: 3px; }
.store-badge { color: var(--ink-muted); background: var(--surface-3); border: 1px solid var(--line-strong); padding: 3px 7px; font-size: 11px; border-radius: 4px; white-space: nowrap; }
.snapshot-source { max-width: 235px; color: var(--muted); font-size: 11px; line-height: 1.6; text-align: right; }
.catalog-context { flex-shrink: 0; margin: 0 28px 16px; font-size: 12px; color: var(--muted); }
.catalog-context > summary { width: fit-content; min-height: 28px; padding-block: 5px; color: var(--ink-muted); }
.catalog-context-body { max-width: 1000px; padding: 6px 0 14px; }
.catalog-context-body > p { line-height: 1.6; margin: 8px 0; }
.catalog-context a { color: var(--ink-muted); text-underline-offset: 3px; }
.catalog-context .catalog-research { padding: 12px 0 0; }
.workspace:has(.catalog-context[open]) { height: auto; min-height: 100dvh; }
.workspace:has(.catalog-context[open]) .table-container { min-height: 320px; max-height: 65dvh; }
.sidebar-footer { margin-top: auto; display: flex; flex-direction: column; gap: 5px; padding: 18px 8px 20px; flex-shrink: 0; border-top: 1px solid var(--line); }
.snapshot-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.status-dot { height: 5px; width: 5px; border-radius: 50%; background: var(--muted); }
.sidebar-footer strong { color: var(--ink-muted); font-size: 13px; font-weight: 500; margin-top: 5px; font-variant-numeric: tabular-nums; }
#snapshot-range, .sidebar-footer p { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 0; }
.sidebar-footer p { margin-top: 5px; }

/* Native filter disclosure becomes a compact drawer in the page on mobile. */
.filter-disclosure { border-top: 1px solid var(--line); padding-top: 18px; }
.filter-disclosure > summary { display: none; }
.filters-heading { display: flex; justify-content: space-between; align-items: center; margin: 0 8px 19px; }
.filters h2 { font-size: 12px; font-weight: 500; color: var(--ink-muted); margin: 0; }
.text-button { color: var(--muted); font-size: 11px; border: 0; padding: 3px 0; }
.text-button:hover { color: var(--ink); }
.filter-section { border: 0; border-bottom: 1px solid var(--line); min-width: 0; margin: 0 0 19px; padding: 0 8px 19px; }
.filter-section:last-child { border-bottom: 0; margin-bottom: 0; }
.filter-section legend { padding: 0; font-size: 12px; font-weight: 500; color: var(--ink-muted); margin-bottom: 10px; }
.filters label, .input-label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 7px; }
.filters select, .filters input { width: 100%; min-width: 0; min-height: 34px; background: var(--surface-2); border: 1px solid var(--line-strong); padding: 7px 9px; border-radius: 6px; font-size: 12px; }
.filters select { padding-right: 19px; text-overflow: ellipsis; }
input::placeholder { color: var(--muted); opacity: 1; }
.filters select:hover, .filters input:hover { border-color: #4b4c54; }
.field-note { font-size: 11px; line-height: 1.55; color: var(--muted); margin: 8px 0 0; }
.sub-field { margin-top: 12px; }
.date-fields { display: grid; gap: 0; }
.number-fields { display: flex; gap: 7px; align-items: center; }
.number-fields > span { color: var(--muted); font-size: 11px; }
.number-fields input { appearance: textfield; }
.number-fields input::-webkit-inner-spin-button { appearance: none; }

/* Search, list and pagination share one viewport-height work area. */
.results { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; padding: 0 28px; }
.results:focus { outline-offset: -3px; }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 0 19px; flex-shrink: 0; }
.search-field { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: var(--radius); width: min(100%, 480px); min-width: 0; padding: 0 12px; }
.search-field:focus-within { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: 1px; }
.search-field svg { width: 16px; height: 16px; stroke: var(--muted); }
.search-field input { border: 0; background: none; outline: none; width: 100%; min-width: 0; font-size: 13px; padding: 10px 0; }
.search-field input:focus-visible { outline: none; }
.sort-field { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sort-field label { font-size: 12px; color: var(--muted); }
.sort-field select { border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface-2); font-size: 12px; padding: 7px 8px; min-height: 34px; }
.results-caption { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); flex-shrink: 0; }
.results h2 { font-size: 12px; font-weight: 500; margin: 0; display: flex; align-items: center; gap: 8px; }
.list-icon { font-size: 17px; line-height: 1; color: var(--muted); }
.results-caption > span { font-size: 11px; color: var(--muted); text-align: right; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 1px 0 12px; flex-shrink: 0; max-height: 110px; overflow-y: auto; }
.filter-chip, .tag { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); color: var(--ink-muted); background: var(--surface-3); border-radius: 4px; padding: 4px 8px; font-size: 11px; line-height: 1.4; }
.filter-chip { overflow-wrap: anywhere; text-align: left; }
.filter-chip:hover { background: #252629; color: var(--ink); }
.coverage-warning { color: var(--ink-muted); background: var(--surface-3); border: 1px solid var(--line-strong); padding: 10px 12px; margin: 0 0 12px; font-size: 12px; line-height: 1.5; border-radius: 6px; flex-shrink: 0; }
.result-status { flex: 1; min-height: 240px; border-block: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; text-align: center; padding: 32px; color: var(--muted); }
.result-status h3 { color: var(--ink); font-size: 20px; font-weight: 500; letter-spacing: -.4px; margin: 0; }
.result-status p { font-size: 13px; line-height: 1.7; margin: 0; max-width: 400px; }
.status-action { border: 1px solid var(--line-strong); background: var(--surface-3); border-radius: var(--radius); padding: 9px 14px; font-size: 12px; margin-top: 4px; }
.status-action:hover { background: #252629; }
.loading-indicator { width: 20px; height: 20px; border: 2px solid var(--line-strong); border-top-color: var(--accent-hover); border-radius: 50%; animation: rotate .8s linear infinite; }
.table-container { flex: 1; min-height: 0; overflow: auto; border-block: 1px solid var(--line); background: var(--surface-1); isolation: isolate; }
.table-scroll-hint { display: none; }
.research-scope { flex-shrink: 0; margin: 0; padding: 0 0 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
th { background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 400; text-align: left; white-space: nowrap; padding: 10px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
.app-results .app-column { width: 38%; }
.app-results .keyword-column { width: 27%; }
.app-results .volume-column { width: 12%; }
.app-results .difficulty-column { width: 8%; }
.app-results .research-column { width: 15%; }
.header-note { font-size: var(--text-label); color: var(--muted); margin-left: 3px; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-muted); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .12s ease-out; }
tbody tr:hover, tbody tr:focus-within { background: var(--surface-3); }
tbody tr.is-selected { background: var(--surface-4); }
tbody tr.is-selected td:first-child { box-shadow: inset 2px 0 var(--accent); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.app-cell { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.app-icon { width: 34px; height: 34px; flex-shrink: 0; object-fit: cover; border-radius: 8px; background: var(--surface-3); border: 1px solid var(--line-strong); }
.app-icon-fallback { display: grid; place-items: center; font-size: 14px; font-weight: 500; color: var(--muted); }
.app-copy { min-width: 0; }
.app-excerpt { font-size: 12px; color: var(--ink-muted); line-height: 1.5; margin: 4px 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.app-meta { display: block; font-size: 11px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.keyword-phrase { display: block; color: var(--ink); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.keyword-missing { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.keyword-meta { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 5px; }
.catalog-metric { font-size: 13px; }
.metric-unknown { font-size: 11px; color: var(--muted); }
.research-action { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 0; border: 0; font-size: 12px; line-height: 1.5; text-align: left; color: var(--ink-muted); }
.research-action:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 4px; }
.app-name { display: block; text-align: left; max-width: 100%; color: var(--ink); font-size: 13px; font-weight: 500; line-height: 1.4; border: 0; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-name:hover { color: var(--accent-hover); }
.app-artist { display: block; font-size: 11px; color: var(--muted); line-height: 1.4; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-text { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.rating-value { display: block; font-size: 12px; }
.rating-average { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.row-arrow { font-size: 15px; color: var(--muted); padding-left: 0; padding-right: 10px; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; flex-shrink: 0; font-size: 11px; color: var(--muted); }
.pagination > div { display: flex; align-items: center; gap: 12px; }
.page-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 6px; min-height: 32px; padding: 7px 10px; font-size: 11px; }
.page-button:hover:enabled { border-color: #52545e; background: var(--surface-4); }
.page-button:disabled { color: var(--muted); border-color: var(--line); background: transparent; }
.page-number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-note { color: var(--muted); font-size: var(--text-label); line-height: 1.5; border-top: 1px solid var(--line); padding: 10px 0 12px; margin: 0; flex-shrink: 0; }

/* Detail inspector uses the same surface and type hierarchy. */
.detail-panel { position: fixed; z-index: 20; inset: 0 0 0 auto; width: min(500px, 100%); background: var(--surface-1); border-left: 1px solid var(--line-strong); overflow-y: auto; padding: 0 28px 32px; animation: panel-in .18s ease-out; }
.detail-topbar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--surface-1); border-bottom: 1px solid var(--line); z-index: 2; padding: 15px 0; margin-bottom: 28px; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .4px; margin: 0; }
.close-button { width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); font-size: 13px; }
.close-button:hover { background: var(--surface-3); color: var(--ink); }
.detail-identity { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.detail-identity .app-icon { height: 58px; width: 58px; border-radius: 12px; }
.detail-identity h2 { font-size: 22px; line-height: 1.25; font-weight: 500; letter-spacing: -.4px; margin: 0 0 7px; overflow-wrap: anywhere; }
.detail-identity p { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 0; }
.detail-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; margin: 0 0 24px; padding: 22px 0; border-block: 1px solid var(--line); }
.detail-facts dt { color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.detail-facts dd { font-size: 13px; line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
.source-link { display: inline-flex; align-items: center; background: var(--accent); color: var(--ink); font-weight: 500; text-decoration: none; font-size: 13px; padding: 10px 14px; min-height: 40px; border-radius: var(--radius); margin-bottom: 8px; }
.source-link:hover { background: var(--accent-hover); color: var(--canvas); }
.detail-section { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 22px; }
.detail-section h3 { color: var(--ink); font-size: 13px; font-weight: 500; margin: 0 0 13px; }
.detail-section p { color: var(--ink-muted); font-size: 13px; line-height: 1.75; margin: 0 0 12px; }
.description { white-space: pre-line; overflow-wrap: anywhere; max-height: 390px; overflow-y: auto; padding-right: 8px; }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.detail-warning { color: var(--muted) !important; font-size: 11px !important; line-height: 1.6 !important; }
.keyword-state { display: inline-flex; font-size: 11px; border-radius: 4px; border: 1px solid var(--line-strong); padding: 3px 7px; background: var(--surface-3); color: var(--ink-muted); margin-bottom: 12px; }
.keyword-table { table-layout: auto; margin: 12px 0; }
.keyword-table th { position: static; padding: 9px 6px; }
.keyword-table td { font-size: 11px; padding: 9px 6px; overflow-wrap: anywhere; }
.keyword-table th:first-child, .keyword-table th:last-child { width: auto; }
.keyword-table th:not(:first-child) { text-align: right; }
.keyword-research { min-width: 0; }
#app-keyword-research { scroll-margin-top: 76px; }
.keyword-form label { display: block; color: var(--ink-muted); font-size: 12px; margin-bottom: 8px; }
.keyword-form textarea { display: block; width: 100%; min-height: 88px; max-height: 240px; resize: vertical; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); padding: 10px 12px; font: inherit; font-size: 13px; line-height: 1.6; margin-bottom: 8px; }
.keyword-form textarea:disabled { color: var(--muted); }
.keyword-form .keyword-confirm { display: flex; align-items: flex-start; gap: 9px; margin: 14px 0; line-height: 1.6; }
.keyword-confirm input { flex-shrink: 0; margin-top: 3px; accent-color: var(--accent); }
.keyword-form .primary-button { margin-bottom: 12px; }
.keyword-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 12px; }
.keyword-table-wrap .keyword-table { min-width: 540px; margin: 0; }
.keyword-table-wrap th { white-space: nowrap; }
.keyword-table-wrap th:first-child { min-width: 150px; }
.keyword-research .account-message:empty { display: none; }
.keyword-research > .status-action { margin-top: 8px; }
@media (max-width: 600px) { .keyword-form textarea { font-size: 16px; } }
.noscript-message { position: fixed; bottom: 0; width: 100%; background: var(--surface-3); border-top: 1px solid var(--line-strong); padding: 20px; z-index: 30; }
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes panel-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }

@media (min-width: 1600px) {
  :root { --sidebar-width: 264px; }
  .site-header, .intro { padding-left: 36px; padding-right: 36px; }
  .results { padding-inline: 36px; }
  .catalog-context { margin-inline: 36px; }
}
@media (max-width: 1100px) and (min-width: 901px) {
  :root { --sidebar-width: 230px; }
  .site-header, .intro { padding-inline: 20px; }
  .results { padding-inline: 20px; }
  .account-note { display: none; }
  .snapshot-source { max-width: 170px; }
  .results-toolbar { gap: 12px; }
  .sort-field label { display: none; }
  .results-caption > span { max-width: 190px; }
  th, td { padding-inline: 8px; }
  .catalog-context { margin-inline: 20px; }
  .app-cell { gap: 8px; }
}
@media (max-width: 900px) {
  body { display: flex; flex-flow: row wrap; }
  .sidebar { position: static; width: 100%; padding: 0 20px; display: contents; overflow: visible; }
  .wordmark { order: -2; flex: 1 0 256px; padding: 0 20px; min-height: 60px; border-bottom: 1px solid var(--line); background: var(--surface-1); }
  .workspace-nav, .intro, .results, .catalog-research, .sidebar-footer { flex: 0 0 100%; min-width: 0; }
  .preview-badge { margin-left: 4px; }
  .workspace-nav { position: relative; display: flex; gap: 8px; max-width: 100%; padding: 8px 20px; overflow: visible; background: var(--surface-1); border-bottom: 1px solid var(--line); }
  .workspace-nav .nav-label { display: none; }
  .workspace-nav .nav-item { flex: 0 0 auto; width: auto; min-height: 44px; margin: 0; padding: 10px 12px; white-space: nowrap; }
  .workspace-nav .nav-item svg { display: none; }
  .workspace-nav > .nav-item { flex: 1; }
  .workspace-more > summary { display: flex; align-items: center; gap: 6px; list-style: none; min-height: 44px; padding: 10px 12px; font-size: 13px; }
  .workspace-more > summary::-webkit-details-marker { display: none; }
  .workspace-more > summary svg { width: 14px; height: 14px; }
  .workspace-more > div { position: absolute; top: calc(100% + 4px); right: 20px; z-index: 12; width: 240px; max-width: calc(100% - 40px); padding: 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-2); }
  .workspace-more > div .nav-item { width: 100%; }
  .filter-disclosure { order: 1; flex: 0 0 calc(100% - 40px); min-width: 0; margin: 0 20px 20px; padding-top: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-1); }
  .filter-disclosure > summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-size: 13px; min-height: 44px; list-style: none; }
  .filter-disclosure > summary::-webkit-details-marker { display: none; }
  .filter-disclosure > summary > span:first-child { display: flex; align-items: center; gap: 8px; }
  .filter-disclosure > summary svg { width: 16px; height: 16px; color: var(--muted); }
  .disclosure-hint { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
  .disclosure-hint > span { transition: transform .15s ease-out; }
  .filter-disclosure[open] .disclosure-hint > span { transform: rotate(180deg); }
  .filters { padding: 16px; border-top: 1px solid var(--line); }
  .filters-heading { margin: 0 0 16px; }
  #filter-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .filter-section { padding: 0; border: 0; margin: 0; }
  .filters select, .filters input { min-height: 44px; font-size: 13px; }
  .filters label, .input-label { font-size: 12px; }
  .sidebar-footer { order: 4; padding: 20px; margin: 0; border: 0; background: var(--surface-1); }
  .sidebar-footer p { margin-top: 2px; }
  .workspace { display: contents; }
  .site-header { position: static; order: -1; flex: 1 0 auto; justify-content: flex-end; padding: 8px 20px 8px 0; min-height: 60px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface-1); }
  .site-header .quiet-button, .site-header .text-button { min-height: 44px; }
  .breadcrumb, .account-note { display: none; }
  .quiet-button { min-height: 36px; }
  .intro { order: 0; padding: 20px 20px 8px; align-items: flex-start; }
  .intro p { max-width: 540px; }
  .catalog-context { order: 0; flex: 0 0 calc(100% - 40px); margin: 0 20px 12px; }
  .catalog-context > summary { min-height: 40px; padding-block: 10px; }
  .snapshot-source { font-size: 11px; max-width: 200px; padding-top: 3px; }
  .results { order: 2; display: block; padding: 0 20px; }
  .catalog-research { order: 3; padding: 0 20px 20px; }
  .catalog-research > div a { min-height: 44px; display: inline-flex; align-items: center; flex-wrap: wrap; }
  .results-toolbar { padding-bottom: 16px; }
  .search-field { flex: 1; }
  .search-field input { min-height: 44px; }
  .sort-field select { min-height: 44px; }
  .table-container { max-height: 65dvh; min-height: 240px; }
  .table-scroll-hint { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; line-height: 1.5; margin: 0; padding: 3px 0 10px; }
  .results:has(.table-container[hidden]) .table-scroll-hint { display: none; }
  .app-results { min-width: 0; }
  .app-results th, .app-results td { padding-inline: 10px; }
  .app-results .app-column { width: 34%; }
  .app-results .keyword-column { width: 26%; }
  .app-results .volume-column { width: 14%; }
  .app-results .difficulty-column { width: 9%; }
  .app-results .research-column { width: 17%; }
  .keyword-table { min-width: 0; }
  .page-button { min-height: 40px; }
  .filter-chip { min-height: 36px; }
  .active-filters { max-height: 150px; }
  .detail-panel { width: min(500px, 100%); }
  .close-button { height: 40px; width: 40px; }
}
@media (max-width: 580px) {
  .intro { flex-direction: column; gap: 8px; }
  h1 { font-size: 22px; }
  .intro p { font-size: 13px; }
  .snapshot-source { text-align: left; max-width: none; padding: 0; }
  #filter-form { grid-template-columns: 1fr; gap: 22px; }
  .filter-section { border-bottom: 1px solid var(--line); padding-bottom: 22px; }
  .filter-section:last-child { border-bottom: 0; padding-bottom: 0; }
  .date-fields { grid-template-columns: 1fr 1fr; gap: 12px; }
  .results-toolbar { flex-wrap: wrap; gap: 10px; }
  .search-field { flex: 1 0 100%; width: 100%; }
  .search-field input { font-size: 16px; }
  .filters select, .filters input { font-size: 16px; }
  .sort-field { justify-content: space-between; width: 100%; }
  .sort-field label { font-size: 12px; }
  .sort-field select { font-size: 13px; flex: 0 1 172px; }
  .results-caption > span { max-width: 145px; font-size: 10px; line-height: 1.5; }
  .results h2 { font-size: 11px; }
  .list-icon { display: none; }
  .keyword-table { min-width: 0; }
  .app-cell { gap: 9px; }
  .pagination { flex-wrap: wrap; gap: 12px; padding: 14px 0; }
  .pagination > div { justify-content: space-between; width: 100%; }
  .data-note { padding-bottom: 0; }
  .detail-panel { padding: 0 20px 28px; }
  .detail-identity h2 { font-size: 21px; }
  .source-link { min-height: 44px; }
  .result-status { min-height: 280px; padding: 24px 16px; }
}
@media (max-width: 640px) {
  .intro { padding-top: 16px; }
  .intro p { font-size: 13px; }
  .intro .store-badge { display: none; }
  .catalog-context { font-size: 12px; }
  .catalog-context > summary { min-height: 44px; }
  .filter-disclosure { margin-bottom: 12px; }
  .results-toolbar { flex-wrap: nowrap; gap: 8px; padding-bottom: 10px; }
  .search-field { flex: 1 1 auto; width: auto; }
  .sort-field { flex: 0 0 126px; width: auto; min-width: 0; }
  .sort-field label { display: none; }
  .sort-field select { flex: 1; min-width: 0; width: 100%; font-size: 12px; }
  .results-caption { padding-block: 10px; }
  .results h2 { font-size: 12px; line-height: 1.5; }
  .research-scope { font-size: 11px; }
  .app-results { display: block; min-width: 0; }
  .app-results thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .app-results tbody { display: block; }
  .app-results tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; padding: 14px 12px 6px; border-bottom: 1px solid var(--line); }
  .app-results tbody tr:last-child { border-bottom: 0; }
  .app-results td { display: block; min-width: 0; padding: 0; border: 0; }
  .app-results .app-identity, .app-results .catalog-keyword, .app-results .catalog-actions { grid-column: 1 / -1; }
  .app-results tbody tr.is-selected td:first-child { box-shadow: none; }
  .app-results .app-name { font-size: 14px; }
  .app-results .app-excerpt { font-size: 12px; }
  .app-results .app-meta { font-size: 12px; }
  .app-results .catalog-keyword { margin: 12px 0 10px; }
  .app-results .catalog-keyword::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; line-height: 1.5; margin-bottom: 3px; }
  .app-results .keyword-phrase { font-size: 14px; }
  .app-results .keyword-missing, .app-results .keyword-meta { font-size: 12px; }
  .app-results .catalog-metric { text-align: left; font-size: 14px; }
  .app-results .catalog-metric::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 3px; }
  .app-results .metric-unknown { font-size: 13px; }
  .app-results .catalog-actions { text-align: right; margin-top: 4px; }
  .app-results .research-action { min-height: 44px; font-size: 13px; }
  .table-container { max-height: none; }
}
@media (max-width: 370px) {
  .preview-badge { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .loading-indicator { border-top-color: var(--accent-hover); border-right-color: var(--accent-hover); }
}

/* Account access and private research retain the workspace surface hierarchy. */
.research-nav { width: 100%; border: 0; color: var(--ink-muted); text-align: left; }
.research-nav:hover { background: var(--surface-3); }
.caption-actions { display: flex; align-items: center; gap: 16px; min-width: 0; }
.caption-actions > span { color: var(--muted); font-size: 11px; }
.caption-actions .quiet-button { min-height: 30px; padding: 5px 9px; font-size: 11px; }
.account-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-dialog { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-1); color: var(--ink); }
.auth-dialog::backdrop { background: #010102b8; }
.auth-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.auth-dialog h2 { font-size: 24px; font-weight: 500; letter-spacing: -.6px; margin: 0 0 10px; }
#auth-description { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0 0 24px; }
.google-button { width: 100%; min-height: 42px; padding: 10px 14px; display: flex; justify-content: center; align-items: center; gap: 12px; background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: 8px; font-size: 13px; font-weight: 500; }
.google-button:hover:enabled { background: #252629; border-color: #52545e; }
.google-button > span { font-size: 16px; font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; font-size: 11px; color: var(--muted); }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.auth-dialog label, .saved-search-form label, .app-note-form > label { display: block; font-size: 12px; color: var(--ink-muted); margin-bottom: 8px; }
.auth-dialog input, .saved-search-form input, .app-note-form textarea { width: 100%; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); padding: 11px 12px; font: inherit; font-size: 14px; min-height: 42px; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 40px; padding: 10px 14px; border: 1px solid transparent; background: var(--accent); color: var(--ink); font-size: 13px; font-weight: 500; border-radius: 8px; }
.primary-button:hover:enabled { background: var(--accent-hover); color: var(--canvas); }
.primary-button:disabled { background: var(--surface-3); border-color: var(--line-strong); color: var(--muted); }
.auth-dialog .primary-button { width: 100%; margin-top: 14px; }
.auth-footnote { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.account-message { color: var(--ink-muted); font-size: 12px; line-height: 1.6; margin: 14px 0 0; overflow-wrap: anywhere; }
.account-message:empty { margin: 0; }
.account-message.is-error { color: #f2b4ad; }
#code-destination { font-size: 13px; color: var(--ink-muted); line-height: 1.6; overflow-wrap: anywhere; margin: 0 0 18px; }
#auth-code { font-size: 21px; font-variant-numeric: tabular-nums; letter-spacing: 4px; }
.code-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 14px; }
.research-panel { z-index: 21; }
.research-panel .detail-topbar h2 { font-size: 15px; font-weight: 500; margin: 0; }
.saved-search-form { padding: 18px 0; border-bottom: 1px solid var(--line); }
.saved-search-form .primary-button { margin-top: 14px; }
.saved-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.saved-item:last-child { border-bottom: 0; }
.saved-item-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.saved-title { color: var(--ink); text-align: left; font-size: 13px; line-height: 1.5; border: 0; padding: 3px 0; overflow-wrap: anywhere; }
.saved-title:hover { color: var(--accent-hover); }
.saved-remove { border: 0; color: var(--muted); font-size: 11px; padding: 4px 0; }
.saved-remove:hover { color: var(--ink); }
.saved-meta { color: var(--muted) !important; font-size: 11px !important; line-height: 1.6 !important; margin: 5px 0 0 !important; overflow-wrap: anywhere; }
.saved-note { color: var(--ink-muted); font-size: 12px !important; line-height: 1.6 !important; margin: 9px 0 0 !important; white-space: pre-line; overflow-wrap: anywhere; max-height: 120px; overflow-y: auto; }
.app-note-form .favorite-control { display: flex; align-items: center; gap: 9px; font-size: 13px; margin-bottom: 18px; }
.favorite-control input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.app-note-form textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
.app-note-form .primary-button { margin-top: 14px; }
@media (max-width: 1100px) { .caption-actions > span { display: none; } }
@media (max-width: 900px) {
  #sign-in { max-width: 112px; }
  #sign-out { padding-block: 10px; }
  .auth-dialog input, .saved-search-form input, .app-note-form textarea { font-size: 16px; min-height: 44px; }
  .auth-dialog .close-button, .google-button, .primary-button, .saved-remove { min-height: 44px; }
  .caption-actions .quiet-button { min-height: 40px; }
  .saved-title { min-height: 44px; }
}
@media (max-width: 430px) {
  .wordmark { flex-basis: 240px; padding-inline: 14px 10px; }
  .site-header { padding-right: 14px; }
  .account-area { gap: 8px; }
  #sign-in { font-size: 11px; padding-inline: 8px; }
  #sign-out { font-size: 10px; }
  .auth-dialog { padding: 20px; }
}
