* {
  box-sizing: border-box;
}

:root {
  --screen-bg: linear-gradient(135deg, #07111f 0%, #0a2a36 45%, #14304a 100%);
  --screen-text: #ffffff;
  --screen-accent: #ffd166;
  --screen-panel: rgba(255, 255, 255, 0.13);
  --screen-radius: 28px;
  --screen-font: Inter, "Segoe UI", system-ui, sans-serif;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin: 0;
  font-family: var(--screen-font);
  color: var(--screen-text);
  background: #050b13;
}

body.kiosk {
  overflow: hidden;
  cursor: none;
}

.screen-stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--screen-bg);
  color: var(--screen-text);
  isolation: isolate;
}

.screen-stage::before,
.screen-stage::after {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 209, 102, 0.18), transparent 28%),
    radial-gradient(circle at 78% 28%, rgba(6, 214, 160, 0.14), transparent 32%),
    radial-gradient(circle at 50% 85%, rgba(17, 138, 178, 0.20), transparent 36%);
  animation: ambientMove 22s ease-in-out infinite alternate;
}

.screen-stage::after {
  filter: blur(18px);
  opacity: 0.75;
  animation-duration: 31s;
  transform: rotate(8deg);
}

.screen-stage[data-ambient="off"]::before,
.screen-stage[data-ambient="off"]::after {
  display: none;
}

.screen-render-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 1;
  transition: opacity 520ms ease;
}

.screen-render-layer.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.screen-render-layer > .widget,
.screen-render-layer > .announcement {
  position: absolute;
}

.widget {
  position: absolute;
  z-index: 1;
  container-type: size;
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.17);
  border-radius: var(--screen-radius);
  color: var(--screen-text);
  background: var(--screen-panel);
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  transform-origin: center;
}

.widget.is-borderless {
  border: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.widget.is-animated {
  animation: widgetEnter 720ms cubic-bezier(.2,.9,.2,1) both;
}

.widget::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.13) 35%, transparent 70%);
  transform: translateX(-140%);
  animation: sheen 9s ease-in-out infinite;
}

.widget-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: var(--fit-padding, clamp(8px, min(4cqw, 8cqh), 28px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--fit-gap, clamp(4px, 1.2cqh, 12px));
}

.widget-title {
  margin: 0;
  font-size: var(--fit-title, var(--widget-title-max, 34px));
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.02;
}

.widget-subtitle,
.widget-body,
.widget-note {
  margin: 0;
  font-size: var(--fit-body, var(--widget-body-max, 24px));
  line-height: 1.25;
  color: rgba(255,255,255,0.82);
}

.widget-note {
  margin-top: 0.25em;
  font-size: var(--fit-note, var(--widget-note-max, 18px));
  color: rgba(255,255,255,0.62);
}

/* v1.3.4: klocka och väder använder nu hela rutan bättre och centreras. */
.type-clock .widget-inner,
.type-weather .widget-inner {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.data-tile-inner {
  padding: var(--fit-data-padding, clamp(3px, min(2.1cqw, 4cqh), 18px));
  gap: var(--fit-data-gap, clamp(2px, min(1.2cqw, 2cqh), 10px));
  overflow: hidden;
}

.data-tile-inner.no-title {
  gap: 0;
}

.data-tile-title {
  flex: 0 1 auto;
  width: 100%;
  max-width: 100%;
  margin: 0;
  font-size: var(--fit-label, var(--widget-label-max, 22px));
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clock-stack,
.weather-stack {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.clock-stack {
  gap: clamp(1px, .8cqh, 8px);
}

.live-clock-time {
  font-variant-numeric: tabular-nums;
  font-size: var(--fit-display, var(--widget-display-max, 96px));
  line-height: .86;
  font-weight: 900;
  letter-spacing: -0.035em;
  max-width: 100%;
  white-space: nowrap;
}

.live-clock-date {
  font-size: var(--fit-body, var(--widget-body-max, 24px));
  line-height: 1.05;
  color: rgba(255,255,255,.78);
  text-transform: capitalize;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.16em;
  max-width: 100%;
  min-width: 0;
}

.weather-stack {
  gap: clamp(3px, 1.8cqh, 14px);
}

.weather-temp {
  font-size: var(--fit-display, var(--widget-display-max, 86px));
  line-height: .86;
  font-weight: 900;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.weather-icon {
  font-size: var(--fit-live-icon, var(--widget-icon-max, 64px));
  line-height: 1;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.25));
  flex: 0 0 auto;
}

.weather-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
  gap: 0.36em;
  font-size: var(--fit-note, var(--widget-note-max, 18px));
  line-height: 1.05;
  color: rgba(255,255,255,.74);
}

.weather-pill {
  border-radius: 999px;
  padding: .32em .68em;
  background: rgba(255,255,255,.10);
}

@container (max-height: 120px) {
  .data-tile-title,
  .live-clock-date,
  .weather-meta {
    display: none;
  }
  .data-tile-inner {
    padding: clamp(2px, 1.4cqw, 10px);
  }
  .live-clock-time,
  .weather-temp {
    font-size: var(--fit-display, var(--widget-display-max, 96px));
  }
  .weather-icon {
    font-size: var(--fit-live-icon, var(--widget-icon-max, 64px));
  }
}


.promo-inner.has-image {
  padding: 0;
  justify-content: stretch;
  gap: 0;
}

.promo-content {
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  gap: 0.42em;
}

.promo-inner.has-image .promo-content {
  flex: 1;
  padding: var(--fit-padding, clamp(8px, min(4cqw, 8cqh), 28px));
}

.promo-image {
  position: relative;
  flex: 0 0 42%;
  min-height: 0;
  overflow: hidden;
  background: rgba(0,0,0,.25);
}

.promo-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: var(--promo-image-fit, cover);
  object-position: var(--promo-image-position, center);
}

