/* Návrh 51 (Peter 8. 11.: „Návrh 51 OK“): 3D scéna záberu v štyroch krokoch — Z čoho · AI stavia · Porovnaj · Prvý obraz.
   Port of the approved prototype v2 (artifact Fr6WLUhvw2QXYMPREujcVn, scena3d.html): its rules with the class names
   prefixed n51 (the prototype's .tile, .foot, .bar, .pic, .steps, .note collide with the portal's own) and its colours
   the portal's variables. The step's one main button lives in the panel's foot, always in view at 1280 × 720. */

/* the stage: the prototype's .app box with its head of steps */
/* the box is as tall as its step and the stage scrolls when it is taller (aku-test 8. 11.: a `place-items` reset after
   `align-items` stretched the box to the stage and its overflow: hidden cut off Prekryť obrazom at 1280 × 720) */
.cmain > .viewer.n51v { position: relative; flex: 1 1 auto; min-height: 0; aspect-ratio: auto; max-height: none; display: flex;
  align-items: safe center; justify-content: center; overflow: auto; padding: 14px; background: var(--bg); }
.n51app { width: 100%; max-width: 780px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.n51top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.n51top .n51shot { font-weight: 700; }
.n51top .n51shot span { color: var(--muted); font-weight: 400; }
.n51steps { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 0 auto; padding: 0; list-style: none; }
.n51st { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line2);
  color: var(--muted); font-size: 12.5px; background: none; }
.n51st i { font-style: normal; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px;
  background: var(--raised); color: var(--text2); }
.n51st.on { border-color: var(--accent); color: var(--text); }
.n51st.on i { background: var(--accent); color: var(--accent-ink); }
.n51st.done { color: var(--text2); }
.n51st.done i { background: var(--ok); color: var(--accent-ink); }
.n51screen { padding: 18px 20px 20px; display: grid; gap: 16px; }
.n51eyebrow { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.n51h { font-size: 19px; margin: 2px 0 0; text-wrap: balance; }
.n51sub { color: var(--muted); margin: 2px 0 0; max-width: 70ch; font-size: 13.5px; }

/* step 1: the tiles are a choice (a radio each); nothing starts before the main button */
.n51grp { display: grid; gap: 8px; }
.n51grp > .n51gl { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.n51tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.n51tile { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line2); border-radius: 10px;
  cursor: pointer; background: var(--bg); min-width: 0; }
.n51tile input { accent-color: var(--accent); margin-top: 3px; flex: none; }
.n51tile > span { min-width: 0; flex: 1; }
.n51tile b { display: block; }
.n51tile small { color: var(--muted); display: block; font-size: 12px; margin-top: 2px; }
.n51tile:has(input:checked) { border-color: var(--accent); background: rgba(245, 170, 40, .12); }
.n51tile:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.n51tile .n51rec { font-size: 11px; color: var(--accent); font-weight: 700; display: block; margin-top: 4px; }
.n51tile .n51th { width: 64px; height: 36px; object-fit: cover; border-radius: 4px; flex: none; border: 1px solid var(--line2); }
.n51tile > svg { width: 26px; height: 26px; flex: none; color: var(--text2); margin-top: 1px; }
.n51tw { position: relative; display: block; min-width: 0; }
.n51tw > .n51tile { height: 100%; }
.n51tw > .tip { position: absolute; top: 4px; right: 4px; z-index: 2; }
.n51tw > .tip > summary { width: 15px; height: 15px; font-size: 9.5px; opacity: .75; }
.n51tile.off { cursor: default; opacity: .62; }
.n51tile.off small.why { color: var(--warn, var(--muted)); }
.n51up { display: grid; gap: 8px; }
.n51up[hidden] { display: none; }
.n51up img { max-width: 100%; max-height: 120px; border-radius: 6px; border: 1px solid var(--line2); }

/* the panel's foot: the one main button with its price (rule 2), a link, a note */
.n51foot { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; }
.n51foot .btn.primary.big { flex: 1 1 100%; justify-content: center; }
.n51note { color: var(--muted); font-size: 12.5px; }
.n51steplist { margin: 0; padding: 0 0 0 18px; display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.n51steplist li.on { color: var(--text); }
.n51steplist li.on b { color: var(--accent); }
.n51steplist li.done { color: var(--text2); }

/* step 2: only the progress — elapsed time against the usual, never percentages (one call that reports nothing) */
.n51prog { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 760px) { .n51prog { grid-template-columns: minmax(0, 1fr); } }
.n51prog.nopic { grid-template-columns: minmax(0, 1fr); }
.n51prog .n51pane { gap: 12px; }
.n51work { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.n51spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--accent);
  animation: n51spin .9s linear infinite; flex: none; }
@keyframes n51spin { to { transform: rotate(360deg); } }
.n51bar { height: 14px; border-radius: 7px; background: var(--raised); overflow: hidden; }
.n51bar > span { display: block; height: 100%; width: 0; transition: width .4s;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 10px, #d4901c 10px 20px); background-size: 28px 28px;
  animation: n51stripes .8s linear infinite; }
@keyframes n51stripes { to { background-position: 28px 0; } }
.n51bar.end > span { animation: none; }
.n51time { font-variant-numeric: tabular-nums; color: var(--text2); }
.n51prog.bad .n51spin, .n51prog.bad .n51bar > span { animation: none; }
.n51prog.bad .n51work b { color: var(--bad); }
@media (prefers-reduced-motion: reduce) { .n51bar > span, .n51spin { animation: none; } }

/* steps 3 and 4: the picture and the 3D side by side, the overlay slider */
.n51pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .n51pair { grid-template-columns: minmax(0, 1fr); } }
.n51pane { display: grid; gap: 6px; min-width: 0; align-content: start; }
.n51pane .n51cap { font-size: 12px; color: var(--muted); }
.n51pane .n51cap b { color: var(--text); }
.n51pic { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 8px; overflow: hidden; border: 1px solid var(--line2);
  background: #0c0e0f; }
.n51pic > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.n51pic > .n51ov { position: absolute; inset: 0; opacity: 0; transition: opacity .2s; pointer-events: none; }
.n51slider { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text2); }
/* step 3: Prekryť obrazom in the row above the 3D picture (coordinator 8. 11.: in view at 1280 × 720 without scrolling,
   a row under the pictures did not fit); both captions one height, so the two pictures start on one line */
