/* Larger long-distance typography without changing the established layout dimensions. */
.prayer-time.current {
  color: var(--accent);
}
.prayer-time.current .prayer-dot {
  background: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent);
  opacity: 1;
}
.prayer-time.current small {
  color: var(--accent);
}

.layout-1 .prayer-time small,
.layout-2 .prayer-time small {
  font-size: clamp(1.4rem, 1.8vw, 2rem);
  font-weight: 800;
}
.layout-1 .prayer-time strong,
.layout-2 .prayer-time strong {
  font-size: clamp(2rem, 2.6vw, 3rem);
  white-space: nowrap;
}
.layout-3 .prayer-time small,
.layout-4 .prayer-time small {
  font-size: clamp(1.4rem, 1.8vw, 2rem);
  font-weight: 800;
}
.layout-3 .prayer-time strong,
.layout-4 .prayer-time strong {
  font-size: clamp(2.4rem, 3vw, 3.2rem);
  white-space: nowrap;
}
.next-prayer small {
  font-size: clamp(0.75rem, 0.9vw, 1rem);
  font-weight: 700;
}
.next-prayer strong {
  font-size: clamp(1rem, 1.25vw, 1.45rem);
}
.next-prayer span {
  font-size: clamp(1.1rem, 1.45vw, 1.7rem);
}
.layout-1 {
  grid-template-columns: clamp(190px, 16vw, 290px) 1fr;
}
.layout-2 {
  grid-template-columns: 1fr clamp(190px, 16vw, 290px);
}
.layout-1 .prayer-panel,
.layout-2 .prayer-panel {
  padding: clamp(10px, 1vw, 18px);
}
.layout-1 .prayer-time,
.layout-2 .prayer-time {
  justify-content: center;
  text-align: center;
  padding: clamp(8px, 1.15vh, 14px) 4px;
}
.layout-1 .prayer-time > div,
.layout-2 .prayer-time > div {
  display: block;
}
.layout-1 .prayer-time small,
.layout-2 .prayer-time small {
  display: block;
  font-size: clamp(1.8rem, 2.4vw, 3rem);
  line-height: 1.05;
  margin-bottom: 5px;
}
.layout-1 .prayer-time strong,
.layout-2 .prayer-time strong {
  display: block;
  font-size: clamp(2.4rem, 3vw, 3.2rem);
  line-height: 1.05;
}
.layout-1 .prayer-dot,
.layout-2 .prayer-dot {
  display: none;
}
.layout-1 .prayer-time.current,
.layout-2 .prayer-time.current {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 12px;
}
.date-block {
  gap: clamp(18px, 2.6vw, 45px);
}

