/* Purrconomy — one committed night look. Every color is a token. */
:root{
  color-scheme: dark;
  --night:#15131f; --plum:#241f33; --plum-2:#2f2843; --line:#3d3553;
  --cream:#f5ead6; --muted:#b3a6c4; --amber:#f2b45a; --amber-deep:#c9822f;
  --teal:#5cc2b3; --rose:#ef6f7c; --ink:#0f0d16;
  --heat1:#f79a3e; --heat2:#fb8a4c; --heat3:#ff6a5e; --heat4:#ff4358; --heat-line:#2a0f16;

  --plum-hi:#2b253c; --plum-2b:#29233b; --plum-3:#3a3152; --plum-4:#463c62;
  --amber-hi:#f8cd85; --amber-lo:#e3a049; --rose-lo:#c94f5d; --teal-lo:#3f9488;
  --leaf:#a3d184; --lilac:#c7b0f2;
  --pumpkin:#f39a4a; --pumpkin-line:rgba(243,154,74,.5);
  --lilac-line:rgba(199,176,242,.5); --lilac-glow:rgba(199,176,242,.38); --lilac-wash:rgba(199,176,242,.16);
  --paper:#f7ecd8; --paper-ink:#2b2236; --btn-ink:#2a1906;
  --cream-dim:rgba(245,234,214,.78);
  --hi:rgba(255,255,255,.05);
  --glass:rgba(22,19,33,.74);
  --glass-strong:rgba(20,17,30,.9);
  --glass-line:rgba(245,234,214,.1);
  --scrim:rgba(12,10,19,.62);
  --track:rgba(245,234,214,.1);
  --ink-wash:rgba(15,13,22,.32);
  --amber-wash:rgba(242,180,90,.26);
  --amber-line:rgba(242,180,90,.42);
  --amber-glow:rgba(242,180,90,.34);
  --rose-wash:rgba(239,111,124,.34);
  --rose-line:rgba(239,111,124,.5);
  --rose-glow:rgba(239,111,124,.45);
  --teal-wash:rgba(92,194,179,.14);
  --teal-line:rgba(92,194,179,.38);
  --chip-back:rgba(36,31,51,.9);
  --rose-soft:#ffbcc3;
  --shadow-c:rgba(5,3,12,.5);
  --modal-scrim:rgba(8,6,14,.68);
  --paper-shade:rgba(43,34,54,.08);
  --stamp-bg:rgba(21,19,31,.42);
  --lamp-wash:rgba(242,180,90,.05);
  --gloss:rgba(255,255,255,.4);
  --rose-hi:#f58c97;
  --mask:#000; --mask-on:#fff;
  --glyph-eye:var(--ink);
  --wood-l:#6b4631; --wood-d:#5a3b2a; --wood-line:rgba(20,10,6,.5);
  --lamp-edge:rgba(242,180,90,.16);
  --motif:#9384b6;
  --box-pool:rgba(242,180,90,.16);
  --menu-scrim:rgba(10,8,17,.7); --menu-scrim-lo:rgba(10,8,17,.3);
  --lounge-veil:rgba(21,19,31,.55);
  /* Charmed Life (stage 3): its clover green */
  --clover:#6fcf86; --clover-wash:rgba(111,207,134,.16); --clover-line:rgba(111,207,134,.46);
  /* the mini games (stage K) */
  --games-scrim:rgba(8,6,14,.72); --gp-stage:#1a1626; --gp-veil:rgba(14,11,22,.66); --gp-shine:rgba(255,236,200,.08);
  --gold:#f6cf63; --gold-line:rgba(246,207,99,.5); --gh-head:rgba(64,55,92,.88);
  /* the chapters (SPEC 11.4.3): the stamp's sealing wax, the silver ribbon */
  --wax:#e2554f; --wax-line:rgba(226,85,79,.55); --silver:#d9dde8; --silver-line:rgba(217,221,232,.45);
  /* the Harbor's sea fog (stage 3): the Foghorn's rate chip */
  --slate-wash:rgba(217,221,232,.12);

  --f-display:"Fraunces", Georgia, serif;
  --f-ui:"Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-hand:"Patrick Hand", "Comic Sans MS", cursive;
  --soft:"SOFT" 100, "WONK" 1;
  --panel-w:clamp(380px, 29vw, 420px);
  --gut:16px;
  --r-card:14px;
  --r-btn:12px;
  --shadow:0 12px 32px var(--shadow-c);
}

html{box-sizing:border-box;height:100%;background:var(--night)}
*,*::before,*::after{box-sizing:inherit}
body{height:100%;margin:0;overflow:hidden;overscroll-behavior:none;background:var(--night);color:var(--cream);
  font:400 15px/1.4 var(--f-ui);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit}
p,h2,h3,dl,dd,ol,ul{margin:0}
:focus-visible{outline:2px solid var(--amber);outline-offset:2px}

/* ================= app grid ================= */
.app{height:100%;display:grid;grid-template-columns:minmax(0,1fr) var(--panel-w);grid-template-rows:minmax(0,1fr);grid-template-areas:"stage shop";background:var(--night)}

