:root {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color-scheme: dark;
  --bg: #14251e;
  --surface: #20382c;
  --ink: #f0f3e8;
  --muted: #bcc9bd;
  --track: #43594c;
  --accent: #c1d99a;
  --onaccent: #14251e;
  --button: #172b21;
  --hourly: #d9a746;
  --planned: #ad9cd1;
  --unplanned: #78579f;
  --unplanned-time: #f0f3e8;
  --emergency: #df8272;
  --unknown: #304a3a;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}
:root[data-theme="light"] {
  --unplanned: #7d5da6;
  color-scheme: light;
  --bg: #eff5ec;
  --surface: #fff;
  --ink: #20382c;
  --muted: #52654f;
  --track: #d8e5d1;
  --accent: #416b2a;
  --onaccent: #fff;
  --button: #eff5ec;
  --unknown: #d8e5d1;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a.button {
  border: 0;
  background: var(--button);
  color: var(--accent);
  padding: 14px 16px;
  min-height: 48px;
  border-radius: 16px;
  box-shadow: none;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.35;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
button.primary,
.button.primary {
  background: var(--accent);
  color: var(--onaccent);
}
a {
  color: var(--accent);
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: clamp(1.65rem, 6vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.03em;
}
h2 {
  font-size: 1.12rem;
  font-weight: 650;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 0.83rem;
}
.shell {
  max-width: 780px;
  margin: auto;
  padding: 28px 20px calc(120px + env(safe-area-inset-bottom));
}
.top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand status" "queue time";
  align-items: baseline;
  gap: 2px 12px;
  margin: 0 0 28px;
}
.brand { grid-area: brand; color: var(--accent); line-height: 1.15; }
.header-queue { grid-area: queue; color: var(--muted); font-size: 0.85rem; }
.countdown-label { grid-area: status; }
.countdown-value { grid-area: time; font-weight: 650; }
.countdown-label, .countdown-value {
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.top.stacked {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "brand" "queue" "status" "time";
}
.top.stacked .countdown-label { margin-top: 8px; white-space: normal; }
.top.stacked .countdown-label, .top.stacked .countdown-value { text-align: left; }
.card {
  background: var(--surface);
  border: 1px solid var(--track);
  border-radius: 24px;
  padding: 22px;
  margin-bottom: 20px;
}
.card > p + .row,
.card > small + .row,
.card > h2 + .row {
  margin-top: 20px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}
.row > * {
  flex: 1;
  min-width: 0;
}
.stack {
  display: grid;
  gap: 14px;
}
.address-select {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 650;
  width: 100%;
  padding: 6px 2px;
  white-space: normal;
}
.address .row {
  margin-top: 22px;
}
.schedule {
  padding: 18px 18px 22px;
  touch-action: pan-y;
}
.week {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid var(--track);
  margin-bottom: 22px;
}
.day {
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 14px 0 18px;
  font-size: 1rem;
  position: relative;
  min-width: 0;
}
.day[aria-selected="true"] {
  color: var(--accent);
  font-weight: 650;
}
.day-indicator {
  height: 4px;
  border-radius: 6px;
  position: absolute;
  bottom: -1px;
  left: calc((var(--day-index) + 0.28) * 100% / 7);
  width: calc(44% / 7);
  background: var(--accent);
  pointer-events: none;
}
.week-control {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}
.week-control button {
  flex: 1 1 10em;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.87rem;
  min-height: 44px;
  padding: 8px 12px;
}
.hours {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.hour {
  border-radius: 14px;
  min-height: 64px;
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  background: var(--button);
}
.hour > span {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}
.hour.current {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.hour.unknown:before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 7px,
    color-mix(in srgb, var(--muted) 25%, transparent) 7px,
    color-mix(in srgb, var(--muted) 25%, transparent) 9px
  );
}
.hour.outage {
  color: #14251e;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 22px 0;
}
.legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
}
.schedule > .row {
  margin-top: 24px;
}
.emergency {
  padding: 8px 4px 24px;
  color: var(--emergency);
}
.emergency p {
  margin-top: 5px;
}
.notice {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 18px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr));
  gap: 16px;
}
.stats .card {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.stat-label {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
}
.stat-label i {
  font-style: normal;
  background: var(--button);
  border-radius: 12px;
  padding: 9px;
  color: var(--accent);
}
.stat-value {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.2em;
  font-size: 3rem;
  color: var(--accent);
  font-weight: 650;
  line-height: 1.1;
  margin: 20px 0 4px;
}
.duration-part { display: inline-flex; align-items: baseline; gap: 0.12em; white-space: nowrap; }
.duration-unit { font-size: 0.42em; }
.weather-now {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 18px 0;
}
.temperature {
  font-size: 3rem;
  color: var(--accent);
  line-height: 1.1;
}
.weather-hours {
  display: flex;
  overflow: auto;
  gap: 8px;
  margin: 20px -4px;
  padding: 4px;
  scrollbar-width: none;
}
.weather-hours::-webkit-scrollbar {
  display: none;
}
.weather > .privacy {
  margin-top: 6px;
}
.weather-hour {
  min-width: 65px;
  text-align: center;
  padding: 10px 6px;
  background: var(--button);
  border-radius: 12px;
}
.weather-hour b {
  display: block;
  margin-top: 8px;
}
.weather small a {
  color: var(--muted);
}
.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--track);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.nav button {
  flex: 1;
  max-width: 244px;
  border-radius: 18px;
  color: var(--muted);
  background: transparent;
  padding: 16px 6px;
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.nav button[aria-current="page"] {
  color: var(--onaccent);
  background: var(--accent);
}
.message h2 {
  margin: 8px 0;
}
.message .row {
  margin-top: 22px;
}
.empty {
  text-align: center;
  padding: 35px 12px;
}
.empty .sun {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 18px;
}
.empty p {
  margin: 16px 0 24px;
  color: var(--muted);
}
.settings label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  min-height: 44px;
}
.settings input[type="checkbox"] {
  accent-color: var(--accent);
  width: 24px;
  height: 24px;
  flex: none;
}
.settings select {
  background: var(--button);
  color: var(--ink);
  border: 1px solid var(--track);
  padding: 8px;
  border-radius: 10px;
  max-width: 55%;
}
.settings h2 {
  margin-bottom: 8px;
}
.settings .notice {
  margin-top: 15px;
}
.settings .stack {
  margin-top: 18px;
}
dialog {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--track);
  border-radius: 24px;
  padding: 24px;
  width: calc(100% - 24px);
  max-width: 530px;
  max-height: 85dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #0009;
}
dialog label {
  display: block;
  margin: 16px 0 6px;
}
dialog select,
dialog input {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--track);
  border-radius: 12px;
  color: var(--ink);
  background: var(--bg);
}
dialog .row {
  margin-top: 24px;
}
.dialog-close {
  float: right;
  padding: 5px 10px;
  min-height: 36px;
}
.manage-dialog { --manage-danger:var(--emergency); max-width:410px; padding:20px 16px 18px; }
:root[data-theme="light"] .manage-dialog { --manage-danger:#a54434; }
.manage-dialog h2 { color:var(--accent); font-size:1.4375rem; min-height:44px; display:flex; align-items:center; margin:0 56px 18px 0; }
.manage-dialog .dialog-close { width:44px; height:44px; min-height:44px; padding:0; border-radius:15px; }
.manage-address-list { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; margin:0; padding:0; list-style:none; }
.manage-entry { display:flex; min-width:0; align-items:center; gap:12px; background:var(--button); border:1px solid transparent; border-radius:18px; padding:16px 12px; }
.manage-entry[aria-current="true"] { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 14%,var(--button)); }
.manage-copy { flex:1; min-width:0; }
.manage-name { display:flex; align-items:center; gap:6px; color:var(--accent); line-height:1.2; }
.manage-title { font-size:1.125rem; font-weight:650; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.manage-name .icon { width:17px; height:17px; flex:none; }
.manage-detail { display:block; color:var(--muted); font-size:.875rem; font-weight:400; margin-top:2px; line-height:1.3; overflow-wrap:anywhere; }
.manage-dialog .manage-delete { flex:none; min-height:44px; padding:10px; font-size:.8125rem; border-radius:13px; color:var(--manage-danger); background:color-mix(in srgb,var(--manage-danger) 9%,var(--button)); border:1px solid color-mix(in srgb,var(--manage-danger) 35%,transparent); }
.manage-dialog .manage-delete:hover { background:color-mix(in srgb,var(--manage-danger) 17%,var(--button)); }
@media(max-width:390px) {
  .manage-dialog { padding:16px 12px; }
  .manage-entry { padding:14px 10px; gap:8px; }
  .manage-title { font-size:1rem; }
  .manage-detail { font-size:.8125rem; }
  .manage-dialog .manage-delete { padding:10px 8px; font-size:.75rem; }
}
.error {
  color: var(--emergency);
  margin: 14px 0;
}
.offline {
  border: 1px solid var(--track);
  padding: 10px 16px;
  border-radius: 14px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}
#status {
  position: fixed;
  bottom: calc(100px + env(safe-area-inset-bottom));
  left: 16px;
  right: 16px;
  margin: auto;
  max-width: 700px;
  z-index: 40;
  padding: 14px 18px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 14px;
  display: none;
}
#status.show {
  display: block;
}
.skip {
  position: fixed;
  left: 8px;
  top: -60px;
  z-index: 50;
  background: var(--surface);
  padding: 8px;
}
.skip:focus {
  top: 8px;
}
.install-note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}
.privacy {
  font-size: 0.83rem;
  color: var(--muted);
  margin-top: 18px;
}
.danger {
  color: var(--emergency);
}
@media (max-width: 560px) {
  .shell {
    padding: 22px 12px calc(112px + env(safe-area-inset-bottom));
  }
  .card {
    padding: 20px 16px;
  }
  .schedule {
    padding: 14px 12px 20px;
  }
  .hours {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hour {
    min-height: 61px;
  }
  .stats {
    gap: 10px;
  }
  .stats .card {
    padding: 18px 14px;
  }
  .row button,
  .row a {
    padding: 13px 8px;
  }
  .stat-label {
    font-size: 0.87rem;
    gap: 7px;
  }
  .stat-label i {
    padding: 6px;
  }
  .nav {
    padding-left: 8px;
    padding-right: 8px;
  }
  .nav button {
    font-size: 0.95rem;
  }
}
@media (max-width: 350px) {
  .shell {
    padding-left: 8px;
    padding-right: 8px;
  }
  .card {
    padding-left: 12px;
    padding-right: 12px;
  }
  .hour {
    font-size: 0.9rem;
    gap: 3px;
  }
  .stats .card {
    padding: 14px 10px;
  }
  .stat-label {
    flex-wrap: wrap;
  }
  .nav button {
    font-size: 0.9rem;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a.button {
    transition: background-color 0.15s;
  }
  dialog[open] {
    animation: appear 0.15s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.hour {
  flex-wrap: wrap;
  padding: 10px 3px;
  align-content: center;
}
.hour > span:last-child {
  font-size: clamp(0.8rem, 3.8vw, 1rem);
}
.stats .stat-value {
  overflow-wrap: anywhere;
}
.address-select {
  overflow-wrap: anywhere;
}

.address-picker {
  position: relative;
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 650;
  overflow-wrap: anywhere;
  padding: 6px 2px;
}
.address-static { padding: 14px 2px; }
.address-picker select {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.address-picker:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
}
.nav button {
  font-size: clamp(0.75rem, 3.75vw, 1rem);
  padding-left: 2px;
  padding-right: 2px;
  white-space: nowrap;
  overflow-wrap: normal;
}

.icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: none;
  vertical-align: middle;
}
.hour .icon {
  width: 17px;
  height: 23px;
  display: block;
}
.stat-label i {
  display: grid;
  place-items: center;
  flex: none;
}
.stat-label .icon {
  width: 24px;
  height: 24px;
}
.weather-current-icon {
  color: var(--accent);
  display: flex;
}
.weather-current-icon .icon {
  width: 44px;
  height: 44px;
}
.weather-now {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.weather-now > div {
  flex: 1;
  min-width: 140px;
}
.weather-hour .icon {
  display: block;
  margin: 12px auto 4px;
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.install-banner {
  padding: 16px;
  margin-bottom: 20px;
  border: 1px solid var(--accent);
  border-radius: 18px;
}
.install-banner .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.install-banner .actions button {
  flex: 1;
  min-width: 100px;
}
.install-banner p {
  margin-bottom: 0;
}

select[hidden] {
  display: none !important;
}
.picker-trigger {
  width: 100%;
  text-align: left;
  color: var(--ink);
  overflow-wrap: anywhere;
  white-space: normal;
}
.address-picker .picker-trigger {
  background: transparent;
  color: var(--accent);
  font: inherit;
  padding: 8px 0;
}
.picker-dialog h2 {
  padding-right: 36px;
  margin: 0 0 20px;
}
.picker-dialog input {
  margin-bottom: 16px;
}
.picker-list {
  display: grid;
  gap: 8px;
}
.picker-option {
  text-align: left;
  overflow-wrap: anywhere;
  padding: 14px 16px;
  border: 2px solid transparent;
}
.picker-option[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
.picker-option[aria-pressed="true"]::after {
  content: " ✓";
}
.reminder-picker .picker-option[aria-pressed="true"]::after {
  content: none;
}
:root {
  font-size: 100%;
  --outage-ink: #14251e;
}
.hour {
  padding: 0.45rem 0.2rem;
  color: var(--ink);
  font-size: 0.875rem;
  min-height: 3.25rem;
  box-shadow: none;
  line-height: 1.35;
  cursor: default;
  user-select: none;
}
.hour.outage {
  color: var(--outage-ink);
}
.hour .tile-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
  width: 100%;
  height: 100%;
  min-width: 0;
}
.hour .tile-content > span:last-child {
  font-size: inherit;
}
.hour .icon {
  width: 0.8em;
  height: 1.15em;
}
.range-hour {
  position: relative;
  min-height: 3.25rem;
  padding: 0 0.25em;
}
.range-hour .tile-content {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 1;
}
.range-hour .tile-times {
  position: absolute;
  inset: 0 0.25em 0 calc(0.8em + 0.5em);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.range-hour .tile-time {
  font-size: min(0.875rem, 24px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
}
.range-hour .tile-icon {
  position: absolute;
  left: 0.25em;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.range-hour.mixed .tile-times {
  gap: 0;
}
.range-hour.mixed .tile-time {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
}
.range-hour .tile-icon.half-0 {
  top: 25%;
}
.range-hour .tile-icon.half-1 {
  top: 75%;
}

.hour.unknown:before {
  z-index: 0;
  pointer-events: none;
}
.hours {
  margin-bottom: 0.5rem;
}
@media (max-width: 560px) {
  .hour {
    min-height: 3.25rem;
    font-size: 0.875rem;
  }
  .hour.range-hour {
    min-height: 3.25rem;
  }
}
@media (max-width: 350px) {
  .hour {
    font-size: 0.875rem;
  }
}

.hour > .tile-content {
  font-size: inherit;
}
.hour .legacy-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25em;
  min-width: 0;
}
.hour .legacy-copy {
  position: absolute;
  inset: 0;
  color: var(--outage-ink);
}

.nav button {
  min-width: 0;
  white-space: normal;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.nav button:nth-child(2) {
  flex: 1.5;
}
.shell {
  padding-bottom: calc(
    max(112px, var(--nav-height, 80px)) + 32px + env(safe-area-inset-bottom)
  );
}

/* Informational tiles support horizontal gestures; the browser retains pan/zoom. */
.schedule, .hours { touch-action: pan-y pinch-zoom; }
.hour.icon-bulb .icon { width: 1em; height: 1.15em; }
.range-hour.icon-bulb .tile-times { left: 1.5em; }
.settings .reminder-setting { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.reminder-copy { display:flex; flex-direction:column; gap:4px; flex:1 1 8rem; min-width:0; }
.settings .reminder-copy .reminder-label { display:block; min-height:0; padding:0; }
.reminder-label { white-space: nowrap; }
.reminder-setting .picker-trigger {
  width: auto;
  flex: 0 0 auto;
  min-width: 6em;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 12px;
  margin-left: auto;
  text-align: center;
  white-space: nowrap;
}

.hours-viewport {
  position: relative;
  overflow: hidden;
}
.hours.hours-exiting {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
}

.hour.clock-shift .tile-times { gap: 0; left: 0.85em; right: 0.1em; }
.hour.clock-shift .clock-time-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hour.clock-shift:not(.mixed) .tile-times { left: 0; right: 0; }
.clock-main { display: flex; align-items: center; gap: 0.25em; }
.hour.clock-shift .tile-icon { left: 0.1em; }
.hour.clock-shift .tile-icon .icon {
  height: 0.7em;
  width: 0.7em;
}
.hour.clock-shift .tile-time {
  flex: none;
  width: auto;
  align-self: center;
  padding: 0 0.15em;
  border-radius: 3px;
  background: var(--clock-time-bg,var(--button));
  color: var(--clock-time-ink,var(--ink)) !important;
}
.hour.clock-shift .clock-change {
  padding: 0 0.2em;
  border-radius: 3px;
  background: var(--button);
  color: var(--ink);
  font-size: min(0.5625rem, 12px);
  line-height: 1.2;
  white-space: nowrap;
}

/* Next patch: shared, accessible compact components. */
.header-category { display:block; font-size:.75rem; font-weight:400; }
.address-trigger,.address-static { display:flex; align-items:center; gap:10px; width:100%; min-width:0; padding:0; background:transparent; text-align:left; }
.address-static { padding:0; }
.address-copy { display:flex; flex-direction:column; gap:1px; min-width:0; flex:1; }
.address-name { font-size:1.3125rem; font-weight:650; line-height:1.25; color:var(--accent); }
.address-detail { font-size:.875rem; line-height:1.3; font-weight:400; color:var(--muted); }
.address-trigger .address-name,.address-trigger .address-detail,.address-static .address-name,.address-static .address-detail { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.address-chevron { width:32px; height:32px; flex:none; }
.address-list { display:grid; gap:6px; margin-top:14px; }
.address-option { display:flex; align-items:center; gap:10px; text-align:left; width:100%; padding:12px; border:1px solid transparent; }
.address-option .address-name { font-size:1.125rem; }
.address-option .address-copy { overflow-wrap:anywhere; }
.address-option[aria-pressed=true] { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 12%,var(--surface)); }
.fit-pair { gap:8px; }
.fit-pair > * { font-size:.875rem; white-space:nowrap; min-height:48px; }
.fit-pair.vertical { flex-direction:column; }
.fit-pair.vertical > * { flex:auto; width:100%; }
.main-donation { margin-top:12px; }
.main-share .share-label { display:inline-flex; align-items:center; justify-content:center; gap:.35em; max-width:100%; vertical-align:middle; }
.main-share .share-label .icon { width:1.2em; height:1.2em; flex:none; }
.main-share .share-label > span { min-width:0; }
.weather-credit { margin:6px 0 0; color:var(--muted); font-size:.6875rem; line-height:1.5; }
.weather-credit a { color:inherit; text-underline-offset:2px; }
.message { padding:18px 16px; }
.message-meta { display:block; font-size:.75rem; color:var(--muted); }
.message h2 { margin:7px 0 4px; font-size:1.25rem; font-weight:600; }
.message-context { font-size:.875rem; color:var(--muted); }
.message .row { margin-top:14px; }
.message.large-text .full-copy { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.full-copy { overflow-wrap:anywhere; }
.full-copy:focus-visible { outline:2px solid var(--accent); }
.text-tooltip { position:fixed; z-index:50; bottom:calc(var(--nav-height,80px) + 12px); left:12px; right:12px; max-width:740px; margin:auto; padding:16px; border-radius:14px; background:var(--ink); color:var(--bg); overflow-wrap:anywhere; }
.appearance,.notifications { padding:18px 16px; }
.appearance h2,.notifications h2 { font-size:1.25rem; }
.appearance-row { display:grid; grid-template-columns:65px minmax(0,1fr); gap:10px; align-items:center; padding:10px 0; }
.appearance-row + .appearance-row { border-top:1px solid var(--track); }
.appearance-row:last-child { padding-bottom:0; }
.appearance-label { font-size:.875rem; color:var(--muted); }
.appearance-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; padding:4px; background:var(--bg); border-radius:13px; min-width:0; }
.appearance-choice { position:relative; display:flex; align-items:center; justify-content:center; gap:5px; min-width:0; min-height:48px; padding:7px 5px; border:1px solid transparent; border-radius:10px; font-size:.8125rem; background:transparent; color:var(--muted); }
.appearance-choice[aria-pressed=true] { border-color:var(--accent); background:color-mix(in srgb,var(--accent) 12%,var(--surface)); color:var(--ink); }
.choice-check { position:absolute; right:3px; top:1px; font-size:.5625rem; visibility:hidden; color:var(--accent); }
.appearance-choice[aria-pressed=true] .choice-check { visibility:visible; }
.appearance-choice .icon { width:19px; height:19px; }
.appearance-choice[data-look=icons] .icon { width:24px; height:24px; }
.time-example { font-size:.9375rem; line-height:1.15; font-variant-numeric:tabular-nums; }
.appearance.large-text .appearance-row { grid-template-columns:minmax(0,1fr); gap:7px; }
.appearance.large-text .appearance-choice { font-size:1.125rem; }
.notification-heading { display:flex; align-items:center; gap:4px; }
.notification-heading > span { min-width:0; overflow-wrap:anywhere; }
.notification-status { position:relative; display:inline-flex; align-items:center; justify-content:flex-start; flex:0 0 44px; width:44px; min-height:44px; padding:0; margin:0; background:transparent; border:0; border-radius:6px; color:var(--accent); }
.notification-status.bell-off { color:var(--muted); }
.notification-bell { width:28px; height:28px; flex:0 0 28px; }
.notification-status:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.boot-state { min-height:8rem; }
.storage-notice { font-size:.875rem; color:var(--muted); }
.settings .notification-toggle { min-height:48px; font-size:.875rem; padding:6px 0; align-items:center; }
.notification-toggle span { min-width:0; overflow-wrap:anywhere; }
.notification-toggle input[role=switch] { appearance:none; width:38px; height:24px; border:1px solid var(--track); border-radius:20px; background:var(--bg); position:relative; cursor:pointer; margin:0; }
.notification-toggle input[role=switch]:before { content:''; position:absolute; width:16px; height:16px; border-radius:50%; left:3px; top:3px; background:var(--muted); }
.notification-toggle input[role=switch]:checked { background:var(--accent); border-color:var(--accent); }
.notification-toggle input[role=switch]:checked:before { left:17px; background:var(--onaccent); }
.notification-toggle input[role=switch]:disabled { opacity:.4; cursor:default; }
.notifications hr { border:0; border-top:1px solid var(--track); margin:16px 0; }
.notifications .reminder-setting { font-size:.875rem; min-height:48px; padding:6px 0; }
.reminder-setting .picker-trigger { min-height:48px; font-size:inherit; }
.notifications #lead-help { display:block; font-size:.75rem; margin:0; }
.short-legend { border-top:1px solid var(--track); margin-top:18px; padding-top:16px; display:flex; flex-wrap:nowrap; gap:10px var(--legend-gap,16px); color:var(--muted); font-size:.875rem; }
.short-legend.legend-wrap { flex-wrap:wrap; }
.short-legend > span { display:inline-flex; flex:none; align-items:center; gap:var(--legend-label-gap,6px); white-space:nowrap; }
.short-legend .icon { width:20px; height:20px; color:var(--accent); }
.legend-off { display:grid; place-items:center; width:24px; height:28px; background:var(--sample-color); color:var(--outage-ink); border-radius:5px; font-style:normal; flex:none; }
.legend-off .icon { color:inherit; }
.current-sample { width:24px; height:28px; border:2px solid var(--accent); border-radius:5px; flex:none; }
.full-legend { border-top:1px solid var(--track); padding:18px 4px 0; color:var(--muted); font-size:.875rem; }
.full-legend h2 { font-size:1rem; margin:0 0 14px; color:var(--ink); }
.full-legend p { display:flex; align-items:center; gap:12px; margin-top:12px; }
.full-legend .legend-off { width:30px; height:40px; }
.half-sample { width:30px; height:40px; flex:none; border:1px solid var(--muted); border-radius:5px; background:linear-gradient(var(--sample-color) 50%,var(--button) 50%); display:flex; justify-content:center; font-style:normal; color:var(--outage-ink); }
.half-sample .icon { width:16px; height:16px; margin-top:1px; }
@media(max-width:360px) { .appearance-choice[data-look=theme] { flex-direction:column; gap:2px; } .short-legend .icon { width:16px; height:16px; } }

.header-queue { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.header-category { display:inline; font-size:inherit; }
.bell-icon { width:14px; height:14px; vertical-align:middle; margin-right:4px; }

.short-legend .legend-on { display:grid; place-items:center; width:20px; height:24px; border-radius:4px; background:var(--button); flex:none; }
.full-legend .legend-off { width:30px; height:30px; }

.short-legend .legend-on,.short-legend .legend-off,.short-legend .current-sample { width:var(--legend-icon,20px); height:var(--legend-icon,20px); border-radius:4px; }
.short-legend .icon { width:calc(var(--legend-icon,20px) - 2px); height:calc(var(--legend-icon,20px) - 2px); }

:root[data-theme="light"] .main-share button,
:root[data-theme="light"] .main-donation .button {
  background:#e3edd6;
  border:1px solid #8ca17f;
  color:var(--accent);
}
:root[data-theme="light"] .main-share button:hover,
:root[data-theme="light"] .main-donation .button:hover { background:#d6e5c5; }

/* Time labels use the same weight in single, range and clock-change tiles. */
.hour .legacy-label,
.hour .tile-time { font-weight:500; }

.full-legend h2 { font-size:1.125rem; }

.address-option .address-name {
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.address-check { display:flex; align-items:center; justify-content:center; width:24px; height:24px; flex:none; color:var(--accent); }
