  /* ---------- the Path of Odds: the map, the level sheet, the coach ----------
     The map and the level sheet follow the lobby's cartoon recipe (`path-of-odds-style.md`): 4 px ink outlines with a chunky bottom
     edge, Permanent Marker headings, Lilita One titles, Nunito for small text, inline-SVG icons. The result pop-up and the coach keep
     the table's look. */
  .energy { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: #ffd166; white-space: nowrap; font-size: .95rem; } .energy small { color: var(--muted); font-weight: 500; font-size: .74rem; } /* (the lobby's solo tab hint) */
  #pathPage { background: #0D5A31; }
  #pathPage .pagehead { background: #0B3D22; border-bottom: 4px solid var(--ink2); padding: calc(10px + env(safe-area-inset-top)) 16px 12px; }
  #pathPage .pagehead .row { min-height: 56px; }
  #pathPage .pagehead .back { background: #5B6B7A; color: #fff; } #pathPage .pagehead .back svg { width: 26px; height: 26px; display: block; }
  #pathPage .pagehead .ptitle { font-size: clamp(30px, 9vw, 40px); transform: rotate(-3deg); }
  .prow2 { display: flex; gap: 10px; max-width: 440px; margin: 10px auto 0; }
  .ppill { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; background: #06281A; border: 3px solid var(--ink2); border-radius: 999px; color: #fff; font: 18px/1 var(--lilita); white-space: nowrap; }
  .ppill svg { width: 20px; height: 20px; flex: 0 0 auto; }
  .ppill.pstars { flex: 1 1 auto; min-width: 0; } .ppill.pstars b { font-weight: 400; }
  .ppill.pstars .bar { flex: 1 1 auto; min-width: 30px; height: 10px; border-radius: 999px; background: #0D5A31; border: 2px solid var(--ink2); overflow: hidden; } .ppill.pstars .bar i { display: block; height: 100%; background: #FFD23F; border-radius: 999px; min-width: 4px; }
  .ppill.pstars small { font: 14px/1 var(--lilita); color: #CFE8D6; }
  .ppill.penergy { flex: 0 0 auto; } .ppill.penergy b { font-weight: 400; } .ppill.penergy small { font: 12px/1 var(--lilita); color: #CFE8D6; }
  .pathauto { display: flex; justify-content: center; max-width: 440px; margin: 10px auto 0; } /* the admin's Autopilot pill (the eight-item session): the rig's purple, lit while on */
  .ppill.pauto { cursor: pointer; background: #2E1F4A; color: #D9B8FF; box-shadow: 0 3px 0 var(--ink2); font-size: 16px; transition: none; } .ppill.pauto.on { background: #8e44ad; color: #fff; } .ppill.pauto:hover { filter: none; } .ppill.pauto:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink2); }
  #pathBox .pathautostop { margin-left: 4px; padding: 0 10px; min-height: 24px; background: #8e44ad; color: #fff; border: 2px solid var(--ink2); border-radius: 999px; box-shadow: 0 2px 0 var(--ink2); font: 14px/1 var(--lilita); font-weight: 400; vertical-align: middle; transition: none; }
  #resultModal .lucky.autoline { background: #2E1F4A; color: #D9B8FF; } /* (the result sheet's Autoplay line, in the pill's purple) */
  /* the Path's Autoplay sheet (the autoplay-path session): the ☰ menu's bottom sheet; Play for as two flat tabs, the picks as option tiles, the dice speed in the speed switch's flat colours (1x blue, 2x gold, insta red, insta round purple), never a gradient or a glow */
  #pathAutoModal .patabs { display: flex; width: 100%; background: #0B1A14; border: 3px solid var(--ink2); border-radius: 999px; overflow: hidden; }
  #pathAutoModal .patabs .seg { flex: 1 1 0; min-width: 0; min-height: 46px; padding: 0 8px; background: #0B1A14; color: rgba(255,255,255,.6); border: 0; border-radius: 0; box-shadow: none; font: 20px/1 var(--lilita); font-weight: 400; transition: none; }
  #pathAutoModal .patabs .seg + .seg { border-left: 3px solid var(--ink2); }
  #pathAutoModal .patabs .seg.on { background: #FFD23F; color: var(--ink2); }
  #pathAutoModal .patabs .seg:hover, #pathAutoModal .patabs .seg:active { filter: none; transform: none; }
  #pathAutoModal .patabs .seg:disabled { opacity: .45; }
  #pathAutoModal .paopts { margin-top: 12px; gap: 8px; }
  #pathAutoModal .paopts > button { min-height: 52px; padding: 4px; font-size: 18px; line-height: 1.05; }
  #pathAutoModal .paline { color: #FFD23F; } #pathAutoModal .paline:empty { display: none; }
  #pathAutoModal .paspeed { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  #pathAutoModal .paspeed button { min-width: 0; min-height: 50px; padding: 4px; background: #0B1A14; color: rgba(255,255,255,.6); border: 3px solid var(--ink2); border-radius: 14px; box-shadow: 0 3px 0 var(--ink2); font: 18px/1.05 var(--lilita); font-weight: 400; transition: none; }
  #pathAutoModal .paspeed button small { display: block; font: 12px/1 var(--lilita); }
  #pathAutoModal .paspeed button:hover { filter: none; } #pathAutoModal .paspeed button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink2); }
  #pathAutoModal .paspeed button.lockd { opacity: .45; }
  #pathAutoModal .paspeed button.on.s1 { background: #5bbcff; color: #06283d; } #pathAutoModal .paspeed button.on.s2 { background: var(--gold); color: #2a1d00; }
  #pathAutoModal .paspeed button.on.s3 { background: var(--red); color: #fff; } #pathAutoModal .paspeed button.on.s4 { background: #B57BFF; color: #fff; }
  @media (max-width: 379px) { #pathAutoModal .paopts > button, #pathAutoModal .paspeed button { font-size: 16px; } } /* (a narrow phone: a long label wraps inside its tile, the row never scrolls sideways) */
  @media (max-height: 700px) { /* (a short phone, 360×640: the whole sheet without scrolling) */
    #pathAutoModal .tshead { min-height: 50px; } #pathAutoModal .grip { margin-bottom: 2px; }
    #pathAutoModal .tsnote { font-size: 14px; line-height: 1.3; } #pathAutoModal .tslbl { margin: 10px 0 6px; }
    #pathAutoModal .patabs .seg { min-height: 40px; font-size: 18px; } #pathAutoModal .paopts { margin-top: 8px; } #pathAutoModal .paopts > button, #pathAutoModal .paspeed button { min-height: 44px; }
    #pathAutoModal .pasum { margin-top: 10px; padding: 8px 12px; font-size: 14px; }
  }
  #pathAutoModal .pasum { margin-top: 14px; font-size: 16px; }
  .pathfree { display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 440px; margin: 10px auto 0; padding: 8px 12px; background: #FF8A3D; color: var(--ink2); border: 3px solid var(--ink2); border-radius: 999px; box-shadow: 0 3px 0 var(--ink2); font: 14px/1.2 var(--lilita); text-align: center; } .pathfree svg { width: 16px; height: 16px; flex: 0 0 auto; }
  .pathbody { padding: 0 !important; max-width: none !important; }
  .pathmap { position: relative; width: 100%; max-width: 440px; margin: 0 auto; overflow: hidden; }
  .biome-grass { background: radial-gradient(ellipse 90% 70% at 50% 58%, #2E9A55 0%, #157140 55%, #0D5A31 100%); }
  .pathmap svg.trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
  .pdeco { position: absolute; width: 30px; height: 30px; pointer-events: none; user-select: none; -webkit-user-select: none; } .pdeco svg { width: 100%; height: 100%; display: block; }
  /* the nodes: a cleared level is green, the next one gold with a glow and a dashed ring, a locked one grey with a lock; a boss is bigger, crowned, named on a purple ribbon; a fire level carries a flame */
  .pnode { position: absolute; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; display: grid; place-items: center; font: 32px/1 var(--lilita); font-weight: 400; color: var(--ink2); background: #7ED957; border: 4px solid var(--ink2); box-shadow: 0 6px 0 var(--ink2), inset 0 5px 0 rgba(255,255,255,.4), inset 0 -8px 0 rgba(0,0,0,.14); cursor: pointer; transition: none; padding: 0; z-index: 1; }
  .pnode:hover:not(:disabled) { filter: none; } .pnode:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 3px 0 var(--ink2), inset 0 5px 0 rgba(255,255,255,.4), inset 0 -8px 0 rgba(0,0,0,.14); }
  .pnode .num { position: relative; z-index: 1; }
  .pnode.current { background: #FFD23F; box-shadow: 0 6px 0 var(--ink2), 0 0 0 6px #FFF2A8, inset 0 5px 0 rgba(255,255,255,.45), inset 0 -8px 0 rgba(0,0,0,.14); z-index: 2; }
  .pnode.current::after { content: ""; position: absolute; inset: -20px; border: 3px dashed rgba(255,242,168,.9); border-radius: 50%; pointer-events: none; animation: pring 14s linear infinite; }
  @keyframes pring { to { transform: rotate(360deg); } }
  .pnode.locked { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: #5B6B7A; color: #C9D2D8; box-shadow: 0 6px 0 var(--ink2), inset 0 5px 0 rgba(255,255,255,.18), inset 0 -8px 0 rgba(0,0,0,.14); }
  .pnode.boss { width: 116px; height: 116px; margin: -58px 0 0 -58px; font-size: 44px; z-index: 2; }
  .pnode .crown { position: absolute; top: -36px; left: 50%; transform: translateX(-50%); width: 60px; height: 42px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); } .pnode .crown svg { width: 100%; height: 100%; display: block; }
  .pnode .flame { position: absolute; top: -10px; right: -10px; width: 34px; height: 34px; border-radius: 50%; background: #FF8A3D; border: 3px solid var(--ink2); display: grid; place-items: center; } .pnode .flame svg { width: 20px; height: 20px; }
  .pnode .lock { position: absolute; top: -6px; right: -6px; width: 28px; height: 28px; border-radius: 50%; background: #1B1206; border: 2px solid #C9D2D8; display: grid; place-items: center; } .pnode .lock svg { width: 15px; height: 15px; }
  .pnode .stars { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); width: 68px; height: 24px; box-sizing: border-box; background: #06281A; border: 3px solid var(--ink2); border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 2px; } .pnode .stars svg { width: 14px; height: 14px; }
  .pnode .lbl { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 12px; font: 18px/1 var(--marker); color: #fff; white-space: nowrap; text-shadow: 2px 2px 0 var(--ink2), -1px -1px 0 var(--ink2), 1px -1px 0 var(--ink2), -1px 1px 0 var(--ink2); }
  .pnode.cleared .lbl { margin-top: 22px; }
  .pnode.edge-l .lbl { left: -24px; transform: none; } .pnode.edge-r .lbl { left: auto; right: -24px; transform: none; } /* (a name under a node at the map's edge would be cut off centred) */
  .pnode.boss .lbl { margin-top: 8px; padding: 7px 14px; background: #B57BFF; border: 4px solid var(--ink2); border-radius: 12px; box-shadow: 0 5px 0 var(--ink2); font-size: 20px; } .pnode.boss.cleared .lbl { margin-top: 18px; }
  /* the YOU pin beside your level: your picture in a white circle with a tag */
  .pnode .you { position: absolute; left: 100%; top: 50%; transform: translate(-4px, -50%); display: flex; flex-direction: column; align-items: center; gap: 0; pointer-events: none; } .pnode .you.l { left: auto; right: 100%; transform: translate(4px, -50%); }
  .pnode .you .avw { font-size: 50px; } .pnode .you .av { background: #FFF4D6; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); border: 3px solid var(--ink2); box-sizing: border-box; }
  .pnode .you .tag { margin-top: -6px; padding: 3px 8px; background: #fff; color: var(--ink2); border: 2px solid var(--ink2); border-radius: 999px; font: 13px/1 var(--lilita); }
  .pjump { position: absolute; right: max(12px, calc(50% - 220px)); bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 4; width: 62px; height: 62px; padding: 0; border-radius: 50%; background: #FFD23F; color: var(--ink2); border: 4px solid var(--ink2); box-shadow: 0 5px 0 var(--ink2); font-family: var(--lilita); font-weight: 400; font-size: 17px; line-height: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; } /* (Kiril: an arrow in a circle with your level on it, when you've scrolled away from it) */
  .pjump .arr { font-size: 20px; line-height: 1; } .pjump:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink2); }
  /* past level 100: the bottom edge of the snow, with the star gate on a cream pill */
  .pteaser { position: absolute; left: 0; right: 0; height: 150px; background: linear-gradient(180deg, #eef6ff 0%, #d6e8f7 35%, rgba(214,232,247,0) 100%); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 22px; }
  .pteaser::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 40px; background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,0)); }
  .pteaser::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: 36px; height: 34px; background: radial-gradient(ellipse 60px 34px at 10% 100%, #ffffff 60%, transparent 62%), radial-gradient(ellipse 80px 40px at 35% 100%, #f4f9ff 60%, transparent 62%), radial-gradient(ellipse 70px 36px at 62% 100%, #ffffff 60%, transparent 62%), radial-gradient(ellipse 90px 42px at 88% 100%, #eef6ff 60%, transparent 62%); opacity: .9; }
  .pteaser .tpill { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 16px; background: #FFF4D6; color: var(--ink2); border: 3px solid var(--ink2); border-radius: 18px; box-shadow: 0 4px 0 var(--ink2); font: 16px/1.1 var(--lilita); text-align: center; }
  .pteaser .tpill span { display: inline-flex; align-items: center; gap: 5px; } .pteaser .tpill small { font: 13px/1.1 var(--lilita); color: #4b5f73; display: inline-flex; align-items: center; gap: 4px; } .pteaser .tpill svg { width: 15px; height: 15px; }
  /* the challenge nodes (account-and-path-tweaks.md): a level node's size and edge, off the trail. D is purple with the reward on its pill, W white with the five stage dots; done, gold with a check and when the next one comes on the pill */
  .pnode.cnode.c-daily { background: #B57BFF; } .pnode.cnode.c-gauntlet { background: #fff; } .pnode.cnode.c-done { background: #FFD23F; } /* (prefixed classes: the quests and lobby files style plain .daily and .done) */
  .pnode.cnode .num { font-size: 40px; } .pnode .ck { position: relative; z-index: 1; width: 48px; height: 48px; } .pnode .ck svg { width: 100%; height: 100%; display: block; }
  .pnode .cpill { position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%); height: 26px; min-width: 68px; padding: 0 10px; box-sizing: border-box; background: #06281A; border: 3px solid var(--ink2); border-radius: 999px; display: flex; align-items: center; justify-content: center; font: 14px/1 var(--lilita); color: #FFD23F; white-space: nowrap; }
  .pnode.cnode.c-done .cpill { color: #fff; }
  .cpill .stg { display: inline-flex; gap: 3px; } .cpill .stg i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #CFE8D6; box-sizing: border-box; } .cpill .stg i.on { background: #FFD23F; border-color: #FFD23F; }
  .pnode.cnode .lbl { margin-top: 24px; }
  .pnode.c-pulse { animation: npulse .45s ease-in-out 3; } @keyframes npulse { 50% { transform: scale(1.14); } }
  /* the left jump button: a checkered flag on white with a small down arrow, when the challenge nodes are off the screen and one isn't done; both buttons pop in */
  .pjump { animation: popin .18s ease-out; } @keyframes popin { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
  .pjump.left { right: auto; left: max(12px, calc(50% - 220px)); background: #fff; gap: 0; } .pjump.left svg { width: 28px; height: 28px; display: block; } .pjump.left .arr { font-size: 16px; margin-top: -3px; }
  /* the level sheet: a bottom sheet over the dimmed map */
  #levelModal { align-items: flex-end; justify-content: center; padding: 0; background: rgba(6,20,12,.62); }
  .lvlsheet { max-width: 440px; width: 100%; max-height: calc(100vh - 24px); max-height: calc(var(--app-h, 100dvh) - 24px); background: #0B3D22; border: 4px solid var(--ink2); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 10px 16px 0; box-shadow: none; color: #fff; font-family: var(--lilita); }
  .lvlsheet .grip { width: 100px; height: 8px; border-radius: 999px; background: #5B6B7A; margin: 0 auto 6px; }
  .lvlsheet .xclose { top: 22px; right: 16px; width: 48px; height: 48px; background: #5B6B7A; color: #fff; border: 4px solid var(--ink2); box-shadow: 0 4px 0 var(--ink2); font: 30px/1 var(--lilita); display: grid; place-items: center; }
  .lvlhead { display: flex; align-items: center; gap: 14px; padding-right: 60px; min-height: 70px; margin-top: 4px; }
  .lvlbadge { position: relative; flex: 0 0 70px; width: 70px; height: 70px; border-radius: 50%; background: #FFD23F; border: 4px solid var(--ink2); box-shadow: 0 5px 0 var(--ink2), inset 0 4px 0 rgba(255,255,255,.4), inset 0 -6px 0 rgba(0,0,0,.14); display: grid; place-items: center; font: 30px/1 var(--lilita); color: var(--ink2); }
  .lvlbadge.cleared { background: #7ED957; } .lvlbadge.locked { background: #5B6B7A; color: #C9D2D8; }
  .lvlbadge.c-daily { background: #B57BFF; } .lvlbadge.c-gauntlet { background: #fff; } .lvlbadge.c-done { background: #FFD23F; } .lvlbadge svg { width: 36px; height: 36px; } .ktag.c-daily { background: #B57BFF; } .ktag.c-gauntlet { background: #fff; }
  .gstages { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; } .gs { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: #fff; border: 2.5px solid var(--ink2); border-radius: 14px; } .gs.done { background: #FFF2A8; } .gs.next { border-color: #7a3bd1; box-shadow: 0 0 0 2px #B57BFF; }
  .gs .gn { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: #FFF4D6; border: 2.5px solid var(--ink2); display: grid; place-items: center; font: 15px/1 var(--lilita); } .gs.done .gn { background: #FFD23F; } .gs .gn svg { width: 18px; height: 18px; }
  .gs .gt { min-width: 0; } .gs .gt b { display: block; font: 15px/1.15 var(--lilita); font-weight: 400; } .gs .gt small { display: block; font: 800 12px/1.25 var(--nunito); color: #3a4a2a; margin-top: 1px; }
  .lvlbadge .crown { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); width: 44px; height: 30px; } .lvlbadge .crown svg { width: 100%; height: 100%; display: block; }
  .lvlkind { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
  .ktag { display: inline-block; padding: 5px 12px; border-radius: 999px; border: 3px solid var(--ink2); font: 14px/1 var(--lilita); letter-spacing: .04em; text-transform: uppercase; color: var(--ink2); background: #3FA9F5; }
  .ktag.boss { background: #B57BFF; } .ktag.mode { background: #FF8A3D; }
  .lvlsheet h2.lvlname { margin: 0; font: 32px/1 var(--marker); font-weight: 400; color: var(--lob-yellow); text-transform: none; letter-spacing: 0; text-shadow: -2px -2px 0 var(--ink2), 2px -2px 0 var(--ink2), -2px 2px 0 var(--ink2), 2px 2px 0 var(--ink2), 0 5px 0 var(--ink2); transform: rotate(-2deg); transform-origin: left center; padding: 0; }
  .lvlobj { position: relative; margin-top: 12px; padding: 12px 14px 13px; background: #FFF4D6; color: var(--ink2); border: 4px solid var(--ink2); border-radius: 22px; box-shadow: 0 6px 0 var(--ink2); transform: rotate(-.5deg); }
  .lvlobj .olabel { display: block; font: 800 13px/1 var(--nunito); letter-spacing: .12em; text-transform: uppercase; color: #6b5a2a; }
  .lvlobj .otext { display: block; margin-top: 8px; font: 22px/1.15 var(--lilita); font-weight: 400; }
  .lvlobj .olong { display: block; margin-top: 6px; font: 800 14px/1.3 var(--nunito); color: #3a4a2a; }
  .lvlobj .orow { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
  .lvlobj .ochips { display: flex; gap: 5px; flex-wrap: wrap; } .lvlobj .ochips span { display: inline-flex; align-items: center; gap: 3px; padding: 4px 7px; background: #fff; border: 2.5px solid var(--ink2); border-radius: 10px; font: 14px/1 var(--lilita); } .lvlobj .ochips svg { width: 14px; height: 14px; }
  .lvlobj .mtag { margin-left: auto; padding: 5px 11px; background: #3FA9F5; border: 3px solid var(--ink2); border-radius: 999px; font: 13px/1 var(--lilita); color: var(--ink2); white-space: nowrap; }
  .lvlobj .otwist { margin-top: 12px; padding-top: 10px; border-top: 2px dashed rgba(27,18,6,.25); } .lvlobj .otwist .olabel { color: #7a3bd1; } .lvlobj .otwist .olong { margin-top: 6px; }
  .lvldesc { margin-top: 8px; font: 800 12px/1.3 var(--nunito); color: #CFE8D6; }
  .lvlh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 12px 0 6px; }
  .lvlsheet .lvlh h3 { margin: 0; font: 26px/1 var(--marker); font-weight: 400; color: #fff; text-shadow: 3px 3px 0 var(--ink2); text-transform: none; letter-spacing: 0; white-space: nowrap; }
  .lvlh small { font: 15px/1.15 var(--lilita); color: #CFE8D6; text-align: right; }
  .lvlstars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .lvlstars .sc { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; background: #06281A; border: 3px solid var(--ink2); border-radius: 18px; box-shadow: 0 5px 0 var(--ink2); text-align: center; }
  .lvlstars .sc .big { width: 38px; height: 38px; } .lvlstars .sc .big svg { width: 100%; height: 100%; display: block; }
  .lvlstars .sc b { font: 14px/1.2 var(--lilita); font-weight: 400; color: #fff; min-height: 2.4em; display: flex; align-items: center; margin-bottom: 2px; }
  .lvlstars .sc .pill { margin-top: auto; padding: 5px 8px; border-radius: 999px; background: #0B3D22; border: 2px solid rgba(255,255,255,.15); font: 13px/1.15 var(--lilita); color: #CFE8D6; } .lvlstars .sc .pill.pay { color: #FFD93B; }
  .lvlrw { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
  .lvlrw .rt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 84px; padding: 8px 6px; border: 4px solid var(--ink2); border-radius: 18px; box-shadow: 0 6px 0 var(--ink2), inset 0 4px 0 rgba(255,255,255,.35), inset 0 -6px 0 rgba(0,0,0,.12); color: var(--ink2); text-align: center; }
  .lvlrw .rt svg { width: 32px; height: 32px; } .lvlrw .rt b { font: 22px/1 var(--lilita); font-weight: 400; } .lvlrw .rt small { font: 13px/1.1 var(--lilita); margin-top: -2px; }
  .lvlrw .rt.gold { background: #FFD23F; } .lvlrw .rt.blue { background: #3FA9F5; } .lvlrw .rt.purple { background: #B57BFF; }
  .lvlstate { display: flex; align-items: center; gap: 6px; margin-top: 8px; font: 800 12px/1.3 var(--nunito); color: #CFE8D6; } .lvlstate svg { width: 14px; height: 14px; flex: 0 0 auto; }
  .lvlsheet .foot { position: sticky; bottom: 0; margin: 10px -16px 0; padding: 8px 16px calc(14px + env(safe-area-inset-bottom)); background: #0B3D22; border-top: 0; }
  .lvlsheet .foot .actions { display: flex; gap: 14px; align-items: stretch; margin: 0; }
  .lvlback { flex: 0 0 auto; min-width: 100px; height: 60px; padding: 0 16px; background: #5B6B7A; color: #fff; border: 4px solid var(--ink2); border-radius: 18px; box-shadow: 0 6px 0 var(--ink2); font: 22px/1 var(--lilita); font-weight: 400; transition: none; }
  .lvlback:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink2); }
  .gbtn.lvlplay { --rot: -1deg; flex: 1 1 auto; min-width: 0; height: 64px; background: #7ED957; border-radius: 48% 52% 46% 54% / 56% 50% 50% 44%; font-size: 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0 12px; }
  .gbtn.lvlplay .sub { display: inline-flex; align-items: center; gap: 4px; margin: 0; font: 15px/1 var(--lilita); color: var(--ink2); text-shadow: none; opacity: 1; } .gbtn.lvlplay .sub svg { width: 14px; height: 14px; }
  .gbtn.lvlplay:disabled { opacity: 1; background: #5B6B7A; color: #DDE3E8; font-size: 24px; } .gbtn.lvlplay:disabled .sub { color: #DDE3E8; }
  .gbtn.lvlplay .lk { display: inline-flex; align-items: center; gap: 8px; } .gbtn.lvlplay .lk svg { width: 22px; height: 22px; }
  @media (max-height: 700px) { .lvlsheet { max-height: calc(100vh - 8px); max-height: calc(var(--app-h, 100dvh) - 8px); } .lvlstars .sc .big { width: 34px; height: 34px; } .lvlrw .rt { min-height: 84px; } .lvlh { margin-top: 14px; } }
  .pathbox { color: #fff; font-size: .88rem; max-width: 520px; margin: 0 auto 8px; text-shadow: 0 1px 3px rgba(0,0,0,.65); line-height: 1.4; } .pathbox b { color: #ffd166; }
  .coach { position: fixed; z-index: 35; pointer-events: none; display: none; flex-direction: column; align-items: center; gap: 0; }
  .coach.show { display: flex; }
  .coach .finger { font-size: 2.3rem; line-height: 1; animation: fingerbounce .6s ease-in-out infinite alternate; filter: drop-shadow(0 3px 4px rgba(0,0,0,.6)); }
  .coach .say { background: #10281c; border: 1px solid rgba(255,209,102,.75); color: #fff; border-radius: 10px; padding: 6px 10px; font-size: .82rem; max-width: min(250px, 92vw); text-align: center; box-shadow: 0 8px 20px rgba(0,0,0,.5); margin-top: 2px; }
  .coach.up { flex-direction: column-reverse; } .coach.up .say { margin: 0 0 2px; } /* no room under the button: the coach sits above it, the finger pointing down */
  @keyframes fingerbounce { from { transform: translateY(0); } to { transform: translateY(-10px); } }
  .resbig { font-size: 2.6rem; text-align: center; line-height: 1.1; margin: 6px 0; }
  /* ---------- the result sheet's star rows and the lucky flash ---------- */
  .starrow { display: flex; gap: 8px; align-items: center; margin-top: 5px; font-size: .86rem; color: var(--muted); } .starrow .st { font-size: 1.05rem; width: 22px; text-align: center; } .starrow.got { color: var(--cream); } .starrow .new { color: var(--gold); font-weight: 800; font-size: .72rem; margin-left: auto; white-space: nowrap; }
  .lucky { background: rgba(255,214,0,.18); border: 1px solid rgba(255,214,0,.6); color: #ffe27a; border-radius: 10px; padding: 6px 10px; text-align: center; font-weight: 800; margin-top: 8px; animation: luckypop .5s ease-out; } @keyframes luckypop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  /* the level's result (old-sheets-new-style.md §4): a content-sized bottom sheet with no ×. The stars big in a cream card (the middle one raised), the result and the reward as pills, the stars' rows in a dark box, the lucky strip, Back to the path · Try again · Next level */
  #resultModal .rescard { margin-top: 4px; padding: 14px 14px 16px; text-align: center; }
  #resultModal .resbig { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 4px 0 10px; font-size: 3rem; line-height: 1; }
  #resultModal .rstar { width: 50px; height: 48px; display: block; } #resultModal .resbig .rstar.mid { width: 60px; height: 58px; margin-bottom: 18px; }
  #resultModal .rstar path { fill: #EFE3C2; stroke: var(--ink2); stroke-width: 3.5; stroke-linejoin: round; } #resultModal .rstar.on path { fill: #FFD23F; }
  #resultModal .restext { font: 800 16px/1.4 var(--nunito); color: #4A3A10; } #resultModal .restext.before, #resultModal .restext.obj { margin-top: 8px; font-size: 14px; color: #6b5a2a; }
  #resultModal .rescard .tspills { margin-top: 12px; } #resultModal .rescard .tspill { min-height: 32px; font-size: 16px; padding: 0 12px; }
  #resultModal .rstars { margin-top: 14px; padding: 12px 0 2px; } #resultModal .rstars .tslbl { margin: 0 14px 8px; }
  #resultModal .starrow { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-top: 2px solid rgba(255,255,255,.08); font: 18px/1.15 var(--lilita); color: #9FD3B5; }
  #resultModal .starrow.got { color: #fff; } #resultModal .starrow .st { width: 24px; flex: 0 0 24px; } #resultModal .starrow .rstar { width: 24px; height: 23px; }
  #resultModal .starrow .rstar path { stroke-width: 4; } #resultModal .starrow .tx { flex: 1 1 auto; min-width: 0; }
  #resultModal .starrow .new { margin-left: auto; flex: 0 0 auto; font: 800 14px/1.2 var(--nunito); color: #FFD23F; text-align: right; } #resultModal .starrow .new.again { color: #9FD3B5; }
  #resultModal .lucky { margin-top: 14px; padding: 10px 14px; background: #FFD23F; color: var(--ink2); border: 3px solid var(--ink2); border-radius: 16px; box-shadow: 0 4px 0 var(--ink2); font: 18px/1.2 var(--lilita); font-weight: 400; text-align: left; }
  #resultModal .resfoot { margin: 12px 0 8px; }
  #resultModal .foot .actions { gap: 10px; } #resultModal .foot .tbtn { font-size: 19px; white-space: normal; line-height: 1.05; text-align: center; } #resultModal .foot .tbtn.side { min-width: 0; flex: 0 1 28%; padding: 0 8px; }
  #resultModal .foot .tbtn.main { flex: 1 1 0; padding: 6px 4px; } #resultModal .foot .tbtn.main b { white-space: nowrap; } #resultModal .foot .tbtn.main small { display: block; }
  #resultModal .foot .tbtn.blue { color: var(--ink2); }
  /* Reduce motion (body.rm): the loops hold still (the current level's ring, the coach's finger), the pulse and the pops are off */
  body.rm .pnode.current::after, body.rm .pnode.c-pulse, body.rm .pjump, body.rm .coach .finger, body.rm .lucky { animation: none; }
