:root {
  color-scheme: dark;
  /* Original My Dashboard palette (kept from mydashboard.zip). */
  --page: #1e1e2f;
  --panel: #2c2c3e;
  --panel2: #1e1e1e;
  --line: #424253;
  --muted: #aaa;
  --text: #f0f0f0;
  --accent: #00bfff;
  --accent-2: #00bfff;
  --radius: 10px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 15px/1.5 Arial, Helvetica, sans-serif;
}
button, input { font: inherit; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.shell { width: 100%; margin: 0; padding: 20px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 6px 0 3px; font-size: clamp(1.65rem, 3vw, 2.35rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.16; }
h2 { margin: 0; font-size: 1.09rem; font-weight: 700; color: var(--accent); }
h3 { font-size: .94rem; }
.title-light { color: #bbb; font-weight: 450; }
.muted { color: var(--muted); }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin: 4px 0 24px; }
.intro { margin-bottom: 0; font-size: .87rem; }
.header-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.secondary-button { background: #333; color: #f0f0f0; border: 1px solid #555; border-radius: 10px; padding: 9px 14px; cursor: pointer; }
.secondary-button:hover { background: #444; }
.section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: none; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 19px; }
.section-hint, .subtle-label { color: #aaa; font-size: .74rem; }
.subtle-label { margin: 13px 0 0; }
.search-section { position: relative; padding: 0; z-index: 4; background: transparent; border: 0; }
.search-wrap { display: flex; align-items: center; gap: 12px; padding: 0 13px; border-radius: 8px; background: #fff; }
.search-icon { color: #444; font-size: 1.6rem; line-height: 1; }
.search-input { width: 100%; min-width: 0; padding: 14px 0; border: none; outline: 0; background: transparent; color: #111; font-size: 16px; }
.search-input:focus-visible { outline: 0; }
.search-input::placeholder { color: #666; }
kbd { border: 1px solid #aaa; border-radius: 5px; padding: 1px 8px; color: #555; font: .85rem monospace; }
.suggestions { display: none; list-style: none; position: absolute; top: calc(100% - 1px); left: 8px; right: 8px; margin: 0; padding: 5px; max-height: 280px; overflow: auto; border: 1px solid #555; border-radius: 0 0 12px 12px; background: #1e1e1e; box-shadow: 0 12px 30px #0009; }
.suggestions.is-visible { display: block; }
.suggestion { padding: 10px 12px; border-radius: 7px; cursor: pointer; }
.suggestion:hover,.suggestion.is-highlighted { background: #444455; }
.suggestion--search { color: var(--accent); border-top: 1px solid #555; }
.overview-grid { display: flex; flex-wrap: wrap; align-items: stretch; gap: 20px; }
.overview-grid > .section { min-width: 250px; flex: 1 1 300px; }
.overview-card { min-height: 184px; }
.clock-text { font-size: clamp(1.13rem,2vw,1.5rem); font-weight: 650; color: #f0f0f0; line-height: 1.7; }
.weather-preview { display: flex; align-items: center; gap: 18px; }
.weather-symbol { font-size: 3.4rem; color: #00bfff; line-height: 1; }
.weather-preview > div { display: flex; flex-direction: column; }
.weather-preview strong { font-size: 2.3rem; line-height: 1.2; }
.weather-preview div span { font-size: .82rem; color: var(--muted); }
.bookmarks-grid, .service-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.bookmark { width: 120px; flex: 0 0 120px; min-height: 106px; padding: 15px 8px 11px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; text-decoration: none; border: 1px solid #414152; border-radius: 13px; background: var(--panel2); text-align: center; transition: .18s ease; }
.bookmark:hover { transform: translateY(-3px); border-color: #00bfff; background: #393949; }
.bookmark img { width: 48px; height: 48px; object-fit: contain; }
.bookmark span { font-size: .78rem; font-weight: 650; }
.group-heading { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: end; margin: 29px 0 13px; }
.group-heading h2 { font-size: 1.35rem; margin-top: 4px; }
.group-heading p { font-size: .8rem; margin: 0; }
.collapsible-container { margin-bottom: 10px; border-radius: 13px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.collapsible-button { width: 100%; padding: 16px 20px; background: transparent; color: #f0f0f0; border: 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; text-align: left; font-weight: 650; cursor: pointer; }
.collapsible-button:hover,.collapsible-button[aria-expanded="true"] { background: #444; }
.collapsible-button > span:first-child { display: flex; align-items: center; gap: 13px; }
.collapsible-button > span:first-child > span { color: var(--accent); font-size: 1.3rem; }
.chevron { transition: transform .2s; font-size: 1.2rem; color: #aaa; }
.collapsible-button[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.collapsible-content { display: none; border-top: 1px solid var(--line); padding: 21px; }
.collapsible-content.is-open { display: block; }
.collapsible-content > p { margin-bottom: 18px; font-size: .84rem; }
.metric-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.metric,.stat-tile { border: 1px solid #4c4c60; background: #23232f; border-radius: 10px; padding: 16px; }
.metric > span,.stat-label { color: var(--muted); font-size: .78rem; }
.metric > strong,.stat-tile > strong { display: block; font-size: 1.24rem; margin: 5px 0 11px; }
.meter { width: 100%; height: 6px; overflow: hidden; border-radius: 99px; background: #555; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.sample-entities { display: grid; gap: 0; }
.sample-entities > div { display: flex; justify-content: space-between; gap: 15px; padding: 11px; border-top: 1px solid var(--line); }
.sample-entities strong { color: #dedede; }
.catalogue-heading { margin: 23px 0 10px; color: #00bfff; font-size: .85rem; }
.service-grid { justify-content: flex-start; }
.service-tile { display: flex; align-items: center; flex-direction: column; justify-content: center; width: 120px; flex: 0 0 120px; min-height: 106px; gap: 9px; padding: 13px 7px; background: #23232f; border: 1px solid #414152; border-radius: 10px; font-size: .73rem; text-align: center; }
.service-tile img { width: 34px; height: 34px; object-fit: contain; }
.widget-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 20px; }
.widget-row > .section { flex: 1 1 350px; width: 350px; max-width: 350px; min-width: 250px; }
.connection-row { display: flex; align-items: center; gap: 8px; padding: 4px 0 14px; }
.connection-row .small-tag { margin-left: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.stat-tile { padding: 14px 15px; }
.stat-tile strong { font-size: 1.2rem; margin: 5px 0 0; }
.ha-light-widget { border-radius: 12px; padding: 16px; background: #23232f; border: 1px solid #414152; }
.light-header { display: flex; justify-content: space-between; align-items: start; }
.light-header .muted { margin: 3px 0 0; font-size: .79rem; }
.ha-light-label { font-weight: 700; color: #ffae00; }
.light-indicator { width: 32px; height: 32px; border: 2px solid #666; background: #393939; border-radius: 50%; transition: .2s; }
.light-indicator.light-on { background: #ffd600; border-color: #fff1a1; box-shadow: 0 0 18px #ffd60077; }
.ha-light-brightness { display: grid; grid-template-columns: 1fr auto; gap: 7px 14px; align-items: center; margin-top: 25px; }
.ha-light-brightness > label { grid-column: 1/-1; font-size: .76rem; color: var(--muted); }
.ha-light-brightness input[type="range"] { width: 100%; accent-color: #ffd600; }
.ha-brightness-value { display: flex; align-items: center; gap: 5px; }
.ha-brightness-value input { width: 52px; padding: 5px 4px; border: 1px solid #555; background: #181818; color: white; border-radius: 5px; text-align: right; }
.ha-brightness-apply { border: 1px solid #555; border-radius: 6px; background: #333; color: white; padding: 6px 9px; cursor: pointer; }
.ha-brightness-apply:hover { background: #444; }
.ha-toggle { margin-top: 20px; display: inline-flex; gap: 10px; align-items: center; border-radius: 9px; border: 1px solid #ffd600; background: #ffd600; padding: 8px 13px; font-weight: 700; color: #181818; cursor: pointer; }
.ha-toggle.off { background: #393939; border-color: #555; color: white; }
.ha-toggle:hover { filter: brightness(1.09); }
.lower-grid { display: block; }
.media-row { display: flex; gap: 13px; align-items: start; border-bottom: 1px solid #414152; padding: 6px 0 16px; margin-bottom: 14px; }
.media-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.media-avatar { width: 43px; height: 58px; flex: 0 0 auto; border-radius: 7px; background: linear-gradient(130deg,#444,#333); display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; color: #f0f0f0; }
.media-body { width: 100%; min-width: 0; display: flex; flex-direction: column; }
.media-user { color: #aaa; font-size: .7rem; }
.media-title { margin-top: 2px; font-size: .89rem; }
.media-meta { color: #aaa; font-size: .73rem; }
.media-progress { margin-top: 9px; height: 4px; }
.feed-subheading { color: #ddd; margin: 16px 0 8px; }
.feed-item { display: flex; justify-content: space-between; align-items: center; gap: 13px; border-bottom: 1px solid #414152; padding: 9px 0; }
.feed-item strong { font-size: .83rem; }
.feed-item span { text-align: right; color: #aaa; font-size: .73rem; }
.sports-section { margin-top: 0; }
.sports-competition { padding: 14px 18px; border: 1px solid #414152; border-radius: 12px; margin-bottom: 10px; background: #23232f; }
.sports-title { font-weight: 750; color: #00bfff; margin: 0 0 10px; }
.sports-game { display: grid; grid-template-columns: 115px minmax(0,1fr) 70px; align-items: center; gap: 13px; padding: 10px 0; border-top: 1px solid #414152; }
.game-date { color: #aaa; font-size: .78rem; }
.game-teams { font-size: .86rem; font-weight: 550; }
.game-time { text-align: right; color: var(--accent); font-size: .81rem; }
.demo-label { color: #aaa; font-size: .78rem; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; padding: 25px 0; color: #aaa; border-top: 1px solid #414152; font-size: .76rem; }
.status-message { color: var(--muted); }
.status-message--error { color: #ff9696; }
/* Basic styles for the original real-integration renderers if used locally. */
.stats-list { padding: 0; list-style: none; }
#now-playing ul { list-style: none; padding: 0; }
.session { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.session img { width: 45px; height: 45px; }
.session-details h3 { margin-bottom: 2px; }
.session-details small { color: var(--muted); }
#cinema-feed a,#games-feed a,#sports-feed a { text-decoration: none; color: var(--accent); }
/* Responsive behavior from the original dashboard:
   full-width content, flexible clock/weather panels, fixed-width bookmarks,
   and compact monitoring widgets that wrap instead of stretching. */
@media (max-width: 700px) {
  .shell { padding: 14px; }
  .section { padding: 16px; }
  .overview-grid, .bookmarks-grid, .service-grid, .widget-row { gap: 14px; }
  .bookmarks-grid, .service-grid { justify-content: center; }
  .bookmark, .service-tile { width: 105px; flex-basis: 105px; }
  .widget-row { display: block; }
  .widget-row > .section { width: 100%; max-width: none; min-width: 0; }
  .sports-title { align-items: flex-start; flex-direction: column; }
  .sports-game { grid-template-columns: minmax(0,1fr) 65px; gap: 4px 8px; }
  .game-date { grid-column: 1 / 3; }
  .site-header { align-items: flex-start; }
  .ha-light-brightness { grid-template-columns: minmax(0,1fr) auto; }
}
@media (max-width: 400px) {
  .metric-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sample-entities > div { align-items: flex-start; flex-direction: column; gap: 2px; }
  .feed-item { align-items: flex-start; flex-direction: column; gap: 0; }
  .feed-item span { text-align: left; }
  .ha-light-brightness { grid-template-columns: 1fr; }
  .ha-brightness-value { justify-content: flex-start; }
  .search-wrap { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Subtle preview status; the README has the full explanation. */
.connection-dot { display: inline-block; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.connection-row { color: var(--muted); }
.bookmark:hover { border-color: var(--accent); }
.sports-title { color: var(--accent); }
