.clock-preview-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.clock-preview-options {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line, var(--list-row-border));
  border-radius: 9px;
  background: var(--control, var(--list-row-bg));
}

.clock-preview-options button {
  border: 0;
  border-radius: 6px;
  padding: 7px 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.clock-preview-options button[aria-pressed="true"] {
  background: var(--selected, var(--site-action-bg));
  color: var(--ink);
}

.clock-preview-options button:focus-visible {
  outline: 2px solid var(--accent, var(--bar-focus-outline));
  outline-offset: 2px;
}

.clock-preview-images [hidden] {
  display: none !important;
}

.clock-story-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  gap: 8px;
}

.clock-story-preview .clock-preview-controls {
  justify-content: center;
  margin: 0;
}

/* Keep the source aspect ratio so the controls follow the rendered capture
   when a shorter viewport scales the native panel. */
.detail-surface[data-clock-preview] {
  width: min(var(--detail-width), calc(100vw - 8px), calc((100svh - var(--detail-bottom) - var(--demo-navigation-height, 0px) - 12px) * 912 / 1164));
  height: auto;
  aspect-ratio: 912 / 1164;
}

.clock-native-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.clock-native-controls button {
  position: absolute;
  appearance: none;
  border: 0;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.clock-native-controls button:focus-visible {
  outline: 2px solid var(--bar-focus-outline);
  outline-offset: -2px;
}

/* Measured in the 912 x 1164 native crops: capsule (34,44) 324 x 48,
   Weather button (752,34) 56 x 64. Paint only a keyboard focus ring. */
.clock-native-day,
.clock-native-month {
  top: 3.780069%;
  width: 17.763158%;
  height: 4.123711%;
}

.clock-native-day { left: 3.72807%; }
.clock-native-month { left: 21.491228%; }
.clock-native-weather {
  left: 82.45614%;
  top: 2.920962%;
  width: 6.140351%;
  height: 5.498282%;
}
