/* ============================================================
   POLISH: a quieter HUD and a proper menu. Loaded after bubble.css and
   restyles only, like it. Three parts:
     the HUD     smaller corner cards on a desktop, two floating pills on a
                 phone instead of a bar across the top, and everything
                 stepping back while you are on the move (body.hud-quiet,
                 UI.quiet())
     the menu    a sidebar in four groups on a desktop, a launcher of tiles
                 on a phone (Panels.r_home), and a settings page made of
                 switches, sliders and segmented choices
     the moves   the touch jump button (engine/moves.js)
   ============================================================ */

/* ---------------- the HUD, desktop ---------------- */
#hudTL{width:212px}
#hudTL .card{padding:8px 10px 9px}
.who-row{gap:8px}
.who-face.live{width:40px;height:40px}
.who-name{font-size:13.5px}
.who-rank{font-size:10.5px}
/* The four meters as a two-by-two grid of slim bars. The numbers are there on
   hover (and in full in the Profile), not all day long. */
#hudTL .vitals{display:grid;grid-template-columns:1fr 1fr;gap:6px 10px;margin-top:7px}
#hudTL .vitals .bar-row{margin-top:0;gap:5px}
#hudTL .vitals .bar-row .lbl{width:13px;font-size:11px}
#hudTL .vitals .bar{height:7px}
#hudTL .vitals .val{display:none}
#hudTL .card:hover .vitals{grid-template-columns:1fr}
#hudTL .card:hover .vitals .val{display:block;width:auto;min-width:44px;font-size:10px}
#hudTR{width:auto;min-width:176px}
#hudTR .card{padding:8px 12px}
.clock{font-size:21px}
.clock small{font-size:9px;letter-spacing:.1em}
.money-row{font-size:12px;gap:12px}
.sky{margin-top:3px;font-size:9px}

/* The dock: smaller bubbles, key letters only when you reach for it. */
#keyhints.dock{gap:4px;padding:5px 6px;opacity:.82;transition:opacity .35s,transform .35s var(--out)}
#keyhints.dock:hover,#keyhints.dock:focus-within{opacity:1}
#keyhints.dock button{width:36px;height:36px}
#keyhints.dock .kh-i{font-size:16px!important}
#keyhints.dock button::after{opacity:0;transform:scale(.6);transition:opacity .2s,transform .25s var(--spring)}
#keyhints.dock:hover button::after,#keyhints.dock:focus-within button::after{opacity:1;transform:none}
#minimapWrap{bottom:80px}
#minimap{width:148px;height:104px}

/* ---- on the move, the HUD steps back ----
   Faded, not hidden: still there if you look for it. Anything that needs you
   (low nerve, a guest waiting) keeps it up, and so does the pointer. */
