:root {
  color-scheme: dark;
  --accent: #f5f7f3;
  --ink: #f5f7f3;
  --muted: #8a918d;
  --line: #242825;
  --panel: #0b0d0c;
  --black: #050505;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100dvh;
  min-height: 100%;
  margin: 0;
  background: var(--black);
}

body {
  min-height: 100dvh;
  color: var(--ink);
  overflow-x: hidden;
}

body.alarm-active {
  overflow: hidden;
}

.alarm-confirmation {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  width: min(440px, calc(100vw - 32px));
  padding: 20px 22px 18px;
  transform: translateX(-50%);
  overflow: hidden;
  border: 1px solid rgba(124, 242, 177, .5);
  border-radius: 8px;
  background: rgba(8, 11, 10, .96);
  color: #f5f7f3;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
}

.alarm-confirmation span {
  display: block;
  color: #7cf2b1;
  font-size: 11px;
  font-weight: 800;
}

.alarm-confirmation strong {
  display: block;
  margin-top: 7px;
  font-size: clamp(22px, 6vw, 32px);
}

.alarm-confirmation p {
  margin: 6px 0 0;
  color: #aeb5b0;
  font-size: 13px;
}

.alarm-confirmation i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  transform-origin: left;
  background: #7cf2b1;
  animation: alarm-confirmation-life 10s linear forwards;
}

.update-version {
  border-color: rgba(128, 223, 255, .5);
}

@keyframes alarm-confirmation-life {
  to { transform: scaleX(0); }
}

.morning-overlay {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: max(16px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background: #050706;
  color: #f5f7f3;
}

.morning-overlay header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.morning-overlay header img {
  width: 22px;
  height: 32px;
  object-fit: contain;
}

.morning-overlay header span {
  flex: 1;
  font-size: 11px;
  font-weight: 800;
}

.morning-overlay header button,
.morning-stop {
  border: 0;
  background: transparent;
  color: #aeb5b0;
  font: inherit;
  font-weight: 750;
}

.morning-overlay main {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  width: min(920px, 100%);
  min-height: 0;
  margin: 0 auto;
  padding: clamp(28px, 7vh, 72px) 0;
  overflow: auto;
}

.morning-overlay main > p:first-child {
  margin: 0 0 16px;
  color: #7cf2b1;
  font-size: clamp(11px, 2vw, 14px);
  font-weight: 850;
}

.morning-overlay h2 {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(32px, 7vw, 74px);
  line-height: 1.03;
}

.morning-overlay main > p:nth-of-type(2) {
  max-width: 62ch;
  margin: 22px 0 0;
  color: #aeb5b0;
  font-size: clamp(15px, 2.5vw, 21px);
  line-height: 1.5;
}

.morning-progress {
  width: min(520px, 100%);
  height: 4px;
  margin-top: 30px;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
}

.morning-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: #7cf2b1;
  transition: width .35s ease;
}

.morning-overlay footer {
  display: grid;
  grid-template-columns: minmax(90px, .4fr) minmax(120px, .55fr) minmax(190px, 1fr);
  gap: 10px;
  width: min(620px, 100%);
  margin: 0 auto;
}

.morning-overlay footer button,
.morning-source {
  min-height: 54px;
  border-radius: 6px;
  font: inherit;
  font-weight: 850;
}

.morning-stop {
  border: 1px solid rgba(255, 255, 255, .18) !important;
}

.morning-next {
  border: 0;
  background: #f5f7f3;
  color: #050706;
}

.morning-source {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(124, 242, 177, .5);
  color: #7cf2b1;
  background: rgba(124, 242, 177, .08);
  text-decoration: none;
}

.morning-source:hover,
.morning-source:focus-visible {
  border-color: #7cf2b1;
  outline: none;
  background: rgba(124, 242, 177, .14);
}

.morning-source.hidden {
  display: none;
}

.morning-next:disabled {
  opacity: .4;
}

@media (orientation: landscape) and (max-height: 560px) {
  .morning-overlay main {
    padding: 18px 0;
  }

  .morning-overlay h2 {
    font-size: clamp(28px, 6vw, 52px);
  }

  .morning-overlay main > p:nth-of-type(2) {
    margin-top: 12px;
    font-size: 14px;
  }

  .morning-progress {
    margin-top: 16px;
  }

  .morning-overlay footer button {
    min-height: 44px;
  }
}

/* Full dashboard v14 */
.dashboard-v14 {
  position: fixed;
  isolation: isolate;
  overflow: hidden;
  color: #f3fff9;
  background:
    linear-gradient(rgba(0, 13, 11, .5), rgba(0, 5, 4, .88)),
    #020504;
  perspective: 1400px;
}

.dashboard-v14::before {
  display: none;
}

.neural-canvas {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .86;
  pointer-events: none;
}

.dashboard-v14 .clock-brand {
  z-index: 4;
  top: max(18px, env(safe-area-inset-top));
  left: max(28px, env(safe-area-inset-left));
  height: 60px;
  padding: 5px 12px 5px 7px;
  border: 1px solid rgba(116, 255, 223, .3);
  border-radius: 6px;
  background: rgba(2, 12, 10, .78);
  box-shadow: 0 8px 0 rgba(0, 34, 27, .75), 0 15px 34px rgba(0, 0, 0, .45);
  backdrop-filter: blur(16px);
}

.dashboard-v14 .clock-brand img {
  width: 38px;
  height: 50px;
}

.dashboard-v14 .clock-brand b { font-size: 14px; }
.dashboard-v14 .clock-brand small { font-size: 10px; color: #68fbd8; }

.dashboard-v14 .clock-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 22px;
  width: min(1510px, 100%);
  height: 100dvh;
  margin: 0 auto;
  padding: max(96px, calc(env(safe-area-inset-top) + 82px)) max(28px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left));
  overflow: auto;
}

.dashboard-v14 {
  background: linear-gradient(rgba(0, 12, 10, .45), rgba(0, 4, 3, .9)), #020504;
}

.dashboard-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(100, 255, 220, .28);
  border-top-color: rgba(220, 255, 247, .56);
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(10, 29, 25, .92), rgba(2, 10, 8, .9));
  box-shadow:
    0 9px 0 rgba(0, 27, 22, .92),
    0 18px 35px rgba(0, 0, 0, .44),
    inset 0 1px 0 rgba(255, 255, 255, .08);
  transform: translateZ(0) rotateX(.65deg);
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
  backdrop-filter: blur(18px);
}

.dashboard-panel:hover,
.dashboard-panel:focus-within {
  border-color: rgba(107, 255, 222, .58);
  box-shadow: 0 13px 0 rgba(0, 35, 28, .95), 0 25px 50px rgba(0, 0, 0, .5), 0 0 28px rgba(24, 231, 190, .08);
  transform: translateY(-4px) translateZ(12px) rotateX(.2deg);
}

.time-console {
  display: flex;
  min-height: 184px;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(24px, 4vw, 58px);
  background:
    linear-gradient(100deg, rgba(4, 24, 20, .97), rgba(1, 10, 8, .87)),
    #06110e;
}

.time-console::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #29f5c8, #e8fff9, transparent);
  animation: signalSweep 4.5s linear infinite;
}

.panel-kicker,
.panel-heading span,
.clock-detail > div > span,
.clock-detail > div > small {
  color: #61f7d4;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-v14 .clock-time {
  display: flex;
  align-items: baseline;
  margin-top: 2px;
  font-size: clamp(76px, 10vw, 146px);
  line-height: .82;
  text-shadow: 0 0 28px rgba(65, 255, 214, .19);
}

.dashboard-v14 .clock-seconds {
  min-width: 2ch;
  margin-left: 14px;
  color: #68fbd8;
  font-size: .32em;
}

.dashboard-v14 .clock-zone {
  margin-top: 13px;
  color: rgba(232, 255, 248, .72);
  font-size: clamp(14px, 1.4vw, 19px);
  font-weight: 650;
}

.time-pulse {
  display: flex;
  width: min(210px, 18vw);
  height: 76px;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.time-pulse i {
  width: 5px;
  height: 28px;
  border-radius: 3px;
  background: #32f4ca;
  box-shadow: 0 0 17px #20d9b4;
  animation: neuralBeat 1.8s ease-in-out infinite;
}

.time-pulse i:nth-child(2) { height: 62px; animation-delay: -.35s; }
.time-pulse i:nth-child(3) { height: 42px; animation-delay: -.7s; }

.dashboard-v14 .clock-meta {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: minmax(145px, .72fr) minmax(190px, 1fr);
  gap: 22px;
  width: 100%;
  min-height: 0;
}

.dashboard-v14 .clock-detail {
  min-height: 0;
  padding: 20px;
}

.dashboard-v14 .clock-detail::before,
.dashboard-v14 .clock-detail::after {
  display: none;
}

.calendar-panel {
  grid-column: 1 / 5;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.panel-heading img,
.panel-icon {
  width: clamp(62px, 6vw, 92px);
  height: clamp(62px, 6vw, 92px);
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .38));
}

.panel-heading div,
.clock-detail > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.panel-heading b,
.calendar-panel #clockDate {
  color: #fff;
  font-size: clamp(17px, 1.8vw, 25px);
  line-height: 1.14;
}

.month-toolbar {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  margin: 12px 0 8px;
  border-top: 1px solid rgba(105, 255, 221, .14);
  border-bottom: 1px solid rgba(105, 255, 221, .14);
}

.month-toolbar strong {
  text-align: center;
  font-size: clamp(15px, 1.4vw, 20px);
}

.month-toolbar button {
  width: 38px;
  height: 38px;
  border: 0;
  color: #72f9da;
  background: transparent;
  font-size: 31px;
  cursor: pointer;
}

