:root {
  color-scheme: dark;
  --player-viewport-height: 100vh;
  --accent: #1f3d2b;
  --accent-hover: #2e5b3e;
  --accent-light: #98c7a7;
  --sand: #e8d3a3;
  --sand-deep: #c8a96a;
  --player-bg: #101a14;
  --surface: #1b2e22;
  --text: #f6f8fb;
  --secondary: #a9bfb2;
  --muted: #8aa396;
  --border: rgba(255, 255, 255, .18);
  --hairline: rgba(255, 255, 255, .10);
  --glass: rgba(16, 26, 20, .55);
  --control-surface: rgba(16, 26, 20, .86);
  --radius: 10px;
}

@supports (height: 100dvh) {
  :root {
    --player-viewport-height: 100dvh;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: var(--player-bg);
  color: var(--text);
  font-family: "Barlow", system-ui, sans-serif;
}

#webcam-player {
  width: 100%;
  height: var(--player-viewport-height);
  min-width: 0;
  min-height: 0;
  max-height: 100vh;
  overflow: hidden;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
[role="slider"]:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.player-shell {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--surface);
}

.player-header {
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 11px 14px;
  border-radius: 0;
  background: var(--player-bg);
  border-bottom: 1px solid var(--hairline);
}

.station-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.station-name {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 600;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.header-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(27, 46, 34, .94);
  color: var(--secondary);
  white-space: nowrap;
}

.header-chip strong {
  color: var(--text);
  font-weight: 600;
}

.clock-chip {
  min-width: 76px;
  justify-content: center;
  color: var(--text);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.date-chip,
.countdown-chip {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.weather-chip {
  display: none;
  min-width: 88px;
}

.weather-ready .weather-chip {
  display: inline-flex;
}

#weather-class-probe {
  display: none !important;
}

.weather-art {
  width: 30px;
  height: 24px;
  flex: 0 0 30px;
}

.weather-art svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.weather-condition {
  display: none;
}

.weather-art[data-condition="sun"] .weather-sun,
.weather-art[data-condition="cloud"] .weather-cloud,
.weather-art[data-condition="rain"] .weather-rain,
.weather-art[data-condition="snow"] .weather-snow,
.weather-art[data-condition="thunder"] .weather-thunder,
.weather-art[data-condition="fog"] .weather-fog {
  display: block;
}

.weather-stroke {
  fill: none;
  stroke: var(--accent-light);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.weather-sand {
  stroke: var(--sand);
}

.sun-rays {
  transform-box: fill-box;
  transform-origin: center;
  animation: sun-rotate 14s linear infinite;
}

.sun-core {
  transform-box: fill-box;
  transform-origin: center;
  animation: sun-pulse 2.8s ease-in-out infinite;
}

.cloud-drift {
  animation: cloud-drift 3.8s ease-in-out infinite alternate;
}

.rain-drop,
.snow-flake {
  animation: weather-fall 1.4s ease-in infinite;
}

.rain-drop:nth-child(2),
.snow-flake:nth-child(2) {
  animation-delay: .35s;
}

.rain-drop:nth-child(3),
.snow-flake:nth-child(3) {
  animation-delay: .7s;
}

.lightning {
  animation: lightning 2.6s step-end infinite;
}

.fog-line {
  animation: fog-slide 3.6s ease-in-out infinite alternate;
}

.fog-line:nth-child(2) {
  animation-delay: .45s;
}

@keyframes sun-rotate {
  to { transform: rotate(360deg); }
}

@keyframes sun-pulse {
  50% { transform: scale(.88); opacity: .72; }
}

@keyframes cloud-drift {
  to { transform: translateX(3px); }
}

@keyframes weather-fall {
  0% { transform: translateY(-2px); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(5px); opacity: 0; }
}

@keyframes lightning {
  0%, 8%, 18%, 100% { opacity: .3; }
  4%, 13% { opacity: 1; }
}

@keyframes fog-slide {
  to { transform: translateX(4px); }
}

.header-secondary {
  display: none;
}

.media-frame {
  position: relative;
  grid-row: 2;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  overflow: hidden;
  border-radius: 0;
  background: #000;
  isolation: isolate;
}

.camera-image,
.timelapse-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-position: center;
  background: #000;
  border: 0;
  border-radius: 0;
  user-select: none;
  -webkit-user-drag: none;
}

.camera-image {
  opacity: 0;
  object-fit: contain;
}

.camera-image.is-ready {
  opacity: 1;
}

.camera-image.is-cover,
.timelapse-image.is-cover {
  object-fit: cover;
}

.camera-image.is-stale {
  filter: grayscale(.55) brightness(.72);
}

.timelapse-image {
  display: none;
  object-fit: contain;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.mode-timelapse .camera-image,
.mode-timelapse .live-layer {
  display: none;
}

.mode-timelapse .timelapse-image {
  display: block;
}

.mode-timelapse .countdown-chip,
.mode-timelapse #mobile-countdown {
  display: none;
}

.shimmer-line {
  position: absolute;
  z-index: 8;
  top: 0;
  right: 0;
  width: clamp(150px, 34%, 440px);
  height: 3px;
  display: none;
  overflow: hidden;
  border-radius: var(--radius);
}

.shimmer-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-light);
  transform: translateX(-102%);
  animation: shimmer-slide 1.15s ease-in-out infinite;
}

