/* R-29 recorded demo: layout only. Tokens, fonts and the shared monster-lab components (header bulbs, monster states,
   tags, bubble, primary button, media frame, card, crossing meter, Lab notes, thumbs) come from lab/lab.css, the same
   file the Studio serves (apps/studio/assets/lab/lab.css). Every step fits 1600x1000 with Lab notes closed. */
[hidden] { display: none !important; }
html, body { margin: 0; }
body { line-height: 1.4; min-height: 100vh; display: flex; flex-direction: column; }
body > .m-root { flex: 1; }
a { color: #1F5FA8; }

/* sticky banner: this is a recording, not a live run */
.banner { position: sticky; top: 0; z-index: 20; padding: 6px 16px; text-align: center; font-weight: 600; font-size: 13px; line-height: 1.35;
  color: #12406f; background: #e6f0fd; border-bottom: 2px solid #1F5FA8; }

/* header: brand | copper pipe with four bulbs and their recorded steps | run it yourself */
.lab-head { gap: 28px; padding: 6px 28px 8px; }
.lab-head .brand { width: 440px; flex: none; }
.lab-head .apptitle { font-size: 27px; white-space: nowrap; }
.lab-head .tagline { font-size: 12.5px; line-height: 1.3; margin-top: 3px; }
.rail { max-width: none; align-items: flex-start; gap: 18px; }
.rail .wire { left: 60px; right: 72px; top: 22px; }
.stage { display: flex; flex-direction: column; align-items: center; min-width: 0; gap: 4px; position: relative; z-index: 1; }
.stage .bulb { width: auto; }
.substeps { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.stepitem { font-family: Fredoka, sans-serif; font-size: 13px; font-weight: 600; color: var(--ink); background: #fff; border: 2px solid var(--line);
  border-radius: 999px; padding: 1px 9px; cursor: pointer; white-space: nowrap; }
.stepitem:hover { border-color: var(--green); }
.stepitem.done { color: #24522A; border-color: #A6D58A; background: #F1F9EA; }
.stepitem.current { color: #4A3700; background: #FFF4B8; border-color: #A07800; box-shadow: 0 0 0 3px rgba(255, 225, 77, .45); }
.runit { flex: none; font-weight: 600; font-size: 15px; color: var(--green-d); background: #fff; border: 2px solid var(--green-d); border-radius: 12px;
  padding: 7px 14px; text-decoration: none; white-space: nowrap; }
.runit:hover { background: #F1F9EA; }

/* page: the monster on the left, one recorded step on the right */
.m-root { display: grid; grid-template-columns: 420px minmax(0, 1fr); }
.m-left { position: relative; padding: 14px 16px 0; border-right: 3px solid var(--line);
  background: radial-gradient(ellipse at 50% 52%, rgba(232, 246, 218, .97) 0, rgba(242, 246, 236, .9) 55%, rgba(238, 242, 230, .75) 100%); }
.m-left .monster-wrap { position: sticky; top: 48px; height: 706px; }
.m-left .monster-wrap .monster { width: 342px; margin-left: 10px; }
.m-left .ptag { cursor: help; }
#part-brain { left: 230px; top: 6px; } #part-eyes { left: 0; top: 188px; } #part-heart { left: 214px; top: 336px; }
#part-hand { left: 0; top: 584px; } #part-arms { left: 262px; top: 514px; } #part-legs { left: 240px; top: 620px; }
.m-main { padding: 14px 32px 18px; min-width: 0; display: flex; flex-direction: column; }
.m-main .bubble { display: block; font-size: 28px; padding: 10px 24px; margin-bottom: 14px; }
.m-main .bubble .lead { margin-right: 4px; }
.m-main .bubble img.bolt { display: inline-block; vertical-align: -4px; margin-right: 8px; }
.m-main .bubble .alive { font-size: 38px; }

/* big media | one card */
.b-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
#panel[data-step="fall"] .b-grid { grid-template-columns: minmax(0, 1fr) 388px; }
.mediacol { min-width: 0; }
.fig { margin: 0; }
.fig .media-frame img, .fig .media-frame video { max-height: 410px; object-fit: contain; background: #fff; }
.fig .media-frame img { cursor: zoom-in; }
.fig .media-frame video { background: #1d2620; }
#media[data-kind="compare"] { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
#media[data-kind="compare"] .fig { min-width: 0; }
.compare-enlarge { display: block; width: 100%; padding: 0; border: 0; background: #fff; cursor: zoom-in; }
.compare-enlarge:focus-visible { outline: 3px solid #1F5FA8; outline-offset: -3px; }
.fig figcaption { padding: 6px 2px 0; font-size: 13px; }
.caplabel { font-size: 14px; color: var(--ink); }
.meta { margin-top: 2px; color: var(--muted); font-size: 12px; }
.runid { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 12px; color: #12406f; background: #e6f0fd;
  padding: 1px 5px; border-radius: 5px; word-break: break-all; }
.jsonbox { padding: 18px; font-size: 14px; }
.codecnote { padding: 6px 10px; font-size: 12.5px; color: #6a4300; background: #fff6e0; border-top: 1px solid #f0d9b5; }
.thumbs { gap: 8px; margin-top: 8px; }
.thumb { display: block; position: relative; width: 104px; height: 68px; padding: 2px; overflow: hidden; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.thumb .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--green-d); display: grid; place-items: center; font-size: 14px; padding-left: 2px; }
.thumb .jsonname { display: grid; place-items: center; height: 100%; font-size: 11.5px; font-weight: 600; color: var(--ink); text-align: center;
  word-break: break-all; padding: 2px 4px; }
#card { display: flex; flex-direction: column; gap: 8px; }
.cardtitle { margin: 0; font-size: 20px; font-weight: 600; color: var(--ink); }
#card .gauge { width: 300px; }
#card .gauge .dialbox { width: 220px; margin: 0 auto; }
#card .gauge .gcap { word-break: break-word; }
.steptext { margin: 0; font-size: 14.5px; line-height: 1.42; }
.honest { margin: 0; font-size: 13px; color: var(--muted); font-style: italic; }

/* action row: Back, the one primary button, counter, Lab notes toggle */
.m-action { display: flex; align-items: center; gap: 20px; margin-top: auto; padding-top: 16px; flex-wrap: wrap; }
.m-action .primary { font-size: 22px; padding: 13px 28px; }
.counter { color: var(--muted); font-size: 15px; }
.m-action .labnotes { flex: 1; min-width: 260px; }
.labnotes-body { margin-top: 14px; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 14px 18px; color: var(--ink); }
.labnotes-body h3 { margin: 12px 0 6px; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.labnotes-body h3:first-child { margin-top: 0; }
.notes { margin: 0 0 6px; padding-left: 18px; font-size: 14px; }
.sources { margin: 0; padding-left: 18px; font-size: 13.5px; }
.sources li { margin-bottom: 4px; word-break: break-word; }
.sources b { font-weight: 600; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 8px; }
.result { padding: 8px 10px; border: 1px solid #cfe0bd; border-left: 4px solid var(--green); border-radius: 9px; background: #F5FAEE; }
.result .rlabel { font-size: 12.5px; color: var(--muted); }
.result .rvalue { font-size: 17px; font-weight: 700; color: var(--ink); word-break: break-word; }
.result .rmeta { margin-top: 3px; font-size: 12px; color: var(--muted); word-break: break-word; }
.foot { margin: 12px 0 0; color: var(--muted); font-size: 12.5px; }

.zoom { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 20px; background: rgba(29, 38, 32, .82); cursor: zoom-out; }
.zoom img { max-width: 96vw; max-height: 88vh; border-radius: 8px; background: #fff; }
.zoomcap { color: #fff; font-size: 13px; max-width: 90vw; text-align: center; }