.month-toolbar button:hover,
.month-toolbar button:focus-visible { background: rgba(80, 255, 217, .12); }

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  flex: 1;
  gap: 4px;
  min-height: 210px;
}

.month-grid span {
  display: grid;
  min-height: 28px;
  place-items: center;
  border: 1px solid transparent;
  color: rgba(235, 255, 250, .76);
  font-size: clamp(12px, 1.15vw, 16px);
  font-weight: 700;
}

.month-grid .weekday {
  min-height: 22px;
  color: #5bf6d2;
  font-size: 11px;
}

.month-grid .day {
  border-color: rgba(124, 255, 226, .08);
  background: rgba(255, 255, 255, .025);
}

.month-grid .today {
  border-color: #78ffe0;
  color: #02110d;
  background: #70f9d9;
  box-shadow: 0 4px 0 #167d67, 0 0 18px rgba(65, 255, 214, .32);
}

.temperature-detail {
  grid-column: 5 / 7;
  grid-row: 1;
}

.alarm-indicator {
  grid-column: 7 / 10;
  grid-row: 1;
}

.secondary-zone-detail {
  grid-column: 10 / 13;
  grid-row: 1;
}

.temperature-detail,
.alarm-indicator,
.secondary-zone-detail {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dashboard-v14 .temperature {
  margin: 1px 0;
  color: #fff;
  font-size: clamp(42px, 4.3vw, 68px);
  line-height: .95;
}

.dashboard-v14 .alarm-indicator b {
  color: #fff;
  font-size: clamp(18px, 2vw, 27px);
  line-height: 1.12;
}

.dashboard-v14 .alarm-indicator span,
.dashboard-v14 .temperature-detail small {
  color: rgba(232, 255, 248, .58);
  font-size: 12px;
}

.dashboard-v14 .secondary-zone-detail p {
  display: flex;
  align-items: baseline;
  margin: 0;
}

.dashboard-v14 .secondary-zone-detail b {
  font-size: clamp(38px, 4.2vw, 66px);
  line-height: .9;
}

.dashboard-v14 .secondary-zone-detail small {
  margin-left: 7px;
  color: #68fbd8;
  font-size: clamp(18px, 2vw, 28px);
}

.news-console {
  grid-column: 5 / 13;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(0, 2fr);
  align-items: center;
  gap: 20px;
  padding: 20px 22px;
}

.news-console .panel-heading b {
  font-size: clamp(21px, 2vw, 30px);
}

.news-console .panel-heading small {
  color: rgba(231, 255, 249, .62);
  font-size: 12px;
}

.news-quick-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.news-quick-actions button {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 96px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(108, 255, 223, .27);
  border-top-color: rgba(215, 255, 246, .58);
  border-radius: 5px;
  color: #effffb;
  background: linear-gradient(145deg, rgba(17, 49, 41, .95), rgba(3, 17, 14, .98));
  box-shadow: 0 7px 0 #052d24, 0 13px 20px rgba(0, 0, 0, .38);
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, color .16s ease;
}

.news-quick-actions button::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: #5af8d3;
  box-shadow: 0 0 12px rgba(90, 248, 211, .55);
}