.n51caprow { display: flex; align-items: center; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; min-height: 22px; }
.n51caprow .n51cap { min-width: 0; }
.n51caprow .n51slider { gap: 6px; font-size: 12px; }
.n51caprow .n51slider input { width: 84px; margin: 0; }
.n51slider input { accent-color: var(--accent); width: 160px; }
.n51ask { display: grid; gap: 8px; }
.n51ask > b { font-size: 14px; }
.n51ask .btn.primary.big { width: 100%; justify-content: center; }
.n51ask .n51row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.n51chips { display: flex; gap: 6px; flex-wrap: wrap; }
.n51chips span { border: 1px solid var(--line2); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; color: var(--text2); }
.n51chips span.away { border-style: dashed; color: var(--muted); }
/* návrh 65 krok 5: the names under the view select their person or thing (also one hidden behind another) */
.n51chips button.n65pick { border: 1px solid var(--line2); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12.5px; color: var(--text2); background: transparent; cursor: pointer; }
.n51chips button.n65pick:hover { border-color: var(--text2); color: var(--text); }
.n51chips button.n65pick.away { border-style: dashed; color: var(--muted); }
.n51chips button.n65pick[aria-pressed="true"] { border-color: var(--accent, #f5b335); color: var(--text); }
.n51kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; font-size: 13px; margin: 0; }
.n51kv dt { color: var(--muted); }
.n51kv dd { margin: 0; min-width: 0; }
.n51big { max-width: 100%; }

/* step 3: the 3D of scena.js in the right pane, read only, exactly the camera's 16:9 frame */
.n51pic > .viewer.s30v.n51cmp { position: absolute; inset: 0; min-height: 0; height: auto; border: 0; border-radius: 0;
  aspect-ratio: auto; max-height: none; display: block; padding: 0; overflow: hidden; background: #0b0d0f; }
.n51pic > .s30bars, .n51pic > script { display: none; }
.n51cmp .s30c { width: 100%; height: 100%; }
.n51cmp .s30bar, .n51cmp .s30map, .n51cmp .s30br, .n51cmp .s30lift, .n51cmp .s30behind, .n51cmp .s30mask, .n51cmp .s30hint,
.n51cmp .s30help, .n51cmp .s30lbox, .n51cmp .s30lbl { display: none !important; }
.s30panel.n51cmpp [data-s30="insp"], .s30panel.n51cmpp [data-s30-server], .s30panel.n51cmpp [data-s30="hist"] { display: none; }
/* Codex 8. 11.: the status stays — a refused Sedí, pokračovať says why there */
.s30panel.n51cmpp .s30st:has([data-scena-status]:empty) { display: none; }
.s30sum.n51cmps { display: none; }

/* the editor (Doladiť v 3D): V zábere as chips, the camera in words */
.s30sum .sv23 .n51chips { display: inline-flex; vertical-align: middle; }
.s30sum .sv23 .n51cam { color: var(--muted); margin-left: 8px; }

/* the panels of the steps: the question of step 3, its other ways, the way back from Doladiť */
.n51panel .ifoot { display: grid; gap: 8px; }
.s30panel.n51cmpp .ifoot .n51q { font-size: 14px; }
.n51ask2 { justify-content: space-between; }
.n51ask2 .inline { display: inline; margin: 0; }
.s30panel .ifoot > .n51link { justify-self: start; }
.n51link { background: none; border: 0; color: var(--text2); padding: 6px 2px; font: inherit; font-size: 13px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; }
.n51link:hover { color: var(--text); }
.n51notes .why { margin: 0 0 6px; }

/* návrh 60 P: 3D z fotky — the shot's photos as larger thumbnails, the own photo's upload on one line */
.g60tile .g60th { width: 112px; height: 63px; }
.g60up { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.g60up input[type=file] { max-width: 100%; font-size: 12px; color: var(--muted); }

/* Peter 22. 11. (scena_oprava): the first round's scene drawn for R, off the screen, in the plate's own size */
.n51pohlad { position: fixed; left: -20000px; top: 0; width: 1280px; height: 720px; overflow: hidden; pointer-events: none; }
.n51pohlad .viewer { width: 1280px; height: 720px; }
/* P2… of a scene from a picture: a visible choice beside the tiles */
.n51fotky { margin-top: 12px; display: grid; gap: 8px; }
.n51fl { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.n51fi { display: grid; gap: 4px; font-size: 12px; cursor: pointer; }
.n51fi img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.n51fi input:disabled + img { opacity: .45; }
.n51fadd { justify-self: start; }
