  /* Sdílený styl nových prvních kapitol (Molekulární biologie, Imunologie, Vývojová biologie,
     Endokrinologie): design kapitoly Moře pod kůží + prvky jejich simulací. */
  :root{
    --paper:#F4F1E7;      /* warm sage-cream */
    --paper-warm:#EDE7D8; /* deeper cream panel */
    --ink:#262B21;        /* warm green-black */
    --ink-2:#41473A;      /* secondary text */
    --sage:#7B8C6A;       /* primary sage */
    --sage-deep:#4C5A3F;  /* deep sage — links / headings accents */
    --sage-mute:#9BA98A;
    --sage-pale:#C7D0B6;
    --sage-mist:#E5E7D6;
    --terra:#BC6A46;      /* terracotta spark — muted, not #D97757 */
    --terra-deep:#9C5232;
    --terra-pale:#E0B49E;
    --gold:#C6A24A;
    --line:#D6D3C0;
    --night:#21271D;      /* deep green instrument panel */
    --night-2:#2A3125;
    --night-line:#46503C;
    --serif:'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --sans:'Source Sans 3', system-ui, -apple-system, sans-serif;
    --mono:'Source Code Pro', ui-monospace, 'SFMono-Regular', Menlo, monospace;
    --measure:40rem;
    --measure-wide:47rem;
  }

  *{box-sizing:border-box;}
  html{-webkit-text-size-adjust:100%;}
  body{
    margin:0;
    background:var(--paper);
    color:var(--ink);
    font-family:var(--serif);
    font-size:1.14rem;
    line-height:1.78;
    font-weight:400;
    letter-spacing:.003em;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
  }

  /* faint paper texture via layered gradients */
  body::before{
    content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
    background:
      radial-gradient(1200px 700px at 82% -8%, rgba(188,106,70,.045), transparent 60%),
      radial-gradient(1000px 800px at 0% 100%, rgba(123,140,106,.06), transparent 55%);
  }

  /* ---- scroll progress ---- */
  #progress{position:fixed;top:0;left:0;height:2px;width:0;z-index:50;
    background:linear-gradient(90deg,var(--sage-deep),var(--sage) 60%,var(--terra));}

  /* ---- top wordmark bar ---- */
  .topbar{max-width:var(--measure-wide);margin:0 auto;padding:1.2rem 1.5rem .9rem;
    display:flex;justify-content:space-between;align-items:baseline;
    font-family:var(--sans);text-transform:uppercase;letter-spacing:.18em;
    font-size:.66rem;font-weight:600;color:var(--sage-deep);}
  .topbar .dot{color:var(--terra);}
  .topbar .right{color:var(--sage-mute);}
  .topbar .crumb a{color:var(--sage-deep);text-decoration:none;}
  .topbar .crumb a:hover{color:var(--terra-deep);}
  .topbar .crumb .sep-slash{color:var(--sage-pale);margin:0 .2em;}

  /* ---- layout blocks ---- */
  .block{max-width:var(--measure);margin-inline:auto;padding-inline:1.5rem;}
  .prose > *{max-width:var(--measure);margin-inline:auto;}
  .prose{padding-inline:1.5rem;}
  p{margin:0 0 1.25rem;}
  a{color:var(--sage-deep);text-underline-offset:.18em;text-decoration-thickness:1px;
    text-decoration-color:var(--sage-pale);transition:color .2s,text-decoration-color .2s;}
  a:hover{color:var(--terra-deep);text-decoration-color:var(--terra-pale);}

  /* ---- hero ---- */
  header.hero{max-width:var(--measure-wide);margin:0 auto;padding:2rem 1.5rem 1rem;}
  .eyebrow{font-family:var(--sans);text-transform:uppercase;letter-spacing:.26em;
    font-size:.7rem;font-weight:700;color:var(--sage);margin:0 0 1.4rem;
    display:flex;gap:.55rem;align-items:center;flex-wrap:wrap;}
  .eyebrow .sep{width:5px;height:5px;border-radius:50%;background:var(--terra);display:inline-block;flex:none;}
  .eyebrow .n{color:var(--terra-deep);}
  h1.title{
    font-family:var(--serif);font-weight:700;line-height:1.04;
    font-size:clamp(2.7rem,8vw,5.1rem);letter-spacing:-.012em;
    margin:0 0 1.1rem;color:var(--ink);
  }
  h1.title em{font-style:italic;color:var(--sage-deep);font-weight:400;}
  .deck{font-size:clamp(1.15rem,2.6vw,1.45rem);line-height:1.55;color:var(--ink-2);
    font-style:italic;max-width:34rem;margin:0 0 1.6rem;}
  .byline{font-family:var(--sans);font-size:.82rem;letter-spacing:.04em;color:var(--sage-mute);
    border-top:1px solid var(--line);padding-top:1rem;max-width:34rem;}
  .byline b{color:var(--sage-deep);font-weight:600;}

  /* hero branch figure */
  .branch-wrap{max-width:var(--measure-wide);margin:1.6rem auto 0;padding:0 1.5rem;}
  .branch-fig{border-top:1px solid var(--line);border-bottom:1px solid var(--line);
    padding:1.4rem 0 .6rem;}
  .branch-fig svg{width:100%;height:auto;display:block;overflow:visible;}
  .branch-cap{font-family:var(--sans);font-size:.74rem;letter-spacing:.05em;color:var(--sage-mute);
    text-align:center;margin:.7rem 0 0;font-style:normal;}
  .branch-cap em{color:var(--terra-deep);font-style:italic;}

  .draw path,.draw line{stroke-dasharray:1400;stroke-dashoffset:1400;
    animation:draw 2.6s ease forwards;}
  .draw .leaf{opacity:0;animation:fade 1s ease forwards;animation-delay:1.9s;}
  @keyframes draw{to{stroke-dashoffset:0;}}
  @keyframes fade{to{opacity:1;}}

  /* ---- section divider ---- */
  .rule{max-width:var(--measure);margin:2.4rem auto;padding-inline:1.5rem;
    display:flex;align-items:center;gap:1rem;color:var(--sage-pale);}
  .rule::before,.rule::after{content:"";height:1px;flex:1;background:var(--line);}
  .rule svg{width:26px;height:14px;flex:none;color:var(--sage);}

  /* section headings */
  h2{font-family:var(--serif);font-weight:700;font-size:clamp(1.7rem,4vw,2.4rem);
    line-height:1.12;letter-spacing:-.01em;margin:2.6rem auto 1.1rem;color:var(--ink);}
  h2 .num{font-family:var(--mono);font-size:.62em;font-weight:500;color:var(--terra);
    letter-spacing:0;margin-right:.7rem;vertical-align:.12em;}
  h2 em{font-style:italic;color:var(--sage-deep);font-weight:400;}
  h3{font-family:var(--sans);font-weight:700;font-size:1.02rem;letter-spacing:.02em;
    color:var(--sage-deep);margin:2rem auto .6rem;}

  /* drop cap on the opening paragraph */
  .lede::first-letter{
    font-family:var(--serif);font-weight:700;float:left;font-size:4.4rem;line-height:.78;
    padding:.32rem .12rem 0 0;color:var(--terra);
  }

  /* aside / margin similes */
  aside.note{border-left:2px solid var(--sage);background:var(--sage-mist);
    padding:.9rem 1.1rem;margin:1.6rem auto;border-radius:0 4px 4px 0;
    font-size:.98rem;line-height:1.6;color:var(--ink-2);}
  aside.note .tag{font-family:var(--sans);text-transform:uppercase;letter-spacing:.14em;
    font-size:.64rem;font-weight:700;color:var(--sage-deep);display:flex;align-items:center;gap:.4rem;
    margin-bottom:.35rem;}
  aside.note .tag svg{width:14px;height:14px;color:var(--sage);flex:none;}
  aside.note b{color:var(--terra-deep);}

  /* punchline pull */
  .punch{font-family:var(--serif);font-style:italic;font-size:clamp(1.25rem,3vw,1.6rem);
    line-height:1.42;color:var(--sage-deep);border-top:1px solid var(--line);
    border-bottom:1px solid var(--line);padding:1.3rem 0;margin:2rem auto;text-align:left;}
  .punch b{font-style:normal;font-weight:700;color:var(--terra-deep);}

  strong{font-weight:700;color:var(--ink);}
  em{font-style:italic;}
  .kw{color:var(--terra-deep);font-style:normal;font-weight:400;
    border-bottom:1px dotted var(--terra-pale);}

  /* ---- simulation figure ---- */
  figure.sim{max-width:var(--measure-wide);margin:2.6rem auto;padding-inline:1.5rem;}
  .sim-panel{background:var(--night);border:1px solid var(--night-line);border-radius:10px;
    overflow:hidden;box-shadow:0 18px 40px -28px rgba(38,43,33,.6);}
  .sim-head{display:flex;justify-content:space-between;align-items:center;gap:1rem;
    padding:.85rem 1.1rem;border-bottom:1px solid var(--night-line);flex-wrap:wrap;}
  .sim-head .label{font-family:var(--mono);font-size:.72rem;letter-spacing:.08em;
    color:var(--sage-pale);text-transform:uppercase;display:flex;align-items:center;gap:.55rem;}
  .sim-head .label .idx{color:var(--terra);font-weight:500;}
  .sim-head .readout{font-family:var(--mono);font-size:.78rem;color:#E9E7D8;
    display:flex;gap:1.1rem;flex-wrap:wrap;}
  .sim-head .readout b{color:var(--gold);font-weight:500;}
  .sim-head .readout .lo{color:var(--sage-mute);}
  canvas{display:block;width:100%;height:auto;background:transparent;touch-action:manipulation;}
  .sim-controls{display:flex;gap:.55rem;flex-wrap:wrap;align-items:center;
    padding:.85rem 1.1rem;border-top:1px solid var(--night-line);background:var(--night-2);}
  .ctrl{font-family:var(--sans);font-weight:600;font-size:.78rem;letter-spacing:.04em;
    text-transform:uppercase;color:var(--sage-pale);background:transparent;
    border:1px solid var(--night-line);border-radius:6px;padding:.5rem .85rem;cursor:pointer;
    transition:all .16s ease;}
  .ctrl:hover{border-color:var(--sage);color:#F4F1E7;background:rgba(123,140,106,.14);}
  .ctrl:active{transform:translateY(1px);}
  .ctrl.spark{color:var(--terra-pale);border-color:rgba(188,106,70,.5);}
  .ctrl.spark:hover{border-color:var(--terra);background:rgba(188,106,70,.16);color:#fff;}
  .ctrl.is-on{background:var(--sage);color:var(--night);border-color:var(--sage);}
  .ctrl.spark.is-on{background:var(--terra);color:#fff;border-color:var(--terra);}
  .ctrl:focus-visible{outline:2px solid var(--gold);outline-offset:2px;}
  .sim-controls .hint{font-family:var(--sans);font-size:.74rem;color:var(--sage-mute);
    margin-left:auto;font-style:italic;letter-spacing:.02em;}
  figcaption{font-family:var(--sans);font-size:.82rem;line-height:1.55;color:var(--ink-2);
    margin:.85rem .2rem 0;}
  figcaption b{color:var(--sage-deep);font-weight:700;}

  /* ---- FAQ ---- */
  .faq-intro{margin-bottom:1.4rem;}
  details.q{border-bottom:1px solid var(--line);max-width:var(--measure);margin-inline:auto;}
  details.q:first-of-type{border-top:1px solid var(--line);}
  details.q summary{list-style:none;cursor:pointer;padding:1.05rem 2.2rem 1.05rem 0;position:relative;
    font-family:var(--serif);font-weight:700;font-size:1.12rem;line-height:1.4;color:var(--ink);
    transition:color .16s;}
  details.q summary::-webkit-details-marker{display:none;}
  details.q summary:hover{color:var(--sage-deep);}
  details.q summary::after{content:"";position:absolute;right:.2rem;top:1.35rem;
    width:13px;height:13px;
    background:
      linear-gradient(var(--terra),var(--terra)) center/13px 1.6px no-repeat,
      linear-gradient(var(--terra),var(--terra)) center/1.6px 13px no-repeat;
    transition:transform .2s ease;}
  details.q[open] summary::after{transform:rotate(45deg);}
  details.q summary:focus-visible{outline:2px solid var(--sage);outline-offset:3px;border-radius:3px;}
  details.q .answer{padding:0 0 1.3rem;color:var(--ink-2);font-size:1.06rem;}
  details.q .answer p{margin:0 0 .8rem;}
  details.q .answer p:last-child{margin-bottom:0;}

  /* ---- coda ---- */
  .coda{max-width:var(--measure);margin:2rem auto;padding:2rem 1.5rem;
    text-align:center;}
  .coda p{font-style:italic;color:var(--sage-deep);font-size:1.16rem;max-width:32rem;margin-inline:auto;}
  .coda .sign{font-family:var(--sans);font-size:.74rem;letter-spacing:.2em;text-transform:uppercase;
    color:var(--sage-mute);margin-top:1.6rem;}

  /* ---- sources ---- */
  .sources{max-width:var(--measure);margin:1rem auto 4rem;padding:1.6rem 1.5rem;
    border-top:1px solid var(--line);font-family:var(--sans);font-size:.86rem;line-height:1.65;
    color:var(--ink-2);}
  .sources h2,.sources h4{line-height:inherit;font-family:var(--sans);text-transform:uppercase;letter-spacing:.16em;
    font-size:.7rem;font-weight:700;color:var(--sage-deep);margin:0 0 .9rem;}
  .sources ul{margin:0;padding-left:1.1rem;}
  .sources li{margin-bottom:.5rem;}
  .sources em{font-style:italic;}

  ::selection{background:var(--sage-pale);color:var(--ink);}

  @media (max-width:640px){
    body{font-size:1.06rem;line-height:1.72;}
    .lede::first-letter{font-size:3.6rem;}
    .sim-head .readout{font-size:.7rem;gap:.8rem;}
    .sim-controls .hint{display:none;}
  }

  @media (prefers-reduced-motion:reduce){
    *{animation-duration:.001ms !important;animation-iteration-count:1 !important;
      transition-duration:.001ms !important;}
    .draw path,.draw line{stroke-dashoffset:0;}
    .draw .leaf{opacity:1;}
  }

  /* range sliders inside sim control bars */
  .sim-controls label{font-family:var(--sans);font-size:.72rem;letter-spacing:.04em;color:var(--sage-pale);text-transform:uppercase;display:inline-flex;align-items:center;gap:.55rem;}
  .sim-controls input[type=range]{-webkit-appearance:none;appearance:none;height:4px;width:104px;border-radius:2px;background:var(--night-line);outline:none;cursor:pointer;}
  .sim-controls input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:var(--sage);border:2px solid var(--night);cursor:pointer;}
  .sim-controls input[type=range]::-moz-range-thumb{width:14px;height:14px;border:none;border-radius:50%;background:var(--sage);cursor:pointer;}

/* link to the feedback page (and the coffee button) under every chapter and game, inserted by tools/seo.py */
.fv-line{box-sizing:border-box;max-width:calc(var(--measure,42rem) - 3rem);
  margin:2.4rem max(1.5rem,calc((100% - var(--measure,42rem)) / 2 + 1.5rem)) 1.4rem;padding:.8rem 1rem;
  border-radius:10px;background:rgba(191,106,63,.08);border-left:3px solid #BF6A3F;
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.6rem 1rem;
  font-family:var(--sans,var(--font-sans,Inter,system-ui,sans-serif));font-size:.95rem;line-height:1.55;color:#4A4F42;}
.fv-line p{margin:0;}
.fv-line p a{color:#9E5230;font-weight:600;text-decoration:none;white-space:nowrap;}
.fv-line p a:hover,.fv-line p a:focus-visible{text-decoration:underline;}
/* "Kup mi kafe": a plain link to Ko-fi, no third-party script */
.kafe{display:inline-flex;align-items:center;gap:.45rem;font-family:Inter,system-ui,sans-serif;font-weight:600;font-size:.9rem;
  line-height:1.2;font-style:normal;color:#9E5230;background:#FFF8F1;border:1.5px solid #BF6A3F;border-radius:999px;padding:.42rem .95rem;
  text-decoration:none;white-space:nowrap;transition:background .15s,color .15s;}
.kafe:hover,.kafe:focus-visible{background:#BF6A3F;color:#fff;}
.kafe:focus-visible{outline:2px solid #BF6A3F;outline-offset:2px;}
.kafe svg{width:1.1em;height:1.1em;flex:none;}
.kafe-radek{display:flex;align-items:center;flex-wrap:wrap;gap:.6rem 1rem;}
.coda .kafe-radek{justify-content:center;}

/* byline with the publication and update dates under the title, inserted by tools/seo.py */
.dateline{font-family:var(--sans,var(--font-sans,Inter,system-ui,sans-serif));font-size:.84rem;line-height:1.55;
  letter-spacing:.01em;font-style:normal;color:#6C7062;margin:.75rem 0 0;}
.dateline a{color:#9E5230;font-weight:600;text-decoration:none;}
.dateline a:hover,.dateline a:focus-visible{text-decoration:underline;}
.dateline .dl{white-space:nowrap;}
/* links from a chapter to its two games, inserted by tools/seo.py */
.hry-blok{box-sizing:border-box;max-width:calc(var(--measure,42rem) - 3rem);
  margin:2.8rem max(1.5rem,calc((100% - var(--measure,42rem)) / 2 + 1.5rem)) 0;
  font-family:var(--sans,var(--font-sans,Inter,system-ui,sans-serif));}
.hry-blok h2{font:600 .74rem/1.4 var(--mono,var(--font-mono,"Fira Code",ui-monospace,monospace));letter-spacing:.16em;
  text-transform:uppercase;color:#9E5230;margin:0 0 .7rem;padding:0;border:0;max-width:none;text-align:left;}
.hry-blok ul{list-style:none;margin:0;padding:0;display:grid;gap:.6rem;}
.hry-blok li{margin:0;padding:.8rem 1rem .85rem;border:1px solid rgba(94,133,112,.35);border-radius:10px;
  background:rgba(255,255,255,.4);line-height:1.5;}
.hry-blok li a{font-weight:700;font-size:1.02rem;color:#2F5D46;text-decoration:none;}
.hry-blok li a::after{content:"\00a0\2192";}
.hry-blok li a:hover,.hry-blok li a:focus-visible{text-decoration:underline;}
.hry-blok .druh{font-size:.7rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#7B8C6A;margin-left:.35rem;}
.hry-blok .co{display:block;margin-top:.2rem;font-size:.93rem;color:#4A4F42;}
.deck + .dateline{margin:-.9rem 0 1.6rem;}

  /* ---- prvky simulací nových kapitol ---- */
  .sim-head .readout .rd{white-space:nowrap;}
  .sim-controls .lbl{font-family:var(--sans);font-size:.7rem;letter-spacing:.08em;text-transform:uppercase;
    color:var(--sage-mute);margin-right:-.15rem;}
  .sim-controls .gap{flex-basis:100%;height:0;}
  .sim-controls label .v{font-family:var(--mono);font-size:.74rem;color:var(--gold);text-transform:none;letter-spacing:0;min-width:3.4rem;}
  .ctrl:disabled{cursor:default;opacity:.9;}
  .sim-legend{display:flex;flex-wrap:wrap;gap:.35rem 1.1rem;padding:.6rem 1.1rem;border-top:1px solid var(--night-line);
    font-family:var(--sans);font-size:.74rem;letter-spacing:.02em;color:var(--sage-pale);}
  .sim-legend span{display:inline-flex;align-items:center;gap:.4rem;}
  .sim-legend i{display:inline-block;width:.8rem;height:.8rem;border-radius:2px;flex:none;}

  /* dekodér: DNA -> mRNA -> bílkovina po trojicích */
  .dec{padding:1rem 1.1rem 1.1rem;display:flex;flex-wrap:wrap;gap:.7rem .5rem;align-items:flex-start;min-height:9rem;}
  .dec .cod{display:flex;flex-direction:column;align-items:center;gap:.3rem;padding:.35rem .3rem .4rem;
    border:1px solid var(--night-line);border-radius:6px;background:var(--night-2);}
  .dec .cod.out{opacity:.5;border-style:dashed;}
  .dec .cod.start{border-color:var(--sage);}
  .dec .cod.chg{border-color:var(--terra);}
  .dec .row{display:flex;gap:2px;}
  .dec .nt{width:1.45rem;height:1.75rem;padding:0;border:1px solid transparent;border-radius:4px;
    font-family:var(--mono);font-size:.92rem;font-weight:500;color:#E9E7D8;background:#38422F;cursor:pointer;}
  .dec .nt:hover{border-color:var(--sage);}
  .dec .nt:focus-visible{outline:2px solid var(--gold);outline-offset:1px;}
  .dec .nt.edit{background:var(--terra);color:#fff;}
  .dec .rna{width:1.45rem;text-align:center;font-family:var(--mono);font-size:.8rem;color:var(--sage-mute);}
  .dec .aa{font-family:var(--mono);font-size:.8rem;color:var(--gold);min-height:1.15rem;letter-spacing:.02em;}
  .dec .cod.chg .aa{color:var(--terra-pale);}
  .dec .aa.stop{color:#E9E7D8;font-weight:500;}
  .dec .aa.none{color:var(--sage-mute);font-style:italic;}
  .dec-key{padding:0 1.1rem .9rem;font-family:var(--sans);font-size:.74rem;color:var(--sage-mute);}
  .dec-key b{color:var(--sage-pale);font-weight:600;}

  /* ilustrace v textu */
  figure.illus{max-width:var(--measure);margin:1.8rem auto 2.2rem;padding-inline:1.5rem;}
  figure.illus svg{width:100%;height:auto;display:block;}
  figure.illus text{font-family:var(--sans);font-size:13px;fill:var(--ink-2);}
  figure.illus figcaption{margin-top:.7rem;}

  @media (max-width:640px){
    .dec{gap:.55rem .35rem;padding:.8rem .7rem .9rem;}
    .dec .nt{width:1.3rem;height:1.6rem;font-size:.85rem;}
    .dec .rna{width:1.3rem;}
  }

  /* blog: grid of chapter cards (Spád, práh, smyčka) */
  figure.triad{max-width:var(--measure-wide);margin:2rem auto 2.4rem;padding-inline:1.5rem;display:grid;
    grid-template-columns:repeat(auto-fill,minmax(15.5rem,1fr));gap:.9rem;}
  figure.triad .card{border:1px solid var(--line);border-radius:12px;padding:.85rem 1rem 1rem;background:var(--paper-warm);}
  figure.triad .br{font-family:var(--mono);font-size:.66rem;letter-spacing:.12em;text-transform:uppercase;color:var(--terra-deep);}
  figure.triad h3{font-family:var(--serif);font-size:1.02rem;line-height:1.3;margin:.2rem 0 .1rem;}
  figure.triad h3 a{color:var(--ink);text-decoration-color:var(--terra-pale);text-underline-offset:3px;}
  figure.triad dl{margin:.55rem 0 0;display:grid;grid-template-columns:auto 1fr;gap:.32rem .65rem;font-family:var(--sans);font-size:.86rem;line-height:1.42;}
  figure.triad dt{font-weight:600;color:var(--sage-deep);}
  figure.triad dd{margin:0;color:var(--ink-2);}
  figure.triad figcaption{grid-column:1/-1;margin-top:.3rem;}

  /* ---- games (Hry) ---- */
  figure.game .sim-panel{position:relative;}
  .game-stage{position:relative;}
  figure.game canvas{user-select:none;-webkit-user-select:none;}
  figure.game canvas.drag{touch-action:pan-y;cursor:crosshair;}
  figure.game canvas:focus-visible{outline:2px solid var(--gold);outline-offset:-2px;}
  .game-overlay{position:absolute;inset:0;display:flex;padding:1.2rem;
    background:rgba(28,33,25,.86);z-index:5;overflow:auto;}
  .game-overlay[hidden]{display:none;}
  .game-msg{max-width:32rem;margin:auto;text-align:center;color:#E9E7D8;font-family:var(--sans);}
  .game-msg h3{font-family:var(--serif);font-weight:700;font-size:1.4rem;line-height:1.25;margin:0 0 .6rem;color:#F4F1E7;}
  .game-msg .game-text{font-size:.96rem;line-height:1.55;color:#D9DCCB;margin:0 0 1rem;}
  .game-msg .game-text p{margin:.35rem 0;}
  .game-msg b{color:var(--gold);font-weight:600;}
  .game-btns{display:flex;gap:.5rem;justify-content:center;flex-wrap:wrap;}
  figure.game .ctrl{padding:.62rem .95rem;}
  .ctrl.go{background:var(--terra);border-color:var(--terra);color:#fff;}
  .ctrl.go:hover{background:var(--terra-deep);border-color:var(--terra-deep);color:#fff;}
  .levels{display:flex;gap:.4rem;flex-wrap:wrap;padding:.75rem 1.1rem;border-top:1px solid var(--night-line);background:var(--night-2);}
  .levels::before{content:"Úroveň";font-family:var(--mono);font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;
    color:var(--sage-mute);align-self:center;margin-right:.3rem;}
  .levels .ctrl{font-size:.72rem;padding:.45rem .7rem;}
  .levels .ctrl.done::after{content:" ✓";color:var(--gold);}
  .levels .ctrl.is-on.done::after{color:var(--night);}
  .ctrl.big{font-size:1rem;padding:.95rem 1.7rem;letter-spacing:.06em;}
  .game-goal{font-family:var(--sans);font-size:.86rem;line-height:1.5;color:#D9DCCB;padding:.7rem 1.1rem;
    border-bottom:1px solid var(--night-line);background:rgba(255,255,255,.02);}
  .game-goal b{color:var(--gold);font-weight:600;}

  .game-feedback{font-family:var(--sans);font-size:.9rem;line-height:1.5;color:#D9DCCB;padding:.65rem 1.1rem;
    border-top:1px solid var(--night-line);min-height:3.6em;}
  .game-feedback b{font-weight:600;color:#F4F1E7;}
  .game-feedback.ok b{color:var(--sage-pale);}
  .game-feedback.bad b{color:var(--terra-pale);}
  .fates{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.5rem;padding:.8rem 1.1rem;
    border-top:1px solid var(--night-line);}
  .fates .ctrl{padding:.8rem .4rem;font-size:.8rem;}
  .fates .ctrl[hidden]{display:none;}
  .fates kbd{font-family:var(--mono);font-size:.68rem;opacity:.6;margin-right:.3rem;font-weight:500;}
  .ctrl.f-pass{border-color:rgba(155,176,126,.6);}
  .ctrl.f-treg{border-color:rgba(198,162,74,.6);color:#E8D9A8;}
  .ctrl.f-delete{border-color:rgba(188,106,70,.6);color:var(--terra-pale);}
  .ctrl.f-neglect{color:#B9BFAF;}
  .ctrl:disabled{opacity:.45;cursor:default;}
  .vh{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}
  @media (max-width:560px){ .fates{grid-template-columns:repeat(2,minmax(0,1fr));} }
  /* Spiknutí: neuron circuit (SVG) and truth table */
  .net-wrap{display:flex;gap:1.1rem;align-items:center;padding:.8rem 1.1rem 1rem;}
  .net{flex:1 1 auto;min-width:0;}
  .net svg{display:block;width:100%;height:auto;max-height:360px;}
  .net svg text{font-family:var(--sans);}
  .net circle{transition:fill .2s ease, stroke .2s ease;}
  .net .sum{font-family:var(--mono);font-size:15px;font-weight:500;}
  .net .lbl{font-size:12.5px;fill:#C7D0B6;}
  .net .pin{font-family:var(--mono);font-size:12px;fill:var(--sage-mute);}
  .net .syn,.net .th{cursor:pointer;outline:none;}
  .net .syn text{font-family:var(--mono);font-size:12px;font-weight:600;pointer-events:none;}
  .net .syn:hover circle{stroke-width:3;}
  .net .syn:focus-visible circle,.net .th:focus-visible rect{stroke:var(--gold);stroke-width:3;}
  .net .th rect{fill:rgba(198,162,74,.14);stroke:rgba(198,162,74,.6);stroke-width:1.2;}
  .net .th:hover rect{fill:rgba(198,162,74,.28);}
  .net .th text{font-family:var(--mono);font-size:11px;fill:var(--gold);pointer-events:none;}
  table.truth{flex:0 0 auto;border-collapse:collapse;font-family:var(--mono);font-size:.84rem;color:#E9E7D8;}
  table.truth th{font-weight:500;color:var(--sage-mute);padding:.25rem .6rem;text-align:center;font-size:.7rem;letter-spacing:.08em;text-transform:uppercase;}
  table.truth td{padding:.36rem .6rem;text-align:center;border-top:1px solid var(--night-line);}
  table.truth tbody tr{cursor:pointer;outline:none;}
  table.truth tbody tr:hover td{background:rgba(123,140,106,.12);}
  table.truth tbody tr:focus-visible td{background:rgba(198,162,74,.18);}
  table.truth tr.sel td{background:rgba(198,162,74,.14);}
  table.truth .on{color:var(--gold);}
  table.truth .off{color:#6F7764;}
  table.truth .ok{color:var(--sage-pale);}
  table.truth .bad{color:var(--terra-pale);}
  @media (max-width:640px){ .net-wrap{flex-direction:column;align-items:stretch;} table.truth{align-self:center;}
    .net .lbl{font-size:15px;} .net .syn text{font-size:14px;} .net .th text{font-size:13px;} .net .sum{font-size:17px;} .net .pin{font-size:14px;} }
  /* Proužek: binding-site steppers and the prediction quiz */
  .sites{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem 1.4rem;padding:.85rem 1.1rem;border-top:1px solid var(--night-line);}
  .sites[hidden],.quiz[hidden]{display:none;}
  .site{display:flex;align-items:center;gap:.45rem;font-family:var(--sans);color:#E9E7D8;}
  .site .nm{font-weight:600;font-size:.92rem;min-width:5.8rem;}
  .site .role{font-family:var(--mono);font-size:.64rem;letter-spacing:.06em;text-transform:uppercase;padding:.1rem .45rem;border-radius:999px;margin-right:auto;}
  .site .role.on{color:var(--sage-pale);border:1px solid rgba(155,176,126,.5);}
  .site .role.off{color:var(--terra-pale);border:1px solid rgba(188,106,70,.5);}
  .site .cnt{font-family:var(--mono);font-size:1rem;font-weight:500;color:var(--gold);min-width:1.2em;text-align:center;}
  .site.zero .cnt{color:#6F7764;}
  figure.game .ctrl.st{padding:.38rem .72rem;font-size:1rem;line-height:1;}
  .quiz{padding:.85rem 1.1rem;border-top:1px solid var(--night-line);font-family:var(--sans);color:#E9E7D8;}
  .quiz .q{margin:0 0 .75rem;font-size:.98rem;line-height:1.5;}
  .quiz .q b{color:var(--gold);font-weight:600;}
  .opts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;}
  figure.game .opts .opt{display:flex;flex-direction:column;align-items:center;gap:.45rem;text-transform:none;letter-spacing:0;font-size:.88rem;padding:.65rem .5rem;}
  .opts .opt svg{max-width:100%;height:auto;}
  .opts .opt:disabled{opacity:.6;}
  .opts .opt.right{border-color:var(--sage);background:rgba(155,176,126,.2);color:#fff;opacity:1;}
  .opts .opt.wrong{border-color:var(--terra);background:rgba(188,106,70,.2);opacity:1;}
  .quiz .game-feedback{border-top:0;padding:.75rem 0 .2rem;min-height:0;}
  .quiz-next{display:flex;justify-content:flex-end;}
  @media (max-width:560px){ .sites{grid-template-columns:1fr;} }
  /* Horečka: effector selector */
  .effectors{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.4rem;padding:.8rem 1.1rem;border-top:1px solid var(--night-line);}
  figure.game .ctrl.eff{padding:.65rem .25rem;font-size:.78rem;line-height:1.25;letter-spacing:0;text-transform:none;hyphens:auto;overflow-wrap:anywhere;}
  @media (max-width:420px){ figure.game .ctrl.eff{font-size:.72rem;} }
  .ctrl.eff kbd{display:block;font-family:var(--mono);font-size:.62rem;opacity:.55;margin-bottom:.15rem;font-weight:500;}
  .ctrl.eff.cool1,.ctrl.eff.cool2{border-color:rgba(127,160,192,.55);color:#BFD2E3;}
  .ctrl.eff.warm1,.ctrl.eff.warm2{border-color:rgba(227,154,103,.55);color:#F0C3A3;}
  .ctrl.eff.cool1.is-on,.ctrl.eff.cool2.is-on{background:#7FA0C0;border-color:#7FA0C0;color:var(--night);}
  .ctrl.eff.warm1.is-on,.ctrl.eff.warm2.is-on{background:#E39A67;border-color:#E39A67;color:var(--night);}
  /* Schodiště: legend of what a step pays */
  .rules{display:flex;flex-wrap:wrap;gap:.4rem 1.1rem;padding:.6rem 1.1rem;border-top:1px solid var(--night-line);font-family:var(--sans);font-size:.84rem;color:#D9DCCB;}
  .rules span{display:inline-flex;align-items:center;gap:.45rem;}
  .rules i{display:inline-block;width:14px;height:14px;border-radius:50%;flex:0 0 auto;}
  .rules i.coin{background:var(--gold);}
  .rules i.nadh{background:#9BB07E;border-radius:4px;width:22px;height:12px;}
  .rules i.heat{background:#E39A67;width:9px;height:13px;border-radius:50% 50% 45% 45% / 65% 65% 35% 35%;}
  /* Slovo po slovu: gene, mutation picker and the word trail */
  .gene{display:flex;flex-wrap:wrap;gap:.45rem;justify-content:center;padding:1.1rem 1.1rem .5rem;}
  .codon{display:flex;flex-direction:column;align-items:center;gap:.2rem;min-width:4.4rem;padding:.5rem .45rem .45rem;
    border:1px solid var(--night-line);border-radius:8px;background:#2A3125;color:#E9E7D8;font:inherit;cursor:pointer;transition:border-color .15s ease, box-shadow .15s ease;}
  button.codon:hover{border-color:var(--sage);}
  .codon:focus-visible{outline:2px solid var(--gold);outline-offset:2px;}
  .codon .nt{font-family:var(--mono);font-size:1rem;letter-spacing:.14em;}
  .codon .nt b,.mut .nt b{color:var(--terra-pale);font-weight:600;}
  .codon .aa{font-family:var(--serif);font-size:1.45rem;font-weight:700;color:var(--gold);line-height:1.1;}
  .codon .nm{font-family:var(--sans);font-size:.62rem;color:var(--sage-mute);max-width:5.2rem;text-align:center;line-height:1.2;}
  .codon.fixed{cursor:default;opacity:.6;}
  .codon.sel{border-color:var(--gold);box-shadow:0 0 0 2px rgba(198,162,74,.35);}
  .codon.stop .aa,.codon .stopmark{color:var(--terra-pale);}
  .trail{font-family:var(--serif);font-size:1.15rem;text-align:center;color:#C7D0B6;margin:.2rem 1.1rem .9rem;letter-spacing:.06em;}
  .trail .m{font-size:.85rem;color:var(--sage-mute);}
  .trail .now{color:#F4F1E7;font-weight:700;}
  .trail .tgt{font-family:var(--sans);font-size:.78rem;letter-spacing:.02em;color:var(--gold);margin-left:.5rem;white-space:nowrap;}
  .picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.45rem;padding:.8rem 1.1rem 1rem;border-top:1px solid var(--night-line);}
  .picker .pick-head,.picker .pick-hint{grid-column:1/-1;margin:0 0 .2rem;font-family:var(--sans);font-size:.88rem;color:#D9DCCB;}
  .picker .pick-head b{font-family:var(--mono);color:var(--gold);font-weight:500;}
  .pcol{display:flex;flex-direction:column;gap:.4rem;min-width:0;}
  .pcol .plab{font-family:var(--mono);font-size:.64rem;letter-spacing:.08em;text-transform:uppercase;color:var(--sage-mute);}
  figure.game .ctrl.mut{display:flex;flex-direction:column;align-items:flex-start;gap:.15rem;padding:.5rem .55rem;text-transform:none;letter-spacing:0;text-align:left;}
  .mut .nt{font-family:var(--mono);font-size:.9rem;letter-spacing:.1em;color:#E9E7D8;}
  .mut .res{font-family:var(--sans);font-size:.74rem;font-weight:500;}
  .mut.silent .res{color:var(--sage-pale);}
  .mut.word .res{color:var(--gold);}
  .mut.stop .res{color:var(--terra-pale);}
  .mut.bad .res{color:#8A927F;}
  @media (max-width:420px){ .codon{min-width:3.9rem;} .picker{gap:.35rem;padding:.7rem .8rem .9rem;} figure.game .ctrl.mut{padding:.45rem .4rem;} }
  /* Pěstírna protilátek: antigen and the grid of B cells */
  .antigen{display:flex;align-items:center;justify-content:center;gap:.8rem;padding:1rem 1.1rem .3rem;}
  .antigen svg{width:190px;height:auto;}
  .antigen .lab{font-family:var(--mono);font-size:.68rem;letter-spacing:.08em;text-transform:uppercase;color:var(--sage-mute);}
  .cells{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.5rem;padding:.6rem 1.1rem 1rem;}
  .cell{display:flex;flex-direction:column;align-items:center;gap:.3rem;padding:.5rem .35rem .4rem;border:1px solid var(--night-line);
    border-radius:8px;background:#2A3125;cursor:pointer;font:inherit;color:#E9E7D8;transition:border-color .15s ease, background .15s ease;}
  .cell:hover{border-color:var(--sage);}
  .cell:focus-visible{outline:2px solid var(--gold);outline-offset:2px;}
  .cell svg{width:100%;height:auto;max-width:150px;}
  .cell.sel{border-color:var(--gold);box-shadow:0 0 0 2px rgba(198,162,74,.4);background:#343D2D;}
  .cell .fit{font-family:var(--mono);font-size:.7rem;color:#D9DCCB;white-space:nowrap;}
  .cell .dots{color:var(--gold);letter-spacing:.04em;}
  @media (max-width:560px){ .cells{grid-template-columns:repeat(3,minmax(0,1fr));gap:.4rem;padding:.6rem .8rem .9rem;} .cell .dots{display:none;} }
  /* Štětinky: hex sheet */
  .hexwrap{padding:1rem 1.1rem;display:flex;justify-content:center;}
  .hexwrap svg{width:100%;max-width:460px;height:auto;display:block;}
  .hx{cursor:pointer;outline:none;}
  .hx polygon{fill:#2A3125;stroke:#46503C;stroke-width:1.2;transition:fill .15s ease;}
  .hx .mark{stroke:#21271D;stroke-width:2.2;stroke-linecap:round;opacity:0;}
  .hx.calm polygon{fill:rgba(155,176,126,.3);}
  .hx.win polygon{fill:#D9B75A;stroke:#F1D98A;}
  .hx.win .mark,.hx.clash .mark{opacity:1;}
  .hx.clash polygon{fill:#D08A5E;stroke:#E0614A;stroke-width:2.2;}
  .hx.free polygon{stroke:#D9B75A;stroke-dasharray:3 3;animation:hxblink 1.4s ease-in-out infinite;}
  @keyframes hxblink{50%{stroke-opacity:.2;}}
  .hx:hover polygon{stroke:#9BB07E;}
  .hx:focus-visible polygon{stroke:#F1D98A;stroke-width:2.6;}
  /* Kohoutky: arteriole steppers under the organ columns */
  .taps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.4rem;padding:.7rem 1.1rem .9rem;border-top:1px solid var(--night-line);}
  .tap{display:flex;flex-direction:column;align-items:center;gap:.3rem;min-width:0;}
  .tap .rv{font-family:var(--mono);font-size:.86rem;font-weight:500;color:var(--gold);}
  .tap .tn{font-family:var(--sans);font-size:.72rem;color:var(--sage-mute);text-align:center;}
  figure.game .tap .ctrl.st{width:100%;max-width:4.4rem;padding:.42rem 0;}
  @media (max-width:420px){ .taps{padding:.6rem .7rem .8rem;gap:.3rem;} .tap .rv{font-size:.78rem;} }
  /* Zdířka: drug buttons */
  figure.game .ctrl.drug{border-color:var(--dc);color:#F4F1E7;}
  figure.game .ctrl.drug::before{content:"";display:inline-block;width:.6rem;height:.6rem;border-radius:50%;background:var(--dc);margin-right:.45rem;vertical-align:.02rem;}
  figure.game .ctrl.drug:hover{background:rgba(255,255,255,.06);}
  /* Smyčka: lab report and loop switches */
  .lab{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem 1.6rem;padding:.9rem 1.1rem 1rem;border-top:1px solid var(--night-line);}
  @media (max-width:660px){ .lab{grid-template-columns:minmax(0,1fr);} }
  .patient{font-family:var(--sans);color:#E9E7D8;min-width:0;}
  .pt-head{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:#9AA48C;margin:0 0 .3rem;}
  .pt-head b{color:var(--gold);font-weight:600;}
  .pt-note{font-size:.88rem;line-height:1.45;color:#D9DCCB;margin:0 0 .45rem;}
  table.labs{width:100%;border-collapse:collapse;}
  table.labs thead th{font-weight:600;font-size:.66rem;letter-spacing:.08em;text-transform:uppercase;color:#9AA48C;text-align:right;padding:.15rem .25rem .3rem;}
  table.labs tbody th{font-weight:400;text-align:left;font-size:.88rem;color:#D9DCCB;padding:.36rem .25rem;border-top:1px solid var(--night-line);white-space:nowrap;}
  table.labs td{font-family:var(--mono);font-size:.86rem;text-align:right;padding:.36rem .25rem;border-top:1px solid var(--night-line);white-space:nowrap;color:#F4F1E7;}
  table.labs td + td{color:var(--gold);}
  table.labs .up,table.labs .dn{color:var(--terra-pale);font-family:var(--sans);font-weight:700;}
  .pt-norm{font-size:.74rem;color:#9AA48C;margin:.45rem 0 0;}
  .hyp{display:flex;flex-direction:column;gap:.7rem;min-width:0;}
  .switches{display:flex;flex-direction:column;gap:.38rem;}
  .sw{display:flex;align-items:center;justify-content:space-between;gap:.6rem;font-family:var(--sans);font-size:.88rem;color:#D9DCCB;min-height:2.3rem;}
  .sw .sw-l{flex:0 1 auto;}
  figure.game .sw .ctrl{flex:0 0 8.2rem;padding:.45rem .5rem;text-transform:none;letter-spacing:0;font-size:.86rem;}
  figure.game .sw .ctrl.alt{border-color:rgba(227,154,103,.7);color:#F0C3A3;background:rgba(227,154,103,.1);}
  .sw.locked{opacity:.5;}
  .sw.dose input[type=range]{-webkit-appearance:none;appearance:none;flex:1 1 auto;min-width:4rem;height:4px;border-radius:2px;background:var(--night-line);outline:none;cursor:pointer;margin:0 .2rem;}
  .sw.dose input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:18px;height:18px;border-radius:50%;background:var(--gold);border:2px solid var(--night);cursor:pointer;}
  .sw.dose input[type=range]::-moz-range-thumb{width:16px;height:16px;border:none;border-radius:50%;background:var(--gold);cursor:pointer;}
  .sw.dose input[type=range]:focus-visible{outline:2px solid var(--gold);outline-offset:4px;}
  .sw.dose input[type=range]:disabled{cursor:default;}
  .sw.dose output{font-family:var(--mono);font-size:.86rem;color:var(--gold);flex:0 0 3.4rem;text-align:right;}
  .hyp-btns{display:flex;gap:.5rem;justify-content:flex-end;flex-wrap:wrap;}
  figure.game canvas#ygame{border-top:1px solid var(--night-line);}
  /* Plný sklad: brake selectors */
  .wires{display:flex;flex-wrap:wrap;gap:.55rem 1.2rem;padding:.8rem 1.1rem;border-top:1px solid var(--night-line);}
  .wire{display:flex;align-items:center;gap:.55rem;font-family:var(--sans);font-size:.88rem;color:#D9DCCB;}
  .wire select{font-family:var(--sans);font-size:.88rem;color:#F4F1E7;background:var(--night-2);border:1px solid var(--night-line);border-radius:6px;padding:.42rem .55rem;cursor:pointer;min-width:5.6rem;}
  .wire select:focus-visible{outline:2px solid var(--gold);outline-offset:2px;}
  @media (max-width:560px){ .wire{width:100%;justify-content:space-between;} }
  /* intro video on the About page: as wide as a simulation, loads only when played */
  figure.video{max-width:var(--measure-wide);margin:2.2rem auto 2.6rem;padding-inline:1.5rem;}
  figure.video video{display:block;width:100%;height:auto;aspect-ratio:16/9;background:var(--paper-warm);
    border:1px solid var(--line);border-radius:10px;box-shadow:0 18px 40px -28px rgba(38,43,33,.6);}
  figure.video video:focus-visible{outline:2px solid var(--gold);outline-offset:3px;}
  /* until the first play: a quiet pill on the poster instead of the browser's dark control bar */
  .video-frame{position:relative;}
  .video-play{position:absolute;left:4.5%;bottom:7%;display:inline-flex;align-items:center;gap:.5rem;
    font-family:var(--sans);font-weight:600;font-size:.95rem;line-height:1;color:var(--terra-deep);
    background:rgba(251,248,239,.94);border:1.5px solid var(--terra);border-radius:999px;padding:.6rem 1.05rem .6rem .85rem;
    cursor:pointer;box-shadow:0 10px 24px -14px rgba(38,43,33,.55);transition:background .16s ease,color .16s ease;}
  .video-play[hidden]{display:none;}
  .video-play svg{width:.95rem;height:.95rem;flex:none;}
  .video-play .len{font-family:var(--mono);font-weight:500;font-size:.8rem;color:var(--sage-deep);transition:color .16s ease;}
  .video-play:hover{background:var(--terra);color:#fff;}
  .video-play:hover .len{color:#F4F1E7;}
  .video-play:focus-visible{outline:2px solid var(--gold);outline-offset:3px;}
  @media (max-width:560px){ .video-play{font-size:.8rem;gap:.4rem;padding:.42rem .8rem .42rem .65rem;bottom:8%;}
    .video-play svg{width:.8rem;height:.8rem;} .video-play .len{font-size:.7rem;} }

/* ---------- second chapters: a reaction written out on its own line ---------- */
.prose .eqn{font-family:var(--mono);font-size:.86rem;line-height:1.7;text-align:center;color:var(--sage-deep);
  background:var(--sage-mist);border-radius:6px;padding:.7rem .9rem;}
.prose .eqn .side{display:inline-block;white-space:nowrap;}
@media (max-width:480px){ .prose .eqn{font-size:.76rem;padding:.6rem .5rem;} }
.nw{white-space:nowrap;}

  /* ---- Bez dechu: the pyruvate valve ---- */
  .bd-controls{gap:.7rem 1rem;}
  .bd-route{display:flex;align-items:center;gap:.6rem;flex:1 1 300px;min-width:0;}
  .bd-route .bd-end{font-family:var(--sans);font-size:.72rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;
    color:var(--sage-pale);white-space:nowrap;}
  .bd-route .bd-end.l{color:#A9C3DD;}
  .bd-route .bd-end.r{color:var(--terra-pale);text-align:right;}
  .sim-controls .bd-route input[type=range]{flex:1 1 auto;width:auto;min-width:90px;height:6px;border-radius:3px;
    background:linear-gradient(90deg,#7FA0C0,#C7D6AC 50%,#E39A67);}
  .sim-controls .bd-route input[type=range]::-webkit-slider-thumb{width:24px;height:24px;background:#F4F1E7;border:3px solid var(--night);
    box-shadow:0 0 0 2px var(--gold);}
  .sim-controls .bd-route input[type=range]::-moz-range-thumb{width:20px;height:20px;background:#F4F1E7;border:3px solid var(--night);
    box-shadow:0 0 0 2px var(--gold);}
  .sim-controls .bd-route input[type=range]:disabled{opacity:.45;cursor:default;}
  .sim-controls .bd-route.dose input[type=range]{background:linear-gradient(90deg,#46503C,#B07A9A);}
  .bd-route.dose .bd-end.l{color:var(--sage-pale);}
  .bd-route.dose .bd-end.r{color:#D9B3C8;}
  .bd-route .bd-val{font-family:var(--mono);font-size:.78rem;color:var(--gold);min-width:3.2em;text-align:right;}
  .bd-btns{display:flex;gap:.5rem;flex-wrap:wrap;}
  .bd-btns .ctrl[hidden]{display:none;}
  @media (max-width:600px){
    .bd-route{flex-basis:100%;display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:"l v r" "s s s";
      align-items:center;row-gap:.45rem;}
    .bd-route .bd-end.l{grid-area:l;}
    .bd-route .bd-end.r{grid-area:r;}
    .bd-route .bd-val{grid-area:v;text-align:center;}
    .sim-controls .bd-route input[type=range]{grid-area:s;width:100%;}
    .bd-route .bd-end{font-size:.66rem;}
  }
  .bd-nw{white-space:nowrap;}

  /* Filtr: sliders for calcium, ready vesicles, refilling and residual calcium */
  .fl-knobs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem 1.4rem;padding:.85rem 1.1rem .9rem;border-top:1px solid var(--night-line);}
  .fl-knob{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:.25rem .6rem;align-items:center;min-width:0;}
  .fl-knob[hidden]{display:none;}
  .fl-kn{font-family:var(--sans);font-size:.74rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#C7D0B6;}
  .fl-kv{font-family:var(--mono);font-size:.78rem;color:var(--gold);text-align:right;white-space:nowrap;}
  .fl-knob input[type=range]{grid-column:1 / -1;width:100%;margin:0;accent-color:#9BB07E;height:1.6rem;}
  @media (max-width:560px){ .fl-knobs{grid-template-columns:minmax(0,1fr);padding:.7rem .9rem .8rem;gap:.55rem;} }

  /* Kafe: the row of day buttons above the plot */
  .kf-days{display:flex;gap:.35rem;flex-wrap:wrap;padding:.65rem 1.1rem 0;}
  .kf-days[hidden]{display:none;}
  figure.game .kf-days .ctrl{padding:.42rem .6rem;font-size:.74rem;letter-spacing:.03em;min-width:3.2rem;min-height:2.3rem;}
  .kf-days .ctrl.bad{border-color:rgba(227,154,103,.55);color:#F0C3A3;}
  .kf-days .ctrl.is-on{background:var(--sage);color:var(--night);border-color:var(--sage);}
  .kf-days .ctrl.is-on.bad{background:var(--terra);border-color:var(--terra);color:#fff;}
  .kf-days .ctrl.lock{font-style:italic;}

  /* Kostky v mezeře: estimator panel and answer controls */
  .ko-calc{padding:.7rem 1.1rem .75rem;border-top:1px solid var(--night-line);font-family:var(--sans);color:#D9DCCB;font-size:.88rem;line-height:1.45;}
  .ko-calc p{margin:.15rem 0;}
  .ko-hint{color:#9AA48C;font-style:italic;}
  .ko-qline{color:#9AA48C;font-size:.8rem;margin-top:.35rem !important;}
  .ko-row{display:grid;grid-template-columns:minmax(8.5rem,auto) minmax(0,1fr) auto auto;align-items:center;gap:.25rem .8rem;padding:.3rem 0;border-bottom:1px solid rgba(70,80,60,.6);}
  .ko-row:last-of-type{border-bottom:0;}
  .ko-lb{color:#E9E7D8;font-weight:600;}
  .ko-fx{font-family:var(--mono);font-size:.78rem;color:#9AA48C;overflow-wrap:anywhere;}
  .ko-val{font-family:var(--mono);font-size:.86rem;color:var(--gold);font-weight:500;white-space:nowrap;}
  .ko-val.ko-none{white-space:normal;}
  figure.game .ctrl.ko-use{padding:.32rem .6rem;font-size:.7rem;}
  .ko-budget{font-family:var(--mono);font-size:.74rem;color:#9AA48C;margin-left:auto;}
  .ko-answer{gap:.6rem 1rem;}
  .sim-controls .ko-est{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;font-family:var(--sans);font-size:.88rem;color:#D9DCCB;text-transform:none;letter-spacing:0;}
  .ko-el{font-weight:600;color:#E9E7D8;}
  .sim-controls .ko-est input[type=range]{width:min(230px,52vw);height:4px;}
  .sim-controls .ko-est input[type=range]::-webkit-slider-thumb{width:18px;height:18px;background:var(--gold);}
  .sim-controls .ko-est input[type=range]::-moz-range-thumb{width:16px;height:16px;background:var(--gold);}
  .sim-controls .ko-est[hidden],.sim-controls .ko-ask[hidden]{display:none;}
  .ko-est output{font-family:var(--mono);font-size:.9rem;color:var(--gold);min-width:2.6rem;}
  .ko-ask{display:inline-flex;align-items:center;gap:.45rem;flex-wrap:wrap;font-family:var(--sans);font-size:.88rem;color:#D9DCCB;}
  .ko-answer .ctrl.go{margin-left:auto;}
  @media (max-width:560px){
    .ko-row{grid-template-columns:minmax(0,1fr) auto;}
    .ko-row .ko-lb{grid-column:1 / -1;}
    .ko-row .ko-fx{grid-column:1 / 2;}
    .ko-row .ko-none{grid-column:1 / -1;}          /* the no-failure note gets its own line, the formula stays whole */
    .ko-budget{margin-left:0;flex-basis:100%;}
  }
  @media (max-width:560px){ .ko-ask .ko-el{flex-basis:100%;} }

  /* Neznámá látka: vials, experiments, the notebook and the verdict */
  .lt-vials{display:flex;gap:.4rem;flex-wrap:wrap;padding:.65rem 1.1rem 0;}
  .lt-vials[hidden]{display:none;}
  figure.game .lt-vials .ctrl{padding:.45rem .75rem;font-size:.76rem;min-height:2.3rem;}
  .lt-vials .ctrl.solved{border-color:rgba(199,214,172,.6);}
  .lt-lab{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:.8rem 1.4rem;padding:.8rem 1.1rem .9rem;border-top:1px solid var(--night-line);}
  @media (max-width:660px){ .lt-lab{grid-template-columns:minmax(0,1fr);} }
  .lt-exps{display:flex;flex-direction:column;gap:.45rem;align-items:stretch;}
  figure.game .lt-exps .ctrl.lt-exp{text-align:left;padding:.55rem .75rem;border-left:4px solid var(--ec);text-transform:none;letter-spacing:.01em;font-size:.86rem;}
  .lt-conc{display:flex;gap:.35rem;flex-wrap:wrap;margin:-.1rem 0 .15rem .9rem;}
  figure.game .lt-conc .ctrl{padding:.4rem .7rem;font-size:.76rem;text-transform:none;letter-spacing:0;min-height:2.3rem;min-width:3.6rem;}
  .lt-book{min-width:0;font-family:var(--sans);}
  .lt-head{font-family:var(--mono);font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;color:#9AA48C;margin:0 0 .35rem;}
  .lt-notes{margin:0;padding:0 0 0 1.6rem;font-size:.86rem;line-height:1.45;color:#D9DCCB;}
  .lt-notes li{margin:0 0 .4rem;}
  .lt-notes li::marker{font-family:var(--mono);color:#9AA48C;}
  .lt-notes li i{display:inline-block;width:.7rem;height:.7rem;border-radius:50%;background:var(--ec);margin:0 .4rem 0 0;vertical-align:-.05rem;}
  .lt-notes li.empty{list-style:none;margin-left:-1.6rem;color:#9AA48C;font-style:italic;}
  .lt-verdict{padding:.7rem 1.1rem .95rem;border-top:1px solid var(--night-line);font-family:var(--sans);}
  .lt-vlab{margin:0 0 .5rem;font-size:.9rem;color:#D9DCCB;}
  .lt-vlab b{color:var(--gold);font-weight:600;}
  .lt-vbtns{display:flex;gap:.45rem;flex-wrap:wrap;}
  figure.game .lt-vbtns .ctrl{text-transform:none;letter-spacing:.01em;font-size:.86rem;}
  .lt-guess{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;font-size:.9rem;color:#D9DCCB;}
  .lt-guess input[type=range]{-webkit-appearance:none;appearance:none;flex:1 1 9rem;min-width:7rem;height:4px;border-radius:2px;background:var(--night-line);outline:none;cursor:pointer;}
  .lt-guess input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;border-radius:50%;background:var(--gold);border:2px solid var(--night);cursor:pointer;}
  .lt-guess input[type=range]::-moz-range-thumb{width:18px;height:18px;border:none;border-radius:50%;background:var(--gold);cursor:pointer;}
  .lt-guess input[type=range]:focus-visible{outline:2px solid var(--gold);outline-offset:4px;}
  .lt-guess output{font-family:var(--mono);color:var(--gold);min-width:2.4rem;}

  /* Přítoky: bench of sugars, enzyme cards, glycolysis spine */
  /* wide: sugars beside the spine, cards and controls under both; phones: sugars, cards, controls, then the spine,
     so the feedback line and the join button sit right above the cards */
  .pt-board{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);grid-template-areas:"bench spine" "cards cards" "ctrl ctrl";gap:0;border-top:1px solid var(--night-line);}
  .pt-board canvas{grid-area:spine;border-left:1px solid var(--night-line);}
  .pt-board .pt-cards{grid-area:cards;}
  .pt-board .sim-controls{grid-area:ctrl;}
  @media (max-width:640px){
    .pt-board{grid-template-columns:minmax(0,1fr);grid-template-areas:"bench" "cards" "ctrl" "spine";}
    .pt-board canvas{border-left:0;border-top:1px solid var(--night-line);}
  }
  .pt-bench{grid-area:bench;display:flex;flex-direction:column;gap:.6rem;padding:.85rem 1.1rem;font-family:var(--sans);color:#D9DCCB;min-width:0;}
  .pt-where{font-family:var(--mono);font-size:.7rem;letter-spacing:.08em;text-transform:uppercase;color:#9AA48C;}
  .pt-where b{color:var(--gold);font-weight:500;}
  .pt-chips{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;min-height:2.4rem;}
  .pt-chip{font-family:var(--sans);font-size:.88rem;font-weight:600;color:#E9E7D8;background:#2E3628;border:1px solid var(--night-line);border-radius:999px;padding:.42rem .8rem;cursor:pointer;line-height:1.2;transition:all .15s ease;}
  .pt-chip:hover{border-color:var(--sage);}
  .pt-chip.entry{border-color:rgba(217,183,90,.55);}
  .pt-chip.is-on{background:rgba(217,183,90,.2);border-color:var(--gold);color:#F4F1E7;box-shadow:0 0 0 1px var(--gold) inset;}
  .pt-chip:focus-visible{outline:2px solid var(--gold);outline-offset:2px;}
  .pt-cofs{display:inline-flex;flex-wrap:wrap;gap:.35rem;align-items:center;flex-basis:100%;}
  .pt-cofl{font-family:var(--mono);font-size:.66rem;letter-spacing:.06em;text-transform:uppercase;color:#9AA48C;}
  .pt-chip.pt-cof{font-size:.78rem;font-weight:500;color:#BFD2E3;border-color:rgba(127,160,192,.5);padding:.32rem .65rem;}
  .pt-chip.pt-cof.is-on{background:rgba(127,160,192,.2);border-color:#7FA0C0;box-shadow:0 0 0 1px #7FA0C0 inset;}
  .pt-trail{font-size:.86rem;line-height:1.45;min-height:3.2rem;}
  .pt-trail p{margin:.15rem 0;}
  .pt-path{color:#D9DCCB;overflow-wrap:anywhere;}
  .pt-path b{color:#F4F1E7;font-weight:600;}
  .pt-path i{color:#9AA48C;}
  .pt-hint{color:#9AA48C;font-size:.8rem;}
  .pt-msg{color:#D9DCCB;}
  .pt-msg.ok{color:var(--sage-pale);}
  .pt-msg.bad{color:var(--terra-pale);}
  .pt-patient{margin:0;font-size:.95rem;line-height:1.5;color:#E9E7D8;}
  .pt-patient b{color:var(--terra-pale);font-weight:600;}
  .pt-act{display:flex;justify-content:flex-start;}
  .pt-act .ctrl[hidden]{display:none;}
  .pt-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(10.5rem,1fr));gap:.45rem;padding:.8rem 1.1rem;border-top:1px solid var(--night-line);background:var(--night-2);}
  @media (max-width:420px){ .pt-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:.4rem;padding:.7rem .8rem;} }
  figure.game .ctrl.pt-card{display:flex;flex-direction:column;align-items:flex-start;gap:.22rem;text-align:left;text-transform:none;letter-spacing:0;padding:.55rem .6rem;min-height:4.4rem;}
  .pt-cn{font-family:var(--sans);font-weight:700;font-size:.86rem;color:#F4F1E7;hyphens:auto;overflow-wrap:anywhere;}
  .pt-rx{font-family:var(--sans);font-weight:400;font-size:.74rem;line-height:1.3;color:#B9BFAF;hyphens:auto;overflow-wrap:anywhere;}
  .pt-meta{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:auto;}
  .pt-atp{font-family:var(--mono);font-size:.68rem;color:var(--terra-pale);border:1px solid rgba(188,106,70,.5);border-radius:4px;padding:0 .3rem;}
  .pt-tag{font-family:var(--mono);font-size:.66rem;color:#9AA48C;}
  .sim-controls .ctrl[hidden]{display:none;}

  /* ---- Sabotáž: measuring and accusing ---- */
  .sb-panel{padding:.75rem 1.1rem .85rem;border-top:1px solid var(--night-line);background:var(--night-2);display:grid;gap:.6rem;}
  .sb-row{display:grid;grid-template-columns:4.2rem 1fr;gap:.6rem;align-items:start;}
  .sb-lbl{font-family:var(--mono);font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;color:var(--sage-mute);padding-top:.55rem;}
  .sb-chips{display:flex;flex-wrap:wrap;gap:.35rem;}
  figure.game .ctrl.sb-chip{font-size:.7rem;padding:.42rem .55rem;letter-spacing:.02em;text-transform:none;font-weight:600;line-height:1.2;}
  .ctrl.sb-chip .sb-n{font-family:var(--mono);font-weight:500;color:var(--sage-mute);margin-right:.25rem;}
  .ctrl.sb-chip.sb-extra{border-style:dashed;}
  .ctrl.sb-chip.up{border-color:rgba(227,154,103,.75);color:#F1C8A8;}
  .ctrl.sb-chip.down{border-color:rgba(127,160,192,.75);color:#C9DBEC;}
  .ctrl.sb-chip.same{border-color:rgba(155,176,126,.75);}
  .ctrl.sb-chip .sb-arrow{margin-left:.3rem;font-family:var(--mono);}
  .ctrl.sb-chip.is-on{background:var(--gold);border-color:var(--gold);color:var(--night);}
  .ctrl.sb-chip.is-on .sb-n{color:var(--night);}
  .ctrl.sb-chip.sb-special{border-color:rgba(176,122,154,.7);color:#E2C6D6;}
  .ctrl.sb-chip.sb-special.is-on{background:var(--plum, #B07A9A);border-color:#B07A9A;color:#fff;}
  .sb-go{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:flex-end;}
  @media (max-width:600px){
    .sb-row{grid-template-columns:1fr;gap:.3rem;}
    .sb-lbl{padding-top:0;}
    .sb-go{justify-content:flex-start;}
  }
  .sb-nw{white-space:nowrap;}

  /* Pavlovův zvonek: the plan grid (inputs × 8 rounds), tempo and bath switches */
  .zv-seq{display:flex;flex-direction:column;gap:.45rem;padding:.8rem 1.1rem .9rem;border-top:1px solid var(--night-line);}
  .zv-row{display:grid;grid-template-columns:10.5rem minmax(0,1fr);gap:.4rem .7rem;align-items:center;}
  .zv-name{display:grid;grid-template-columns:.7rem minmax(0,1fr);grid-template-rows:auto auto;column-gap:.45rem;align-items:center;min-width:0;}
  .zv-name i{grid-row:1 / span 2;width:.7rem;height:.7rem;border-radius:50%;background:var(--c);}
  .zv-name .nm{font-family:var(--sans);font-size:.84rem;font-weight:600;color:#E9E7D8;line-height:1.2;}
  .zv-w{display:flex;align-items:center;gap:.4rem;min-width:0;}
  .zv-bar{position:relative;flex:1 1 auto;height:.36rem;border-radius:3px;background:#3A4433;min-width:2.5rem;max-width:5rem;}
  .zv-bar b{position:absolute;left:0;top:0;bottom:0;border-radius:3px;background:var(--c);}
  .zv-bar em{position:absolute;left:50%;top:-.18rem;bottom:-.18rem;width:2px;background:#E39A67;}
  .zv-w .v{font-family:var(--mono);font-size:.7rem;color:#9AA48C;white-space:nowrap;}
  .zv-bar.over + .v{color:#C7D6AC;}
  .zv-cells{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:.3rem;}
  .zv-cell{height:2.35rem;min-width:0;border-radius:6px;border:1px solid var(--night-line);background:rgba(255,255,255,.02);
    color:#6F7A64;font-family:var(--mono);font-size:.62rem;cursor:pointer;padding:0;transition:background .12s ease,border-color .12s ease;}
  .zv-cell:hover{border-color:var(--c);}
  .zv-cell.is-on{background:var(--c);border-color:var(--c);color:#21271D;}
  .zv-cell.now{box-shadow:0 0 0 2px #F1D98A;}
  .zv-cell:disabled{cursor:default;}
  .zv-cell:focus-visible{outline:2px solid var(--gold);outline-offset:1px;}
  .zv-ctl .zv-grp{display:inline-flex;gap:.4rem;align-items:center;flex-wrap:wrap;}
  .zv-ctl .zv-grp[hidden]{display:none;}
  .zv-ctl .zv-grp .lbl{margin-right:.15rem;}
  @media (max-width:560px){
    .zv-seq{padding:.7rem .8rem .8rem;}
    .zv-row{grid-template-columns:minmax(0,1fr);gap:.3rem;}
    .zv-name{grid-template-columns:.7rem auto minmax(0,1fr);grid-template-rows:auto;}
    .zv-name i{grid-row:auto;}
    .zv-w{justify-content:flex-end;}
    .zv-cell{height:2.3rem;}
    .zv-ctl .zv-grp{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);width:100%;gap:.4rem;}
    .zv-ctl .zv-grp .lbl{grid-column:1 / -1;margin:0;}
    .zv-ctl .zv-grp .ctrl{white-space:normal;padding:.55rem .4rem;}
    .zv-ctl #zv-clear,.zv-ctl #zv-go{flex:1 1 0;}
  }
