/* Watcher: quiet surfaces, readable charts, compact game lists. */
.watcher-page {
  --color-bg: #141b27;
  --color-bg-elevated: #1c2533;
  --color-surface-1: #1c2533;
  --color-surface-2: #232e3e;
  --color-border: #2d3849;
  --color-muted: #a0aec1;
  --color-subtle: #8191a8;
  --watcher-blue: #38a9ff;
  background: var(--color-bg);
}
.watcher-page .site-header-inner,
.watcher-page .tool-page,
.watcher-page .site-footer { width: calc(100% - clamp(24px, 4vw, 64px)); max-width: none; }
.watcher-page .tool-page { padding-top: 38px; }
.watcher-page .tool-hero { margin-bottom: 30px; }
.watcher-page .tool-hero h1 { font-size: clamp(1.9rem, 4vw, 2.65rem); }
.watcher-page .eyebrow { color: var(--color-subtle); font-size: .72rem; }
.watcher-page .hero-copy { color: var(--color-muted); }
.watcher-page .refresh-button { background: var(--color-surface-2); border: 1px solid var(--color-border); color: var(--color-text); }
.watcher-page .refresh-button:hover { background: #2a384a; }
.watcher-page .stats-panel { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 24px; margin-bottom: 30px; }
.watcher-page .metric-card { min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.watcher-page .metric-card span { color: var(--color-text-soft); font-size: .85rem; font-weight: 600; text-transform: none; letter-spacing: 0; }
.watcher-page .metric-card strong { margin-top: 5px; color: #a9c6ec; font-size: 1.85rem; font-weight: 500; line-height: 1.2; }
.watcher-page #topGame { font-size: 1.35rem; padding-top: 6px; }
.watcher-page .metric-card small { display: block; margin-top: 4px; color: var(--color-subtle); font-size: .75rem; }
.watcher-history { padding: 22px 24px 16px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-bg-elevated); margin-bottom: 38px; }
.watcher-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.watcher-panel-heading h2,
.watcher-page .section-heading h2 { margin: 0; font-size: 1.2rem; letter-spacing: -.015em; }
.watcher-panel-heading p,
.watcher-section-copy { margin: 4px 0 0; color: var(--color-muted); font-size: .85rem; line-height: 1.5; }
.watcher-history-plot { position: relative; height: 216px; margin-top: 26px; }
.watcher-chart-empty { position: absolute; inset: 0; display: grid; place-content: center; padding: 24px; margin: 0; color: var(--color-muted); text-align: center; font-size: .85rem; }
.watcher-chart-caption { display: flex; justify-content: space-between; gap: 16px; color: var(--color-subtle); font-size: .72rem; margin: 14px 0 0; }
.watcher-line-key { display: inline-block; width: 16px; height: 2px; margin: 0 6px 3px 0; background: var(--watcher-blue); }
.watcher-page .segmented-control { min-height: 36px; padding: 3px; background: #141b27; border-color: var(--color-border); box-shadow: none; border-radius: 7px; }
.watcher-page .segment-btn { min-height: 30px; padding: 5px 10px; color: var(--color-muted); font-size: .75rem; white-space: nowrap; }
.watcher-page .segment-btn.active { background: #2c3b50; color: #e5f1ff; box-shadow: none; }
.watcher-range { flex-shrink: 0; }
.watcher-layout { display: grid; grid-template-columns: minmax(0, 1fr) 28px clamp(340px, 24vw, 400px); gap: 14px; align-items: start; }
.watcher-layout.is-discovery-collapsed { grid-template-columns: minmax(0, 1fr) 28px; }
.watcher-layout .games-section { min-width: 0; }
.watcher-games-heading { margin-bottom: 18px; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px; }
.watcher-games-heading p { margin-top: 4px; font-size: .8rem; color: var(--color-subtle); }
.watcher-sidebar-control { position: relative; grid-column: 2; grid-row: 1; align-self: stretch; }
.watcher-sidebar-control::before { content: ''; position: absolute; inset: 0 auto 0 50%; border-left: 1px solid var(--color-border); opacity: .65; }
.watcher-sidebar-toggle { position: sticky; top: calc(50vh - 22px); display: grid; place-items: center; width: 28px; height: 44px; padding: 0; border: 1px solid var(--color-border); border-radius: 7px; background: var(--color-bg); color: var(--color-subtle); cursor: pointer; }
.watcher-sidebar-toggle[aria-expanded="false"] svg { transform: rotate(180deg); }
.watcher-sidebar-toggle:hover { background: var(--color-surface-2); color: var(--color-text); }
.watcher-sidebar-toggle:focus-visible { outline: 2px solid var(--watcher-blue); outline-offset: 3px; }
.watcher-page .watcher-controls { grid-template-columns: minmax(110px, 1fr) 132px auto auto !important; gap: 9px; margin-bottom: 18px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.watcher-page .watcher-controls .search-field,
.watcher-page .watcher-controls .select-field,
.watcher-page .view-selector { gap: 5px; }
.watcher-page .watcher-controls label > span,
.watcher-page .view-selector > span { font-size: .75rem; text-transform: none; letter-spacing: 0; font-weight: 500; }
.watcher-page .watcher-controls input[type="search"],
.watcher-page .watcher-controls select { min-height: 40px; border-radius: 7px; background: #101722; border-color: var(--color-border); font-size: .85rem; }
.watcher-page .watcher-controls input[type="search"] { padding-inline: 10px; }
.watcher-page .watcher-controls select { padding-left: 10px; padding-right: 22px; }
.watcher-options { position: relative; font-size: .78rem; }
.watcher-options summary { min-height: 38px; display: flex; align-items: center; cursor: pointer; padding: 0 9px; border: 1px solid var(--color-border); border-radius: 7px; color: var(--color-muted); }
.watcher-options summary::after { content: '⌄'; margin-left: 8px; }
.watcher-options summary::marker { content: ''; }
.watcher-options-menu { position: absolute; z-index: 10; right: 0; top: calc(100% + 8px); width: 204px; padding: 8px; border: 1px solid #39465a; border-radius: 10px; background: #1c2533; box-shadow: 0 12px 30px #0006; }
.watcher-page .watcher-options .toggle-field { min-height: 37px; border: 0; background: transparent; padding: 0 7px; font-size: .78rem; font-weight: 500; }
.watcher-page .watcher-options .toggle-field:hover { background: var(--color-surface-2); }
.watcher-page .watcher-options .toggle-field span { color: var(--color-text-soft); font-size: .78rem; }
.watcher-page .watcher-options input { width: 15px; height: 15px; }
.watcher-list-heading { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px 32px; gap: 14px; padding: 0 10px 9px; font-size: .66rem; color: var(--color-subtle); border-bottom: 1px solid var(--color-border); }
.watcher-list-heading span:not(:first-child) { text-align: right; }
.watcher-page .watcher-game-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.watcher-game-row { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 14px; align-items: center; padding: 12px 10px; border-bottom: 1px solid var(--color-border); transition: background-color 150ms; }
.watcher-game-row:nth-child(even) { background: #19223080; }
.watcher-game-row:hover { background: #202c3c; }
.watcher-game-row-link { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px; gap: 14px; align-items: center; min-width: 0; }
.watcher-game-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.watcher-rank { flex: 0 0 20px; color: var(--color-subtle); font-size: .65rem; font-variant-numeric: tabular-nums; }
.watcher-thumbnail { flex-shrink: 0; width: 76px; height: 43px; border-radius: 4px; background: #293446; overflow: hidden; display: grid; place-items: center; color: #a9c6ec; font-size: .85rem; }
.watcher-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
.watcher-game-name { min-width: 0; }
.watcher-game-name strong { display: block; color: var(--color-text); font-size: .84rem; font-weight: 650; line-height: 1.35; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.watcher-game-name small { display: block; color: var(--color-subtle); font-size: .68rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-top: 3px; }
.watcher-player-count,
.watcher-player-peak { text-align: right; font-size: .88rem; font-variant-numeric: tabular-nums; font-weight: 650; }
.watcher-player-count { color: #9ceba7; }
.watcher-player-count.is-empty { color: var(--color-subtle); }
.watcher-player-peak { color: #d9e3f2; }
.watcher-player-peak.is-missing { color: var(--color-subtle); font-weight: 400; }
.watcher-page .watcher-game-row .favorite-button { width: 32px; height: 32px; border: 0; background: transparent; box-shadow: none; color: var(--color-subtle); font-size: 1.1rem; }
.watcher-page .watcher-game-row .favorite-button:hover,
.watcher-page .watcher-game-row .favorite-button.is-favorite { color: #f4c95d; }
.watcher-more { width: 100%; min-height: 40px; padding: 8px; border: 1px solid var(--color-border); border-radius: 7px; margin-top: 16px; background: transparent; color: var(--color-text-soft); font-size: .78rem; cursor: pointer; }
.watcher-more:hover { background: var(--color-surface-2); }
.watcher-list-note,
.watcher-data-note { color: var(--color-subtle); font-size: .68rem; line-height: 1.55; margin: 12px 0 0; }
.watcher-discovery { display: grid; gap: 30px; }
.watcher-discovery .watcher-panel-heading { flex-wrap: wrap; gap: 8px; }
.watcher-period { color: var(--color-subtle); font-size: .75rem; white-space: nowrap; }
#risingTitle span { color: #9ceba7; font-size: .85rem; margin-left: 5px; }
.watcher-discovery-list { margin-top: 13px; border-top: 1px solid var(--color-border); }
.watcher-discovery-link { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--color-border); }
.watcher-discovery-link:hover { background: #202c3c; }
.watcher-discovery-link .watcher-thumbnail { width: 72px; height: 44px; }
.watcher-discovery-link .watcher-game-name { flex: 1; }
.watcher-discovery-link .watcher-game-name strong { font-size: .9rem; }
.watcher-discovery-link .watcher-game-name small { font-size: .74rem; }
.watcher-discovery-value { flex-shrink: 0; color: #d1deef; font-size: .76rem; text-align: right; font-variant-numeric: tabular-nums; }
.watcher-discovery-value.is-positive { color: #9ceba7; font-weight: 650; font-size: 1rem; }
.watcher-discovery-empty { margin: 0; padding: 14px 0 8px; color: var(--color-muted); font-size: .85rem; line-height: 1.5; }
.watcher-discovery-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; color: var(--color-subtle); font-size: .75rem; }
.watcher-discovery-actions > div { display: flex; gap: 14px; }
.watcher-discovery-actions button { padding: 5px 0; border: 0; background: transparent; color: #a9c6ec; font: inherit; cursor: pointer; }
.watcher-discovery-actions button:hover { color: var(--watcher-blue); text-decoration: underline; }
.watcher-discovery-actions:has(> span:empty) { display: none; }
.watcher-collection-progress { display: block; width: 100%; height: 4px; margin-top: 5px; border: 0; border-radius: 4px; overflow: hidden; appearance: none; background: var(--color-surface-2); }
.watcher-collection-progress::-webkit-progress-bar { background: var(--color-surface-2); }
.watcher-collection-progress::-webkit-progress-value { background: var(--watcher-blue); }
.watcher-collection-progress::-moz-progress-bar { background: var(--watcher-blue); }
.watcher-page #risingNote { margin-top: 8px; font-size: .75rem; }
.watcher-row-skeleton { height: 68px; margin-bottom: 1px; border-radius: 4px; }
.watcher-page .games-grid:not(.watcher-game-list) { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.watcher-page .game-card { border-radius: 8px; }
.watcher-page .game-body { min-height: 104px; padding: 16px; }
.watcher-page .game-body h3 { font-size: 1.08rem; line-height: 1.3; }
.watcher-page .game-body p { font-size: .9rem; margin-top: 8px; }
.watcher-page .game-body .player-share { font-size: .82rem; }
.watcher-page .player-badge { bottom: 10px; right: 10px; padding: 7px 10px; font-size: .9rem; }
.watcher-page .bubble-chart-card { height: 500px; border-radius: 10px; }
.watcher-discovery-drawer { min-width: 0; scroll-margin-top: calc(var(--header-height) + 18px); }
.watcher-discovery-drawer > summary { display: none; }
.watcher-rising-range { min-height: 30px !important; }
.watcher-rising-range .segment-btn { min-height: 24px; padding: 3px 7px; font-size: .67rem; }
.watcher-popularity-detail { display: block; margin-top: 3px; color: var(--color-muted); font-size: .69rem; font-weight: 400; white-space: nowrap; }
.watcher-layout.is-bubble-view { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.watcher-layout.is-bubble-view #chartCardWrapper { height: clamp(560px, 72vh, 820px) !important; margin-top: 0; }
.watcher-layout.is-bubble-view .watcher-discovery-drawer { border: 1px solid var(--color-border); border-radius: 9px; background: #182130; }
.watcher-layout.is-bubble-view .watcher-discovery-drawer > summary { display: flex; align-items: center; gap: 14px; padding: 13px 16px; cursor: pointer; color: var(--color-text-soft); font-size: .8rem; font-weight: 600; }
.watcher-layout.is-bubble-view .watcher-discovery-drawer > summary::after { content: '+'; margin-left: auto; color: var(--color-subtle); font-size: 1.1rem; }
.watcher-layout.is-bubble-view .watcher-discovery-drawer[open] > summary::after { content: '−'; }
.watcher-layout.is-bubble-view .watcher-discovery-drawer > summary span { color: var(--color-subtle); font-size: .72rem; font-weight: 400; }
.watcher-layout.is-bubble-view .watcher-discovery { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 12px 16px 18px; gap: 24px; }
.watcher-layout.is-bubble-view .watcher-discovery-section:first-child { grid-column: auto; }
.watcher-page [hidden] { display: none !important; }
@media (max-width: 1100px) {
  .watcher-layout { grid-template-columns: minmax(0, 1fr) 28px 320px; gap: 12px; }
  .watcher-page .watcher-controls { grid-template-columns: minmax(130px, 1fr) 132px !important; }
  .watcher-options { justify-self: end; }
  .watcher-thumbnail { width: 60px; height: 38px; }
  .watcher-game-identity { gap: 8px; }
  .watcher-list-heading,
  .watcher-game-row-link { gap: 10px; }
}
@media (max-width: 800px) {
  .watcher-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .watcher-layout.is-discovery-collapsed { grid-template-columns: minmax(0, 1fr); }
  .watcher-sidebar-control { grid-column: 1; grid-row: 2; height: 0; }
  .watcher-sidebar-control::before { display: none; }
  .watcher-sidebar-toggle { position: fixed; z-index: 20; top: auto; right: 14px; bottom: 20px; width: 36px; background: var(--color-bg-elevated); box-shadow: 0 3px 12px #0004; }
  .watcher-discovery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
  .watcher-discovery-section:first-child { grid-column: 1 / -1; }
  .watcher-page .stats-panel { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 22px; }
  .watcher-history { margin-bottom: 28px; }
  .watcher-page .tool-hero { align-items: flex-start; }
  .watcher-layout.is-bubble-view .watcher-discovery { grid-template-columns: minmax(0, 1fr); }
  .watcher-layout.is-bubble-view #chartCardWrapper { height: clamp(480px, 70vh, 680px) !important; }
}
@media (max-width: 480px) {
  .watcher-page .tool-page { padding-top: 28px; }
  .watcher-page .tool-hero { flex-direction: column; gap: 15px; }
  .watcher-page .watcher-hero-actions { display: flex; flex-direction: row; align-items: center; width: auto; gap: 12px; }
  .watcher-page .refresh-button { width: auto; min-height: 34px; padding-inline: 12px; font-size: .75rem; }
  .watcher-page .metric-card strong { font-size: 1.7rem; }
  .watcher-history { padding: 16px 14px 14px; }
  .watcher-history .watcher-panel-heading { flex-direction: column; align-items: flex-start; gap: 10px; }
  .watcher-history-plot { height: 185px; margin-top: 20px; }
  .watcher-list-heading { grid-template-columns: minmax(0, 1fr) 42px 48px 28px; gap: 7px; padding-inline: 0; }
  .watcher-game-row { grid-template-columns: minmax(0, 1fr) 28px; gap: 7px; padding: 11px 0; }
  .watcher-game-row-link { grid-template-columns: minmax(0, 1fr) 42px 48px; gap: 7px; }
  .watcher-game-row .watcher-rank { display: none; }
  .watcher-thumbnail { width: 52px; height: 34px; }
  .watcher-game-name strong { font-size: .76rem; }
  .watcher-game-name small { font-size: .62rem; }
  .watcher-discovery { grid-template-columns: minmax(0, 1fr); }
  .watcher-page .games-grid:not(.watcher-game-list) { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .watcher-page .game-body { min-height: 94px; padding: 12px; }
  .watcher-page .game-body h3 { font-size: .98rem; }
  .watcher-page .game-body p { font-size: .82rem; }
  .watcher-page .player-badge { padding: 5px 7px; font-size: .8rem; }
  .watcher-chart-caption { font-size: .65rem; }
}
/* Keep the primary controls uncluttered; tags have their own compact row. */
.watcher-tag-filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 18px; }
.watcher-tag-filters .select-field { flex: 0 1 210px; min-width: 140px; }