.promo-icon {
  font-size: var(--fit-icon, var(--widget-icon-max, 64px));
  line-height: 1;
  margin-bottom: 0.12em;
}

.promo-cta {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  margin-top: .25em;
  border-radius: 999px;
  padding: .42em .75em;
  font-size: var(--fit-note, var(--widget-note-max, 18px));
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
  background: var(--screen-accent);
  color: #111827;
}

.menu-list {
  display: grid;
  gap: 0.42em;
  margin-top: .25em;
}

.menu-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1em;
  align-items: baseline;
  font-size: var(--fit-body, var(--widget-body-max, 24px));
}

.menu-row .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-row .price {
  font-weight: 800;
  color: var(--screen-accent);
}

.ticker-frame {
  position: relative;
  overflow: hidden;
  min-height: 2em;
  display: flex;
  align-items: center;
}

.ticker-current {
  font-size: var(--fit-title, var(--widget-title-max, 32px));
  font-weight: 800;
  line-height: 1.12;
  animation: tickerPop 700ms ease both;
}

.image-widget,
.gallery-widget {
  width: 100%;
  height: 100%;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.image-widget img,
.gallery-widget img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: var(--image-fit, cover);
  object-position: var(--image-position, center);
  filter: var(--image-filter, none);
}

.gallery-widget img {
  object-fit: var(--gallery-fit, cover);
  object-position: var(--gallery-position, center);
  filter: none;
}

.gallery-image.is-swapping {
  animation: galleryFade 900ms ease both;
}

.gallery-caption {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 4%;
  z-index: 2;
  border-radius: 999px;
  padding: .42em .78em;
  font-size: var(--fit-note, var(--widget-note-max, 18px));
  font-weight: 800;
  background: rgba(0,0,0,.48);
  color: #fff;
  backdrop-filter: blur(12px);
}

.image-empty,
.gallery-empty {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 8%;
  color: rgba(255,255,255,.68);
  text-align: center;
  border: 2px dashed rgba(255,255,255,.24);
}

.loading,
.screen-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6vw;
  z-index: 5;
  font-size: clamp(18px, 2vw, 40px);
  text-align: center;
  color: rgba(255,255,255,.78);
}

.offline-badge {
  position: fixed;
  right: 1.2vw;
  bottom: 1.2vw;
  z-index: 10;
  border-radius: 999px;
  padding: .55em .8em;
  font-size: 14px;
  font-weight: 800;
  background: rgba(239, 71, 111, .88);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.hidden {
  display: none !important;
}

@keyframes ambientMove {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); }
  100% { transform: translate3d(2%, 1.6%, 0) scale(1.06); }
}

