/* UI-only overlay. Do not change IDs, JS, or API semantics.
   Source: Gemini 3.8 turn-0006, mapped onto real selectors. */
:root {
  --yc-sky: #4fa7de;
  --yc-sky-subtle: rgba(79, 167, 222, 0.14);
  --yc-mint-subtle: rgba(126, 207, 186, 0.16);
  --yc-coral: #f59b73;
  --yc-coral-ink: #482312;
  --yc-ink: #203142;
  --yc-ink-muted: #556c82;
  --yc-paper: rgba(255, 253, 248, 0.86);
  --yc-line: rgba(79, 167, 222, 0.2);
  --yc-shadow: 0 2px 8px rgba(32, 49, 66, 0.05);
  --yc-radius: 10px;
  --yc-chip: 8px;
  --yc-ease: 120ms cubic-bezier(0.2, 0, 0, 1);
}

.summer-companion {
  pointer-events: none;
}

@media (min-width: 1231px) {
  body:not([data-console-open="true"]):not([data-active-view="frontier-news"]) .summer-companion {
    right: max(-48px, calc((100vw - 1480px) / 2 - 32px));
  }
}

.console-gate-card,
.news-intel-panel,
.public-stats,
.rank-paper,
.newspaper-header,
.newspaper-content,
.news-toolbar {
  position: relative;
  z-index: 2;
}

body[data-active-view="frontier-news"] .summer-companion {
  width: 132px;
  right: -28px;
  bottom: 0;
  -webkit-mask-image: linear-gradient(to left, #000 55%, transparent 100%);
  mask-image: linear-gradient(to left, #000 55%, transparent 100%);
}

@media (max-width: 1230px) {
  body[data-active-view="frontier-news"] .summer-companion {
    display: none;
  }
}

#newApiDashboardLoginButton,
#summerEnterConsole {
  min-height: 44px;
  border-radius: var(--yc-radius);
  background: var(--yc-coral);
  color: var(--yc-coral-ink);
  font-weight: 600;
  letter-spacing: 0;
  border: 1px solid #df9469;
  box-shadow: 0 0 0 1px rgba(220, 114, 74, 0.18), 0 4px 12px rgba(245, 155, 115, 0.35);
}

.agent-run-button,
.search-button.agent-run-button {
  min-height: 40px;
  border-radius: var(--yc-radius);
  background: var(--yc-sky);
  color: #fff;
  font-weight: 600;
  border: 1px solid #3d8fc8;
  box-shadow: 0 3px 10px rgba(79, 167, 222, 0.28);
}

#refreshNews,
#summerRefreshChannels,
.dashboard-refresh-button,
#newApiConsoleLogoutButton,
#summerLogout,
.motion-toggle {
  min-height: 38px;
  border-radius: var(--yc-radius);
  background: var(--yc-paper);
  color: var(--yc-ink);
  border: 1px solid var(--yc-line);
  box-shadow: var(--yc-shadow);
  font-weight: 600;
}

#newApiConsoleLogoutButton,
#summerLogout {
  color: #9b2c2c;
}

#newApiStatusPill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--yc-chip);
  background: var(--yc-mint-subtle);
  color: #1e6b58;
  font-weight: 500;
  font-size: 13px;
  border: 1px solid rgba(126, 207, 186, 0.45);
  box-shadow: none;
  cursor: default;
}

.news-filter-button,
.news-filter-tab,
.channel-family-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--yc-chip);
  background: rgba(255, 255, 248, 0.72);
  color: var(--yc-ink-muted);
  border: 1px solid var(--yc-line);
  font-weight: 500;
  box-shadow: none;
}

.news-filter-button.active,
.news-filter-tab.active,
.channel-family-tabs button[aria-pressed="true"] {
  background: var(--yc-sky-subtle);
  color: #1f6b99;
  border-color: var(--yc-sky);
  font-weight: 500;
}

.motion-toggle {
  left: 12px;
  right: auto;
  bottom: 12px;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
  opacity: 0.78;
  color: var(--yc-ink-muted);
}

body[data-console-open="true"] .motion-toggle {
  left: auto;
  right: 16px;
}

.public-stats .value,
.newapi-metric strong,
.usage-query-card > strong,
.painted-podium .podium-score,
#rankRows .row .score,
#rankRows .pill {
  font-variant-numeric: tabular-nums;
}

.newapi-button:focus-visible,
.news-filter-button:focus-visible,
.motion-toggle:focus-visible,
.agent-run-button:focus-visible {
  outline: 2px solid var(--yc-sky);
  outline-offset: 2px;
}

.newapi-button:active,
.news-filter-button:active,
.motion-toggle:active,
.agent-run-button:active {
  transform: scale(0.97);
}

@media (hover: hover) {
  #newApiDashboardLoginButton:hover,
  #summerEnterConsole:hover,
  .agent-run-button:hover,
  #refreshNews:hover,
  #summerRefreshChannels:hover,
  .dashboard-refresh-button:hover,
  .motion-toggle:hover {
    transform: translateY(-1px);
  }
  .motion-toggle:hover {
    opacity: 1;
  }
  .news-filter-button:hover:not(.active),
  .channel-family-tabs button:hover:not([aria-pressed="true"]) {
    color: var(--yc-ink);
  }
}

@media (prefers-reduced-motion: reduce) {
  .newapi-button,
  .news-filter-button,
  .motion-toggle,
  .agent-run-button {
    transition: none;
    transform: none;
  }
}

/* Center the public stage; match image2: one column, title on sky. */
body.yelan-watercolor:not([data-console-open="true"]) .app {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.topbar,
.view-switch.public-tabs,
#leaderboardView,
#frontierNewsView {
  width: 100%;
  max-width: none;
}

.topbar {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding-left: 4px;
  padding-right: 4px;
}

.view-switch.public-tabs {
  background: transparent;
  box-shadow: none;
  border-bottom-color: rgba(246, 241, 219, 0.55);
}

#leaderboardView {
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-areas:
    "stats login"
    "board login"
    "ticker ticker";
  justify-content: center;
}

#frontierNewsView {
  width: 100%;
}

.frontier-news-panel {
  width: 100%;
}

/* Console modules sit on a centered column in the content pane. */
body[data-console-open="true"] .app {
  max-width: none;
}

.console-content {
  display: block;
}

.console-content > .console-page,
.console-content > .console-page-main {
  width: 100%;
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.dashboard-overview {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dashboard-overview > .newapi-card-head {
  background: url("./paper.webp") #fcf8ee;
  border: 1px solid var(--wc-line, #d9caaa);
  border-radius: 12px;
  box-shadow: var(--yc-shadow);
}

.dashboard-usage-metrics .newapi-metric,
.dashboard-hourly-card,
.dashboard-state-metrics .newapi-metric {
  background: url("./paper.webp") #fcf8ee;
}

@media (max-width: 1000px) {
  #leaderboardView {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "stats"
      "login"
      "board"
      "ticker";
  }
}

@media (max-width: 700px) {
  .console-content > .console-page,
  .console-content > .console-page-main {
    max-width: none;
  }
}
