.camera-feed {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 5px;
  background: #0b0c0e;
}
.camera-feed[hidden] { display: none; }
.feeds.is-focused .camera-feed:not([hidden]) { grid-area: 1 / 1 / -1 / -1; }
.feed-toggle {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
}
.feed-toggle:focus-visible { outline-offset: -2px; }
.feed-toggle > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.feed-toggle[aria-expanded="true"] > img { object-fit: contain; }
.capture-controls {
  display: flex;
  align-items: center;
  gap: clamp(2px, .25cqw, 4px);
}
.camera-feed > .capture-controls {
  position: absolute;
  bottom: clamp(2px, .45cqw, 7px);
  right: clamp(2px, .55cqw, 8px);
}
.capture-controls button {
  display: grid;
  place-items: center;
  width: clamp(22px, 2.7cqw, 40px);
  aspect-ratio: 1;
  position: relative;
  isolation: isolate;
  padding: 0;
  border-radius: 50%;
}
.capture-controls button::before {
  content: "";
  position: absolute;
  inset: 16%;
  z-index: -1;
  border-radius: inherit;
  background: #081117a6;
}
.capture-controls button:is(:hover,:focus-visible)::before { background: #061015db; }
.capture-controls button:focus-visible { outline-offset: -1px; }
.capture-controls button[aria-pressed="true"] { color: #ff7169; }
.capture-controls button[aria-pressed="true"]::before { background: #210c0de8; }
.capture-controls button:disabled { opacity: .5; cursor: default; }
.capture-controls .capture-icon, .capture-controls svg { display: block; width: 54%; height: 54%; pointer-events: none; }
.capture-status {
  position: absolute;
  right: 2%;
  bottom: 4.8%;
  max-width: 30%;
  font: 500 clamp(8px, 1cqw, 14px)/1.25 ui-monospace, monospace;
  text-align: right;
  color: #d7dedb;
  pointer-events: none;
}
@container (max-width: 750px) {
  .capture-controls button { width: clamp(18px, 3.8cqw, 26px); }
  .camera-feed .capture-controls button { min-width: 24px; }
  .feeds.is-focused .capture-controls button { width: clamp(24px, 5.4cqw, 32px); }
}
@container (max-width: 480px) {
  /* The top of each tile is always available to open the feed. Its image
     continues the same click target behind the bottom capture controls. */
  .feeds:not(.is-focused) .feed-toggle { height: calc(100% - 26px); }
  .feeds:not(.is-focused) .feed-toggle > img { position: absolute; inset: 0; }
  .camera-feed:has(.feed-toggle:focus-visible) { outline: 2px solid #a8eaf0; outline-offset: -2px; }
}