@keyframes widgetEnter {
  0% { opacity: 0; transform: translateY(18px) scale(.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sheen {
  0%, 62% { transform: translateX(-145%); opacity: 0; }
  70% { opacity: .9; }
  84%, 100% { transform: translateX(145%); opacity: 0; }
}

@keyframes tickerPop {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes galleryFade {
  0% { opacity: 0; transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .screen-stage::before,
  .screen-stage::after,
  .widget,
  .widget::before,
  .ticker-current,
  .gallery-image {
    animation: none !important;
  }
}

.qr-inner {
  align-items: center;
  text-align: center;
  justify-content: space-between;
  gap: 0.55em;
}

.qr-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  width: 100%;
}

.qr-icon {
  font-size: var(--fit-icon, var(--widget-icon-max, 48px));
  line-height: 1;
}

.qr-code-wrap {
  display: grid;
  place-items: center;
  width: min(78cqw, 44cqh);
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  padding: 3.5%;
  background: #fff;
  box-shadow: 0 14px 40px rgba(0,0,0,.28);
}

.qr-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 8%;
  border-radius: 14px;
  color: #0f172a;
  background: #fff;
  font-size: var(--fit-note, var(--widget-note-max, 16px));
  line-height: 1.25;
}

.announcement {
  position: absolute;
  z-index: 999;
  pointer-events: none;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.32);
}

.announcement-content {
  display: grid;
  gap: .2em;
}

.announcement-content strong {
  font-size: clamp(28px, 3.8vw, 82px);
  line-height: 1.02;
}

.announcement-content span {
  font-size: clamp(18px, 2vw, 44px);
  line-height: 1.18;
}

.announcement-banner {
  left: 3vw;
  right: 3vw;
  bottom: 3vw;
  border-radius: 28px;
  padding: 1.2vw 1.6vw;
  border: 1px solid rgba(255,255,255,.26);
  box-shadow: 0 24px 80px rgba(0,0,0,.42);
  backdrop-filter: blur(22px);
}

.announcement-fullscreen {
  inset: 0;
  display: grid;
  place-items: center;
  padding: 8vw;
  text-align: center;
}

.announcement-fullscreen .announcement-content {
  width: min(1200px, 92vw);
  border-radius: 42px;
  padding: 4vw;
  border: 1px solid rgba(255,255,255,.26);
  box-shadow: 0 34px 120px rgba(0,0,0,.55);
  backdrop-filter: blur(26px);
}

.announcement-banner.announcement-info,
.announcement-fullscreen.announcement-info .announcement-content {
  background: linear-gradient(135deg, rgba(17, 138, 178, .92), rgba(7, 17, 31, .9));
}

.announcement-banner.announcement-warning,
.announcement-fullscreen.announcement-warning .announcement-content {
  background: linear-gradient(135deg, rgba(255, 183, 3, .96), rgba(180, 83, 9, .94));
}

.announcement-banner.announcement-danger,
.announcement-fullscreen.announcement-danger .announcement-content {
  background: linear-gradient(135deg, rgba(239, 71, 111, .98), rgba(127, 29, 29, .96));
}

.announcement-fullscreen.announcement-info {
  background: rgba(2, 17, 28, .78);
}

.announcement-fullscreen.announcement-warning {
  background: rgba(75, 43, 8, .78);
}

.announcement-fullscreen.announcement-danger {
  background: rgba(69, 10, 10, .82);
}

.display-waiting {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1rem;
  width: 100%;
  height: 100%;
  padding: 7vw;
  text-align: center;
}

.display-waiting strong {
  display: block;
  max-width: 1100px;
  font-size: clamp(32px, 5vw, 96px);
  line-height: 1.05;
}

.display-waiting span {
  display: block;
  max-width: 920px;
  color: rgba(255,255,255,.78);
  font-size: clamp(18px, 2vw, 40px);
  line-height: 1.25;
}

.display-waiting small {
  display: block;
  max-width: 92vw;
  overflow-wrap: anywhere;
  color: rgba(255,255,255,.56);
  font-size: clamp(12px, 1.1vw, 22px);
}

/* v1.3.2: om "Visa ram" är av ska rutan bli helt utan ram/skugga på TV:n. */
.widget.is-borderless {
  border: 0 !important;
  box-shadow: none !important;
}

/* v1.3.3: när ram är av ska även dekorationslinjen/sheen försvinna. */
.widget.is-borderless::before {
  display: none !important;
}


/* TV compatibility additions v1.3.5 */
.screen-error strong{display:block;font-size:56px;margin-bottom:18px}.screen-error span{display:block;font-size:28px;opacity:.95}.screen-error small{display:block;margin-top:18px;opacity:.8}.qr-fallback{width:220px;max-width:42%;max-height:70%;object-fit:contain;background:#fff;border-radius:18px;padding:12px}.widget-thumb{width:1.5em;height:1.5em;object-fit:cover;border-radius:.28em;display:block;margin-bottom:.35em}.image-widget>img{width:100%;height:100%;display:block}.clock-fit,.weather-fit{display:flex;align-items:center;justify-content:center;padding:20px!important}.clock-fit .clock-scale,.weather-fit .weather-scale{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.clock-fit .live-clock-time{font-size:92px;line-height:.9;font-weight:900}.clock-fit .live-clock-date{font-size:24px;line-height:1.1}.weather-fit .weather-temp{display:flex;align-items:center;justify-content:center;gap:.18em;font-size:86px;font-weight:900;line-height:.95}.weather-fit .weather-icon{font-size:.55em}.weather-fit .weather-meta{display:flex;gap:.5em;align-items:center;justify-content:center;flex-wrap:wrap;font-size:20px}.weather-fit .weather-meta span{background:rgba(255,255,255,.14);border-radius:999px;padding:.35em .7em}
@media (max-width: 1200px){.clock-fit .live-clock-time{font-size:70px}.weather-fit .weather-temp{font-size:64px}.clock-fit .live-clock-date,.weather-fit .weather-meta{font-size:18px}}

/* v1.3.7: kompakt läge när JS ser att rutan är liten i faktiska pixlar. */
.widget.is-compact-widget .widget-note,
.widget.is-compact-widget .widget-subtitle.data-tile-title {
  opacity: .78;
}
.widget.is-tiny-widget .data-tile-title,
.widget.is-tiny-widget .live-clock-date,
.widget.is-tiny-widget .weather-meta,
.widget.is-tiny-widget .widget-note {
  display: none !important;
}
.widget.is-tiny-widget .widget-inner {
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* v1.3.8: kort med hel bakgrundsbild och kopplingsvy */
.widget.has-card-background {
  background-color: rgba(0,0,0,.34);
  background-blend-mode: normal;
  overflow: hidden;
}

.widget.has-card-background .promo-inner,
.promo-inner.has-background-image {
  padding: 0;
  width: 100%;
  height: 100%;
  justify-content: stretch;
}

.widget.has-card-background .promo-content,
.promo-inner.has-background-image .promo-content {
  width: 100%;
  height: 100%;
  padding: var(--fit-padding, clamp(10px, min(4.8cqw, 8.5cqh), 34px));
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  text-shadow: 0 2px 18px rgba(0,0,0,.55);
}

.widget.has-card-background .promo-icon,
.promo-inner.has-background-image .promo-icon {
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.42));
}

.widget.has-card-background .promo-cta,
.promo-inner.has-background-image .promo-cta {
  box-shadow: 0 8px 26px rgba(0,0,0,.24);
  text-shadow: none;
}

.pairing-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: min(7vw, 90px);
  color: #fff;
}

.pairing-card {
  width: min(860px, 92vw);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 32px;
  padding: clamp(28px, 5vw, 58px);
  background: rgba(8, 17, 31, .72);
  box-shadow: 0 28px 90px rgba(0,0,0,.38);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.pairing-eyebrow {
  color: var(--screen-accent, #ffd166);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: clamp(13px, 1.2vw, 18px);
}

.pairing-card h1 {
  margin: .25em 0 .2em;
  font-size: clamp(42px, 6vw, 82px);
  line-height: .95;
}

.pairing-card p,
.pairing-card li {
  font-size: clamp(19px, 2vw, 30px);
  line-height: 1.28;
  color: rgba(255,255,255,.84);
}

.pairing-code {
  display: inline-flex;
  margin: .7em 0;
  padding: .22em .45em;
  border-radius: 18px;
  background: var(--screen-accent, #ffd166);
  color: #111827;
  font-size: clamp(38px, 5vw, 76px);
  font-weight: 950;
  letter-spacing: .08em;
}

.pairing-card small {
  display: block;
  margin-top: 18px;
  color: rgba(255,255,255,.58);
  overflow-wrap: anywhere;
}

/* v1.3.9: TV-webbläsare, kopplingsvy och fullskärmsmeddelande */
html,
body {
  min-width: 100%;
  min-height: 100%;
  height: 100%;
}

body.kiosk {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

.screen-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: -webkit-fill-available;
}

.pairing-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 100vw;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vw, 90px);
  background: radial-gradient(circle at 20% 15%, rgba(255,209,102,.18), transparent 30%), linear-gradient(135deg,#07111f,#0b3140 55%,#102035);
  z-index: 10000;
}

.pairing-card {
  width: min(980px, 92vw);
  max-height: 92vh;
  overflow: auto;
}

.announcement-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: -webkit-fill-available;
  z-index: 20000 !important;
  display: grid !important;
  place-items: center !important;
  padding: clamp(24px, 6vw, 120px) !important;
}

.announcement-fullscreen .announcement-content {
  width: min(1500px, 92vw);
  max-width: 92vw;
}

/* v1.3.18: modern sömlös TV-vy utan legacy-fallback och utan helsidomladdningar */
body.modern-tv .loading {
  z-index: 20;
  transition: opacity .45s ease;
}

body.modern-tv .screen-render-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  color: var(--screen-text);
  opacity: 1;
  transform: none;
  transition: opacity 700ms cubic-bezier(.22,1,.36,1), filter 700ms cubic-bezier(.22,1,.36,1), transform 700ms cubic-bezier(.22,1,.36,1);
  will-change: opacity, filter, transform;
}

body.modern-tv .screen-render-layer.is-entering {
  opacity: 0;
  filter: blur(10px);
  transform: scale(1.01);
}

body.modern-tv .screen-render-layer.is-active {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

body.modern-tv .screen-render-layer.is-leaving {
  opacity: 0;
  filter: blur(8px);
  transform: scale(.995);
  pointer-events: none;
}

body.modern-tv .screen-render-layer::before,
body.modern-tv .screen-render-layer::after {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 209, 102, 0.12), transparent 28%),
    radial-gradient(circle at 78% 28%, rgba(6, 214, 160, 0.10), transparent 32%),
    radial-gradient(circle at 50% 85%, rgba(17, 138, 178, 0.15), transparent 36%);
  animation: ambientMove 28s ease-in-out infinite alternate;
}