.hud .card,#keyhints.dock,#minimapWrap,#chRail,#cmOne,.guide{transition:opacity .6s ease,transform .6s var(--out)}
body.hud-quiet .hud:not(#tracker) .card,body.hud-quiet #minimapWrap,body.hud-quiet #chRail,body.hud-quiet #cmOne{opacity:.42}
body.hud-quiet #keyhints.dock{opacity:.25;transform:translateY(8px)}
body.hud-quiet .guide:not(.open){opacity:.5}
body.hud-quiet .hud .card:hover,body.hud-quiet #keyhints.dock:hover,body.hud-quiet #minimapWrap:hover{opacity:1;transform:none}
body.hud-quiet #hudTR:has(.queue:not([hidden])) .card{opacity:1}

/* ---------------- the HUD, phones ----------------
   Two pills in the top corners rather than a bar the width of the screen:
   your face and four hairline meters on the left, the clock and the takings on
   the right, and the game between them. */
@media (max-width:820px),(max-height:520px){
  #hudTop{background:none!important;border:0!important;box-shadow:none!important;
    padding:calc(env(safe-area-inset-top) + 8px) calc(env(safe-area-inset-right) + 8px) 0 calc(env(safe-area-inset-left) + 8px);
    justify-content:space-between;align-items:flex-start;gap:8px}
  #hudTop::before,#shiftBar{display:none!important}
  #hudTL,#hudTR{flex:0 0 auto;width:auto!important;min-width:0!important}
  #hudTL .card,#hudTR .card{border-radius:999px!important;border:1px solid rgba(255,255,255,.13)!important;
    background:linear-gradient(160deg,rgba(64,28,94,.78),rgba(34,15,54,.84))!important;
    box-shadow:0 8px 22px -14px #000!important}
  #hudTL .card{padding:3px 12px 3px 3px!important;gap:8px}
  /* Name and rank are in the menu's card; here the face is enough. */
  #hudTL .who-row{max-width:none}
  #hudTL .who-row>div{display:none}
  .who-face,.who-face.live{width:36px!important;height:36px!important;font-size:18px}
  #hudTL .vitals{display:flex!important;flex-direction:column;justify-content:center;gap:3px;
    flex:0 0 64px;width:64px;min-width:0;max-width:none;padding:0;border:0;margin:0}
  #hudTL .who-row{flex:0 0 auto}
  #hudTL .card{width:auto!important}
  #hudTL .vitals .bar-row{margin:0;gap:0}
  #hudTL .vitals .bar-row .lbl,#hudTL .vitals .val{display:none!important}
  #hudTL .vitals .bar{height:4px;min-width:0}
  #hudTL .card:hover .vitals{display:flex}
  #hudTR .card{flex-direction:column!important;align-items:flex-end!important;gap:0;padding:4px 13px 5px!important;border-left:0}
  .clock{font-size:16px!important;line-height:1.05}
  .clock small{font-size:7.5px!important;letter-spacing:.06em}
  .money-row{font-size:10px;gap:8px;margin-top:1px}
  #hudTR .sky{display:none}
  .queue{font-size:9px}
}

/* ---------------- the menu ---------------- */
.pn .sign-title{display:flex;align-items:center;gap:10px}
.pn .sign-title>span:first-child{flex:1;min-width:0}
/* The section's icon in its own colours: the title's gradient is clipped to
   its text, which would otherwise paint the emoji over in pink. */
.pt-i{color:#fff;-webkit-text-fill-color:#fff;margin-right:4px;font-family:var(--emoji),sans-serif}
#pnClose{flex:0 0 auto}
.pn-back{order:-1;flex:0 0 auto;border:1px solid rgba(255,255,255,.16);border-radius:999px;
  background:var(--glass-lite);color:var(--text);font:600 13px var(--display);padding:7px 13px;cursor:pointer;
  box-shadow:var(--gloss)}
.pn-back[hidden]{display:none}
.pn-back:active{transform:scale(.95)}
.pn-main{flex:1;min-height:0;display:flex}
.pn-main>.pn-body{flex:1;min-width:0}

/* The sidebar. */
#pnTabs{flex:0 0 232px;display:flex;flex-direction:column;flex-wrap:nowrap!important;gap:2px!important;
  overflow-y:auto;overflow-x:hidden;padding:12px 10px 16px!important;
  border-bottom:0!important;border-right:1px solid var(--line-soft);background:rgba(10,2,20,.2);
  -webkit-mask-image:none!important;mask-image:none!important;scrollbar-width:thin}
#pnTabs .tab{width:100%;flex:0 0 auto;justify-content:flex-start;gap:10px;border-radius:12px!important;
  padding:8px 10px!important;font-size:13.5px;color:var(--dim);transform:none!important;box-shadow:none!important}
#pnTabs .tab:hover{background:rgba(255,255,255,.07)!important;color:var(--text)}
#pnTabs .tab.on{background:var(--hot-soft)!important;color:#fff!important;
  box-shadow:inset 3px 0 0 var(--brand),var(--gloss)!important}
#pnTabs .tab-i{font-size:16px;opacity:.85;filter:none}
#pnTabs .tab-t{flex:1;min-width:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tab-k{flex:0 0 auto;font:700 10px/1 var(--display);color:var(--dim);border:1px solid var(--line);
  border-radius:6px;padding:3px 5px;opacity:.65}
