/* Renders gallery (1 November 2026, R6 / R10): css for js/ux/renders.js. Self-contained: every rule is under .rn-* so nothing else is touched.
   Colours come from the main base's tokens where they exist (--lg-fg), with plain fallbacks; the controls over a picture are always dark flat glass
   with a white glyph (a light card must not turn them unreadable). No backdrop-filter, no shadow stack, no overshoot. js/ux/press.js animates `scale`
   on every button, so nothing here uses the `scale` property. The picture, the shader canvas and the cross-fade layer are js/ux/bloom.js. */
.rn-root {
  position: absolute; inset: 0; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px;
  padding: var(--rn-pad, 0); color: var(--lg-fg, #f5f5f7); font-family: var(--sans, system-ui, sans-serif);
  -webkit-tap-highlight-color: transparent; min-width: 0; min-height: 0;
}
.rn-stage {
  position: relative; flex: 1 1 auto; min-height: 0; min-width: 0; border-radius: var(--rn-r, 12px); overflow: hidden; isolation: isolate;
  background: #17171c; touch-action: pan-y; user-select: none; -webkit-user-select: none; outline: none; cursor: default;
}
.rn-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--lg-fg, #f5f5f7); }
.rn-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 48%; pointer-events: none; background: linear-gradient(to top, rgba(8, 8, 12, .66), rgba(8, 8, 12, 0)); }
.rn-tag.sample, .rn-root .rn-tag {
  position: absolute; z-index: 2; top: 12px; left: 12px; margin: 0; padding: .2rem .55rem; border: 0; border-radius: 99px; background: rgba(18, 18, 22, .5); color: #fff;
  font: 600 max(.62rem, 11px)/1.3 var(--sans, system-ui, sans-serif); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; pointer-events: none;
}
.rn-nav, .rn-expand {
  position: absolute; z-index: 3; width: 44px; height: 44px; padding: 0; margin: 0; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%;
  background: rgba(18, 18, 22, .48); color: #fff; display: grid; place-items: center; cursor: pointer; -webkit-appearance: none; appearance: none; font: inherit;
  transition: background-color 160ms cubic-bezier(.4, 0, .6, 1);
}
.rn-nav { top: calc(50% - 22px); }
.rn-prev { left: 12px; }
.rn-next { right: 12px; }
.rn-expand { top: 12px; right: 12px; }
.rn-nav svg, .rn-expand svg { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
@media (hover: hover) { .rn-nav:hover, .rn-expand:hover { background: rgba(18, 18, 22, .64); } }
.rn-nav:focus-visible, .rn-expand:focus-visible, .rn-th:focus-visible { outline: 2px solid var(--lg-fg, #f5f5f7); outline-offset: 2px; }
.rn-cap { position: absolute; z-index: 2; left: 16px; right: 92px; bottom: 14px; display: grid; gap: 3px; color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .5); pointer-events: none; }
.rn-title { font: 600 clamp(16px, 1.25rem, 20px)/1.2 var(--sans, system-ui, sans-serif); }
.rn-text { font: 500 clamp(12px, .85rem, 14px)/1.35 var(--sans, system-ui, sans-serif); opacity: .86; max-width: 46ch; }
.rn-count {
  position: absolute; z-index: 2; right: 16px; bottom: 16px; padding: .22rem .6rem; border-radius: 99px; background: rgba(18, 18, 22, .5); color: #fff;
  font: 600 12px/1.3 var(--sans, system-ui, sans-serif); font-variant-numeric: tabular-nums; pointer-events: none;
}
.rn-rail {
  flex: none; display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 3px 3px 5px; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.rn-rail::-webkit-scrollbar { display: none; }
.rn-rail.rn-ov { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); }
.rn-th {
  flex: none; width: 72px; height: 48px; padding: 0; margin: 0; border: 0; border-radius: 8px; overflow: hidden; background: #26262c; cursor: pointer; opacity: .6;
  outline: 2px solid transparent; outline-offset: 2px; -webkit-appearance: none; appearance: none; position: relative;
  transition: opacity 180ms cubic-bezier(.4, 0, .6, 1), outline-color 180ms cubic-bezier(.4, 0, .6, 1);
}
.rn-th img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.rn-th[aria-current="true"] { opacity: 1; outline-color: var(--lg-fg, #f5f5f7); }
@media (hover: hover) { .rn-th:hover { opacity: .9; } }
.rn-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rn-empty { margin: auto; font: 500 14px/1.4 var(--sans, system-ui, sans-serif); opacity: .7; }
.rn-one .rn-nav, .rn-one .rn-rail, .rn-one .rn-count { display: none; }
.rn-demo { position: fixed; inset: 0; z-index: 99999; background: #0c0c10; --rn-pad: 16px; }
body.rn-demo-bare > *:not(.rn-demo):not(script):not(style) { display: none !important; }
/* the 4 sizes: a narrow portrait card keeps the caption short and the thumbs the same */
@media (max-width: 640px) { .rn-text { display: none; } .rn-cap { right: 80px; } }
/* the TV (html.tv, ?tv=1): read from the sofa */
html.tv .rn-nav, html.tv .rn-expand { width: 64px; height: 64px; }
html.tv .rn-nav { top: calc(50% - 32px); }
html.tv .rn-nav svg, html.tv .rn-expand svg { width: 28px; height: 28px; }
html.tv .rn-prev { left: 18px; } html.tv .rn-next { right: 18px; } html.tv .rn-expand { top: 18px; right: 18px; }
html.tv .rn-th { width: 112px; height: 74px; border-radius: 10px; }
html.tv .rn-title { font-size: clamp(24px, 1.9rem, 30px); }
html.tv .rn-text { font-size: clamp(18px, 1.3rem, 22px); max-width: 52ch; }
html.tv .rn-count { font-size: 18px; padding: .3rem .85rem; right: 22px; bottom: 22px; }
html.tv .rn-cap { left: 24px; right: 130px; bottom: 20px; }
html.tv .rn-tag.sample, html.tv .rn-root .rn-tag { font-size: 16px; top: 18px; left: 18px; }
@media (prefers-reduced-motion: reduce) { .rn-nav, .rn-expand, .rn-th { transition: none; } }

/* ---------- final fix 1 ---------- */
/* the app's `.u-plan img` (inset 1.4rem, object-fit contain) must not reach the gallery's own pictures: the base, the CSS-tier layer and the thumbnails fill their boxes and crop to cover */
.rn-root .bloom-base, .rn-root .bloom-next { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; max-width: none; max-height: none; }
.rn-root .rn-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; max-height: none; }
.rn-stage { background: #202026; }
/* the expand control: a quiet 44px glass circle, top right (the Sample tag is top left) */
.rn-expand { top: 12px; right: 12px; }
/* full screen: a graphite sheet over the app, the same gallery inside it */
.rn-fs { position: fixed; inset: 0; z-index: 100000; background: #121216; color: #f5f5f7; }
.rn-fs-host { position: absolute; inset: 0; --rn-pad: 76px 20px 16px; --rn-r: 18px; }
.rn-fs-back, .rn-fs-x {
  position: absolute; z-index: 5; top: 16px; height: 44px; min-width: 44px; margin: 0; padding: 0; border: 1px solid rgba(255, 255, 255, .16); border-radius: 22px;
  background: rgba(40, 40, 46, .72); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; -webkit-appearance: none; appearance: none;
  font: 500 15px/1 var(--sans, system-ui, sans-serif); transition: background-color 160ms cubic-bezier(.4, 0, .6, 1);
}
.rn-fs-back { left: 20px; padding: 0 16px 0 10px; }
.rn-fs-x { right: 20px; width: 44px; }
.rn-fs-back svg, .rn-fs-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.rn-fs-back:focus-visible, .rn-fs-x:focus-visible { outline: 2px solid #f5f5f7; outline-offset: 2px; }
@media (hover: hover) { .rn-fs-back:hover, .rn-fs-x:hover { background: rgba(60, 60, 68, .85); } }
.rn-fs .rn-expand { display: none; }
html.tv .rn-fs-host { --rn-pad: 110px 36px 28px; --rn-r: 24px; }
html.tv .rn-fs-back, html.tv .rn-fs-x { height: 64px; min-width: 64px; top: 28px; border-radius: 32px; font-size: 22px; }
html.tv .rn-fs-back { left: 36px; } html.tv .rn-fs-x { right: 36px; width: 64px; }
html.tv .rn-fs-back svg, html.tv .rn-fs-x svg { width: 28px; height: 28px; }
@media (prefers-reduced-motion: reduce) { .rn-fs-back, .rn-fs-x { transition: none; } }
