.news-console {
  align-items: stretch;
}

/* Reproductor musical: ocupa el espacio decorativo libre del reloj principal. */
.dashboard-v14 .time-console > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.dashboard-v14 .music-dock {
  flex: 0 0 clamp(285px, 28vw, 410px);
  align-self: stretch;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 29px;
  gap: 5px;
  width: clamp(285px, 28vw, 410px);
  min-width: 0;
  max-height: 166px;
}

.music-screen {
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(26, 143, 114, .34);
  border-radius: 5px;
  background: #050706;
  box-shadow: 0 6px 16px rgba(23, 97, 78, .13);
}

.music-screen iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.music-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-height: 0;
}

.music-tabs button {
  min-width: 0;
  min-height: 29px;
  overflow: hidden;
  padding: 0 4px;
  border: 1px solid #cbd5d0;
  border-radius: 4px;
  background: #f5f7f5;
  color: #39443f;
  font: 800 9px/1 system-ui, sans-serif;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.music-tabs button.active {
  border-color: #16896c;
  background: #16896c;
  color: #fff;
  box-shadow: 0 3px 8px rgba(22, 137, 108, .2);
}

.youtube-account {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  text-decoration: none;
}

.youtube-account::before {
  content: "▶";
  margin-right: 9px;
  color: #d91f26;
  font-size: 16px;
}

@media (min-width: 701px) and (max-width: 1100px) {
  .dashboard-v14 .time-console {
    gap: 16px;
  }

  .dashboard-v14 .music-dock {
    flex-basis: clamp(250px, 32vw, 335px);
    width: clamp(250px, 32vw, 335px);
    max-height: 158px;
  }
}

@media (max-width: 700px) {
  .dashboard-v14 .music-dock {
    display: none;
  }
}

.news-dashboard-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  min-width: 0;
}

.saved-news-shelf {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 7px 9px;
  border-top: 1px solid #d8e4df;
  background: #f8fbf9;
}

.saved-news-shelf header {
  display: grid;
  gap: 2px;
}

.saved-news-shelf header span {
  color: #007d66;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.saved-news-shelf header button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #17231e;
  font-size: 10px;
  font-weight: 850;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.saved-news-shelf > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.saved-news-shelf a,
.saved-news-shelf > div > span {
  overflow: hidden;
  padding: 5px 7px;
  border-left: 3px solid #00a681;
  background: #fff;
  color: #19231f;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.15;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-news-shelf > div > span {
  grid-column: 1 / -1;
  color: #6b7872;
}

.morning-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-color: #91b9aa !important;
  background: #eff8f4 !important;
  color: #086b58 !important;
}

.morning-save span {
  font-size: 22px;
  line-height: 1;
}

.morning-save.is-saved,
.morning-save:disabled.is-saved {
  border-color: #008b70 !important;
  background: #008b70 !important;
  color: #fff !important;
  opacity: 1;
}

.morning-overlay footer {
  grid-template-columns: minmax(76px, .36fr) minmax(110px, .52fr) minmax(110px, .52fr) minmax(170px, 1fr);
  width: min(780px, 100%);
}

.world-headline-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #cad8d2;
  border-left: 5px solid #009778;
  background: #f3f8f5;
}

.world-headline-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.world-headline-copy > span {
  color: #007d66;
  font-size: 11px;
  font-weight: 900;
}

.world-headline-copy a {
  display: -webkit-box;
  overflow: hidden;
  color: #0b1713;
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 900;
  line-height: 1.15;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.world-headline-copy a:hover {
  color: #007d66;
  text-decoration: underline;
}
.world-headline-copy p { margin: 6px 0 0; color: var(--ink); font-size: clamp(12px, 1vw, 15px); line-height: 1.45; }

.world-headline-copy small {
  overflow: hidden;
  color: #59645f;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-headline-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.world-headline-actions button {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #adc1b8;
  border-radius: 5px;
  background: #fff;
  color: #17231e;
  font: 800 11px/1 system-ui, sans-serif;
  cursor: pointer;
}

.world-headline-actions button:first-child:not(:disabled) {
  border-color: #008f72;
  background: #008f72;
  color: #fff;
}

.world-headline-actions button:disabled {
  color: #00785f;
  cursor: default;
  opacity: 1;
}

.saved-news-dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: min(82dvh, 760px);
  padding: 0;
  border: 1px solid #9db5aa;
  border-radius: 8px;
  background: #fff;
  color: #0b1713;
  box-shadow: 0 24px 80px rgb(0 35 27 / 25%);
}