.is-refreshing .shimmer-line {
  display: block;
}

@keyframes shimmer-slide {
  55%, 100% { transform: translateX(102%); }
}

.live-overlay {
  position: absolute;
  z-index: 5;
  top: clamp(10px, 1.8vw, 22px);
  right: clamp(10px, 1.8vw, 22px);
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  text-align: right;
  pointer-events: none;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #fff;
  animation: live-pulse 1.7s ease-in-out infinite;
}

@keyframes live-pulse {
  50% { opacity: .4; transform: scale(.72); }
}

.status-stack {
  position: absolute;
  z-index: 9;
  top: clamp(106px, 18%, 160px);
  right: clamp(10px, 1.8vw, 22px);
  width: min(290px, 48%);
  display: flex;
  justify-content: flex-end;
}

.status-chip {
  display: none;
  max-width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-align: right;
}

.is-refreshing .refresh-status,
.has-frame-error .error-status {
  display: inline-flex;
}

.is-refreshing .error-status {
  display: none;
}

.error-status {
  flex-wrap: wrap;
  border-color: rgba(232, 211, 163, .48);
  background: rgba(79, 64, 36, .88);
  color: var(--sand);
}

.status-retry {
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid rgba(232, 211, 163, .62);
  border-radius: var(--radius);
  background: rgba(16, 26, 20, .72);
  color: #fff;
  cursor: pointer;
}

.spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 2px solid rgba(152, 199, 167, .28);
  border-top-color: var(--accent-light);
  border-radius: var(--radius);
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.control-cluster,
.fullscreen-controls {
  position: absolute;
  z-index: 7;
  bottom: clamp(10px, 1.6vw, 20px);
  display: flex;
  gap: 6px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.side-left {
  left: clamp(10px, 1.6vw, 20px);
}

.side-right {
  right: clamp(10px, 1.6vw, 20px);
}

.control-button {
  min-width: 52px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  background: var(--control-surface);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--text);
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.control-button:hover {
  background: rgba(78, 147, 106, .95);
  border-color: rgba(152, 199, 167, .54);
  color: #fff;
}

.control-button svg,
.mobile-action svg,
.icon-button svg,
.tl-button svg,
.sheet-close svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.control-label {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.mobile-actions {
  grid-row: 3;
  display: none;
}

.info-strip {
  grid-row: 4;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-radius: 0;
  border-top: 1px solid var(--hairline);
  background: var(--surface);
}

.info-cell {
  min-width: 0;
  min-height: 76px;
  padding: 14px 16px;
  border-right: 1px solid var(--hairline);
}

.info-cell:last-child {
  border-right: 0;
}

.info-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.info-value {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.views-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--accent-light);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.views-attribution {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.info-link {
  display: inline-block;
  min-width: 44px;
  min-height: 44px;
  margin: -12px 0;
  padding: 12px 2px;
  border: 0;
  background: transparent;
  color: var(--accent-light);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.fullscreen-ui {
  display: none;
}

.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100%;
  height: var(--player-viewport-height);
  max-height: 100vh;
  border-radius: 0;
  background: #000;
}

.is-fullscreen .player-header,
.is-fullscreen .info-strip,
.is-fullscreen .mobile-actions,
.is-fullscreen .share-sheet,
.is-fullscreen .timelapse-controls,
.is-fullscreen .live-layer,
.is-fullscreen .shimmer-line {
  display: none !important;
}

.is-fullscreen .media-frame {
  height: 100%;
  aspect-ratio: auto;
}

.is-fullscreen .fullscreen-ui {
  display: flex;
  transition: opacity .22s ease;
}

.fullscreen-brand {
  position: absolute;
  z-index: 12;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: calc(14px + env(safe-area-inset-right, 0px));
  display: none;
  align-items: center;
  gap: 12px;
}

.fullscreen-logo {
  width: auto;
  height: 26px;
  display: block;
  object-fit: contain;
}

.fullscreen-exit {
  min-width: 60px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--control-surface);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.fullscreen-controls {
  z-index: 12;
}

.controls-hidden .fullscreen-ui {
  opacity: 0;
  pointer-events: none;
}

.timelapse-preparation {
  position: absolute;
  z-index: 5;
  top: clamp(10px, 1.6vw, 20px);
  right: clamp(10px, 1.6vw, 20px);
  left: auto;
  width: auto;
  max-width: min(300px, calc(50% - 16px));
  min-height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 10px;
  transform: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--control-surface);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.mode-timelapse .timelapse-preparation.is-visible {
  display: flex;
}

.timelapse-preparation.is-unavailable {
  flex-direction: column;
  color: var(--secondary);
}

.legacy-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent-light);
  text-decoration: none;
}

.timelapse-controls {
  grid-row: 5;
  display: none;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--hairline);
  background: var(--player-bg);
}

.mode-timelapse .timelapse-controls {
  display: grid;
  grid-template-columns: auto auto minmax(220px, 1fr) auto auto auto auto;
  align-items: center;
}

