/* Option popovers (js/option-pop.js): a small card that says what an option on the Brand page will cause.
   One element (#optPop) for the whole page. Floating card: positioned by the script (fixed, below or above the option's row, inside the main
   column, never over the sidebar); it never takes pointer events. Under 600 px it is a bottom sheet (.opt-pop--sheet) with a Close button.
   Always fully opaque: no opacity animation, a solid surface colour. */
.opt-pop {
  position: fixed; z-index: 10000; left: 0; top: 0; opacity: 1;
  width: 320px; max-width: calc(100vw - 16px); box-sizing: border-box; padding: 12px 14px; display: grid; gap: 8px; overflow: hidden;
  background-color: var(--tile, var(--dk-paper, #fff)); color: var(--ink, var(--dk-ink, #1f1f21)); border: 1px solid var(--line-2, var(--dk-l-000000a16, rgba(0, 0, 0, .16))); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .10);
  font: 400 13px/1.45 var(--sans, system-ui, sans-serif); text-align: left; pointer-events: none;
}
.opt-pop[hidden] { display: none; }
/* Phone: a bottom sheet, full width, closed by its button, a tap outside or Escape. */
.opt-pop--sheet {
  left: 0 !important; right: 0; top: auto !important; bottom: 0; width: 100%; max-width: none !important; max-height: min(70vh, 560px) !important; overflow-y: auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); border-width: 1px 0 0; border-radius: 16px 16px 0 0; pointer-events: auto;
  font-size: 14px; box-shadow: 0 -8px 28px rgba(0, 0, 0, .16);
}
.opt-pop--sheet .op-text { padding-right: 36px; }
.opt-pop .op-close {
  position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted, var(--dk-t-6b6b70, #6b6b70)); cursor: pointer; z-index: 2;
}
.opt-pop .op-close:hover, .opt-pop .op-close:focus-visible { background: rgba(0, 0, 0, .06); color: var(--ink, var(--dk-ink, #1f1f21)); }
/* room under the page while the sheet is open, so the tapped option can scroll up above it */
html.opt-sheet-open body { padding-bottom: var(--opt-sheet-h, 0px); }
.opt-pop .op-text { display: block; }
.opt-pop .op-frame { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: var(--soft, var(--dk-b-f2f2f0, #f2f2f0)); }
.opt-pop .op-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* numbered callouts drawn over the picture: x / y are % of the frame */
.opt-pop .op-pin {
  position: absolute; transform: translate(-50%, -50%); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font: 600 11px/1 var(--sans, system-ui, sans-serif); color: #fff; background: #111; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, .35);
}
.opt-pop .op-callouts { display: grid; gap: 3px; }
.opt-pop .op-callout { display: flex; gap: 6px; align-items: baseline; color: var(--ink, var(--dk-ink, #1f1f21)); }
.opt-pop .op-num {
  flex: none; width: 15px; height: 15px; border-radius: 50%; display: inline-grid; place-items: center; transform: translateY(2px);
  font: 600 10px/1 var(--sans, system-ui, sans-serif); color: #fff; background: #111;
}
.opt-pop .op-more { display: grid; gap: 2px; color: var(--muted, var(--dk-t-6b6b70, #6b6b70)); }
.opt-pop .op-best b { font-weight: 600; color: var(--ink, var(--dk-ink, #1f1f21)); }
.opt-pop .op-motion { font-style: italic; }
@media (prefers-reduced-motion: no-preference) {
  .opt-pop:not([hidden]):not(.opt-pop--sheet) { animation: opt-pop-in .12s ease-out; }
  .opt-pop--sheet:not([hidden]) { animation: opt-sheet-in .18s ease-out; }
}
/* movement only: the card is never see-through, not even for a frame */
@keyframes opt-pop-in { from { transform: translateY(2px); } to { transform: none; } }
@keyframes opt-sheet-in { from { transform: translateY(24px); } to { transform: none; } }