/* Theme-specific contrast fixes for long-distance TV viewing. */
.theme-sand .prayer-panel {
  color: #fffaf0;
}
.theme-sand .prayer-time strong {
  color: #fffaf0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.theme-sand .prayer-time small {
  color: #f7e7c3;
}
.theme-sand .prayer-time.current strong,
.theme-sand .prayer-time.current small {
  color: #ffe08a;
}
.theme-sand .next-prayer {
  background: rgba(0, 0, 0, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
}
.theme-sand .next-prayer small,
.theme-sand .next-prayer strong {
  color: #fffaf0;
}
.theme-sand .next-prayer span {
  color: #ffe08a;
}
.theme-sand .slide-stage {
  color: #2c1e0c;
}
.theme-sand .countdown-card p,
.theme-sand .lecture-card p {
  color: #513a18;
}
.theme-sand .welcome-slide {
  color: #fffaf0;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.65);
}

.theme-minimal .ticker-bar .clock-box {
  border-left-color: rgba(255, 255, 255, 0.35);
}
.theme-minimal .ticker-bar .clock-box small,
.theme-minimal .prayer-overlay .overlay-clock small {
  color: #ffdc73;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* Keep the entire video visible and unobstructed inside the slide area. */
.slide-video .slide-media {
  object-fit: contain;
  background: #000;
}

/* Confine horizontal-layout media to its grid row above the lower bars. */
.layout-3,
.layout-4 {
  height: 100vh;
  overflow: hidden;
}
.layout-3 {
  grid-template-rows:
    clamp(62px, 8.5vh, 92px)
    minmax(0, 1fr)
    clamp(105px, 13vh, 145px)
    clamp(68px, 8vh, 92px);
}
.layout-4 {
  grid-template-rows:
    clamp(62px, 8.5vh, 92px)
    clamp(105px, 13vh, 145px)
    minmax(0, 1fr)
    clamp(68px, 8vh, 92px);
}
.layout-3 .mosque-header,
.layout-4 .mosque-header,
.layout-3 .prayer-panel,
.layout-4 .prayer-panel,
.layout-3 .ticker-bar,
.layout-4 .ticker-bar {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.layout-3 .slide-stage,
.layout-4 .slide-stage {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: auto;
  align-self: stretch;
  overflow: hidden;
  isolation: isolate;
  contain: layout paint;
}
.layout-3 .tv-slide,
.layout-4 .tv-slide,
.layout-3 .slide-media,
.layout-4 .slide-media {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}
.layout-3 .prayer-panel,
.layout-4 .prayer-panel,
.layout-3 .ticker-bar,
.layout-4 .ticker-bar {
  position: relative;
  z-index: 5;
}

/* Refined TV composition: quiet surfaces, readable numerals and a framed stage. */
.player {
  --line: color-mix(in srgb, var(--text) 12%, transparent);
}
.tv-layout {
  padding: 1.2vw;
  gap: 1vw;
}
.tv-layout > * {
  min-width: 0;
}
.layout-1 {
  grid-template-columns: minmax(190px, 20vw) minmax(0, 1fr);
  grid-template-rows: 9.5vh minmax(0, 1fr) 8vh;
}
.layout-2 {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 20vw);
  grid-template-rows: 9.5vh minmax(0, 1fr) 8vh;
}
.layout-3 {
  grid-template-rows: 9.5vh minmax(0, 1fr) 16vh 8vh;
}
.layout-4 {
  grid-template-rows: 9.5vh 16vh minmax(0, 1fr) 8vh;
}
.layout-5 {
  grid-template-rows: 9.5vh minmax(0, 1fr) 8vh;
}
.mosque-header {
  min-height: 0;
  padding: 0 0.6vw;
  gap: 2vw;
}
.mosque-identity {
  flex: 1;
}
.mosque-identity > div {
  min-width: 0;
}
.mosque-identity h1 {
  font-size: clamp(20px, 2.2vw, 48px);
  font-weight: 650;
  letter-spacing: -0.025em;
}
.mosque-location {
  margin: 0.5vh 0 0;
  font-size: clamp(12px, 1vw, 22px);
  opacity: 0.72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mosque-logo,
.mosque-identity img {
  width: clamp(38px, 3.8vw, 72px);
  height: clamp(38px, 3.8vw, 72px);
  min-width: 38px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.date-block {
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4vh;
  flex-shrink: 0;
}
.date-block strong {
  font-size: clamp(35px, 1.70vw, 58px);
  font-weight: 700;
  margin: 0;
}
.date-block > div:last-child {
  opacity: 0.72;
}
.prayer-panel {
  border: 1px solid var(--line);
  border-radius: 1.2vw;
  box-shadow: 0 12px 36px #00000012;
}
.layout-1 .prayer-panel,
.layout-2 .prayer-panel {
  padding: 1.1vw;
  gap: 1vh;
}
.prayer-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65vw;
  color: var(--muted);
  letter-spacing: 0.16em;
  font-size: clamp(11px, 0.95vw, 22px);
  font-weight: 600;
  padding: 1.2vh 0;
}
.prayer-heading i {
  color: var(--accent);
}
.layout-1 .prayer-list,
.layout-2 .prayer-list {
  min-height: 0;
  gap: 0.7vh;
  justify-content: space-evenly;
}
.layout-1 .prayer-time,
.layout-2 .prayer-time {
  flex: 1;
  padding: 0.7vh 0.4vw;
  border: 1px solid transparent;
  border-radius: 0.8vw;
}
.layout-1 .prayer-time small,
.layout-2 .prayer-time small {
  font-size: clamp(15px, 1.45vw, 34px);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.2;
  margin-bottom: 0.5vh;
}
.layout-1 .prayer-time strong,
.layout-2 .prayer-time strong {
  font-size: clamp(28px, 3.35vw, 76px);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.035em;
}
.prayer-time strong,
.next-prayer span,
.clock-box,
.header-clock,
.countdown-days strong {
  font-variant-numeric: tabular-nums;
}
.prayer-time.current {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: inset 3px 0 var(--accent);
}
.next-prayer {
  padding: 1vw;
  gap: 0.6vh;
  border-radius: 0.8vw;
  border-color: var(--line);
  background: color-mix(in srgb, var(--bg) 45%, transparent);
}
.layout-1 .next-prayer,
.layout-2 .next-prayer {
  grid-template-columns: 1fr;
  text-align: center;
}
.next-prayer small {
  font-size: clamp(10px, 0.85vw, 18px);
  letter-spacing: 0.08em;
}
.next-prayer strong {
  font-size: clamp(14px, 1.25vw, 28px);
  font-weight: 600;
}
.next-prayer span {
  font-size: clamp(18px, 1.9vw, 42px);
  letter-spacing: 0.03em;
}
.layout-3 .prayer-heading,
.layout-4 .prayer-heading {
  display: none;
}
.layout-3 .prayer-panel,
.layout-4 .prayer-panel {
  padding: 0.8vw;
  gap: 1vw;
}
.layout-3 .prayer-list,
.layout-4 .prayer-list {
  gap: 0.6vw;
  height: 100%;
  min-width: 0;
}
.layout-3 .prayer-time,
.layout-4 .prayer-time {
  border-radius: 0.7vw;
  padding: 0.4vw;
  min-width: 0;
}
.layout-3 .prayer-dot,
.layout-4 .prayer-dot {
  display: none;
}
.layout-3 .prayer-time small,
.layout-4 .prayer-time small {
  font-size: clamp(12px, 1.35vw, 30px);
  font-weight: 600;
}
.layout-3 .prayer-time strong,
.layout-4 .prayer-time strong {
  font-size: clamp(23px, 3vw, 66px);
  font-weight: 650;
}
.layout-3 .next-prayer,
.layout-4 .next-prayer {
  min-width: 0;
  width: 17vw;
  grid-template-columns: 1fr;
  padding: 0.5vw 1vw;
  gap: 0;
}
.layout-3 .next-prayer span,
.layout-4 .next-prayer span {
  font-size: 1.7vw;
}
.slide-stage {
  border: 1px solid var(--line);
  border-radius: 1.2vw;
  background:
    radial-gradient(
      ellipse at 85% 10%,
      color-mix(in srgb, var(--accent) 12%, transparent),
      transparent 60%
    ),
    var(--surface);
}
.layout-3 .tv-slide,
.layout-4 .tv-slide {
  display: grid;
}
.countdown-card {
  width: 100%;
  max-height: 100%;
  padding: 2vh 4vw;
}
.countdown-card > small {
  font-size: clamp(11px, 1vw, 24px);
  letter-spacing: 0.3em;
}
.countdown-card h2 {
  font-size: clamp(24px, 3.2vw, 68px);
  font-weight: 600;
  line-height: 1.15;
  margin: 1.4vh auto;
  max-width: 90%;
  overflow-wrap: anywhere;
}
.countdown-days {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.countdown-days strong {
  font-size: clamp(70px, 17vh, 240px);
  line-height: 1.05;
  font-weight: 650;
  letter-spacing: -0.06em;
  color: var(--accent);
}
.countdown-days span {
  color: var(--text);
  font-size: clamp(14px, 1.3vw, 32px);
  letter-spacing: 0.25em;
  font-weight: 600;
  margin: 1vh 0;
}
.countdown-card .countdown-date {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-size: clamp(13px, 1.25vw, 28px);
  border-top: 1px solid var(--line);
  padding: 1.5vh 2vw 0;
  margin: 1vh 0 0;
}
.countdown-ended .countdown-days strong {
  opacity: 0.5;
}
.lecture-card {
  max-height: 100%;
  overflow: hidden;
}
.lecture-card h2 {
  font-weight: 600;
}
.ticker-bar {
  height: 100%;
  min-height: 0;
  border-radius: 0.8vw;
  overflow: hidden;
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.ticker-label {
  font-size: clamp(15px, 1.2vw, 28px);
  padding: 0 1.6vw;
}
.ticker-track {
  font-size: clamp(40px, 3.5vw, 56px);
  font-weight: 600;
  line-height: 1;
  position: relative;
  top: -0.08em;
}
.clock-box {
  width: clamp(220px, 18vw, 420px);
  min-width: clamp(220px, 18vw, 420px);
  height: 100%;
  padding: 0 clamp(10px, 1vw, 22px);
  flex: 0 0 clamp(230px, 21vw, 420px);
  align-self: stretch;
  display: grid;
  grid-template-columns: auto auto;
  place-content: center;
  align-items: center;
  white-space: nowrap;
}
.clock-box strong {
  display: block;
  font-size: clamp(45px, 4.5vw, 88px);
  font-weight: 650;
  line-height: 0.9;
  letter-spacing: -0.045em;
  transform: translateY(-0.07em);
}
.clock-box small {
  display: block;
  flex: 0 0 auto;
  font-size: clamp(13px, 1.1vw, 24px);
  line-height: 1;
  margin: 0 0 0 0.4em;
  transform: translateY(-0.07em);
  white-space: nowrap;
}
.header-clock {
  width: clamp(250px, 22vw, 440px);
  min-width: clamp(250px, 22vw, 440px);
  height: 100%;
  flex: 0 0 clamp(250px, 22vw, 440px);
  align-self: stretch;
  display: grid;
  grid-template-columns: auto auto;
  place-content: center;
  align-items: center;
  white-space: nowrap;
}
.header-clock strong {
  display: block;
  font-size: clamp(52px, 4.8vw, 96px);
  font-weight: 650;
  line-height: 0.9;
  letter-spacing: -0.045em;
  transform: translateY(-0.07em);
}
.header-clock small {
  display: block;
  flex: 0 0 auto;
  font-size: clamp(14px, 1.15vw, 25px);
  line-height: 1;
  margin: 0 0 0 0.4em;
  transform: translateY(-0.07em);
  white-space: nowrap;
}
.theme-sand .countdown-card > small,
.theme-sand .countdown-days strong,
.theme-sand .lecture-card > small,
.theme-sand .lecture-card > i {
  color: #62420c;
}
.theme-minimal .ticker-label {
  color: #fff;
}
@media (max-width: 900px) {
  .layout-1 {
    grid-template-columns: 22vw minmax(0, 1fr);
  }
  .layout-2 {
    grid-template-columns: minmax(0, 1fr) 22vw;
  }
  .date-block > div:first-child {
    display: block;
  }
  .layout-1 .prayer-time strong,
  .layout-2 .prayer-time strong {
    font-size: 3.8vw;
  }
  .layout-1 .prayer-time small,
  .layout-2 .prayer-time small {
    font-size: 1.8vw;
  }
  .mosque-identity h1 {
    font-size: 2.4vw;
  }
  .date-block strong {
    font-size: 1.5vw;
  }
}

/* Permanent opening mosque profile and closing Makkah clock slides. */
.welcome-slide {
  place-items: center start;
  background-image: linear-gradient(135deg, var(--panel), var(--surface));
  background-size: cover;
  background-position: center;
  padding: clamp(28px, 6vw, 110px);
  text-align: left;
  color: #fff;
}
.welcome-content {
  max-width: min(90%, 1050px);
}
.welcome-slide h2 {
  margin: 1.2vh 0 1.6vh;
  font-size: clamp(38px, 5.2vw, 112px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.32);
}
.welcome-slide p {
  margin: 0;
  font-size: clamp(18px, 1.75vw, 38px);
  color: rgba(255, 255, 255, 0.82);
}
.welcome-meta {
  display: flex;
  gap: clamp(14px, 1.5vw, 30px);
  margin-top: 5vh;
}
.welcome-meta > span {
  min-width: clamp(150px, 16vw, 330px);
  padding: clamp(12px, 1.3vw, 26px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: rgba(2, 15, 12, 0.38);
  backdrop-filter: blur(8px);
}
.welcome-meta small,
.welcome-meta strong {
  display: block;
}
.welcome-meta small {
  font-size: clamp(10px, 0.8vw, 17px);
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.16em;
}
.welcome-meta strong {
  margin-top: 0.5vh;
  font-size: clamp(15px, 1.3vw, 28px);
  font-weight: 600;
}

.mecca-slide {
  background:
    radial-gradient(
      circle at 50% 38%,
      color-mix(in srgb, var(--accent) 16%, transparent),
      transparent 38%
    ),
    linear-gradient(145deg, var(--surface), var(--bg));
}
.mecca-card {
  text-align: center;
  padding: 2vh 3vw;
}
.mecca-card > small {
  color: var(--accent);
  font-size: clamp(10px, 0.9vw, 19px);
  font-weight: 700;
  letter-spacing: 0.28em;
}
.mecca-card h2 {
  margin: 0.6vh 0 1.5vh;
  font-size: clamp(24px, 2.6vw, 56px);
  font-weight: 600;
}
.analog-clock {
  position: relative;
  width: clamp(180px, 28vh, 410px);
  aspect-ratio: 1;
  margin: 0 auto;
  border: clamp(5px, 0.5vw, 10px) solid
    color-mix(in srgb, var(--accent) 70%, var(--text));
  border-radius: 50%;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 15px 50px rgba(0, 0, 0, 0.2);
}
.clock-mark {
  position: absolute;
  color: var(--muted);
  font-size: clamp(13px, 1.2vw, 25px);
  font-weight: 700;
  line-height: 1;
}
.mark-12 {
  top: 7%;
  left: 50%;
  transform: translateX(-50%);
}
.mark-3 {
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
}
.mark-6 {
  bottom: 7%;
  left: 50%;
  transform: translateX(-50%);
}
.mark-9 {
  left: 8%;
  top: 50%;
  transform: translateY(-50%);
}
.clock-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  display: block;
  width: 5px;
  border-radius: 10px;
  background: var(--text);
  transform: translateX(-50%) rotate(0deg);
  transform-origin: center bottom;
}
.hour-hand {
  height: 27%;
  width: 7px;
}
.minute-hand {
  height: 36%;
}
.second-hand {
  height: 40%;
  width: 2px;
  background: var(--accent);
}
.clock-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 4px solid var(--text);
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}
.mecca-time {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.6vw;
  margin-top: 1vh;
}
.mecca-time strong {
  font-size: clamp(25px, 3vw, 65px);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.mecca-time span {
  color: var(--accent);
  font-size: clamp(11px, 1vw, 22px);
  font-weight: 700;
}
.mecca-card > p {
  margin: 0.2vh 0 0;
  color: var(--muted);
  font-size: clamp(11px, 1vw, 22px);
}

/* Lecture details must remain readable from the back of the prayer hall. */
.lecture-card p {
  max-width: min(92%, 1200px);
  font-size: clamp(22px, 2vw, 44px);
  line-height: 1.45;
  font-weight: 500;
}

/* A restrained Islamic-inspired geometric lattice for text-based slides. */
.tv-slide.slide-countdown,
.tv-slide.slide-lecture {
  isolation: isolate;
  background:
    radial-gradient(
      circle at 50% 45%,
      color-mix(in srgb, var(--accent) 10%, transparent),
      transparent 48%
    ),
    var(--surface);
}
.tv-slide.slide-countdown::before,
.tv-slide.slide-lecture::before {
  content: "";
  position: absolute;
  inset: -40px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.09;
  background-image:
    linear-gradient(
      45deg,
      transparent 47%,
      var(--accent) 48%,
      var(--accent) 52%,
      transparent 53%
    ),
    linear-gradient(
      -45deg,
      transparent 47%,
      var(--accent) 48%,
      var(--accent) 52%,
      transparent 53%
    );
  background-size: clamp(54px, 5vw, 96px) clamp(54px, 5vw, 96px);
  mask-image: radial-gradient(ellipse at center, #000 18%, transparent 78%);
}
.countdown-card,
.lecture-card {
  position: relative;
  z-index: 1;
}

/* Monthly finance slide with a five-week TV-friendly summary. */
.tv-slide.slide-finance {
  padding: clamp(18px, 2vw, 42px);
  background:
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 36%),
    var(--surface);
}
.finance-tv-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: clamp(10px, 1.5vh, 22px);
}
.finance-tv-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2vw;
  padding-bottom: 1.4vh;
  border-bottom: 1px solid var(--line);
}
.finance-tv-heading small,.finance-tv-heading span {display:block;color:var(--muted)}
.finance-tv-heading small {font-size:clamp(12px,1vw,22px);font-weight:700;letter-spacing:.16em}
.finance-tv-heading h2 {font-size:clamp(28px,3vw,64px);line-height:1.05;margin:.5vh 0 0}
.finance-tv-heading>div:last-child {text-align:right;flex:0 0 auto}
.finance-tv-heading>div:last-child strong {display:block;font-size:clamp(18px,1.65vw,36px);color:var(--accent)}
.finance-tv-heading>div:last-child span {font-size:clamp(12px,1vw,22px);margin-top:.35vh}
.finance-tv-totals {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1vw}
.finance-tv-card.flow-income .finance-tv-totals,.finance-tv-card.flow-expense .finance-tv-totals {grid-template-columns:1fr}
.finance-total {padding:clamp(10px,1.2vh,20px) clamp(15px,1.4vw,28px);border:1px solid var(--line);border-radius:.8vw;background:color-mix(in srgb,var(--bg) 30%,transparent)}
.finance-total small,.finance-total strong {display:block}
.finance-total small {font-size:clamp(12px,.95vw,20px);color:var(--muted)}
.finance-total strong {font-size:clamp(25px,2.5vw,54px);line-height:1.1;margin-top:.3vh;font-variant-numeric:tabular-nums}
.finance-total.income strong,.finance-week .income b {color:#5ee0a5}
.finance-total.expense strong,.finance-week .expense b {color:#ff8f8f}
.theme-minimal .finance-total.income strong,.theme-minimal .finance-week .income b,.theme-sand .finance-total.income strong,.theme-sand .finance-week .income b {color:#08734f}
.theme-minimal .finance-total.expense strong,.theme-minimal .finance-week .expense b,.theme-sand .finance-total.expense strong,.theme-sand .finance-week .expense b {color:#a84444}
.theme-sand .finance-tv-card {color:#271704}
.theme-sand .finance-tv-heading {border-bottom-color:rgba(74,43,8,.32)}
.theme-sand .finance-tv-heading h2 {color:#211202;font-weight:800;text-shadow:0 1px 0 rgba(255,255,255,.28)}
.theme-sand .finance-tv-heading small,.theme-sand .finance-tv-heading span {color:#50320d;font-weight:700}
.theme-sand .finance-tv-heading>div:last-child strong {color:#4a2905;font-weight:800}
.theme-sand .finance-total,.theme-sand .finance-week {background:rgba(255,249,231,.66);border-color:rgba(91,55,13,.34);box-shadow:0 5px 16px rgba(76,47,12,.1)}
.theme-sand .finance-total small,.theme-sand .finance-week>div small,.theme-sand .finance-week>span small {color:#5b3a13;font-weight:700}
.theme-sand .finance-week>div strong {color:#2a1804;font-weight:800}
.theme-sand .finance-week>span {border-top-color:rgba(91,55,13,.25)}
.theme-sand .finance-total.income strong,.theme-sand .finance-week .income b {color:#075d3c;font-weight:800}
.theme-sand .finance-total.expense strong,.theme-sand .finance-week .expense b {color:#8f2828;font-weight:800}
.finance-week-list {min-height:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.8vw}
.finance-week {min-width:0;display:flex;flex-direction:column;justify-content:center;gap:1.1vh;padding:clamp(10px,1.2vw,24px);border:1px solid var(--line);border-radius:.8vw;background:color-mix(in srgb,var(--bg) 22%,transparent)}
.finance-week>div strong,.finance-week>div small,.finance-week>span small,.finance-week>span b {display:block}
.finance-week>div strong {font-size:clamp(16px,1.4vw,30px)}
.finance-week>div small,.finance-week>span small {font-size:clamp(10px,.8vw,17px);color:var(--muted)}
.finance-week>span {padding-top:.8vh;border-top:1px solid var(--line)}
.finance-week>span b {font-size:clamp(15px,1.25vw,28px);line-height:1.15;margin-top:.25vh;font-variant-numeric:tabular-nums;white-space:nowrap}
/* Final media sizing rules shared by every TV layout. Keep this block last. */
.tv-layout {
  overflow: hidden;
}
.slide-stage,
.tv-slide.slide-image,
.tv-slide.slide-video {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.tv-slide.slide-image,
.tv-slide.slide-video {
  padding: 0;
}
.slide-image .slide-media,
.slide-video .slide-media {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
}
.slide-image .slide-media {
  object-fit: fill !important;
  object-position: center;
}
.slide-video .slide-media {
  object-fit: contain !important;
  object-position: center;
  background: #000;
}
.slide-stage.showing-media .slide-progress {
  display: none !important;
}