.saved-news-dialog::backdrop {
  background: rgb(2 16 12 / 66%);
  backdrop-filter: blur(4px);
}

.saved-news-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #d9e4df;
  background: #f1f7f4;
}

.saved-news-dialog header span {
  color: #00866b;
  font-size: 11px;
  font-weight: 900;
}

.saved-news-dialog h2 {
  margin: 3px 0 0;
  font-size: 24px;
}

.saved-news-dialog header > button {
  width: 42px;
  height: 42px;
  border: 1px solid #b7c9c1;
  border-radius: 50%;
  background: #fff;
  color: #183129;
  font-size: 26px;
  cursor: pointer;
}

.saved-news-list {
  display: grid;
  gap: 8px;
  max-height: calc(82dvh - 100px);
  padding: 14px;
  overflow: auto;
}

.saved-news-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid #d9e3df;
  border-left: 4px solid #00a681;
  background: #fff;
}

.saved-news-item > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.saved-news-item a {
  color: #101b17;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
}

.saved-news-item small {
  color: #607068;
  font-weight: 700;
}

.saved-news-item > button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #d9a7a7;
  border-radius: 5px;
  background: #fff;
  color: #9a2929;
  font-weight: 800;
  cursor: pointer;
}

.saved-news-empty {
  margin: 0;
  padding: 42px 20px;
  color: #607068;
  font-weight: 750;
  text-align: center;
}

@media (min-width: 701px) and (max-width: 1180px) {
  .news-console {
    grid-template-columns: minmax(145px, .42fr) minmax(0, 1.58fr) !important;
  }

  .news-dashboard-body {
    gap: 7px;
  }

  .world-headline-card {
    padding: 8px 10px;
  }

  .world-headline-copy a {
    font-size: 13px;
  }

  .world-headline-actions button {
    min-height: 34px;
    padding: 0 7px;
  }

  .dashboard-v14 .month-grid {
    display: grid !important;
    grid-template-rows: 14px repeat(6, minmax(14px, 1fr)) !important;
    gap: 2px !important;
  }

  .dashboard-v14 .month-grid span,
  .dashboard-v14 .month-grid .weekday {
    min-height: 14px !important;
    font-size: 9px !important;
    line-height: 14px !important;
  }
}

@media (min-width: 701px) and (max-width: 1400px) and (orientation: landscape) {
  .dashboard-v14 .clock-meta {
    grid-template-rows: clamp(166px, 24vh, 190px) minmax(0, 1fr) !important;
  }

  .dashboard-v14 .calendar-panel {
    padding: 7px 9px !important;
  }

  .dashboard-v14 .news-quick-actions button,
  .dashboard-v14 .news-quick-actions button:first-child {
    min-height: 58px !important;
  }
}

@media (min-width: 701px) and (max-width: 1100px) and (orientation: portrait) {
  .dashboard-v14 .clock-meta {
    grid-template-rows: 185px 90px minmax(0, 1fr) !important;
  }

  .dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) {
    grid-template-rows: 185px minmax(0, 1fr) !important;
  }

  .dashboard-v14 .news-quick-actions button,
  .dashboard-v14 .news-quick-actions button:first-child {
    min-height: 48px !important;
  }
}

