*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root { --font-scale: 1.5; }

.tile-clock { --font-scale: 1; }

body {
  overflow: hidden;
  background: #111;
  font-family: 'Segoe UI', sans-serif;
  color: #fff;
}

.tile {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  position: relative;
}

.tile h2 {
  font-size: calc(clamp(1rem, 2vw, 1.6rem) * var(--font-scale));
  margin-bottom: 0.5rem;
  align-self: flex-start;
}

/* Logo */
.tile-logo img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  transition: opacity 0.4s ease;
}

/* Clock */
.tile-clock          { text-align: center; }
.tile-clock .time    { font-size: calc(clamp(2rem, 6vw, 5rem) * var(--font-scale)); font-weight: 700; }
.tile-clock .date    { font-size: calc(clamp(0.9rem, 1.8vw, 1.4rem) * var(--font-scale)); }

/* Welcome */
.tile-welcome        { text-align: center; padding: 2rem; }
.tile-welcome h1     { font-size: calc(clamp(1.4rem, 3vw, 2.8rem) * var(--font-scale)); margin-bottom: 1rem; }
.tile-welcome p      { font-size: calc(clamp(0.9rem, 1.5vw, 1.2rem) * var(--font-scale)); margin-bottom: 0.75rem; }
.tile-welcome small  { font-size: calc(clamp(0.75rem, 1.2vw, 1rem) * var(--font-scale)); opacity: 0.8; }

/* News */
.tile-news           { justify-content: flex-start; align-items: flex-start; }
.tile-news ul        { list-style: disc; padding-left: 1.5rem; font-size: calc(clamp(0.85rem, 1.5vw, 1.1rem) * var(--font-scale)); line-height: 1.8; width: 100%; }

/* Calendar */
.tile-calendar       { justify-content: flex-start; align-items: flex-start; }
.tile-calendar table { width: 100%; font-size: calc(clamp(0.85rem, 1.5vw, 1.1rem) * var(--font-scale)); border-collapse: collapse; }
.tile-calendar tr    { border-bottom: 1px solid rgba(255,255,255,0.1); }
.tile-calendar td    { padding: 0.3rem 0; }
.tile-calendar td:last-child { text-align: right; }

/* Sponsors */
.tile-sponsors         { justify-content: flex-start; overflow: hidden; padding: 0.5rem; }
#sponsor-list          { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; align-items: center; width: 100%; min-height: 0; overflow: hidden; }
.tile-sponsors img     { width: 90%; flex: 1; min-height: 0; max-height: 100%; object-fit: contain; }
.tile-sponsors span    { display: block; text-align: center; font-size: calc(clamp(0.75rem, 1.2vw, 1rem) * var(--font-scale)); flex: 1; }

@keyframes sponsorExit {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-100%); }
}
@keyframes sponsorEnter {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}
.sponsor-exit  { animation: sponsorExit  0.8s cubic-bezier(0.4, 0, 1, 1)   forwards; }
.sponsor-enter { animation: sponsorEnter 0.8s cubic-bezier(0, 0, 0.2, 1)   forwards; }
.news-exit     { animation: sponsorExit  0.8s cubic-bezier(0.4, 0, 1, 1)   forwards; }
.news-enter    { animation: sponsorEnter 0.8s cubic-bezier(0, 0, 0.2, 1)   forwards; }

/* Slideshow & YouTube */
.tile-slideshow,
.tile-youtube        { padding: 0; }
.tile-youtube iframe { display: block; }

/* Weather */
.tile-weather   { padding: 0; }
#weather-radar  { width: 100%; height: 100%; border: 0; pointer-events: none; }

/* Last-updated timestamp shown in news and calendar tiles */
.last-updated {
  position: absolute;
  bottom: 6px;
  right: 10px;
  font-size: 0.7rem;
  opacity: 0.6;
}
