/* Secondary components: OSD replica details, Game Bar, unboxing motion,
   connection notes, ledger rows. Split from lab.css to keep files focused. */

.osd-status { position: absolute; right: 3%; top: 5%; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 34%; font: 600 clamp(8px, 1.15cqi, 12px) var(--mono); z-index: 2; }
.osd-status span { padding: 0.35em 0.6em; border-radius: 6px; background: rgba(0, 0, 0, 0.65); color: #d9dbe4; border: 1px solid rgba(255, 255, 255, 0.08); }
.osd-status span.hot { color: var(--cyan); border-color: rgba(62, 242, 255, 0.5); box-shadow: 0 0 10px rgba(62, 242, 255, 0.3); }
.osd-status span.off { color: var(--amber); }
.osd-opt.is-focus { outline: 1px solid rgba(62, 242, 255, 0.6); }
.osd-range-hint { font: 0.8em var(--mono); color: #7d8298; margin: 0.6em 0 0; }
.osd-screen:focus-visible { outline: 2px solid var(--cyan); outline-offset: 6px; }
.osd-screen::after { /* CoreSync spill on the "wall" */
  content: ''; position: absolute; inset: -30%; z-index: -1; pointer-events: none; opacity: calc(var(--core-light, 1) * 0.5);
  background: radial-gradient(closest-side, rgba(255, 62, 165, 0.25), transparent); filter: blur(30px);
}
.osd-preview { width: 100%; height: 100%; object-fit: cover; }
.aim-dot { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 2px solid #ff3b4e; border-radius: 50%; box-shadow: 0 0 8px #ff3b4e; pointer-events: none; }
.aim-dot::after { content: ''; position: absolute; left: 50%; top: 50%; width: 2px; height: 2px; margin: -1px; background: #ff3b4e; }
.gamebar { position: absolute; left: 50%; bottom: 5%; transform: translateX(-50%); width: min(92%, 640px); padding: 0.8em; border-radius: 14px; background: rgba(12, 14, 22, 0.92); border: 1px solid rgba(255, 255, 255, 0.1); font-size: clamp(9px, 1.3cqi, 13px); z-index: 3; animation: noteIn .3s ease-out; }
.gb-status { display: flex; justify-content: space-around; gap: 0.6em; padding-bottom: 0.6em; margin-bottom: 0.6em; border-bottom: 1px solid rgba(255, 255, 255, 0.08); color: #9aa0b8; font-family: var(--mono); }
.gb-status b { color: #fff; margin-right: 0.3em; }
.gb-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5em; }
.gb-tile { padding: 0.6em; border-radius: 10px; background: rgba(255, 255, 255, 0.05); display: grid; gap: 0.2em; text-align: center; }
.gb-tile small { color: #8b90a5; font-size: 0.8em; }
.gb-tile b { color: var(--cyan); font-weight: 600; }
@media (max-width: 640px) { .gb-tiles { grid-template-columns: repeat(3, 1fr); } .osd-status { max-width: 60%; top: auto; bottom: 2%; } }

/* unboxing motion */
.ub-item { transition: transform 0.9s cubic-bezier(.2, .8, .2, 1), opacity 0.6s; transform-box: fill-box; }
.ub-item.is-focus { filter: drop-shadow(0 0 10px rgba(62, 242, 255, 0.8)); }
.ub-lid { transition: transform 1s cubic-bezier(.6, 0, .2, 1), opacity 0.8s 0.2s; transform-origin: 260px 20px; }
.ub-beam { animation: beam 5s ease-in-out infinite alternate; }
@keyframes beam { to { opacity: 0.4; } }

/* connection guide */
.conn-notes { margin: 12px 0 0; padding-left: 1.1em; font-size: 14px; color: var(--ink-2); }
.conn-notes li { margin-bottom: 6px; }
.port-note { margin: 12px 0 0; font-size: 14px; color: var(--ink); min-height: 2.8em; }
.port-hit:focus-visible { outline: none; }
.port-hit:focus-visible rect.body { stroke: #fff; }

/* tables */
.spec-table small.path { display: block; margin-top: 3px; font: 11px var(--mono); color: var(--ink-3); }
.ledger tr.grp td { padding-top: 22px; font: 600 11px var(--mono); color: var(--magenta); letter-spacing: .14em; text-transform: uppercase; border-bottom-color: var(--line-2); }
.ledger .refs { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 8px; }
.ledger .refs a { font: 10px var(--mono); color: var(--ink-3); text-decoration: none; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.ledger .refs a:hover { color: var(--cyan); border-color: var(--cyan); }
.sources li:target { color: var(--ink); }
.sources li:target a { text-shadow: var(--glow-cyan); }

/* specimen on phones: leave room to scroll past */
@media (max-width: 600px) { .specimen-canvas { height: 56vh; min-height: 320px; } }

/* hero arc gentle float */
.hero-arc svg { animation: float 7s ease-in-out infinite alternate; }
@keyframes float { to { transform: translateY(-6px); } }

.osd-aside { display: grid; gap: 0; }

/* ======================================================================
   Graceful fallbacks: still specimen + resting experiments
   ====================================================================== */
.specimen-loading.is-done { opacity: 0; pointer-events: none; }

.still-stage { position: relative; margin: 0; background: radial-gradient(ellipse at 50% 70%, rgba(62, 242, 255, 0.07), transparent 65%), #040509; }
.still-frame { position: relative; width: min(100%, calc(78vh * 1.6)); aspect-ratio: 16 / 10; margin: 0 auto; overflow: hidden; }
.still-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.still-img.is-on { opacity: 1; }
.still-img:not([src]) { visibility: hidden; }
.still-frame::after { /* soft vignette + faint scanlines so the still sits in the lab */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(3, 4, 9, 0.75) 100%), repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 3px);
}
.still-stage.is-empty .still-frame { background: radial-gradient(ellipse 45% 18% at 50% 42%, rgba(61, 107, 255, 0.35), transparent 70%), radial-gradient(ellipse 60% 6% at 50% 80%, rgba(62, 242, 255, 0.12), transparent 70%); }
.still-tags { position: absolute; inset: 0; z-index: 2; }
.still-tag { position: absolute; transform: none; }
.still-chip {
  display: inline-flex; align-items: center; gap: 8px; font: 500 11px var(--mono); color: var(--ink-3); letter-spacing: .03em;
  padding: 5px 10px 5px 8px; border-radius: 999px; background: rgba(3, 4, 9, 0.72); border: 1px solid var(--line); backdrop-filter: blur(6px);
}
.still-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); opacity: .7; animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .25; box-shadow: 0 0 2px var(--cyan); } }
.still-stage > .still-chip { position: absolute; left: 14px; bottom: 12px; z-index: 3; }
.still-note { margin: 0; font-size: 13.5px; color: var(--ink-2); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); }
@media (max-width: 600px) { .still-stage > .still-chip { position: static; margin: 10px 12px; } .still-frame { width: 100%; } }

.rest-state { margin: 0; }
.rest-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: radial-gradient(ellipse at 50% 60%, rgba(61, 107, 255, 0.12), transparent 70%), #030409; }
.lab#exp-burnin .rest-frame { aspect-ratio: 696 / 144; }
.lab#exp-motion .rest-frame { aspect-ratio: 720 / 300; }
.lab#exp-response .rest-frame { aspect-ratio: 720 / 220; }
.rest-frame img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; filter: saturate(0.9) brightness(0.92); animation: restGlow 6s ease-in-out infinite alternate; }
.lab#exp-burnin .rest-frame img { image-rendering: pixelated; }
@keyframes restGlow { to { filter: saturate(1) brightness(1); } }
.rest-frame::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, transparent 60%, rgba(3, 4, 9, 0.6) 100%); }
.rest-state figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.rest-line { font-size: 13.5px; color: var(--ink-2); }
.lab-controls.is-inert > :not(.rest-note) { opacity: .45; filter: saturate(.4); }
.rest-note { margin: 0; font: 12px var(--mono); color: var(--ink-3); }

.part-card { z-index: 5; }