body.modern-tv .screen-render-layer::after {
  filter: blur(18px);
  opacity: .55;
  animation-duration: 39s;
  transform: rotate(8deg);
}

body.modern-tv .screen-render-layer[data-ambient="off"]::before,
body.modern-tv .screen-render-layer[data-ambient="off"]::after {
  display: none;
}

body.modern-tv .screen-render-layer > .widget,
body.modern-tv .screen-render-layer > .announcement {
  position: absolute;
  z-index: 3;
}

body.modern-tv .screen-stage::before,
body.modern-tv .screen-stage::after {
  display: none;
}

body.modern-tv .screen-error,
body.modern-tv .empty-schedule {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-content: center;
  gap: 18px;
  text-align: center;
  padding: 6vw;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.14), transparent 35%), rgba(5, 11, 19, .72);
}

body.modern-tv .screen-error strong,
body.modern-tv .empty-schedule strong {
  font-size: clamp(42px, 6vw, 92px);
  line-height: 1;
}

body.modern-tv .screen-error span,
body.modern-tv .empty-schedule span {
  font-size: clamp(20px, 2.5vw, 36px);
  color: rgba(255,255,255,.78);
}

.modern-pairing .pairing-badge {
  display: inline-grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 22px;
  background: linear-gradient(135deg, #6ee7b7, #facc15);
  color: #07111f;
  font-weight: 950;
  font-size: 30px;
  margin-bottom: 22px;
}

.modern-pairing .pairing-id {
  overflow-wrap: anywhere;
}

.modern-pairing .pairing-list {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.16);
}