.tab.on .tab-k{opacity:1;color:#fff;border-color:rgba(255,255,255,.35)}
.tab-n.cool{background:rgba(255,255,255,.16)!important;color:var(--text)!important}
.nv-h{font:700 10.5px var(--display);letter-spacing:.14em;text-transform:uppercase;color:var(--hold);
  padding:14px 10px 5px;opacity:.9}

/* Your card, at the top of the sidebar and of the launcher. */
.nv-who{display:grid;grid-template-columns:auto 1fr;gap:6px 10px;align-items:center;padding:10px;border-radius:18px;
  background:var(--glass-lite);border:1px solid rgba(255,255,255,.11);box-shadow:var(--gloss)}
.nv-face{width:52px;height:52px;border-radius:50%;overflow:hidden;display:grid;place-items:center;font-size:26px;
  font-family:var(--emoji),sans-serif;
  background:radial-gradient(circle at 50% 30%,rgba(255,255,255,.35),transparent 60%),linear-gradient(165deg,#ff4f9a,#3a1d58);
  box-shadow:0 0 0 2px rgba(255,255,255,.5),0 8px 18px -8px rgba(255,79,154,.7)}
.nv-face canvas{width:52px!important;height:52px!important}
.nv-id{min-width:0;display:flex;flex-direction:column}
.nv-id b{font:700 15px var(--display);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nv-id>span{font:600 11px var(--display);color:var(--hold)}
.nv-xp{display:block;height:6px;border-radius:99px;background:rgba(10,2,20,.55);margin-top:6px;overflow:hidden}
.nv-xp>i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#7aa7ff,#c79bff,#ff8fd0)}
.nv-cash{grid-column:1/-1;display:flex;justify-content:space-between;align-items:baseline;gap:8px;
  font:600 11.5px var(--display);color:var(--dim)}
.nv-cash b{color:var(--hold);font-weight:700}

/* A phone: no sidebar; the launcher is the way in and ‹ Menu the way back. */
#panel.narrow .pn-main{flex-direction:column}
#panel.narrow #pnTabs{display:none}
#panel.at-home .nv-who{margin-bottom:4px}
.home-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(94px,1fr));gap:9px}
.home-tile{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  min-height:86px;padding:10px 6px;border-radius:18px;cursor:pointer;color:var(--text);
  font:600 12.5px var(--display);background:var(--glass-lite);border:1px solid rgba(255,255,255,.12);
  box-shadow:var(--gloss);transition:transform .25s var(--spring),background .2s,border-color .2s}
.home-tile:hover{border-color:rgba(255,79,154,.55);background:var(--hot-soft)}
.home-tile:active{transform:scale(.94)}
.ht-i{font-size:27px;line-height:1;font-family:var(--emoji),sans-serif;filter:drop-shadow(0 3px 5px rgba(0,0,0,.4))}
.home-tile .tab-n{position:absolute;top:7px;right:8px}
.home-quick{display:flex;gap:8px;margin-top:16px}
.home-quick .btn{flex:1}

/* ---- settings ---- */
.set-save{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:20px}
.set-save .sd{flex-basis:100%;font-size:11.5px;color:var(--dim);margin-top:2px}
.btn.danger:hover{border-color:rgba(255,90,110,.75);background:rgba(255,90,110,.2);box-shadow:var(--gloss),0 10px 26px -10px rgba(255,90,110,.7)}
.set-card{border-radius:18px;background:var(--glass-lite);border:1px solid rgba(255,255,255,.1);
  box-shadow:var(--gloss);padding:0 16px;margin-bottom:20px}
.set-card .setting{background:none!important;border:0!important;border-bottom:1px solid var(--line-soft)!important;
  border-radius:0!important;box-shadow:none!important;transform:none!important;padding:13px 0;gap:14px}
.set-card .setting:last-child{border-bottom:0!important}
.setting .sl{font:600 14px var(--display)}
.setting .sd{font:400 11.5px/1.45 var(--ui);color:var(--dim);margin-top:2px}
.setting:has(.seg),.setting:has(.range){flex-wrap:wrap}
.setting:has(.seg) .sl,.setting:has(.range) .sl{flex:1 1 200px}
.switch{position:relative;flex:0 0 auto;width:50px;height:30px;padding:0;border-radius:99px;cursor:pointer;
  border:1px solid rgba(255,255,255,.2);background:rgba(10,2,20,.6);box-shadow:inset 0 1px 3px rgba(0,0,0,.5);
  transition:background .25s,border-color .25s}
.switch>i{position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;
  box-shadow:0 2px 6px rgba(0,0,0,.45);transition:transform .3s var(--spring)}
.switch[aria-checked="true"]{background:var(--hot);border-color:transparent;box-shadow:var(--gloss),0 6px 16px -8px rgba(255,79,154,.8)}
.switch[aria-checked="true"]>i{transform:translateX(20px)}
.seg{display:inline-flex;flex:0 0 auto;gap:2px;padding:3px;border-radius:99px;
  background:rgba(10,2,20,.55);border:1px solid rgba(255,255,255,.1)}
.seg button{border:0;background:none;color:var(--dim);font:600 12.5px var(--display);padding:7px 12px;
  border-radius:99px;cursor:pointer;transition:background .2s,color .2s}
.seg button:hover{color:var(--text)}
.seg button.on{background:var(--hot);color:#fff;box-shadow:var(--gloss)}
.range{display:flex;align-items:center;gap:10px;flex:1 1 180px;max-width:280px}
.range input{flex:1;min-width:0;accent-color:#ff4f9a;height:28px}
.range output{font:700 12.5px var(--display);min-width:40px;text-align:right}
.now-playing{font:600 13px var(--display);color:var(--hold);white-space:nowrap}
/* Settings › Sound › The score: forty pieces to listen to. */
.score-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:8px;margin-bottom:8px}
.score-track{display:flex;align-items:center;gap:10px;text-align:left;padding:9px 12px;border-radius:14px;cursor:pointer;
  background:var(--glass-lite);border:1px solid rgba(255,255,255,.1);color:var(--text);font:inherit;min-width:0;transition:border-color .2s,background .2s}
.score-track:hover{border-color:var(--brand)}
.score-track.on{border-color:var(--hold);background:rgba(255,179,71,.12)}
.score-track .n{flex:0 0 22px;font:700 11px var(--mono);color:var(--dim);text-align:right}
.score-track .t{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.score-track b{font:600 13.5px var(--display);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.score-track b i{font-style:normal;color:var(--good);font-size:11px}
.score-track small{font-size:11px;color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.score-track .p{flex:0 0 auto;font-size:12px;color:var(--brand)}
.score-track.on .p{color:var(--hold)}
.score-note{font-size:11.5px;color:var(--dim);margin:4px 2px 20px}
.keys{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:9px 16px;margin-bottom:12px}
.key{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--dim)}
.key .kbd{flex:0 0 auto;min-width:30px;text-align:center}

@media (max-width:820px),(max-height:520px){
  .pn-back{padding:8px 13px}
  .set-card{padding:0 13px}
  .seg button{padding:8px 11px}
  .keys{grid-template-columns:1fr}
}

/* ---------------- the moves: jump, and dive in the water ---------------- */
#touchJ{position:absolute;right:calc(106px + env(safe-area-inset-right));bottom:calc(44px + env(safe-area-inset-bottom));
  width:58px;height:58px;border-radius:50%;pointer-events:auto;touch-action:none;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;color:#fff;
  background:linear-gradient(160deg,rgba(64,28,94,.9),rgba(34,15,54,.92));
  border:2px solid rgba(62,230,209,.65);box-shadow:0 10px 24px -12px rgba(62,230,209,.8),var(--gloss);
  transition:transform .2s var(--spring),border-color .2s}
#touchJ:active{transform:scale(.9)}
.tj-i{font-size:20px;line-height:1;transition:transform .3s var(--spring)}
.tj-t{font:700 8.5px var(--display);letter-spacing:.12em}
body.swimming #touchJ{border-color:rgba(122,167,255,.8)}
body.swimming .tj-i{transform:rotate(180deg)}
body.swimming .tj-t{font-size:0}
body.swimming .tj-t::after{content:"DIVE";font-size:8.5px}
body.driving #touchJ{display:none}
body.southpaw #touchJ{right:auto;left:calc(106px + env(safe-area-inset-left))}
/* Hit: a punch, or the gun butt (engine/melee.js). Under E, a coral ring,
   centred on it: the two thumb buttons in one column. */
#touchHit{position:absolute;right:calc(30px + env(safe-area-inset-right));bottom:calc(32px + env(safe-area-inset-bottom));
  width:50px;height:50px;border-radius:50%;pointer-events:auto;touch-action:none;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;color:#fff;
  background:linear-gradient(160deg,rgba(64,28,94,.9),rgba(34,15,54,.92));
  border:2px solid rgba(255,140,110,.65);box-shadow:0 10px 24px -12px rgba(255,140,110,.8),var(--gloss);
  transition:transform .2s var(--spring)}
#touchHit:active{transform:scale(.9)}
#touchHit .tj-i{font-size:17px}
body.driving #touchHit,body.swimming #touchHit{display:none}
body.southpaw #touchHit{right:auto;left:calc(30px + env(safe-area-inset-left))}
/* With a gun in hand the aim stick takes Jump's corner, so Jump steps inside
   it rather than leaving: you can still hop. Hit stays under E. */
body.armed #touchJ{right:calc(244px + env(safe-area-inset-right))}
body.southpaw.armed #touchJ{right:auto;left:calc(244px + env(safe-area-inset-left))}
/* A narrow portrait screen has no room beside the aim stick (the walk stick
   is there), so Jump sits on top of it instead. */
@media(pointer:coarse) and (max-width:600px){
  body.armed #touchJ{right:calc(92px + env(safe-area-inset-right));bottom:calc(186px + env(safe-area-inset-bottom))}
  body.southpaw.armed #touchJ{right:auto;left:calc(92px + env(safe-area-inset-left))}
}
/* A short landscape screen has E on the bottom edge, so E and the menu step
   up to leave Hit the bottom corner. */
@media(pointer:coarse) and (max-height:460px){
  #touchJ{width:50px;height:50px;right:calc(92px + env(safe-area-inset-right));bottom:calc(12px + env(safe-area-inset-bottom))}
  body.southpaw #touchJ{right:auto;left:calc(92px + env(safe-area-inset-left))}
  #touchE{bottom:calc(62px + env(safe-area-inset-bottom))}
  #touchMenu{bottom:calc(134px + env(safe-area-inset-bottom))}
  #touchHit{width:42px;height:42px;right:calc(28px + env(safe-area-inset-right));bottom:calc(12px + env(safe-area-inset-bottom))}
  #touchHit .tj-t{display:none}
  body.southpaw #touchHit{right:auto;left:calc(28px + env(safe-area-inset-left))}
  body.armed #touchJ{right:calc(214px + env(safe-area-inset-right))}
  body.southpaw.armed #touchJ{right:auto;left:calc(214px + env(safe-area-inset-left))}
}
@media(prefers-reduced-motion:reduce){#touchJ:active,#touchHit:active{transform:none}}

/* A meter running low (UI.hud): its icon pulses, so tired and hungry show
   before the toast does. */
#hudTL .bar-row.low .lbl{animation:lowPulse 1.1s ease-in-out infinite}
@keyframes lowPulse{50%{transform:scale(1.35);filter:drop-shadow(0 0 4px rgba(255,90,110,.9))}}
@media(prefers-reduced-motion:reduce){#hudTL .bar-row.low .lbl{animation:none;filter:drop-shadow(0 0 4px rgba(255,90,110,.9))}}
#hudTL .bar-row.low .bar{box-shadow:0 0 0 1.5px rgba(255,90,110,.75),0 0 8px rgba(255,90,110,.45)}

/* A controller moving the focus (engine/pad.js): the ring is the cursor. */
body.pad-nav :focus{outline:3px solid var(--hold,#ffb938)!important;outline-offset:2px}

/* The window lost focus: the clock has stopped (resumeFromVeil, engine/input.js). */
#pauseVeil{position:absolute;inset:0;z-index:60;display:none;place-items:center;
  background:rgba(12,6,24,.55);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);cursor:pointer}
#pauseVeil.on{display:grid}
#pauseVeil div{display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px 28px;border-radius:18px;
  background:rgba(42,20,70,.92);border:1px solid rgba(255,255,255,.14);color:#fff;box-shadow:0 20px 50px -20px #000}
#pauseVeil b{font:700 22px var(--display,inherit);letter-spacing:.06em}
#pauseVeil span{font-size:12px;color:rgba(255,255,255,.7)}

/* ---- menu refinements ---- */
/* The panel's hibiscus sits further into the corner and fainter, as in the
   dialogue box: the map, the plans and the settings run across that corner,
   and a flower behind a card reads as a mark on the card. */
.pn{background-position:right -70px bottom -76px,left -54px top 46%,0 0,0 0!important;
  background-size:150px,90px,auto,auto!important}
/* A skill's name is the headline and what it does the note under it. */
.skill .sn{font:700 13px var(--display)}
.skill .idesc{font-size:11.5px;line-height:1.35;color:var(--dim);font-style:italic}
.sk-hint{font-size:12.5px;color:var(--dim)}
/* Plans of different lengths keep "Show me where" on one line across the row. */
.farm-prod .ws-where{margin-top:auto;align-self:stretch}
/* A short landscape phone: the launcher's tiles lie down (icon beside the
   name) and your card is one line, so more than the first group fits. */
@media (max-height:520px) and (min-width:560px){
  #panel.at-home .nv-who{grid-template-columns:auto 1fr auto;padding:8px 12px}
  #panel.at-home .nv-face,#panel.at-home .nv-face canvas{width:40px!important;height:40px!important}
  #panel.at-home .nv-cash{grid-column:auto;flex-direction:column;align-items:flex-end;gap:2px}
  .home-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
  .home-tile{flex-direction:row;justify-content:flex-start;min-height:52px;padding:8px 12px;gap:10px}
  .home-tile .ht-i{font-size:22px}
  .home-tile .tab-n{position:static;margin-left:auto}
}

/* ---- the crafting screens (data/station.js) ---- */
.st-away{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:14px}
.st-away .seg{flex:1 1 auto;justify-content:center}
.st-hero{display:grid;grid-template-columns:auto 1fr minmax(180px,240px);gap:6px 14px;align-items:center;padding:14px 16px;
  border-radius:20px;background:var(--glass-lite);border:1px solid rgba(255,255,255,.12);box-shadow:var(--gloss);margin-bottom:14px}
.st-e{font-size:40px;line-height:1;font-family:var(--emoji),sans-serif;filter:drop-shadow(0 4px 8px rgba(0,0,0,.45))}
.st-id{min-width:0;display:flex;flex-direction:column;gap:3px}
.st-id b{font:700 17px var(--display)}
.st-id span{font-size:12px;color:var(--dim);font-style:italic;line-height:1.35}
.st-lv{display:flex;flex-direction:column;gap:5px;font:600 11.5px var(--display);color:var(--dim)}
.st-lv b{color:var(--hold)}
.st-lv .mb{height:6px}
.st-clock{font-size:11px;opacity:.85}
.st-flash{padding:10px 14px;border-radius:14px;margin-bottom:12px;font-size:13px;
  background:rgba(70,227,168,.13);border:1px solid rgba(70,227,168,.45);color:#c9f7e3;animation:stFlash .5s var(--spring)}
@keyframes stFlash{from{transform:translateY(-6px);opacity:0}}
.st-cats{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.st-cat{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;border-radius:999px;cursor:pointer;
  font:600 12.5px var(--display);color:var(--dim);background:rgba(255,255,255,.05);border:1px solid var(--line)}
.st-cat:hover{color:var(--text);background:rgba(255,255,255,.1)}
.st-cat.on{color:#fff;background:var(--hot-soft);border-color:rgba(255,79,154,.6)}
.st-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px}
.rc{position:relative;display:flex;flex-direction:column;gap:7px;padding:12px 13px;border-radius:16px;
  background:var(--glass-lite);border:1px solid rgba(255,255,255,.11);box-shadow:var(--gloss)}
.rc.ok{border-color:rgba(70,227,168,.5);box-shadow:var(--gloss),0 0 0 1px rgba(70,227,168,.15)}
.rc.locked{opacity:.55}
.rc.made{animation:rcMade .45s var(--spring)}
@keyframes rcMade{40%{transform:scale(1.03)}}
.rc-h{display:flex;align-items:center;gap:10px}
.rc-e{flex:none;width:44px;height:44px;display:grid;place-items:center;border-radius:12px;font-size:26px;
  font-family:var(--emoji),sans-serif;background:rgba(10,2,20,.35);border:1px solid rgba(255,255,255,.08)}
.rc-n{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.rc-n b{font:700 14px var(--display)}
.rc-n em{font-style:normal;color:var(--hold)}
.rc-n span{font-size:11px;color:var(--dim)}
.rc-tag{flex:none;align-self:flex-start;font:700 9.5px var(--display);letter-spacing:.08em;text-transform:uppercase;
  padding:3px 8px;border-radius:999px;background:rgba(255,255,255,.08);color:var(--dim)}
.rc-d{font-size:11.5px;color:var(--dim);font-style:italic;line-height:1.4;margin:0}
.rc-w{font-size:11.5px;color:#bfe9ff;margin:0}
.rc-why{font-size:11.5px;color:#ffc9a8;margin:0;line-height:1.4}
.rc-why i{color:var(--dim)}
.rc.locked .rc-why{color:var(--dim)}
.rc-act{display:flex;flex-wrap:wrap;gap:6px;margin-top:auto;padding-top:2px}
.rc-act .btn{flex:1 1 auto}
.rc-at{font-size:11px;color:var(--dim);font-style:italic;margin-top:auto}
.st-note{margin-top:12px}
.st-slots{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:10px}
.st-slot{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:16px;
  background:rgba(255,120,60,.10);border:1px solid rgba(255,150,80,.35)}
.st-slot.idle{background:rgba(255,255,255,.04);border-style:dashed;border-color:var(--line);opacity:.8}
.st-slot.done{background:rgba(70,227,168,.12);border-color:rgba(70,227,168,.5)}
.st-slot>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.st-slot b{font:700 13.5px var(--display)}
.st-slot>div>span{font-size:11.5px;color:var(--dim)}
.st-slot .ss-e{flex:none;width:40px;text-align:center;font-size:28px;line-height:1;font-family:var(--emoji),sans-serif}
.st-take{width:100%;margin-bottom:14px}
/* The recipe book, at the top of the Workshop tab. */
.ws-book{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:9px}
.ws-book-b{display:flex;align-items:center;gap:11px;padding:11px 13px;border-radius:16px;cursor:pointer;text-align:left;color:var(--text);
  background:var(--glass-lite);border:1px solid rgba(255,255,255,.12);box-shadow:var(--gloss);transition:transform .25s var(--spring),border-color .2s}
.ws-book-b:hover{border-color:rgba(255,79,154,.55);transform:translateY(-2px)}
.wb-i{font-size:26px;font-family:var(--emoji),sans-serif}
.wb-t{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.wb-t b{font:700 13.5px var(--display)}
.wb-t span{font-size:11px;color:var(--dim)}
@media (max-width:820px),(max-height:520px){
  .st-hero{grid-template-columns:auto 1fr;padding:12px}
  .st-lv{grid-column:1/-1}
  .st-e{font-size:32px}
  .st-grid{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){.st-flash,.rc.made{animation:none}}
.rc-from{font:600 11px var(--display);color:var(--dim)}
.rc-m{display:flex;flex-wrap:wrap;gap:0 8px}
.rc-m>span{white-space:nowrap}
.rc-m>span+span::before{content:"·";margin-right:8px;opacity:.6}

/* ---------------- where you are, and the post ---------------- */
.where{margin-top:4px;display:flex;align-items:center;justify-content:flex-end;gap:5px;
  font-family:var(--display,var(--ui));font-weight:600;font-size:11px;color:var(--text);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:230px;margin-left:auto}
.where>span:first-child{font-size:10px}
#hWritT{overflow:hidden;text-overflow:ellipsis}
/* The post is a button now: it opens the letter that wants an answer. */
button.queue{margin-left:auto;background:rgba(77,163,255,.12);border:1px solid rgba(77,163,255,.35);
  border-radius:999px;padding:2px 9px;cursor:pointer;pointer-events:auto;color:var(--brand);font:inherit;
  font-family:var(--display,var(--ui));font-weight:600;font-size:11px}
button.queue[hidden]{display:none}
button.queue:hover{background:rgba(77,163,255,.22)}
button.queue:focus-visible{outline:2px solid var(--hold);outline-offset:2px}
.queue.written .qdot{width:auto;height:auto;background:none!important;box-shadow:none!important;font-size:11px;line-height:1}

/* ---------------- the speedometer ----------------
   Only while you drive: a dial, the speed in it and the gear under that,
   pinned to the sat-nav's shoulder (inside #satnavWrap, which shows only in a
   car): top right of it, or top left where the sat-nav is on the right. */
#carHud[hidden]{display:none}
#carHud{position:absolute;top:-10px;right:-58px;z-index:3;display:flex;align-items:center;justify-content:center;pointer-events:none;
  width:64px;height:64px;border-radius:50%;
  background:radial-gradient(circle at 50% 40%,rgba(64,28,94,.9),rgba(28,12,46,.92));
  border:1px solid rgba(255,255,255,.13);box-shadow:0 8px 22px -14px #000;
  font-family:var(--display,var(--ui));color:var(--text)}
.ch-dial{position:relative;width:56px;height:56px;flex:0 0 auto}
.ch-dial svg{display:block;width:100%;height:100%}
.ch-n{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;
  font-weight:700;font-size:17px;line-height:1}
.ch-gear{font-family:var(--mono);font-size:10px;color:var(--hold);margin-top:2px}
@media (max-width:820px),(max-height:520px){
  .where{font-size:9px;margin-top:0;max-width:150px}
  .where>span:first-child{display:none}
  button.queue{font-size:9px;padding:1px 7px}
}

/* ---------------- the sat-nav ----------------
   The minimap while you drive (Atlas.satnav()): round, bigger, and never
   faded. On a phone, where the minimap has no room, it sits under the HUD bar
   on the side away from the tracker. */
#satnavWrap[hidden]{display:none}
#satnavWrap{position:absolute;right:12px;bottom:80px;z-index:12}
@media (min-width:821px) and (min-height:521px){ #carHud{right:auto;left:-58px} }
#satnavBtn{display:block;padding:0;border:0;background:none;cursor:pointer;line-height:0;border-radius:50%;
  box-shadow:0 12px 30px -14px #000,0 0 0 3px rgba(11,15,22,.6)}
#satnav{display:block;width:200px;height:200px;border-radius:50%}
body.driving #minimapWrap{display:none}
@media (max-width:820px),(max-height:520px){
  #satnavWrap{right:auto;left:calc(10px + env(safe-area-inset-left));bottom:auto;top:calc(var(--hud-h,92px) + 8px)}
  body.southpaw #satnavWrap{left:auto;right:calc(10px + env(safe-area-inset-right))}
  #satnav{width:132px;height:132px}
  body.southpaw #carHud{right:auto;left:-58px}
}
@media (max-height:520px){ #satnav{width:110px;height:110px} }
/* The compass on a dial: north up, or turning with you (Atlas.flip()). */
.mm-spin{position:absolute;top:-6px;left:-6px;z-index:2;width:24px;height:24px;padding:0;border-radius:50%;
  border:1px solid rgba(255,255,255,.28);background:rgba(11,15,22,.9);color:#ff6b5e;font:800 11px/1 var(--ui);
  cursor:pointer;pointer-events:auto;box-shadow:0 4px 10px -4px #000}
.mm-spin[aria-pressed="true"]{color:#ffb347}
.mm-spin:hover,.mm-spin:focus-visible{border-color:var(--brand)}
.mm-spin:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
#satnavSpin{top:4px;left:4px}
/* The maximise on a dial, in the opposite corner: the whole map (Panels.open('map')). */
.mm-max{position:absolute;top:-6px;right:-6px;z-index:2;width:24px;height:24px;padding:0;border-radius:50%;
  border:1px solid rgba(255,255,255,.28);background:rgba(11,15,22,.9);color:#fff;font:800 13px/1 var(--ui);
  cursor:pointer;pointer-events:auto;box-shadow:0 4px 10px -4px #000}
.mm-max:hover,.mm-max:focus-visible{border-color:var(--brand);color:var(--brand)}
.mm-max:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
#satnavMax{top:4px;right:4px}
@media (pointer:coarse){ .mm-max{width:30px;height:30px;font-size:15px} }