@media (max-width: 700px) {
  .morning-overlay footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .morning-overlay footer button,
  .morning-source {
    min-height: 44px;
    padding: 0 8px;
    font-size: 12px;
  }

  .news-console {
    grid-template-columns: 78px minmax(0, 1fr) !important;
    gap: 7px !important;
  }

  .news-dashboard-body {
    gap: 5px;
  }

  .world-headline-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    padding: 6px 7px;
    border-left-width: 3px;
  }

  .world-headline-copy > span,
  .world-headline-copy small {
    font-size: 8px;
  }

  .world-headline-copy a {
    font-size: 10px;
    line-height: 1.1;
  }

  .world-headline-actions {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .world-headline-actions button {
    min-height: 25px;
    padding: 0 5px;
    font-size: 8px;
  }

  .saved-news-shelf {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 4px 5px;
  }

  .saved-news-shelf header {
    grid-template-columns: 1fr auto;
  }

  .saved-news-shelf > div {
    grid-template-columns: 1fr;
  }

  .saved-news-shelf a:nth-child(n + 2) {
    display: none;
  }

  .saved-news-shelf a,
  .saved-news-shelf > div > span {
    padding: 3px 5px;
    font-size: 8px;
  }

  .saved-news-dialog h2 {
    font-size: 19px;
  }

  .saved-news-item {
    gap: 8px;
    padding: 10px;
  }

  .saved-news-item a {
    font-size: 13px;
  }

  .saved-news-item > button {
    min-height: 34px;
    padding: 0 8px;
    font-size: 11px;
  }
}

.profile-setting {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid #d6e0dc;
  border-radius: 6px;
  background: #fff;
}

.profile-setting label { font-weight: 800; }

.profile-setting input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #ced9d5;
  border-radius: 5px;
  background: #f7faf9;
  color: #14201c;
  font: 750 16px/1 system-ui, sans-serif;
}