.news-quick-actions button:nth-child(2)::before { background: #ffd36a; }
.news-quick-actions button:nth-child(3)::before { background: #6ad8ff; }
.news-quick-actions button:nth-child(4)::before { background: #98ff72; }
.news-quick-actions button:nth-child(5)::before { background: #ff8ca0; }

.news-quick-actions button:hover,
.news-quick-actions button:focus-visible {
  color: #07130f;
  background: #75f9da;
  box-shadow: 0 3px 0 #16806a, 0 8px 18px rgba(0, 0, 0, .38), 0 0 24px rgba(77, 255, 216, .24);
  transform: translateY(4px);
}

.news-quick-actions b {
  max-width: 100%;
  font-size: clamp(15px, 1.35vw, 20px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.news-quick-actions span {
  color: inherit;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  opacity: .66;
}

@keyframes neuralBeat {
  0%, 100% { opacity: .32; transform: scaleY(.65); }
  50% { opacity: 1; transform: scaleY(1.12); }
}

@keyframes signalSweep {
  0% { transform: translateX(-55%); opacity: .2; }
  50% { opacity: 1; }
  100% { transform: translateX(55%); opacity: .2; }
}

@media (max-width: 1100px) {
  .dashboard-v14 .clock-content {
    gap: 16px;
    padding-inline: 18px;
  }

  .dashboard-v14 .clock-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: 16px;
  }

  .calendar-panel { grid-column: 1; grid-row: 1 / 3; }
  .temperature-detail { grid-column: 2; grid-row: 1; }
  .alarm-indicator { grid-column: 2; grid-row: 2; }
  .secondary-zone-detail { grid-column: 1; grid-row: 3; }
  .news-console { grid-column: 1 / 3; grid-row: 4; }
  .news-quick-actions { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .dashboard-v14 { overflow: auto; }

  .dashboard-v14 .clock-brand {
    top: 10px;
    left: 12px;
    height: 52px;
  }

  .dashboard-v14 .clock-content {
    display: block;
    height: auto;
    min-height: 100dvh;
    padding: 78px 12px 30px;
  }

  .time-console {
    min-height: 155px;
    margin-bottom: 18px;
    padding: 20px;
  }

  .dashboard-v14 .clock-time { font-size: clamp(64px, 21vw, 94px); }
  .time-pulse { display: none; }

  .dashboard-v14 .clock-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .calendar-panel,
  .temperature-detail,
  .alarm-indicator,
  .secondary-zone-detail,
  .news-console {
    grid-column: 1;
    grid-row: auto;
  }

  .calendar-panel { min-height: 430px; }
  .temperature-detail,
  .alarm-indicator,
  .secondary-zone-detail { min-height: 140px; }

  .news-console {
    display: block;
    padding: 18px;
  }

  .news-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 18px;
  }

  .news-quick-actions button:first-child { grid-column: 1 / -1; }
  .news-quick-actions button { min-height: 82px; }
}

@media (orientation: landscape) and (max-height: 600px) and (min-width: 721px) {
  .dashboard-v14 .clock-content {
    grid-template-columns: minmax(310px, .72fr) minmax(0, 1.7fr);
    grid-template-rows: 1fr;
    padding-top: 76px;
  }

  .time-console {
    min-height: 0;
    align-items: flex-start;
    padding: 25px;
  }

  .dashboard-v14 .clock-time { font-size: clamp(68px, 9vw, 110px); }
  .time-pulse { position: absolute; right: 20px; bottom: 18px; }
  .dashboard-v14 .clock-meta { gap: 12px; }
  .dashboard-v14 .clock-detail { padding: 13px; }
  .calendar-panel { min-height: 410px; }
  .panel-heading img, .panel-icon { width: 58px; height: 58px; }
  .news-console { gap: 12px; padding: 13px; }
  .news-quick-actions { gap: 6px; }
  .news-quick-actions button { min-height: 78px; padding: 9px; }
  .news-quick-actions span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .time-console::after,
  .time-pulse i { animation: none; }
}

@media (max-width: 560px) {
  .morning-overlay footer {
    grid-template-columns: minmax(84px, .7fr) minmax(100px, 1fr) minmax(124px, 1.25fr);
  }

  .morning-overlay footer button,
  .morning-source {
    min-height: 48px;
    padding-inline: 10px;
    font-size: 13px;
  }
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.setup-view {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 480px);
  background: #050505;
}

.setup-preview {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 72px 40px;
  overflow: hidden;
  color: var(--accent);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
    #050505;
  background-size: 40px 40px;
}

.setup-preview::after {
  content: "";
  position: absolute;
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 50%;
  opacity: .55;
}

.brand-mark {
  position: absolute;
  top: max(24px, env(safe-area-inset-top));
  left: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8a918d;
  font-size: 11px;
  font-weight: 800;
}

.brand-mark img {
  width: 22px;
  height: 36px;
  object-fit: contain;
  opacity: .68;
}

.preview-time {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(5rem, 16vh, 10rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: .86;
  letter-spacing: 0;
}

.preview-time span {
  font-size: .3em;
  color: color-mix(in srgb, var(--accent) 72%, #505652);
}

.setup-preview p {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  color: color-mix(in srgb, var(--accent) 68%, #505652);
  font-size: 14px;
  text-transform: capitalize;
}

.settings-panel {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: max(34px, env(safe-area-inset-top)) 34px max(34px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: #0a0c0b;
}
.settings-panel > .enter-clock { position: sticky; z-index: 4; top: 10px; width: min(360px, 100%); margin: 0 0 18px auto; min-height: 58px; font-size: 18px; box-shadow: 0 14px 32px rgba(39, 199, 165, .22); }
.setup-preview { display: none; }
.setup-view { grid-template-columns: minmax(0, 1fr); }
.settings-panel { width: min(1040px, 100%); margin-inline: auto; }
.native-intro { position: fixed; z-index: 500; inset: 0; display: grid; place-items: center; align-content: center; gap: 22px; overflow: hidden; color: #fff; background: #000; opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s; }
.native-intro.active { opacity: 1; visibility: visible; }
.native-intro img { position: relative; z-index: 2; width: min(230px, 42vw); height: min(390px, 52vh); object-fit: contain; filter: drop-shadow(0 0 28px rgba(104, 251, 216, .58)); animation: introLogo 1.7s cubic-bezier(.2,.8,.2,1) both; }
.native-intro > span { z-index: 2; color: #baffef; font-size: 11px; font-weight: 900; letter-spacing: 0; }
.intro-electricity { position: absolute; inset: 0; }
.intro-electricity i { position: absolute; left: 50%; top: 50%; width: 2px; height: 46vmax; transform-origin: top; background: linear-gradient(#fff, #4cfbd4 15%, transparent 72%); box-shadow: 0 0 12px #4cfbd4; animation: introBolt .46s steps(4) infinite alternate; }
.intro-electricity i:nth-child(1) { transform: rotate(18deg); }.intro-electricity i:nth-child(2) { transform: rotate(72deg); animation-delay: -.12s; }.intro-electricity i:nth-child(3) { transform: rotate(138deg); animation-delay: -.26s; }.intro-electricity i:nth-child(4) { transform: rotate(202deg); animation-delay: -.18s; }.intro-electricity i:nth-child(5) { transform: rotate(267deg); animation-delay: -.32s; }.intro-electricity i:nth-child(6) { transform: rotate(326deg); animation-delay: -.08s; }
@keyframes introLogo { from { opacity: 0; transform: scale(.74); } 55% { opacity: 1; transform: scale(1.08); } to { transform: scale(1); } }
@keyframes introBolt { from { opacity: .12; clip-path: polygon(0 0,100% 0,100% 28%,0 40%,100% 58%,100% 100%,0 100%,0 62%,100% 45%,0 31%); } to { opacity: .85; filter: brightness(1.8); } }
.first-run-coach { position: fixed; z-index: 90; top: max(92px, calc(env(safe-area-inset-top) + 80px)); left: 18px; display: grid; justify-items: start; gap: 2px; padding: 10px 14px; border: 1px solid #27c7a5; border-radius: 6px; color: #fff; background: #111; box-shadow: 0 12px 34px rgba(0,0,0,.35); animation: coachPulse 1.2s ease-in-out infinite; }
.first-run-coach span { color: #62e9cb; font-size: 26px; line-height: .8; }.first-run-coach b { font-size: 13px; }
@keyframes coachPulse { 50% { transform: translateY(-5px); box-shadow: 0 18px 42px rgba(39,199,165,.28); } }
@media (max-width: 700px) { .settings-panel > .enter-clock { width: 100%; top: 6px; } .native-intro img { width: 150px; height: 260px; } }

.settings-panel header p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.settings-panel h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.color-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.color-field legend,
.alarm-setting label,
.timezone-setting label {
  margin-bottom: 10px;
  color: #cbd1cd;
  font-size: 12px;
  font-weight: 800;
}

.timezone-setting {
  display: grid;
  gap: 7px;
}

.timezone-setting label {
  margin: 0;
}

.timezone-setting span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secondary-timezone-setting {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d100e;
}

.secondary-timezone-setting select:disabled {
  opacity: .42;
}

select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #363b38;
  border-radius: 6px;
  color: var(--ink);
  background: #111412;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(6, 42px);
  gap: 9px;
}

.swatch {
  width: 42px;
  height: 42px;
  border: 1px solid #303632;
  border-radius: 6px;
  background: var(--swatch);
}

.swatch.active {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.alarm-setting {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 10px 14px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.alarm-setting > div {
  display: grid;
  gap: 3px;
}

.alarm-setting > div label {
  margin: 0;
}

.alarm-setting > div span {
  color: var(--muted);
  font-size: 11px;
}

input[type="time"] {
  width: 112px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #363b38;
  border-radius: 6px;
  color: var(--ink);
  background: #111412;
  font-variant-numeric: tabular-nums;
}

.check-setting {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #353a37;
  border-radius: 6px;
  color: #d9dedb;
  background: #111412;
  margin: 0 !important;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.check-setting input {
  position: absolute;
  opacity: 0;
}

.check-setting span {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 2px solid #6d756f;
  border-radius: 4px;
  background: #1a1e1b;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.check-setting span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #041108;
  border-width: 0 3px 3px 0;
  opacity: 0;
  transform: rotate(45deg) scale(.7);
  transition: opacity .18s ease, transform .18s ease;
}

.check-setting:has(input:checked) {
  border-color: #39d979;
  color: #eafff1;
  background: #102419;
}

.check-setting input:checked + span {
  border-color: #39d979;
  background: #39d979;
  box-shadow: 0 0 14px rgba(57, 217, 121, .24);
}

.check-setting input:checked + span::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.check-setting input:focus-visible + span {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.check-setting b {
  font-size: 12px;
}

.compact-check {
  min-height: 38px;
  padding: 7px 9px;
}

.permission-setting {
  min-height: 48px;
}

.secondary-action,
.enter-clock {
  min-height: 46px;
  padding: 0 15px;
  border-radius: 6px;
  font-weight: 800;
}

.secondary-action {
  border: 1px solid #353a37;
  color: #d9dedb;
  background: #111412;
  text-align: left;
}

.secondary-action:hover,
.secondary-action:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 58%, #353a37);
  outline: none;
}

.setting-status {
  min-height: 14px;
  margin: -12px 2px 0;
  color: var(--muted);
  font-size: 10px;
}

.enter-clock {
  margin-top: 4px;
  border: 0;
  color: #050505;
  background: var(--accent);
  text-align: center;
}

.clock-view {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  overscroll-behavior: none;
  overflow: hidden;
  color: var(--accent);
  background: #000;
}

.clock-brand {
  position: absolute;
  z-index: 3;
  top: max(16px, env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left));
  width: 34px;
  height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  animation: logo-float 4.6s ease-in-out infinite;
}

.clock-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: .34;
}

.clock-content {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: max(54px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(42px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.clock-time {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 16px;
  white-space: nowrap;
  font-size: clamp(8rem, 28vh, 17rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: .8;
  letter-spacing: 0;
  text-shadow: 0 0 30px color-mix(in srgb, var(--accent) 14%, transparent);
}

.clock-seconds {
  min-width: 2ch;
  color: color-mix(in srgb, var(--accent) 62%, #303531);
  font-size: .24em;
  font-weight: 700;
}

.clock-zone {
  margin: -3px 0 5px;
  color: color-mix(in srgb, var(--accent) 52%, #444b46);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.clock-meta {
  width: min(1100px, calc(100vw - 36px));
  display: grid;
  grid-template-columns: minmax(250px, 1.35fr) minmax(130px, .65fr) minmax(180px, .8fr);
  gap: 10px;
  color: color-mix(in srgb, var(--accent) 72%, #343a36);
}

.secondary-zone-detail p {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.secondary-zone-detail {
  grid-column: 1 / -1;
  grid-row: 1;
  min-height: 0;
  justify-items: center;
  padding: 0 12px 10px;
  border: 0;
  background: transparent;
  text-align: center;
}

.secondary-zone-detail b {
  font-size: clamp(4.8rem, 16.8vh, 10.2rem);
  font-weight: 800;
  line-height: .82;
  text-shadow: 0 0 24px color-mix(in srgb, var(--accent) 12%, transparent);
}

.secondary-zone-detail small {
  color: color-mix(in srgb, var(--accent) 58%, #343a36);
  font-size: clamp(1rem, 3.3vh, 2rem);
  font-weight: 800;
}

.clock-news-action {
  min-width: 210px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, #28302b);
  border-radius: 6px;
  color: color-mix(in srgb, var(--accent) 90%, #fff);
  background: color-mix(in srgb, var(--accent) 9%, #090b0a);
  font-size: 13px;
  font-weight: 850;
}

.clock-news-action:focus-visible,
.clock-news-action:hover {
  border-color: var(--accent);
  outline: none;
}

.clock-detail {
  min-width: 0;
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, #1c211e);
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 4%, #070908);
}

.clock-detail > span,
.clock-detail small {
  color: color-mix(in srgb, var(--accent) 46%, #4a514c);
  font-size: 9px;
  font-weight: 900;
}

.clock-detail p,
.clock-detail b {
  margin: 0;
  overflow-wrap: anywhere;
}

.date-detail p {
  font-size: clamp(1rem, 2.6vh, 1.35rem);
  font-weight: 800;
  line-height: 1.2;
  text-transform: capitalize;
}

.temperature-detail {
  text-align: center;
}

.temperature {
  font-size: clamp(2.15rem, 6vh, 3.5rem);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: .9;
}

.alarm-indicator {
  grid-template-columns: 9px 1fr;
  align-items: center;
  gap: 10px;
  color: color-mix(in srgb, var(--accent) 48%, #424944);
  font-variant-numeric: tabular-nums;
}

.alarm-indicator div {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.alarm-indicator b {
  color: color-mix(in srgb, var(--accent) 82%, #707871);
  font-size: clamp(1rem, 2.8vh, 1.35rem);
}

.alarm-indicator > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #555c57;
}

.alarm-indicator.active > span {
  background: var(--accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 70%, transparent);
}

.alarm-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: #050505;
}

.alarm-overlay::before,
.alarm-overlay::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -70%;
  pointer-events: none;
}

.alarm-overlay::before {
  background:
    conic-gradient(from 90deg, #ff315d, #ffd23f, #35f2c4, #247bff, #bc45ff, #ff315d);
  animation: alarm-lights 1.25s steps(6, end) infinite;
}

.alarm-overlay::after {
  inset: 0;
  background: #fff;
  opacity: 0;
  animation: alarm-flash .62s steps(2, end) infinite;
}

.alarm-overlay img {
  position: relative;
  z-index: 2;
  width: 32px;
  height: 54px;
  object-fit: contain;
  opacity: .78;
}

.alarm-overlay p,
.alarm-overlay h2 {
  position: relative;
  z-index: 2;
  margin: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .8);
}

.alarm-overlay p {
  font-size: 11px;
  font-weight: 900;
}

.alarm-overlay h2 {
  font-size: 30px;
}

.alarm-overlay div {
  position: relative;
  z-index: 2;
  max-width: 100%;
  font-size: clamp(3.5rem, 18vw, 10rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 4px 28px rgba(0, 0, 0, .78);
}

.alarm-overlay button {
  position: fixed;
  z-index: 5;
  left: 50%;
  top: 76%;
  min-width: 180px;
  min-height: 48px;
  margin: 0;
  padding: 0 22px;
  border: 2px solid #fff;
  border-radius: 6px;
  color: #050505;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  transform: translate(-50%, -50%);
  transition: left .22s ease, top .22s ease;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 900;
}

@keyframes alarm-lights {
  0% { transform: rotate(0deg) scale(1.05); filter: saturate(1.1) brightness(.72); }
  50% { transform: rotate(180deg) scale(1.3); filter: saturate(1.5) brightness(1.08); }
  100% { transform: rotate(360deg) scale(1.05); filter: saturate(1.1) brightness(.72); }
}

@keyframes alarm-flash {
  0%, 68% { opacity: 0; }
  69%, 100% { opacity: .2; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .alarm-overlay button {
    min-width: 148px;
    min-height: 44px;
    padding: 0 14px;
    font-size: 14px;
  }
}

dialog {
  width: min(380px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid #343a36;
  border-radius: 7px;
  color: #eef2ef;
  background: #0d100e;
}

dialog::backdrop {
  background: rgba(0, 0, 0, .78);
}

dialog strong {
  font-size: 20px;
}

dialog p {
  margin: 12px 0 0;
  color: #aeb6b1;
  line-height: 1.5;
}

.dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  color: #c8ceca;
  background: transparent;
  font-size: 22px;
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(9px); }
}

@media (orientation: landscape) and (max-height: 620px) {
  .setup-view {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
  }

  .setup-preview,
  .settings-panel {
    min-height: 100dvh;
  }

  .settings-panel {
    gap: 6px;
    padding-top: 10px;
    padding-bottom: 10px;
    overflow-y: auto;
  }

  .settings-panel header p {
    margin-bottom: 3px;
  }

  .settings-panel h1 {
    font-size: 20px;
  }

  .color-field legend,
  .alarm-setting label,
  .timezone-setting label {
    margin-bottom: 6px;
  }

  .swatches {
    grid-template-columns: repeat(6, 34px);
    gap: 8px;
  }

  .swatch {
    width: 34px;
    height: 34px;
  }

  .alarm-setting {
    padding: 7px 0;
  }

  input[type="time"],
  .secondary-action,
  .enter-clock {
    min-height: 38px;
  }

  .setting-status {
    min-height: 10px;
    margin-top: -7px;
  }

  .clock-content {
    gap: 10px;
    padding-top: 28px;
    padding-bottom: 24px;
  }

  .clock-time {
    font-size: clamp(7.5rem, 38vh, 14rem);
  }

  .clock-zone {
    margin: -2px 0 2px;
    font-size: 9px;
  }

  .clock-meta {
    width: min(760px, calc(100vw - 84px));
    grid-template-columns: 1.25fr .6fr .75fr;
    gap: 7px;
  }

  .clock-detail {
    min-height: 66px;
    gap: 5px;
    padding: 9px 12px;
  }

  .date-detail p,
  .alarm-indicator b {
    font-size: clamp(.84rem, 3.3vh, 1.05rem);
  }

  .temperature {
    font-size: clamp(1.8rem, 8vh, 2.7rem);
  }

  .clock-news-action {
    min-height: 38px;
  }

  .secondary-zone-detail b {
    font-size: clamp(4.5rem, 22.8vh, 8.4rem);
  }
}

@media (max-width: 760px) {
  .setup-view {
    grid-template-columns: 1fr;
  }

  .setup-preview {
    min-height: 31dvh;
    padding: 62px 20px 28px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .setup-preview::after {
    width: 44%;
  }

  .preview-time {
    font-size: clamp(4rem, 12vh, 6.5rem);
  }

  .settings-panel {
    min-height: 69dvh;
    align-content: start;
    padding: 22px 20px max(24px, env(safe-area-inset-bottom));
    gap: 14px;
  }

  .swatches {
    grid-template-columns: repeat(6, minmax(36px, 42px));
  }

  .clock-time {
    gap: 9px;
    font-size: 7.5rem;
  }

  .clock-meta {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .date-detail {
    grid-column: 1 / -1;
  }

  .clock-detail {
    min-height: 78px;
    padding: 12px 14px;
  }

  .date-detail p {
    font-size: 16px;
  }

  .temperature {
    font-size: 2.35rem;
  }

  .alarm-indicator b {
    font-size: 15px;
  }

  .secondary-zone-detail {
    grid-column: 1 / -1;
  }

  .secondary-zone-detail b {
    font-size: 4.5rem;
  }

  .clock-news-action {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .clock-time {
    font-size: 6.7rem;
  }

  .clock-detail {
    padding: 10px 11px;
  }

  .date-detail p {
    font-size: 14px;
  }

  .temperature {
    font-size: 2rem;
  }

  .alarm-indicator b {
    font-size: 13px;
  }

  .secondary-zone-detail b {
    font-size: 4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clock-brand {
    animation: none;
  }
}

/* Full assistant: visual information system */
.clock-view {
  background: #030504;
}

.clock-view::before {
  content: '';
  position: absolute;
  inset: 8% 36% 42% 36%;
  background: url('logo-white.png') center / contain no-repeat;
  opacity: .035;
  pointer-events: none;
}

.clock-brand {
  top: max(20px, env(safe-area-inset-top));
  left: max(24px, env(safe-area-inset-left));
  width: auto;
  height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f5f7f3;
  text-align: left;
}

.clock-brand img {
  width: 48px;
  height: 76px;
  opacity: .95;
}

.clock-brand span {
  display: grid;
  gap: 2px;
}

.clock-brand b {
  font-size: 15px;
  letter-spacing: 0;
}

.clock-brand small {
  color: #747c77;
  font-size: 9px;
  font-weight: 850;
}

.clock-content {
  gap: 12px;
  padding-top: max(86px, env(safe-area-inset-top));
  overflow-y: auto;
}

.clock-time {
  text-shadow: 0 0 42px color-mix(in srgb, var(--accent) 18%, transparent);
}

.clock-zone {
  padding: 6px 12px;
  border: 1px solid #202522;
  background: #080b09;
}

.clock-meta {
  gap: 12px;
}

.clock-detail {
  position: relative;
  min-height: 116px;
  overflow: hidden;
  align-content: end;
  padding: 18px 20px;
  border-color: #252b27;
  background-color: #080a09;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .25);
}

.clock-detail::before,
.clock-news-action::before {
  content: '';
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: .52;
  transition: opacity .25s ease, transform .4s ease;
}

.clock-detail::after,
.clock-news-action::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 5, 4, .96) 0%, rgba(3, 5, 4, .72) 48%, rgba(3, 5, 4, .18) 100%);
}

.date-detail::before { background-image: url('calendar-v11.png'); background-position: 70% 52%; }
.temperature-detail::before { background-image: url('weather-v11.png'); background-position: 68% 52%; }
.alarm-indicator::before { background-image: url('alarm-v11.png'); background-position: 73% 53%; }

.clock-detail > * {
  position: relative;
  z-index: 1;
}

.temperature-detail {
  text-align: left;
}

.temperature,
.date-detail p,
.alarm-indicator b {
  color: #f4f6f2;
  text-shadow: 0 2px 12px #000;
}

.alarm-indicator {
  grid-template-columns: 1fr;
}

.alarm-indicator > span {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
}

.secondary-zone-detail {
  min-height: clamp(136px, 22vh, 210px);
  align-content: center;
  justify-items: start;
  padding: 18px 24px;
  text-align: left;
}

.secondary-zone-detail::before {
  display: block;
  background-image: url('timezone-v11.png');
  background-position: 78% 48%;
}

.secondary-zone-detail::after {
  display: block;
}

.clock-news-action {
  position: relative;
  width: min(1100px, calc(100vw - 36px));
  min-height: 92px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 2px;
  overflow: hidden;
  padding: 16px 22px;
  border-color: #35423c;
  color: #f4f1e8;
  text-align: left;
  isolation: isolate;
}

.clock-news-action::before {
  z-index: -2;
  background-image: url('news-v11.png');
  background-position: 74% 58%;
  opacity: .56;
}

.clock-news-action::after {
  z-index: -1;
}

.clock-news-action > * {
  position: relative;
  z-index: 1;
}

.clock-news-action span,
.clock-news-action small {
  color: #93a49b;
  font-size: 9px;
  font-weight: 900;
}

.clock-news-action strong {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 25px;
  font-weight: 700;
}

.clock-news-action:hover::before,
.clock-news-action:focus-visible::before {
  opacity: .72;
  transform: scale(1.025);
}

/* News reader: digital broadsheet */
.morning-overlay {
  color: #171713;
  background: #e9e3d6;
}

.morning-overlay::before {
  content: '';
  position: absolute;
  inset: 0 0 0 54%;
  background: url('news-v11.png') right center / cover no-repeat;
  opacity: .08;
  pointer-events: none;
}

.morning-overlay header {
  position: relative;
  z-index: 1;
  min-height: 62px;
  border-top: 5px solid #171713;
  border-bottom: 3px double #171713;
}

.morning-overlay header img {
  width: 34px;
  height: 48px;
  filter: invert(1);
}

.morning-overlay header span {
  color: #171713;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(17px, 2vw, 25px);
  font-weight: 900;
}

.morning-overlay header button,
.morning-stop {
  color: #3d3a33;
}

.morning-overlay main {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  border-bottom: 1px solid rgba(23, 23, 19, .3);
}

.morning-overlay main::before {
  content: 'HIPOCAMPO DIARIO';
  width: 100%;
  margin-bottom: clamp(14px, 3vh, 28px);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(23, 23, 19, .4);
  color: #171713;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(14px, 2vw, 20px);
  font-weight: 900;
}

.morning-overlay main > p:first-child {
  margin-bottom: 12px;
  color: #9b2f2f;
}

.morning-overlay h2 {
  max-width: 19ch;
  color: #171713;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(34px, 6.1vw, 76px);
  font-weight: 700;
  line-height: 1;
}

.morning-overlay main > p:nth-of-type(2) {
  max-width: 52ch;
  color: #514d44;
  font-family: Georgia, 'Times New Roman', serif;
}

.news-sector-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(760px, 100%);
  margin-top: clamp(18px, 3vh, 30px);
  border-top: 1px solid rgba(23, 23, 19, .45);
  border-left: 1px solid rgba(23, 23, 19, .45);
}

.news-sector-picker.hidden { display: none; }

.news-sector-picker button {
  display: flex;
  min-width: 0;
  min-height: 82px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  padding: 13px 16px;
  border: 0;
  border-right: 1px solid rgba(23, 23, 19, .45);
  border-bottom: 1px solid rgba(23, 23, 19, .45);
  border-radius: 0;
  color: #171713;
  background: rgba(255, 255, 255, .14);
  text-align: left;
  cursor: pointer;
}

.news-sector-picker button:first-child {
  grid-column: 1 / -1;
  background: #171713;
  color: #f4f1e8;
}

.news-sector-picker button:hover,
.news-sector-picker button:focus-visible {
  background: #9b2f2f;
  color: #fff;
}

.news-sector-picker b {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(20px, 2.7vw, 30px);
}

.news-sector-picker span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  opacity: .72;
}

.morning-progress {
  background: rgba(23, 23, 19, .16);
}

.morning-progress i {
  background: #9b2f2f;
}

.morning-overlay footer {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  padding-top: 12px;
}

.morning-overlay footer button,
.morning-source {
  border-radius: 2px;
}

.morning-stop {
  border-color: rgba(23, 23, 19, .35) !important;
}

.morning-source {
  border-color: #171713;
  color: #171713;
  background: transparent;
}

.morning-next {
  color: #f4f1e8;
  background: #171713;
}

@media (max-width: 760px) {
  .clock-brand {
    top: max(10px, env(safe-area-inset-top));
    left: max(14px, env(safe-area-inset-left));
    height: 54px;
    gap: 8px;
  }

  .clock-brand img {
    width: 34px;
    height: 54px;
  }

  .clock-brand b { font-size: 12px; }
  .clock-brand small { font-size: 8px; }

  .clock-content {
    gap: 9px;
    padding-top: max(70px, env(safe-area-inset-top));
    overflow-y: auto;
  }

  .clock-detail {
    min-height: 96px;
  }

  .clock-news-action {
    width: 100%;
    min-height: 82px;
  }

  .morning-overlay::before {
    inset: 38% 0 0 18%;
  }

  .morning-overlay main::before {
    font-size: 13px;
  }

  .news-sector-picker {
    margin-top: 14px;
  }

  .news-sector-picker button {
    min-height: 67px;
    padding: 9px 11px;
  }

  .news-sector-picker b { font-size: 19px; }
  .news-sector-picker span { font-size: 10px; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .clock-brand {
    height: 42px;
  }

  .clock-brand img {
    width: 28px;
    height: 42px;
  }

  .clock-content {
    gap: 6px;
    padding-top: 18px;
  }

  .clock-meta {
    width: min(780px, calc(100vw - 110px));
  }

  .clock-detail {
    min-height: 72px;
  }

  .secondary-zone-detail {
    min-height: 82px;
    padding-block: 8px;
  }

  .clock-news-action {
    width: min(780px, calc(100vw - 110px));
    min-height: 58px;
    padding-block: 8px;
  }

  .clock-news-action strong {
    font-size: 19px;
  }

  .morning-overlay header {
    min-height: 42px;
    border-top-width: 3px;
  }

  .morning-overlay header img {
    width: 22px;
    height: 32px;
  }

  .morning-overlay main::before {
    display: none;
  }

  .news-sector-picker {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 8px;
  }

  .news-sector-picker button,
  .news-sector-picker button:first-child {
    grid-column: auto;
    min-height: 54px;
    padding: 7px 9px;
  }

  .news-sector-picker b { font-size: 16px; }
  .news-sector-picker span { display: none; }
}

/* Cascade lock for dashboard v14 after legacy clock rules. */
.dashboard-v14 {
  background:
    linear-gradient(rgba(0, 12, 10, .45), rgba(0, 4, 3, .9)),
    #020504;
}

.dashboard-v14 .clock-content {
  place-content: normal;
  justify-items: stretch;
  align-items: stretch;
}

.dashboard-v14 .time-console { width: 100%; }

.dashboard-v14 .calendar-panel {
  display: flex;
  align-content: normal;
  padding: 14px;
}

.dashboard-v14 .month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  flex-direction: initial;
  min-height: 170px;
  gap: 3px;
}

.dashboard-v14 .calendar-panel .panel-heading img { width: 60px; height: 60px; }
.dashboard-v14 .calendar-panel #clockDate { font-size: clamp(16px, 1.55vw, 21px); }
.dashboard-v14 .month-grid span { min-height: 21px; }

.dashboard-v14 .month-toolbar {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  flex-direction: initial;
}

.dashboard-v14 .temperature-detail,
.dashboard-v14 .alarm-indicator,
.dashboard-v14 .secondary-zone-detail {
  display: flex;
  grid-template-columns: none;
  align-content: normal;
  align-items: center;
  justify-items: normal;
  text-align: left;
}

.dashboard-v14 .temperature-detail .panel-icon,
.dashboard-v14 .alarm-indicator .panel-icon,
.dashboard-v14 .secondary-zone-detail .panel-icon {
  width: 58px;
  height: 58px;
}

.dashboard-v14 .temperature-detail .temperature {
  font-size: clamp(36px, 3.5vw, 52px);
}

.dashboard-v14 .secondary-zone-detail p { white-space: nowrap; }
.dashboard-v14 .secondary-zone-detail b { font-size: clamp(34px, 3.5vw, 50px); }

.dashboard-v14 .secondary-zone-detail {
  min-height: 0;
  padding: 20px;
}

.dashboard-v14 .news-console { display: grid; }
.dashboard-v14 .news-quick-actions { display: grid; }

.dashboard-v14 .temperature-detail { grid-column: 5 / 7; }
.dashboard-v14 .alarm-indicator { grid-column: 7 / 10; }
.dashboard-v14 .secondary-zone-detail { grid-column: 10 / 13; }
.dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) .temperature-detail { grid-column: 5 / 8; }
.dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) .alarm-indicator { grid-column: 8 / 13; }

.dashboard-v14 .news-quick-actions b {
  font-size: 15px;
  overflow-wrap: normal;
  word-break: normal;
}

.dashboard-v14 .news-quick-actions span { font-size: 12px; }

@media (max-width: 1100px) {
  .dashboard-v14 .clock-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .dashboard-v14 .calendar-panel { grid-column: 1; grid-row: 1 / 3; }
  .dashboard-v14 .temperature-detail { grid-column: 2; grid-row: 1; }
  .dashboard-v14 .alarm-indicator { grid-column: 2; grid-row: 2; }
  .dashboard-v14 .secondary-zone-detail { grid-column: 1; grid-row: 3; }
  .dashboard-v14 .news-console { grid-column: 1 / 3; grid-row: 4; }
}

@media (max-width: 720px) {
  .dashboard-v14 .clock-content { display: block; }
  .dashboard-v14 .news-console { display: block; }

  .dashboard-v14 .calendar-panel,
  .dashboard-v14 .temperature-detail,
  .dashboard-v14 .alarm-indicator,
  .dashboard-v14 .secondary-zone-detail,
  .dashboard-v14 .news-console {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (orientation: landscape) and (max-height: 600px) and (min-width: 721px) {
  .dashboard-v14 .clock-content {
    grid-template-columns: minmax(310px, .72fr) minmax(0, 1.7fr);
    grid-template-rows: 1fr;
  }
}

/* iPhone/iPad: Safari can report a desktop-like width in an installed PWA. */
@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .dashboard-v14 {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .dashboard-v14 .clock-brand {
    top: max(52px, calc(env(safe-area-inset-top) + 10px));
    left: max(16px, env(safe-area-inset-left));
    height: 62px;
  }

  .dashboard-v14 .clock-brand img {
    width: 38px;
    height: 50px;
  }

  .dashboard-v14 .clock-content {
    display: block !important;
    width: 100%;
    height: auto;
    min-height: 100dvh;
    padding: max(132px, calc(env(safe-area-inset-top) + 104px)) 16px max(36px, env(safe-area-inset-bottom));
    overflow: visible;
  }

  .dashboard-v14 .time-console {
    width: 100%;
    min-height: 230px;
    margin-bottom: 20px;
    padding: 24px;
  }

  .dashboard-v14 .clock-time {
    font-size: clamp(68px, 20vw, 108px);
  }

  .dashboard-v14 .clock-zone {
    max-width: 100%;
    font-size: 14px;
    white-space: normal;
  }

  .dashboard-v14 .time-pulse { display: none; }

  .dashboard-v14 .clock-meta {
    display: flex !important;
    width: 100%;
    min-height: 0;
    flex-direction: column;
    gap: 20px;
  }

  .dashboard-v14 .calendar-panel,
  .dashboard-v14 .temperature-detail,
  .dashboard-v14 .alarm-indicator,
  .dashboard-v14 .secondary-zone-detail,
  .dashboard-v14 .news-console {
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100% !important;
    min-width: 0;
  }

  .dashboard-v14 .calendar-panel { min-height: 420px; }

  .dashboard-v14 .temperature-detail,
  .dashboard-v14 .alarm-indicator,
  .dashboard-v14 .secondary-zone-detail {
    min-height: 150px;
    padding: 22px;
  }

  .dashboard-v14 .news-console {
    display: block;
    min-height: 0;
    padding: 20px;
  }

  .dashboard-v14 .news-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 20px;
  }

  .dashboard-v14 .news-quick-actions button:first-child { grid-column: 1 / -1; }
}

@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .dashboard-v14 {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .dashboard-v14 .clock-brand {
    top: max(10px, calc(env(safe-area-inset-top) + 6px));
    left: max(16px, env(safe-area-inset-left));
    height: 56px;
  }

  .dashboard-v14 .clock-content {
    display: block !important;
    width: 100%;
    height: auto;
    min-height: 100dvh;
    padding: max(84px, calc(env(safe-area-inset-top) + 72px)) max(18px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
    overflow: visible;
  }

  .dashboard-v14 .time-console {
    width: 100%;
    min-height: 220px;
    margin-bottom: 16px;
    padding: 24px 30px;
  }

  .dashboard-v14 .clock-time { font-size: clamp(76px, 14vw, 126px); }

  .dashboard-v14 .clock-meta {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: auto !important;
    gap: 16px;
    width: 100%;
  }

  .dashboard-v14 .calendar-panel {
    grid-column: 1 !important;
    grid-row: 1 / 3 !important;
    min-height: 360px;
  }

  .dashboard-v14 .temperature-detail {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-height: 170px;
  }

  .dashboard-v14 .alarm-indicator {
    grid-column: 2 !important;
    grid-row: 2 !important;
    min-height: 170px;
  }

  .dashboard-v14 .secondary-zone-detail,
  .dashboard-v14 .news-console {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    width: 100%;
  }

  .dashboard-v14 .news-console { min-height: 220px; }
}

/* Mobile tabletop v19: the complete assistant stays inside one screen. */
@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .dashboard-v14 {
    overflow: hidden !important;
  }

  .dashboard-v14 .clock-brand {
    top: max(38px, calc(env(safe-area-inset-top) + 6px));
    left: max(10px, env(safe-area-inset-left));
    height: 46px;
    padding: 3px 9px 3px 5px;
  }

  .dashboard-v14 .clock-brand img {
    width: 28px;
    height: 38px;
  }

  .dashboard-v14 .clock-brand b { font-size: 12px; }
  .dashboard-v14 .clock-brand small { font-size: 8px; }

  .dashboard-v14 .clock-content {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 150px minmax(0, 1fr) !important;
    gap: 10px;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    padding: max(92px, calc(env(safe-area-inset-top) + 70px)) 10px max(10px, env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .dashboard-v14 .time-console {
    min-height: 0;
    height: 150px;
    margin: 0;
    padding: 14px 16px;
  }

  .dashboard-v14 .clock-time {
    font-size: clamp(58px, 18vw, 78px);
  }

  .dashboard-v14 .clock-seconds { margin-left: 8px; }

  .dashboard-v14 .clock-zone {
    margin-top: 8px;
    font-size: 10px;
    line-height: 1.2;
  }

  .dashboard-v14 .clock-meta {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: minmax(0, 1fr) 90px 86px 150px !important;
    gap: 8px;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) {
    grid-template-rows: minmax(0, 1fr) 104px 170px !important;
  }

  .dashboard-v14 .calendar-panel {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-height: 0;
    padding: 9px;
  }

  .dashboard-v14 .temperature-detail {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  .dashboard-v14 .alarm-indicator {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  .dashboard-v14 .secondary-zone-detail {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
  }

  .dashboard-v14 .news-console {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
  }

  .dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) .news-console {
    grid-row: 3 !important;
  }

  .dashboard-v14 .panel-heading { gap: 7px; }

  .dashboard-v14 .calendar-panel .panel-heading img {
    width: 38px;
    height: 38px;
  }

  .dashboard-v14 .calendar-panel #clockDate {
    font-size: 13px;
    line-height: 1.05;
  }

  .dashboard-v14 .panel-kicker,
  .dashboard-v14 .panel-heading span,
  .dashboard-v14 .clock-detail > div > span,
  .dashboard-v14 .clock-detail > div > small {
    font-size: 9px;
  }

  .dashboard-v14 .month-toolbar {
    grid-template-columns: 28px 1fr 28px;
    margin: 4px 0;
  }

  .dashboard-v14 .month-toolbar button {
    width: 28px;
    height: 28px;
    font-size: 22px;
  }

  .dashboard-v14 .month-toolbar strong { font-size: 13px; }

  .dashboard-v14 .month-grid {
    min-height: 0;
    gap: 2px;
  }

  .dashboard-v14 .month-grid span {
    min-height: 0;
    font-size: 10px;
  }

  .dashboard-v14 .month-grid .weekday { min-height: 14px; font-size: 8px; }

  .dashboard-v14 .temperature-detail,
  .dashboard-v14 .alarm-indicator,
  .dashboard-v14 .secondary-zone-detail {
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    gap: 8px;
    padding: 10px;
  }

  .dashboard-v14 .temperature-detail .panel-icon,
  .dashboard-v14 .alarm-indicator .panel-icon,
  .dashboard-v14 .secondary-zone-detail .panel-icon {
    width: 40px;
    height: 40px;
  }

  .dashboard-v14 .temperature-detail .temperature { font-size: 30px; }
  .dashboard-v14 .alarm-indicator b { font-size: 14px; }
  .dashboard-v14 .alarm-indicator span,
  .dashboard-v14 .temperature-detail small { display: none; }
  .dashboard-v14 .secondary-zone-detail b { font-size: 30px; }
  .dashboard-v14 .secondary-zone-detail small { font-size: 16px; }

  .dashboard-v14 .news-console {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    padding: 9px;
  }

  .dashboard-v14 .news-console .panel-heading img {
    width: 36px;
    height: 36px;
  }

  .dashboard-v14 .news-console .panel-heading { gap: 5px; }
  .dashboard-v14 .news-console .panel-heading b { font-size: 14px; }
  .dashboard-v14 .news-console .panel-heading small { display: none; }

  .dashboard-v14 .news-quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin: 0;
  }

  .dashboard-v14 .news-quick-actions button,
  .dashboard-v14 .news-quick-actions button:first-child {
    grid-column: auto;
    min-height: 48px;
    padding: 6px;
    box-shadow: 0 4px 0 #052d24, 0 7px 12px rgba(0, 0, 0, .3);
  }

  .dashboard-v14 .news-quick-actions b { font-size: 10px; }
  .dashboard-v14 .news-quick-actions span { display: none; }
}

/* Tablet tabletop v26: large clock, compact calendar, full-width news. */
@media (min-width: 701px) and (max-width: 1400px) and (orientation: landscape) {
  .dashboard-v14 { overflow: hidden !important; }

  .dashboard-v14 .clock-brand {
    top: max(10px, env(safe-area-inset-top));
    left: max(16px, env(safe-area-inset-left));
    height: 50px;
    padding: 4px 10px 4px 6px;
  }

  .dashboard-v14 .clock-brand img { width: 31px; height: 41px; }
  .dashboard-v14 .clock-brand b { font-size: 12px; }
  .dashboard-v14 .clock-brand small { font-size: 8px; }

  .dashboard-v14 .clock-content {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 210px minmax(0, 1fr) !important;
    gap: 12px;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    padding: max(72px, calc(env(safe-area-inset-top) + 60px)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    overflow: hidden;
  }

  .dashboard-v14 .time-console {
    width: 100%;
    height: 210px !important;
    min-height: 0 !important;
    margin: 0;
    padding: 20px 34px;
  }

  .dashboard-v14 .clock-time {
    font-size: clamp(112px, 15vw, 180px);
    line-height: .8;
  }

  .dashboard-v14 .clock-seconds { font-size: .28em; }
  .dashboard-v14 .clock-zone { margin-top: 12px; font-size: 15px; }
  .dashboard-v14 .time-pulse { display: flex; }

  .dashboard-v14 .clock-meta {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    grid-template-rows: 150px minmax(150px, 1fr) !important;
    gap: 10px;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .dashboard-v14 .calendar-panel {
    grid-column: 1 / 4 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    padding: 8px 10px;
  }

  .dashboard-v14 .temperature-detail {
    grid-column: 4 / 6 !important;
    grid-row: 1 !important;
  }

  .dashboard-v14 .alarm-indicator {
    grid-column: 6 / 9 !important;
    grid-row: 1 !important;
  }

  .dashboard-v14 .secondary-zone-detail {
    grid-column: 9 / 13 !important;
    grid-row: 1 !important;
  }

  .dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) .calendar-panel { grid-column: 1 / 5 !important; }
  .dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) .temperature-detail { grid-column: 5 / 8 !important; }
  .dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) .alarm-indicator { grid-column: 8 / 13 !important; }

  .dashboard-v14 .news-console,
  .dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) .news-console {
    grid-column: 1 / 13 !important;
    grid-row: 2 !important;
    display: grid !important;
    grid-template-columns: minmax(180px, .52fr) minmax(0, 2fr);
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    gap: 16px;
    padding: 16px 18px;
  }

  .dashboard-v14 .calendar-panel .panel-heading .scene-media { width: 38px; height: 38px; }
  .dashboard-v14 .calendar-panel #clockDate { font-size: 13px; }
  .dashboard-v14 .month-toolbar {
    grid-template-columns: 26px 1fr 26px;
    height: 28px;
    margin: 3px 0;
  }
  .dashboard-v14 .month-toolbar button { width: 26px; height: 26px; font-size: 20px; }
  .dashboard-v14 .month-toolbar strong { font-size: 12px; }
  .dashboard-v14 .month-grid { min-height: 0; gap: 1px; }
  .dashboard-v14 .month-grid span { min-height: 0; font-size: 8px; }
  .dashboard-v14 .month-grid .weekday { min-height: 9px; font-size: 7px; }

  .dashboard-v14 .temperature-detail,
  .dashboard-v14 .alarm-indicator,
  .dashboard-v14 .secondary-zone-detail {
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    gap: 9px;
    padding: 12px;
  }

  .dashboard-v14 .temperature-detail .panel-icon,
  .dashboard-v14 .alarm-indicator .panel-icon,
  .dashboard-v14 .secondary-zone-detail .panel-icon {
    width: 50px;
    height: 50px;
  }

  .dashboard-v14 .temperature-detail .temperature { font-size: 36px; }
  .dashboard-v14 .alarm-indicator b { font-size: 17px; }
  .dashboard-v14 .alarm-indicator span { display: block; font-size: 9px; }
  .dashboard-v14 .temperature-detail small { display: block; font-size: 9px; }
  .dashboard-v14 .secondary-zone-detail b { font-size: 38px; }
  .dashboard-v14 .secondary-zone-detail small { font-size: 18px; }

  .dashboard-v14 .news-console .panel-heading .scene-media { width: 56px; height: 56px; }
  .dashboard-v14 .news-console .panel-heading b { font-size: 22px; }
  .dashboard-v14 .news-console .panel-heading small { display: block; font-size: 10px; }
  .dashboard-v14 .news-quick-actions {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }
  .dashboard-v14 .news-quick-actions button,
  .dashboard-v14 .news-quick-actions button:first-child {
    grid-column: auto;
    min-height: 74px;
    padding: 10px;
  }
  .dashboard-v14 .news-quick-actions b { font-size: 14px; }
  .dashboard-v14 .news-quick-actions span { display: block; font-size: 9px; }
}

@media (min-width: 701px) and (max-width: 1100px) and (orientation: portrait) {
  .dashboard-v14 { overflow: hidden !important; }

  .dashboard-v14 .clock-content {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 190px minmax(0, 1fr) !important;
    gap: 11px;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    padding: max(82px, calc(env(safe-area-inset-top) + 68px)) max(14px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    overflow: hidden;
  }

  .dashboard-v14 .time-console {
    width: 100%;
    height: 190px !important;
    min-height: 0 !important;
    margin: 0;
    padding: 18px 28px;
  }

  .dashboard-v14 .clock-time { font-size: clamp(105px, 18vw, 150px); }
  .dashboard-v14 .clock-zone { font-size: 14px; }

  .dashboard-v14 .clock-meta {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    grid-template-rows: 145px 90px minmax(170px, 1fr) !important;
    gap: 9px;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) {
    grid-template-rows: 145px minmax(190px, 1fr) !important;
  }

  .dashboard-v14 .calendar-panel {
    grid-column: 1 / 6 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    padding: 8px 10px;
  }

  .dashboard-v14 .temperature-detail { grid-column: 6 / 9 !important; grid-row: 1 !important; }
  .dashboard-v14 .alarm-indicator { grid-column: 9 / 13 !important; grid-row: 1 !important; }
  .dashboard-v14 .secondary-zone-detail { grid-column: 1 / 13 !important; grid-row: 2 !important; }

  .dashboard-v14 .news-console {
    grid-column: 1 / 13 !important;
    grid-row: 3 !important;
  }

  .dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) .news-console {
    grid-column: 1 / 13 !important;
    grid-row: 2 !important;
  }

  .dashboard-v14 .calendar-panel .panel-heading .scene-media { width: 36px; height: 36px; }
  .dashboard-v14 .calendar-panel #clockDate { font-size: 12px; }
  .dashboard-v14 .month-toolbar { height: 27px; margin: 2px 0; }
  .dashboard-v14 .month-toolbar strong { font-size: 12px; }
  .dashboard-v14 .month-grid { min-height: 0; gap: 1px; }
  .dashboard-v14 .month-grid span { min-height: 0; font-size: 8px; }
  .dashboard-v14 .month-grid .weekday { min-height: 9px; font-size: 7px; }

  .dashboard-v14 .temperature-detail,
  .dashboard-v14 .alarm-indicator,
  .dashboard-v14 .secondary-zone-detail {
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    padding: 11px;
  }

  .dashboard-v14 .temperature-detail .panel-icon,
  .dashboard-v14 .alarm-indicator .panel-icon,
  .dashboard-v14 .secondary-zone-detail .panel-icon { width: 48px; height: 48px; }
  .dashboard-v14 .temperature-detail .temperature { font-size: 34px; }
  .dashboard-v14 .alarm-indicator b { font-size: 16px; }
  .dashboard-v14 .secondary-zone-detail b { font-size: 36px; }

  .dashboard-v14 .news-console {
    display: grid !important;
    grid-template-columns: 150px minmax(0, 1fr);
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    gap: 12px;
    padding: 14px;
  }

  .dashboard-v14 .news-console .panel-heading .scene-media { width: 50px; height: 50px; }
  .dashboard-v14 .news-console .panel-heading b { font-size: 19px; }
  .dashboard-v14 .news-quick-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .dashboard-v14 .news-quick-actions button,
  .dashboard-v14 .news-quick-actions button:first-child {
    grid-column: auto;
    min-height: 62px;
    padding: 8px;
  }
  .dashboard-v14 .news-quick-actions b { font-size: 13px; }
}

/* Light tabletop v20 */
:root {
  color-scheme: light;
  --ink: #14201c;
  --muted: #66736e;
  --line: #d9e2df;
  --panel: #ffffff;
  --black: #ffffff;
}

html,
body,
.setup-view,
.setup-preview,
.settings-panel {
  color: #14201c;
  background: #ffffff;
}

.setup-preview::after { opacity: .08; }
.brand-mark,
.settings-panel,
.alarm-setting,
.timezone-setting,
.check-setting,
.secondary-action,
.install-help article {
  border-color: #d6e0dc;
  background: #ffffff;
  color: #14201c;
  box-shadow: 0 8px 24px rgba(25, 48, 40, .08);
}

.settings-panel h1,
.settings-panel label,
.settings-panel legend,
.preview-time,
.setup-preview p,
.brand-mark,
.alarm-setting input,
.timezone-setting select {
  color: #14201c;
}

.timezone-setting select,
.alarm-setting input {
  border-color: #ced9d5;
  background: #f7faf9;
}

.secondary-action:hover,
.secondary-action:focus-visible {
  color: #14201c;
  background: #eaf8f4;
}

.dashboard-v14 {
  color: #17231f;
  background: #ffffff !important;
  perspective: none;
}

.dashboard-v14 .neural-canvas { opacity: .045; }

.dashboard-v14 .clock-brand {
  border-color: #cfdad6;
  color: #14201c;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 7px 20px rgba(28, 54, 45, .12);
  backdrop-filter: blur(12px);
}

.dashboard-v14 .clock-brand small,
.panel-kicker,
.panel-heading span,
.clock-detail > div > span,
.clock-detail > div > small {
  color: #087b66;
}

.dashboard-panel,
.time-console,
.news-quick-actions button {
  border-color: #d5dfdc;
  border-top-color: #eef3f1;
  color: #17231f;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(24, 50, 42, .1), inset 0 1px 0 #ffffff;
  transform: none;
  backdrop-filter: none;
}

.dashboard-panel:hover,
.dashboard-panel:focus-within,
.news-quick-actions button:hover,
.news-quick-actions button:focus-visible {
  border-color: #9dbbb2;
  color: #17231f;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(24, 50, 42, .12), inset 0 1px 0 #ffffff;
  transform: none;
}

.time-console::after {
  background: linear-gradient(90deg, transparent, #16a085, transparent);
  animation: none;
}

.dashboard-v14 .clock-time,
.dashboard-v14 .temperature,
.dashboard-v14 .alarm-indicator b,
.dashboard-v14 .secondary-zone-detail b,
.panel-heading b,
.calendar-panel #clockDate,
.month-toolbar strong {
  color: #14201c;
  text-shadow: none;
}

.dashboard-v14 .clock-seconds,
.month-toolbar button {
  color: #087b66;
}

.dashboard-v14 .clock-zone,
.dashboard-v14 .alarm-indicator span,
.dashboard-v14 .temperature-detail small,
.news-console .panel-heading small {
  color: #66736e;
}

.scene-media,
.panel-heading .scene-media,
.panel-icon.scene-media {
  display: block;
  flex: 0 0 auto;
  border: 0;
  border-radius: 6px;
  object-fit: cover;
  background: #ffffff;
  filter: none;
}

.panel-heading .scene-media,
.panel-icon.scene-media {
  width: clamp(54px, 5vw, 76px);
  height: clamp(54px, 5vw, 76px);
}

.month-toolbar {
  border-color: #e2e9e7;
}

.month-grid { gap: 2px; }
.month-grid span { color: #35433e; }
.month-grid .weekday { color: #60716b; }
.month-grid .day {
  border-color: #e6ecea;
  border-radius: 3px;
  background: #fbfcfc;
}

.month-grid .sunday,
.month-grid .holiday {
  color: #c62828;
  font-weight: 850;
}

.month-grid .holiday { background: #fff1f1; }
.month-grid .today {
  border: 2px solid #0c8b74;
  color: #083d32;
  background: #d9f4ed;
  box-shadow: none;
}

.month-grid .today.sunday,
.month-grid .today.holiday { color: #b42318; }

.news-quick-actions button {
  min-height: 74px;
  box-shadow: 0 4px 10px rgba(24, 50, 42, .09);
}

.news-quick-actions button::before { box-shadow: none; }

.morning-overlay {
  color: #14201c;
  background: #ffffff;
}

.morning-overlay h2 { color: #14201c; }
.morning-overlay main > p:nth-of-type(2),
.morning-overlay header button,
.morning-stop { color: #66736e; }
.morning-overlay header { border-color: #dbe4e1; }
.morning-stop { border-color: #ced9d5 !important; }
.morning-next { color: #ffffff; background: #087b66; }

@media (max-width: 700px) and (orientation: portrait),
  (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .dashboard-v14 .clock-content {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 138px minmax(0, 1fr) !important;
    gap: 8px;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    padding: max(82px, calc(env(safe-area-inset-top) + 66px)) 10px max(8px, env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .dashboard-v14 .time-console {
    width: 100%;
    height: 138px !important;
    min-height: 0 !important;
    margin: 0;
    padding: 12px 15px;
  }

  .dashboard-v14 .clock-time { font-size: clamp(54px, 17vw, 72px); }

  .dashboard-v14 .clock-meta {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: 132px 92px 80px minmax(132px, 1fr) !important;
    gap: 7px;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) {
    grid-template-rows: 132px 96px minmax(150px, 1fr) !important;
  }

  .dashboard-v14 .calendar-panel {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    padding: 7px 9px;
  }

  .dashboard-v14 .temperature-detail {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }

  .dashboard-v14 .alarm-indicator {
    grid-column: 2 !important;
    grid-row: 2 !important;
  }

  .dashboard-v14 .secondary-zone-detail {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
  }

  .dashboard-v14 .news-console {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
  }

  .dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) .news-console {
    grid-row: 3 !important;
  }

  .dashboard-v14 .calendar-panel .panel-heading .scene-media {
    width: 32px;
    height: 32px;
  }

  .dashboard-v14 .calendar-panel #clockDate {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dashboard-v14 .month-toolbar {
    grid-template-columns: 24px 1fr 24px;
    height: 26px;
    margin: 2px 0;
  }

  .dashboard-v14 .month-toolbar button {
    width: 24px;
    height: 24px;
    font-size: 19px;
  }

  .dashboard-v14 .month-toolbar strong { font-size: 11px; }
  .dashboard-v14 .month-grid { min-height: 0; gap: 1px; }
  .dashboard-v14 .month-grid span { min-height: 0; font-size: 8px; }
  .dashboard-v14 .month-grid .weekday { min-height: 9px; font-size: 7px; }

  .dashboard-v14 .temperature-detail .panel-icon,
  .dashboard-v14 .alarm-indicator .panel-icon,
  .dashboard-v14 .secondary-zone-detail .panel-icon {
    width: 46px;
    height: 46px;
  }

  .dashboard-v14 .temperature-detail,
  .dashboard-v14 .alarm-indicator,
  .dashboard-v14 .secondary-zone-detail {
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    padding: 9px;
  }

  .dashboard-v14 .news-console {
    display: grid !important;
    grid-template-columns: 82px minmax(0, 1fr);
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    padding: 8px;
  }

  .dashboard-v14 .news-console .panel-heading .scene-media {
    width: 42px;
    height: 42px;
  }

  .dashboard-v14 .news-quick-actions button,
  .dashboard-v14 .news-quick-actions button:first-child {
    min-height: 43px;
    padding: 5px;
    box-shadow: 0 2px 6px rgba(24, 50, 42, .09);
  }
}

@media (max-height: 600px) and (orientation: landscape),
  (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .dashboard-v14 .clock-content {
    grid-template-columns: minmax(230px, .72fr) minmax(0, 1.7fr) !important;
    gap: 8px;
  }

  .dashboard-v14 .clock-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: 120px 70px minmax(82px, 1fr) !important;
    gap: 6px;
  }

  .dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) {
    grid-template-rows: 120px minmax(112px, 1fr) !important;
  }

  .dashboard-v14 .calendar-panel {
    grid-column: 1 / 3 !important;
    grid-row: 1 !important;
    padding: 7px;
  }

  .dashboard-v14 .temperature-detail { grid-column: 3 !important; grid-row: 1 !important; }
  .dashboard-v14 .alarm-indicator { grid-column: 4 !important; grid-row: 1 !important; }
  .dashboard-v14 .secondary-zone-detail { grid-column: 1 / 5 !important; grid-row: 2 !important; }
  .dashboard-v14 .news-console { grid-column: 1 / 5 !important; grid-row: 3 !important; }
  .dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) .news-console {
    grid-column: 1 / 5 !important;
    grid-row: 2 !important;
  }

  .dashboard-v14 .calendar-panel .panel-heading .scene-media { width: 30px; height: 30px; }
  .dashboard-v14 .calendar-panel #clockDate { font-size: 10px; }
  .dashboard-v14 .month-grid span { font-size: 8px; }
  .dashboard-v14 .month-grid .weekday { font-size: 7px; }

  .dashboard-v14 .temperature-detail .panel-icon,
  .dashboard-v14 .alarm-indicator .panel-icon,
  .dashboard-v14 .secondary-zone-detail .panel-icon {
    width: 40px;
    height: 40px;
  }

  .dashboard-v14 .news-console {
    grid-template-columns: 86px minmax(0, 1fr);
    padding: 6px 8px;
  }

  .dashboard-v14 .news-console .panel-heading .scene-media { width: 34px; height: 34px; }
  .dashboard-v14 .news-quick-actions button { min-height: 46px; padding: 4px 6px; }
}

@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
  .dashboard-v14 {
    overflow: hidden !important;
  }

  .dashboard-v14 .clock-brand {
    top: max(8px, calc(env(safe-area-inset-top) + 4px));
    left: max(10px, env(safe-area-inset-left));
    height: 44px;
    padding: 3px 8px 3px 5px;
  }

  .dashboard-v14 .clock-brand img {
    width: 26px;
    height: 36px;
  }

  .dashboard-v14 .clock-brand b { font-size: 11px; }
  .dashboard-v14 .clock-brand small { font-size: 8px; }

  .dashboard-v14 .clock-content {
    display: grid !important;
    grid-template-columns: minmax(250px, .72fr) minmax(0, 1.65fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 10px;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    padding: max(58px, calc(env(safe-area-inset-top) + 50px)) max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    overflow: hidden;
  }

  .dashboard-v14 .time-console {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 16px;
  }

  .dashboard-v14 .clock-time { font-size: clamp(58px, 10vw, 94px); }
  .dashboard-v14 .clock-zone { font-size: 10px; white-space: normal; }
  .dashboard-v14 .time-pulse { display: none; }

  .dashboard-v14 .clock-meta {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: minmax(0, 1fr) 72px 90px !important;
    gap: 7px;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) {
    grid-template-rows: minmax(0, 1fr) 96px !important;
  }

  .dashboard-v14 .calendar-panel {
    grid-column: 1 / 3 !important;
    grid-row: 1 / -1 !important;
    width: 100% !important;
    min-height: 0;
    padding: 8px;
  }

  .dashboard-v14 .temperature-detail {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  .dashboard-v14 .alarm-indicator {
    grid-column: 4 !important;
    grid-row: 1 !important;
  }

  .dashboard-v14 .secondary-zone-detail {
    grid-column: 3 / 5 !important;
    grid-row: 2 !important;
  }

  .dashboard-v14 .news-console {
    grid-column: 3 / 5 !important;
    grid-row: 3 !important;
  }

  .dashboard-v14 .clock-meta:has(.secondary-zone-detail.hidden) .news-console {
    grid-row: 2 !important;
  }

  .dashboard-v14 .calendar-panel .panel-heading img {
    width: 34px;
    height: 34px;
  }

  .dashboard-v14 .calendar-panel #clockDate { font-size: 12px; }

  .dashboard-v14 .month-toolbar {
    grid-template-columns: 26px 1fr 26px;
    margin: 3px 0;
  }

  .dashboard-v14 .month-toolbar button { width: 26px; height: 26px; font-size: 20px; }
  .dashboard-v14 .month-toolbar strong { font-size: 12px; }
  .dashboard-v14 .month-grid { min-height: 0; gap: 2px; }
  .dashboard-v14 .month-grid span { min-height: 0; font-size: 9px; }
  .dashboard-v14 .month-grid .weekday { min-height: 12px; font-size: 7px; }

  .dashboard-v14 .temperature-detail,
  .dashboard-v14 .alarm-indicator,
  .dashboard-v14 .secondary-zone-detail {
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    gap: 6px;
    padding: 8px;
  }

  .dashboard-v14 .temperature-detail .panel-icon,
  .dashboard-v14 .alarm-indicator .panel-icon,
  .dashboard-v14 .secondary-zone-detail .panel-icon {
    width: 34px;
    height: 34px;
  }

  .dashboard-v14 .temperature-detail .temperature { font-size: 26px; }
  .dashboard-v14 .alarm-indicator b { font-size: 12px; }
  .dashboard-v14 .alarm-indicator span,
  .dashboard-v14 .temperature-detail small { display: none; }
  .dashboard-v14 .secondary-zone-detail b { font-size: 24px; }
  .dashboard-v14 .secondary-zone-detail small { font-size: 13px; }

  .dashboard-v14 .news-console {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 6px;
    width: 100% !important;
    min-width: 0;
    min-height: 0;
    padding: 7px;
  }

  .dashboard-v14 .news-console .panel-heading img { width: 30px; height: 30px; }
  .dashboard-v14 .news-console .panel-heading b { font-size: 11px; }
  .dashboard-v14 .news-console .panel-heading small { display: none; }
  .dashboard-v14 .news-quick-actions { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .dashboard-v14 .news-quick-actions button { min-height: 54px; padding: 4px; }
  .dashboard-v14 .news-quick-actions b { font-size: 8px; }
  .dashboard-v14 .news-quick-actions span { display: none; }
}
