  /* ---------- the daily Chip round (chip-round.md, public/js/chipround.js): its page in the lobby pages' look ----------
     An .lpage (the round back button, the gold marker title, "Back in 6h" on the right once the run is over); the pot's card and the
     result card are the hub's cream cards; the ladder's pills on the left, the four dice in the middle (cream, the game's ink outline
     and edge, a "?" in Lilita One), turning over on the Y axis as the album's pack cards do. Loaded after album.css; every class here is
     its own (cr…), the chips are table.css's .chip markup. */
  #chipRoundPage .pagehead .row { align-items: center; }
  #chipRoundPage .ptitle { transform: rotate(-3deg); flex: 0 1 auto; }
  .chrheadline { max-width: 440px; margin: -2px auto 0; display: flex; justify-content: flex-end; } .chrheadline[hidden] { display: none; } /* ("Back in 6h" on a line of its own under the title, right-aligned with the row) */
  .chrleft { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; background: #0B3D22; color: #CFEBD9; border: 3px solid var(--ink2); box-shadow: 0 3px 0 var(--ink2); font: 400 15px/1 var(--lilita); white-space: nowrap; }
  #chipRoundPage .chrbody { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .chrbody { display: flex; flex-direction: column; gap: 14px; }
  .chrbody > * { flex-shrink: 0; }
  /* the cards: the pot ("In the pot"), the result in its place, a note on the felt */
  .chrpot, .chrcard { background: #FFF4D6; color: var(--ink2); border: 4px solid var(--ink2); border-radius: 18px; box-shadow: 0 5px 0 var(--ink2); padding: 10px 14px 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
  .chrlbl { font: 800 11px/1.2 var(--nunito); text-transform: uppercase; letter-spacing: .06em; color: #6B5A3A; }
  .chrsub { font: 800 13px/1.35 var(--nunito); color: #5a4a1a; }
  .chrh { font: 400 26px/1.1 var(--lilita); color: var(--ink2); }
  .chrnote { font: 800 13px/1.35 var(--nunito); color: #D6F2E0; }
  .chrpis { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-height: 40px; }
  .chrpi { display: inline-flex; align-items: center; gap: 6px; } .chrpi > b { font: 400 20px/1 var(--lilita); }
  .chrendh { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .chrend.won { background: #FFE88A; } .chrend.lost { background: #FFD6CC; }
  .chrend.lost .chrpis { opacity: .6; filter: grayscale(.7); } .chrend.lost .chrpi > b { text-decoration: line-through; text-decoration-thickness: 3px; }
  .chrbackt { font: 800 13px/1.2 var(--nunito); color: #6B5A3A; }
  .chrcard .chrbtn { margin-top: 6px; }
  /* the art: a stack of three chips, the pack (the album's blue back tied with a gold ribbon), the album chip with its stars, the gold album chip a die held unpicked */
  .chrstack { position: relative; width: 30px; height: 34px; flex: 0 0 auto; }
  .chrstack .chip { position: absolute; left: 0; width: 30px; height: 30px; font-size: 0; } .chrstack .chip:nth-child(1) { top: 6px; } .chrstack .chip:nth-child(2) { top: 3px; } .chrstack .chip:nth-child(3) { top: 0; }
  .chrpack { position: relative; display: inline-block; width: 30px; height: 36px; flex: 0 0 auto; } /* (two of the album's blue card backs, fanned: a pack of cards) */
  .chrpack::before, .chrpack::after { content: ""; position: absolute; left: 3px; top: 1px; width: 20px; height: 28px; border: 3px solid var(--ink2); border-radius: 5px; background: repeating-linear-gradient(45deg, #1F3A8A 0 4px, #2B4FB3 4px 8px); box-shadow: inset 0 0 0 2px #FFD23F, 0 2px 0 var(--ink2); }
  .chrpack::before { transform: rotate(-12deg) translateX(-2px); } .chrpack::after { transform: rotate(8deg) translateX(4px); }
  .chrach { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; } .chrach .chip { width: 34px; height: 34px; font-size: .6rem; }
  .chrpkw { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; } .chrpst { letter-spacing: 0; } /* (a pack with its rating under it: ★, ★★ or ★★★, packs-and-chip-round.md §2) */
  .chrdie .chrf .chrpst { font-size: 12cqw; margin-top: -2cqw; }
  .chip.chrgold { --chip: #E6B84C; --ring: #FFF2A8; --insert: #FFF4D6; color: #7a4a00; text-shadow: none; font: 400 15px/1 var(--lilita); }
  .chrstars { display: block; font: 400 10px/1 var(--lilita); color: #E0A21A; white-space: nowrap; } .chrstars i { font-style: normal; color: rgba(27,18,6,.22); }
  /* the ladder on the left (15 at the top, 1 at the bottom) beside the dice; the two fill what the screen has left under the pot (a tall phone
     gets tall pills and big dice, a short one the smallest sizes): --lad the ladder's width, --die a die's side, from the column's width and
     the screen's height (the 520 px is everything else on the page with room to spare), 64 to 136 px */
  .chrmain { flex-grow: 1; display: grid; grid-template-columns: var(--lad) minmax(0, 1fr); gap: 12px; align-items: stretch; --lad: clamp(74px, 19vw, 88px); --die: clamp(64px, min((min(100vw, 440px) - 58px - var(--lad)) / 2, (var(--app-h, 100dvh) - 520px) / 2), 136px); } /* (the 520 px: the head, the pot with Grab and go under it, the level's line and the gaps; the row of buttons under the dice is gone while the run plays) */
  .chrladder { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: calc(15 * 20px + 14 * 4px); container-type: size; } /* (the pills read its height: cqh) */
  .chrpill { position: relative; flex: 1 1 0; min-height: 20px; max-height: 50px; display: flex; align-items: center; gap: 3px; padding: 0 5px 0 7px; border: 3px solid var(--ink2); border-radius: 999px; background: #0B3D22; color: #CFEBD9; box-shadow: 0 2px 0 var(--ink2); }
  .chrpill b { font: 400 clamp(14px, 2.8cqh, 18px)/1 var(--lilita); min-width: 15px; }
  .chrpill .chrsafe { font: 900 clamp(8px, 1.3cqh, 10px)/1 var(--nunito); letter-spacing: .03em; color: #7ED957; }
  .chrpill .chrcico { margin-left: auto; width: clamp(13px, 2.3cqh, 18px); height: clamp(13px, 2.3cqh, 18px); flex: 0 0 auto; border-radius: 50%; border: 2px solid var(--ink2); background: radial-gradient(circle, #FFF2A8 0 28%, #E6B84C 32%); }
  .chrpill.done { background: #7ED957; color: var(--ink2); } .chrpill.done .chrsafe { color: #0B5A2A; }
  .chrpill.cur { background: #FFD23F; color: var(--ink2); transform: translateX(4px); } .chrpill.cur .chrsafe { color: #0B5A2A; }
  .chrpill.lost { background: #E8343B; color: #fff; } .chrpill.lost .chrsafe { color: #FFE0DC; }
  /* the play: the level's line, the four dice two by two, what you found, the buttons */
  .chrplay { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
  .chrstage { margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: 10px; } /* (the level's line, the dice and what you found, centred in the column's free room; the buttons under it go to the bottom) */
  .chrlvl { text-align: center; } .chrlvl b { display: block; font: 400 clamp(24px, calc(var(--app-h, 100dvh) * .034), 34px)/1.05 var(--lilita); color: #fff; text-shadow: 0 2px 0 var(--ink2); } .chrlvl small { display: block; margin-top: 3px; font: 800 13px/1.3 var(--nunito); color: #D6F2E0; }
  .chrdice { display: grid; grid-template-columns: repeat(2, var(--die)); gap: 14px; perspective: 700px; }
  .chrdie { position: relative; width: var(--die); height: var(--die); container-type: size; padding: 0; background: none; border: 0; box-shadow: none; font-weight: 400; transition: none; }
  .chrdie:hover:not(:disabled) { filter: none; } .chrdie:disabled { opacity: 1; cursor: default; }
  .chrdie .chrin { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .56s cubic-bezier(.2, .8, .2, 1); }
  .chrdie.flipped .chrin { transform: rotateY(180deg); } .chrdie.still .chrin { transition: none; }
  .chrdie .chrb, .chrdie .chrf { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #FFF4D6; color: var(--ink2); border: 4px solid var(--ink2); border-radius: 22cqw; box-shadow: 0 5px 0 var(--ink2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqw; overflow: hidden; }
  .chrdie .chrb .q { font: 400 55cqw/1 var(--lilita); color: var(--ink2); } /* (everything on a die is in cqw, a hundredth of its side, so it grows with the die) */
  .chrdie:active:not(:disabled) .chrb { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink2); }
  .chrdie:focus-visible { outline: none; } .chrdie:focus-visible .chrb, .chrdie:focus-visible .chrf { outline: 3px solid #fff; outline-offset: 3px; }
  .chrdie .chrf { transform: rotateY(180deg); } .chrdie .chrf > b { font: 400 18cqw/1 var(--lilita); white-space: nowrap; }
  .chrdie .chrf .chrstack { width: 42cqw; height: 47cqw; } .chrdie .chrf .chrstack .chip { width: 42cqw; height: 42cqw; } .chrdie .chrf .chrstack .chip:nth-child(1) { top: 8cqw; } .chrdie .chrf .chrstack .chip:nth-child(2) { top: 4cqw; }
  .chrdie .chrf .chrpack { width: 42cqw; height: 50cqw; } .chrdie .chrf .chrpack::before, .chrdie .chrf .chrpack::after { left: 4cqw; top: 1cqw; width: 28cqw; height: 39cqw; }
  .chrdie .chrf .chrach .chip { width: 42cqw; height: 42cqw; font-size: 12cqw; } .chrdie .chrf .chrstars { font-size: 14cqw; } .chrdie .chrf.achip { gap: 1cqw; } .chrdie .chrf.achip > b { font-size: 15cqw; }
  .chrdie .chrf.shut { background: #E8343B; color: #fff; } .chrdie .chrf .chrx { font: 400 42cqw/1 var(--lilita); color: #fff; text-shadow: 0 2px 0 var(--ink2); } .chrdie .chrf.shut > b { font-size: 14cqw; letter-spacing: .04em; }
  .chrdie.dim .chrf { opacity: .5; filter: saturate(.5); }
  .chrdie.picked .chrf { box-shadow: 0 5px 0 var(--ink2), 0 0 0 3px #FFD23F; }
  .chrdie.flash .chrf { animation: chrflash .9s ease-out .3s; }
  @keyframes chrflash { 0% { box-shadow: 0 5px 0 var(--ink2), 0 0 0 3px #FFD23F; } 35% { box-shadow: 0 5px 0 var(--ink2), 0 0 0 6px #FFF2A8, 0 0 30px 12px #FFD23F; } 100% { box-shadow: 0 5px 0 var(--ink2), 0 0 0 3px #FFD23F; } }
  .chrpot .chrgrab { align-self: stretch; margin-top: 4px; } .chrbtn:disabled { opacity: .55; cursor: default; } /* (Grab and go under the pot: greyed through the safe levels, gold with the pot on it from after level 5) */
  #chrGrabModal .chrsum { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; } #chrGrabModal .chrsum .chrsub { color: #5a4a1a; } /* (the confirm's cream card: the pot's items as the page draws them) */
  .chracts { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 2px; } .chracts:empty { display: none; }
  .chrnotnow { align-self: center; background: none; border: 0; box-shadow: none; padding: 10px 16px; min-height: 44px; font: 800 16px/1 var(--nunito); color: rgba(255,244,214,.7); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; transition: none; } .chrnotnow:hover:not(:disabled) { filter: none; color: #FFF4D6; } .chrnotnow:active:not(:disabled) { transform: none; } /* (before the first pick: a quiet way out, packs-and-chip-round.md §5; no back button on the page) */
  #chrUnfinishedModal .chrunft { font: 400 26px/1.15 var(--lilita); color: #fff; text-shadow: 0 3px 0 var(--ink2); transform: none; } #chrUnfinishedModal .chrunfl { font: 800 16px/1.4 var(--nunito); color: #D6F2E0; } /* (the unfinished sheet: Lilita title, the level and the pot's short form, Finish now alone: no ×, no close on the backdrop or Escape) */
  .chrbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 100%; min-height: clamp(52px, calc(var(--app-h, 100dvh) * .066), 66px); padding: 6px 12px; border-radius: 16px; border: 4px solid var(--ink2); box-shadow: 0 5px 0 var(--ink2); color: var(--ink2); font-weight: 400; transition: none; }
  .chrbtn b { font: 400 21px/1 var(--lilita); } .chrbtn small { font: 800 12px/1.2 var(--nunito); color: #3b2f10; }
  .chrbtn.gold { background: #FFD23F; } .chrbtn.green { background: #7ED957; }
  .chrbtn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink2); } .chrbtn:hover:not(:disabled) { filter: none; } .chrbtn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
  /* a short phone: the gaps a little smaller, so the page fits (the dice and the pills are already at their smallest) */
  @media (max-height: 700px) { .chrladder { gap: 3px; min-height: calc(15 * 20px + 14 * 3px); } .chrbody { gap: 12px; } .chrpot { padding: 8px 12px 10px; gap: 4px; } .chrdice { gap: 12px; } }
  /* Reduce motion: no turning over, the faces appear */
  body.rm .chrdie .chrin { transition: none; } body.rm .chrdie.flipped:not(.still) .chrf, body.rm .chrdie.flash .chrf { animation: rmfade .2s ease-out; } body.rm .chrpill.cur { transform: none; }
