/* One brand mark, a quiet status rail, and the existing working controls. */
.app-shell .glass-topbar {
  min-height: 56px; margin: 0 0 22px; padding: 0 0 12px;
  border-bottom: 1px solid var(--mc-line); gap: 16px;
  background: var(--mc-pearl); box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.app-shell .glass-topbar .glass-wordmark { display: none; }
.app-shell:has(.mc-weather-bar[aria-label="MindCoda Live View"]) .glass-topbar [data-header-weather] { display: none!important; }
.app-shell .glass-topbar .glass-time-weather { margin-left: auto; background: none; box-shadow: none; border: 0; }
.app-shell .glass-topbar .glass-clock { display: flex; align-items: center; gap: 14px; }
.app-shell .glass-topbar .glass-clock>[data-dashboard-date] { color: var(--mc-ink-secondary); font-size: 14px; line-height: 1.5; }
.app-shell .glass-topbar .coda-thread {
  min-height: 48px; max-width: min(460px,65vw); padding: 8px 12px;
  border: 1px solid var(--mc-line); border-radius: 12px;
  background: var(--mc-surface); color: var(--mc-ink); box-shadow: none;
}
.app-shell .glass-topbar .coda-thread>:is(img,.coda-thread__orb) { display: none; }
.app-shell .glass-topbar .coda-thread__identity { gap: 3px; }
.app-shell .glass-topbar .coda-thread__identity strong { font-size: 14px; line-height: 1.4; }
.app-shell .glass-topbar :is(.coda-thread__subtitle,.coda-thread__live) { font-size: 14px; line-height: 1.4; color: var(--mc-ink-secondary); }
.app-shell .glass-topbar .coda-thread__subtitle { max-width: 32ch; }

/* The weather projection and owner preferences remain active. Decoration is
   restrained here; forecast, focus, cloud and accessibility states stay real. */
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] { margin: 0 0 20px; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather {
  --header-panel: var(--mc-surface); --header-ink: var(--mc-ink);
  --header-muted: var(--mc-ink-secondary); --header-line: var(--mc-line);
  display: grid; grid-template-columns: minmax(0,1fr) auto auto;
  gap: 12px 16px; padding: 14px 0;
  color: var(--header-ink); background: var(--header-panel)!important;
  border: 0; border-block: 1px solid var(--header-line); border-radius: 0;
  box-shadow: none!important; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather[data-live-text="light"] {
  --header-panel: #152333; --header-ink: #edf4fa; --header-muted: #c0d0dc; --header-line: #405567;
  padding-inline: 16px;
}
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather::before,
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] :is(.mc-live-environment,.mc-app-weather__birds) { display: none!important; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-header { display: contents; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-identity { grid-column: 1; grid-row: 1; min-width: 0; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather__clock { color: var(--header-ink); }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather__clock time { font-size: 17px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather__details { grid-column: 3; grid-row: 1; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather__details>summary {
  display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 10px;
  font-size: 14px; color: var(--header-ink);
}
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather__temperature { font-size: 20px; line-height: 1.3; color: var(--header-ink); }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather__focus {
  grid-column: 2; grid-row: 1; display: inline-flex; align-items: center; gap: 8px;
  justify-self: end; min-height: 48px; padding: 10px 12px; font-size: 14px; color: var(--header-ink);
}
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather__focus>[data-live-focus] { display: inline; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] :is(.mc-live-icon,.mc-app-weather__focus,.mc-app-weather__details>summary,.mc-live-ai,.mc-live-analog) {
  border: 1px solid var(--header-line); border-radius: 10px;
  background: var(--header-panel); color: var(--header-ink); box-shadow: none;
}
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] :is(.mc-live-icon,.mc-app-weather__focus,.mc-app-weather__details>summary):hover { border-color: var(--header-ink); background: var(--header-panel); }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-actions { grid-column: 1 / -1; grid-row: 2; gap: 8px; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-icon {
  min-width: 48px; min-height: 48px; padding: 10px 12px;
  font-size: 14px; line-height: 1.4; border-color: transparent;
}
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-action-label { font-size: 14px; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-actions:has([data-live-more][data-live-overflow-ready])>:is([data-live-breathe],[data-live-customize],[data-signout]) { display: none; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-ai { grid-column: 1 / -1; grid-row: 3; min-height: 48px; padding: 10px 12px; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-ai__heading,
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-ai__heading strong { font-size: 14px; line-height: 1.5; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-ai__fill { background: var(--mc-teal); box-shadow: none; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-upcoming { grid-column: 1 / -1; grid-row: 4; grid-template-columns: auto repeat(2,minmax(0,1fr)); gap: 8px 16px; padding-top: 10px; border-top: 1px solid var(--header-line); }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] :is(.mc-live-upcoming__heading,.mc-live-upcoming__heading button,.mc-live-upcoming .mc-live-item) { min-height: 48px; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] :is(.mc-live-upcoming__heading button,.mc-live-upcoming .mc-live-item strong,.mc-live-upcoming .mc-live-item__timing) { font-size: 14px; line-height: 1.5; color: var(--header-ink); }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-upcoming .mc-live-item strong { white-space: normal; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-popover { background: var(--header-panel); color: var(--header-ink); border-color: var(--header-line); box-shadow: 0 10px 24px #00000014; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-popover :is(span,small,a,button) { font-size: 14px; line-height: 1.6; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-popover button { min-height: 48px; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather[data-live-text-size="larger"] .mc-app-weather__clock time { font-size: 20px; }
.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather:is([data-live-text-size="larger"],[data-weather-size="larger"]) .mc-app-weather__temperature { font-size: 24px; }
.mc-live-panel :is(.mc-live-item,.mc-live-panel__close,.mc-live-read) { min-height: 48px; font-size: 16px; }
.mc-live-panel :is(.mc-live-panel__note,.mc-live-custom__row) { font-size: 14px; line-height: 1.6; }

@media(max-width:760px) {
  .app-shell .glass-topbar { gap: 12px; padding-bottom: 12px; margin-bottom: 20px; }
  .app-shell .glass-topbar .glass-wordmark { display: flex; flex: none; gap: 8px; font-size: 17px; color: var(--mc-ink); }
  .app-shell .glass-topbar .glass-wordmark img { width: 28px; height: 28px; }
  .app-shell .glass-topbar .glass-clock>[data-dashboard-date] { display: none; }
  .app-shell .glass-topbar .coda-thread { max-width: 47vw; padding: 8px 10px; }
  .app-shell .glass-topbar .coda-thread__subtitle { max-width: 16ch; }
  .app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather { grid-template-columns: minmax(0,1fr) auto!important; gap: 10px!important; }
  .app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-identity { grid-column: 1!important; grid-row: 1!important; }
  .app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather__details { grid-column: 2!important; grid-row: 1!important; }
  .app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather__focus { grid-column: 1 / -1!important; grid-row: 3!important; justify-self: stretch; justify-content: center; }
  .app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-actions {
    display: flex!important; grid-column: 1 / -1!important; grid-row: 2!important;
    width: 100%; max-width: none!important; min-width: 0; box-sizing: border-box;
    flex-wrap: nowrap!important; justify-self: stretch!important; gap: 4px!important;
  }
  .app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-icon { flex: 1 1 0; width: auto; min-width: 48px; max-width: none; flex-direction: column; gap: 5px; padding: 10px 6px; }
  .app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-ai { grid-column: 1 / -1!important; grid-row: 4!important; }
  .app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-upcoming { grid-column: 1 / -1!important; grid-row: 5!important; grid-template-columns: minmax(0,1fr); }
  .app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-live-upcoming>* { grid-column: 1; grid-row: auto; }
}
@media(prefers-contrast:more) {
  .app-shell .glass-topbar,.app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather { border-color: var(--mc-ink); }
}
@media(forced-colors:active) {
  .app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather,
  .app-shell .mc-weather-bar[aria-label="MindCoda Live View"] .mc-app-weather[data-live-text] { --header-panel: Canvas; --header-ink: CanvasText; --header-muted: CanvasText; --header-line: CanvasText; }
}