.profile-setting span {
  color: #66736e;
  font-size: 12px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --accent: #b8d2c8;
  --ink: #f2f4f3;
  --muted: #aab2af;
  --line: #3a423f;
  --panel: #181b1a;
  --black: #0e100f;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .setup-view,
html[data-theme="dark"] .setup-preview,
html[data-theme="dark"] .settings-panel,
html[data-theme="dark"] .dashboard-v14,
html[data-theme="dark"] .morning-overlay {
  color: #f2f4f3;
  background: #0e100f !important;
}

html[data-theme="dark"] .brand-mark,
html[data-theme="dark"] .settings-panel,
html[data-theme="dark"] .alarm-setting,
html[data-theme="dark"] .timezone-setting,
html[data-theme="dark"] .check-setting,
html[data-theme="dark"] .secondary-action,
html[data-theme="dark"] .profile-setting,
html[data-theme="dark"] .dashboard-panel,
html[data-theme="dark"] .time-console,
html[data-theme="dark"] .news-quick-actions button,
html[data-theme="dark"] .world-headline-card,
html[data-theme="dark"] .saved-news-shelf,
html[data-theme="dark"] .saved-news-shelf a,
html[data-theme="dark"] .saved-news-dialog,
html[data-theme="dark"] .saved-news-dialog > header,
html[data-theme="dark"] .saved-news-item {
  border-color: #3a423f;
  color: #f2f4f3;
  background: #181b1a;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .035);
}

html[data-theme="dark"] .settings-panel h1,
html[data-theme="dark"] .settings-panel label,
html[data-theme="dark"] .settings-panel legend,
html[data-theme="dark"] .preview-time,
html[data-theme="dark"] .setup-preview p,
html[data-theme="dark"] .brand-mark,
html[data-theme="dark"] .alarm-setting input,
html[data-theme="dark"] .timezone-setting select,
html[data-theme="dark"] .profile-setting input,
html[data-theme="dark"] .dashboard-v14 .clock-time,
html[data-theme="dark"] .dashboard-v14 .temperature,
html[data-theme="dark"] .dashboard-v14 .alarm-indicator b,
html[data-theme="dark"] .dashboard-v14 .secondary-zone-detail b,
html[data-theme="dark"] .panel-heading b,
html[data-theme="dark"] .calendar-panel #clockDate,
html[data-theme="dark"] .month-toolbar strong,
html[data-theme="dark"] .morning-overlay h2,
html[data-theme="dark"] .world-headline-copy a,
html[data-theme="dark"] .saved-news-shelf header button,
html[data-theme="dark"] .saved-news-shelf a,
html[data-theme="dark"] .saved-news-item a {
  color: #f2f4f3;
  text-shadow: none;
}

html[data-theme="dark"] .timezone-setting select,
html[data-theme="dark"] .alarm-setting input,
html[data-theme="dark"] .profile-setting input {
  border-color: #46504c;
  background: #101312;
}

html[data-theme="dark"] .profile-setting span,
html[data-theme="dark"] .setting-status,
html[data-theme="dark"] .dashboard-v14 .clock-zone,
html[data-theme="dark"] .dashboard-v14 .alarm-indicator span,
html[data-theme="dark"] .dashboard-v14 .temperature-detail small,
html[data-theme="dark"] .news-console .panel-heading small,
html[data-theme="dark"] .world-headline-copy small,
html[data-theme="dark"] .saved-news-item small,
html[data-theme="dark"] .saved-news-shelf > div > span {
  color: #aab2af;
}

html[data-theme="dark"] .dashboard-v14 .clock-brand {
  border-color: #3a423f;
  color: #f2f4f3;
  background: rgba(24, 27, 26, .96);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
}

html[data-theme="dark"] .dashboard-v14 .clock-brand small,
html[data-theme="dark"] .panel-kicker,
html[data-theme="dark"] .panel-heading span,
html[data-theme="dark"] .clock-detail > div > span,
html[data-theme="dark"] .clock-detail > div > small,
html[data-theme="dark"] .dashboard-v14 .clock-seconds,
html[data-theme="dark"] .month-toolbar button,
html[data-theme="dark"] .world-headline-copy > span,
html[data-theme="dark"] .saved-news-shelf header span,
html[data-theme="dark"] .saved-news-dialog header span {
  color: #b8d2c8;
}

html[data-theme="dark"] .month-toolbar,
html[data-theme="dark"] .morning-overlay header { border-color: #343b38; }
html[data-theme="dark"] .month-grid span,
html[data-theme="dark"] .month-grid .weekday { color: #c7cecb; }

html[data-theme="dark"] .month-grid .day {
  border-color: #343b38;
  color: #e6e9e8;
  background: #121514;
}

html[data-theme="dark"] .month-grid .sunday,
html[data-theme="dark"] .month-grid .holiday { color: #ff9c9c; }
html[data-theme="dark"] .month-grid .holiday { background: #2b1b1b; }
html[data-theme="dark"] .month-grid .today {
  border-color: #b8d2c8;
  color: #fff;
  background: #32423c;
}

html[data-theme="dark"] .scene-media,
html[data-theme="dark"] .panel-heading .scene-media,
html[data-theme="dark"] .panel-icon.scene-media { background: #181b1a; }

html[data-theme="dark"] .music-tabs button,
html[data-theme="dark"] .world-headline-actions button,
html[data-theme="dark"] .saved-news-dialog header > button,
html[data-theme="dark"] .saved-news-item > button {
  border-color: #46504c;
  color: #f2f4f3;
  background: #202422;
}

html[data-theme="dark"] .music-tabs button.active,
html[data-theme="dark"] .world-headline-actions button:first-child:not(:disabled) {
  border-color: #71867d;
  color: #101312;
  background: #b8d2c8;
}

html[data-theme="dark"] .secondary-action:hover,
html[data-theme="dark"] .secondary-action:focus-visible,
html[data-theme="dark"] .dashboard-panel:hover,
html[data-theme="dark"] .dashboard-panel:focus-within,
html[data-theme="dark"] .news-quick-actions button:hover,
html[data-theme="dark"] .news-quick-actions button:focus-visible {
  border-color: #69756f;
  color: #fff;
  background: #202422;
}
