/* Embryology lab wall board — the whole day on ONE 16:9 screen, nothing scrolls.
   Every size is in rem / em and the root size follows the screen (the smaller of a width share and a height share), so the
   same layout fits a 1080p TV, a 4K display and the app window. Each list shrinks its text to fit (embryo.js fit(): the
   --fit factor, down to 0.62); only a list that still overflows scrolls by itself. Design tokens only (board.css :root —
   Ruby, Emerald, Sapphire, white, black tints; warnings are ruby tints). Loaded after board.css, on /board/embryo only. */
html{font-size:min(.86vw,1.53vh)}
body.lab{height:100vh;overflow:hidden}
body.lab header{padding:.45rem 1rem;gap:1rem;flex:none}
body.lab header h1{font-size:1.45rem}body.lab header .sub{font-size:.85rem}
body.lab header .clock{font-size:1.8rem}body.lab header .date{font-size:.85rem}
body.lab .live{font-size:.85rem;padding:.2rem .7rem}
body.lab .live .dot{width:.6rem;height:.6rem}
body.lab .lang{font-size:.9rem;padding:.3rem .8rem;border-radius:.4rem}
body.lab footer{padding:.2rem 1rem;font-size:.75rem;flex:none}

/* the grid: KPI strip · procedures today (7) · culture Day 1 … Day 7+ (7) · tomorrow + cryo / andrology */
body.lab main.wall{flex:1;min-height:0;overflow:hidden;padding:.55rem .8rem;gap:.5rem;
  grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:auto minmax(0,1.25fr) minmax(0,.95fr) minmax(0,.6fr);align-items:stretch}
body.lab .kpis{grid-column:1/-1;grid-template-columns:repeat(11,minmax(0,1fr));gap:.4rem}
body.lab .kpi{padding:.3rem .55rem;border-radius:.5rem;min-width:0}
body.lab .kpi .v{font-size:1.35rem;line-height:1.1;white-space:nowrap}
body.lab .kpi .l{font-size:.68rem;line-height:1.15;margin-top:.1rem}
body.lab .panel{display:flex;flex-direction:column;min-height:0;min-width:0;border-radius:.55rem}
body.lab .panel.wide{grid-column:span 2}
body.lab .panel.wider{grid-column:span 3}
body.lab .panel h2{font-size:.95rem;padding:.35rem .7rem;flex:none;gap:.5rem}
body.lab .panel h2 .n{font-size:.85rem;padding:.05rem .55rem}
body.lab .panel h2.sapphire{background:var(--sapphire)}
body.lab .list{flex:1;min-height:0;max-height:none;overflow:hidden;font-size:calc(1rem * var(--fit, 1))}
body.lab .list.scrolling{-webkit-mask-image:linear-gradient(var(--ink) 88%,transparent);mask-image:linear-gradient(var(--ink) 88%,transparent)}
body.lab .empty{padding:.8em .6em;font-size:.82em}

/* procedure cards: time · patient, what was done / planned, the remark, then the tags in one line */
body.lab .row{grid-template-columns:2.9em minmax(0,1fr);gap:.5em;padding:.4em .6em;font-size:1em;align-items:start}
body.lab .row.cu{grid-template-columns:minmax(0,1fr)}
body.lab .row .t{font-size:.95em;padding-top:.05em}
body.lab .row .name{font-size:.95em;line-height:1.25;overflow-wrap:anywhere}
body.lab .row .meta{font-size:.76em;line-height:1.3;overflow-wrap:anywhere}
body.lab .name .meta{white-space:nowrap}
body.lab .row .tag,body.lab .pill .tag{font-size:.7em;padding:.12em .5em;border-radius:.4em}
body.lab .tags{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:.25em;margin-top:.25em}
body.lab .row.late .t{color:var(--ruby)}
body.lab .chips{gap:.22em;margin-top:.2em}
body.lab .chip{font-size:.7em;padding:.08em .45em;border-radius:.4em}
body.lab .qn{font-size:.7em;margin:0;padding:.08em .5em;border-radius:.4em;white-space:nowrap}

/* what the lab typed onto a card; embryo glue (plan, or the ET record's value) */
body.lab .remark{display:block;max-width:100%;margin-top:.22em;padding:.1em .45em;border-radius:.4em;background:var(--sapphire-light);color:var(--sapphire-deep);font-size:.78em;line-height:1.3;overflow-wrap:anywhere}
body.lab .tag.glue.on{background:var(--emerald-light);color:var(--emerald)}
body.lab .tag.glue.off{background:var(--sapphire-light);color:var(--sapphire)}
body.lab .tag.glue.unset{background:var(--line);color:var(--muted)}
body.lab button.ed{font:inherit;margin-left:auto;border:0;background:transparent;color:var(--muted);cursor:pointer;padding:.12em;line-height:0;border-radius:.3em}
body.lab button.ed svg{width:1.05em;height:1.05em}
body.lab button.ed:hover{color:var(--ruby);background:var(--ruby-light)}

/* tomorrow, cryo tanks, andrology: one pill per patient / tank, flowing across the wide panel */
body.lab .list.flow{display:flex;flex-wrap:wrap;align-content:flex-start;gap:.35em;padding:.45em .55em}
body.lab .pill{display:flex;align-items:center;flex-wrap:wrap;gap:.25em .5em;padding:.25em .55em;border:1px solid var(--line);border-radius:.5em;background:var(--bg);font-size:.95em;max-width:100%}
body.lab .pill .t{font-weight:700;color:var(--sapphire-deep);font-variant-numeric:tabular-nums}
body.lab .pill .name{font-weight:500;overflow-wrap:anywhere}
body.lab .pill .meta{font-size:.8em;color:var(--muted)}
body.lab .pill .remark{display:inline-block;margin:0}
body.lab .pill button.ed{margin-left:0}

/* brand rule: no amber — warnings are a ruby tint */
body.lab .tag.amber,body.lab .chip.due,body.lab .chip.mosaic{background:var(--ruby-light);color:var(--ruby-dark)}
body.lab .live.off .dot{background:var(--ruby)}

/* remark editor (staff sessions) — the dialog frame of the TV-link manager (board.css .tvdlg) */
body.lab .tvdlg .box.rm{width:min(34rem,92vw);font-size:1rem}
body.lab .tvdlg .fld{display:grid;gap:.3rem;margin:.8rem 0;font-weight:700;color:var(--sapphire-deep)}
body.lab .tvdlg textarea{font-family:inherit;font-size:1rem;padding:.5rem;border:1px solid var(--line);border-radius:.4rem;resize:vertical;width:100%;font-weight:400;color:var(--ink)}
body.lab .tvdlg .seg{display:flex;gap:.4rem}
body.lab .tvdlg .seg button{flex:1;font-size:1rem;background:var(--sapphire-light);color:var(--sapphire-deep)}
body.lab .tvdlg .seg button.on{background:var(--sapphire-deep);color:var(--white)}
body.lab .tvdlg .recval{font-weight:400;color:var(--ink)}
body.lab .tvdlg .actions{align-items:center}
body.lab .tvdlg .err{color:var(--ruby-dark);font-weight:700}