/* ================= stage ================= */
.stage{--news-h:38px;grid-area:stage;position:relative;overflow:hidden;min-width:0;min-height:0;background:var(--night);isolation:isolate;
  user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.scene{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:default}
.stage.panning .scene{cursor:grabbing}

/* HUD: bank, top-left */
.hud-bank{position:absolute;left:max(22px, env(safe-area-inset-left));top:16px;z-index:4;pointer-events:none;max-width:calc(100% - 44px);width:max-content}
.hud-bank::before{content:"";position:absolute;left:-60px;top:-50px;right:-70px;bottom:-34px;z-index:-1;
  background:radial-gradient(closest-side, var(--scrim), transparent);}
.logo{display:flex;align-items:baseline;gap:10px;white-space:nowrap}
.logo-word{font:800 18px/1 var(--f-display);font-variation-settings:var(--soft);letter-spacing:.005em;color:var(--cream)}
.logo-tag{font:400 15px/1 var(--f-hand);color:var(--muted);letter-spacing:.02em}
.bank{margin-top:8px;display:flex;align-items:baseline;flex-wrap:wrap;column-gap:10px;row-gap:2px}
.bank-num{font:900 54px/.92 var(--f-display);font-variation-settings:var(--soft);font-variant-numeric:lining-nums tabular-nums;
  letter-spacing:-.015em;color:var(--cream);text-shadow:0 2px 0 var(--shadow-c), 0 0 34px var(--amber-glow)}
/* SPEC 10.16: Fraunces has no tabular figures, so a Fraunces number that changes while you watch (the bank, One pet,
   the owned counts, the trophy sum, the dialogs' stats) sets each digit in a cell of the same width, centred (game.js
   setNum); separators and words keep their own widths. The widest digit (0) is .71 em; the bank's tighter cell suits
   its tighter tracking. Each word is one unbreakable group, so a long number can still wrap at its spaces; the hidden
   copy for screen readers stays out of a copy and paste */
.num-g{white-space:nowrap}
.num-sr{-webkit-user-select:none;user-select:none}
.dg{display:inline-block;width:var(--dg,.7em);text-align:center;letter-spacing:0}
.bank-num .dg{--dg:.68em}
.bank-unit{font:700 21px/1 var(--f-display);font-variation-settings:var(--soft);color:var(--amber);white-space:nowrap}
/* the value of one pet, a line under the rate in the app's Ledger row only (src/plat/app.css) */
.bank-pet{display:none}
/* (its chips wrap before the top-right block's buttons: --rate-max, which game.js measures) */
.rate{margin-top:10px;display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;font:600 15px/1.2 var(--f-ui);font-variant-numeric:tabular-nums;max-width:var(--rate-max, none)}
.rate-val{color:var(--amber);font-weight:800;font-size:17px}
.rate-per{color:var(--muted);margin-left:-5px}
/* the chips sit over the room (on phones right over the bright window): a near-opaque plum backing under the tint keeps them legible */
.rate-notes{display:flex;flex-wrap:wrap;gap:5px 6px}
.rate-note{font:700 12px/1 var(--f-ui);color:var(--teal);background:linear-gradient(var(--teal-wash),var(--teal-wash)),var(--chip-back);border:1px solid var(--teal-line);padding:5px 9px 4px;border-radius:999px;white-space:nowrap}
.rate-note.hot{color:var(--rose-soft);background:linear-gradient(var(--rose-wash),var(--rose-wash)),var(--chip-back);border-color:var(--rose-line)}
.rate-note.warn{color:var(--amber-hi);background:linear-gradient(var(--amber-wash),var(--amber-wash)),var(--chip-back);border-color:var(--amber-line)}
.rate-note.secret{color:var(--lilac);background:linear-gradient(var(--lilac-wash),var(--lilac-wash)),var(--chip-back);border-color:var(--lilac-line)}
/* a timed effect on her nap (the Harbor's Foghorn at dawn and dusk): slate, the sea fog's */
/* Charmed Life's wobble (stage 3): green while her cats purr above ×1, amber below */
.rate-note.luck{color:var(--clover);background:linear-gradient(var(--clover-wash),var(--clover-wash)),var(--chip-back);border-color:var(--clover-line)}
.rate-note.luck.low{color:var(--amber-hi);background:linear-gradient(var(--amber-wash),var(--amber-wash)),var(--chip-back);border-color:var(--amber-line)}
.rate-note.slate{color:var(--silver);background:linear-gradient(var(--slate-wash),var(--slate-wash)),var(--chip-back);border-color:var(--silver-line)}

/* HUD: lives, sound, save — top-right. It sits over the room's hit targets (a secret cat on the lamp top can be under
   the sound button in a phone's Split height): only its buttons take clicks, the rest lets them through */
.hud-side{position:absolute;right:max(18px, env(safe-area-inset-right));top:16px;z-index:7;pointer-events:none;display:flex;flex-direction:column;align-items:flex-end;gap:7px;width:max-content}
.lives{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:999px;background:var(--glass);border:1px solid var(--glass-line);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.pips{display:flex;gap:4px}
.pip svg{width:17px;height:17px;display:block}
.pip.past svg{fill:var(--muted);opacity:.55}
.pip.cur svg{fill:var(--amber);filter:drop-shadow(0 0 5px var(--amber-glow))}
.pip.future svg{fill:none;stroke:var(--muted);stroke-width:1.4;opacity:.55}
.stars{display:flex;align-items:center;gap:2px;font:800 12px/1 var(--f-ui);color:var(--amber)}
.stars:empty{display:none}
.stars svg{width:16px;height:16px;fill:var(--amber);filter:drop-shadow(0 0 5px var(--amber-glow))}
.life-line{font:700 11px/1 var(--f-ui);color:var(--muted);letter-spacing:.12em;text-transform:uppercase;margin-right:6px}
/* this life's path: "Life 4 of 9 · Diva" */
.ll-path{color:var(--amber-hi)}
.ll-path::before{content:" · ";color:var(--muted)}
.hud-tools{display:flex;align-items:center;gap:10px}
.hud-side .icon-btn,.hud-side .save{pointer-events:auto}
.save{display:flex;align-items:center;gap:7px;font:600 12px/1 var(--f-ui);color:var(--muted);text-shadow:0 1px 6px var(--shadow-c)}
.save-dot{width:7px;height:7px;border-radius:50%;background:var(--muted);opacity:.7;flex:none}
.save.cloud .save-dot{background:var(--teal);opacity:1;box-shadow:0 0 0 3px var(--teal-wash)}
.icon-btn{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 13px 0 10px;border-radius:999px;border:1px solid var(--glass-line);
  background:var(--glass);color:var(--cream);font:700 13px/1 var(--f-ui);cursor:pointer;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);touch-action:manipulation}
.icon-btn:hover{border-color:var(--amber-line)}
.icon-btn svg{width:18px;height:18px;flex:none}
.icon-btn .spk{fill:currentColor}
.icon-btn .w,.icon-btn .x{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.icon-btn[aria-pressed="true"] .x,.icon-btn[aria-pressed="false"] .w{display:none}
.icon-btn[aria-pressed="true"]{color:var(--amber);border-color:var(--amber-line)}
.icon-btn[aria-pressed="false"]{color:var(--muted)}
.icon-btn .bars{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round}
/* the menu waits while the new-life scene plays (no dialog opens over it); the sound button moves up beside the pips */
.menu-open.wait{display:none}
/* the music (stage L): a pair of eighth notes; off, a slash cuts a gap through them (an SVG mask, so the room shows
   through the gap). The effects and music buttons keep their labels only where the tools row has room for them
   (.stage-roomy, a stage 1100 px or wider); elsewhere they are round icons, named by aria-label and a tooltip */
.mus-btn .nt{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}
.mus-btn .bm,.mus-btn .hd{fill:currentColor}
.mus-btn .mk-on{fill:var(--mask-on)}
.mus-btn .mk-off{fill:none;stroke:var(--mask);stroke-width:4.6;stroke-linecap:round}
.mus-btn .sl{display:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.mus-btn[aria-pressed="false"] .sl{display:inline}
.mus-btn[aria-pressed="false"] .notes{mask:url(#musCut)}
.app:not(.stage-roomy) .snd-btn{width:34px;padding:0;justify-content:center}
.app:not(.stage-roomy) .snd-btn .lbl{display:none}
/* the mini games (stage K): a ball of yarn and the playtimes waiting (amber, a muted 0 when none is left) */
.games-open{position:relative}
.games-open .yarn{fill:var(--rose);opacity:.9}
.games-open .yl{fill:none;stroke:var(--rose-soft);stroke-width:1.3;stroke-linecap:round;opacity:.85}
.games-open .yt{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.pt-badge{display:inline-grid;place-items:center;min-width:18px;height:18px;margin-left:1px;padding:0 5px;border-radius:999px;background:var(--amber);color:var(--btn-ink);
  font:800 11px/1 var(--f-ui);font-variant-numeric:tabular-nums}
.games-open.none .pt-badge{background:var(--plum-3);color:var(--muted)}
.games-open.wait{display:none}
/* the neighborhood (stage M): two little houses, the near one lamplit, a cat's ears in the far one's window. Only where
   the tools row has room (stages 900 px and wider: the main menu has a Neighbors entry everywhere); its label only on
   the widest (.stage-roomy), like the sound buttons */
.nb-open .h1{fill:var(--amber);opacity:.92}
.nb-open .d1{fill:none;stroke:var(--btn-ink);stroke-width:1.5;stroke-linecap:round}
.nb-open .h2{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}
.nb-open .ck{fill:none;stroke:var(--teal);stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
.nb-open.wait,.app.stage-snug .nb-open{display:none}
.nb-open{position:relative}
/* 1.2's top row (the .ui12 class, game.js UI12): the Neighbors button for everyone, in the place of the two sound buttons,
   which live in Settings; a dot on its corner while a neighbor's cat waits or the board has a new face */
.nb-dot{position:absolute;right:-2px;top:-2px;width:10px;height:10px;border-radius:50%;background:var(--amber);box-shadow:0 0 0 2px var(--night)}
.app.ui12 .snd-btn{display:none}
.app.ui12.stage-snug .nb-open:not(.wait){display:inline-flex}
.app:not(.stage-roomy) .nb-open{width:34px;padding:0;justify-content:center}
.app:not(.stage-roomy) .nb-open .lbl{display:none}
/* the postcard (1.3 PC-HUD, the owner's ask of Nov 18): a card with its stamp corner (amber, as the lamplit house beside it; the
   stamp's picture a dark frame) and the address's two teal lines, beside Neighbors wherever the menu's Send a postcard shows
   (game.js renderPcBtn). Like Neighbors it waits (steps out of the row) through a scene, an icon only under the widest stage; where
   the row with it would reach the purrs (.pc-tight, game.js pcFit: a tablet's row beside a long figure) it stays out, and the
   menu's row is the way in */
.pc-open{position:relative}
.pc-open .cd{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}
.pc-open .ad{fill:none;stroke:var(--teal);stroke-width:1.5;stroke-linecap:round}
.pc-open .st{fill:var(--amber);opacity:.92}
.pc-open .pf{fill:none;stroke:var(--btn-ink);stroke-width:.9;opacity:.75}
.pc-open.wait,.app.pc-tight .pc-open{display:none}
.app:not(.stage-roomy) .pc-open{width:34px;padding:0;justify-content:center}
.app:not(.stage-roomy) .pc-open .lbl{display:none}

/* the advent calendar's chip (1.3.2, game.js renderAdvBtn): a little calendar of doors, one of them lit (amber), beside Postcard from Dec 1 to Jan 6 while a
   door is still shut, a dot on its corner while today's is unopened. Like Postcard it waits through a scene, an icon only under the widest stage, and
   steps out where the row has no room (.adv-tight, game.js pcFit: the postcard's first) */
.adv-open{position:relative}
.adv-open .cd{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}
.adv-open .pn{fill:none;stroke:var(--teal);stroke-width:1.6;stroke-linecap:round}
.adv-open .dr{fill:var(--rose);opacity:.78}
.adv-open .dl{fill:var(--amber)}
.adv-open.wait,.app.adv-tight .adv-open{display:none}
.app:not(.stage-roomy) .adv-open{width:34px;padding:0;justify-content:center}
.app:not(.stage-roomy) .adv-open .lbl{display:none}
.adv-dot{position:absolute;right:-2px;top:-2px;width:10px;height:10px;border-radius:50%;background:var(--amber);box-shadow:0 0 0 2px var(--night)}

/* Cat status: a slim strip just above the news crawl (the room is framed above both) */
.status{position:absolute;left:max(16px, env(safe-area-inset-left));bottom:calc(var(--news-h-px, var(--news-h)) + 8px);z-index:4;
  width:min(660px, calc(100% - 32px));padding:9px 16px 10px;border-radius:14px;
  background:var(--glass);border:1px solid var(--glass-line);box-shadow:var(--shadow), inset 0 1px 0 var(--hi);-webkit-backdrop-filter:blur(10px) saturate(1.15);backdrop-filter:blur(10px) saturate(1.15);
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;column-gap:20px;align-items:center}
.meter{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"k s v" "b b b";column-gap:8px;align-items:baseline;min-width:0}
.m-row{display:contents;font-size:13px;line-height:1.15}
.m-k{grid-area:k;flex:none;font:800 10.5px/1 var(--f-ui);letter-spacing:.13em;text-transform:uppercase;color:var(--muted)}
.m-state{grid-area:s;min-width:0;font-weight:700;font-size:13px;color:var(--cream);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-val{grid-area:v;flex:none;font-size:12.5px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.bar{grid-area:b;margin-top:7px;position:relative;height:7px;border-radius:99px;background:var(--track);overflow:hidden}
.zone{position:absolute;top:0;bottom:0}
/* the mood's own thresholds (game.js moodOf): annoyed from 55, on the edge from 85 */
.z1{left:55%;width:30%;background:var(--amber-wash)}
.z2{left:85%;right:0;background:var(--rose-wash)}
.fill{position:absolute;inset:0;transform-origin:left center;transform:scaleX(0)}
.bar-mood .fill{background:linear-gradient(90deg,var(--muted),var(--cream))}
.bar-mood[data-lvl="warn"] .fill{background:linear-gradient(90deg,var(--amber-deep),var(--amber))}
.bar-mood[data-lvl="edge"] .fill,.bar-mood[data-lvl="bite"] .fill{background:linear-gradient(90deg,var(--rose-lo),var(--rose))}
.bar-nap .fill{background:linear-gradient(90deg,var(--teal-lo),var(--teal))}
.status[data-mood="edge"] .meter:first-child .m-state,.status[data-mood="bite"] .meter:first-child .m-state{color:var(--rose)}
.status[data-mood="sleep"] .meter:nth-child(2) .m-state{color:var(--teal)}
.status[data-mood="hunt"] .meter:first-child .m-state{color:var(--amber)}
.m-pet{display:flex;flex-direction:column;align-items:flex-end;gap:4px;padding-left:18px;border-left:1px solid var(--glass-line);
  font:800 9.5px/1 var(--f-ui);letter-spacing:.13em;text-transform:uppercase;color:var(--muted);white-space:nowrap}
.m-pet b{font:800 19px/1 var(--f-display);font-variation-settings:var(--soft);color:var(--amber);font-variant-numeric:tabular-nums;white-space:nowrap;letter-spacing:0;text-transform:none}
.m-pet .u{font:600 12px/1 var(--f-ui);color:var(--muted)}

/* News crawl */
.news{position:absolute;left:0;right:0;bottom:0;z-index:4;height:var(--news-h);display:flex;align-items:center;gap:12px;padding:0 16px 0 max(16px, env(safe-area-inset-left));transition:opacity .2s;
  background:linear-gradient(0deg,var(--glass-strong),var(--glass));border-top:1px solid var(--glass-line)}
.news-k{flex:none;font:800 10px/1 var(--f-ui);letter-spacing:.16em;text-transform:uppercase;color:var(--btn-ink);background:var(--amber);padding:5px 8px 4px;border-radius:5px}
.news-win{flex:1;min-width:0;overflow:hidden;white-space:nowrap;transition:opacity .35s;
  -webkit-mask-image:linear-gradient(90deg,var(--mask) calc(100% - 28px),transparent);mask-image:linear-gradient(90deg,var(--mask) calc(100% - 28px),transparent)}
.news.fade .news-win{opacity:0}
.news-t{display:inline-block;padding-right:28px;font:400 17px/1.1 var(--f-hand);color:var(--cream);letter-spacing:.01em}
.news-t.scroll{animation:crawl var(--dur,8s) linear 2.4s both}
@keyframes crawl{from{transform:translateX(0)}to{transform:translateX(var(--shift))}}

/* Thought bubble (tracks Scene.anchor('mainCatHead')) */
.bubble{position:absolute;left:0;top:0;z-index:2;width:max-content;max-width:244px;padding:9px 15px 10px;border-radius:20px;
  background:var(--paper);color:var(--paper-ink);box-shadow:0 10px 26px var(--shadow-c), inset 0 -2px 0 var(--paper-shade);
  pointer-events:none;transition:opacity .25s}
.bubble p{font:400 17px/1.17 var(--f-hand);letter-spacing:.005em}
.bubble.pop p{animation:pop .32s ease-out}
.bubble[data-mood="bite"] p,.bubble[data-mood="edge"] p{color:var(--rose-lo)}
.tail-dot{position:absolute;left:0;top:0;z-index:2;border-radius:50%;background:var(--paper);pointer-events:none;box-shadow:0 3px 8px var(--shadow-c);transition:opacity .25s}
.tail-dot.d1{width:12px;height:12px;margin:-6px 0 0 -6px}
.tail-dot.d2{width:7px;height:7px;margin:-3.5px 0 0 -3.5px}
.bubble.off,.tail-dot.off{opacity:0}
.status.thru,.bubble.thru,.tail-dot.thru,.news.thru{opacity:.36}
/* a secret cat (or the red dot) under the HUD's round buttons: they fade and let the taps through to her */
.hud-tools{transition:opacity .2s}
/* a move's page over the stage (stage 3's H22, the game's scenePageUp): the HUD steps aside while it rests, so the cream
   paper reads whole (its scrim, made for the dark room, smudged it), and comes back as the page goes out */
/* (and a toast still up from before Begin: the scene holds new ones, stage 3's H23) */
.app.on-page .hud-bank,.app.on-page .hud-side,.app.on-page .toasts{opacity:0;transition:opacity .22s}
.app.in-scene .hud-bank,.app.in-scene .hud-side,.app.in-scene .toasts{transition:opacity .3s}
.hud-tools.thru{opacity:.36}
.hud-tools.thru .icon-btn,.hud-tools.thru .save{pointer-events:none}
.bubble.rest,.tail-dot.rest{opacity:0;transition:opacity .9s ease}
.bubble.hush,.tail-dot.hush{opacity:0;transition:opacity .15s ease}
.status{transition:opacity .2s}
@keyframes pop{from{transform:scale(.94);opacity:.4}to{transform:none;opacity:1}}

/* Transparent hit targets that follow the scene */
.hit{position:absolute;left:0;top:0;width:0;height:0;padding:0;margin:0;border:0;background:transparent;border-radius:22px;cursor:pointer;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.hit-cat{z-index:3}
.hit-mouse,.hit-laser{z-index:6;border-radius:50%}
.hit-visit{z-index:6;border-radius:40%}
.hit-glass,.hit-zoom{z-index:6;border-radius:40%}
.hit-basket{z-index:6;border-radius:40%}
/* stage 6's room events (game.js's pool: a gecko, a fly, a bird, a kitten, two hairballs): their container lays nothing out, each button
   is placed over its thing as the others are */
.ev-btns{display:contents}
.hit-ev{z-index:6;border-radius:40%}
.hit:focus-visible{outline:2px dashed var(--amber);outline-offset:4px}
/* (after the shorthand above, which would set the colour back to amber) */
.hit-laser:focus-visible,.hit-mouse:focus-visible{outline-color:var(--rose)}
.hit-visit:focus-visible{outline-color:var(--lilac)}
.hit-nb:focus-visible,.hit-basket:focus-visible{outline-color:var(--teal)}
.hit-ev:focus-visible{outline-color:var(--amber)}

/* Floating feedback */
.fx{position:absolute;inset:0;z-index:5;pointer-events:none;overflow:hidden}
.floater{position:absolute;transform:translate(-50%,-50%);white-space:nowrap;font:800 25px/1 var(--f-display);font-variation-settings:var(--soft);
  color:var(--amber);text-shadow:0 2px 0 var(--shadow-c), 0 0 18px var(--amber-glow);animation:floatUp 1s cubic-bezier(.2,.7,.3,1) forwards}
.floater.big{font-size:32px}
.floater.hiss{color:var(--rose);font:400 30px/1 var(--f-hand);text-shadow:0 2px 0 var(--shadow-c), 0 0 16px var(--rose-glow)}
.floater.wake{color:var(--teal);font:400 28px/1 var(--f-hand)}
/* stage 6 (1.3, P2): her Best Purr's word, where her waking word goes, in gold, a little longer */
.floater.best{color:var(--gold);font:400 30px/1 var(--f-hand);text-shadow:0 2px 0 var(--shadow-c), 0 0 18px var(--gold-line);animation-duration:1.5s}
.floater.hmph{color:var(--cream);font:400 28px/1 var(--f-hand);text-shadow:0 2px 0 var(--shadow-c), 0 0 16px var(--lilac-glow)}
/* stage 4: a pet's number rises beside her head and away from it, and a boop answers a tap that came too soon (first-steps.md) */
.floater.pet{animation:petUp .85s cubic-bezier(.2,.7,.3,1) forwards;
  text-shadow:1.5px 0 0 var(--heat-line),-1.5px 0 0 var(--heat-line),0 1.5px 0 var(--heat-line),0 -1.5px 0 var(--heat-line),1.1px 1.1px 0 var(--heat-line),-1.1px 1.1px 0 var(--heat-line),1.1px -1.1px 0 var(--heat-line),-1.1px -1.1px 0 var(--heat-line),0 3px 0 var(--shadow-c)}
.floater.pet.r{animation-name:petUpR}
/* a long number's word, under its digits (petNumber) */
.floater.pet small{display:block;font-size:.54em;text-align:center}
/* her mood in the number (petHeat): colour for the eye at the edge of the view and size for anyone who can't tell the colours apart.
   The dark line round it is what holds the red in a bright room, a glow fades into it */
.floater.pet.h1{color:var(--heat1);font-size:27px}
.floater.pet.h2{color:var(--heat2);font-size:29px}
.floater.pet.h3{color:var(--heat3);font-size:32px}
.floater.pet.h4{color:var(--heat4);font-size:35px}
.floater.boop{color:var(--cream);font:400 26px/1 var(--f-hand);rotate:-6deg;text-shadow:0 2px 0 var(--shadow-c), 0 0 16px var(--lilac-glow);animation:petUp .75s ease-out forwards}
.floater.boop.r{rotate:6deg;animation-name:petUpR}
@keyframes petUp{0%{opacity:0;transform:translate(-50%,-30%) scale(.8)}14%{opacity:1;transform:translate(-50%,-50%) scale(1.05)}100%{opacity:0;transform:translate(calc(-50% - 44px),calc(-50% - 56px)) scale(.7)}}
@keyframes petUpR{0%{opacity:0;transform:translate(-50%,-30%) scale(.8)}14%{opacity:1;transform:translate(-50%,-50%) scale(1.05)}100%{opacity:0;transform:translate(calc(-50% + 44px),calc(-50% - 56px)) scale(.7)}}
.floater.stray{color:var(--cream);font:400 23px/1 var(--f-hand);text-shadow:0 2px 0 var(--shadow-c), 0 0 16px var(--teal-line);animation-duration:1.6s}
.floater.tag{font:700 14px/1 var(--f-ui);color:var(--cream);background:var(--glass-strong);padding:7px 11px;border-radius:999px;border:1px solid var(--glass-line);text-shadow:none;animation-duration:1.6s}
.floater.note{font:400 16px/1.2 var(--f-hand);color:var(--paper-ink);background:var(--paper);padding:7px 11px;border-radius:12px;white-space:normal;width:max-content;max-width:220px;text-shadow:none;animation:noteUp 2.6s ease-out forwards}
@keyframes floatUp{0%{opacity:0;transform:translate(-50%,-30%) scale(.8)}14%{opacity:1;transform:translate(-50%,-62%) scale(1.06)}100%{opacity:0;transform:translate(-50%,-170%) scale(1)}}
@keyframes noteUp{0%{opacity:0;transform:translate(-50%,-80%)}10%,80%{opacity:1;transform:translate(-50%,-110%)}100%{opacity:0;transform:translate(-50%,-130%)}}
/* no room above the tap point (the top of the stage, or the HUD): the note hangs below it */
.floater.note.below{transform:translate(-50%,0);animation-name:noteDown}
@keyframes noteDown{0%{opacity:0;transform:translate(-50%,-20%)}10%,80%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-14%)}}

.bite-stamp{position:absolute;z-index:7;left:50%;top:40%;opacity:0;pointer-events:none;transform:translate(-50%,-50%) rotate(-10deg);
  font:900 46px/1 var(--f-display);font-variation-settings:var(--soft);letter-spacing:.04em;color:var(--rose);
  border:4px solid var(--rose);border-radius:12px;padding:5px 16px 8px;background:var(--stamp-bg);text-shadow:0 0 22px var(--rose-glow)}
.bite-stamp.show{animation:stamp .3s cubic-bezier(.3,1.6,.5,1) forwards}
@keyframes stamp{from{opacity:0;transform:translate(-50%,-50%) rotate(-18deg) scale(1.9)}to{opacity:1;transform:translate(-50%,-50%) rotate(-10deg) scale(1)}}
.stage.shake .scene{animation:shake .34s linear}
@keyframes shake{0%,100%{transform:none}20%{transform:translate(-6px,2px) scale(1.012)}40%{transform:translate(5px,-3px) scale(1.012)}60%{transform:translate(-3px,2px) scale(1.012)}80%{transform:translate(2px,-1px) scale(1.012)}}

.edge-chip{position:absolute;left:max(10px, env(safe-area-inset-left));z-index:6;height:32px;padding:0 12px;border-radius:999px;border:1px solid var(--rose-line);background:var(--glass-strong);
  color:var(--cream);font:700 13px/1 var(--f-ui);cursor:pointer;touch-action:manipulation;animation:nudgeL 1.1s ease-in-out infinite}
.edge-chip.r{left:auto;right:10px;animation-name:nudgeR}
/* its nudge goes the way its arrow points (data-dir; up and down in the Shop height's strip) */
.edge-chip[data-dir="u"]{animation-name:nudgeU}
.edge-chip[data-dir="d"]{animation-name:nudgeD}
.edge-chip[data-which="neko"],.edge-chip[data-which="bayun"],.edge-chip[data-which="cheshire"],.edge-chip[data-which="maneki"],.edge-chip.guest{border-color:var(--lilac-line)}
.edge-chip[data-which="glass"],.edge-chip[data-which="zoomies"]{border-color:var(--amber-line)}
.edge-chip[data-which="basket"]{border-color:var(--teal-line)}
.edge-chip[data-which^="ev."]{border-color:var(--amber-line)}
@keyframes nudgeL{50%{transform:translateX(-4px)}}
@keyframes nudgeR{50%{transform:translateX(4px)}}
@keyframes nudgeU{50%{transform:translateY(-3px)}}
@keyframes nudgeD{50%{transform:translateY(3px)}}

/* the new-life scene: Skip (once one has been seen to the end), bottom right of the room beside the status strip, or just
   above it where the strip reaches under it (--skip-bottom, set by measure) */
.skip-btn{position:absolute;right:max(16px, env(safe-area-inset-right));bottom:var(--skip-bottom, calc(var(--news-h-px, var(--news-h)) + 14px));z-index:6;
  display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 15px 0 11px;border-radius:999px;border:1px solid var(--glass-line);
  background:var(--glass-strong);color:var(--cream);font:700 13px/1 var(--f-ui);cursor:pointer;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);touch-action:manipulation;
  animation:skipIn .5s ease-out .5s both}
.skip-btn svg{width:16px;height:16px;flex:none;fill:currentColor}
.skip-btn:hover{border-color:var(--amber-line);color:var(--amber-hi)}
@keyframes skipIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
/* the HUD's life pips tick on to the new life as she pops out of her box (and on the ascension, .up, its new star with them) */
.lives.tick .pip.cur svg,.lives.tick.up .stars svg:last-of-type{animation:pipTick .6s cubic-bezier(.3,1.6,.5,1)}
@keyframes pipTick{from{transform:scale(1.9)}to{transform:none}}

/* Toasts */
.toasts{position:absolute;left:50%;top:var(--toast-top,14px);z-index:8;transform:translateX(-50%);width:min(380px,calc(100% - 32px));
  display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none}
.toast{display:flex;align-items:center;gap:10px;max-width:100%;padding:9px 15px 9px 10px;border-radius:14px;background:var(--glass-strong);
  border:1px solid var(--glass-line);box-shadow:var(--shadow);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);font:600 14px/1.25 var(--f-ui);color:var(--cream);
  animation:toastIn .38s cubic-bezier(.2,.9,.3,1.2)}
.toast.long{flex-wrap:wrap;gap:6px 10px}
.toast.long .x{flex-basis:100%}
.toast .k{flex:none;font:800 10px/1 var(--f-ui);letter-spacing:.14em;text-transform:uppercase;color:var(--btn-ink);background:var(--amber);padding:5px 7px 4px;border-radius:6px}
.toast.trophy{border-color:var(--amber-line)}
.toast.trophy .k{background:var(--cream)}
.toast.hot{border-color:var(--rose-line)}
.toast.hot .k{background:var(--rose);color:var(--ink)}
.toast.secret{border-color:var(--lilac-line)}
.toast.secret .k{background:var(--lilac);color:var(--ink)}
.toast.spooky{border-color:var(--pumpkin-line)}
.toast.spooky .k{background:var(--pumpkin);color:var(--ink)}
.toast.medal{border-color:var(--amber-line);box-shadow:var(--shadow), 0 0 22px var(--amber-glow)}
/* Charmed Life's free cat (stage 3): "On the house", clover green */
.toast.lucky{border-color:var(--clover-line)}
.toast.lucky .k{background:var(--clover);color:var(--ink)}
.toast.medal .k{background:linear-gradient(180deg,var(--amber-hi),var(--amber))}
/* the chapters: a goal done, a stamp (in sealing wax), a ribbon (silver) */
.toast.chapter{border-color:var(--teal-line)}
.toast.chapter .k{background:var(--teal);color:var(--ink)}
.toast.stamp{border-color:var(--wax-line);box-shadow:var(--shadow), 0 0 22px var(--amber-glow)}
.toast.stamp .k{background:var(--wax);color:var(--ink)}
.toast.ribbon{border-color:var(--silver-line)}
.toast.ribbon .k{background:linear-gradient(180deg,var(--cream),var(--silver));color:var(--ink)}
.toast.out{opacity:0;transform:translateY(-6px);transition:opacity .3s, transform .3s}
.rm .toast.out{transform:none}
@keyframes toastIn{from{opacity:0;transform:translateY(-10px) scale(.96)}to{opacity:1;transform:none}}

/* The Supporter card (the asks, design/v4/asks.md; game.js askCardOpen): a small card that slides up at the bottom of the room above
   the Purr News bar, no dimming and no sound, the game running under it. Not a dialog, so it takes no focus; "tight" (game.js: a
   room under 330 px high, a phone at the Split height or turned sideways) sets the words smaller and the buttons side by side */
.ask-card{position:absolute;left:0;right:0;bottom:calc(var(--news-h-px, var(--news-h)) + 10px);z-index:7;box-sizing:border-box;width:min(360px,calc(100% - 24px));margin:0 auto;
  padding:11px 13px 11px;border-radius:16px;background:var(--glass-strong);border:1px solid var(--amber-line);box-shadow:var(--shadow), 0 0 22px var(--amber-glow);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:var(--cream);text-align:left;
  opacity:0;transform:translateY(calc(100% + 24px));transition:transform .34s cubic-bezier(.2,.9,.3,1.05), opacity .3s}
.ask-card.in{opacity:1;transform:none}
/* (1.4: the card's picture and its two lines, the app's own from stage 7: src/plat/app.css) */
.ask-pic,.ask-w{display:none}
.ask-t{margin:0 0 3px;font:400 20px/1.1 var(--f-hand);color:var(--amber-hi)}
.ask-x{margin:0 0 9px;font:500 13px/1.33 var(--f-ui);color:var(--cream-dim)}
.ask-p{font-weight:800;color:var(--cream);white-space:nowrap}
.ask-b{display:flex;gap:8px}
.ask-see,.ask-no{height:44px;border-radius:10px;font:800 14px/1 var(--f-ui);cursor:pointer;touch-action:manipulation}
.ask-see{flex:1 1 auto;padding:0 18px;border:0;background:linear-gradient(180deg,var(--amber-hi),var(--amber) 55%,var(--amber-lo));color:var(--btn-ink);box-shadow:0 3px 0 var(--amber-deep)}
.ask-see:active{transform:translateY(2px);box-shadow:0 1px 0 var(--amber-deep)}
.ask-no{flex:none;padding:0 16px;border:1px solid var(--line);background:none;color:var(--muted);font-weight:700}
.ask-no:hover{color:var(--cream);border-color:var(--muted)}
/* the web version's phone (design/v4/web.md 2.4; game.js invCardOpen, openPhone): the invite's Show me on one line, the
   sheet's two stores' buttons (links that open the store in a new tab) and its Don't ask again */
.ask-card[data-id="phone"] .ask-see{white-space:nowrap}
.phone-never{display:block;margin:2px auto 6px;padding:4px 8px;border:0;background:none;color:var(--muted);font:600 13px/1.2 var(--f-ui);text-decoration:underline;cursor:pointer;touch-action:manipulation}
.phone-never:hover{color:var(--cream)}
.store-btns{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:14px 0 8px}
.store-btn,.modal .store-btn{flex:1 1 150px;max-width:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:54px;
  padding:8px 14px;box-sizing:border-box;border-radius:12px;background:rgba(0,0,0,.3);border:1px solid var(--amber-line);
  color:var(--cream);text-decoration:none;touch-action:manipulation}
.store-btn b{font:800 16px/1.1 var(--f-ui);color:var(--amber-hi)}
.store-btn small{font:600 12px/1.1 var(--f-ui);color:var(--cream-dim)}
.store-btn:hover{border-color:var(--amber-hi)}
.store-btn:active{transform:translateY(1px)}
.store-btn:focus-visible{outline:2px solid var(--cream);outline-offset:2px}
.ask-card.tight{padding:8px 11px 9px;border-radius:14px}
.ask-card.tight .ask-t{display:inline;margin:0 5px 0 0;font-size:17px}
.ask-card.tight .ask-x{display:inline;font-size:12px;line-height:1.28}
.ask-card.tight .ask-x::after{content:'';display:block;height:7px}
.ask-card.tight .ask-see,.ask-card.tight .ask-no{height:40px;font-size:13px}
/* ("tiny": a room under 200 px high, a 320 px phone at the Split height under its banner: no room above the news bar for six lines
   and two buttons, so the card sits over the bar for its 20 s, the words smaller still) */
.ask-card.tiny{bottom:4px;padding:6px 10px 7px}
.ask-card.tiny .ask-t{font-size:15px}
.ask-card.tiny .ask-x{font-size:11.5px;line-height:1.24}
.ask-card.tiny .ask-x::after{height:5px}
.ask-card.tiny .ask-see,.ask-card.tiny .ask-no{height:36px;font-size:12.5px}
/* (a wide room has the mood and nap meters on its floor: the card sits at the right, above them, and no wider than the room right of her:
   she stands in the middle, so a room of 800 px (a tablet sideways) leaves 299 px) */
.app:not(.docked) .ask-card{left:auto;right:16px;bottom:calc(var(--news-h-px, var(--news-h)) + 74px);margin:0;width:clamp(220px,calc(50% - 101px),340px)}
/* (a phone, docked: the room is a strip and she stands in it, so the card is one line over the Purr News bar, never over her: the name
   and the price (data-short) and the two buttons; the whole words stay in the card, clipped, for the screen reader) */
.app.docked .ask-card{bottom:0;display:flex;align-items:center;gap:8px;width:100%;max-width:none;padding:5px 10px 5px 14px;border-radius:14px 14px 0 0;border-width:1px 0 0}
.app.docked .ask-card::before{content:attr(data-short);flex:1 1 auto;min-width:0;font:800 13px/1.15 var(--f-ui);color:var(--cream)}
.app.docked .ask-card .ask-t,.app.docked .ask-card .ask-x{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.app.docked .ask-card .ask-b{flex:none;gap:6px}
.app.docked .ask-card .ask-see,.app.docked .ask-card .ask-no{height:40px;padding:0 14px;font-size:13px}
.rm .ask-card{transform:none;transition:opacity .2s}
/* stage 6's postcard (design/v4/postcard.md 6, 7; game.js openPostcard, pcCardOpen). The small card (#pcCard) is an .ask-card above, its
   docked phone's line its data-short. The dialog: the preview (the shared JPEG, square, on the night with the home's postcard as its
   placeholder), the choices as chips that wrap, the name box, a note; Cancel and Share stay at the card's foot while its body scrolls.
   The preview is 300 px (a tablet, a desktop), 280 on a tall phone, 260 under 760 px of height, 240 under 600 or 340 of width; a phone
   held sideways has two columns, the preview 150 px at the left */
.modal[data-kind="postcard"] .modal-card{width:min(420px,100%);padding:20px 18px 14px;display:grid;grid-template-columns:1fr auto auto 1fr;
  grid-template-rows:auto auto minmax(0,1fr) auto;overflow:hidden}
.modal[data-kind="postcard"] .modal-kicker,.modal[data-kind="postcard"] .modal-title,.modal[data-kind="postcard"] .modal-body{grid-column:1 / -1}
.modal[data-kind="postcard"] .modal-title{margin-bottom:10px;font-size:28px}
.modal[data-kind="postcard"] .modal-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;margin:0 -6px;padding:0 6px}
.modal[data-kind="postcard"] .modal-cancel{grid-column:2;grid-row:4;margin:12px 0 0}
.modal[data-kind="postcard"] #modalBtn{grid-column:3;grid-row:4;margin:12px 0 0 8px;min-width:150px}
.modal[data-kind="postcard"] #modalBtn[aria-disabled="true"]{opacity:.6;cursor:default}
.pc-form{--pc-px:280px;display:flex;flex-direction:column;align-items:center;gap:10px}
.pc-prev{position:relative;flex:none;width:var(--pc-px);height:var(--pc-px);border-radius:10px;overflow:hidden;background:#15131f;box-shadow:0 6px 18px rgba(8,6,14,.5)}
.pc-prev img{display:block;width:100%;height:100%}
.pc-prev img[hidden]{display:none}
.pc-prev .pc-ph{position:absolute;left:4.5%;top:4%;width:91%;height:auto;border-radius:2px;opacity:.85}
.pc-side{display:flex;flex-direction:column;align-items:stretch;gap:8px;width:100%;min-width:0}
.pc-kinds{margin:0;padding:0;border:0;display:flex;flex-wrap:wrap;justify-content:center;gap:6px;min-width:0}
.pc-kinds legend{width:100%;margin:0 0 6px;padding:0;font:700 13.5px/1.35 var(--f-ui);color:var(--cream)}
.pc-r{display:flex;align-items:center;gap:8px;min-height:44px;box-sizing:border-box;padding:4px 12px;border-radius:10px;border:1px solid var(--line);background:var(--ink-wash);
  font:600 13.5px/1.25 var(--f-ui);color:var(--cream-dim);text-align:left;cursor:pointer;touch-action:manipulation}
.pc-r input{flex:none;width:16px;height:16px;margin:0;accent-color:var(--amber)}
.pc-r:has(input:checked){border-color:var(--amber-line);background:var(--amber-wash);color:var(--cream)}
.pc-r:has(input:focus-visible){outline:2px solid var(--amber);outline-offset:1px}
.pc-kinds .pc-r{flex:0 1 auto;max-width:100%}
.pc-name{align-self:center;max-width:100%}
.modal-body p.pc-note{margin:0;min-height:0;font-size:13px;line-height:1.35;color:var(--muted)}
.modal-body p.pc-note:empty{display:none}
@media (max-height:759px){ .pc-form{--pc-px:260px} }
@media (max-height:599px), (max-width:340px){ .pc-form{--pc-px:240px} .modal[data-kind="postcard"] .modal-title{font-size:25px;margin-bottom:8px} }
@media (min-width:600px) and (min-height:760px){ .pc-form{--pc-px:300px} }
@media (orientation:landscape) and (max-height:520px){
  .modal[data-kind="postcard"] .modal-card{width:min(600px,100%);padding:14px 16px 10px}
  .modal[data-kind="postcard"] .modal-kicker{margin-bottom:4px}
  .modal[data-kind="postcard"] .modal-title{font-size:21px;margin-bottom:8px}
  .pc-form{--pc-px:150px;flex-direction:row;align-items:flex-start;gap:14px}
  .pc-kinds{justify-content:flex-start}
  .pc-name{align-self:flex-start}
  .modal[data-kind="postcard"] .modal-cancel,.modal[data-kind="postcard"] #modalBtn{height:44px;margin-top:8px}
}

/* the advent calendar (1.3.2, game.js openAdvent): 25 doors in a 5 by 5 grid, a little shuffled as a paper calendar's are; the selected door's panel under
   it with its button; an opened door shows its reward's picture. Today's door glows softly (amber), a missed one wears a small play mark (the ad), a
   future one only its number. The grand reward's card shows the box, the hat and scarf and the +5%. A phone held sideways has two columns */
.modal[data-kind="advent"] .modal-card{width:min(440px,100%);padding:20px 16px 14px}
.modal[data-kind="advent"] .modal-title{margin-bottom:6px;font-size:28px}
.modal[data-kind="advent"] .modal-body{margin:0 -2px}
.modal[data-kind="advent"] #modalBtn{margin-top:10px;height:40px;background:none;box-shadow:none;border:1px solid var(--line);color:var(--muted);font-weight:700;font-size:14px}
.modal[data-kind="advent"] #modalBtn:hover{color:var(--cream);border-color:var(--muted)}
.adv-lead{margin:0 0 10px;font-size:14px;line-height:1.35;color:var(--muted)}
.adv-grid{list-style:none;margin:0 0 10px;padding:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
.adv-grid li{min-width:0}
.adv-door{position:relative;display:block;width:100%;aspect-ratio:1 / 1.1;padding:0;border-radius:11px 11px 6px 6px;border:1px solid var(--plum-4);overflow:hidden;cursor:pointer;touch-action:manipulation;
  background:linear-gradient(165deg,var(--plum-4),var(--plum-3) 55%,var(--plum-2));color:var(--cream);box-shadow:inset 0 1px 0 var(--hi),0 2px 0 rgba(8,6,14,.5);transition:transform .12s, filter .15s}
.adv-door::before{content:"";position:absolute;inset:5px;border-radius:7px 7px 3px 3px;border:1px solid rgba(255,235,200,.14);pointer-events:none}
.adv-door::after{content:"";position:absolute;right:9px;top:54%;width:5px;height:5px;border-radius:50%;background:var(--amber);box-shadow:0 0 0 1px var(--amber-deep);opacity:.85}
.adv-door:hover{filter:brightness(1.08)}
.adv-door:active{transform:translateY(2px)}
.adv-door:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
.adv-door.sel{border-color:var(--cream);box-shadow:0 0 0 2px rgba(245,234,214,.5),inset 0 1px 0 var(--hi)}
.adv-n{position:absolute;left:0;right:0;top:22%;text-align:center;font:900 22px/1 var(--f-display);font-variation-settings:var(--soft);font-variant-numeric:lining-nums tabular-nums;color:var(--cream);text-shadow:0 1px 0 rgba(8,6,14,.5)}
.adv-door.shut{filter:saturate(.7) brightness(.82)}
.adv-door.shut::after{opacity:.4}
.adv-door.shut .adv-n{color:var(--muted)}
.adv-door.ad .adv-n,.adv-door.free .adv-n,.adv-door.spent .adv-n{color:var(--rose-soft, var(--cream))}
.adv-door.spent{filter:saturate(.6) brightness(.78)}
.adv-bd{position:absolute;left:50%;bottom:7px;width:20px;height:16px;margin-left:-10px;border-radius:8px;background:var(--amber);color:var(--btn-ink);display:grid;place-items:center}
.adv-bd svg{width:11px;height:11px;fill:currentColor}
.adv-door.today{border-color:var(--amber);background:linear-gradient(165deg,#5a4a52,var(--plum-4) 55%,var(--plum-3));animation:advGlow 2.6s ease-in-out infinite}
.adv-door.today .adv-n{color:var(--amber-hi, var(--amber));top:30%}
.adv-door.today::after{opacity:1;box-shadow:0 0 6px 2px var(--amber-glow)}
@keyframes advGlow{0%,100%{box-shadow:0 0 0 0 rgba(242,180,90,0),0 0 10px 1px rgba(242,180,90,.28),inset 0 1px 0 var(--hi)}50%{box-shadow:0 0 0 1px rgba(242,180,90,.35),0 0 18px 4px rgba(242,180,90,.5),inset 0 1px 0 var(--hi)}}
/* an opened door: its inside lit, the leaf swung back at the left, its reward's picture, its number small in the corner */
.adv-door.done{background:radial-gradient(90% 80% at 55% 60%,#ffe7b0,#f2b45a 62%,#c9822f);border-color:var(--amber-deep);color:var(--btn-ink)}
.adv-door.done::before{inset:0 auto 0 0;width:24%;border-radius:0;border:0;background:linear-gradient(90deg,var(--plum-4),var(--plum-3));box-shadow:2px 0 5px rgba(8,6,14,.35);transform-origin:left center}
.adv-door.done::after{display:none}
.adv-door.done .adv-n{left:auto;right:6px;top:5px;width:auto;font-size:11px;font-weight:800;color:rgba(42,25,6,.62);text-shadow:none}
.adv-ic{position:absolute;left:30%;right:4%;top:24%;bottom:10%;display:grid;place-items:center}
.adv-ic svg{width:78%;height:78%;fill:currentColor}
.adv-door[data-k="purrs"] .adv-ic{color:#7a3d12}
.adv-door[data-k="cats"] .adv-ic{color:#3a2a12}
.adv-door[data-k="boost"] .adv-ic{color:#8a2a1a}
.adv-door[data-k="mouse"] .adv-ic{color:#5a3a6a}
.adv-door[data-k="sale"] .adv-ic{color:#3a3a78}
.adv-door[data-k="star"] .adv-ic{color:#8a2a2a}
/* a door just opened: the leaf swings back, the picture pops, a ring of light goes out (not under reduced motion: the door is simply open) */
.adv-door.done.just::before{animation:advLeaf .7s cubic-bezier(.2,.8,.3,1) both}
.adv-door.done.just .adv-ic{animation:advPop .6s .15s cubic-bezier(.2,1.3,.4,1) both}
.adv-door.done.just{animation:advRing .9s ease-out}
@keyframes advLeaf{from{width:100%;box-shadow:none}to{width:24%}}
@keyframes advPop{from{transform:scale(.2) rotate(-14deg);opacity:0}to{transform:none;opacity:1}}
@keyframes advRing{0%{box-shadow:0 0 0 0 rgba(255,231,176,.9)}100%{box-shadow:0 0 0 16px rgba(255,231,176,0)}}
html.rm .adv-door.done.just,html.rm .adv-door.done.just::before,html.rm .adv-door.done.just .adv-ic,html.rm .adv-door.today{animation:none}
.adv-det{min-height:96px;padding:10px 12px 12px;border-radius:12px;border:1px solid var(--line);background:var(--ink-wash);text-align:left;display:flex;flex-direction:column;gap:4px}
.adv-dt{margin:0;font:800 11px/1 var(--f-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--amber)}
.modal-body .adv-dx{margin:0;font-size:14.5px;line-height:1.35;color:var(--cream-dim)}
.modal-body .adv-won{font-size:16px;font-weight:700;color:var(--cream)}
.adv-go{height:44px;margin-top:6px;width:100%}
.adv-go svg{width:16px;height:16px;fill:currentColor;flex:none}
.adv-go[aria-disabled="true"]{opacity:.7;cursor:progress}
.modal-body .adv-left{margin:4px 0 0;text-align:center;font:600 12.5px/1 var(--f-ui);color:var(--muted)}
.modal-body .adv-msg{margin:8px 0 0;min-height:1.2em;text-align:center}
.adv-msg:empty{display:none}
/* the grand reward's card */
.adv-tiles{display:flex;gap:8px;justify-content:center;margin:2px 0 12px}
.adv-tile{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:2px;padding:10px 4px 9px;border-radius:12px;border:1px solid var(--amber-line, var(--line));background:var(--ink-wash);text-align:center}
.adv-tile b{font:800 13px/1.15 var(--f-ui);color:var(--cream)}
.adv-tile small{font:600 11.5px/1.2 var(--f-ui);color:var(--muted)}
.adv-art{display:grid;place-items:center;width:84px;height:84px;margin-bottom:4px}
.adv-art canvas{width:84px;height:84px;display:block}
.adv-pct .adv-art i{font:900 30px/1 var(--f-display);font-style:normal;font-variation-settings:var(--soft);color:var(--amber);text-shadow:0 0 18px var(--amber-glow)}
.modal-body .adv-gx{margin:0 0 12px;font-size:14.5px;line-height:1.4}
.adv-wear{width:100%;height:44px}
/* the grand reward's costume (1.3.2): two choices side by side, the picked one lit, then a final button */
.modal-body .adv-ch b{color:var(--cream)}
.adv-cos{display:flex;gap:8px;margin:0 0 10px}
.adv-co{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;gap:2px;padding:10px 6px 9px;border-radius:12px;border:1px solid var(--line);background:var(--ink-wash);color:inherit;text-align:center;cursor:pointer;touch-action:manipulation;font:inherit}
.adv-co b{font:800 13.5px/1.15 var(--f-ui);color:var(--cream)}
.adv-co small{font:600 11.5px/1.25 var(--f-ui);color:var(--muted)}
.adv-co:hover{border-color:var(--muted)}
.adv-co:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
.adv-co.sel{border-color:var(--amber);box-shadow:0 0 0 2px rgba(242,180,90,.35),inset 0 1px 0 var(--hi)}
.adv-wear[aria-disabled="true"]{opacity:.55;cursor:default}
.modal-body .adv-final{margin:6px 0 0;text-align:center;color:var(--muted)}
@media (max-width:380px){ .adv-co small{display:none} }
.modal[data-mode="grand"] .adv-tile{animation:advRise .5s both}
.modal[data-mode="grand"] .adv-tile:nth-child(2){animation-delay:.12s}
.modal[data-mode="grand"] .adv-tile:nth-child(3){animation-delay:.24s}
@keyframes advRise{from{transform:translateY(10px) scale(.94);opacity:0}to{transform:none;opacity:1}}
html.rm .modal[data-mode="grand"] .adv-tile{animation:none}
@media (max-width:380px){ .adv-tile small{display:none} .adv-art,.adv-art canvas{width:70px;height:70px} }
/* short screens: smaller doors, a plainer card (360 × 568 keeps the grid and the panel on one screen, scrolling a little at most) */
@media (max-height:700px), (max-width:340px){
  .modal[data-kind="advent"] .modal-card{padding:14px 12px 10px}
  .modal[data-kind="advent"] .modal-title{font-size:24px;margin-bottom:4px}
  .modal[data-kind="advent"] .modal-kicker{margin-bottom:5px}
  .adv-lead{margin-bottom:7px;font-size:13px}
  .adv-grid{gap:5px;margin-bottom:7px}
  .adv-door{aspect-ratio:1 / .96;border-radius:9px 9px 5px 5px}
  .adv-door::before{inset:4px}
  .adv-n{font-size:18px;top:20%}
  .adv-det{min-height:84px;padding:8px 10px 10px}
  .adv-go{height:40px;margin-top:4px}
  .modal-body .adv-dx{font-size:13.5px}
  .modal[data-kind="advent"] #modalBtn{height:36px;margin-top:8px}
}
@media (max-height:620px){
  .modal[data-kind="advent"] .modal-kicker{display:none}
  .modal[data-kind="advent"] .modal-title{font-size:21px}
  .adv-door{aspect-ratio:1 / .84}
  .adv-n{font-size:16px;top:18%}
  .adv-det{min-height:0;gap:2px}
  .modal-body .adv-left{margin-top:2px}
}
@media (orientation:landscape) and (max-height:520px){
  .modal[data-kind="advent"] .modal-card{width:min(640px,100%);padding:10px 14px 8px}
  .modal[data-kind="advent"] .modal-title{font-size:20px;margin-bottom:2px}
  .adv-lead{margin-bottom:6px;font-size:12.5px}
  .adv-main{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:12px;align-items:start}
  .adv-grid{gap:4px;margin:0}
  .adv-door{aspect-ratio:1 / .78}
  .adv-n{font-size:15px;top:14%}
  .adv-door::after{right:6px;width:4px;height:4px}
  .adv-bd{bottom:3px;height:12px;width:16px;margin-left:-8px}
  .adv-bd svg{width:9px;height:9px}
  .adv-det{min-height:0}
  .modal[data-kind="advent"] #modalBtn{height:34px;margin-top:6px}
  .adv-art,.adv-art canvas{width:58px;height:58px}
  .adv-tiles{margin-bottom:6px} .adv-tile small{display:none}
}

/* ================= shop ================= */
.shop{grid-area:shop;position:relative;z-index:5;display:flex;flex-direction:column;min-width:0;min-height:0;
  background:linear-gradient(180deg, var(--lamp-wash), transparent 220px), var(--plum);
  border-left:1px solid var(--line);box-shadow:-18px 0 40px var(--shadow-c), inset 12px 0 28px -16px var(--lamp-edge)}
/* the room's wallpaper motif (crescent and star), faintly, so the panel belongs to the same apartment */
.shop::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:var(--motif);opacity:.075;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='92' height='68'%3E%3Cpath d='M29.95 18.36A6 6 0 1 0 37.64 26.05A5.2 5.2 0 0 1 29.95 18.36ZM9 54L10.1 56.9L13 58L10.1 59.1L9 62L7.9 59.1L5 58L7.9 56.9ZM75.95 52.36A6 6 0 1 0 83.64 60.05A5.2 5.2 0 0 1 75.95 52.36ZM55 20L56.1 22.9L59 24L56.1 25.1L55 28L53.9 25.1L51 24L53.9 22.9Z'/%3E%3C/svg%3E") 0 0/92px 68px repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='92' height='68'%3E%3Cpath d='M29.95 18.36A6 6 0 1 0 37.64 26.05A5.2 5.2 0 0 1 29.95 18.36ZM9 54L10.1 56.9L13 58L10.1 59.1L9 62L7.9 59.1L5 58L7.9 56.9ZM75.95 52.36A6 6 0 1 0 83.64 60.05A5.2 5.2 0 0 1 75.95 52.36ZM55 20L56.1 22.9L59 24L56.1 25.1L55 28L53.9 25.1L51 24L53.9 22.9Z'/%3E%3C/svg%3E") 0 0/92px 68px repeat}
.shop > *{position:relative;z-index:1}
.shop > .tabbar{z-index:2}
/* the sheet's handle (phones and tablets held upright): drag it, or the status row under it, to resize the sheet; a
   tap steps to the next height. Its hit area reaches a little above and below the grip. */
.handle{display:none;flex:none;align-items:center;justify-content:center;height:16px;width:100%;cursor:grab;touch-action:none}
.handle::before{content:"";position:absolute;left:0;right:0;top:-10px;bottom:-4px}
.handle .grip{width:40px;height:4px;border-radius:99px;background:var(--line);transition:background .15s, width .15s}
.handle:hover .grip,.app.dragging .handle .grip{background:var(--muted)}
.app.dragging .handle .grip{width:52px}
.dock{display:none}
.tabbar{flex:none;display:flex;align-items:flex-end;padding:8px max(10px, env(safe-area-inset-right)) 0 10px;border-bottom:1px solid var(--wood-line)}
.tabs{flex:1;min-width:0;display:flex;gap:2px}
/* a strip of wood trim under the tabs, like the room's floorboards */
.tabbar::after{content:"";position:absolute;left:0;right:0;bottom:-7px;height:6px;pointer-events:none;
  background:linear-gradient(180deg,var(--wood-l),var(--wood-d));box-shadow:0 3px 8px var(--shadow-c)}
/* the sheet's height for the keyboard and screen readers: its icon shows where the next press takes it */
.sheet-btn{flex:none;align-self:center;display:grid;place-items:center;width:36px;height:36px;margin:0 0 2px 2px;padding:0;border:0;border-radius:10px;
  background:none;color:var(--muted);cursor:pointer;touch-action:manipulation}
.sheet-btn:hover{color:var(--cream);background:var(--hi)}
.sheet-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sheet-btn .down,.sheet-btn[data-next="room"] .up{display:none}
.sheet-btn[data-next="room"] .down{display:inline}
.tab{flex:1 1 auto;position:relative;display:flex;align-items:center;justify-content:center;gap:6px;height:46px;padding:0 8px;border:0;background:none;
  color:var(--muted);font:700 14px/1 var(--f-ui);white-space:nowrap;cursor:pointer;border-radius:10px 10px 0 0;touch-action:manipulation}
.tab:hover{color:var(--cream);background:var(--hi)}
.tab.on{color:var(--cream)}
.tab.on::after{content:"";position:absolute;left:12%;right:12%;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:var(--amber);box-shadow:0 0 12px var(--amber-glow)}
.tab:focus-visible{outline-offset:-3px}
.badge{min-width:19px;height:19px;padding:0 5px;border-radius:999px;display:inline-grid;place-items:center;font:800 11px/1 var(--f-ui);
  background:var(--amber);color:var(--btn-ink);font-variant-numeric:tabular-nums}
.badge.alert{background:var(--rose);color:var(--ink)}
.badge.soft{background:var(--plum-3);color:var(--muted)}
.shop-scroll{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:6px max(var(--gut), env(safe-area-inset-right)) 28px var(--gut);
  scrollbar-width:thin;scrollbar-color:var(--line) transparent}
/* (1.3.1, AN A1) a part of the shop column wholly under an opaque card (game.js coverSync: the title card, the pause menu,
   the mini games' and the Album's panels on a phone): not painted, so no layer of it is kept; its scroll position stays */
.cv-off{visibility:hidden}
.pane-head{position:sticky;top:0;z-index:2;display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:0 calc(-1 * var(--gut));padding:18px var(--gut) 14px;
  background:linear-gradient(180deg,var(--plum) 78%,transparent)}
.ph-text{min-width:0}
.pane-head h2{font:800 25px/1 var(--f-display);font-variation-settings:var(--soft);color:var(--cream);letter-spacing:.005em}
.sub{margin-top:5px;font:400 16px/1.15 var(--f-hand);color:var(--muted)}

/* buy amount */
.seg{flex:none;display:flex;padding:3px;border-radius:12px;background:var(--ink-wash);border:1px solid var(--line)}
.seg button{height:30px;min-width:40px;padding:0 9px;border:0;border-radius:9px;background:none;color:var(--muted);font:800 13px/1 var(--f-ui);
  font-variant-numeric:tabular-nums;cursor:pointer;touch-action:manipulation}
.seg button:hover{color:var(--cream)}
.seg button[aria-pressed="true"]{background:var(--amber);color:var(--btn-ink);box-shadow:inset 0 1px 0 var(--gloss), 0 2px 10px var(--amber-glow)}

/* cat rows */
.cat-list{display:flex;flex-direction:column;gap:8px}
.cat-row{position:relative;display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;column-gap:13px;width:100%;
  padding:11px 14px 11px 11px;border-radius:var(--r-card);border:1px solid var(--line);
  background:linear-gradient(180deg,var(--plum-2),var(--plum-2b));box-shadow:inset 0 1px 0 var(--hi);
  text-align:left;cursor:pointer;touch-action:manipulation;transition:border-color .15s, background .15s, transform .08s}
.cat-row:not(.poor):hover{border-color:var(--amber-line);background:linear-gradient(180deg,var(--plum-3),var(--plum-2))}
.cat-row:not(.poor):active{transform:translateY(1px)}
.cat-row.poor{cursor:default}
.cat-row.poor .por,.cat-row.poor .cr-name,.cat-row.poor .cr-note{opacity:.62}
.por{position:relative;width:56px;height:56px;border-radius:50%;display:grid;place-items:center;
  background:radial-gradient(circle at 50% 30%, var(--plum-4), var(--ink) 80%);box-shadow:0 0 0 2px var(--line), 0 4px 10px var(--shadow-c)}
.cat-row:not(.poor) .por{box-shadow:0 0 0 2px var(--amber-line), 0 4px 12px var(--shadow-c)}
.por-cv{display:block;border-radius:50%}
/* a kitten's portrait in the name dialogs: its own class, so the shop rows' phone sizes for .por-cv leave it alone */
.kit-cv{display:block;border-radius:50%}
.cr-body{display:flex;flex-direction:column;min-width:0}
/* (1.2.1: nothing of a row is cut. A name, a note, a price and the purring line wrap where they do not fit, at a word break, and the row
   grows to hold them; no name is shortened. dev/cards-scan.mjs, app-cdp's C10c, reads every row at every size) */
.cr-name{font:700 16px/1.2 var(--f-ui);color:var(--cream);overflow-wrap:break-word}
.cr-note{margin-top:2px;font:400 15px/1.14 var(--f-hand);color:var(--muted);overflow-wrap:break-word}
.cr-cost{margin-top:6px;font:500 14px/1.2 var(--f-ui);color:var(--muted);font-variant-numeric:tabular-nums}
.cr-prod{margin-top:2px;font:500 12px/1.25 var(--f-ui);color:var(--muted);font-variant-numeric:tabular-nums}
.cr-prod:empty{display:none}
/* (stage 4: what this buy would add, at the line's end, so on phones it sits under the price. It is laid from the right, the gain,
   "yours", then "Each", and what no longer fits on the line takes the next one: "yours" under the gain, "Each" under "yours", the row
   as tall as its lines (1.2.1; before, a max-height cut the lines off: "Each" went first, then "yours"). Each half stays whole on its
   line; only one too long for a line of its own wraps inside. The box still hides what overflows it, as it always did: it is as tall
   as its lines now, so that is only the last letter's edge at its side, drawn as before in a row whose line always fitted. That is
   the wide rows; a phone's compact rows keep the one line and leave out the half that does not fit, below) */
.cr-prod:has(.cr-gain){display:flex;flex-flow:row-reverse wrap;justify-content:flex-end;overflow:hidden}
.cr-rate{display:contents}
.cr-each,.cr-yours,.cr-gain{min-width:0;overflow-wrap:break-word}
.cr-each{order:2;margin-right:.3em}
.cr-yours{order:1}
.cr-gain{margin-left:auto;padding-left:8px;font-weight:700;color:var(--amber)}
.cat-row.poor .cr-gain{color:var(--cream-dim)}
.cr-home{margin-top:2px;font:400 11.5px/1.2 var(--f-ui);color:var(--muted);opacity:.8}
.cr-home:empty{display:none}
.cr-cost b{color:var(--amber);font-weight:800}
.cat-row.poor .cr-cost b{color:var(--cream-dim);font-weight:700}
.cr-own{display:flex;flex-direction:column;align-items:flex-end;gap:6px;min-width:34px}
.cr-n{font:800 29px/1 var(--f-display);font-variation-settings:var(--soft);color:var(--cream);font-variant-numeric:tabular-nums}
.cr-n.zero{color:var(--plum-4)}
/* the minimalist's cap: "7/10"; a full row is done, not out of reach */
.cr-n small:empty{display:none}
.cr-n small{margin-left:1px;font:700 13px/1 var(--f-ui);color:var(--muted);letter-spacing:0}
.cat-row.full .por,.cat-row.full .cr-name,.cat-row.full .cr-note{opacity:1}
.cat-row.full .por{box-shadow:0 0 0 2px var(--teal-line), 0 4px 10px var(--shadow-c)}
.cat-row.full .cr-cost,.cat-row.full .cr-cost b.cap{color:var(--teal)}
.cr-stars{display:grid;grid-template-columns:repeat(4,5px);gap:3px}   /* eight levels a cat (v4): two rows of four */
.cr-stars i{width:5px;height:5px;border-radius:50%;background:var(--plum-4)}
.cr-stars i.on{background:var(--amber);box-shadow:0 0 5px var(--amber-glow)}
.cat-row.unknown .cr-name{letter-spacing:.24em;color:var(--muted)}
.empty.teaser{padding:12px 14px;font-size:16px}
/* the kittens' names: a paper tag hanging under the Kitten row (the row is the buy button, so the tag is its own) */
.kn-open{position:relative;z-index:1;align-self:flex-end;display:inline-flex;align-items:center;gap:6px;margin:-9px 16px 2px 0;padding:6px 13px 7px 10px;
  border:0;border-radius:0 0 11px 11px;background:var(--paper);color:var(--paper-ink);font:400 16px/1 var(--f-hand);cursor:pointer;touch-action:manipulation;
  box-shadow:0 6px 14px var(--shadow-c), inset 0 -2px 0 var(--paper-shade);transition:transform .08s}
.kn-open svg{width:15px;height:15px;fill:var(--amber-deep);flex:none}
.kn-open:hover{transform:translateY(1px)}
.kn-open:focus-visible{outline-offset:3px}
.cat-row.flash{animation:flash 1.3s ease-out}
.nope{animation:nope .32s}
@keyframes flash{0%,30%{border-color:var(--amber);box-shadow:0 0 0 3px var(--amber-wash), inset 0 1px 0 var(--hi)}100%{}}
@keyframes nope{25%{transform:translateX(-4px)}50%{transform:translateX(4px)}75%{transform:translateX(-2px)}}
/* a cat of this row came free (stage 3, Charmed Life): a small clover by its count for 2 s */
.cat-row.lucky::after{content:"";position:absolute;right:10px;top:7px;width:14px;height:14px;pointer-events:none;
  background:radial-gradient(circle at 30% 30%,var(--clover) 0 2.6px,transparent 2.8px),radial-gradient(circle at 70% 30%,var(--clover) 0 2.6px,transparent 2.8px),
    radial-gradient(circle at 30% 70%,var(--clover) 0 2.6px,transparent 2.8px),radial-gradient(circle at 70% 70%,var(--clover) 0 2.6px,transparent 2.8px);
  animation:luckyIn 2s ease-out forwards}
@keyframes luckyIn{0%{opacity:0;transform:scale(.4)}15%{opacity:1;transform:scale(1.15)}25%{transform:scale(1)}80%{opacity:1}100%{opacity:0}}
.rm .cat-row.lucky::after{animation:none}

/* the wait on a price (stage 7, 1.4: design/v4/release-1.4.md Item 16; game.js showWaits): a thin bar along the foot of a row or a card she can't
   pay yet (--w: the bank over the price, 0 to 1), teal on the nearest of its list, which also says when: over a cat's flavor line, which keeps
   its place under it so no row grows, and beside an upgrade's price */
.cat-row[data-w]::before,.upg[data-w]::before{content:"";position:absolute;left:14px;right:14px;bottom:0;height:3px;border-radius:2px 2px 0 0;pointer-events:none;
  background:linear-gradient(90deg,var(--wc,var(--plum-4)) calc(var(--w) * 100%),transparent 0)}
.upg[data-w]{position:relative}
.cat-row.wait-near,.upg.wait-near{--wc:var(--teal)}
.cr-note[data-ready]{position:relative;color:transparent}
.cat-row.poor .cr-note[data-ready]{opacity:1}
.cr-note[data-ready]::after{content:attr(data-ready);position:absolute;left:0;top:0;white-space:nowrap;color:var(--teal);font:700 13.5px/17px var(--f-ui);font-variant-numeric:tabular-nums}
.upg-w{color:var(--teal);font-weight:700;white-space:nowrap}

/* the shop cat: she lies across the shop list. An overlay over .shop-scroll (game.js sets its top, under the pane's
   sticky head, and sizes her sprite to fit); only she and her notes take part, the rows underneath stay visible and
   answer "She's lying on it." */
.lounge{position:absolute;left:0;right:0;bottom:0;top:0;z-index:3;pointer-events:none;display:flex;flex-direction:column;align-items:center;
  padding:8px var(--gut) 0;background:radial-gradient(90% 60% at 50% 48%, var(--lounge-veil), transparent);animation:fade .4s ease-out both}
.lounge.out{animation:loungeFade .5s ease-in .2s forwards}
/* she lies a little above the middle of the list; on short panels the spacers give way first, so the note never
   rides up over the tabs */
.lounge::before{content:"";flex:0 1 26%}
.lounge::after{content:"";flex:0 1 40%}
.lounge-line{max-width:250px;padding:8px 14px 9px;border-radius:16px;background:var(--paper);color:var(--paper-ink);text-align:center;
  font:400 16px/1.18 var(--f-hand);box-shadow:0 8px 22px var(--shadow-c), inset 0 -2px 0 var(--paper-shade)}
.lounge-btn{pointer-events:auto;display:block;margin-top:2px;padding:0;border:0;border-radius:44px;background:none;cursor:pointer;touch-action:manipulation;
  animation:loungeIn .5s cubic-bezier(.3,1.35,.5,1) both}
.lounge-btn:focus-visible{outline:2px dashed var(--amber);outline-offset:2px}
.lounge-spr{display:block;transform-origin:50% 88%;animation:breathe 2.8s ease-in-out .6s infinite}
.lounge-spr canvas{display:block}
.lounge-line{animation:loungeIn .4s ease-out both}
.lounge.out .lounge-btn{pointer-events:none}
.lounge.out .lounge-line{animation:loungeFade .3s ease-in forwards}
.lounge.out.pet .lounge-btn{animation:loungeHop .45s cubic-bezier(.4,0,.8,.4) forwards}
.lounge.out.leave .lounge-btn{animation:loungeLeave .6s ease-in forwards}
.lounge .floater{z-index:2}
@keyframes loungeIn{from{opacity:0;transform:translateY(-34px) scale(.96)}}
@keyframes loungeFade{to{opacity:0}}
@keyframes loungeHop{30%{transform:translateY(8px) scale(1.04,.94)}to{opacity:0;transform:translateY(-64px) scale(.86)}}
@keyframes loungeLeave{to{opacity:0;transform:translateX(46px)}}
@keyframes breathe{50%{transform:scale(1.012,1.035)}}

/* upgrades */
.upg-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
/* a path that skips a kind of upgrade (petting for a stray, naps for an insomniac) */
.upg-note{margin:0 0 10px;padding:9px 13px;border-radius:12px;border:1px dashed var(--line);font:400 15.5px/1.2 var(--f-hand);color:var(--muted)}
.upg{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0;padding:12px 12px 11px;border-radius:var(--r-card);border:1px solid var(--line);
  background:linear-gradient(180deg,var(--plum-2),var(--plum-2b));box-shadow:inset 0 1px 0 var(--hi);text-align:left;cursor:pointer;touch-action:manipulation;
  transition:border-color .15s, background .15s, transform .08s;--kc:var(--amber)}
.upg:not(.poor):hover{border-color:var(--amber-line);background:linear-gradient(180deg,var(--plum-3),var(--plum-2))}
.upg:not(.poor):active{transform:translateY(1px)}
.upg.poor{cursor:default}
.upg.poor .upg-n,.upg.poor .upg-d,.upg.poor .upg-k > :not(.sale-tag){opacity:.66}
.upg[data-kind="Nap"]{--kc:var(--teal)}
.upg[data-kind="Hunting"]{--kc:var(--rose)}
.upg[data-kind="Catnip"]{--kc:var(--leaf)}
.upg[data-kind="Away"]{--kc:var(--lilac)}
.upg[data-kind="tier"]{--kc:var(--cream-dim)}
.upg[data-kind="Together"]{--kc:var(--rose-soft)}
.upg[data-kind="Lives"]{--kc:var(--gold)}
.upg-k{display:flex;align-items:center;gap:5px;max-width:100%;font:800 10px/1.5 var(--f-ui);letter-spacing:.11em;text-transform:uppercase;color:var(--kc)}
/* (1.2.1: the kind's words wrap where a card can't hold them on a line, "NORWEGIAN FOREST CATS" at 1440 px; never cut. Their box hides
   what overflows it as before, a first letter's edge: it is as tall as its lines) */
.upg-k span{min-width:0;overflow:hidden;overflow-wrap:break-word}
.upg-k .sale-tag{flex:none;white-space:nowrap}
.upg-k svg{width:14px;height:14px;flex:none;fill:currentColor}
.upg-n{font:700 15px/1.2 var(--f-ui);color:var(--cream);overflow-wrap:break-word}
.upg-d{flex:1;font:400 13px/1.32 var(--f-ui);color:var(--muted);overflow-wrap:break-word}
.upg-c{margin-top:4px;font:500 12.5px/1 var(--f-ui);color:var(--muted);font-variant-numeric:tabular-nums}
.upg-c b{color:var(--amber);font-weight:800}
.upg.poor .upg-c b{color:var(--cream-dim);font-weight:700}
/* Good Fortune: the maneki-neko's sale. The tag sits on the portrait (cats) or at the end of the kind line
   (upgrades), so nothing reflows when a sale starts or ends; the shop's .sale class shows it. */
.sale-tag{display:none;padding:3px 5px 2px;border-radius:5px;font:800 10px/1 var(--f-ui);letter-spacing:.02em;text-transform:none;color:var(--ink);background:var(--lilac)}
.shop.sale .sale-tag{display:block}
.por-box{position:relative;display:block}
.por-box .sale-tag{position:absolute;left:50%;bottom:-6px;transform:translateX(-50%);white-space:nowrap;box-shadow:0 2px 6px var(--shadow-c)}
.upg-k{align-self:stretch}
.upg-k .sale-tag{flex:none;margin-left:auto;overflow:visible}
.empty{padding:22px 16px;border-radius:var(--r-card);border:1px dashed var(--line);font:400 17px/1.3 var(--f-hand);color:var(--muted);text-align:center}
.bought{margin-top:14px;border:1px solid var(--line);border-radius:var(--r-card);background:var(--ink-wash)}
.bought summary{display:flex;align-items:center;gap:10px;padding:13px 14px;cursor:pointer;list-style:none;font:700 14px/1 var(--f-ui);color:var(--muted);border-radius:var(--r-card)}
.bought summary::-webkit-details-marker{display:none}
.bought summary::before{content:"";width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);transition:transform .2s}
.bought[open] summary::before{transform:rotate(45deg)}
.bought summary:hover{color:var(--cream)}
.bought ul{list-style:none;padding:0 14px 14px;display:grid;gap:9px}
.bought li{display:grid;grid-template-columns:16px minmax(0,1fr);column-gap:9px;font-size:13px;line-height:1.3}
.bought li svg{grid-row:span 2;width:14px;height:14px;margin-top:2px;fill:var(--muted)}
.bl-n{font-weight:700;color:var(--cream)}
.bl-d{color:var(--muted);font-size:12.5px}

/* nine lives */
/* the chapter card (SPEC 11.4.3): this life's chapter, its goal (past it, the next wisdom point), its ribbons, its goals */
.chapter{position:relative;padding:14px 16px 14px;border-radius:16px;border:1px solid var(--amber-line);
  background:linear-gradient(180deg,var(--plum-2),var(--plum-2b));box-shadow:inset 0 1px 0 var(--hi)}
.chapter.stamped{border-color:var(--teal-line)}
.chapter:focus-visible{outline:2px solid var(--amber);outline-offset:3px}
.ch-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.ch-ht{min-width:0;padding-top:3px}
.ch-k{margin:0;font:800 10px/1 var(--f-ui);letter-spacing:.14em;text-transform:uppercase;color:var(--amber)}
.ch-title{margin:6px 0 0;font:800 22px/1.08 var(--f-display);font-variation-settings:var(--soft);color:var(--cream)}
.ch-art{flex:none;width:68px;height:68px;margin:-8px -8px -14px 0}
.ch-art canvas{display:block}
.ch-art.thump canvas,.stp.thump .stp-art canvas{animation:thump .62s cubic-bezier(.3,1.4,.5,1) both}
@keyframes thump{0%{transform:scale(1.7) rotate(-16deg);opacity:0}55%{transform:scale(.9) rotate(3deg);opacity:1}100%{transform:none;opacity:1}}
.ch-line{margin:9px 0 0;font:400 17px/1.28 var(--f-hand);color:var(--cream-dim)}
.ch-goal{margin-top:13px}
.cg-met{margin:0 0 7px;font:700 13px/1.35 var(--f-ui);color:var(--teal)}
.cg-row{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin:0;font:700 13px/1.32 var(--f-ui);color:var(--muted)}
.cg-l s{font-weight:400;margin-right:1px}
.cg-v{flex:none;color:var(--amber);font-variant-numeric:tabular-nums}
.cg-bar{margin-top:7px;height:8px;border-radius:99px;background:var(--track);overflow:hidden}
.cg-bar span{display:block;height:100%;background:linear-gradient(90deg,var(--amber-deep),var(--amber));transform-origin:left center;transform:scaleX(0);transition:transform .3s}
/* past the goal: every purr still counts, toward the next wisdom point (gold) */
.chapter.met .cg-bar span{background:linear-gradient(90deg,var(--amber),var(--gold))}
.chapter.met .cg-v{color:var(--gold)}
.cg-note{margin:7px 0 0;font-size:12.5px;line-height:1.4;color:var(--muted)}
/* the ribbons on its stamp: silver at three times the goal, gold at ten */
.ch-rib{list-style:none;margin:12px 0 0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.rib{display:flex;align-items:center;gap:6px;min-width:0;padding:5px 9px 5px 4px;border-radius:10px;border:1px dashed var(--line);background:var(--ink-wash)}
.rib.on{border-style:solid;border-color:var(--silver-line)}
.rib.on:last-child{border-color:var(--gold-line)}
.rib-art{flex:none;width:26px;height:26px}
.rib-art canvas{display:block}
.rib-b{min-width:0;display:flex;flex-direction:column;gap:2px}
.rib-b b{font:700 12.5px/1.15 var(--f-ui);color:var(--cream)}
.rib:not(.on) .rib-b b{color:var(--muted)}
.rib-b span{font-size:11.5px;line-height:1.25;color:var(--muted);font-variant-numeric:tabular-nums}
.rib.on .rib-v{color:var(--silver)}
.rib.on:last-child .rib-v{color:var(--gold)}
.rib.new{animation:ribIn 1s ease-out}
@keyframes ribIn{0%{box-shadow:0 0 0 0 var(--gold-line)}40%{box-shadow:0 0 0 5px var(--gold-line)}100%{box-shadow:0 0 0 0 transparent}}
/* the three goals: by the clock, by play, by the room (their glyph until done, then a tick), with a count */
.ch-goals{list-style:none;margin:10px 0 0;padding:0}
.cgl{display:grid;grid-template-columns:26px minmax(0,1fr) auto;align-items:center;column-gap:10px;padding:7px 0;border-top:1px dashed var(--line)}
.cgl:first-child{border-top:0}
.cgl-i{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;box-shadow:inset 0 0 0 1.5px var(--line);color:var(--muted)}
.cgl-i svg{width:14px;height:14px;fill:currentColor}
.cgl.done .cgl-i{background:var(--teal);box-shadow:none;color:var(--ink)}
.cgl.done .cgl-i svg{width:16px;height:16px}
.cgl-t{font-size:14px;line-height:1.3;color:var(--cream)}
.cgl.done .cgl-t{color:var(--cream-dim)}
.cgl.path .cgl-t{color:var(--amber-hi)}
.cgl-n{font:700 12.5px/1 var(--f-ui);color:var(--amber);font-variant-numeric:tabular-nums;white-space:nowrap}
.cgl.done .cgl-n{color:var(--teal)}
.ch-foot{margin:9px 0 0;padding-top:9px;border-top:1px dashed var(--line);font-size:12.5px;line-height:1.4;color:var(--muted)}
.chapter.stamped .ch-foot{color:var(--teal)}
/* her next life moves her (stage 3: a repeat circle whose next home is ready) */
.ch-move{margin:7px 0 0;font-size:12.5px;line-height:1.4;color:var(--amber-hi)}
/* once her next life is open: its button and what it brings, under the goal met (moved from the sheet: renderLives) */
.ch-go{margin-top:12px}
.ch-go .small{margin:8px 0 0}
/* (1.4, stage 7: rewards.md 9) what the chapter gives: a quiet header and a line a step, its tick (paid, or a look hers), Collect or "Waiting"
   (earned, not paid; one that can't be given says why under it), a pale lock (still to earn); all three's charm last, "Perfect" once it is hers */
.ch-rw{list-style:none;margin:12px 0 0;padding:9px 11px 4px;border-radius:12px;border:1px solid var(--line);background:var(--ink-wash)}
.ch-rw[hidden]{display:none}
.ch-rw.perfect{border-color:var(--gold-line);box-shadow:inset 0 0 0 1px var(--gold-line)}
.ch-rw.perfect .rwl[data-step="perfect"] .rwl-i{background:var(--gold)}
.ch-rw.perfect .rwl[data-step="perfect"] .rwl-s{color:var(--gold)}
.ch-rwh{margin:0 0 3px;font:800 10px/1 var(--f-ui);letter-spacing:.14em;text-transform:uppercase;color:var(--amber)}
.rwl{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;column-gap:9px;min-height:36px;padding:5px 0;border-top:1px dashed var(--line)}
.ch-rwh + .rwl{border-top:0}
.rwl-i{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;box-shadow:inset 0 0 0 1.5px var(--line);color:var(--muted)}
.rwl-i svg{width:13px;height:13px;fill:currentColor}
.rwl.done .rwl-i{background:var(--teal);box-shadow:none;color:var(--ink)}
.rwl.waiting .rwl-i{background:var(--amber);box-shadow:0 0 0 3px var(--amber-glow);color:var(--btn-ink)}
.rwl-t{min-width:0;font:500 13.5px/1.3 var(--f-ui);color:var(--cream)}
.rwl-t b{font-weight:800;color:var(--cream)}
.rwl.todo .rwl-t,.rwl.todo .rwl-t b{color:var(--muted)}
.rwl.done .rwl-t{color:var(--cream-dim)}
.rwl-why{display:block;margin-top:2px;font:400 12px/1.3 var(--f-ui);color:var(--amber-hi)}
.rwl-s{font:800 11.5px/1 var(--f-ui);color:var(--teal);white-space:nowrap}
.rwl.waiting .rwl-s{color:var(--amber)}
.rw-get{min-width:88px;min-height:44px;padding:0 16px;border:0;border-radius:999px;cursor:pointer;
  background:linear-gradient(180deg,var(--amber-hi),var(--amber) 55%,var(--amber-lo));color:var(--btn-ink);font:800 14px/1 var(--f-ui);box-shadow:0 3px 0 var(--amber-deep)}
.rw-get:hover{filter:brightness(1.06)}
.rw-get:active{transform:translateY(2px);box-shadow:0 1px 0 var(--amber-deep)}
.rw-get:focus-visible{outline:2px solid var(--cream);outline-offset:3px}
.ch-rwf{margin:0;padding:8px 0 5px;border-top:1px dashed var(--line);font:700 12.5px/1.35 var(--f-ui);color:var(--gold)}
/* "Rewards waiting" under the card: a chapter a row, its lines and its Collect */
.rw-wait{margin:16px 0 0}
.rw-wait[hidden]{display:none}
.rw-wait .sec-sum{color:var(--amber)}
.rw-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.rww{display:flex;align-items:center;gap:10px;padding:8px 10px 8px 12px;border-radius:12px;border:1px solid var(--amber-line);background:linear-gradient(180deg,var(--plum-2),var(--plum-2b))}
.rww-b{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}
.rww-t{font:800 13.5px/1.25 var(--f-ui);color:var(--cream)}
.rww-d{font:500 12.5px/1.3 var(--f-ui);color:var(--cream-dim)}
.rww-w{flex:none;font:800 11.5px/1 var(--f-ui);color:var(--muted)}
/* a perfect chapter's stamp in her story: a small gold star on its corner */
.stp.perfect{position:relative}
.stp-star{position:absolute;top:-3px;right:calc(50% - 25px);width:15px;height:15px;display:grid;place-items:center;border-radius:50%;background:var(--gold);color:var(--btn-ink);box-shadow:0 1px 4px rgba(8,4,16,.5)}
.stp-star svg{width:10px;height:10px;fill:currentColor}
/* her story: the circle's nine stamps, this life's number lit */
.story{margin:18px 0 16px}
.story .sec-sum{color:var(--amber)}
.stamps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:2px}
/* her homes (stage 3, moving-day.md 6.6): a card a home, three across, its postcard (3:2) over its name and its line; hers
   with an amber Home ribbon on the postcard's corner; the ones she has lived in are buttons that say its first line */
.homes{margin:4px 0 16px}
.homes .sec-sum{color:var(--amber)}
/* (a card's postcard, name and line are three rows the cards beside it share, so a name on two lines, "The Harbor Cottage"
   on a narrow card, keeps the lines of its row level: subgrids, stage 3's H23; a page without them stacks each card's
   three as before) */
.home-cards{list-style:none;margin:0 0 -4px;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 10px}
.home-card{min-width:0;display:grid;grid-row:span 3;grid-template-rows:subgrid}
.hc-b{position:relative;display:grid;grid-row:span 3;grid-template-rows:subgrid;align-content:start;width:100%;margin:0;padding:0;border:0;background:none;color:inherit;font:inherit;text-align:left}
button.hc-b{cursor:pointer}
button.hc-b:focus-visible{outline-offset:4px;border-radius:4px}
.hc-pc{display:block;aspect-ratio:3 / 2;border-radius:3px;background:rgba(239,230,210,.07)}
.hc-pc canvas{display:block;width:100%;height:auto;border-radius:3px;box-shadow:0 2px 8px rgba(8,4,16,.5)}
.hc-n{margin-top:7px;font:600 14px/1.2 var(--f-display);color:var(--cream)}
.home-card.next .hc-n,.home-card.later .hc-n{color:var(--cream-dim)}
/* (the homes ahead stay quiet beside the postcards of hers: the next one a little brighter than the later ones) */
.home-card.next .hc-pc canvas{opacity:.78}
.home-card.later .hc-pc canvas{opacity:.42}
.hc-l{margin:3px 0 12px;font:500 12px/1.3 var(--f-ui);color:var(--muted)}
.hc-rib{position:absolute;top:-5px;right:-4px;padding:3px 7px 2px;border-radius:999px;font:800 9px/1 var(--f-ui);letter-spacing:.08em;text-transform:uppercase;
  color:var(--ink);background:var(--amber);box-shadow:0 2px 6px rgba(8,4,16,.45)}
.stp{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0}
.stp-art{display:block;width:100%;max-width:44px;aspect-ratio:1}
.stp-art canvas{display:block;width:100% !important;height:100% !important}
.stp.ahead .stp-art{opacity:.42}
.stp-n{min-width:20px;padding:3px 5px 2px;border-radius:99px;text-align:center;font:800 11px/1 var(--f-ui);color:var(--muted);font-variant-numeric:tabular-nums}
.stp.on .stp-n{color:var(--cream-dim)}
.stp.cur .stp-n{background:var(--amber);color:var(--btn-ink)}
.lead{margin:14px 0 0;font:400 14.5px/1.5 var(--f-ui);color:var(--muted)}
.sheet{padding:6px 16px 16px;border-radius:16px;border:1px solid var(--line);background:linear-gradient(180deg,var(--plum-2),var(--plum-2b));box-shadow:inset 0 1px 0 var(--hi)}
.kvs{margin-bottom:16px}
.kvs:last-child{margin-bottom:0}
.kv{display:flex;justify-content:space-between;align-items:baseline;gap:14px;padding:10px 0;border-bottom:1px dashed var(--line)}
.kv dt{color:var(--muted);font-size:14px}
.kv dd{font-weight:700;color:var(--cream);font-variant-numeric:tabular-nums;text-align:right}
/* the goal before her patience brought it down, struck through beside the one now; the goal met (teal) */
.kv dd s{color:var(--muted);font-weight:400;margin-right:6px}
.kv dd .met{color:var(--teal)}
.small{margin-top:10px;font-size:13px;line-height:1.45;color:var(--muted)}
.h3{margin:24px 0 10px;font:800 18px/1 var(--f-display);font-variation-settings:var(--soft);color:var(--cream)}
.perks{list-style:none;padding:0;display:grid;gap:6px}
.perk{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;column-gap:12px;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:var(--ink-wash)}
.perk:not(.on):not(.next){opacity:.58}
.perk.on{background:linear-gradient(180deg,var(--plum-2),var(--plum-2b));border-color:var(--teal-line)}
.perk.next{border-style:dashed;border-color:var(--amber-line)}
.pk-n{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;font:800 16px/1 var(--f-display);font-variation-settings:var(--soft);background:var(--plum-3);color:var(--muted)}
.perk.on .pk-n{background:var(--teal);color:var(--ink)}
.perk.next .pk-n{background:var(--amber);color:var(--btn-ink)}
.pk-b{min-width:0}
.pk-t{display:block;font-weight:700;font-size:14.5px;line-height:1.25}
.pk-d{display:block;color:var(--muted);font-size:13px;line-height:1.3}
.pk-s{font:800 10px/1 var(--f-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
/* life paths: this life's path and its medal goal, then a grid of small medal cards, three across (four on tablets) */
.paths{margin-top:24px}
.paths > .small{margin-top:9px}
.paths .sec-sum{color:var(--amber)}
.path-now{padding:13px 15px 15px;border-radius:16px;border:1px solid var(--amber-line);background:linear-gradient(180deg,var(--plum-2),var(--plum-2b));box-shadow:inset 0 1px 0 var(--hi)}
.path-now.plain{border:1px dashed var(--line);background:var(--ink-wash);box-shadow:none}
.path-now.done{border-color:var(--teal-line)}
.pn-head{display:flex;align-items:center;gap:12px}
.pn-art{flex:none;width:44px;height:44px;display:grid;place-items:center}
.path-now.plain .pn-art{border-radius:50%;background:var(--plum-3)}
.pn-art svg{width:22px;height:22px;fill:var(--muted)}
.pn-art canvas{display:block}
.pn-t{min-width:0}
.pn-k{display:block;font:800 10px/1 var(--f-ui);letter-spacing:.14em;text-transform:uppercase;color:var(--amber)}
.path-now.plain .pn-k{color:var(--muted)}
.pn-t b{display:block;margin-top:4px;font:800 21px/1.05 var(--f-display);font-variation-settings:var(--soft);color:var(--cream)}
.pn-rule{margin-top:10px;font-size:14px;line-height:1.45;color:var(--cream-dim)}
.path-now.plain .pn-rule{color:var(--muted)}
.pn-goal{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-top:11px;font:700 13px/1.25 var(--f-ui);color:var(--muted)}
.pn-v{flex:none;color:var(--amber);font-variant-numeric:tabular-nums}
.path-now.done .pn-goal{color:var(--teal)}
.pn-bar{margin-top:7px;height:7px;border-radius:99px;background:var(--track);overflow:hidden}
.pn-bar span{display:block;height:100%;background:linear-gradient(90deg,var(--amber-deep),var(--amber));transform-origin:left center;transform:scaleX(0)}
.medal-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:8px}
.medal-card{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0;padding:9px 7px 10px;border-radius:var(--r-card);text-align:center;
  border:1px dashed var(--line);background:var(--ink-wash)}
.medal-card.on{border-style:solid;border-color:var(--amber-line);background:linear-gradient(180deg,var(--plum-2),var(--plum-2b));box-shadow:inset 0 1px 0 var(--hi)}
.medal-card.now:not(.on){border-style:solid;border-color:var(--line)}
.mc-art{display:block;margin-bottom:2px}
.mc-art canvas{display:block}
.mc-b{display:flex;flex-direction:column;align-items:center;flex:1;gap:2px;min-width:0}
.mc-n{font:700 13.5px/1.2 var(--f-ui);color:var(--cream)}
.medal-card:not(.on):not(.now) .mc-n{color:var(--muted)}
.mc-g{font-size:11.5px;line-height:1.28;color:var(--muted)}
.mc-s{margin-top:auto;padding-top:3px;font:800 9.5px/1.3 var(--f-ui);letter-spacing:.07em;text-transform:uppercase;color:var(--muted);font-variant-numeric:tabular-nums}
.medal-card.on .mc-s{color:var(--amber)}
.medal-card.now:not(.on) .mc-s{color:var(--cream-dim)}
.perk.on .pk-s{color:var(--teal)}
.perk.next .pk-s{color:var(--amber)}

/* trophies */
.ach-sum{flex:none;font:800 17px/1 var(--f-display);font-variation-settings:var(--soft);color:var(--amber);white-space:nowrap;font-variant-numeric:tabular-nums}
.ach-meter{height:6px;border-radius:99px;background:var(--track);overflow:hidden;margin:0 0 14px}
.ach-meter span{display:block;height:100%;background:linear-gradient(90deg,var(--amber-deep),var(--amber));transform-origin:left center;transform:scaleX(0)}
.ach-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.ach{display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:10px;align-items:start;padding:10px;border-radius:12px;border:1px solid var(--line);background:var(--ink-wash)}
.seal{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--plum-3)}
.seal svg{width:18px;height:18px;fill:var(--muted);opacity:.45}
/* (1.3's art pass 3) a trophy's medallion, the renderer's (Scene.thumb's 'trophy'; game.js sealDraw), is the whole seal: no round
   under it, earned or not, nor while it waits for one (the round and the cup are what a page with no renderer shows) */
.seal.art,.seal[data-art]{background:none !important;box-shadow:none !important}
/* (a medallion's frame holds its ribbon and its star as well as its round, so a seal with a medallion, or waiting for one, is a
   little bigger than the plain round, by margins that leave what is round it where it was: 44 for 40 here, 40 for 36 on a phone,
   32 for 28 on a round's results line, 72 for 60 and 62 for 52 on a shelf's card) */
.seal.art,.seal[data-art]{width:44px;height:44px;margin:-2px}
.seal.art canvas{display:block;width:100% !important;height:100% !important}
.ach.on{background:linear-gradient(180deg,var(--plum-2),var(--plum-2b));border-color:var(--amber-line)}
.ach.on .seal{background:radial-gradient(circle at 38% 32%, var(--amber-hi), var(--amber) 55%, var(--amber-deep));box-shadow:0 0 14px var(--amber-glow)}
.ach.on .seal svg{fill:var(--btn-ink);opacity:.92}
.ach-t{display:block;font-weight:700;font-size:13.5px;line-height:1.2;color:var(--cream)}
.ach:not(.on) .ach-t{color:var(--muted)}
.ach-d{display:block;margin-top:3px;font-size:12px;line-height:1.3;color:var(--muted)}
.ach:not(.on) .ach-d{opacity:.75}
/* secret cats collection (top of the Trophies tab) */
.secrets{margin-bottom:6px}
.sec-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:2px 0 10px}
.sec-head .h3{margin:0}
.sec-sum{flex:none;font:800 12px/1 var(--f-ui);letter-spacing:.04em;color:var(--lilac);white-space:nowrap}
.secret-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.sc-card{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0;padding:12px 10px 13px;border-radius:var(--r-card);text-align:center;
  border:1px dashed var(--line);background:var(--ink-wash)}
.sc-card.on{border-style:solid;border-color:var(--lilac-line);background:linear-gradient(180deg,var(--plum-2),var(--plum-2b));box-shadow:inset 0 1px 0 var(--hi)}
.sc-por{display:grid;place-items:center;margin-bottom:5px;border-radius:50%}
.sc-card .por-cv{width:56px !important;height:56px !important}
.sc-card.on .sc-por{box-shadow:0 0 0 2px var(--lilac-line), 0 0 18px var(--lilac-glow)}
.sc-card:not(.on) .sc-por{opacity:.8}
.sc-b{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:0}
.sc-name{font:700 14.5px/1.2 var(--f-ui);color:var(--cream)}
.sc-card:not(.on) .sc-name{letter-spacing:.24em;color:var(--muted)}
.sc-meta{font:800 10.5px/1.3 var(--f-ui);letter-spacing:.1em;text-transform:uppercase;color:var(--lilac);font-variant-numeric:tabular-nums}
.sc-card:not(.on) .sc-meta{color:var(--muted);opacity:.8;font-weight:600}
.sc-bonus{font:600 12px/1.3 var(--f-ui);color:var(--cream-dim)}
.sc-bonus:empty{display:none}
.sc-line{margin-top:2px;font:400 14.5px/1.15 var(--f-hand);color:var(--muted)}

/* the Album's front page (design/v4/stage4.md 5.1; game.js renderAlbum): the Trophies pane once stage 4 is live, .album from
   game.js. Its head stays, sticky, with her home's count in it, and its trophies give way to Next to find's fluid cards and a
   row per shelf; her box's card (below) stays under them. No z-index of its own: 5.5 */
.al-front{display:none}
#p-ach.album .al-front{display:block}
#p-ach.album > .ach-meter,#p-ach.album > .secrets,#p-ach.album > .h3,#p-ach.album > .ach-grid,#p-ach.album .ach-sum,#p-ach.album .sub,#p-ach.album .boxes .sec-head,#p-ach.album .boxes > .small{display:none}
.al-count{flex:none;min-width:0;max-width:62%;height:30px;margin:0 -8px -5px 0;padding:0 8px;border:0;border-radius:9px;background:none;font:800 13px/1 var(--f-ui);color:var(--amber);
  font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;touch-action:manipulation}
.al-count[hidden]{display:none}
.al-count:hover{background:var(--hi)}
.al-front .h3{margin-top:2px}
.al-next{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.al-card{display:flex;flex-direction:column;gap:4px;min-width:0;min-height:92px;padding:9px 8px 10px;border-radius:12px;border:1px solid var(--line);background:var(--ink-wash);color:var(--cream);font:inherit;text-align:left;
  overflow:hidden;cursor:pointer;touch-action:manipulation;transition:border-color .15s}
.al-card:hover{border-color:var(--amber-line)}
.al-card.secret{border-style:dashed;border-color:var(--lilac-line)}
.al-card.season{border-color:var(--amber-line)}
.al-cn{font:700 13px/1.2 var(--f-ui);color:var(--cream);overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.al-cl{font:400 14px/1.12 var(--f-hand);color:var(--cream-dim);overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}
.al-cp{display:flex;flex-direction:column;gap:3px;margin-top:auto;padding-top:2px}
.al-cp .bx-bar{max-width:none}
.al-cp .bx-pt{overflow:hidden;text-overflow:ellipsis}
.al-rows{display:flex;flex-direction:column;gap:6px;margin-top:12px}
.al-row{display:flex;align-items:center;gap:10px;width:100%;min-height:56px;padding:6px 12px;border-radius:12px;border:1px solid var(--line);background:linear-gradient(180deg,var(--plum-2),var(--plum-2b));box-shadow:inset 0 1px 0 var(--hi);
  color:var(--cream);font:inherit;text-align:left;cursor:pointer;touch-action:manipulation;transition:border-color .15s}
.al-row:hover{border-color:var(--amber-line)}
.al-pie{flex:none;width:22px;height:22px;border-radius:50%;background:conic-gradient(var(--amber) var(--p),var(--track) 0)}
.al-n{flex:1 1 auto;min-width:0;font:700 14.5px/1.2 var(--f-ui);color:var(--cream);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.al-c{flex:none;font:600 12.5px/1.2 var(--f-ui);color:var(--cream-dim);font-variant-numeric:tabular-nums;white-space:nowrap}
.al-new{flex:none;font:800 11.5px/1.2 var(--f-ui);color:var(--amber);white-space:nowrap}
/* (1.4, stage 7: rewards.md 5.1, 6.2) a shelf's collections under its name, and the first row while rewards wait */
.al-nb{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}
.al-nb .al-n{flex:none}
.al-rw{font:500 12px/1.25 var(--f-ui);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.al-wait{border-color:var(--amber-line);background:linear-gradient(180deg,var(--plum-3, var(--plum-2)),var(--plum-2b))}
.al-wait .al-c{color:var(--amber)}
.al-gift{flex:none;width:22px;height:22px;display:grid;place-items:center;border-radius:50%;background:var(--amber);color:var(--btn-ink);box-shadow:0 0 0 3px var(--amber-glow)}
.al-gift svg{width:12px;height:12px;fill:currentColor}
.bx-grp > .bx-rw{color:var(--muted)}
.bx-grp > .bx-rw.done,.al-rwh.done{color:var(--teal)}
.al-rwh{margin:0 2px 10px;font-size:12.5px;line-height:1.4;color:var(--cream-dim)}
.al-rwh b{font-weight:800;color:var(--cream)}
.hc-rw{display:block;margin-top:4px;color:var(--cream-dim)}
.hc-rw.done{color:var(--teal)}
.hc-get{display:block;margin-top:6px;min-width:0;width:100%}
.rw-medal{margin:8px 2px 0;color:var(--muted)}
.rw-medal.done{color:var(--teal)}
.upg-rw{display:inline-block;margin-left:2px;padding:2px 6px 1px;border-radius:999px;font:800 10.5px/1.2 var(--f-ui);color:var(--btn-ink);background:var(--teal);white-space:nowrap}
/* a dot in the tab while something found is unseen, in place of the trophies' count */
.badge.soft.dot{min-width:9px;width:9px;height:9px;padding:0;background:var(--amber)}
/* her box (Trophies tab): the box she sits in, on a card that opens her box picker (game.js openBoxes) */
.boxes{margin-top:22px}
.boxes .sec-sum{color:var(--amber)}
.boxes > .small{margin-top:9px}
.box-now{display:grid;grid-template-columns:72px minmax(0,1fr);grid-template-areas:"art b" "art go";column-gap:12px;row-gap:7px;align-items:center;width:100%;
  padding:10px 14px 12px 10px;border-radius:var(--r-card);border:1px solid var(--amber-line);background:linear-gradient(180deg,var(--plum-3),var(--plum-2));
  box-shadow:inset 0 1px 0 var(--hi);color:var(--cream);font:inherit;text-align:left;cursor:pointer;touch-action:manipulation;transition:border-color .15s, transform .08s}
.box-now:hover{border-color:var(--amber)}
.box-now:active{transform:translateY(1px)}
.box-now:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
.bn-art{grid-area:art;display:grid;place-items:center;width:72px;height:72px;border-radius:50%;background:radial-gradient(closest-side, var(--box-pool), transparent)}
.bn-art canvas{display:block;width:72px !important;height:72px !important}
.bn-b{grid-area:b;display:flex;flex-direction:column;gap:2px;min-width:0}
.bn-k{font:800 10px/1.2 var(--f-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--amber)}
.bn-n{font:700 15px/1.2 var(--f-ui);color:var(--cream)}
.bn-l{font:400 15px/1.12 var(--f-hand);color:var(--cream-dim)}
/* (a pack box she sits in: the Extras pack's small tag under its name, extras.md 3.6.1) */
.bn-tag{align-self:flex-start;margin:1px 0 1px;padding:3px 7px 2px;border-radius:999px;border:1px solid var(--amber-line);background:var(--amber-wash);
  font:800 9.5px/1 var(--f-ui);letter-spacing:.1em;text-transform:uppercase;color:var(--amber-hi)}
.bn-tag[hidden]{display:none}
.bn-go{grid-area:go;justify-self:start;display:inline-flex;align-items:center;height:28px;padding:0 12px;border-radius:999px;border:1px solid var(--amber-line);
  background:var(--amber-wash);font:800 10.5px/1 var(--f-ui);letter-spacing:.1em;text-transform:uppercase;color:var(--amber-hi);transition:border-color .15s}
.box-now:hover .bn-go{border-color:var(--amber)}
/* her box picker: a thumbnail card per box (Scene.boxThumb) in its group; the one she sits in is pressed and ringed, a
   locked one greyed and dashed with what finds it and how far she is, the pumpkin out of season likewise in its own
   color. The list scrolls inside the dialog; under it, the card under the pointer or the keyboard in a sentence, then
   Done */
.modal[data-kind="boxes"] .modal-card{width:min(640px,100%);display:flex;flex-direction:column;padding:22px 20px 18px}
.modal[data-kind="boxes"] .modal-title{margin-bottom:6px}
.modal[data-kind="boxes"] .modal-body{display:flex;flex-direction:column;flex:0 1 auto;min-height:0}
.modal[data-kind="boxes"] #modalBtn{flex:none;align-self:center;min-width:150px;margin-top:12px}
.modal-body .bx-lead{margin:0 0 10px}
.bx-list{flex:0 1 auto;min-height:150px;overflow-y:auto;overscroll-behavior:contain;margin:0 -6px;padding:4px 6px 6px;text-align:left;
  scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.bx-grp + .bx-grp{margin-top:14px}
.bx-gh{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:0 2px 7px;font:800 16px/1.15 var(--f-display);font-variation-settings:var(--soft);color:var(--cream)}
.bx-gc{flex:none;font:800 10.5px/1 var(--f-ui);letter-spacing:.1em;text-transform:uppercase;color:var(--muted);font-variant-numeric:tabular-nums}
.bx-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:8px}
.bx-grid .bx-art{width:64px;height:64px}
.box-btn{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0;padding:6px 6px 10px;border-radius:var(--r-card);border:1px solid var(--line);
  background:linear-gradient(180deg,var(--plum-2),var(--plum-2b));box-shadow:inset 0 1px 0 var(--hi);color:var(--cream);font:inherit;text-align:center;cursor:pointer;
  touch-action:manipulation;transition:border-color .15s, background .15s, transform .08s}
.box-btn:hover{border-color:var(--amber-line)}
.box-btn:active{transform:translateY(1px)}
/* (the keyboard's ring is cream: amber is the one she sits in) */
.box-btn:focus-visible{outline:2px solid var(--cream);outline-offset:2px}
.bx-art{display:grid;place-items:center;width:72px;height:72px;border-radius:50%;background:radial-gradient(closest-side, var(--box-pool), transparent)}
.bx-art canvas{display:block}
.bx-n{max-width:100%;font:700 13.5px/1.15 var(--f-ui);text-wrap:balance}
.bx-s{margin-top:auto;padding-top:2px;display:inline-flex;align-items:center;gap:4px;max-width:100%;font:800 10px/1.3 var(--f-ui);letter-spacing:.08em;text-transform:uppercase;color:var(--muted);white-space:nowrap}
.bx-s svg{width:11px;height:11px;fill:currentColor;flex:none}
/* how far she is: a bar (amber, toward its need) and its words ("12 of 30", "best 4", "from life 3") */
.bx-p{display:flex;flex-direction:column;align-items:center;gap:3px;width:100%;margin-top:3px}
.bx-bar{display:block;width:100%;max-width:76px;height:4px;border-radius:2px;background:var(--track);overflow:hidden}
.bx-bar i{display:block;height:100%;border-radius:2px;background:var(--amber-lo)}
.bx-bar.bx-nobar{visibility:hidden}
.bx-pt{max-width:100%;font:600 11px/1.2 var(--f-ui);color:var(--cream-dim);font-variant-numeric:tabular-nums;white-space:nowrap}
.box-btn.on{border-color:var(--amber);background:linear-gradient(180deg,var(--plum-3),var(--plum-2));box-shadow:0 0 0 1px var(--amber), 0 8px 20px var(--shadow-c)}
.box-btn.on .bx-s{color:var(--amber)}
.box-btn[data-box="pumpkin"]:not(.locked) .bx-s{color:var(--pumpkin)}
.box-btn.locked,.box-btn.off{cursor:default;border-style:dashed;background:var(--ink-wash);box-shadow:none}
.box-btn.locked:hover,.box-btn.off:hover{border-color:var(--line)}
.box-btn.locked:active,.box-btn.off:active{transform:none}
.box-btn.locked .bx-art,.box-btn.off .bx-art{background:none}
.box-btn.locked .bx-art canvas,.box-btn.off .bx-art canvas{filter:grayscale(.75) brightness(.78);opacity:.7}
.box-btn.locked .bx-n,.box-btn.off .bx-n{color:var(--muted)}
.box-btn.off{border-color:var(--pumpkin-line)}
/* the Extras pack's group (extras.md 3.6.3): a card not hers while the pack is on sale wears the pack's small tag beside
   its action, Try, in the card's foot (.bx-f), clear of its thumbnail (X7's fix: in the corner it sat on the crown) */
.box-btn.try .bx-s{color:var(--amber-hi)}
.bx-f{margin-top:auto;padding-top:2px;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:3px 5px;max-width:100%}
.bx-f .bx-s{margin:0;padding:0}
.bx-x{flex:none;padding:3px 6px 2px;border-radius:999px;border:1px solid var(--amber-line);background:var(--amber-wash);
  font:800 8.5px/1 var(--f-ui);letter-spacing:.09em;text-transform:uppercase;color:var(--amber-hi);pointer-events:none}
/* between lives (the new-life scene) an open box waits: "In a moment" */
.box-btn.wait{cursor:default}
.box-btn.wait:hover{border-color:var(--line)}
.box-btn.wait:active{transform:none}
.box-btn.wait .bx-art canvas{opacity:.6}
.modal-body .bx-tip{flex:none;min-height:calc(2.8em + 18px);margin:10px 0 0;padding:8px 12px;border-radius:12px;border:1px dashed var(--line);background:var(--ink-wash);
  font-size:13px;line-height:1.4;color:var(--cream-dim);text-align:left}
.bx-tip b{font-weight:700;color:var(--cream)}
.bx-tip b::after{content:" \00b7"}
/* phones held upright: three cards across, the thumbnails smaller */
@media (max-width:479px){
  .modal[data-kind="boxes"] .modal-card{padding:20px 14px 16px}
  .modal[data-kind="boxes"] .modal-title{font-size:28px}
  .bx-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .bx-grid .box-btn{padding:5px 4px 8px}
}
/* a phone turned sideways: no lead, a smaller title, six or more cards across with small thumbnails, the sentence beside
   Done, so two rows of cards are in view */
@media (orientation:landscape) and (max-height:520px){
  .modal[data-kind="boxes"] .modal-card{width:min(780px,100%);display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto minmax(0,1fr) auto;
    column-gap:12px;padding:12px 16px 12px}
  .modal[data-kind="boxes"] .modal-kicker{grid-column:1 / -1;margin:0 0 3px}
  .modal[data-kind="boxes"] .modal-title{grid-column:1 / -1;margin:0 0 6px;font-size:22px}
  .modal[data-kind="boxes"] .modal-body{display:contents}
  .modal[data-kind="boxes"] .bx-lead{display:none}
  .modal[data-kind="boxes"] .bx-list{grid-column:1 / -1;grid-row:3;min-height:0}
  .modal[data-kind="boxes"] .bx-tip{grid-column:1;grid-row:4;min-height:0;margin:8px 0 0;padding:6px 10px;font-size:12.5px;line-height:1.3}
  .modal[data-kind="boxes"] #modalBtn{grid-column:2;grid-row:4;align-self:end;margin:8px 0 0}
  .bx-grid{grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:6px}
  .bx-grid .box-btn{padding:4px 4px 7px}
  .bx-grid .bx-art,.bx-grid .bx-art canvas{width:48px !important;height:48px !important}
  .bx-grp + .bx-grp{margin-top:10px}
  .bx-gh{margin-bottom:5px;font-size:14.5px}
}

/* footer */
.shop-foot{margin-top:28px;padding-top:4px;border-top:1px solid var(--line)}
.stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;margin-bottom:18px}
.stats div{display:flex;flex-direction:column;gap:2px;min-width:0}
.stats dt{font-size:12px;color:var(--muted)}
.stats dd{font-weight:700;font-variant-numeric:tabular-nums;color:var(--cream)}
.sr{position:absolute !important;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

/* buttons */
.btn-primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:46px;padding:0 22px;border:0;border-radius:var(--r-btn);
  background:linear-gradient(180deg,var(--amber-hi),var(--amber) 55%,var(--amber-lo));color:var(--btn-ink);font:800 15px/1 var(--f-ui);cursor:pointer;
  box-shadow:0 3px 0 var(--amber-deep), 0 12px 26px var(--amber-glow), inset 0 1px 0 var(--gloss);touch-action:manipulation;transition:transform .08s, filter .15s, box-shadow .08s}
.btn-primary:hover:not(:disabled){filter:brightness(1.05)}
.btn-primary:active:not(:disabled){transform:translateY(3px);box-shadow:0 0 0 var(--amber-deep), 0 6px 16px var(--amber-glow), inset 0 1px 0 var(--gloss)}
.btn-primary.big{width:100%;height:54px;font-size:17px}
.btn-primary:disabled{background:var(--plum-3);color:var(--muted);box-shadow:inset 0 1px 0 var(--hi);cursor:not-allowed}
.btn-primary.ascend:not(:disabled){background:linear-gradient(180deg,var(--paper),var(--amber-hi) 45%,var(--amber));}
.btn-primary.armed{background:linear-gradient(180deg,var(--rose-hi),var(--rose) 55%,var(--rose-lo));color:var(--ink);box-shadow:0 3px 0 var(--rose-lo), 0 12px 26px var(--rose-glow);animation:armed .9s ease-in-out infinite}
@keyframes armed{50%{filter:brightness(1.12)}}
.btn-ghost{height:42px;padding:0 15px;border-radius:10px;border:1px solid var(--line);background:none;color:var(--muted);font:700 13px/1 var(--f-ui);cursor:pointer;touch-action:manipulation}
.btn-ghost:hover{color:var(--cream);border-color:var(--muted)}
.btn-ghost.armed{border-color:var(--rose);color:var(--rose);background:var(--rose-wash)}

/* modal */
.modal{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:20px;background:var(--modal-scrim);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);animation:fade .25s ease-out}
.modal-card{width:min(440px,100%);max-height:calc(100% - 8px);overflow:auto;padding:28px 26px 24px;border-radius:22px;text-align:center;
  background:radial-gradient(120% 70% at 50% 0%, var(--plum-4), var(--plum) 62%);border:1px solid var(--line);
  box-shadow:0 30px 80px var(--shadow-c), inset 0 1px 0 var(--hi);animation:rise .38s cubic-bezier(.2,.9,.3,1.1)}
.modal-art{display:grid;place-items:center;margin:-2px 0 12px}
.modal-art:empty{display:none}
.modal-art canvas{width:92px;height:92px;border-radius:50%;box-shadow:0 0 0 3px var(--amber), 0 0 34px var(--amber-glow)}
.modal-art canvas.empty{background:var(--ink)}
.modal[data-kind="offline"] .modal-art canvas{box-shadow:0 0 0 3px var(--teal), 0 0 34px var(--teal-wash)}
.modal-kicker{margin-bottom:8px;font:800 11px/1 var(--f-ui);letter-spacing:.16em;text-transform:uppercase;color:var(--amber)}
.modal[data-kind="offline"] .modal-kicker{color:var(--teal)}
.modal[data-kind="secret"] .modal-art canvas{box-shadow:0 0 0 3px var(--lilac), 0 0 34px var(--lilac-glow)}
.modal[data-kind="secret"] .modal-kicker{color:var(--lilac)}
.modal[data-kind="secret"] .modal-stats b{color:var(--lilac)}
.modal-title{margin-bottom:12px;font:900 32px/1.05 var(--f-display);font-variation-settings:var(--soft);color:var(--cream)}
.modal-body p{margin:0 0 10px;font-size:15px;line-height:1.5;color:var(--cream-dim)}
.modal-body b{color:var(--cream)}
.modal-body .small{font-size:13px;color:var(--muted)}
/* the welcome back: an old friend's calling card and "She missed you" (lilac, as every secret cat's gift) */
.modal-body p.wb-card,.modal-body p.wb-missed{color:var(--lilac)}
/* what came in off the sea while she was away (the Harbor: Fresh Catch, a basket on the step) */
.modal-body p.wb-sea{color:var(--teal)}
/* 1.4's welcome back (stage 7, design/v4/ads-rewarded.md 4; game.js wbCard7): what was purred as a card, its small title in the kicker's teal,
   the number large (Fraunces, as the bank), the time away and a boost's part of it under it; a paid double's gold line in it */
.modal-body .wb-sum{margin:2px 0 14px;padding:13px 14px 12px;border-radius:16px;border:1px solid var(--line);
  background:linear-gradient(180deg,rgba(92,194,179,.12),rgba(92,194,179,.03) 70%),var(--plum-2);box-shadow:inset 0 1px 0 var(--hi)}
.modal-body .wb-sum p{margin:0}
.modal-body .wb-sum .wb-k{margin-bottom:6px;font:800 11px/1.2 var(--f-ui);letter-spacing:.14em;text-transform:uppercase;color:var(--teal)}
.modal-body .wb-sum .wb-n{line-height:1.1;color:var(--cream)}
.modal-body .wb-sum .wb-n b{font:900 40px/1.05 var(--f-display);font-variation-settings:var(--soft);color:var(--cream)}
.modal-body .wb-sum .wb-n span{font:700 19px/1.2 var(--f-ui);color:var(--cream-dim);white-space:nowrap}
.modal-body .wb-sum .wb-t{margin-top:7px;font-size:14px;line-height:1.4}
/* (1.4, FD4) the day's present, by her box: a small warm plate under the card and its gold button, its little box beside the words and
   the purrs in amber, never broken (game.js WB_GIFT, wbCard7) */
.modal-body p.wb-gift{display:flex;align-items:center;justify-content:center;gap:11px;width:fit-content;max-width:100%;margin:0 auto 12px;
  padding:8px 14px 8px 9px;border-radius:14px;text-align:left;line-height:1.35;color:var(--cream);background:rgba(242,180,90,.08);box-shadow:inset 0 0 0 1px rgba(242,180,90,.22)}
.modal-body .wb-gift-i{flex:none;display:grid;place-items:center;width:32px;height:32px;border-radius:10px;color:var(--amber);
  background:radial-gradient(circle at 50% 35%,rgba(242,180,90,.3),rgba(242,180,90,.08) 70%);box-shadow:inset 0 0 0 1px rgba(242,180,90,.35)}
.modal-body .wb-gift-i svg{width:19px;height:19px;fill:currentColor}
.modal-body .wb-gift-t b{white-space:nowrap;color:var(--amber)}
.modal-body .wb-sum p.wb-doubled{margin-top:7px;color:var(--gold, #f6cf63);font-weight:700}
/* the one-time letter after the migration (SPEC 11.8): its paragraphs read as a letter, left-aligned under the centered
   heading, and a number stays on the line of its word ("294 wisdom points") */
.modal[data-kind="letter"] .modal-card{width:min(470px,100%)}
.modal[data-kind="letter"] .modal-body{text-align:left}
.modal[data-kind="letter"] .modal-body b{white-space:nowrap}
/* a longer letter on a short screen (a save with a star, a phone turned sideways): its button stays in reach at the foot
   of the card, on a band of the card's own color the letter scrolls under (game.js sets .scrolls) */
.modal[data-kind="letter"] .modal-card.scrolls #modalBtn{position:sticky;bottom:4px;z-index:2;
  box-shadow:0 3px 0 var(--amber-deep), 0 8px 18px var(--amber-glow), inset 0 1px 0 var(--gloss), 0 0 0 18px var(--plum), 0 -14px 14px 16px var(--plum)}
.modal-stats{display:flex;gap:10px;margin:14px 0}
.modal-stats div{flex:1;display:flex;flex-direction:column;gap:4px;padding:12px;border-radius:12px;background:var(--ink-wash);border:1px solid var(--line)}
/* (its label: the number's digit cells are spans too) */
.modal-stats div > span{font:800 10px/1 var(--f-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.modal-stats b{font:800 24px/1 var(--f-display);font-variation-settings:var(--soft);color:var(--amber)}
.modal-stats em{font-style:normal;font-size:12px;color:var(--muted)}
/* a secret cat's keepsake, under her numbers (stage 4): its icon and its name. With it a first greeting is the longest of
   them, and a guest's title can take three lines: on a short phone it tightens, and its button stays in reach at the foot of
   the card, on a band of the card's own color, as the letter's (game.js sets .keep and .scrolls) */
.modal-keep{display:flex;align-items:center;gap:10px;margin:-4px 0 12px;padding:8px 12px;border-radius:12px;background:var(--ink-wash);border:1px solid var(--line);text-align:left}
.mk-art{flex:none;width:44px;height:44px}
.mk-art canvas{display:block;width:44px;height:44px}
.mk-t{min-width:0;font-size:13px;line-height:1.35;color:var(--cream-dim)}
.mk-t span{display:block;margin-bottom:3px;font:800 10px/1 var(--f-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.modal.keep .modal-card.scrolls #modalBtn{position:sticky;bottom:4px;z-index:2;
  box-shadow:0 3px 0 var(--amber-deep), 0 8px 18px var(--amber-glow), inset 0 1px 0 var(--gloss), 0 0 0 18px var(--plum), 0 -14px 14px 16px var(--plum)}
@media (orientation:portrait) and (max-height:700px){
  .modal.keep .modal-card{padding:18px 18px 16px}
  .modal.keep .modal-art{margin-bottom:8px}
  .modal.keep .modal-art canvas{width:60px;height:60px}
  .modal.keep .modal-title{margin-bottom:8px;font-size:25px}
  .modal.keep .modal-body p{margin-bottom:8px;font-size:14px;line-height:1.4}
  .modal.keep .modal-stats{margin:8px 0}
  .modal.keep .modal-stats div{padding:8px 10px}
  .modal.keep .modal-stats b{font-size:19px}
  .modal.keep .modal-keep{margin:0 0 8px;padding:6px 10px}
}
.modal-perk{display:flex;flex-direction:column;gap:4px;margin:14px 0 4px;padding:12px 14px;border-radius:14px;border:1px dashed var(--teal-line);background:var(--teal-wash);font-size:14px;color:var(--cream-dim)}
.modal-perk .mp-k{font:800 10px/1 var(--f-ui);letter-spacing:.14em;text-transform:uppercase;color:var(--teal)}
.modal-perk b{font-size:16px;color:var(--cream)}
/* the move's row in the new-life dialog (stage 3, moving-day.md 3.1): the next home's postcard beside the kicker "Moving
   day" and its line (set left beside the card, as a postcard's back is written, though the phone's dialog centres its
   text), the new home's name in bold */
.move-card{display:flex;align-items:center;gap:12px;margin:12px 0 4px}
.move-card .mv-t{display:flex;flex-direction:column;gap:5px;min-width:0;text-align:left}
.move-card .mv-k{font:800 11px/1 var(--f-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--amber)}
.move-card .mv-l{margin:0;font-size:14px;line-height:1.4;color:var(--cream-dim)}
.move-card .mv-l b{color:var(--cream)}
/* the new home's postcard in the move's row (stage 3, moving-day.md 3.1: 132 px, 150 on a wide screen, 108 on a phone
   turned sideways; game.js movePcPx), turned a little, with its shadow */
.move-card .mv-pc{flex:none;width:132px;line-height:0;transform:rotate(-2deg)}
.move-card .mv-pc canvas{display:block;width:100%;height:auto;border-radius:2px;box-shadow:0 3px 10px rgba(20,12,4,.45)}
@media (min-width:900px){ .move-card .mv-pc{width:150px} }
@media (orientation:landscape) and (max-height:520px){ .move-card .mv-pc{width:108px} .move-card .mv-l{font-size:13px;line-height:1.35} }
/* a home's postcard as a dialog's art (the "A new home is ready" letter: 150 px, 108 on a phone turned sideways) */
.modal-art canvas.pc-art{width:150px;height:auto;border-radius:2px;box-shadow:0 3px 10px rgba(20,12,4,.45);transform:rotate(-2deg)}
@media (orientation:landscape) and (max-height:520px){ .modal-art canvas.pc-art{width:108px;height:auto} }
#modalBtn{margin-top:14px;min-width:220px}
/* forms (the kitten names): Cancel beside the main button, a name box with Suggest beside it */
.modal-card .modal-cancel{margin:14px 8px 0 0;height:46px;padding:0 20px;vertical-align:top}
/* the new life's dialog: "Not now" in its corner (its only button begins the life) */
.modal-card{position:relative}
.modal-x{position:absolute;top:12px;right:12px;z-index:3;display:inline-flex;align-items:center;gap:4px;height:32px;padding:0 12px 0 8px;border-radius:999px;
  border:1px solid var(--line);background:var(--ink-wash);color:var(--muted);font:700 12.5px/1 var(--f-ui);cursor:pointer;touch-action:manipulation}
.modal-x svg{width:16px;height:16px}
.modal-x .ln{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.modal-x:hover{color:var(--cream);border-color:var(--muted)}
.modal-x:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
.modal-x::after{content:"";position:absolute;inset:-6px -4px}
.modal-body p.keeps{margin-top:-4px}
.modal-kicker,.modal-title,.go-t,.ach-t{text-wrap:balance}
.modal.form #modalBtn{min-width:150px}
.modal[data-kind="names"] .modal-card{width:min(500px,100%)}
.name-row{display:flex;gap:8px;margin-top:4px}
.name-in{flex:1;min-width:0;height:48px;padding:0 14px;border-radius:var(--r-btn);border:1px solid var(--line);background:var(--ink-wash);color:var(--cream);
  font:400 22px/1 var(--f-hand);letter-spacing:.01em;box-shadow:inset 0 2px 6px var(--shadow-c)}
.name-in::placeholder{color:var(--muted);opacity:.65}
.name-in:hover{border-color:var(--amber-line)}
.name-in:focus{outline:none}
.name-in:focus-visible{outline:2px solid var(--amber);outline-offset:1px;border-color:var(--amber-line)}
.name-row .name-sug{flex:none;height:48px}
.modal-body .name-help{margin:8px 0 0}
.kn-list{display:grid;gap:9px;margin-top:10px;padding:2px 4px 2px 2px;text-align:left;max-height:min(560px, calc(100vh - 290px));overflow-y:auto;overscroll-behavior:contain;
  scrollbar-width:thin;scrollbar-color:var(--line) transparent}
/* the list dialog where the card is height-bound (held upright, or tall): a grid whose list row takes what the title and
   the buttons leave, so only the list scrolls and Cancel and Save stay at the foot (a 360 px phone's two-line title
   overran the fixed budget, and the card scrolled too) */
@media (orientation:portrait), (min-height:521px){
  .modal[data-kind="names"] .modal-card{display:grid;grid-template-columns:1fr auto auto 1fr;grid-template-rows:auto auto minmax(0,1fr) auto}
  .modal[data-kind="names"] .modal-kicker,.modal[data-kind="names"] .modal-title,.modal[data-kind="names"] .modal-body{grid-column:1 / -1}
  .modal[data-kind="names"] .modal-body{display:flex;flex-direction:column;min-height:0}
  .modal[data-kind="names"] .kn-list{flex:0 1 auto;min-height:96px;max-height:560px}
  .modal[data-kind="names"] .modal-cancel{grid-column:2;grid-row:4;margin-right:0}
  .modal[data-kind="names"] #modalBtn{grid-column:3;grid-row:4;margin-left:8px}
}
.kn-row{display:grid;grid-template-columns:40px minmax(0,1fr) auto;grid-template-areas:"art lbl lbl" "art in sug";column-gap:10px;row-gap:3px;align-items:center}
.kn-art{grid-area:art;width:40px;height:40px}
.kn-art canvas{display:block}
.kn-lbl{grid-area:lbl;font:600 12.5px/1.2 var(--f-ui);color:var(--muted)}
.kn-row .name-in{grid-area:in;height:40px;font-size:19px}
.kn-row .name-sug{grid-area:sug;height:40px;padding:0 12px}
/* the neighborhood (stage M): the board's dialog. Its portrait is this player's own alley cat (teal: a friendly visit);
   a line on where that cat is, a note when this viewer can only look, the board's rows (each player's alley cat, name,
   GDP, life and stars, "Send your cat"). The card is a column whose list takes the height that is left and scrolls
   inside it (fading at its foot while more rows are below), so Close stays in view however long the board is; where
   even two rows don't fit (a small phone, a phone turned sideways) the card scrolls as one and Close sticks to its foot */
.modal[data-kind="neighbors"] .modal-card{width:min(540px,100%)}
@media (orientation:portrait), (min-height:521px){
  .modal[data-kind="neighbors"] .modal-card{display:flex;flex-direction:column}
  .modal[data-kind="neighbors"] .modal-body{display:flex;flex-direction:column;flex:0 1 auto;min-height:0}
  .modal[data-kind="neighbors"] #modalBtn{flex:none;align-self:center}
}
.modal[data-kind="neighbors"] .modal-card.scrolls #modalBtn{position:sticky;bottom:4px;z-index:2;width:100%;
  box-shadow:0 3px 0 var(--amber-deep), 0 8px 18px var(--amber-glow), inset 0 1px 0 var(--gloss), 0 0 0 24px var(--plum), 0 -16px 16px 20px var(--plum)}
.modal[data-kind="neighbors"] .modal-art canvas{box-shadow:0 0 0 3px var(--teal), 0 0 34px var(--teal-wash)}
.modal[data-kind="neighbors"] .modal-kicker{color:var(--teal)}
.modal-body .nb-lead{margin-bottom:12px}
.modal-body .nb-out{margin:0 0 10px;padding:9px 12px;border-radius:12px;border:1px dashed var(--teal-line);background:var(--teal-wash);font-size:14px;line-height:1.4;color:var(--cream)}
.modal-body .nb-note{margin:0 0 10px;font-size:14px;line-height:1.4;color:var(--amber-hi)}
.nb-list{display:grid;align-content:start;gap:6px;flex:0 1 auto;margin:0;padding:2px 4px 2px 2px;list-style:none;text-align:left;max-height:min(560px, 62vh);
  min-height:116px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.nb-list.few{min-height:0}
.nb-list.more{-webkit-mask-image:linear-gradient(to bottom,var(--ink) calc(100% - 30px),transparent);mask-image:linear-gradient(to bottom,var(--ink) calc(100% - 30px),transparent)}
.nb-row{display:grid;grid-template-columns:20px 40px minmax(0,1fr) auto;column-gap:10px;align-items:center;padding:6px 8px 6px 6px;border-radius:12px;
  background:var(--ink-wash);border:1px solid var(--line)}
.nb-row.me{border-color:var(--amber-line);background:linear-gradient(180deg,var(--plum-3),var(--plum-2))}
.nb-rank{font:800 15px/1 var(--f-display);font-variation-settings:var(--soft);color:var(--muted);text-align:center}
.nb-row.me .nb-rank{color:var(--amber)}
.nb-rank.past{font-size:11px}
.nb-art{width:40px;height:40px}
.nb-art canvas{display:block}
.nb-who{display:flex;flex-direction:column;gap:3px;min-width:0;overflow:hidden}
.nb-name{font:700 15px/1.2 var(--f-ui);color:var(--cream);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* "3.07 billion purrs · Life 6 · 2 stars": each part on one line ("Life 9" never breaks; the purrs may), each but the
   first with its dot in front, in the 14 px the line starts left of the column, where .nb-who clips it: a part that
   wraps to a new line starts it without a dot */
.nb-meta{display:flex;flex-wrap:wrap;margin-left:-14px;font-size:12.5px;line-height:1.25;color:var(--muted)}
.nb-mi{position:relative;padding-left:14px;white-space:nowrap}
.nb-mi:first-child{white-space:normal}
.nb-mi::before{content:"\00b7";position:absolute;left:0;width:14px;text-align:center}
.nb-send{height:36px;padding:0 13px;border-radius:10px;border:1px solid var(--amber-line);background:var(--amber-wash);color:var(--amber-hi);
  font:700 13px/1 var(--f-ui);white-space:nowrap;cursor:pointer;touch-action:manipulation;transition:border-color .15s, background .15s}
.nb-send:hover{border-color:var(--amber)}
.nb-send:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
.nb-send[data-st="here"]{border-color:var(--teal-line);background:var(--teal-wash);color:var(--teal);cursor:default}
.nb-send[data-st="wait"]{border-color:var(--line);background:none;color:var(--muted);cursor:default}
.modal-body .nb-how{margin:12px 0 0}
/* phones held upright: no portrait (the list gets the room), the row's button says "Send" */
@media (max-width:479px){
  .modal[data-kind="neighbors"] .modal-card{padding:22px 16px 18px}
  .modal[data-kind="neighbors"] .modal-art{display:none}
  .nb-list{max-height:none}
  .nb-row{grid-template-columns:18px 36px minmax(0,1fr) auto;column-gap:8px}
  .nb-art,.nb-art canvas{width:36px!important;height:36px!important}
  .nb-send{padding:0 11px}
  .nb-long{display:none}
}
/* the new life's dialog: a radio group of small path cards in a grid (the radio itself is hidden; the whole card is its
   label: the medal, the name, one line), Ordinary life across the first row, and under the grid the chosen card's whole
   rule and medal goal. Where the card itself shouldn't scroll (wide screens, a phone turned sideways), past its rows (a
   home with more paths) the grid scrolls inside itself and fades at its foot (game.js pathFade); on a phone held
   upright the card is the one thing that scrolls, Begin on its band. The grid's padding keeps the chosen card's ring and
   the focus outline clear of its edge */
.modal.choose .modal-card{width:min(560px,100%)}
.path-pick{margin:14px 0 0;padding:0;border:0;min-width:0;text-align:left}
.path-pick legend{padding:0;margin:0 0 7px;font:800 18px/1.15 var(--f-display);font-variation-settings:var(--soft);color:var(--cream)}
.pp-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:-6px;padding:6px;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.pp-grid.more{-webkit-mask-image:linear-gradient(to bottom,var(--ink) calc(100% - 26px),transparent);mask-image:linear-gradient(to bottom,var(--ink) calc(100% - 26px),transparent)}
.pp-card{position:relative;display:grid;grid-template-columns:36px minmax(0,1fr);column-gap:9px;align-items:center;min-width:0;padding:7px 10px 7px 7px;
  border-radius:12px;border:1px solid var(--line);background:var(--ink-wash);cursor:pointer;touch-action:manipulation;transition:border-color .15s, background .15s}
.pp-card.plain{grid-column:1 / -1}
.pp-card:hover{border-color:var(--amber-line)}
.pp-card input{position:absolute;left:12px;top:50%;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}
.pp-card:has(input:checked){border-color:var(--amber);background:linear-gradient(180deg,var(--plum-3),var(--plum-2));box-shadow:0 0 0 1px var(--amber), 0 4px 12px var(--shadow-c)}
.pp-card:has(input:focus-visible){outline:2px solid var(--amber);outline-offset:2px}
.pp-art{width:36px;height:36px;display:grid;place-items:center}
.pp-art canvas{display:block;width:36px !important;height:36px !important}
.pp-card.plain .pp-art::before{content:"";position:absolute;width:30px;height:30px;border-radius:50%;background:var(--plum-3);box-shadow:0 0 0 2px var(--line)}
.pp-art svg{position:relative;width:16px;height:16px;fill:var(--muted)}
.pp-card:has(input:checked) .pp-art svg{fill:var(--amber)}
.pp-b{display:flex;flex-direction:column;min-width:0}
.pp-n{font:700 14px/1.2 var(--f-ui);color:var(--cream)}
.pp-r{margin-top:1px;font-size:12px;line-height:1.3;color:var(--muted)}
.pp-card:has(input:checked) .pp-r{color:var(--cream-dim)}
/* (a path whose medal she has: a teal tick after its name, the two kept on one line) */
.pp-card.got .pp-n{white-space:nowrap}
/* a later home's path she hasn't been offered before (stage 3: Charmed Life's first dialog): an amber New tag in the
   card's bottom corner, clear of its name */
.pp-new{position:absolute;bottom:5px;right:6px;padding:2px 5px 1px;border-radius:999px;font:800 9px/1 var(--f-ui);letter-spacing:.08em;text-transform:uppercase;
  color:var(--ink);background:var(--amber);pointer-events:none}
.pp-card.fresh .pp-r{padding-right:34px}
.pp-card.got .pp-n::after{content:"";display:inline-block;width:8px;height:4px;margin:0 0 3px 6px;border:solid var(--teal);border-width:0 0 2px 2px;transform:rotate(-45deg)}
/* the chosen card's whole rule: every card's in the same cell, the chosen one shown */
.pp-more{display:grid;margin-top:8px;padding:9px 12px 10px;border-radius:12px;border:1px dashed var(--line);background:var(--ink-wash)}
.modal-body .pp-d{grid-area:1 / 1;margin:0;font-size:13px;line-height:1.4;color:var(--cream-dim);visibility:hidden}
.pp-d.on{visibility:visible}
.pp-d b{font-weight:700;color:var(--cream)}
.pp-d b::after{content:" \00b7"}
.pp-g{font-weight:700;color:var(--amber)}
.pp-g.got{color:var(--teal)}
.pp-g.none{font-weight:600;color:var(--muted)}
.modal.choose #modalBtn{margin-top:16px}
/* stage 6's home choice (home-choice.md 1.2 to 1.4; HC6: game.js homePick): "Where will she live?", a row of postcards, each card a label
   round its radio (hidden, as the paths'), its postcard (3:2) over its short name, a ribbon on the unlived home (Next) and her own (Here);
   the checked card has the amber ring and a tick on its postcard's corner, so the ribbon is never the only cue. The row is a grid that
   wraps by itself (72 px a card at least, so three across at 320 × 568; at most about 150, centred); under it every card's words in one cell, the checked one's shown */
.home-pick{margin:14px 0 0;padding:0;border:0;min-width:0;text-align:left}
.home-pick legend{padding:0;margin:0 0 7px;font:800 18px/1.15 var(--f-display);font-variation-settings:var(--soft);color:var(--cream)}
.hp-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(72px,1fr));gap:8px;max-width:calc(var(--n, 3) * 158px);margin:-4px auto;padding:4px}
.hp-card{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:5px;min-width:0;min-height:44px;padding:6px 6px 7px;
  border-radius:12px;border:1px solid var(--line);background:var(--ink-wash);cursor:pointer;touch-action:manipulation;transition:border-color .15s, background .15s}
.hp-card:hover{border-color:var(--amber-line)}
.hp-card input{position:absolute;left:12px;top:24px;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}
.hp-card:has(input:checked){border-color:var(--amber);background:linear-gradient(180deg,var(--plum-3),var(--plum-2));box-shadow:0 0 0 1px var(--amber), 0 4px 12px var(--shadow-c)}
.hp-card:has(input:focus-visible){outline:2px solid var(--amber);outline-offset:2px}
.hp-pc{display:block;aspect-ratio:3 / 2;border-radius:3px;background:rgba(239,230,210,.07);line-height:0}
.hp-pc canvas{display:block;width:100%;height:auto;border-radius:3px;box-shadow:0 2px 8px rgba(8,4,16,.5)}
.hp-card:not(:has(input:checked)) .hp-pc canvas{opacity:.8}
.hp-n{font:700 13.5px/1.2 var(--f-ui);color:var(--cream-dim);text-align:center;overflow-wrap:anywhere}
.hp-card:has(input:checked) .hp-n{color:var(--cream)}
.hp-tag{position:absolute;top:-6px;right:-5px;padding:3px 6px 2px;border-radius:999px;font:800 9px/1 var(--f-ui);letter-spacing:.08em;text-transform:uppercase;
  color:var(--ink);background:var(--amber);box-shadow:0 2px 6px rgba(8,4,16,.45);pointer-events:none}
.hp-card.stay .hp-tag{color:var(--cream);background:var(--plum-3);box-shadow:0 0 0 1px var(--line), 0 2px 6px rgba(8,4,16,.45)}
.hp-card:has(input:checked)::after{content:"";position:absolute;left:2px;top:2px;width:18px;height:18px;border-radius:50%;background:var(--amber);box-shadow:0 1px 4px rgba(8,4,16,.5);
  background-image:linear-gradient(var(--ink),var(--ink)),linear-gradient(var(--ink),var(--ink));background-repeat:no-repeat;
  background-size:4px 2px,2px 9px;background-position:6px 11px,9px 4px;transform:rotate(40deg)}
.hp-more{display:grid;margin-top:8px;padding:9px 12px 10px;border-radius:12px;border:1px dashed var(--line);background:var(--ink-wash)}
.hp-d{grid-area:1 / 1;visibility:hidden}
.hp-d.on{visibility:visible}
.modal-body .hp-d p{margin:0}
.modal-body .hp-d .hp-l{font-size:14px;line-height:1.4;color:var(--cream-dim)}
.hp-d .hp-l b{color:var(--cream)}
.hp-k{display:block;margin-bottom:3px;font:800 11px/1 var(--f-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--amber)}
.modal-body .hp-d p.small{margin-top:6px}
.modal-body .hp-d .hp-pace{margin-top:6px;font-size:13px;line-height:1.35;font-weight:600;color:var(--teal)}
.modal-body .hp-d .hp-pace.slow{color:var(--amber)}
/* (1.4, mid-circle, from stage 7: game.js midCard) the same two cards in an ordinary new life's dialog, Stay and Move, with no pace line */
.home-pick.mid .hp-row{max-width:calc(var(--n, 2) * 132px)}
.mid-lead{display:grid}
.mid-lead > span{grid-area:1 / 1;visibility:hidden}
.mid-lead > span.on{visibility:visible}
.modal-body .pp-left{margin:6px 0 0;font-size:12.5px;line-height:1.35;color:var(--muted)}
.modal-body .pp-left:empty{display:none}
/* when the cards don't fit (phones held upright, short windows; game.js sets .scrolls), the button spans the card and
   stays in view at the bottom of it, on a band of the card's own color that the cards scroll under */
/* (at the end of the list the last card sits clear of the band: 40 px above the button) */
.modal.choose .modal-card.scrolls #modalBtn{position:sticky;bottom:4px;z-index:2;width:100%;margin-top:40px;
  box-shadow:0 3px 0 var(--amber-deep), 0 8px 18px var(--amber-glow), inset 0 1px 0 var(--gloss), 0 0 0 24px var(--plum), 0 -16px 16px 20px var(--plum)}
/* wide screens: the portrait beside the kicker, the title and the first line, and the cards four across (Ordinary life
   two wide), so the whole choice fits a laptop screen without scrolling */
@media (min-width:720px) and (min-height:521px){
  .modal.choose{padding:14px 20px}
  .modal.choose .modal-card{width:min(780px,100%);display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:18px;padding:22px 28px 20px;text-align:left}
  .modal.choose .modal-body{display:contents}
  .modal.choose .modal-art{grid-column:1;grid-row:1 / span 3;align-self:center;margin:0}
  .modal.choose .modal-art canvas{width:72px;height:72px}
  .modal.choose .modal-kicker{grid-column:2;align-self:end;margin:0 0 6px}
  .modal.choose .modal-title{grid-column:2;align-self:start;margin:0}
  .modal.choose .modal-body > p:first-child{grid-column:2;margin:7px 0 0}
  .modal.choose .modal-body > :not(:first-child),.modal.choose #modalBtn{grid-column:1 / -1}
  .modal.choose .modal-body > p.small{margin:0}
  /* (a new life's: what it takes, under its first line beside the portrait) */
  .modal.choose .modal-card:has(p.keeps) .modal-art{grid-row:1 / span 4}
  .modal.choose .modal-body > p.keeps{grid-column:2;margin:5px 0 0}
  .modal.choose .modal-stats{margin:16px 0 10px}
  .modal.choose .modal-stats div{padding:10px 12px}
  .modal.choose .modal-perk{margin:16px 0 0}
  .modal.choose .path-pick{margin-top:16px}
  /* (the row and the chosen card's words side by side, so the paths' third row still fits at 1440 × 900) */
  .modal.choose .home-pick{margin-top:16px;display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:14px;align-items:stretch}
  .modal.choose .hp-row{grid-template-columns:repeat(var(--n, 3),104px);gap:8px;max-width:none;margin:-4px 0;align-self:start}
  .modal.choose .hp-more{margin-top:0;padding:8px 12px 9px}
  .modal.choose .hp-k{display:none}
  .modal-body .hp-d .hp-l,.modal-body .hp-d p.small,.modal-body .hp-d .hp-pace{font-size:13px;line-height:1.38}
  .modal-body .hp-d p.small,.modal-body .hp-d .hp-pace{margin-top:4px}
  /* (a third row, stage 3's Charmed Life, still fits at 1440 × 900; a short window scrolls it) */
  .modal.choose .pp-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:-6px;max-height:min(300px, 34vh);overflow-y:auto}
  .modal.choose .pp-card{grid-template-columns:40px minmax(0,1fr);column-gap:10px;padding:8px 10px 8px 8px}
  .modal.choose .pp-card.plain{grid-column:span 2}
  .modal.choose .pp-art{width:40px;height:40px}
  .modal.choose .pp-art canvas{width:40px !important;height:40px !important}
  .modal.choose .pp-card.plain .pp-art::before{width:34px;height:34px}
  .modal.choose .pp-n{font-size:14.5px}
  .modal.choose .pp-r{font-size:12.5px}
  .modal.choose .pp-more{margin-top:10px;padding:10px 14px 11px}
  .modal.choose .pp-d{font-size:13.5px}
  .modal.choose #modalBtn{justify-self:center}
}
/* short landscape screens (a phone turned sideways): the portrait moves beside the kicker and title and the
   card widens, so a whole card (a secret cat's lore and stats too) fits without scrolling */
@media (orientation:landscape) and (max-height:520px){
  .modal{padding:10px 16px}
  .modal-card{width:min(600px,100%);display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:16px;padding:16px 22px 16px;text-align:left}
  .modal-art{grid-row:1 / span 2;margin:0}
  .modal-art canvas{width:64px;height:64px}
  .modal-kicker{align-self:end;margin:0 0 5px}
  .modal-title{align-self:start;margin:0;font-size:26px}
  .modal-body,#modalBtn{grid-column:1 / -1}
  .modal-body{margin-top:12px}
  .modal-body p{margin-bottom:6px;font-size:14px;line-height:1.4}
  .modal-stats{margin:8px 0 10px}
  .modal-stats div{padding:9px 11px}
  .modal-stats b{font-size:21px}
  .modal-perk{margin:8px 0 4px;padding:9px 12px}
  #modalBtn{justify-self:center;height:42px;margin-top:6px}
}
/* the letter on a phone turned sideways: a wider card and tighter paragraphs, so it fits the screen */
@media (orientation:landscape) and (max-height:520px){
  .modal[data-kind="letter"] .modal-card{width:min(760px,100%)}
  .modal[data-kind="letter"] .modal-body p{margin-bottom:5px;font-size:13.5px;line-height:1.38}
}
/* the board's dialog on a short screen (a phone turned sideways): the card scrolls as one, the list with it */
@media (orientation:landscape) and (max-height:520px){
  .nb-list{max-height:none;overflow:visible}
  .modal-body .nb-lead{margin-bottom:8px}
}
/* (V3) a phone held upright under 760 px tall: the group's heading took the room of a row, so the list showed one row or less; with
   the group the card scrolls as one there (as a phone turned sideways does), Close stuck to its foot. And wherever the card scrolls as
   one, a control focused near its foot stops above Close, not under it */
@media (orientation:portrait) and (max-height:759px){
  .modal[data-kind="neighbors"] .modal-card.nd-on .modal-body{flex:none}
  .modal[data-kind="neighbors"] .modal-card.nd-on .nb-list{max-height:none;min-height:0;overflow:visible}
}
.modal[data-kind="neighbors"] .modal-card.scrolls{scroll-padding-bottom:76px}
/* (and with the group, the card's last line, the visits' note, ends clear of Close's band at the foot, as the new life's last card does) */
.modal[data-kind="neighbors"] .modal-card.nd-on.scrolls #modalBtn{margin-top:40px}
/* the kitten name forms on a phone turned sideways: one column (a smaller portrait), the list two by two */
@media (orientation:landscape) and (max-height:520px){
  .modal.form .modal-card{display:block;width:min(500px,100%);text-align:center;padding:14px 20px}
  .modal[data-kind="names"] .modal-card{width:min(760px,100%)}
  .modal.form .modal-art{margin:0 0 6px}
  .modal.form .modal-art canvas{width:52px;height:52px}
  .modal.form .modal-kicker{margin:0 0 4px}
  .modal.form .modal-title{margin:0 0 8px;font-size:24px}
  .modal.form .modal-body{margin-top:0}
  .modal.form #modalBtn,.modal.form .modal-cancel{height:42px;margin-top:10px}
  .modal[data-kind="names"] .modal-body > p.small{display:none}
  .kn-list{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px;max-height:calc(100vh - 160px)}
  .kn-row .name-in,.kn-row .name-sug{height:36px}
}
/* (1.3, V3) with "Where will she live?" (HC6) the choice was a row of homes taller, so a laptop's 900 px scrolled it again: the card
   grows to 960 and the paths go five across (Ordinary life two wide), two rows for nine */
@media (min-width:720px) and (min-height:521px){
  .modal.choose .modal-card:has(.home-pick){width:min(960px,100%)}
}
@media (min-width:1000px) and (min-height:521px){
  .modal.choose .modal-card:has(.home-pick) .pp-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
  /* (1.4, GH1d: with ten cards, the Huntress' and the Gremlin's both there, Ordinary life is one wide as the others: two rows again) */
  .modal.choose .modal-card:has(.home-pick) .pp-grid:has(> :nth-child(10)) .pp-card.plain{grid-column:auto}
}
/* (1.3, V3b) and on a shorter laptop (1280 × 800, 1024 × 768) it still scrolled, by up to 58 px: with the row, under 880 px tall, each
   tally's label, number and word go on one line, and the gaps close a little. Same words, same type */
@media (min-width:720px) and (min-height:521px) and (max-height:880px){
  .modal.choose .modal-card:has(.home-pick){padding-top:18px;padding-bottom:16px}
  .modal.choose .modal-card:has(.home-pick) .modal-stats{margin:12px 0 0}
  .modal.choose .modal-card:has(.home-pick) .modal-stats div{flex-direction:row;align-items:baseline;flex-wrap:wrap;column-gap:10px;row-gap:4px;padding:8px 12px}
  .modal.choose .modal-card:has(.home-pick) .home-pick,.modal.choose .modal-card:has(.home-pick) .path-pick{margin-top:12px}
}
/* the new life's dialog on a phone turned sideways: what the life brings on the left, the path cards on the right */
@media (orientation:landscape) and (max-height:520px){
  .modal.choose .modal-card{width:min(860px,100%);grid-template-columns:52px minmax(0,190px) minmax(0,1fr);grid-template-rows:repeat(7,auto) 1fr;
    column-gap:14px;padding:14px 18px}
  .modal.choose .modal-body{display:contents}
  .modal.choose .modal-art{grid-column:1;grid-row:1 / span 2;align-self:center}
  .modal.choose .modal-art canvas{width:52px;height:52px}
  .modal.choose .modal-kicker{grid-column:2;grid-row:1}
  .modal.choose .modal-title{grid-column:2;grid-row:2;font-size:22px}
  .modal.choose .modal-body > p,.modal.choose .modal-perk,.modal.choose .modal-stats,.modal.choose .move-card{grid-column:1 / span 2;margin:8px 0 0}
  .modal.choose .home-pick{grid-column:1 / span 2;margin:8px 0 0}
  .modal.choose .home-pick legend{margin-bottom:5px;font-size:16px}
  .modal.choose .hp-row{grid-template-columns:repeat(auto-fit,minmax(64px,1fr));gap:5px}
  .modal.choose .hp-card{padding:4px 4px 5px;gap:3px;border-radius:10px}
  .modal.choose .hp-n{font-size:12px}
  .modal.choose .hp-more{margin-top:6px;padding:6px 9px 7px;border-radius:10px}
  .modal-body .hp-d .hp-l{font-size:12.5px;line-height:1.35}
  .modal-body .hp-d p.small,.modal-body .hp-d .hp-pace{margin-top:4px;font-size:12px}
  .modal.choose .modal-body > p{font-size:13px;line-height:1.4}
  .modal.choose .modal-stats div{padding:7px 9px}
  .modal.choose .modal-stats b{font-size:18px}
  .modal.choose .path-pick{grid-column:3;grid-row:1 / span 8;margin:0;align-self:start}
  .modal.choose .path-pick legend{margin-bottom:5px;font-size:16px}
  .modal.choose .pp-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:-5px;padding:5px;max-height:calc(100vh - 168px);overflow-y:auto}
  .modal.choose .pp-card{grid-template-columns:30px minmax(0,1fr);column-gap:7px;padding:5px 7px 5px 5px;border-radius:10px}
  .modal.choose .pp-card.plain{grid-column:1 / -1}
  .modal.choose .pp-art{width:30px;height:30px}
  .modal.choose .pp-art canvas{width:30px !important;height:30px !important}
  .modal.choose .pp-card.plain .pp-art::before{width:26px;height:26px}
  .modal.choose .pp-art svg{width:14px;height:14px}
  .modal.choose .pp-n{font-size:13px}
  .modal.choose .pp-r{font-size:11px;line-height:1.25}
  .modal.choose .pp-more{margin-top:6px;padding:6px 10px 7px;border-radius:10px}
  .modal.choose .pp-d{font-size:12px;line-height:1.35}
  .modal-x{top:7px;right:10px;height:28px}
  .modal.choose #modalBtn,.modal.choose .modal-card.scrolls #modalBtn{grid-column:1 / span 2;justify-self:stretch;width:auto;min-width:0;margin-top:12px;align-self:start;position:static;
    box-shadow:0 3px 0 var(--amber-deep), 0 12px 26px var(--amber-glow), inset 0 1px 0 var(--gloss)}
  /* (a dialog that moves her: its Begin under the stat cards, then the postcard row and what goes with her, so Begin stays
     on the first screen and the card scrolls on to the rest: stage 3's H22; the grid places them in this order) */
  .modal.choose.moving #modalBtn{order:1}
  .modal.choose.moving .move-card{order:2}
  .modal.choose.moving .home-pick{order:2}
  .modal.choose.moving .move-card ~ p,.modal.choose.moving .move-card ~ .modal-perk{order:3}
}
/* narrow phones: a smaller portrait leaves the room to the cards */
@media (max-width:479px){
  .modal.choose .modal-card{padding:20px 16px 18px}
  .modal.choose .modal-art{display:none}
  .modal.choose #modalBtn{width:100%}
  .modal.choose .modal-title{font-size:28px;margin-bottom:8px}
  /* (the ascension's two numbers a little tighter, so it fits a 390 × 844 phone without scrolling as a new life does) */
  .modal.choose .modal-stats{margin:10px 0}
  .modal.choose .modal-stats div{padding:10px}
}
/* the narrowest phones (360 px): a little more room for a name and its tick, so an earned card stays one line high;
   under 360 px (320, a small phone or a zoomed display) two cards side by side can't hold "Sleepyhead": one a row */
@media (max-width:379px){
  .modal.choose .pp-card{column-gap:7px}
  .modal.choose .pp-n{font-size:13px}
  .pp-card.got .pp-n::after{margin-left:4px}
  /* (1.4, GH1d: the Huntress' "pets ×0.5" ends 3 px into the New tag's place; where she is offered the tags stand 4 px further right) */
  .pp-grid:has(> [data-path="huntress"]) .pp-new{right:2px}
}
@media (max-width:359px){
  .modal.choose .pp-grid{grid-template-columns:minmax(0,1fr)}
  /* (1.2.1: "Not now" is its × alone here, 8 px into the card's corner, its words its label (game.js: aria-label), so the centred kicker,
     "Ascension" or "A new circle", and the title's first line stay clear of it; the pill's 92 px covered the kicker's last letter at 320) */
  .modal-x{top:8px;right:8px;width:32px;padding:0;justify-content:center}
  .modal-x span{display:none}
  .modal-x::after{inset:-6px}
}
@keyframes fade{from{opacity:0}}
@keyframes rise{from{opacity:0;transform:translateY(14px) scale(.97)}}

/* ================= the main menu: the title screen and the pause menu =================
   It takes the shop's place (over the shop column, or a sheet from the bottom on phones held upright) while the room
   stays alive behind it, dimmed and softly blurred. Pages: the menu, How to play, Settings. */
/* the scrim is lightest where she sits in the room (--scrim-at), so she stays in view behind the menu */
.menu{--scrim-at:36% 72%;position:fixed;inset:0;z-index:40;background:radial-gradient(70% 60% at var(--scrim-at), var(--menu-scrim-lo), var(--menu-scrim));
  -webkit-backdrop-filter:blur(2.5px) saturate(.92);backdrop-filter:blur(2.5px) saturate(.92);animation:fade .3s ease-out;
  /* (1.3.1, AN A1: its layer the screen's size, not the card's shadow's beyond it, which no one sees) */
  contain:paint}
.menu-card{position:absolute;top:0;right:0;bottom:0;width:var(--panel-w);display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
  padding:28px max(26px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) 26px;
  background:linear-gradient(180deg, var(--lamp-wash), transparent 260px), var(--plum);border-left:1px solid var(--line);
  box-shadow:-18px 0 40px var(--shadow-c), inset 12px 0 28px -16px var(--lamp-edge);animation:menuIn .38s cubic-bezier(.2,.9,.3,1.05);
  scrollbar-width:thin;scrollbar-color:var(--line) transparent}
/* the room's wallpaper motif, as on the shop */
.menu-card::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:var(--motif);opacity:.075;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='92' height='68'%3E%3Cpath d='M29.95 18.36A6 6 0 1 0 37.64 26.05A5.2 5.2 0 0 1 29.95 18.36ZM9 54L10.1 56.9L13 58L10.1 59.1L9 62L7.9 59.1L5 58L7.9 56.9ZM75.95 52.36A6 6 0 1 0 83.64 60.05A5.2 5.2 0 0 1 75.95 52.36ZM55 20L56.1 22.9L59 24L56.1 25.1L55 28L53.9 25.1L51 24L53.9 22.9Z'/%3E%3C/svg%3E") 0 0/92px 68px repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='92' height='68'%3E%3Cpath d='M29.95 18.36A6 6 0 1 0 37.64 26.05A5.2 5.2 0 0 1 29.95 18.36ZM9 54L10.1 56.9L13 58L10.1 59.1L9 62L7.9 59.1L5 58L7.9 56.9ZM75.95 52.36A6 6 0 1 0 83.64 60.05A5.2 5.2 0 0 1 75.95 52.36ZM55 20L56.1 22.9L59 24L56.1 25.1L55 28L53.9 25.1L51 24L53.9 22.9Z'/%3E%3C/svg%3E") 0 0/92px 68px repeat}
.mp{position:relative;z-index:1;display:flex;flex-direction:column;min-height:0;flex-shrink:0}
/* a page taller than the card scrolls the card; nothing in it is squeezed (How to play's "Got it" was 15 px tall) */
.mp > *{flex-shrink:0}
.mp-main{margin:auto 0;text-align:center;align-items:stretch}
/* her portrait over the logo, on screens with the height for it */
.menu-art{display:none;justify-self:center;align-self:center;margin:0 auto 16px;border-radius:50%;box-shadow:0 0 0 3px var(--amber), 0 0 34px var(--amber-glow)}
.menu-art canvas{display:block;border-radius:50%}
@media (min-height:700px) and (min-width:1000px), (min-height:920px){ .menu-art{display:block} }
.menu-kick{font:800 11px/1 var(--f-ui);letter-spacing:.16em;text-transform:uppercase;color:var(--amber);margin-bottom:10px}
.menu-logo{font:900 54px/1 var(--f-display);font-variation-settings:var(--soft);letter-spacing:-.01em;color:var(--cream);
  text-shadow:0 2px 0 var(--shadow-c), 0 0 38px var(--amber-glow)}
.menu-tag{margin-top:8px;font:400 22px/1.1 var(--f-hand);color:var(--amber-hi);letter-spacing:.02em}
.menu-save{margin-top:14px;font:600 13.5px/1.4 var(--f-ui);color:var(--cream-dim);font-variant-numeric:tabular-nums;text-wrap:balance}
.menu-save:empty{display:none}
.menu-btns{display:flex;flex-direction:column;gap:9px;margin-top:24px}
.menu-btns .btn-primary.big{height:56px;font-size:18px}
.menu-btn{display:flex;align-items:center;gap:11px;width:100%;height:48px;padding:0 16px;border-radius:var(--r-btn);border:1px solid var(--line);
  background:linear-gradient(180deg,var(--plum-2),var(--plum-2b));box-shadow:inset 0 1px 0 var(--hi);color:var(--cream);font:700 15px/1 var(--f-ui);
  text-align:left;cursor:pointer;touch-action:manipulation;transition:border-color .15s, background .15s, transform .08s}
.menu-btn:hover{border-color:var(--amber-line);background:linear-gradient(180deg,var(--plum-3),var(--plum-2))}
.menu-btn:active{transform:translateY(1px)}
.menu-btn svg{flex:none;width:20px;height:20px;fill:currentColor;color:var(--amber)}
.menu-btn .ln,.mp-back .ln{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* the Mini games entry: the playtimes waiting, at its end */
.mb-note{margin-left:auto;font:700 12.5px/1 var(--f-ui);color:var(--amber);font-variant-numeric:tabular-nums}
.mb-note.none{color:var(--muted)}
.menu-btn.danger{color:var(--muted)}
.menu-btn.danger svg{color:var(--rose)}
.menu-btn.danger:hover{border-color:var(--rose-line);color:var(--cream)}
.menu-btn.danger.armed{border-color:var(--rose);color:var(--rose-soft);background:var(--rose-wash)}
/* a page: Back, its title, then its content */
.mp-head{display:flex;align-items:center;gap:6px;margin:-6px 0 14px -10px}
.mp-back{flex:none;display:grid;place-items:center;width:42px;height:42px;padding:0;border:0;border-radius:12px;background:none;color:var(--cream);cursor:pointer;touch-action:manipulation}
.mp-back:hover{background:var(--hi);color:var(--amber-hi)}
.mp-back svg{width:24px;height:24px}
.mp-title{font:800 27px/1 var(--f-display);font-variation-settings:var(--soft);color:var(--cream)}
.mp-done{align-self:center;min-width:180px;margin-top:16px}
/* How to play: a few short cards, each with a portrait or a glyph from the room */
.howto{list-style:none;margin:0;padding:0;display:grid;gap:8px;text-align:left}
.ht{display:grid;grid-template-columns:54px minmax(0,1fr);column-gap:13px;align-items:center;padding:11px 14px 12px 11px;border-radius:var(--r-card);
  border:1px solid var(--line);background:linear-gradient(180deg,var(--plum-2),var(--plum-2b));box-shadow:inset 0 1px 0 var(--hi)}
.ht-art{position:relative;display:grid;place-items:center;width:54px;height:54px;border-radius:50%;
  background:radial-gradient(circle at 50% 30%, var(--plum-4), var(--ink) 80%);box-shadow:0 0 0 2px var(--line), 0 4px 10px var(--shadow-c)}
.ht-art canvas{display:block;border-radius:50%}
.ht-art svg{width:28px;height:28px;fill:var(--kc, var(--amber));filter:drop-shadow(0 0 6px var(--kg, var(--amber-glow)))}
.ht-art .dot{position:absolute;right:7px;bottom:9px;width:10px;height:10px;border-radius:50%;background:var(--rose);box-shadow:0 0 0 3px var(--rose-wash), 0 0 12px var(--rose-glow)}
.ht-t{display:block;font:700 15px/1.2 var(--f-ui);color:var(--cream)}
.ht-d{display:block;margin-top:3px;font-size:13.5px;line-height:1.42;color:var(--muted)}
/* (1.4, FD3) the short film again, under the cards */
/* Settings: groups of rows; the Sound group has room for the music controls stage J adds */
.set-group{margin:0 0 20px;padding:0;border:0;min-width:0;text-align:left}
.set-h{display:block;margin:0 0 9px;padding:0;font:800 10.5px/1 var(--f-ui);letter-spacing:.15em;text-transform:uppercase;color:var(--muted)}
.set-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border-radius:var(--r-card);border:1px solid var(--line);background:var(--ink-wash)}
.set-row + .set-row{margin-top:8px}
.set-row[hidden]{display:none}
.set-l{display:flex;flex-direction:column;gap:4px;min-width:0;font:700 15px/1.2 var(--f-ui);color:var(--cream)}
.set-l small{font:400 12.5px/1.35 var(--f-ui);color:var(--muted)}
.switch{flex:none;position:relative;width:52px;height:32px;padding:0;border-radius:99px;border:1px solid var(--line);background:var(--plum-3);cursor:pointer;touch-action:manipulation;
  box-shadow:inset 0 2px 6px var(--shadow-c);transition:background .18s, border-color .18s}
.switch .knob{position:absolute;left:4px;top:4px;width:22px;height:22px;border-radius:50%;background:var(--muted);box-shadow:0 2px 5px var(--shadow-c);transition:transform .18s, background .18s}
.switch[aria-checked="true"]{background:var(--amber-wash);border-color:var(--amber-line)}
.switch[aria-checked="true"] .knob{transform:translateX(20px);background:var(--amber)}
.mo-pick{display:flex;padding:3px;border-radius:12px;background:var(--ink-wash);border:1px solid var(--line)}
.mo{flex:1;position:relative;min-width:0}
.mo input{position:absolute;left:50%;top:50%;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}
.mo span{display:grid;place-items:center;height:38px;border-radius:9px;font:800 14px/1 var(--f-ui);color:var(--muted);cursor:pointer;touch-action:manipulation}
.mo span:hover{color:var(--cream)}
.mo input:checked + span{background:var(--amber);color:var(--btn-ink);box-shadow:inset 0 1px 0 var(--gloss), 0 2px 10px var(--amber-glow)}
.mo input:focus-visible + span{outline:2px solid var(--amber);outline-offset:2px}
.set-note{margin-top:9px;font-size:13px;line-height:1.45;color:var(--muted)}
.set-note:empty{display:none}
.set-save{display:flex;align-items:center;gap:8px;margin:0 0 12px;color:var(--cream-dim)}
.set-save.cloud .save-dot{background:var(--teal);opacity:1;box-shadow:0 0 0 3px var(--teal-wash)}
#resetBtn{width:100%;height:44px}
/* the transfer code (the claude page's, mobile.md 5.20): its button as wide as Reset progress, the code in a read-only box
   of four rows in a monospace face under it */
.xfer{margin:0 0 12px}
.xfer .xfer-lead{margin:0 0 9px}
#xferBtn{width:100%;height:44px}
.xfer-code{display:block;width:100%;margin:10px 0 0;padding:9px 11px;border-radius:10px;border:1px solid var(--line);background:var(--ink-wash);color:var(--cream-dim);
  font:500 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;word-break:break-all;resize:none}
.xfer-code[hidden]{display:none}
.xfer-code:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
/* the volume under each switch (stage L): a slim track that fills amber up to the value (--p) and a round amber knob;
   dimmed while its switch is off (it can still be set) */
.set-vol{flex-wrap:wrap;row-gap:8px}
.set-vol .set-l{flex:1 1 0}
.vol{flex:1 1 100%;display:flex;align-items:center;gap:12px;min-width:0}
.vol-k{flex:none;font:800 10.5px/1 var(--f-ui);letter-spacing:.13em;text-transform:uppercase;color:var(--muted)}
.vol-v{flex:none;min-width:3.1em;text-align:right;font:700 13px/1 var(--f-ui);font-variant-numeric:tabular-nums;color:var(--cream-dim)}
.vol-in{flex:1;min-width:0;height:30px;margin:0;padding:0;background:none;-webkit-appearance:none;appearance:none;cursor:pointer}
.vol-in:focus-visible{outline:none}
.vol-in::-webkit-slider-runnable-track{height:6px;border-radius:99px;background:linear-gradient(90deg, var(--amber) var(--p, 50%), var(--track) var(--p, 50%))}
.vol-in::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;margin-top:-7px;border-radius:50%;background:var(--amber);border:3px solid var(--plum);box-shadow:0 2px 6px var(--shadow-c)}
.vol-in::-moz-range-track{height:6px;border-radius:99px;background:var(--track)}
.vol-in::-moz-range-progress{height:6px;border-radius:99px;background:var(--amber)}
.vol-in::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:var(--amber);border:3px solid var(--plum);box-shadow:0 2px 6px var(--shadow-c)}
.vol-in:focus-visible::-webkit-slider-thumb{outline:2px solid var(--amber);outline-offset:2px}
.vol-in:focus-visible::-moz-range-thumb{outline:2px solid var(--amber);outline-offset:2px}
.set-vol.off .vol{opacity:.5}
@media (pointer:coarse){ .vol-in{height:38px} }
@keyframes menuIn{from{opacity:0;transform:translateX(26px)}}
@keyframes menuUp{from{opacity:0;transform:translateY(30px)}}
/* phones and tablets held upright: a sheet from the bottom over the shop, the room above it */
@media (max-width:999px){
  .menu{--scrim-at:50% 22%}
  .menu-card{top:auto;left:0;width:auto;max-height:calc(100% - 14px);padding:22px max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    border-left:0;border-top:1px solid var(--line);border-radius:22px 22px 0 0;box-shadow:0 -14px 34px var(--shadow-c);animation-name:menuUp}
  .menu-card > .mp{width:min(460px,100%);margin-left:auto;margin-right:auto}
  .mp-main{margin-top:0;margin-bottom:0}
}
@media (max-width:479px){
  .menu-logo{font-size:46px}
  .menu-tag{font-size:20px;margin-top:6px}
  .menu-save{margin-top:11px}
  .menu-btns{margin-top:18px;gap:8px}
  .menu-btns .btn-primary.big{height:52px}
  .menu-btn{height:46px}
  .ht{grid-template-columns:48px minmax(0,1fr);column-gap:12px;padding:10px 12px 11px 10px}
  .ht-art{width:48px;height:48px}
  .ht-art canvas{width:48px !important;height:48px !important}
  .ht-art svg{width:25px;height:25px}
  .ht-d{font-size:13px;line-height:1.38}
}
/* phones turned sideways: a column on the right, where the shop is */
@media (max-width:999px) and (orientation:landscape) and (max-height:560px){
  .menu{--scrim-at:27% 68%}
  .menu-card{top:0;left:auto;width:clamp(280px,46vw,420px);max-height:none;border-radius:0;border-top:0;border-left:1px solid var(--line);
    padding:16px max(18px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) 18px;box-shadow:-14px 0 34px var(--shadow-c);animation-name:menuIn}
  .mp-main{margin-top:auto;margin-bottom:auto}
  .menu-logo{font-size:38px}
  .menu-tag{font-size:18px;margin-top:4px}
  .menu-save{margin-top:8px;font-size:12.5px}
  .menu-btns{margin-top:14px;gap:7px}
  .menu-btns .btn-primary.big{height:46px;font-size:16px}
  .menu-btn{height:40px;font-size:14px}
  /* with the Neighbors entry (stage M) six buttons share the height: a little slimmer, so New game stays in view */
  .menu-btns:has(#menuNb:not([hidden])){gap:6px}
  .menu-btns:has(#menuNb:not([hidden])) .menu-btn{height:36px}
  /* (and with the Look entry as well, seven: slimmer again) */
  .menu-btns:has(#menuNb:not([hidden])):has(#menuLook:not([hidden])){gap:5px}
  .menu-btns:has(#menuNb:not([hidden])):has(#menuLook:not([hidden])) .menu-btn{height:33px}
  /* (the Album's entry makes eight or nine: as slim, by a class from renderMenu, and the card scrolls as Settings does: stage4.md 5.5) */
  .menu-btns.full{gap:5px}
  .menu-btns.full .menu-btn{height:33px}
  .mp-head{margin:-4px 0 10px -8px}
  .mp-title{font-size:23px}
  .set-group{margin-bottom:14px}
  .set-row{padding:9px 12px}
  .mo span{height:34px}
  .ht{padding:8px 11px 9px 9px}
}
/* a phone turned sideways under 400 px tall (844×390, 667×375): a smaller logo, and while the pause menu's "Paused"
   shows, no tag line, so New game is in view without a scroll */
@media (max-width:999px) and (orientation:landscape) and (max-height:400px){
  .menu-card{padding-top:12px;padding-bottom:max(10px, env(safe-area-inset-bottom))}
  .menu-logo{font-size:32px}
  .menu-tag{font-size:16px;margin-top:2px}
  .menu-kick{margin-bottom:6px}
  .menu-btns{margin-top:10px}
  .mp-main:has(.menu-kick:not([hidden])) .menu-tag{display:none}
}

/* ================= the mini games (stage K) =================
   A full-screen panel over the dimmed room (a card in the middle on wide screens, the whole screen on phones). Its first
   page lists the games and the playtime; a round is a bar (Leave, the game's name, the score, Pause), the time, its own
   canvas (the renderer's Scene.play) with a button over each hole or card, and a line of help under it. */
.games{position:fixed;inset:0;z-index:45;display:grid;place-items:center;padding:22px;background:var(--games-scrim);
  -webkit-backdrop-filter:blur(4px) saturate(.9);backdrop-filter:blur(4px) saturate(.9);animation:fade .25s ease-out}
.games-card.hub{height:auto;max-height:100%}
.games-card{position:relative;width:min(1060px,100%);height:min(780px,100%);display:flex;flex-direction:column;min-height:0;overflow:hidden;border-radius:22px;
  background:radial-gradient(120% 60% at 50% 0%, var(--plum-4), var(--plum) 64%);border:1px solid var(--line);
  box-shadow:0 30px 80px var(--shadow-c), inset 0 1px 0 var(--hi);animation:rise .38s cubic-bezier(.2,.9,.3,1.1)}
.gv{position:relative;z-index:1;display:flex;flex-direction:column;flex:1;min-height:0}
.gx,.gp-btn{flex:none;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid var(--glass-line);border-radius:12px;background:var(--ink-wash);
  color:var(--cream);cursor:pointer;touch-action:manipulation}
.gx:hover,.gp-btn:hover{border-color:var(--amber-line);color:var(--amber-hi)}
.gx svg,.gp-btn svg{width:22px;height:22px;fill:currentColor}
/* Pause turns into Resume while the round is paused, and steps aside on the results card */
.gp-btn .ic-r,.gp-btn.resume .ic-p{display:none}
.gp-btn.resume .ic-r{display:block}
.gp-btn.off{visibility:hidden}
.gx .ln,.gp-btn .ln{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
/* the first page: the playtime and the three games */
.gv-hub{--hp-t:24px;--hp-x:28px;overflow-y:auto;overscroll-behavior:contain;padding:var(--hp-t) var(--hp-x) 26px;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
/* the title and its close button stay in reach while the page scrolls (a phone: the trophies are under the fold); once it
   has scrolled (.scrolled, game.js) they sit on a frosted bar */
.gh-head{position:sticky;top:calc(-1 * var(--hp-t));z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:calc(-1 * var(--hp-t)) calc(-1 * var(--hp-x)) 0;padding:var(--hp-t) var(--hp-x) 12px}
.gv-hub.scrolled .gh-head{background:var(--gh-head);box-shadow:0 1px 0 var(--line), 0 10px 24px var(--shadow-c);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.pt-row{margin-top:6px}
.gh-title{font:900 34px/1 var(--f-display);font-variation-settings:var(--soft);color:var(--cream);text-shadow:0 0 30px var(--amber-glow)}
.pt-row{display:flex;align-items:center;gap:12px;padding:10px 14px;border-radius:var(--r-card);border:1px solid var(--line);background:var(--ink-wash)}
.pt-pips{display:flex;gap:5px;flex:none}
.pt-pips i{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:var(--plum-3);box-shadow:inset 0 0 0 1.5px var(--line)}
.pt-pips i svg{width:13px;height:13px;fill:var(--muted);opacity:.6}
.pt-pips i.on{background:radial-gradient(circle at 38% 32%, var(--amber-hi), var(--amber) 55%, var(--amber-deep));box-shadow:0 0 12px var(--amber-glow)}
.pt-pips i.on svg{fill:var(--btn-ink);opacity:.85}
.pt-line{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:8px;font:600 14px/1.3 var(--f-ui);color:var(--muted)}
.pt-line b{font-weight:800;color:var(--cream)}
.gh-lead{margin-top:12px;font-size:14px;line-height:1.5;color:var(--cream-dim);max-width:62ch}
.g-list{list-style:none;margin:18px 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.g-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;width:100%;height:100%;padding:16px 16px 18px;border-radius:18px;border:1px solid var(--line);
  background:linear-gradient(180deg,var(--plum-2),var(--plum-2b));box-shadow:inset 0 1px 0 var(--hi);text-align:center;cursor:pointer;touch-action:manipulation;
  transition:border-color .15s, background .15s, transform .08s}
.g-card:hover{border-color:var(--amber-line);background:linear-gradient(180deg,var(--plum-3),var(--plum-2))}
.g-card:active{transform:translateY(1px)}
.g-art{display:grid;place-items:center;width:132px;height:132px;margin-bottom:6px;border-radius:50%;background:radial-gradient(closest-side, var(--box-pool), transparent)}
.g-art canvas{display:block}
.g-n{font:800 21px/1.1 var(--f-display);font-variation-settings:var(--soft);color:var(--cream)}
.g-m{font:800 10.5px/1.3 var(--f-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--amber)}
.g-l{margin-top:4px;font:400 16px/1.2 var(--f-hand);color:var(--muted);text-wrap:balance}
.g-b{margin-top:6px;font:600 12.5px/1.3 var(--f-ui);color:var(--cream-dim);font-variant-numeric:tabular-nums}
.g-go{margin-top:auto;padding-top:12px;display:flex;flex-direction:column;align-items:center;gap:5px}
.g-go .g-p{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:40px;min-width:148px;padding:0 18px;border-radius:var(--r-btn);
  background:linear-gradient(180deg,var(--amber-hi),var(--amber) 55%,var(--amber-lo));color:var(--btn-ink);font:800 15px/1 var(--f-ui);
  box-shadow:0 3px 0 var(--amber-deep), 0 10px 22px var(--amber-glow), inset 0 1px 0 var(--gloss)}
.g-card.fun .g-p{background:var(--plum-3);color:var(--cream);box-shadow:inset 0 1px 0 var(--hi), 0 0 0 1px var(--line)}
.g-go small{font:600 11.5px/1.2 var(--f-ui);color:var(--muted)}
/* the games' trophies under them (the trophy tiles of the Trophies tab) */
.g-tro{margin-top:18px}
.gt-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
/* a round: the bar, the time, the board */
.gp-bar{flex:none;display:flex;align-items:center;gap:12px;padding:12px 14px 10px}
.gp-title{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.gp-name{font:900 24px/1 var(--f-display);font-variation-settings:var(--soft);color:var(--cream);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gp-sub{font:600 12.5px/1.2 var(--f-ui);color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gp-score{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:3px;margin-right:4px;min-width:64px}
.gp-k{font:800 10px/1 var(--f-ui);letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
.gp-v{font:900 32px/.9 var(--f-display);font-variation-settings:var(--soft);color:var(--amber);text-shadow:0 0 22px var(--amber-glow)}
.gp-v.bump{animation:bump .3s cubic-bezier(.3,1.6,.5,1)}
@keyframes bump{from{transform:scale(1.25)}}
.gp-time{flex:none;position:relative;height:6px;margin:0 16px 10px;border-radius:99px;background:var(--track);overflow:hidden}
.gp-fill{position:absolute;inset:0;transform-origin:left center;background:linear-gradient(90deg,var(--teal-lo),var(--teal));border-radius:99px}
.gp-time.late .gp-fill{background:linear-gradient(90deg,var(--amber-deep),var(--amber))}
.gp-time.last .gp-fill{background:linear-gradient(90deg,var(--rose-lo),var(--rose))}
.gp-tl{display:none}
.gp-stage{position:relative;flex:1;min-height:0;margin:0 12px;border-radius:16px;overflow:hidden;background:var(--gp-stage);box-shadow:inset 0 0 0 1px var(--line)}
.gp-cv{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:pointer}
.gp-stage.catch .gp-cv{cursor:ew-resize}
.gp-stage.shake .gp-cv{animation:shake .34s linear}
/* a button over each hole or card: for the keyboard and screen readers (a pointer acts on the canvas at once) */
.gp-hits{position:absolute;inset:0;pointer-events:none}
.gp-hit{position:absolute;left:0;top:0;padding:0;margin:0;border:0;background:transparent;border-radius:14px;cursor:pointer;pointer-events:none}
.gp-hit:focus-visible{outline:3px solid var(--amber);outline-offset:2px}
.gp-pop{position:absolute;inset:0;pointer-events:none;overflow:hidden}
/* the countdown: big Fraunces numbers over the board */
.gp-count{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;pointer-events:none;
  background:radial-gradient(closest-side, var(--gp-veil), transparent)}
.gc-k{font:800 12px/1 var(--f-ui);letter-spacing:.18em;text-transform:uppercase;color:var(--cream);text-shadow:0 2px 10px var(--shadow-c)}
.gc-n{font:900 104px/1 var(--f-display);font-variation-settings:var(--soft);color:var(--amber);text-shadow:0 4px 0 var(--shadow-c), 0 0 40px var(--amber-glow)}
.gc-n.tick{animation:countIn .5s cubic-bezier(.3,1.4,.5,1)}
@keyframes countIn{from{opacity:0;transform:scale(1.7)}}
/* the memory round's countdown sits where no card is (game.js places it from the layout: under the cards, or beside
   them on a wide board), its words and its number in a row, or stacked beside them */
.gp-stage.memory .gp-count{flex-direction:row;gap:12px;background:none}
.gp-stage.memory .gp-count.side{flex-direction:column;gap:6px}
.gp-stage.memory .gc-n{font-size:46px}
.gp-stage.memory .gp-count.side .gc-n{font-size:64px}
.gp-stage.memory .gc-k{padding:6px 12px 5px;border-radius:999px;background:var(--glass-strong)}
.gp-over{position:absolute;inset:0;display:grid;place-items:center;padding:14px;background:var(--gp-veil);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:fade .2s ease-out}
.go-card{width:min(400px,100%);max-height:100%;overflow:auto;padding:20px 22px 20px;border-radius:20px;text-align:center;background:radial-gradient(120% 70% at 50% 0%, var(--plum-4), var(--plum) 62%);
  border:1px solid var(--line);box-shadow:0 20px 50px var(--shadow-c), inset 0 1px 0 var(--hi);animation:rise .3s cubic-bezier(.2,.9,.3,1.1)}
.go-k{font:800 11px/1 var(--f-ui);letter-spacing:.16em;text-transform:uppercase;color:var(--amber)}
.go-t{margin-top:8px;font:900 28px/1.05 var(--f-display);font-variation-settings:var(--soft);color:var(--cream)}
.go-line{margin-top:8px;font-size:13.5px;line-height:1.45;color:var(--muted)}
.go-btns{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:16px}
.go-btns .btn-primary{min-width:160px}
.go-btns .btn-ghost{height:46px}
/* the results: the score big, the best, what it paid, any trophy it brought */
.gr-art{display:block;width:76px;height:76px;margin:-4px auto 8px}
.gr-art canvas{display:block}
.gr-score{margin-top:8px;font:600 15px/1 var(--f-ui);color:var(--muted)}
.gr-score b{font:900 56px/1 var(--f-display);font-variation-settings:var(--soft);color:var(--amber);text-shadow:0 0 30px var(--amber-glow);vertical-align:-4px}
.gr-best{margin-top:8px;font:700 13.5px/1.35 var(--f-ui);color:var(--cream-dim)}
.gr-best .nb{color:var(--teal)}
.gr-pay{margin-top:10px;padding:9px 12px;border-radius:12px;border:1px solid var(--amber-line);background:var(--amber-wash);font:700 14px/1.35 var(--f-ui);color:var(--cream)}
.gr-pay.fun{border-style:dashed;border-color:var(--line);background:none;color:var(--muted);font-weight:600}
.gr-tro{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.gr-tro:empty{display:none}
.gr-tro li{display:flex;align-items:center;justify-content:center;gap:8px;font:700 13px/1.3 var(--f-ui);color:var(--cream)}
.gr-tro li svg{width:16px;height:16px;fill:var(--amber)}
.gr-tro .seal{flex:none;width:28px;height:28px}
.gr-tro .seal:not(.art){width:auto;height:auto;background:none}
.gr-tro .seal:not(.art) svg{opacity:1}
.gr-tro .seal.art,.gr-tro .seal[data-art]{width:32px;height:32px;margin:-2px}
.gp-help{flex:none;padding:9px 16px 12px;font:400 15px/1.25 var(--f-hand);color:var(--muted);text-align:center}
.gp-help:empty{display:none}
.gv-play.over .gp-help{visibility:hidden}

/* phones and short windows: the whole screen, a slimmer bar */
@media (max-width:999px), (max-height:560px){
  .games{padding:0;place-items:stretch}
  .games-card,.games-card.hub{width:100%;height:100%;max-height:none;border-radius:0;border:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
}
@media (max-width:719px){
  .gv-hub{--hp-t:16px;--hp-x:16px;padding-bottom:20px}
  .gh-title{font-size:28px}
  .g-list{grid-template-columns:minmax(0,1fr);gap:9px;margin-top:14px}
  .g-card{display:grid;grid-template-columns:76px minmax(0,1fr);grid-template-areas:"art n" "art m" "art l" "art b" "go go";column-gap:12px;row-gap:2px;align-items:center;
    padding:12px 14px 14px 12px;text-align:left}
  .g-art{grid-area:art;width:76px;height:76px;margin:0;align-self:start}
  .g-art canvas{width:76px !important;height:76px !important}
  .g-n{grid-area:n;font-size:19px}
  .g-m{grid-area:m}
  .g-l{grid-area:l;margin-top:2px;font-size:15px}
  .g-b{grid-area:b;margin-top:2px}
  .g-go{grid-area:go;flex-direction:row;justify-content:space-between;padding-top:10px}
  .g-go .g-p{height:40px;min-width:132px}
  .gt-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .gp-bar{gap:9px;padding:8px 10px 8px}
  .gx,.gp-btn{width:42px;height:42px}
  .gp-name{font-size:20px}
  .gp-sub{font-size:11.5px}
  .gp-v{font-size:28px}
  .gp-time{margin:0 10px 8px;height:5px}
  .gp-stage{margin:0;border-radius:0;box-shadow:none}
  .gp-help{padding:7px 12px 9px;font-size:14px}
  .gc-n{font-size:88px}
}
/* phones turned sideways: the games side by side, the bar slim, no help line (the board needs the height) */
@media (orientation:landscape) and (max-height:560px){
  .gv-hub{--hp-t:12px;--hp-x:18px;padding-bottom:14px}
  .gh-head{padding-bottom:6px}
  .gh-title{font-size:24px}
  .pt-row{margin-top:2px;padding:7px 12px}
  /* the games first: what a playtime pays comes after them */
  .gh-lead{order:3;margin-top:10px;font-size:13px;line-height:1.4}
  .g-tro{order:4}
  .g-b .g-r{display:none}
  .g-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}
  .g-card{display:flex;padding:10px 10px 12px}
  .g-art{width:64px;height:64px;margin:0 0 2px}
  .g-art canvas{width:64px !important;height:64px !important}
  .g-n{font-size:17px}
  .g-l{font-size:14px;line-height:1.15}
  .g-go{flex-direction:column;padding-top:8px}
  .g-go .g-p{height:36px;min-width:0;width:100%}
  .gp-bar{padding:5px 10px 4px;gap:8px}
  .gx,.gp-btn{width:38px;height:38px;border-radius:10px}
  .gp-name{font-size:18px}
  .gp-v{font-size:24px}
  .gp-time{margin:0 10px 5px;height:4px}
  .gp-stage{margin:0;border-radius:0;box-shadow:none}
  .gp-help{display:none}
  .gc-n{font-size:72px}
  .go-card{padding:12px 16px 14px}
  .go-t{font-size:22px;margin-top:5px}
  .gr-art{display:none}
  .gr-score b{font-size:40px}
  .go-btns{margin-top:10px}
  .go-btns .btn-primary,.go-btns .btn-ghost{height:40px}
}
@media (max-width:479px){
  .gp-score{min-width:48px}
}

/* ================= the full-screen album (design/v4/stage4.md 5.2, 5.3, 5.5; game.js "the full-screen album") =================
   The mini games' panel (.games, .games-card): a card of about 960 × 760 over the dimmed room on a wide screen and on a tablet,
   the whole screen on a phone. A bar of 44 px (40 on a phone turned sideways): Back, the title, Close. Under it the page scrolls.
   On a phone held upright the cards go three across, of minmax(0, 1fr) with 8 px gaps (two below 320 px), the words wrapping or
   clipping inside them; elsewhere as many of 104 px or more as fit. A card's sheet rises from the bottom on a phone held upright,
   lies on the right half of one turned sideways, and is a centered card elsewhere. */
@media (min-width:768px) and (min-height:561px){
  .album-full{padding:22px;place-items:center}
  .album-card{width:min(960px,100%);height:min(760px,100%);border:1px solid var(--line);border-radius:22px;padding:0}
}
.al-bar{flex:none;position:relative;z-index:1;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;gap:8px;min-height:44px;padding:0 6px;box-shadow:0 1px 0 var(--line)}
.al-bar .gx{width:44px;height:44px;border-color:transparent;background:none}
.al-bar #albumClose{grid-column:3}
.al-title{grid-column:2;grid-row:1;min-width:0;font:900 20px/1.1 var(--f-display);font-variation-settings:var(--soft);color:var(--cream);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.al-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:14px 22px 22px;text-align:left;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.al-home{margin:0 0 2px;font:800 13px/1.2 var(--f-ui);color:var(--amber)}
.al-body .h3{margin-top:12px}
.al-none{margin:18px 0 0;font-size:15px;line-height:1.5;color:var(--cream-dim);text-align:center}
/* the filter chips: one row under the bar that scrolls sideways, each a 44 px target round its pill */
.al-chips{flex:none;display:flex;overflow-x:auto;overscroll-behavior-x:contain;padding:0 20px;box-shadow:0 1px 0 var(--line);scrollbar-width:none}
.al-chips::-webkit-scrollbar{display:none}
/* (a mouse with no sideways wheel has its bar, to reach a chip cut off at the end: a finger drags the row, the keyboard walks it) */
@media (hover:hover) and (pointer:fine){.al-chips{scrollbar-width:thin;scrollbar-color:var(--line) transparent}}
.al-chips[hidden]{display:none}
.al-chip{flex:none;height:44px;padding:0 3px;border:0;background:none;color:var(--cream-dim);font:700 13px/1 var(--f-ui);cursor:pointer;touch-action:manipulation}
.al-chip span{display:flex;align-items:center;height:30px;padding:0 12px;border-radius:999px;border:1px solid var(--line);background:var(--ink-wash);white-space:nowrap}
.al-chip:hover span{border-color:var(--amber-line)}
.al-chip[aria-pressed="true"] span{border-color:var(--amber);background:var(--amber);color:var(--btn-ink)}
.al-chip:focus-visible{outline:none}
.al-chip:focus-visible span{outline:2px solid var(--cream);outline-offset:1px}
/* a shelf's cards: 2b's, carrying more words (.al-i), which wrap and clip inside them; the amber dot of a new one in its corner */
.al-body .box-btn{position:relative}
.al-dot{position:absolute;top:6px;right:6px;width:9px;height:9px;border-radius:50%;background:var(--amber);box-shadow:0 0 0 2px var(--plum-2),0 0 8px var(--amber-glow)}
.al-i .bx-n{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.al-h{margin-top:2px;max-width:100%;font:400 14px/1.12 var(--f-hand);color:var(--cream-dim);overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.al-pips{display:flex;gap:1px;margin-top:auto;padding-top:4px}
.al-pips i{display:grid;place-items:center;width:14px;height:14px}
.al-pips svg{width:11px;height:11px;fill:var(--line)}
.al-pips i.on svg{fill:var(--lilac)}
.box-btn.friend{border-color:var(--amber-line)}
.box-btn.friend .al-pips i.on svg{fill:var(--amber)}
.box-btn.cat.locked .bx-art canvas{filter:none;opacity:1}
.al-i .seal{flex:none;width:60px;height:60px;margin:4px 0 6px}
.al-i .seal.art,.al-i .seal[data-art]{width:72px;height:72px;margin:-2px 0 0}
.box-btn.trophy:not(.locked) .seal{background:radial-gradient(circle at 38% 32%, var(--amber-hi), var(--amber) 55%, var(--amber-deep));box-shadow:0 0 14px var(--amber-glow)}
.box-btn.trophy:not(.locked) .seal svg{fill:var(--btn-ink);opacity:.92}
.box-btn.trophy .bx-p{margin-top:auto;padding-top:3px}
/* a home she hasn't lived in; the Homes shelf's postcards, as wide as the page lets them be */
.al-band{display:flex;align-items:center;gap:8px;margin:14px 0 0;padding:12px 14px;border-radius:12px;border:1px dashed var(--line);background:var(--ink-wash);font:600 13px/1.3 var(--f-ui);color:var(--cream-dim)}
.al-band svg{flex:none;width:14px;height:14px;fill:var(--muted)}
.al-homes{margin:0;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:0 16px}
.al-body .bx-lead{margin:0 0 12px}
.al-body .bx-list{min-height:0;overflow:visible;margin:0;padding:0}
.al-body .bx-grid{grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:8px}
.al-body .box-btn{overflow:hidden;padding:6px 6px 10px}
.al-body .box-btn:focus-visible{outline-offset:-3px}
.al-body .box-btn.locked,.al-body .box-btn.off,.al-body .box-btn.sealed,.al-body .box-btn.wait{cursor:pointer}
.al-body .bx-n{overflow-wrap:anywhere}
.al-body .bx-s,.al-body .bx-pt{overflow:hidden;text-overflow:ellipsis}
/* (1.3, V3) a sealed bird's hint ("Comes to the Harbor", "Comes after dark") is the card's only clue: it wraps to a second line, never cut */
.al-body .bx-s.bx-w{display:block;white-space:normal;overflow:visible;text-overflow:clip;text-align:center;text-wrap:balance}
/* a box of a home she hasn't lived in: its shape and nothing more */
.box-btn.sealed{border-style:dashed;background:var(--ink-wash);box-shadow:none}
.box-btn.sealed .bx-art{background:none}
.box-btn.sealed .bx-n{color:var(--muted)}
.box-btn.sealed .bx-art canvas,.als-art.sealed canvas{filter:brightness(0);opacity:.55}
/* stage 6's her look (HL7): the Wardrobe's strip "What she wears", her head in what she shows (Scene.wearThumb, 72 px) and its words.
   (A card's sheet draws her head at 120 px, 96 under 360 px: the thumb's own size, over .als-art's) */
.wr-now{display:flex;align-items:center;gap:12px;margin:0 0 12px;padding:8px 14px 8px 8px;border-radius:14px;border:1px solid var(--line);background:var(--ink-wash)}
.wr-art{flex:none;display:grid;place-items:center;width:72px;height:72px;border-radius:50%;background:radial-gradient(closest-side, var(--box-pool), transparent)}
.wr-art canvas{display:block;width:72px;height:72px}
.wr-t{display:flex;flex-direction:column;gap:3px;min-width:0;margin:0}
.wr-k{font:800 10px/1.2 var(--f-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.wr-w{font-size:15px;line-height:1.35;color:var(--cream);overflow-wrap:anywhere}
/* stage 7's her coats (CT5b): their head over the shelf's first groups, a pack's words under its group's, her coat in the strip; a coat she has
   not found keeps its shape's own light, as a kitten's (below); a pack's not for sale here reads quiet; a sheet's "Wearing" and its second button */
.bx-sup{margin:0 2px 10px;font:900 20px/1.1 var(--f-display);font-variation-settings:var(--soft);color:var(--cream)}
.bx-grp > .bx-gl{margin:0 2px 8px;font-size:13px;line-height:1.4;color:var(--cream-dim)}
.wr-c{font:600 13px/1.3 var(--f-ui);color:var(--cream-dim);overflow-wrap:anywhere}
.box-btn.fur.locked .bx-art canvas{filter:none;opacity:1}
.box-btn.fur.shut .bx-s{color:var(--muted)}
.als-body .als-on{display:inline-flex;align-items:center;min-height:34px;margin:2px 0 8px;padding:0 16px;border-radius:999px;border:1px solid var(--amber-line);background:var(--amber-wash);
  font:800 12px/1 var(--f-ui);letter-spacing:.08em;text-transform:uppercase;color:var(--amber-hi)}
.als-go:not([hidden]) + .als-get{margin-top:-8px}
.als-get{flex:none;align-self:stretch;min-height:46px;margin:6px 20px 18px;color:var(--cream)}
.als-get:hover{border-color:var(--amber-line)}
/* stage 6's kittens' rare coats (HL11): a locked card's kitten is a silhouette, drawn as the secret cats' are; Dress a kitten's list in the
   card's sheet, a checkbox a kitten (a row a 48 px target), Done the sheet's own button at its foot */
.box-btn.kc.locked .bx-art canvas{filter:none;opacity:1}
.als-art.kd{min-height:72px}
.kd-set{min-width:0;margin:0 0 10px;padding:0;border:0;text-align:left}
.kd-set legend{padding:0;margin:0 0 6px;font-size:15px;line-height:1.4;font-weight:700;color:var(--cream)}
.kd-row{display:flex;align-items:center;gap:12px;min-height:48px;padding:6px 2px;border-top:1px solid var(--line);cursor:pointer}
.kd-in{flex:none;width:22px;height:22px;margin:0;accent-color:var(--amber);cursor:pointer}
.kd-in:focus-visible{outline:2px solid var(--amber);outline-offset:3px}
.kd-t{display:flex;flex-direction:column;gap:2px;min-width:0}
.kd-n{font-size:15px;line-height:1.3;color:var(--cream);overflow-wrap:anywhere}
.kd-s{font-size:13px;line-height:1.3;color:var(--muted);overflow-wrap:anywhere}
@media (orientation:portrait) and (max-width:599px){
  .al-chips{padding:0 13px}
  .al-body{padding:12px 16px 18px}
  .al-body .bx-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .al-body .box-btn{padding:5px 4px 8px}
}
@media (orientation:portrait) and (max-width:319px){
  .al-body .bx-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.al-layer{position:absolute;inset:0;z-index:2;display:grid;place-items:center;padding:20px;background:var(--modal-scrim);animation:fade .2s ease-out}
.al-sheet{display:flex;flex-direction:column;width:min(440px,100%);max-height:100%;min-height:0;overflow:hidden;border-radius:22px;border:1px solid var(--line);
  background:radial-gradient(120% 70% at 50% 0%, var(--plum-4), var(--plum) 62%);box-shadow:0 30px 80px var(--shadow-c), inset 0 1px 0 var(--hi);animation:rise .3s cubic-bezier(.2,.9,.3,1.1)}
.als-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;padding:4px 6px 0 18px}
.als-k{min-width:0;margin:0;line-height:1.25;text-align:left}
.al-sheet.secret .als-k{color:var(--lilac)}
.als-head .gx{width:44px;height:44px;border-color:transparent;background:none}
.als-page{flex:0 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:2px 20px 10px;text-align:center;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
/* (more of it below: game.js alsMore) */
.als-page.more{-webkit-mask-image:linear-gradient(#000 calc(100% - 36px),transparent);mask-image:linear-gradient(#000 calc(100% - 36px),transparent)}
.als-art{display:grid;place-items:center;min-height:120px}
.als-art canvas{display:block;width:120px;height:120px}
.als-art .por-cv{border-radius:50%}
.als-art.locked canvas,.als-art.off canvas{filter:grayscale(.75) brightness(.78);opacity:.7}
.als-art.wait canvas{opacity:.6}
.als-art .seal{width:120px;height:120px}
.als-art .seal.art,.als-art .seal[data-art]{width:120px;height:120px;margin:0}
.als-art .seal:not(.art){width:72px;height:72px}
.als-art .seal svg{width:38px;height:38px}
.als-art.locked .seal canvas{filter:none;opacity:1}
.als-n{margin:8px 0 8px;font:900 26px/1.1 var(--f-display);font-variation-settings:var(--soft);color:var(--cream);overflow-wrap:anywhere;text-wrap:balance}
.als-body p{margin:0 0 10px;font-size:15px;line-height:1.45;color:var(--cream-dim)}
.als-body p b{font-weight:700;color:var(--cream)}
.als-body .small{font-size:13px;color:var(--muted)}
.als-body .bx-p{margin:0 auto 10px;max-width:180px}
.als-body .bx-bar{max-width:none}
.als-rows{margin:0 0 10px;text-align:left}
.als-rows div{padding:6px 0;border-top:1px solid var(--line)}
.als-rows dt{font:800 10px/1.2 var(--f-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.als-rows dd{margin:2px 0 0;font-size:14px;line-height:1.35;color:var(--cream-dim)}
.als-pips{display:flex;align-items:center;gap:4px;margin:0 0 8px}
.als-pips span{margin-right:auto;font:800 10px/1 var(--f-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.als-pips i{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:var(--plum-3);box-shadow:inset 0 0 0 1.5px var(--line)}
.als-pips i svg{width:13px;height:13px;fill:var(--muted);opacity:.6}
.als-pips i.on{background:var(--lilac-wash, var(--plum-3));box-shadow:inset 0 0 0 1.5px var(--lilac-line)}
.als-pips i.on svg{fill:var(--lilac);opacity:1}
.als-body .modal-keep{margin:0 0 6px}
.als-go{flex:none;align-self:stretch;margin:6px 20px 18px}
.als-go[aria-disabled="true"]{background:var(--plum-3);color:var(--muted);box-shadow:inset 0 1px 0 var(--hi);cursor:default}
.rm .al-layer,.rm .al-sheet{animation:none}
@media (orientation:portrait) and (max-width:767px){
  .al-layer{padding:0;place-items:end stretch}
  .al-sheet{width:100%;max-height:calc(100% - 44px);border-width:1px 0 0;border-radius:20px 20px 0 0;padding-bottom:env(safe-area-inset-bottom)}
}
/* a phone turned sideways: a slimmer bar (its buttons stay 44 px targets, reaching 4 px past its foot, their icons level with
   the title), the sheet on the right half */
@media (orientation:landscape) and (max-height:560px){
  .al-bar{min-height:40px}
  .al-bar .gx{margin-bottom:-4px;padding-bottom:4px;border-radius:10px}
  .al-title{font-size:18px}
  .al-chips{padding:0 15px}
  .al-body{padding:10px 18px 14px}
  .al-layer{padding:0;place-items:stretch end}
  /* (and clear of the home indicator at its foot: a sheet's button, the Wardrobe's Wear first, HL7; none in a browser page) */
  .al-sheet{width:50vw;height:100%;max-height:none;border-width:0 0 0 1px;border-radius:20px 0 0 20px;padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom)}
  .als-page{flex:1 1 auto}
  .als-go{margin:6px 16px 10px}
  .als-get{margin:6px 16px 10px}
  .als-go:not([hidden]) + .als-get{margin-top:-2px}
}

/* ================= stacked layout (< 1000 px): stage on top, shop below ================= */
/* Phones and tablets held upright: the room over the shop sheet, at one of three heights. game.js sets the room's
   height (--room-h, in px) and .sheet-room / .sheet-split / .sheet-shop on the app; Split until it runs. */
@media (max-width:999px){
  .app{grid-template-columns:minmax(0,1fr);grid-template-rows:var(--room-h, 40%) minmax(0,1fr);grid-template-areas:"stage" "shop"}
  .shop{border-left:0;border-top:1px solid var(--line);border-radius:18px 18px 0 0;box-shadow:0 -14px 34px var(--shadow-c)}
  .handle{display:flex}
  .tabbar{padding-top:0}
  .pane-head{padding-top:14px;padding-bottom:12px}
}
/* phones in landscape: side by side, the shop column at least 45% of the width */
@media (max-width:999px) and (orientation:landscape) and (max-height:560px){
  .app{grid-template-columns:minmax(0,1fr) clamp(280px,46vw,420px);grid-template-rows:minmax(0,1fr);grid-template-areas:"stage shop"}
  .shop{border-radius:0;border-top:0;border-left:1px solid var(--line);box-shadow:-14px 0 34px var(--shadow-c)}
  .handle{display:none}
  .tabbar{padding-top:4px}
}
/* ================= compact stage overlays (narrow / short stages, set by game.js) ================= */
.app.stage-narrow .stage{--news-h:32px}
.app.stage-narrow .hud-bank{left:max(14px, env(safe-area-inset-left));top:12px;max-width:calc(100% - 184px)}
/* four round buttons once the mini games are open (games, effects, music, menu): the bank keeps clear of them (not in
   the Shop height's strip, which has its own, nor in the new-life scene, which leaves only the two sound buttons) */
.app.stage-narrow .hud-tools{gap:7px}
.app.stage-narrow.games-on:not(.sheet-shop):not(.in-scene) .hud-bank{max-width:calc(100% - 196px)}
.app.stage-narrow .logo-word{font-size:14px}
.app.stage-narrow .logo-tag{display:none}
.app.stage-narrow .bank{margin-top:5px;column-gap:7px}
.app.stage-narrow .bank-num{font-size:34px}
.app.stage-narrow .bank-unit{font-size:14px}
.app.stage-narrow .rate{margin-top:6px;font-size:13px;gap:4px 7px}
.app.stage-narrow .rate-val{font-size:14px}
.app.stage-narrow .rate-note{font-size:11px;padding:4px 7px 3px}
.app.stage-narrow .hud-side{right:12px;top:12px;gap:6px}
.app.stage-narrow .lives{padding:6px 8px;gap:6px}
.app.stage-narrow .pips{gap:2px}
.app.stage-narrow .hud-side .pip svg{width:12px;height:12px}
.app.stage-narrow .stars svg{width:13px;height:13px}
.app.stage-narrow .life-line,.app.stage-narrow .save{display:none}
/* the pips say which life it is: the line under them names only the path */
.app.stage-narrow .life-line.has-path{display:block;margin-right:3px;font-size:10px;letter-spacing:.11em;text-shadow:0 1px 6px var(--shadow-c)}
.app.stage-narrow .ll-life{display:none}
.app.stage-narrow .ll-path::before{content:none}
.app.stage-narrow .icon-btn{width:34px;padding:0;justify-content:center}
.app.stage-narrow .icon-btn .lbl{display:none}
/* the games button's playtimes sit on its corner where it is an icon only */
.app.stage-narrow .pt-badge,.app.stage-mid .pt-badge,.app.sheet-shop .pt-badge{position:absolute;right:-6px;top:-1px;min-width:17px;height:17px;padding:0 4px;font-size:10px;box-shadow:0 0 0 2px var(--night)}
/* (also in a tablet's Shop strip, where the labelled row of four reached her whiskers) */
.app.stage-mid .games-open .lbl,.app.sheet-shop .games-open .lbl{display:none}
.app.stage-mid .games-open,.app.sheet-shop .games-open{width:34px;padding:0;justify-content:center}
.app.stage-narrow .news{padding:0 12px 0 max(12px, env(safe-area-inset-left));gap:9px}
.app.stage-narrow .news-k{font-size:9px;padding:4px 6px 3px}
.app.stage-narrow .news-t{font-size:15.5px}
.app.stage-narrow .bubble{max-width:var(--bub-max, 168px);padding:7px 11px 8px;border-radius:16px}
.app.stage-narrow .bubble p{font-size:14px}
.app.stage-narrow .bite-stamp{font-size:32px;border-width:3px;padding:4px 11px 6px;border-radius:10px}
.app.stage-narrow .toast{font-size:13px}
.app.stage-mid .save,.app.stage-snug.games-on .save{display:none}
.app.stage-short .stage{--news-h:30px}
.app.stage-short .status{padding:7px 14px 8px}
.app.stage-short .bar{height:6px;margin-top:5px}
.app.stage-short .hud-bank{top:10px}
.app.stage-short .bank-num{font-size:30px}
.app.stage-short .logo-word{font-size:13px}
/* a phone turned sideways: the room fills the short stage's height, and the wordmark's line put the rate over the
   bookshelf's top (the Siamese and the time-loop tabby, panned to the left): the bank and the rate move up into its place,
   as in the Shop height's strip */
@media (max-width:999px) and (orientation:landscape) and (max-height:560px){
  .app.stage-short .logo{display:none}
  .app.stage-short .bank{margin-top:0}
}


/* The Shop height: the room is a strip with the bank and her face (the renderer frames her head and the top of her box).
   No news crawl and no thought bubble; toasts hang just under the strip, over the top of the sheet (the stage then
   paints over the sheet: nothing else of it reaches there). */
.app.sheet-shop .stage{z-index:6}
.app.sheet-shop .news,.app.sheet-shop .bubble,.app.sheet-shop .tail-dot{display:none}
.app.sheet-shop .logo{display:none}
.app.sheet-shop .hud-bank{top:9px;max-width:calc(50% - 52px)}
.app.sheet-shop .hud-bank::before{right:-12px;bottom:-26px}
.app.sheet-shop .bank{margin-top:0}
.app.sheet-shop .bank-num{font-size:30px}
.app.sheet-shop .rate{margin-top:4px}
.app.sheet-shop .hud-side{top:9px}
.app.sheet-shop .life-line,.app.sheet-shop .save{display:none !important}
/* one note under the rate (the last: a frenzy or a gift's countdown before the nap, which the status row under the
   strip shows too), so the bank stays in the top of the strip, clear of her box */
.app.sheet-shop .rate-note:not(:last-child){display:none}
/* a phone's strip: the round buttons (effects, music, menu, and the games once they are open) go two by two at the right
   edge, under the pips (40 px, so both rows fit the 132 px strip), the menu in the right-hand column: in a row the
   third covered her cheek and the fourth her eye */
.app.stage-narrow.sheet-shop .hud-tools{display:grid;grid-template-columns:auto auto;gap:5px}
.app.stage-narrow.sheet-shop .icon-btn{width:40px;height:40px}
.app.stage-narrow.sheet-shop .menu-open{grid-column:2}
/* there an edge chip always sits bottom left, clear of the buttons' second row; its arrow and its nudge say where the
   event is ("Mouse →", "Singing cat ↑") */
.app.stage-narrow.sheet-shop .edge-chip.r{left:max(10px, env(safe-area-inset-left));right:auto}
.app.sheet-shop .toasts{position:fixed}
/* while the sheet is dragged or settles, the room is a still picture (game.js holds the canvas and scales it), so the
   overlays that follow the scene step aside until it is framed again */
.app.dragging .bubble,.app.dragging .tail-dot,.app.dragging .edge-chip,.app.dragging .hit,.app.dragging .fx{visibility:hidden}
.app.dragging .scene{transform-origin:50% 0}
.app.dragging .dock{cursor:grabbing}

/* phones and small tablets: the status card docks into the top of the shop sheet as one slim row (mood and nap, each
   with a mini bar, and what one pet is worth); it is a handle too */
.app.docked .dock{display:flex;flex-direction:column;flex:none;padding:3px max(var(--gut), env(safe-area-inset-right)) 7px max(var(--gut), env(safe-area-inset-left));border-bottom:1px solid var(--line)}
.app.has-sheet .dock{cursor:grab;touch-action:none}
.dock-hint{order:2;margin-top:6px;font:400 15px/1.2 var(--f-hand);color:var(--cream-dim)}
.app.docked .dock .status{position:static;width:auto;padding:0;background:none;border:0;border-radius:0;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;column-gap:14px;align-items:center}
/* the value beside the mini bar gets what the bar (at least as wide as the label) leaves it, and ends in an ellipsis
   past that */
.app.docked .dock .meter{container-type:inline-size;grid-template-columns:auto minmax(0,1fr) minmax(0,max-content);grid-template-areas:"k s s" "b b v";column-gap:6px;row-gap:3px;align-items:center}
.app.docked .dock .m-row{display:contents}
.app.docked .dock .m-k{font-size:9px;letter-spacing:.12em}
.app.docked .dock .m-state{font-size:12.5px;line-height:16px}
.app.docked .dock .bar{margin:0;height:4px}
.app.docked .dock .m-val{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:11px;line-height:14px}
/* a narrow meter keeps its value short (game.js setValMore): "×1.0" (per pet), "+124%" (of max 155%; the bar shows
   how full the nap is). The Mood meter needs 108 px for its label, the gap and "×12.5 per pet" (it was 118, and on a
   390 px phone the digit cells of One pet took the 2 px that kept "per pet" there) */
@container (max-width:108px){ .app.docked .dock .meter:first-child .v-more{display:none} }
@container (max-width:150px){ .app.docked .dock .meter:nth-child(2) .v-more{display:none} }
/* and its status words get short where they would end in an ellipsis (game.js setShort: "Edge!", "sulking", "new life") */
.t-s{display:none}
@container (max-width:113px){ .app.docked .dock .meter:first-child .t-l{display:none} .app.docked .dock .meter:first-child .t-s{display:inline} }
@container (max-width:133px){ .app.docked .dock .meter:nth-child(2) .t-l{display:none} .app.docked .dock .meter:nth-child(2) .t-s{display:inline} }
.app.docked .dock .m-pet{flex-direction:column;align-items:flex-end;justify-content:center;gap:5px;padding:0 0 0 12px;border-left:1px solid var(--line);font-size:9px;letter-spacing:.12em}
.app.docked .dock .m-pet b{font-size:17px;letter-spacing:0;text-transform:none}
.app.docked .dock .m-pet .u{font-size:10.5px;letter-spacing:0}
.app.docked .dock .u-p{display:none}

/* ================= touch: comfortable targets ================= */
@media (pointer:coarse){
  .seg button{height:40px;min-width:44px}
  .app.stage-narrow .icon-btn{width:42px;height:42px}
  /* a phone's row of four (games, effects, music, menu): 36 px buttons 6 px apart, each with a 42 px target (::after),
     so the row stays clear of the roof in the window, where Kot Bayun sings (42 px ones covered him on 360 and 375 px
     phones) */
  .app.stage-narrow.games-on:not(.sheet-shop) .hud-tools{gap:6px}
  .app.stage-narrow.games-on:not(.sheet-shop) .icon-btn{position:relative;width:36px;height:36px}
  .app.stage-narrow.games-on:not(.sheet-shop) .icon-btn::after{content:"";position:absolute;inset:-3px;border-radius:50%}
  .btn-ghost{height:44px}
  /* finger-sized targets (44 px) where the layout has the room: a transparent edge around the smaller controls */
  .sheet-btn{position:relative}
  .sheet-btn::after{content:"";position:absolute;inset:-4px}
  .switch::after{content:"";position:absolute;inset:-7px -3px}
  .mp-back{width:44px;height:44px}
  .gx,.gp-btn{position:relative}
  .gx::after,.gp-btn::after{content:"";position:absolute;inset:-3px}
  .nb-send{position:relative}
  .nb-send::after{content:"";position:absolute;left:0;right:0;top:-4px;bottom:-4px}
  /* the kittens' name tag: a finger-sized target, still hanging from the row */
  .kn-open{min-height:40px}
  .skip-btn{height:42px;padding:0 17px 0 13px}
}

/* touch screens held upright (or tall): the kitten list's name boxes and the Motion choice at 44 px too (a phone turned
   sideways keeps them slimmer, so its dialogs and the menu fit) */
@media (pointer:coarse) and (min-height:521px){
  .kn-row .name-in,.kn-row .name-sug{height:44px}
  .mo span{height:44px}
}

/* ================= the shop on phones and tablets: compact rows (SPEC 10.12) =================
   A cat row is 66 px or more: a 44 px portrait, the name and the price on a line, the note, the purring line, the count
   on the right. A name, a note or a purring line longer than its line wraps onto the next and the row grows (1.2.1): no
   ellipsis, nothing cut, no name shortened. */
@media (max-width:999px){
  .cat-list{gap:6px}
  .cat-row{grid-template-columns:44px minmax(0,1fr) auto;column-gap:10px;padding:8px 12px 8px 9px}
  .por{width:44px;height:44px}
  .por .por-cv{width:44px !important;height:44px !important}
  .por-box .sale-tag{bottom:-5px;padding:2px 4px 1px;font-size:9.5px}
  /* the name and the price share a line while the name keeps at least 10 characters and its longest word; past that (a long
     price: ×100, Max) the price goes under the name, so a row never forgets which cat it is ("Oran…" before). In its share of
     the line the name wraps at a word break ("Norwegian / Forest Cat" beside the price), never cut and never shortened; a
     price longer than a whole line wraps too, from the right. (The name's and the note's boxes clip at their edges as the
     one-line boxes did, so a row that always fitted is drawn pixel for pixel as before; they are as tall as their lines, so
     no line of theirs is cut. The name's is overflow: clip, which keeps a flex item's own least width, its longest word) */
  .cr-body{display:flex;flex-direction:row;flex-wrap:wrap;column-gap:8px;align-items:baseline}
  .cr-name{order:1;flex:1 1 var(--nb, 10ch);max-width:100%;overflow:clip;font-size:15px;line-height:18px;text-wrap:balance}
  .cr-cost{order:2;flex:0 1 auto;min-width:0;margin:0 0 0 auto;font-size:13.5px;line-height:18px;text-align:right;overflow-wrap:break-word}
  /* "Cost 80.3 purrs" is "80.3" here (amber when you can afford it); "10 for …" and "Max 23 for …" keep their count */
  .cr-cost .cc-c,.cr-cost .cc-u{display:none}
  .cr-note{order:3;flex:1 0 100%;min-width:0;margin-top:1px;font-size:14.5px;line-height:17px;overflow:hidden}
  .cr-prod{order:4;flex:1 0 100%;margin-top:1px;font-size:11.5px;line-height:14px}
  /* the purring line keeps one line here, as 10.12 built it: what this buy adds, whole, and beside it what fits of "yours", then
     "Each". A half that does not fit is left out whole, not cut and not wrapped: three lines would say one number three times
     (a first cat: "+18.3", "yours 18.3", "Each 18.3") and every late row would be 28 px taller. The halves take no height
     of the line (a margin of minus their own line), so the line they wrap onto has none and lies under the box, which hides
     it; on the gain's line they are drawn as before. The gain keeps a line's height where it says nothing (a full row), and
     wraps inside its own box where it alone is longer than the line (the longest numbers at 320 px): then the row grows
     (1.2.1; before, a max-height cut the line off) */
  /* (a half keeps one line of its own, never wrapped inside: one longer than the whole line would be two lines tall, and the margin
     takes off one) */
  .cr-prod:has(.cr-gain) .cr-each,.cr-prod:has(.cr-gain) .cr-yours{align-self:flex-start;margin-bottom:-14px;white-space:nowrap}
  .cr-prod:has(.cr-gain) .cr-gain{min-height:14px}
  .cr-home{display:none}
  .cr-own{gap:5px;min-width:26px}
  .cr-n{font-size:23px}
  .cr-n small{font-size:11.5px}
  .kn-open{min-height:32px;margin:-7px 14px 0 0;padding:4px 11px 5px 9px;font-size:15px}
  /* the tab names the pane: its title is left out and only what acts (the buy amount) stays, in a slim sticky row */
  .pane-head h2,.pane-head .sub{display:none}
  .pane-head{align-items:center;justify-content:flex-end;padding:3px var(--gut)}
  /* (the Album's heading stays: it has no one row to itself, and its count is beside it) */
  #p-ach.album .pane-head{justify-content:space-between;padding-bottom:6px}
  #p-ach.album .pane-head h2{display:block;font-size:19px}
  #p-ach.album .al-count{margin-bottom:0}
  #p-upg .pane-head,#p-lives .pane-head{display:none}
  #p-upg,#p-lives{padding-top:10px}
  .shop-scroll{padding-top:4px}
}
/* the kittens' name tag looks slim here, but keeps a finger-sized target (40 px) on touch screens */
@media (max-width:999px) and (pointer:coarse){
  .kn-open::after{content:"";position:absolute;left:0;right:0;top:-2px;bottom:-6px}
}
/* tablets held upright: wider grids (the medals stay three across: six of them, two even rows) */
@media (min-width:600px) and (max-width:999px) and (min-height:561px){
  .upg-grid,.ach-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .secret-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
/* (under 320 px Next to find's cards are two across, as the album's) */
@media (max-width:319px){
  .al-next{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* phones (either way up): the same density pass for every tab */
@media (max-width:479px), (max-width:999px) and (orientation:landscape) and (max-height:560px){
  .tabbar{padding-left:6px;padding-right:max(4px, env(safe-area-inset-right))}
  .tabs{gap:0}
  .tab{padding:0 4px;font-size:13px;gap:4px;height:40px}
  .badge{min-width:17px;height:17px;font-size:10px;padding:0 4px}
  .seg{padding:2px}
  .seg button{position:relative;min-width:46px;padding:0 8px;height:28px}
  /* a taller target than it looks: the row around it is the button's */
  .seg button::after{content:"";position:absolute;left:0;right:0;top:-5px;bottom:-5px}
  /* upgrades: one list, the name and the price on a line, what it does under it; the kind is its glyph, in the card's left
     24 px. (1.2.1) The price keeps the name's line while the name's longest word fits beside it; past that (a long price) it
     goes under the name, on the right, and the name has the line: a word is never squeezed out of its place, nothing is
     cut, and a price longer than a whole line wraps */
  .upg-grid{grid-template-columns:minmax(0,1fr);gap:6px}
  .upg{position:relative;display:flex;flex-flow:row wrap;align-items:baseline;column-gap:8px;row-gap:2px;padding:9px 12px 10px 40px}
  .upg-k{position:absolute;left:8px;top:10px;width:24px;flex-direction:column;align-items:center;gap:5px}
  .upg-k > span:not(.sale-tag){display:none}
  .upg-k svg{width:16px;height:16px}
  .upg-k .sale-tag{margin:0;padding:2px 3px 1px;font-size:9px}
  .upg-n{order:1;flex:1 1 0;max-width:100%;font-size:14.5px;line-height:1.25}
  .upg-c{order:2;flex:0 1 auto;min-width:0;margin:0 0 0 auto;font-size:12.5px;line-height:1.25;text-align:right;overflow-wrap:break-word}
  .upg-d{order:3;flex:1 0 100%;font-size:12.5px;line-height:1.32}
  .bought summary{padding:11px 13px}
  /* nine lives */
  .chapter{padding:12px 13px 12px}
  .ch-title{font-size:19px}
  .ch-art{width:60px;height:60px;margin:-6px -5px -10px 0}
  .ch-art canvas{width:60px !important;height:60px !important}
  .ch-line{margin-top:7px;font-size:16px}
  .ch-goal{margin-top:11px}
  .cg-row,.cg-met{font-size:12.5px}
  .ch-rib{margin-top:10px}
  .cgl{padding:6px 0;column-gap:9px}
  .cgl-t{font-size:13.5px}
  .story{margin:14px 0 12px}
  .sheet{padding:2px 14px 13px}
  .kvs{margin-bottom:12px}
  .kv{padding:8px 0}
  .kv dt{font-size:13px}
  .kv dd{font-size:14px}
  .sheet .btn-primary.big,.ch-go .btn-primary.big{height:48px;font-size:16px}
  .small{font-size:12.5px}
  .paths{margin-top:18px}
  .path-now{padding:11px 13px 12px}
  .pn-t b{font-size:19px}
  .pn-rule{margin-top:8px;font-size:13px;line-height:1.4}
  .medal-grid{gap:6px}
  .medal-card{padding:8px 5px 9px}
  .mc-art canvas{width:44px !important;height:44px !important}
  .mc-g{font-size:11px}
  .lead{margin-top:12px;font-size:13.5px;line-height:1.45}
  .h3{margin:20px 0 9px;font-size:17px}
  .perks{gap:5px}
  .perk{grid-template-columns:28px minmax(0,1fr) auto;column-gap:10px;padding:8px 10px}
  .pk-n{width:28px;height:28px;font-size:14px}
  .pk-t{font-size:14px}
  .pk-d{font-size:12.5px}
  /* trophies: the secret cats one per line with the portrait beside them */
  .ach-meter{margin:5px 0 12px}
  .secret-grid{grid-template-columns:minmax(0,1fr);gap:6px}
  .sc-card{display:grid;grid-template-columns:48px minmax(0,1fr);column-gap:12px;align-items:center;padding:9px 12px 10px 9px;text-align:left}
  .sc-por{margin:0}
  .sc-card .por-cv{width:48px !important;height:48px !important}
  .sc-b{align-items:flex-start;gap:2px}
  .sc-line{font-size:14px;line-height:1.12}
  .boxes{margin-top:18px}
  .box-now{grid-template-columns:60px minmax(0,1fr);column-gap:10px;padding:8px 12px 10px 8px}
  .bn-art,.bn-art canvas{width:60px !important;height:60px !important}
  .bn-l{font-size:14px}
  .bx-art{width:56px;height:56px}
  .bx-art canvas{width:56px !important;height:56px !important}
  .bx-grid .bx-art{width:56px;height:56px}
  .bx-n{font-size:12.5px}
  .bx-s{font-size:9px;letter-spacing:.05em}
  .bx-pt{font-size:10.5px}
  .ach-grid{gap:6px}
  .ach{grid-template-columns:36px minmax(0,1fr);column-gap:8px;padding:8px 9px}
  .seal{width:36px;height:36px}
  .seal svg{width:16px;height:16px}
  .seal.art,.seal[data-art]{width:40px;height:40px}
  .al-i .seal{width:52px;height:52px}
  .al-i .seal.art,.al-i .seal[data-art]{width:62px;height:62px;margin:-1px 0 1px}
  .ach-t{font-size:13px}
  .ach-d{font-size:11.5px}
  .shop-foot{margin-top:22px}
  /* the shop cat's note on one line: the room under it goes to her */
  .lounge-line{max-width:100%}
}
/* a dialog's portrait (portraitCanvas sizes it 96 px inline) keeps its phone sizes: 50 px held upright, 44 px sideways */
@media (max-width:479px){
  .modal-art .por-cv{width:50px !important;height:50px !important}
}
@media (max-width:999px) and (orientation:landscape) and (max-height:560px){
  .modal-art .por-cv{width:44px !important;height:44px !important}
}
@media (max-width:479px){
  .modal.form .modal-card{padding:22px 16px 18px}
  .kn-row .name-sug{padding:0 10px}
}
@media (max-width:999px) and (orientation:landscape) and (max-height:560px){
  .tab{font-size:12.5px;height:40px}
  .ach-grid{grid-template-columns:minmax(0,1fr)}
}

/* ================= reduced motion: keep feedback, drop the wiggle =================
   game.js sets .rm on <html> from the Motion setting (Auto follows the system's prefers-reduced-motion). */
/* no crawl: long headlines wrap to two lines instead of being cut off */
.rm .news{height:auto;min-height:calc(var(--news-h) + 16px);padding-top:6px;padding-bottom:6px}
.rm .news-win{white-space:normal;-webkit-mask-image:none;mask-image:none}
.rm .news-t{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;padding-right:0;line-height:1.08}
.rm .stage.shake .scene{animation:none}
.rm .floater{animation-name:fadeOnly}
.rm .floater.note,.rm .floater.note.below,.rm .floater.pet.r,.rm .floater.boop.r{animation-name:fadeOnly}
.rm .news-t.scroll{animation:none}
.rm .edge-chip{animation:none}
.rm .tut-paw,.rm .tut-ring,.rm .tut-lift{animation:none}
.rm .bubble.pop p,.rm .toast,.rm .modal,.rm .modal-card,.rm .cat-row.flash,.rm .nope,.rm .btn-primary.armed,.rm .menu,.rm .menu-card{animation:none}
.rm .box-btn,.rm .box-now,.rm .al-card,.rm .al-row,.rm .kn-open,.rm .menu-btn,.rm .switch,.rm .switch .knob,.rm .handle .grip{transition:none}
.rm .bite-stamp.show{animation:none;opacity:1}
.rm .lounge-btn,.rm .lounge-spr,.rm .lounge-line,.rm .lounge{animation:none}
.rm .lounge.out .lounge-btn,.rm .lounge.out .lounge-line,.rm .lounge.out.pet .lounge-btn,.rm .lounge.out.leave .lounge-btn{animation:loungeFade .3s ease-in forwards}
.rm .bubble,.rm .tail-dot,.rm .news-win{transition:none}
.rm .skip-btn{animation:fadeIn .4s ease-out .5s both}
/* the mini games: no shake, no pops; the countdown and the cards just change */
.rm .games,.rm .games-card,.rm .gp-over,.rm .go-card,.rm .gc-n.tick,.rm .gp-v.bump,.rm .gp-stage.shake .gp-cv{animation:none}
.rm .g-card{transition:none}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes fadeOnly{0%{opacity:0}15%,70%{opacity:1}100%{opacity:0}}

/* ================= the Extras pack: the Look page, the try's pill (design/v4/extras.md 3.6, 3.7; MX's X5) ================= */
/* the page's head: its kicker over the title */
.mp-ht{display:flex;flex-direction:column;gap:5px;min-width:0}
.mp-kick{font:800 10.5px/1 var(--f-ui);letter-spacing:.15em;text-transform:uppercase;color:var(--amber)}
.mp-look{text-align:left}
/* (its Back a 44 px target, as every control of the page) */
.mp-look .mp-back{width:44px;height:44px;margin:-1px 0 -1px -1px}
.lk-grp{margin:0 0 18px}
.lk-grp .set-h{margin-bottom:9px}
/* a card: a button, ringed amber while in use (aria-pressed), its state's tag at its foot; the keyboard's ring cream */
.lk-card{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:3px;min-width:0;min-height:44px;padding:7px;border-radius:var(--r-card);border:1px solid var(--line);
  background:linear-gradient(180deg,var(--plum-2),var(--plum-2b));box-shadow:inset 0 1px 0 var(--hi);color:var(--cream);font:inherit;text-align:left;cursor:pointer;
  touch-action:manipulation;transition:border-color .15s, background .15s, transform .08s}
.lk-card:hover{border-color:var(--amber-line)}
.lk-card:active{transform:translateY(1px)}
.lk-card:focus-visible{outline:2px solid var(--cream);outline-offset:2px}
.lk-card.on{border-color:var(--amber);background:linear-gradient(180deg,var(--plum-3),var(--plum-2));box-shadow:0 0 0 1px var(--amber), 0 8px 20px var(--shadow-c);cursor:default}
.lk-card.wait,.lk-card.off{cursor:default}
.lk-card.wait:hover,.lk-card.off:hover{border-color:var(--line)}
.lk-card.wait:active,.lk-card.off:active,.lk-card.on:active{transform:none}
.lk-card.wait canvas{opacity:.6}
.lk-n{font:700 14px/1.2 var(--f-ui);color:var(--cream)}
.lk-l{font-size:12px;line-height:1.35;color:var(--muted)}
.lk-s{margin-top:auto;padding-top:3px;font:800 10px/1.2 var(--f-ui);letter-spacing:.09em;text-transform:uppercase;color:var(--muted);white-space:nowrap}
.lk-s:empty{display:none}
.lk-card.on .lk-s{color:var(--amber)}
.lk-card.try .lk-s{color:var(--amber-hi)}
/* the pack's small tag on an item not hers, while it is on sale: beside its Try in the card's foot (.lk-f), under a box's
   name, never over a swatch or a thumbnail (X7's fix) */
.lk-x{flex:none;padding:3px 6px 2px;border-radius:999px;border:1px solid var(--amber-line);background:var(--glass-strong);
  font:800 8.5px/1 var(--f-ui);letter-spacing:.09em;text-transform:uppercase;color:var(--amber-hi);pointer-events:none}
.lk-f{margin-top:auto;padding-top:3px;display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px}
.lk-f .lk-s{margin:0;padding:0}
/* the room: her home's looks side by side, each a 3:2 swatch over its name and line */
.lk-rooms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.lk-sw{display:block;aspect-ratio:3 / 2;margin-bottom:4px;border-radius:9px;overflow:hidden;background:var(--ink-wash)}
.lk-sw canvas{display:block;width:100% !important;height:100% !important}
/* her box: the one she sits in, the picker's button, then the pack's four in a row */
.lk-mine{display:flex;align-items:center;gap:10px;margin:0 0 9px;padding:6px 10px 6px 6px;border-radius:var(--r-card);border:1px solid var(--line);background:var(--ink-wash)}
.lk-ma{flex:none;display:grid;place-items:center;width:56px;height:56px;border-radius:50%;background:radial-gradient(closest-side, var(--box-pool), transparent)}
.lk-ma canvas{display:block}
.lk-mb{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.lk-mk{font:800 10px/1.1 var(--f-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--amber)}
.lk-mn{font:700 14.5px/1.2 var(--f-ui);color:var(--cream)}
.lk-choose{flex:none;height:44px;color:var(--cream)}
.lk-choose:hover{border-color:var(--amber-line)}
.lk-boxes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.lk-box{align-items:center;text-align:center;padding:5px 4px 7px}
.lk-art{display:grid;place-items:center;width:56px;height:56px}
.lk-art canvas{display:block;width:56px !important;height:56px !important}
.lk-box .lk-n{font-size:13px}
.lk-box .lk-f{flex-direction:column;gap:3px}
/* (1.3, IN4) the Mailbag after the pack's four: a row of its own, its thumbnail, its name and "From next door, free", its state */
.lk-gift{margin-top:6px}
.lk-gift[hidden]{display:none}
.lk-gb{width:100%;padding:5px 12px 5px 6px}
/* (1.3's her look, HL9: her-look.md 5.2, 5.4) Her hat and collar: the pack's six, three across in two rows (her head 56 px in each, 48 on a
   phone held sideways, as the boxes'), then "Her wardrobe · 4 of 31 ›", a row to the Album's Wardrobe */
.lk-wear{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.lk-wr{align-items:center;text-align:center;padding:5px 4px 7px}
.lk-wr .lk-n{font-size:13px}
.lk-wr .lk-f{flex-direction:column;gap:3px}
.lk-wd{display:flex;align-items:center;gap:8px;width:100%;min-height:48px;margin-top:8px;padding:6px 10px 6px 12px;border-radius:var(--r-card);border:1px solid var(--line);
  background:var(--ink-wash);color:var(--cream);font:inherit;text-align:left;cursor:pointer;touch-action:manipulation;transition:border-color .15s}
.lk-wd[hidden]{display:none}
.lk-wd:hover{border-color:var(--amber-line)}
.lk-wd:focus-visible{outline:2px solid var(--cream);outline-offset:2px}
.lk-wd .lk-n{flex:1 1 auto;min-width:0}
.lk-wdc{flex:none;font:600 12.5px/1.2 var(--f-ui);color:var(--cream-dim);font-variant-numeric:tabular-nums;white-space:nowrap}
.lk-wd svg{flex:none;width:20px;height:20px;color:var(--cream-dim)}
.lk-wd .ln{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* the music: a row each, its words and its state */
.lk-mus{display:flex;flex-direction:column;gap:7px}
.lk-row{flex-direction:row;align-items:center;gap:10px;min-height:52px;padding:9px 12px}
.lk-rb{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.lk-row .lk-s{margin:0;padding:0}
.lk-row .lk-f{flex:none;flex-wrap:nowrap;order:1;margin:0;padding:0;gap:10px}
.lk-row .lk-s{order:2}
.lk-grp .set-note{margin-top:8px}
/* the foot: thanks, the test switch's word, or what the pack is and its button */
.lk-foot{margin:2px 0 4px}
.lk-ft{font-size:13px;line-height:1.45;color:var(--cream-dim)}
.lk-buy{width:100%;margin-top:12px;height:48px}
.lk-buy[hidden]{display:none}
.lk-buy + .lk-ft{margin-top:20px}
.lk-ft[hidden]{display:none}
/* the room behind the Look page: lighter and sharp, so a pick is seen happening; on a phone held upright the sheet stops
   under her box (--look-top: game.js lookTop) */
.menu.look{background:radial-gradient(70% 60% at var(--scrim-at), transparent, var(--menu-scrim-lo));-webkit-backdrop-filter:none;backdrop-filter:none}
@media (max-width:999px) and (orientation:portrait), (max-width:999px) and (min-height:561px){
  .menu.look .menu-card{max-height:calc(100% - var(--look-top, 36%))}
}
@media (max-width:479px){
  .lk-n{font-size:13.5px}
  .lk-l{font-size:11.5px}
  .lk-card{padding:6px}
}
@media (max-width:999px) and (orientation:landscape) and (max-height:560px){
  .lk-grp{margin-bottom:13px}
  .lk-art,.lk-art canvas{width:48px !important;height:48px !important}
  .lk-ma,.lk-ma canvas{width:48px !important;height:48px !important}
}
/* the try's pill, in the bank's column under the per-second line: what is tried and its minute, Stop, Get it (each a 44 px
   target round its 30 px button). The bank's column steps over the room's buttons while it shows, so they never cover it */
.app.trying .hud-bank{z-index:7}
.try-pill{pointer-events:auto;display:flex;align-items:center;gap:6px;width:max-content;max-width:calc(100vw - 28px);height:40px;margin-top:10px;padding:0 5px 0 13px;
  border-radius:999px;border:1px solid var(--amber-line);background:var(--glass-strong);box-shadow:0 6px 18px var(--shadow-c)}
.try-pill[hidden]{display:none}
.tp-t{display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0;margin-right:3px}
.tp-k{font:800 9.5px/1 var(--f-ui);letter-spacing:.12em;text-transform:uppercase;color:var(--amber);white-space:nowrap}
.tp-c{font-variant-numeric:tabular-nums}
.tp-c::before{content:"\00b7  "}
.tp-n{font:700 13px/1.15 var(--f-ui);color:var(--cream);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tp-b{position:relative;flex:none;height:30px;padding:0 12px;border-radius:999px;border:1px solid var(--line);background:var(--plum-2);color:var(--cream);
  font:800 12px/1 var(--f-ui);cursor:pointer;touch-action:manipulation}
.tp-b::after{content:"";position:absolute;inset:-9px -4px}
.tp-b:hover{border-color:var(--amber-line)}
.tp-b:focus-visible{outline:2px solid var(--cream);outline-offset:2px}
.tp-get{border-color:var(--amber);background:var(--amber);color:var(--btn-ink)}
.tp-get:hover{background:var(--amber-hi)}
.tp-b[hidden]{display:none}
.app.stage-narrow .try-pill{margin-top:8px;height:38px;padding-left:11px}

/* ================= the first steps (design/v4/first-steps.md; game.js tutPlace) =================
   The pointers: one layer over the shop and the room, under the menu (40) and the dialogs. What they point at keeps its own
   place; under reduced motion they stand still and read the same. The layer takes no taps; a pointer's own go to what it points at */
.tut{position:fixed;inset:0;z-index:30;pointer-events:none;overflow:hidden}
.tut > [hidden]{display:none}
.tut-paw,.tut-ring,.tut-badge{pointer-events:auto;cursor:pointer;touch-action:manipulation}
.tut-paw{position:absolute;color:var(--amber);transform:translate(-50%,-50%);filter:drop-shadow(0 2px 0 rgba(5,3,12,.55)) drop-shadow(0 0 9px var(--amber-glow));animation:tutBob 1.3s ease-in-out infinite}
.tut-paw svg{display:block;width:100%;height:100%;fill:currentColor}
@keyframes tutBob{50%{transform:translate(-50%,-50%) translateY(-5px)}}
.tut-ring{position:absolute;box-sizing:border-box;border-radius:50%;border:2px solid var(--amber-line);box-shadow:0 0 16px var(--amber-glow);transform:translate(-50%,-50%);animation:tutRing 1.3s ease-in-out infinite}
.tut-ring::after{content:"";position:absolute;inset:18%;border-radius:50%;border:2px solid var(--amber)}
@keyframes tutRing{50%{transform:translate(-50%,-50%) scale(1.1);opacity:.7}}
.tut-badge{position:absolute;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--amber);color:var(--btn-ink);transform:translate(-50%,-50%);box-shadow:0 0 0 2px rgba(21,19,31,.9), 0 0 16px var(--amber-glow)}
.tut-badge svg{display:block;width:15px;height:15px;fill:currentColor}
.cat-row.tut-lift{z-index:3;transform:translateY(-3px) scale(1.012);border-color:var(--amber);box-shadow:0 0 0 1.5px var(--amber), 0 0 28px var(--amber-glow), inset 0 1px 0 var(--hi);background:linear-gradient(180deg,var(--plum-3),var(--plum-2))}
.cat-row.tut-lift .por{box-shadow:0 0 0 2.5px var(--amber), 0 0 16px var(--amber-glow), 0 4px 12px var(--shadow-c)}
.tab.tut-tab{color:var(--amber-hi);text-shadow:0 0 14px var(--amber-glow)}
.rate.tut-lit .rate-val,.rate.tut-lit .rate-per{color:var(--amber-hi);text-shadow:0 0 12px var(--amber), 0 0 22px var(--amber-glow)}
/* Skip: a 26 px chip with a 44 px target */
.tut-skip{position:absolute;right:max(10px, env(safe-area-inset-right));z-index:7;height:26px;padding:0 11px;border-radius:999px;border:1px solid var(--glass-line);background:var(--glass);
  color:var(--cream-dim);font:600 12.5px/1 var(--f-ui);letter-spacing:.01em;cursor:pointer;touch-action:manipulation}
.tut-skip::after{content:"";position:absolute;left:-6px;right:-6px;top:-9px;bottom:-9px}
.tut-skip:hover{color:var(--cream)}
/* her dream: the bubble round a kitten's portrait; its words stay for a screen reader */
.bubble .dream-por{display:none}
.app .bubble.dream{padding:7px;border-radius:50%}
.bubble.dream p{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.bubble.dream .dream-por{display:block;width:60px;height:60px}
.bubble.dream .por-cv{display:block;width:60px;height:60px}
/* what is done of the chapter's three goals, on her goals' tab (goalsFirst) */
.goal-dots{position:absolute;left:50%;top:5px;display:flex;gap:3px;transform:translateX(-50%);pointer-events:none}
.goal-dots[hidden]{display:none}
.goal-dots i{width:5px;height:5px;border-radius:50%;background:var(--plum-4)}
.goal-dots i.on{background:var(--teal);box-shadow:0 0 6px var(--teal-line)}

/* ================= the film (1.4, FD3: design/v4/first-day.md B4 and B5; game.js "the film") =================
   A card 9 by 16 in a window of its own, smaller than the screen, the game seen round it, dimmed a little (the owner, Nov 24: "u prozoru gde se
   okolo vidi malo igre"): at least --film-side from the screen's sides and at most --film-tall of its height; a screen on its side gives it
   all its height but a little. The menu it was opened from is not seen meanwhile (.under-film). The video fills it; the page's parts sit on stages 360 by 640 film units scaled to the card (--fu: its
   width over 360), so the frame is the same at every size; the words and the buttons are a little larger than that in a small card (--ui).
   The film's numbers come from game.js each frame: --room (the room's height in film units, over the Cats list), --shop (the list's 0 to 1
   up), --hud, --bump (the counter's jump), --flip (the life badge's), --goal, --capa (the words' 0 to 1 in), --play */
/* (--film-out: what of the screen's height is not the film's, the app's band and safe areas: src/plat/app.css. No blur of the game behind it: it
   would be drawn again under every frame of the film) */
.film{--film-side:28px;--film-tall:.78;--film-out:0px;position:fixed;inset:0;z-index:70;display:grid;place-items:center;background:rgba(10,8,16,.46);animation:fade .25s ease-out}
.menu.under-film{visibility:hidden}
/* (the game round the card stands still: nothing of it is drawn meanwhile, game.js tick, and its own animations wait) */
html.filming #app *,html.filming #app *::before,html.filming #app *::after{animation-play-state:paused !important}
.film[hidden]{display:none}
.film-card{--fu:1;--ui:1;--btn:1;--room:640;--shop:0;--hud:1;--bump:0;--flip:0;--goal:0;--capa:0;--capy:564;--play:0;--dark:0;--sx:180;--sy:320;--sr:300;position:relative;
  width:min(100vw - 2 * var(--film-side), calc((100vh - var(--film-out)) * var(--film-tall) * 9 / 16));width:min(100vw - 2 * var(--film-side), calc((100dvh - var(--film-out)) * var(--film-tall) * 9 / 16));aspect-ratio:9 / 16;
  border-radius:22px;background:var(--night);border:1px solid var(--amber-line);box-shadow:0 22px 60px rgba(0,0,0,.62), 0 6px 18px rgba(0,0,0,.45), 0 0 34px rgba(242,180,90,.14);outline:none}
/* (what it shows, cut to the card; the words and the buttons lie over it) */
.film-pic{position:absolute;inset:0;overflow:hidden;border-radius:inherit;background:var(--night)}
.film-cv{position:absolute;inset:0;width:100%;height:100%;display:block}
.film-vid{object-fit:cover;background:var(--night)}
.film-fx{pointer-events:none}
/* its file being got ready: its poster (the video's own), and where that takes a moment a paper caption over it */
.film-wait{position:absolute;inset:0;z-index:1;display:grid;place-items:center;pointer-events:none;visibility:hidden}
.film-wait .fc-plate{font-size:calc(20px * var(--fu) * var(--ui))}
.film.prep .film-wait{visibility:visible;animation:filmwait .3s ease-out .4s both}
.film.prep .film-hud,.film.prep .film-shop{opacity:0}
@keyframes filmwait{0%{opacity:0}100%{opacity:1}}
/* reduced motion: six stills, each fading into the next (two videos and two layers, game.js filmStill), the words and the page's parts with
   them; nothing in it moves */
.film.still .film-cv,.film.still .film-hud,.film.still .film-shop{transition:opacity .9s ease-in-out}
.film.still .film-cv.off{opacity:0}
.film.still .film-shop{top:372px}
.film.still .film-cap{transform:none;transition:opacity .4s ease-in-out}
.film.still .film-play{transition:opacity .5s ease-in-out}
.film.still .film-light::before{transition:opacity .9s ease-in-out}
/* the film's light, over the picture and under the words: a soft vignette always, and the hook's dark with its pool of lamp light
   (--dark its 0 to 1, --sx, --sy, --sr the pool's middle and reach in film units); two gradients the compositor lays, nothing a frame */
.film-light{position:absolute;inset:0;pointer-events:none;background:radial-gradient(125% 80% at 50% 44%, rgba(8,6,14,0) 50%, rgba(8,6,14,.3) 80%, rgba(8,6,14,.6) 100%)}
.film-light::before{content:"";position:absolute;inset:0;opacity:var(--dark);
  background:radial-gradient(circle calc(var(--sr) * var(--fu) * 1px) at calc(var(--sx) * var(--fu) * 1px) calc(var(--sy) * var(--fu) * 1px),
    rgba(255,214,150,.13) 0%, rgba(10,7,16,0) 30%, rgba(10,7,16,.6) 58%, rgba(6,4,10,.94) 100%)}
.film-stage{position:absolute;left:0;top:0;width:360px;height:640px;transform-origin:0 0;transform:scale(var(--fu));pointer-events:none}
.film-top .film-skip,.film-top .film-play{pointer-events:auto}
/* the counter at the top, as the game's bank (Fraunces in cells: setNum), jumping as the purrs land */
.film-hud{position:absolute;left:0;right:0;top:0;height:120px;opacity:var(--hud)}
.film-bank{position:absolute;left:0;right:0;top:56px;margin:0;display:flex;justify-content:center;align-items:baseline;gap:7px;
  transform:scale(calc(1 + .16 * var(--bump)));transform-origin:50% 70%}
/* (a soft dark behind the figure, so it reads over any part of the room, and a warm light in it when it jumps) */
.film-bank::before{content:"";position:absolute;left:50%;top:50%;width:310px;height:120px;transform:translate(-50%,-50%);z-index:-1;pointer-events:none;
  background:radial-gradient(closest-side, rgba(242,180,90,calc(.2 * var(--bump))), rgba(15,13,22,.5) 42%, rgba(15,13,22,.22) 70%, rgba(15,13,22,0))}
.film-num{font:900 42px/.95 var(--f-display);font-variation-settings:var(--soft);font-variant-numeric:lining-nums tabular-nums;letter-spacing:-.015em;
  color:var(--cream);color:color-mix(in srgb, var(--cream), #ffdc94 calc(var(--bump) * 75%));
  text-shadow:0 2px 0 var(--shadow-c), 0 5px 12px rgba(8,6,14,.55), 0 0 calc(8px + 14px * var(--bump)) rgba(255,214,140,calc(.25 + .6 * var(--bump))), 0 0 calc(30px + 40px * var(--bump)) rgba(242,180,90,calc(.34 + .5 * var(--bump)))}
.film-unit{font:700 15px/1 var(--f-ui);color:var(--amber);text-shadow:0 1px 0 var(--shadow-c), 0 3px 8px rgba(8,6,14,.5)}
.film-life{position:absolute;left:14px;top:14px;margin:0;display:flex;align-items:baseline;gap:5px;padding:5px 11px 6px;border-radius:999px;
  background:linear-gradient(180deg, rgba(42,34,56,.82), rgba(15,13,22,.78));border:1px solid var(--line);font:700 12px/1 var(--f-ui);color:var(--muted);text-transform:uppercase;letter-spacing:.08em;
  box-shadow:0 4px 14px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.07), 0 0 calc(var(--flip) * 20px) rgba(242,180,90,calc(var(--flip) * .75))}
/* (its number hops and glows at each new life; it never turns edge on, where it read as a dash) */
.film-life b{display:inline-block;min-width:.72em;text-align:center;font:900 19px/1 var(--f-display);color:var(--amber);letter-spacing:0;transform-origin:50% 80%;
  transform:translateY(calc(var(--flip) * -2px)) scale(calc(1 + var(--flip) * .55));text-shadow:0 0 calc(var(--flip) * 12px) rgba(255,214,140,.95)}
.fl-star{margin-left:6px;color:#ffd36a;font-size:13px;letter-spacing:0}
.film-goal{position:absolute;left:78px;right:78px;top:110px;display:flex;flex-direction:column;align-items:center;gap:5px}
.film-goal[hidden]{display:none}
.fg-k{font:700 11px/1 var(--f-ui);color:var(--muted);text-transform:uppercase;letter-spacing:.1em}
.fg-bar{position:relative;width:100%;height:11px;border-radius:11px;background:rgba(15,13,22,.78);border:1px solid var(--line);overflow:hidden;
  box-shadow:0 3px 10px rgba(0,0,0,.4), inset 0 1px 2px rgba(0,0,0,.5)}
.fg-bar::after{content:"";position:absolute;left:0;right:0;top:0;height:45%;background:linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0));pointer-events:none}
.fg-fill{position:absolute;inset:0;transform-origin:0 50%;transform:scaleX(var(--goal));background:linear-gradient(90deg,var(--amber-deep),var(--amber));
  box-shadow:0 0 10px var(--amber-glow)}
.film-goal.full .fg-fill{background:linear-gradient(90deg,var(--amber),#ffe7a0);box-shadow:0 0 16px rgba(255,220,150,.9)}
.film-goal.full .fg-bar{border-color:var(--amber-line);box-shadow:0 0 18px rgba(242,180,90,.55), inset 0 1px 2px rgba(0,0,0,.5)}
.film-goal.full .fg-k{color:var(--amber)}
/* the Cats list: the game's own rows, rising from the foot under the room */
.film-shop{position:absolute;left:0;right:0;top:calc(var(--room) * 1px);height:300px;padding:50px 12px 0;
  background:radial-gradient(130% 90% at 50% 0%, var(--plum-3), var(--plum) 70%);border-top:1px solid var(--line);
  box-shadow:0 -14px 36px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.07), inset 0 18px 30px -18px rgba(242,180,90,.14);opacity:min(1, calc(var(--shop) * 3))}
.film-shop .cat-row{box-shadow:0 6px 16px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.05)}
.film-shop .cr-v{display:inline-block;transform-origin:50% 70%;transform:scale(calc(1 + var(--pop, 0) * .6));text-shadow:0 0 calc(var(--pop, 0) * 16px) rgba(255,214,140,.95)}
.film-shop .cat-row{pointer-events:none}
/* (on a wide window too the rows are the phone's compact ones, as the shop's are under 1000 px: the film's frame is a phone's, and the
   desktop's taller rows ran out of it under the paw) */
@media (min-width:1000px){
  .film-shop .cat-list{gap:6px}
  .film-shop .cat-row{grid-template-columns:44px minmax(0,1fr) auto;column-gap:10px;padding:8px 12px 8px 9px}
  .film-shop .por{width:44px;height:44px} .film-shop .por .por-cv{width:44px !important;height:44px !important}
  .film-shop .cr-body{flex-direction:row;flex-wrap:wrap;column-gap:8px;align-items:baseline}
  .film-shop .cr-name{order:1;flex:1 1 var(--nb, 10ch);max-width:100%;overflow:clip;font-size:15px;line-height:18px;text-wrap:balance}
  .film-shop .cr-cost{order:2;flex:0 1 auto;min-width:0;margin:0 0 0 auto;font-size:13.5px;line-height:18px;text-align:right}
  .film-shop .cr-cost .cc-c,.film-shop .cr-cost .cc-u,.film-shop .cr-home{display:none}
  .film-shop .cr-note{order:3;flex:1 0 100%;min-width:0;margin-top:1px;font-size:14.5px;line-height:17px;overflow:hidden}
  .film-shop .cr-prod{order:4;flex:1 0 100%;margin-top:1px;font-size:11.5px;line-height:14px}
  .film-shop .cr-own{gap:5px;min-width:26px} .film-shop .cr-n{font-size:23px}
}
.film-shop .cat-row.film-press{transform:translateY(2px) scale(.985);border-color:var(--amber);background:linear-gradient(180deg,var(--plum-3),var(--plum-2));
  box-shadow:0 2px 8px rgba(0,0,0,.3), 0 0 0 1px var(--amber-line), 0 0 26px rgba(242,180,90,.4), inset 0 0 22px rgba(242,180,90,.14)}
/* the words: a few, big, over the room's foot (over the list while it is up) */
.film-cap{position:absolute;left:4px;right:4px;top:calc(var(--capy) * 1px);margin:0;display:flex;justify-content:center;
  opacity:min(1, calc(var(--capa) * 2));transform:translateY(calc((1 - var(--capa)) * -8px)) scale(calc(.82 + .18 * var(--capa)))}
.film-cap .fc-plate{font-size:calc(20px * var(--ui));padding-left:calc(16px - (var(--ui) - 1) * 50px);padding-right:calc(16px - (var(--ui) - 1) * 50px)}
/* the words on a paper plate, as her thought bubble is (the game's paper, its ink and its shadow), a little askew like a note pinned
   up; empty, no plate */
.fc-plate{display:block;max-width:100%;padding:8px 16px 10px;border-radius:15px;background:var(--paper);color:var(--paper-ink);text-align:center;
  font:700 20px/1.14 var(--f-display);font-variation-settings:var(--soft);letter-spacing:-.005em;white-space:pre-line;text-wrap:balance;
  box-shadow:0 10px 26px var(--shadow-c), 0 2px 0 rgba(8,6,14,.35), inset 0 -2px 0 var(--paper-shade);transform:rotate(-1.2deg)}
.fc-plate:empty{display:none}
.film-cap[data-cap="1"] .fc-plate,.film-cap[data-cap="3"] .fc-plate{transform:rotate(1deg)}
.film-cap[data-cap="2"] .fc-plate,.film-cap[data-cap="3"] .fc-plate{font-size:calc(18.5px * var(--ui))}
.film-skip{position:absolute;right:10px;top:10px;min-width:64px;height:40px;padding:0 14px;border-radius:999px;border:1px solid var(--line);
  background:rgba(15,13,22,.6);color:var(--cream-dim);font:700 14px/1 var(--f-ui);cursor:pointer;transform:scale(var(--btn));transform-origin:100% 0}
.film-skip:hover{color:var(--cream);border-color:var(--amber-line)}
.film-skip[hidden]{display:none}
/* (a finger's 44 px whatever the card's size: the stage is scaled with it) */
.film-skip::after,.film-play::after{content:"";position:absolute;left:0;right:0;top:50%;height:calc(44px / var(--fu));transform:translateY(-50%);min-height:100%}
.film-top .film-play{position:absolute;left:60px;right:60px;bottom:22px;width:auto;opacity:min(1, var(--play));transform:scale(calc((.7 + .3 * var(--play)) * min(var(--btn), 1.22)));transform-origin:50% 100%}
.film-play[hidden]{display:none}
/* the sound's button: only where the page could not start the film with it */
.film-sound{position:absolute;left:8px;bottom:8px;width:46px;height:46px;border-radius:50%;border:1px solid var(--line);background:rgba(15,13,22,.66);color:var(--cream);
  display:grid;place-items:center;cursor:pointer;pointer-events:auto;transform:scale(var(--btn));transform-origin:0 100%}
.film-sound svg{width:22px;height:22px;fill:currentColor} .film-sound .ln{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round}
.film-sound[hidden]{display:none}
/* from How to play: its page of words, a press away (under the card; beside it on a phone sideways) */
.film-read{position:absolute;left:50%;top:100%;transform:translateX(-50%);margin-top:8px;min-height:44px;padding:0 18px;border:0;border-radius:999px;background:rgba(15,13,22,.72);color:var(--cream);
  font:600 14px/1 var(--f-ui);white-space:nowrap;text-decoration:underline;text-decoration-color:var(--amber-line);text-underline-offset:4px;cursor:pointer}
.film-read:hover{color:var(--amber)}
.film-read[hidden]{display:none}
/* (a phone sideways: all the height there is but a little) */
@media (max-height:480px){ .film{--film-tall:.94} .film-card{border-radius:14px} .film-read{left:100%;top:auto;bottom:0;transform:none;margin:0 0 0 14px} }

/* 1.4, FR1: the find's moment (game.js "The find's moment": a dialog of kind `find`). Its card has no box of its own: its picture (--fd-px, set
   by findRender: 150, 168 on a wide screen, 112 on a short one) sits on the top edge of a plum plate (the card's ::before) and on a sunburst
   (.fd-sun: two ray layers, each one repeating conic gradient under a radial mask that fades it to nothing, turning slowly the two ways; a
   warm wash under them and the halo's glow behind the picture). Only the rays' rotation is animated, on their own layers; still under reduced
   motion. The rays lie under the plate (z -2 under its -1, in the card's own stacking context), the glow and the picture over it; the modal
   clips what reaches past the screen */
.modal[data-kind="find"]{overflow:hidden}
.modal[data-kind="find"] .modal-card{position:relative;isolation:isolate;width:min(380px,100%);max-height:none;overflow:visible;padding:0 22px 16px;
  background:none;border:0;box-shadow:none}
.modal[data-kind="find"] .modal-card::before{content:"";position:absolute;z-index:-1;left:0;right:0;bottom:0;top:calc(var(--fd-px, 150px) * .6);border-radius:24px;
  background:radial-gradient(90% 60% at 50% 0%, rgba(255,206,120,.16), rgba(255,206,120,0) 70%), radial-gradient(120% 70% at 50% 0%, var(--plum-4), var(--plum) 64%);
  border:1px solid var(--line);box-shadow:0 30px 80px var(--shadow-c), inset 0 1px 0 rgba(255,226,170,.14)}
.modal[data-kind="find"] .modal-art{position:relative;display:grid;place-items:center;height:calc(var(--fd-px, 150px) + 22px);margin:0 0 6px}
.modal[data-kind="find"] .modal-art canvas{width:auto;height:auto;border-radius:0;box-shadow:none}
.fd-sun{position:absolute;z-index:-2;left:50%;top:50%;width:calc(var(--fd-px, 150px) * 3.1);height:calc(var(--fd-px, 150px) * 3.1);transform:translate(-50%,-50%);pointer-events:none;
  border-radius:50%;background:radial-gradient(closest-side, rgba(12,8,20,.46), rgba(12,8,20,.3) 48%, rgba(12,8,20,0) 92%)}
.fd-sun::before{content:"";position:absolute;inset:9%;border-radius:50%;background:radial-gradient(closest-side, rgba(255,206,118,.44), rgba(255,192,98,.17) 52%, rgba(255,190,96,0))}
.fd-rays{position:absolute;inset:0;border-radius:50%;will-change:transform;animation:fdTurn 100s linear infinite;
  background:repeating-conic-gradient(from -5deg, rgba(255,206,112,0) 0deg, rgba(255,208,118,.40) 4.5deg, rgba(255,218,140,.46) 6.5deg, rgba(255,206,112,0) 11.5deg,
    rgba(255,206,112,0) 15deg, rgba(255,214,132,.17) 18.5deg, rgba(255,214,132,.19) 19.8deg, rgba(255,206,112,0) 23.5deg, rgba(255,206,112,0) 30deg);
  -webkit-mask-image:radial-gradient(closest-side, rgba(0,0,0,.25) 10%, #000 24%, rgba(0,0,0,.58) 44%, rgba(0,0,0,.2) 66%, rgba(0,0,0,0) 88%);
  mask-image:radial-gradient(closest-side, rgba(0,0,0,.25) 10%, #000 24%, rgba(0,0,0,.58) 44%, rgba(0,0,0,.2) 66%, rgba(0,0,0,0) 88%)}
.fd-rays.fd-r2{opacity:.8;animation-duration:160s;animation-direction:reverse;
  background:repeating-conic-gradient(from 10deg, rgba(255,190,96,0) 0deg, rgba(255,196,104,.2) 10deg, rgba(255,190,96,0) 22deg, rgba(255,190,96,0) 45deg);
  -webkit-mask-image:radial-gradient(closest-side, rgba(0,0,0,.4) 10%, #000 30%, rgba(0,0,0,.35) 60%, rgba(0,0,0,0) 80%);
  mask-image:radial-gradient(closest-side, rgba(0,0,0,.4) 10%, #000 30%, rgba(0,0,0,.35) 60%, rgba(0,0,0,0) 80%)}
@keyframes fdTurn{to{transform:rotate(1turn)}}
.rm .fd-rays{animation:none}
.fd-halo{position:absolute;left:50%;top:50%;width:calc(var(--fd-px, 150px) * 1.5);height:calc(var(--fd-px, 150px) * 1.5);transform:translate(-50%,-50%);border-radius:50%;pointer-events:none;
  background:radial-gradient(closest-side, rgba(255,242,212,.62), rgba(255,216,128,.36) 46%, rgba(255,198,96,.12) 72%, rgba(255,198,96,0))}
.fd-pic{position:relative;display:grid;place-items:center;width:var(--fd-px, 150px);height:var(--fd-px, 150px)}
.fd-pic canvas{display:block;filter:drop-shadow(0 9px 14px rgba(24,12,2,.42))}
/* (her head in a hat, a collar, a charm or a coat, and a kitten in her rare coat: their portraits' discs, ringed in gold) */
.modal[data-set="wear"] .fd-pic canvas,.modal[data-set="fur"] .fd-pic canvas,.modal[data-set="coat"] .fd-pic canvas{border-radius:50%;filter:none;
  box-shadow:0 0 0 3px var(--gold), 0 0 0 4px rgba(120,72,10,.45), 0 0 26px 6px rgba(255,204,108,.42), 0 16px 30px rgba(8,4,0,.5)}
/* (three glints round the picture, twinkling out of step: a soft dot with a four-pointed flare, its arms two feathered strokes; still and lit
   under reduced motion) */
.fd-glint{position:absolute;left:calc(50% + var(--gx) * var(--fd-px, 150px));top:calc(50% + var(--gy) * var(--fd-px, 150px));width:18px;height:18px;margin:-9px 0 0 -9px;pointer-events:none;
  border-radius:50%;background:radial-gradient(circle, #fffbe6 0, rgba(255,240,196,.85) 16%, rgba(255,222,146,0) 58%);animation:fdGlint 2.6s ease-in-out infinite both}
.fd-glint::before,.fd-glint::after{content:"";position:absolute;left:50%;top:50%;width:2px;height:18px;margin:-9px 0 0 -1px;border-radius:2px;
  background:linear-gradient(rgba(255,246,214,0), rgba(255,246,214,.95) 50%, rgba(255,246,214,0))}
.fd-glint::after{transform:rotate(90deg)}
.fd-glint.g1{--gx:-.6;--gy:-.34}
.fd-glint.g2{--gx:.64;--gy:-.12;animation-delay:-1.7s;scale:.8}
.fd-glint.g3{--gx:.33;--gy:-.6;animation-delay:-.9s;scale:.62}
@keyframes fdGlint{0%,100%{opacity:.1;transform:scale(.45) rotate(0deg)}50%{opacity:1;transform:scale(1) rotate(25deg)}}
.rm .fd-glint{animation:none;opacity:.85}
.modal[data-kind="find"] .fd-pic .seal.art{width:100%;height:100%;margin:0}
.modal[data-kind="find"] .modal-kicker{margin-bottom:6px;color:var(--gold);letter-spacing:.17em}
.modal[data-kind="find"] .modal-title{margin-bottom:8px;font-size:30px;text-wrap:balance}
.modal[data-kind="find"] .modal-body p.fd-line{max-width:32ch;margin:0 auto 8px;line-height:1.45;text-wrap:pretty}
.modal[data-kind="find"] .modal-body p.fd-small{margin:0 auto 4px;max-width:34ch}
.modal[data-set="t"] .modal-body p.fd-small,.modal[data-set="box"] .modal-body p.fd-small{color:var(--gold);font-weight:700}
.fd-nav{display:flex;align-items:center;justify-content:center;gap:2px;margin:6px 0 0}
.fd-count{min-width:62px;font:700 13px/1 var(--f-ui);font-variant-numeric:tabular-nums;color:var(--muted)}
.fd-arrow,.fd-x{display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:none;color:var(--cream-dim);cursor:pointer;touch-action:manipulation}
.fd-arrow svg,.fd-x svg{width:20px;height:20px}
.fd-arrow .ln,.fd-x .ln{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.fd-arrow:hover:not(:disabled),.fd-x:hover{color:var(--cream);background:var(--ink-wash)}
.fd-arrow:disabled{opacity:.28;cursor:default}
.fd-x{position:absolute;top:calc(var(--fd-px, 150px) * .6 + 6px);right:6px}
.fd-btns{display:flex;justify-content:center;gap:10px;margin-top:12px}
.fd-btns .btn-primary{min-width:146px}
.fd-btns .btn-ghost{height:46px;min-width:104px;font-size:14px;border-radius:var(--r-btn)}
.fd-link{display:block;min-height:44px;margin:4px auto -6px;padding:0 12px;border:0;background:none;color:var(--amber-hi);cursor:pointer;
  font:700 13.5px/1 var(--f-ui);text-decoration:underline;text-decoration-color:var(--amber-line);text-underline-offset:4px;touch-action:manipulation}
.fd-link:hover{color:var(--amber)}
/* (a phone turned sideways, or any short screen wide enough: the picture on its sun at the left, the plate from under its middle, the words and
   the buttons beside it) */
@media (max-height:560px) and (min-width:560px){
  .modal[data-kind="find"] .modal-card{width:min(540px,100%);display:grid;grid-template-columns:calc(var(--fd-px, 112px) + 34px) 1fr;grid-template-rows:1fr auto auto auto 1fr;
    column-gap:16px;align-items:start;text-align:left;padding:14px 18px 10px 0}
  .modal[data-kind="find"] .modal-card::before{top:0;left:calc(var(--fd-px, 112px) * .5 + 17px)}
  .modal[data-kind="find"] .modal-art{grid-column:1;grid-row:1 / -1;align-self:center;height:auto;aspect-ratio:1;margin:0}
  .modal[data-kind="find"] .modal-kicker{grid-column:2;grid-row:2;margin:4px 0 4px}
  .modal[data-kind="find"] .modal-title{grid-column:2;grid-row:3;margin-bottom:6px;font-size:25px;padding-right:34px}
  .modal[data-kind="find"] .modal-body{grid-column:2;grid-row:4}
  .modal[data-kind="find"] .modal-body p.fd-line,.modal[data-kind="find"] .modal-body p.fd-small{margin-left:0;font-size:14px}
  .fd-nav{justify-content:flex-start;margin-left:-12px}
  .fd-btns{justify-content:flex-start;margin-top:8px}
  .fd-link{margin:2px 0 -6px -12px}
  .fd-x{top:4px;right:4px}
}
/* (a narrow phone: a narrower plate's padding, and the two buttons share its width) */
@media (max-width:359px){
  .modal[data-kind="find"] .modal-card{padding:0 14px 14px}
  .fd-btns .btn-primary,.fd-btns .btn-ghost{min-width:0;flex:1 1 auto;padding:0 14px}
}
/* (a short screen upright: the title smaller) */
@media (max-height:620px) and (max-width:559px){
  .modal[data-kind="find"] .modal-title{font-size:26px}
  .modal[data-kind="find"] .modal-body p.fd-line{font-size:14px}
}
/* (findRender's .fd-tight: words that would reach past a short screen, a long line and its small one at 320 px tall: the small line goes, the
   line keeps two lines and the title is smaller; the Album card has them whole) */
.modal.fd-tight[data-kind="find"]{padding:6px}
.modal.fd-tight .modal-body p.fd-small{display:none}
.modal.fd-tight[data-kind="find"] .modal-title{font-size:22px}
.modal.fd-tight .modal-body p.fd-line{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}