.modern-pairing .pairing-list span {
  color: var(--screen-accent, #ffd166);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
}

.modern-pairing .pairing-list ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.modern-pairing .pairing-list li {
  margin: 8px 0;
}

@media (prefers-reduced-motion: reduce) {
  body.modern-tv .screen-render-layer,
  body.modern-tv .widget,
  body.modern-tv .widget::before {
    transition: none !important;
    animation: none !important;
  }
}

/* ChirpStack havstemperatur */
.type-sensor-temp .sensor-temp-inner {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: clamp(4px, 1.4cqh, 14px);
}

.sensor-temp-stack {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(2px, 1.2cqh, 10px);
}

.sensor-temp-tile-title {
  opacity: .84;
}

.sensor-temp-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 0.36em, 38px);
  max-width: 100%;
  min-width: 0;
}

.sensor-temp-row.has-icon .sensor-temp-value {
  margin-left: 0;
}

.sensor-temp-icon {
  font-size: calc(var(--fit-live-icon, var(--widget-icon-max, 64px)) * 0.72);
  line-height: 1;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.22));
  flex: 0 0 auto;
}

.sensor-temp-value {
  font-size: var(--fit-display, var(--widget-display-max, 86px));
  line-height: .9;
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.sensor-temp-value small {
  font-size: .31em;
  letter-spacing: -.02em;
  opacity: .9;
  vertical-align: super;
  margin-left: .04em;
}

.sensor-temp-meta {
  justify-content: center;
  gap: 0.3em;
  font-size: calc(var(--fit-note, var(--widget-note-max, 18px)) * 0.92);
}

.sensor-temp-stale {
  background: rgba(255,209,102,.22) !important;
  color: #ffd166;
}