.tl-button {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(27, 46, 34, .94);
  color: var(--text);
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.tl-button:hover {
  background: rgba(78, 147, 106, .95);
  border-color: rgba(152, 199, 167, .54);
  transform: translateY(-1px);
}

.tl-button:active {
  transform: scale(.96);
}

.tl-play {
  width: 52px;
  height: 52px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.timeline-zone {
  min-width: 0;
}

.timeline {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  touch-action: none;
  cursor: pointer;
}

.timeline-track,
.timeline-buffered,
.timeline-progress {
  position: absolute;
  left: 0;
  height: 6px;
  border-radius: var(--radius);
}

.timeline-track {
  width: 100%;
  background: rgba(255, 255, 255, .14);
}

.timeline-buffered {
  width: 0;
  background: rgba(152, 199, 167, .32);
}

.timeline-progress {
  width: 0;
  background: var(--accent-light);
  transition: width .08s linear;
}

.timeline-handle {
  position: absolute;
  left: 0;
  width: 18px;
  height: 22px;
  transform: translateX(-50%);
  border: 2px solid var(--player-bg);
  border-radius: var(--radius);
  background: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .42);
  transition: left .08s linear, transform .16s ease;
}

.timeline:hover .timeline-handle {
  transform: translateX(-50%) scale(1.08);
}

.timeline.is-scrubbing .timeline-progress,
.timeline.is-scrubbing .timeline-handle {
  transition: none;
}

.timeline-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: -4px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.frame-counter {
  min-width: 112px;
  color: var(--secondary);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
}

.speed-button {
  min-width: 48px;
  color: var(--accent-light);
  font-weight: 700;
}

.live-link-button {
  color: var(--accent-light);
  font-weight: 600;
}

.share-sheet {
  grid-row: 6;
  display: none;
  border-top: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
  background: var(--player-bg);
}

.share-sheet.is-open {
  display: block;
}

.share-open .mobile-actions,
.share-open .info-strip {
  display: none;
}

.sheet-inner {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sheet-heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.sheet-close,
.icon-button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.share-destinations {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.share-destination {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.share-destination:hover {
  background: var(--accent-hover);
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.copy-row input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--secondary);
}

.copy-button {
  min-width: 82px;
  min-height: 48px;
  padding: 9px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 900px) {
  .date-chip {
    display: none;
  }

  .mode-timelapse .timelapse-controls {
    grid-template-columns: auto auto minmax(180px, 1fr) auto auto;
  }

  .timelapse-controls .tl-fullscreen,
  .timelapse-controls .live-link-button {
    grid-row: 2;
  }

  .timelapse-controls .live-link-button {
    grid-column: 5;
  }
}

@media (max-width: 640px) {
  body {
    padding: 0;
  }

  .player-shell {
    grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
    border-radius: 0;
  }

  .player-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 58px;
    padding: 8px;
  }

  .station-kicker,
  .date-chip,
  .countdown-chip {
    display: none;
  }

  .station-name {
    font-size: 17px;
  }

  .header-meta {
    gap: 6px;
  }

  .header-chip {
    min-height: 42px;
    padding: 6px 8px;
  }

  .clock-chip {
    min-width: 60px;
    font-size: 16px;
  }

  .weather-chip {
    min-width: 70px;
  }

  .weather-art {
    width: 24px;
    flex-basis: 24px;
  }

  .header-secondary {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding-top: 7px;
    border-top: 1px solid var(--hairline);
    color: var(--secondary);
    font-size: 12px;
  }

  .mobile-weather-description {
    display: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .weather-ready .mobile-weather-description {
    display: block;
  }

  .live-overlay {
    top: 8px;
    right: 8px;
    width: auto;
    gap: 4px;
  }

  .live-badge {
    min-height: 26px;
    padding: 4px 7px;
    font-size: 10px;
  }

  .status-stack {
    top: 50px;
    right: 8px;
    width: 56%;
  }

  .sponsor-right .status-stack {
    right: 18%;
  }

  .status-chip {
    min-height: 34px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .control-cluster {
    display: none;
  }

  .mobile-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border-top: 1px solid var(--hairline);
    background: var(--player-bg);
  }

  .mobile-action {
    min-width: 0;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
  }

  .info-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-cell {
    min-height: 56px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--hairline);
  }

  .info-cell:nth-child(even) {
    border-right: 0;
  }

  .info-cell:nth-child(n + 5) {
    border-bottom: 0;
  }

  .info-cell:last-child {
    grid-column: 1 / -1;
  }

  .info-value {
    font-size: 13px;
  }

  .timelapse-preparation {
    width: auto;
    max-width: calc(50% - 12px);
    min-height: 44px;
    padding: 8px;
    font-size: 12px;
  }

  .mode-timelapse .timelapse-controls {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px;
  }

  .timeline-zone {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .timeline-track,
  .timeline-buffered,
  .timeline-progress {
    height: 10px;
  }

  .timeline-handle {
    width: 20px;
    height: 24px;
  }

  .frame-counter {
    min-width: 0;
    font-size: 11px;
  }

  .timelapse-controls .tl-fullscreen {
    grid-column: 1;
    grid-row: 3;
  }

  .timelapse-controls .live-link-button {
    grid-column: 4;
    grid-row: 3;
  }

  .share-destinations {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  body {
    padding: 0;
  }

  .player-header,
  .info-strip,
  .mobile-actions {
    display: none;
  }

  .player-shell:not(.mode-timelapse) .media-frame {
    height: 100%;
    aspect-ratio: auto;
  }

  .control-label {
    display: none;
  }

  .control-button {
    min-width: 48px;
    padding: 8px;
  }
}

@media (orientation: portrait) and (max-width: 640px) and (max-height: 520px) {
  .info-cell:nth-child(-n + 2) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
