@import url("/static/css/wall-final-polish.css");

@media (orientation: landscape) and (min-width: 860px) and (max-width: 1600px) and (min-height: 560px) and (max-height: 1100px) {
  body[data-wall-dashboard="true"] .family-shell {
    width: min(100% - 16px, 1328px) !important;
    padding-top: max(10px, env(safe-area-inset-top)) !important;
  }

  body[data-wall-dashboard="true"] .family-header {
    min-height: 0 !important;
    padding-bottom: 8px !important;
  }

  body[data-wall-dashboard="true"] .family-header h1 {
    font-size: clamp(38px, 4.6vw, 58px) !important;
  }

  body[data-wall-dashboard="true"] .family-clock {
    font-size: clamp(42px, 5.4vw, 70px) !important;
  }

  body[data-wall-dashboard="true"] .wall-top-bars {
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .wall-top-bars .wall-safety-strip {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    padding: 5px 7px !important;
    margin: 0 !important;
    border-radius: 22px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .wall-top-bars .wall-safety-item {
    min-height: 34px !important;
    padding: 5px 9px !important;
    gap: 5px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .wall-top-bars .wall-safety-icon {
    font-size: 15px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .wall-top-bars .wall-display-actions {
    gap: 6px !important;
    white-space: nowrap !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .wall-top-bars .wall-display-actions a,
  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .wall-top-bars .wall-display-actions button,
  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .wall-top-bars .wall-home-status {
    min-height: 34px !important;
    padding: 5px 9px !important;
    font-size: 12px !important;
  }

  body[data-wall-dashboard="true"] .family-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    align-items: start !important;
    gap: 10px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .family-card {
    padding: 18px !important;
    border-radius: 24px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .card-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 14px !important;
    font-size: 25px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .family-data-notice {
    margin-top: 8px !important;
    padding: 6px 9px !important;
    font-size: 12px !important;
  }

  body[data-wall-dashboard="true"] .routine-card,
  body[data-wall-dashboard="true"] .weather-card {
    min-height: 300px !important;
    height: auto !important;
  }

  body[data-wall-dashboard="true"] .calendar-card,
  body[data-wall-dashboard="true"] .meal-card,
  body[data-wall-dashboard="true"] .family-tasks-card {
    min-height: 0 !important;
    height: auto !important;
  }

  body[data-wall-dashboard="true"] .routine-card {
    grid-column: 1 / span 2 !important;
    grid-row: 1 !important;
  }

  body[data-wall-dashboard="true"] .weather-card {
    grid-column: 3 / span 2 !important;
    grid-row: 1 !important;
  }

  body[data-wall-dashboard="true"] .calendar-card {
    grid-column: 1 / span 2 !important;
    grid-row: 2 !important;
  }

  body[data-wall-dashboard="true"] .meal-card {
    grid-column: 3 / span 2 !important;
    grid-row: 2 !important;
  }

  body[data-wall-dashboard="true"] .family-tasks-card {
    grid-column: 1 / span 2 !important;
    grid-row: 3 !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"][data-wall-screen-slug="wall"] .family-tasks-card {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    padding: 16px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .family-task-lists {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .family-task-list {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 14px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .family-task-items {
    flex: 1 1 auto !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .family-task-empty {
    min-height: 96px !important;
    display: grid !important;
    place-items: center !important;
  }

  body[data-wall-dashboard="true"] .routine-pictogram-frame {
    min-height: 72px !important;
    max-height: 88px !important;
  }

  body[data-wall-dashboard="true"] .routine-pictogram {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
  }

  body[data-wall-dashboard="true"] .routine-title {
    font-size: clamp(28px, 3.2vw, 42px) !important;
    line-height: 1.05 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  body[data-wall-dashboard="true"] .wall-safety-strip {
    position: static !important;
    margin-top: 0 !important;
  }
}

/* Profile-specific rules remain active even when Windows display scaling or
   browser chrome changes the reported viewport height. */
@media (orientation: landscape) and (min-width: 860px) {
  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .wall-top-bars {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    gap: 6px 10px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .wall-top-bars .wall-safety-strip {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    padding: 5px !important;
    border-radius: 22px !important;
    overflow: hidden !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .wall-top-bars .wall-safety-item {
    min-width: 0 !important;
    min-height: 30px !important;
    padding: 4px 8px !important;
    gap: 4px !important;
    flex: 0 1 auto !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .wall-top-bars .wall-safety-icon {
    font-size: 14px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .wall-top-bars .wall-display-actions {
    grid-column: 2 !important;
    grid-row: 2 !important;
    justify-self: end !important;
    min-height: 34px !important;
    gap: 6px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .wall-top-bars .wall-display-actions a,
  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .wall-top-bars .wall-display-actions button,
  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .wall-top-bars .wall-home-status {
    min-height: 34px !important;
    padding: 5px 9px !important;
    font-size: 12px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .routine-card {
    min-height: 300px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .routine-card-content {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .routine-panel {
    display: grid !important;
    grid-template-columns: minmax(140px, 0.72fr) minmax(0, 1.28fr) !important;
    align-items: stretch !important;
    gap: 14px !important;
    min-height: 190px !important;
    height: auto !important;
    overflow: visible !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .routine-pictogram-frame {
    width: 100% !important;
    max-width: none !important;
    min-height: 108px !important;
    max-height: 120px !important;
    align-self: start !important;
    justify-self: stretch !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .routine-copy {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 190px !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    overflow: visible !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .routine-title {
    max-width: 100% !important;
    max-height: 2.15em !important;
    margin: 4px 0 0 !important;
    overflow: hidden !important;
    font-size: clamp(26px, 3vw, 40px) !important;
    line-height: 1.05 !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .routine-time {
    margin: 2px 0 0 !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .routine-actions {
    width: 100% !important;
    margin-top: auto !important;
    display: grid !important;
    grid-template-columns: minmax(92px, 0.72fr) minmax(128px, 1.28fr) !important;
    gap: 9px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .routine-actions button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 38px !important;
    padding: 7px 10px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] #weatherCardIcon {
    font-size: 0 !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] #weatherCardIcon::before {
    content: "☁";
    font-size: 24px;
    line-height: 1;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] #weatherSymbol[aria-label="Tåge"] {
    font-size: 0 !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] #weatherSymbol[aria-label="Tåge"]::before {
    content: "☁";
    font-size: 36px;
    line-height: 1;
  }
}

/* v0.17.4 Surface card balance */
@media (orientation: landscape) and (min-width: 860px) and (max-width: 1600px) {
  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .family-grid {
    align-items: stretch !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .calendar-card,
  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .meal-card {
    min-height: 250px !important;
    height: 100% !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .calendar-card-content,
  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .meal-card-content,
  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .family-tasks-content {
    min-height: 0 !important;
    height: 100% !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .calendar-data,
  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .meal-plan-data,
  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .family-tasks-data {
    min-height: 0 !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .family-tasks-card {
    min-height: 210px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .family-task-empty {
    min-height: 64px !important;
  }

  body[data-wall-dashboard="true"][data-wall-screen-profile="surface"] .family-footer {
    display: none !important;
  }
}

/* v0.17.5 final Surface and safety-strip polish */

body[data-wall-dashboard="true"] .family-header-side {
  min-width: min(430px, 42vw);
}

body[data-wall-dashboard="true"] .wall-display-actions {
  justify-content: flex-end;
}

body[data-wall-dashboard="true"] .wall-safety-strip {
  justify-content: center;
  padding: 7px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--card) 94%, transparent);
}

body[data-wall-dashboard="true"] .wall-safety-item {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 15px;
  background: var(--surface-muted);
}

body[data-wall-dashboard="true"] .wall-safety-item.ok {
  border-color: color-mix(in srgb, var(--good) 28%, var(--card-border));
}

body[data-wall-dashboard="true"] .wall-safety-item.warning {
  border-color: color-mix(in srgb, var(--warning) 34%, var(--card-border));
}

body[data-wall-dashboard="true"] .wall-safety-item.critical {
  border-color: color-mix(in srgb, var(--critical) 36%, var(--card-border));
}

body[data-wall-dashboard="true"] .wall-safety-item.unknown {
  color: var(--muted);
}

body[data-wall-dashboard="true"] .wall-safety-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 920px) {
  body[data-wall-dashboard="true"] .family-header {
    align-items: flex-start;
  }

  body[data-wall-dashboard="true"] .family-header-side {
    min-width: 0;
  }

  body[data-wall-dashboard="true"] .wall-safety-strip {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  body[data-wall-dashboard="true"] .wall-safety-strip::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 640px) {
  body[data-wall-dashboard="true"] .family-header-side {
    justify-items: start;
  }

  body[data-wall-dashboard="true"] .wall-display-actions {
    width: 100%;
    justify-content: flex-start;
  }

  body[data-wall-dashboard="true"] .wall-display-actions a,
  body[data-wall-dashboard="true"] .wall-display-actions button {
    flex: 1 1 140px;
  }
}

/* v0.17.5 compact wall status hotfix */

body[data-wall-dashboard="true"] .wall-safety-strip {
  width: fit-content;
  max-width: calc(100% - 20px);
  margin-left: 0;
  margin-right: auto;
  padding: 5px;
  gap: 5px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--card) 90%, transparent);
}

body[data-wall-dashboard="true"] .wall-safety-item {
  min-height: 34px;
  padding: 5px 9px;
  border-radius: 12px;
  font-size: 12px;
}

body[data-wall-dashboard="true"] .wall-safety-icon {
  font-size: 15px;
}

@media (max-width: 920px) {
  body[data-wall-dashboard="true"] .wall-safety-strip {
    width: 100%;
    max-width: 100%;
  }
}

/* v0.17.5 redesigned Surface weather card */

body[data-wall-dashboard="true"] .weather-card {
  min-height: 310px;
}

body[data-wall-dashboard="true"] .weather-data {
  height: 100%;
  margin-top: 14px;
  display: grid;
  grid-template-rows: auto auto;
  align-content: space-between;
  gap: 12px;
}

body[data-wall-dashboard="true"] .weather-current {
  min-height: 150px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  border-radius: 22px;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--accent) 9%, transparent),
      var(--surface-muted)
    );
}

body[data-wall-dashboard="true"] .weather-symbol {
  width: 82px;
  height: 82px;
  border-radius: 24px;
  font-size: 48px;
}

body[data-wall-dashboard="true"] .weather-temperature {
  font-size: clamp(52px, 5vw, 68px);
  line-height: 0.92;
}

body[data-wall-dashboard="true"] .weather-condition {
  margin-top: 7px;
  font-size: 21px;
  line-height: 1.1;
}

body[data-wall-dashboard="true"] .weather-uv {
  max-width: 100%;
  margin-top: 11px;
  padding: 8px 12px;
  gap: 7px;
  font-size: 15px;
  line-height: 1.2;
  white-space: normal;
  border-radius: 13px;
}

body[data-wall-dashboard="true"] .weather-uv strong {
  font-size: 16px;
  white-space: nowrap;
}

body[data-wall-dashboard="true"] .weather-uv span {
  min-width: 0;
  padding-left: 7px;
}

body[data-wall-dashboard="true"] .weather-forecast {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body[data-wall-dashboard="true"] .weather-forecast-item {
  min-height: 66px;
  padding: 9px 11px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 8px;
  border-radius: 15px;
}

body[data-wall-dashboard="true"] .weather-forecast-day {
  font-size: 14px;
}

body[data-wall-dashboard="true"] .weather-forecast-symbol {
  grid-row: 1 / span 2;
  grid-column: 2;
  font-size: 25px;
}

body[data-wall-dashboard="true"] .weather-forecast-temperatures {
  font-size: 14px;
}

body[data-wall-dashboard="true"] .weather-forecast-rain {
  display: none;
}

@media (max-width: 920px) {
  body[data-wall-dashboard="true"] .weather-current {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  body[data-wall-dashboard="true"] .weather-symbol {
    width: 72px;
    height: 72px;
    font-size: 42px;
  }
}

@media (max-width: 640px) {
  body[data-wall-dashboard="true"] .weather-forecast {
    grid-template-columns: 1fr;
  }

  body[data-wall-dashboard="true"] .weather-forecast-item {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  body[data-wall-dashboard="true"] .weather-forecast-symbol {
    grid-row: auto;
    grid-column: auto;
  }
}

/* v0.17.5 definitive Surface wall overrides */

/* Wall-dashboardet er altid mørkt, uanset Windows/browser-tema. */
body[data-wall-dashboard="true"] {
  --surface-raised: #152033;
  --surface-muted: rgba(255, 255, 255, 0.045);
}

/* Undgå at datoen bliver klippet øverst. */
body[data-wall-dashboard="true"] .family-shell {
  padding-top: max(34px, env(safe-area-inset-top)) !important;
}

body[data-wall-dashboard="true"] .family-header {
  padding-top: 8px;
}

/* Statuslinjen skal kun fylde efter indholdet. */
body[data-wall-dashboard="true"] .wall-safety-strip {
  width: fit-content !important;
  max-width: 100% !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  gap: 6px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body[data-wall-dashboard="true"] .wall-safety-item {
  min-height: 32px;
  padding: 5px 9px;
  border-radius: 11px;
  background: #263343 !important;
  color: #f1f4f8;
}

/* Kalender: fjern alle hvide aftalefelter. */
body[data-wall-dashboard="true"] .calendar-day-group,
body[data-wall-dashboard="true"] .calendar-day-events,
body[data-wall-dashboard="true"] .calendar-event,
body[data-wall-dashboard="true"] .calendar-empty {
  background: #111b2d !important;
  color: #f1f4f8 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body[data-wall-dashboard="true"] .calendar-event-title,
body[data-wall-dashboard="true"] .calendar-event-calendar {
  color: #f1f4f8 !important;
}

body[data-wall-dashboard="true"] .calendar-event-when,
body[data-wall-dashboard="true"] .calendar-event-status,
body[data-wall-dashboard="true"] .calendar-empty {
  color: #a1a9b7 !important;
}

body[data-wall-dashboard="true"] .calendar-day-group {
  min-height: 0 !important;
}

body[data-wall-dashboard="true"] .calendar-empty {
  min-height: 54px !important;
  padding: 14px !important;
  display: grid;
  place-items: center;
}

/* Opgaver: mørke kort og tydelig tekst uanset systemtema. */
body[data-wall-dashboard="true"] .family-task-list {
  min-height: 0 !important;
  background: rgba(255, 255, 255, 0.035) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

body[data-wall-dashboard="true"] .family-task-item,
body[data-wall-dashboard="true"] .family-task-add {
  background: #111b2d !important;
  color: #f1f4f8 !important;
  border-color: rgba(255, 255, 255, 0.13) !important;
}

body[data-wall-dashboard="true"] .family-task-summary {
  color: #f1f4f8 !important;
}

body[data-wall-dashboard="true"] .family-task-due,
body[data-wall-dashboard="true"] .family-task-description,
body[data-wall-dashboard="true"] .family-task-empty {
  color: #a1a9b7 !important;
}

body[data-wall-dashboard="true"] .family-task-add input {
  background: #182438 !important;
  color: #f1f4f8 !important;
}

body[data-wall-dashboard="true"] .family-task-add input::placeholder {
  color: #929daf !important;
  opacity: 1;
}

body[data-wall-dashboard="true"] .family-task-actions button {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f1f4f8 !important;
  border-color: rgba(255, 255, 255, 0.13) !important;
}

body[data-wall-dashboard="true"] .family-tasks-card {
  min-height: 0 !important;
}

body[data-wall-dashboard="true"] .family-task-empty {
  min-height: 48px;
  padding: 10px;
}

/* Vejr: giv prognosen reel plads og undgå afskæring. */
body[data-wall-dashboard="true"] .weather-card {
  min-height: 350px !important;
  overflow: visible !important;
}

body[data-wall-dashboard="true"] .weather-data {
  height: auto !important;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(150px, auto) 58px;
  gap: 12px;
}

body[data-wall-dashboard="true"] .weather-current {
  min-height: 150px;
}

body[data-wall-dashboard="true"] .weather-forecast {
  min-height: 58px;
  margin: 0 !important;
  padding: 5px;
  overflow: hidden;
}

body[data-wall-dashboard="true"] .weather-forecast-item {
  min-height: 46px !important;
  padding: 6px 9px !important;
  background: transparent !important;
}

body[data-wall-dashboard="true"] .weather-forecast-day,
body[data-wall-dashboard="true"] .weather-forecast-temperatures {
  font-size: 13px !important;
  line-height: 1.1;
}

body[data-wall-dashboard="true"] .weather-forecast-symbol {
  font-size: 21px !important;
}

/* Tablet/mindre wall-visninger. */
@media (max-width: 920px) {
  body[data-wall-dashboard="true"] .wall-safety-strip {
    width: 100% !important;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  body[data-wall-dashboard="true"] .family-task-lists {
    grid-template-columns: 1fr;
  }
}

/* v0.17.5 show compact rain chance on wall forecast */

body[data-wall-dashboard="true"] .weather-forecast-rain {
  display: block;
  grid-column: 1 / -1;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px !important;
  line-height: 1;
  white-space: nowrap;
}

/* Keep wall rain chance fully visible */

body[data-wall-dashboard="true"] .weather-forecast {
  min-height: 68px;
}

body[data-wall-dashboard="true"] .weather-forecast-item {
  min-height: 56px !important;
  padding: 6px 9px 7px !important;
  grid-template-rows: auto auto auto;
}

body[data-wall-dashboard="true"] .weather-forecast-rain {
  margin-top: 1px;
  font-size: 11px !important;
  line-height: 1.1;
  align-self: end;
}

/* Move wall UV badge to the right of the current weather summary */

body[data-wall-dashboard="true"] .weather-current {
  grid-template-columns: 82px minmax(0, 1fr) auto !important;
  align-items: center !important;
  column-gap: 18px;
}

body[data-wall-dashboard="true"] .weather-symbol {
  grid-column: 1;
  grid-row: 1 / span 2;
}

body[data-wall-dashboard="true"] .weather-temperature {
  grid-column: 2;
  grid-row: 1;
}

body[data-wall-dashboard="true"] .weather-condition {
  grid-column: 2;
  grid-row: 2;
  margin-top: 0 !important;
}

body[data-wall-dashboard="true"] .weather-uv {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  margin-top: 0 !important;
  max-width: 290px;
}

@media (max-width: 920px) {
  body[data-wall-dashboard="true"] .weather-current {
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }

  body[data-wall-dashboard="true"] .weather-symbol {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  body[data-wall-dashboard="true"] .weather-temperature {
    grid-column: 2;
    grid-row: 1;
  }

  body[data-wall-dashboard="true"] .weather-condition {
    grid-column: 2;
    grid-row: 2;
  }

  body[data-wall-dashboard="true"] .weather-uv {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
    margin-top: 8px !important;
    max-width: 100%;
  }
}

/* Put wall UV in its own box beside the temperature */

body[data-wall-dashboard="true"] .weather-current {
  grid-template-columns: 82px minmax(0, 1fr) 220px !important;
  grid-template-rows: auto auto;
  align-items: center !important;
  column-gap: 18px;
  row-gap: 6px;
}

body[data-wall-dashboard="true"] .weather-symbol {
  grid-column: 1;
  grid-row: 1 / span 2;
}

body[data-wall-dashboard="true"] .weather-temperature {
  grid-column: 2;
  grid-row: 1;
}

body[data-wall-dashboard="true"] .weather-condition {
  grid-column: 2;
  grid-row: 2;
  margin-top: 0 !important;
}

body[data-wall-dashboard="true"] .weather-uv {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  margin-top: 0 !important;
  width: 220px;
  max-width: 220px;
  min-height: 88px;
  padding: 12px 14px !important;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--warning) 28%, var(--card-border));
  background: color-mix(in srgb, var(--warning) 10%, #111b2d);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 6px;
  align-content: center;
}

body[data-wall-dashboard="true"] .weather-uv strong {
  display: block;
  font-size: 18px !important;
  line-height: 1.1;
  white-space: nowrap;
}

body[data-wall-dashboard="true"] .weather-uv span {
  display: block;
  min-width: 0;
  padding-left: 0 !important;
  border-left: 0 !important;
  font-size: 14px !important;
  line-height: 1.2;
}

@media (max-width: 920px) {
  body[data-wall-dashboard="true"] .weather-current {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto;
  }

  body[data-wall-dashboard="true"] .weather-symbol {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  body[data-wall-dashboard="true"] .weather-temperature {
    grid-column: 2;
    grid-row: 1;
  }

  body[data-wall-dashboard="true"] .weather-condition {
    grid-column: 2;
    grid-row: 2;
  }

  body[data-wall-dashboard="true"] .weather-uv {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
    width: min(100%, 260px);
    max-width: min(100%, 260px);
    min-height: 0;
    margin-top: 4px !important;
  }
}

/* Definitive UV layout: separate box beside temperature */

body[data-wall-dashboard="true"] .weather-current {
  grid-template-columns: 82px minmax(0, 1fr) 220px !important;
  grid-template-rows: 1fr !important;
  align-items: center !important;
  gap: 18px !important;
}

body[data-wall-dashboard="true"] .weather-symbol {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

body[data-wall-dashboard="true"] .weather-summary {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

body[data-wall-dashboard="true"] .weather-temperature {
  display: block;
}

body[data-wall-dashboard="true"] .weather-condition {
  margin-top: 6px !important;
}

body[data-wall-dashboard="true"] .weather-uv {
  grid-column: 3 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: stretch !important;
  width: auto !important;
  max-width: none !important;
  min-height: 88px;
  margin: 0 !important;
  padding: 13px 15px !important;
  border: 1px solid #d9a900 !important;
  border-radius: 16px;
  background: #f4c542 !important;
  color: #211a00 !important;
  display: grid;
  align-content: center;
  gap: 7px;
}

body[data-wall-dashboard="true"] .weather-uv[hidden] {
  display: none !important;
}

body[data-wall-dashboard="true"] .weather-uv strong,
body[data-wall-dashboard="true"] .weather-uv span {
  color: #211a00 !important;
  opacity: 1 !important;
}

body[data-wall-dashboard="true"] .weather-uv strong {
  font-size: 18px !important;
  font-weight: 850;
}

body[data-wall-dashboard="true"] .weather-uv span {
  padding: 0 !important;
  border: 0 !important;
  font-size: 14px !important;
  font-weight: 700;
  line-height: 1.2;
}

@media (max-width: 920px) {
  body[data-wall-dashboard="true"] .weather-current {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
  }

  body[data-wall-dashboard="true"] .weather-symbol {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body[data-wall-dashboard="true"] .weather-summary {
    grid-column: 2;
    grid-row: 1;
  }

  body[data-wall-dashboard="true"] .weather-uv {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: min(100%, 280px) !important;
    min-height: 0;
  }
}
