/* World 2. Built on the house style (style/README.md): paper ground, navy ink,
   people colors only on people, tints for atmosphere, gold only for what is earned.
   Palette tokens come live from /style/tokens.css. */
@import url("/style/tokens.css");

@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/static/fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/static/fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* the guide has no periwinkle rule or fill yet: same lightness steps as its siblings */
  --rule-peri: #b7b9ef; --fill-peri: #f8f8fe;
  /* a pale gold for the Photos app tile (it holds what she earned) */
  --tint-gold: #f7e2a6;
  /* Spade, Theron, strangers: navy family */
  --tint-ink: #dce2ec; --rule-ink: #a3adbf;
  --story-w: 680px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

/* whose color: set on any element, children use --p, --on-p, --p-tint, --p-rule, --p-fill */
.t-hearts   { --p: var(--hearts);   --on-p: var(--on-hearts);   --p-tint: var(--tint-rose); --p-rule: var(--rule-rose); --p-fill: var(--fill-rose); }
.t-clubs    { --p: var(--clubs);    --on-p: var(--on-clubs);    --p-tint: var(--tint-mint); --p-rule: var(--rule-mint); --p-fill: var(--fill-mint); }
.t-diamonds { --p: var(--diamonds); --on-p: var(--on-diamonds); --p-tint: var(--tint-sky);  --p-rule: var(--rule-sky);  --p-fill: var(--fill-sky); }
.t-caelum   { --p: var(--caelum);   --on-p: var(--on-caelum);   --p-tint: var(--tint-peri); --p-rule: var(--rule-peri); --p-fill: var(--fill-peri); }
.t-ink      { --p: var(--spades);   --on-p: var(--on-spades);   --p-tint: var(--tint-ink);  --p-rule: var(--rule-ink);  --p-fill: var(--card); }
.t-sky      { --p: var(--tint-sky); --on-p: var(--ink);         --p-tint: var(--tint-sky);  --p-rule: var(--rule-sky);  --p-fill: var(--fill-sky); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font: 400 16.5px/1.6 var(--font-ui); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh; overflow-x: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.katex { font-size: 1.04em; }
.katex-display { margin: .6em 0; overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
:focus-visible { outline: 2.5px solid var(--rule-sky); outline-offset: 2px; }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.lab { font: 800 12px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; }
.head { color: var(--head); }
.faint { color: var(--ink-faint); }
.muted { color: var(--ink-muted); }

/* --------------------------------------------------------------- crayon (the one brush) */
svg.cr { display: block; overflow: visible; }
.crule { width: 100%; height: 12px; }

/* --------------------------------------------------------------- stage */
.stage { position: relative; }
.story { max-width: var(--story-w); margin: 0 auto; padding: 22px 16px max(210px, calc(var(--cmp-h, 0px) + 64px)); }
.feed { position: relative; }
.feed > * + * { margin-top: 18px; }
.entry > * + *, .gm-live > * + * { margin-top: 16px; }
.entry > .gm-live:empty { display: none; }
.b-text + .b-text { margin-top: 10px !important; }

.demo-mark { position: absolute; top: 10px; left: 16px; z-index: 5; color: var(--ink-faint); font: 800 10.5px/1 var(--font-ui);
  letter-spacing: .14em; text-transform: uppercase; pointer-events: none; }

.earlier { display: block; margin: 0 auto 28px; padding: 9px 16px; border: 2px solid var(--ink); background: var(--card);
  font-weight: 700; font-size: 14px; }
.day-sep { text-align: center; color: var(--ink-faint); font: 700 11.5px/1 var(--font-ui); letter-spacing: .12em;
  text-transform: uppercase; margin: 34px 0 6px !important; }

/* scene: a crayon rule in the place's color, a kicker, the place */
.b-scene { margin-top: 54px !important; padding-top: 4px; }
.feed > .b-scene:first-child, .feed > .earlier + .b-scene, .feed > .day-sep + .b-scene { margin-top: 8px !important; }
.b-scene .crule { margin-bottom: 14px; }
.b-scene .kick { color: var(--head); }
.b-scene h2 { margin: 7px 0 0; font: 800 27px/1.12 var(--font-ui); letter-spacing: -.015em; }
.b-scene .where { margin-top: 5px; color: var(--ink-muted); font-size: 14.5px; }

/* narration: plain paper prose */
.b-narr { font-size: 17px; line-height: 1.64; max-width: 64ch; }
.b-narr p { margin: 0; }
.b-narr p + p { margin-top: .9em; }

/* the dialogue box (friend's structure): raised paper, colored border, ink rule, name tab */
.dbox { position: relative; background: var(--card); border: 2.5px solid var(--p-rule, var(--rule-ink)); padding: 31px 22px 16px; }
.dbox::before { content: ""; position: absolute; left: 5px; right: 5px; top: 5px; height: 7px; background: var(--ink); }
.dbox .tab { position: absolute; left: 20px; top: -13px; z-index: 2; background: var(--p, var(--ink)); color: var(--on-p, var(--on-spades));
  padding: 6px 10px 5px; max-width: calc(100% - 40px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbox .say { font-size: 17px; line-height: 1.58; }
.dbox .say p { margin: 0; }
.dbox .say p + p { margin-top: .7em; }
.dbox .adv { position: absolute; right: 12px; bottom: 7px; color: var(--ink-faint); font-size: 11px; }

.b-line { position: relative; margin-top: 30px !important; }
.pf { position: relative; flex: none; margin: 0; background: var(--card); border: 2.5px solid var(--p-rule, var(--rule-ink)); overflow: hidden; }
.pf img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.pf .sil { width: 100%; height: 100%; }
/* someone she has only heard of: their color, no face yet */
.heard .pf, .pf.heard { --sil: var(--p-rule); }
.hp .pf { width: 52px; height: 52px; border-width: 2px; }
/* phone: the portrait sits on the box's top edge beside the tab */
.b-line .pf { position: absolute; z-index: 3; left: 10px; top: -24px; width: 50px; height: 50px; }
.b-line .dbox .tab { left: 70px; }
.b-line .dbox { padding-top: 34px; }

/* Spade's own move: her ink, her side of the page */
.b-me { margin-left: 13%; margin-top: 30px !important; }
.b-me .dbox { border-color: var(--ink); border-width: 2px; }
.b-me .dbox::before { display: none; }
.b-me .dbox { padding-top: 22px; }
.b-me .say { color: var(--ink); }

/* problem: an exercise slip */
.b-prob { position: relative; background: var(--fill-sky); border: 2px solid var(--ink); padding: 18px 20px 18px; margin-top: 26px !important; }
.b-prob .ph { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.b-prob .pid { font: 600 12.5px/1 var(--font-mono); color: var(--ink-faint); }
.b-prob .stmt { font-size: 17px; line-height: 1.62; }
.b-prob .stmt p { margin: 0; }
.b-prob .stmt p + p { margin-top: .7em; }
.ans { margin-top: 16px; }
.ans textarea { display: block; width: 100%; min-height: 92px; resize: vertical; border: 2px dashed var(--ink-faint);
  background: var(--card); padding: 11px 13px; font: 400 15.5px/1.5 var(--font-mono); color: var(--ink); border-radius: 0; }
.ans textarea:focus { outline: none; border-style: solid; border-color: var(--ink); }
.ans .prev { margin-top: 10px; padding: 10px 13px; border-left: 4px solid var(--rule-sky); background: var(--card); font-size: 16px; }
.ans .prev:empty { display: none; }
.ans .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.ans .row .faint { font-size: 12.5px; }
.handed { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--ink-muted); }
.handed .lab { color: var(--ink); }

.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--on-spades);
  padding: 10px 16px 10px; font: 800 12.5px/1 var(--font-ui); letter-spacing: .12em; text-transform: uppercase;
  border: 2px solid var(--ink); }
.btn:active { transform: translate(1px, 1px); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.ghost { background: var(--card); color: var(--ink); }
.linkbtn { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px;
  text-decoration-color: var(--rule-sky); }

/* her written answer */
.b-answer { margin-left: 13%; margin-top: 26px !important; background: var(--card); border: 2px solid var(--ink); padding: 15px 18px 15px; }
.b-answer .lab { display: block; margin-bottom: 9px; }
.b-answer .tx { font-size: 16.5px; }
.b-answer .tx p { margin: 0; }

/* earned: gold, and only here */
.b-rew { margin: 30px auto 0; width: fit-content; max-width: 100%; background: var(--fill-gold); border: 3px solid var(--gold); padding: 14px 14px 12px; }
.b-rew .lab { color: var(--gold-ink); display: block; margin: 2px 2px 11px; }
.b-rew button { display: block; width: 100%; }
.b-rew img { width: auto; max-width: 100%; max-height: min(72vh, 620px); border: 2px solid var(--ink); background: var(--card); }
.b-rew figcaption { margin: 10px 2px 0; font-size: 15px; font-weight: 600; }
.b-mom { display: flex; align-items: center; gap: 12px; margin-top: 26px !important; }
.b-mom .crule { flex: 1; height: 10px; }
.b-mom .plate { flex: none; background: var(--gold); color: var(--ink); padding: 8px 12px 7px; text-align: center; }

/* out of character: an author's margin note */
.b-ooc { border: 1.5px dashed var(--ink-faint); padding: 11px 14px 12px; color: var(--ink-muted); font-size: 15px; line-height: 1.55; }
.b-ooc .lab { display: block; margin-bottom: 6px; color: var(--ink-faint); font-size: 11px; }
.b-ooc.mine { margin-left: 13%; }
.b-ooc p { margin: 0; }

/* her phone, inline: texts, calls, posts, news */
.b-text { display: flex; flex-direction: column; align-items: flex-start; }
.b-text .who { display: flex; align-items: center; gap: 6px; margin: 0 0 5px 4px; color: var(--ink-muted); }
.b-text .who svg { width: 11px; height: 16px; }
.bub { position: relative; max-width: min(78%, 440px); background: var(--p-tint, var(--card)); border: 2px solid var(--ink);
  border-radius: 16px; padding: 8px 14px 9px; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.bub p { margin: 0; }
.b-text .when { margin: 4px 0 0 6px; color: var(--ink-faint); font-size: 11.5px; font-weight: 600; }
.b-text.unknown .bub { background: var(--card); }
.b-text.out { align-items: flex-end; }
.b-text.out .who { margin: 0 4px 5px 0; }
.b-text.out .bub { background: var(--card); }
.b-text.out .when { margin: 4px 6px 0 0; }
.b-text.fresh .bub { animation: slidein .5s var(--ease) both; }
.b-text.out.fresh .bub { animation-name: slidein-r; }
@keyframes slidein { from { opacity: 0; transform: translateX(-26px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes slidein-r { from { opacity: 0; transform: translateX(26px) scale(.96); } to { opacity: 1; transform: none; } }

.b-call { position: relative; display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; background: var(--card); border: 2px solid var(--ink); padding: 11px 14px; overflow: hidden; max-width: 560px; }
.b-call .ic { position: relative; flex: none; width: 42px; height: 42px; display: grid; place-items: center; }
.b-call .ic svg { width: 42px; height: 42px; }
.b-call .ct { flex: 1; min-width: 0; }
.b-call .ct .lab { display: block; color: var(--ink-muted); font-size: 11px; margin-bottom: 5px; }
.b-call .nm { font-weight: 800; font-size: 16.5px; }
.b-call .tm { color: var(--ink-faint); font-size: 12px; font-weight: 600; margin-left: 6px; }
.b-call .acts { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 559px) { .b-call .acts { flex-basis: 100%; margin: 8px 0 2px; } .b-call .acts .btn { flex: 1; justify-content: center; } }
.b-call.ringing .ic { animation: ring 1.1s ease-in-out infinite; }
.b-call.ringing .ic::before, .b-call.ringing .ic::after { content: ""; position: absolute; inset: 1px; border: 2px solid var(--p-rule, var(--rule-sky));
  border-radius: 50%; animation: wave 1.6s ease-out infinite; }
.b-call.ringing .ic::after { animation-delay: .8s; }
@keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30%, 50% { transform: rotate(-11deg); } 20%, 40% { transform: rotate(11deg); } }
@keyframes wave { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.45); opacity: 0; } }
.b-call.missed .nm { color: var(--ink); }

.chip { display: inline-flex; align-items: center; padding: 3px 8px 3px; border: 2px solid var(--p, var(--ink)); background: var(--p);
  color: var(--on-p); font-weight: 800; font-size: 13px; line-height: 1.25; }
.chip.ol { background: var(--card); color: var(--ink); }

.b-post { position: relative; background: var(--card); border: 2px solid var(--ink); padding: 15px 16px 14px; max-width: 520px; margin-top: 26px !important; }
.b-post .ptab { position: absolute; left: 14px; top: -12px; background: var(--tint-sky); color: var(--ink); padding: 5px 9px 4px; font-size: 10.5px; }
.b-post header { margin-bottom: 7px; line-height: 1.3; }
.b-post header .sub { display: block; }
.b-post .nm { display: block; font-weight: 800; font-size: 15px; }
.b-post .hd, .b-post .tm { color: var(--ink-faint); font-size: 13px; font-weight: 500; }

.b-post p { margin: 0; font-size: 15.5px; line-height: 1.5; }
.b-post .pimg { margin-top: 10px; border: 2px solid var(--ink); }
.b-post.av { display: grid; grid-template-columns: 40px 1fr; gap: 0 12px; }
.b-post.av .pf { width: 40px; height: 40px; border-width: 2px; }

.b-news { position: relative; padding: 2px 0 2px 18px; max-width: 560px; }
.b-news .vr { position: absolute; left: 0; top: 2px; bottom: 2px; width: 8px; }
.b-news .vr .rule-ph { width: 8px; height: 100%; }
.b-news .out { color: var(--head); display: block; margin-bottom: 6px; }
.b-news h3 { margin: 0; font: 800 19px/1.25 var(--font-ui); letter-spacing: -.01em; }
.b-news p { margin: 6px 0 0; color: var(--ink-muted); font-size: 15px; line-height: 1.5; }
.b-news .tm { color: var(--ink-faint); font-size: 12px; font-weight: 600; margin-top: 6px; }

.b-note { border: 2px solid var(--ink); background: var(--card); padding: 12px 15px; font-size: 15px; }

/* the world is moving */
.b-status { display: flex; align-items: center; gap: 12px; color: var(--ink-muted); font-size: 15px; margin-top: 26px !important; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--rule-sky); animation: dot 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-5px); opacity: 1; } }
.b-status .el { color: var(--ink-faint); font-variant-numeric: tabular-nums; font-size: 13px; }
.b-err { border: 2px solid var(--ink); background: var(--fill-rose); padding: 12px 15px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.enter { animation: enter .42s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.empty-world { text-align: center; padding: 70px 10px 20px; color: var(--ink-muted); }
.empty-world h2 { color: var(--ink); font: 800 24px/1.2 var(--font-ui); margin: 0 0 8px; }

/* --------------------------------------------------------------- the composer: Spade's dialogue box */
.composer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 24px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--paper); transform: translateY(calc(-1 * var(--kb, 0px))); }
.composer::before { content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 22px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(244, 241, 234, 0), var(--paper)); }
.composer .dbox { border-color: var(--ink); border-width: 2px; padding: 25px 56px 9px 15px; flex: 1; min-width: 0; }
.composer .dbox::before { left: 4px; right: 4px; top: 4px; height: 6px; }
.composer .tabs { position: absolute; left: 14px; top: -13px; z-index: 3; display: flex; gap: 6px; align-items: stretch; }
.composer .tabs .tab { position: static; max-width: none; }
.composer textarea { display: block; width: 100%; border: 0; background: transparent; resize: none; padding: 2px 0 4px;
  font-size: 16.5px; line-height: 1.5; max-height: 34vh; min-height: 27px; outline: none; }
.composer textarea::placeholder { color: var(--ink-faint); }
.composer .send { position: absolute; right: 8px; bottom: 8px; width: 40px; height: 40px; background: var(--ink); color: var(--on-spades);
  display: grid; place-items: center; }
.composer .send svg { width: 16px; height: 16px; }
.composer .send[disabled] { opacity: .35; }
.composer .oocbtn { background: var(--card); border: 2px solid var(--ink); padding: 4px 8px 3px; color: var(--ink-muted); font-size: 10.5px; }
.composer .oocbtn[aria-pressed="true"] { background: var(--ink); color: var(--on-spades); }
.composer.ooc .dbox { border-style: dashed; border-color: var(--ink-muted); }
.composer.ooc .dbox::before { background: var(--ink-faint); }
.composer.ooc .tab { background: var(--ink-muted); }
.composer .hint { position: absolute; right: 60px; bottom: 7px; color: var(--ink-faint); font-size: 11px; display: none; }
.composer .busy { display: none; position: absolute; left: 16px; bottom: 10px; }

/* the phone peeking up from behind Spade's box (narrow screens) */
.peek { position: relative; flex: none; order: 2; width: 44px; height: 70px; margin: 0 2px 2px 0; transform: rotate(7deg); transform-origin: 50% 100%;
  transition: transform .3s var(--ease); }
.peek .peek-art, .peek .peek-art svg { position: absolute; inset: 0; width: 44px; height: 70px; display: block; }
.peek .pt { position: absolute; left: 0; right: 0; top: 17px; text-align: center; font: 800 10px/1 var(--font-ui); color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.peek .badge { position: absolute; right: -8px; top: -8px; }
.peek:active { transform: rotate(3deg) translateY(-3px); }
.peek.buzz { animation: buzz .5s linear 2; }
@keyframes buzz { 0%, 100% { transform: rotate(7deg); } 20% { transform: rotate(2deg) translateX(-2px); } 40% { transform: rotate(11deg) translateX(2px); }
  60% { transform: rotate(3deg) translateX(-2px); } 80% { transform: rotate(10deg) translateX(1px); } }
.composer .dbox { z-index: 2; order: 1; }
.composer .cwrap { position: relative; max-width: var(--story-w); margin: 0 auto; display: flex; align-items: flex-end; gap: 10px; }

.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--tint-sky); border: 2px solid var(--ink);
  color: var(--ink); font: 800 11px/16px var(--font-ui); text-align: center; }
.badge.gold { background: var(--gold); }
.badge.dot { min-width: 14px; width: 14px; height: 14px; padding: 0; }

/* --------------------------------------------------------------- the phone */
.phone { position: fixed; z-index: 40; inset: 0; transform: translateY(105%); transition: transform .42s var(--ease); visibility: hidden; }
.phone.open { transform: none; visibility: visible; }
/* drawn at its own size (6px bleed for the crayon edge): stretching it to 100% shrank the body and left the nav icons hanging off */
.phone .body { position: absolute; }
.phone .screen { position: absolute; left: var(--bz-x); right: var(--bz-x); top: var(--bz-t); bottom: var(--bz-b); overflow: hidden;
  background: var(--card); border-radius: var(--sr); display: flex; flex-direction: column; }
.phone { --bz-x: 9px; --bz-t: calc(30px + env(safe-area-inset-top)); --bz-b: calc(46px + env(safe-area-inset-bottom)); --sr: 16px; inset: 4px; }
body.phone-open { overflow: hidden; }
body.phone-open::after { content: ""; position: fixed; inset: 0; z-index: 39; background: var(--paper); }
.phone .sbar { flex: none; height: 30px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between;
  font: 800 12.5px/1 var(--font-ui); font-variant-numeric: tabular-nums; }
.phone .sbar svg { height: 12px; width: auto; }
.phone .sbar .ri { display: flex; align-items: center; gap: 7px; }
.phone .view { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; position: relative; }
.phone .nav { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom)); height: var(--bz-b-raw, 46px);
  display: flex; align-items: center; justify-content: center; gap: 46px; }
.phone .nav button { width: 44px; height: 38px; display: grid; place-items: center; color: var(--card); }
.phone .nav svg { width: 18px; height: 18px; }
.phone .ear { position: absolute; left: 50%; top: calc(11px + env(safe-area-inset-top)); width: 46px; height: 6px; margin-left: -23px; border-radius: 3px; background: var(--paper); opacity: .9; }
.phone .cam { position: absolute; left: calc(50% + 36px); top: calc(10px + env(safe-area-inset-top)); width: 8px; height: 8px; border-radius: 50%; background: var(--paper); opacity: .9; }
.phone.buzz { animation: pbuzz .45s linear 2; }
@keyframes pbuzz { 0%, 100% { translate: 0 0; } 25% { translate: -3px 0; } 50% { translate: 3px 0; } 75% { translate: -2px 0; } }
.scrim { position: fixed; inset: 0; z-index: 39; background: rgba(26, 49, 94, .18); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.on { opacity: 1; pointer-events: auto; }

/* inside the phone */
.app { padding: 6px 16px 26px; }
.app-h { display: flex; align-items: center; gap: 6px; padding: 8px 4px 10px 0; position: sticky; top: 0; z-index: 3; background: var(--card); }
.app-h h1 { margin: 0; font: 800 25px/1.1 var(--font-ui); letter-spacing: -.015em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-h .back { width: 34px; height: 34px; margin-left: -8px; display: grid; place-items: center; flex: none; }
.app-h .back svg { width: 18px; height: 18px; }
.app-h .act { flex: none; }
.app .sect { margin: 20px 0 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.app .sect .lab { color: var(--head); font-size: 11.5px; }
.app .sect .n { color: var(--ink-faint); font-size: 12px; font-weight: 700; }
.app .crule { height: 9px; margin: 4px 0 2px; }
.app p.empty { color: var(--ink-muted); font-size: 15px; margin: 14px 0; line-height: 1.5; }

.home { padding: 18px 18px 22px; display: flex; flex-direction: column; min-height: 100%; }
.home .clock { font: 800 64px/1 var(--font-ui); letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: 6px; white-space: nowrap; }
.home .date { font-weight: 700; font-size: 16px; margin-top: 8px; }
.home .place, .home .wx { color: var(--ink-muted); font-size: 14px; margin-top: 2px; }
.home .apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; margin-top: 26px; }
.appic { display: flex; flex-direction: column; align-items: center; gap: 7px; position: relative; }
.appic svg { width: 58px; height: 58px; }
.appic span { font-size: 12px; font-weight: 700; line-height: 1.1; text-align: center; }
.appic .badge { position: absolute; top: -6px; right: calc(50% - 36px); }
.home .latest { margin-top: auto; padding-top: 18px; }
.upnext { margin-top: 26px; }
.upnext .lab { font-size: 11px; margin-bottom: 4px; }
.upnext .un { display: grid; grid-template-columns: 14px 1fr; gap: 8px; width: 100%; text-align: left; padding: 7px 0; font-size: 14px; font-weight: 600; line-height: 1.35; }
.upnext .un + .un { border-top: 1.5px solid var(--tint-ink); }
.upnext .dot { width: 10px; height: 10px; border: 2px solid var(--ink); border-radius: 50%; margin-top: 4px; }
.upnext .dot.rev { border-color: var(--rule-sky); background: var(--tint-sky); }
.upnext .when { color: var(--ink-faint); font-weight: 600; }
.callrow { display: grid; grid-template-columns: 38px 1fr; gap: 4px 10px; align-items: center; background: var(--card); border: 2px solid var(--ink); padding: 9px 11px; }
.callrow .ic { width: 38px; height: 38px; animation: ring 1.1s ease-in-out infinite; }
.callrow .ic svg { width: 38px; height: 38px; }
.callrow .nn { font-weight: 800; font-size: 14px; }
.callrow .nx { color: var(--ink-muted); font-size: 12px; }
.callrow .callbtns { grid-column: 1 / -1; margin-top: 6px; justify-content: stretch; }
.callrow .callbtns .btn { flex: 1; justify-content: center; padding: 9px 10px; }
.notif { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left;
  background: var(--card); border: 2px solid var(--ink); padding: 9px 11px; margin-top: 8px; }
.notif .pf { width: 34px; height: 34px; border-width: 2px; }
.notif .nt { min-width: 0; }
.notif .nn { display: block; font-weight: 800; font-size: 13.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif .nx { display: block; font-size: 13px; line-height: 1.35; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif .tm { color: var(--ink-faint); font-size: 11.5px; font-weight: 700; align-self: start; }

.lock { padding: 26px 18px 18px; display: flex; flex-direction: column; min-height: 100%; cursor: pointer; }
.lock .clock { font: 800 70px/1 var(--font-ui); letter-spacing: -.035em; font-variant-numeric: tabular-nums; text-align: center; margin-top: 22px; white-space: nowrap; }
.lock .clock:not(:empty) { overflow: hidden; text-overflow: clip; }
.lock .date { text-align: center; font-weight: 700; font-size: 15.5px; margin-top: 8px; }
.lock .place, .lock .wx { text-align: center; color: var(--ink-muted); font-size: 13.5px; margin-top: 2px; }
.lock .notifs { margin-top: 26px; }
.lock .up { margin-top: auto; padding-top: 18px; text-align: center; color: var(--ink-faint); }

/* rows in lists */
.rowlist { list-style: none; margin: 0; padding: 0; }
.rowlist > li + li { border-top: 1.5px solid var(--tint-ink); }
.prow { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 11px 0; }
.prow .pf { width: 46px; height: 46px; border-width: 2px; }
.prow > span:nth-child(2) { min-width: 0; }
.prow .pn { display: block; font-weight: 800; font-size: 15.5px; line-height: 1.25; }
.prow .ps { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-muted); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .tm { color: var(--ink-faint); font-size: 11.5px; font-weight: 700; align-self: start; padding-top: 3px; text-align: right; }
.prow .badge { margin-top: 6px; margin-left: auto; display: block; width: fit-content; }
.seg { display: inline-flex; border: 2px solid var(--ink); margin: 4px 0 6px; }
.seg button { padding: 6px 12px 5px; font: 800 11.5px/1 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-spades); }

/* bond meter: bars rising; the person's tint, rule, color; gold only for the last */
.meter { display: flex; align-items: flex-end; gap: 4px; }
.meter svg { display: block; }
.meter-l { display: flex; justify-content: space-between; margin-top: 5px; color: var(--ink-faint); font: 700 10.5px/1 var(--font-ui); }
.stage-word { font: 800 12px/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; }

/* contact card */
.ccard .big { position: relative; width: 100%; aspect-ratio: 1; border: 2.5px solid var(--p-rule); background: var(--card); overflow: hidden; margin-top: 4px; }
.ccard .big img { width: 100%; height: 100%; object-fit: cover; }
.ccard .big .sil { width: 100%; height: 100%; --sil: var(--tint-ink); }
.ccard.heard .big .sil { --sil: var(--p-tint); }
.backlab { font-weight: 700; font-size: 15px; color: var(--ink); }
.ccard .big .tab { position: absolute; left: 12px; bottom: 12px; background: var(--p); color: var(--on-p); padding: 6px 10px 5px; }
.ccard h2 { margin: 14px 0 0; font: 800 26px/1.12 var(--font-ui); letter-spacing: -.015em; }
.ccard .role { color: var(--ink-muted); font-size: 15px; margin-top: 3px; }
.ccard .acts { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.ccard .bond { margin-top: 18px; }
.alts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.alts button { width: 52px; height: 52px; border: 2px solid var(--tint-ink); overflow: hidden; position: relative; }
.alts button[aria-pressed="true"] { border-color: var(--ink); }
.alts button.earned[aria-pressed="true"] { border-color: var(--gold); }
.alts img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { position: relative; padding: 9px 0 9px 20px; font-size: 15px; line-height: 1.45; }
.facts li + li { border-top: 1.5px solid var(--tint-ink); }
.facts li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 8px; height: 8px; background: var(--p-rule, var(--rule-sky)); border-radius: 50%; }
.facts .how { display: block; color: var(--ink-faint); font-size: 12.5px; margin-top: 2px; }

/* messages */
.thread-app { min-height: 100%; display: flex; flex-direction: column; }
.thread { flex: 1; padding: 4px 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.thread .msg { display: flex; flex-direction: column; align-items: flex-start; }
.thread .msg.out { align-items: flex-end; }
.thread .bub { max-width: 82%; font-size: 15.5px; }
.thread .msg.out .bub { background: var(--card); }
.thread .stamp { align-self: center; color: var(--ink-faint); font: 700 11px/1 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; margin: 14px 0 6px; }
.thread .meta { color: var(--ink-faint); font-size: 11px; font-weight: 600; margin: 3px 6px 6px; }
.mcomp { position: sticky; bottom: 0; background: var(--card); border-top: 2px solid var(--ink); padding: 8px 10px; display: flex; gap: 8px; align-items: flex-end; }
.mcomp textarea { flex: 1; border: 2px solid var(--ink); border-radius: 16px; background: var(--card); resize: none; padding: 7px 12px; font-size: 16px; line-height: 1.4; max-height: 120px; min-height: 38px; outline: none; }
.mcomp button { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--on-spades); display: grid; place-items: center; }
.mcomp button svg { width: 15px; height: 15px; }
.mcomp button[disabled] { opacity: .35; }
.thread-h .pf { width: 32px; height: 32px; border-width: 2px; flex: none; }
.thread-h h1 { font-size: 19px !important; }
.nonum { margin: 10px 14px; color: var(--ink-muted); font-size: 14px; }

/* notes, reminders */
.paper-note { background: var(--card); }
.topic { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 0; }
.topic + .topic { border-top: 1.5px solid var(--tint-ink); }
.topic .tid { font: 700 12px/1 var(--font-mono); color: var(--ink-muted); padding: 4px 6px; border: 1.5px solid var(--tint-ink); }
.topic.mastered .tid { border-color: var(--gold); background: var(--fill-gold); color: var(--gold-ink); }
.topic .tt { font-weight: 700; font-size: 15px; line-height: 1.3; }
.topic .tn { display: block; font-weight: 400; color: var(--ink-muted); font-size: 13px; margin-top: 2px; }
.topic .sc { font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums; text-align: right; }
.topic .sc small { display: block; color: var(--ink-faint); font-weight: 600; font-size: 11px; }
.topic .due { font-size: 12px; font-weight: 700; color: var(--ink-muted); text-align: right; }
.topic .due.now { color: var(--ink); }
.scbar { width: 54px; height: 9px; margin-top: 4px; margin-left: auto; }
.chap { margin-top: 14px; font-weight: 800; font-size: 13.5px; color: var(--ink-muted); }
.probs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pst { font: 700 11px/1 var(--font-mono); padding: 4px 6px; border: 1.5px solid var(--tint-ink); color: var(--ink-muted); background: var(--card); }
.pst.correct { border-color: var(--ink); color: var(--ink); }
.pst.wrong { text-decoration: line-through; }
.b-prob .ptitle { letter-spacing: .06em; text-transform: none; font-weight: 700; color: var(--ink-muted); }
.quest { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 11px 0; }
.quest + .quest { border-top: 1.5px solid var(--tint-ink); }
.quest .box { width: 20px; height: 20px; border: 2px solid var(--ink); border-radius: 50%; margin-top: 1px; display: grid; place-items: center; }
.quest.done .box { background: var(--ink); }
.quest.done .box svg { width: 11px; height: 11px; }
.quest.done .qt { color: var(--ink-muted); }
.quest .qt { font-weight: 700; font-size: 15px; line-height: 1.35; }
.quest .qx { color: var(--ink-muted); font-size: 13.5px; line-height: 1.45; margin-top: 2px; }
.quest .qm { color: var(--ink-faint); font-size: 12px; font-weight: 600; margin-top: 3px; }
.rumor { padding: 12px 0 12px 16px; position: relative; }
.rumor + .rumor { border-top: 1.5px solid var(--tint-ink); }
.rumor::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; background: var(--rule-sky); }
.rumor .rt { font-size: 15px; line-height: 1.45; }
.rumor .rm { margin-top: 5px; color: var(--ink-faint); font-size: 12.5px; font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.rumor .rm .chip { font-size: 11.5px; padding: 1px 6px; }

/* photos */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ph { display: block; width: 100%; text-align: left; }
.ph .fr { border: 2.5px solid var(--gold); background: var(--fill-gold); padding: 5px; }
.ph .fr img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1.5px solid var(--ink); }
.ph .cap { font-size: 12.5px; font-weight: 700; margin-top: 6px; line-height: 1.3; }
.ph .dt { font-size: 11px; color: var(--ink-faint); font-weight: 600; }
.ph.port .fr { border-color: var(--p-rule); background: var(--p-fill); }

/* map */
.mapwrap { position: relative; margin: 2px -4px 0; }
.mapwrap svg { width: 100%; height: auto; display: block; }
.pmap { position: relative; display: block; width: 100%; padding: 0; line-height: 0; cursor: zoom-in; }
.pmap img { width: 100%; height: auto; aspect-ratio: 3 / 2; display: block; background: var(--card); }
.pmap .ml { position: absolute; transform: translate(-50%, -50%); padding: 2px 4px 1px; white-space: nowrap; pointer-events: none;
  font: 800 8.5px/1.1 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--ink);
  background: color-mix(in srgb, var(--card) 84%, transparent); }
.pmap .ml.here { background: var(--ink); color: var(--on-spades); }
.pmap .ml.under { transform: translate(-50%, 9px); }
.pmap .ml.c { font-weight: 700; letter-spacing: .02em; text-transform: none; font-size: 9px; transform: translate(-50%, 4px); }
.pmap .youpin { position: absolute; width: 0; height: 0; pointer-events: none; }
.pmap .youpin i { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--ink); box-sizing: border-box; }
.pmap .youpin b { position: absolute; left: 9px; top: -9px; padding: 3px 5px 2px; white-space: nowrap;
  font: 800 9px/1.1 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; background: var(--ink); color: var(--on-spades); }
@media (min-width: 700px) { .pmap .ml { font-size: 9.5px; } }
.map-lab { font: 800 11px var(--font-ui); letter-spacing: .12em; text-transform: uppercase; fill: var(--ink); }
.pmap .pmap-go { position: absolute; right: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px 4px;
  background: var(--ink); color: var(--on-spades); font: 800 9.5px/1 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; }
.pmap .pmap-go svg { width: 11px; height: 11px; }

/* --------------------------------------------------------------- the map, full screen (mapview.js) */
body.map-open { overflow: hidden; }
.mapfull { position: fixed; inset: 0; z-index: 70; background: var(--paper); display: none; overflow: hidden; }
.mapfull.on { display: block; }
.mf-vp { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; outline: none; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; }
.mf-vp.drag { cursor: grabbing; }
.mf-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.mf-stage img { width: 100%; height: 100%; display: block; max-width: none; pointer-events: none; -webkit-user-drag: none; }
.mf-marks { position: absolute; inset: 0; pointer-events: none; }
.mf-marks .mk { position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; color: var(--ink); pointer-events: auto; will-change: transform; }
.mf-marks .mk.hid { visibility: hidden; }
.mf-marks .mk > span { position: absolute; left: 0; top: 0; white-space: nowrap; padding: 4px 6px 3px;
  background: color-mix(in srgb, var(--card) 86%, transparent); }
.mf-marks .mk.k > span { transform: translate(-50%, -50%); font: 800 11.5px/1.1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; }
.mf-marks .mk.k.under > span { transform: translate(-50%, 15px); }
.mf-marks .mk.k:not(.t-ink) > span { box-shadow: inset 0 -3px 0 var(--p); }
.mf-marks .mk.c > i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink);
  box-shadow: 0 0 0 2px var(--card); }
.mf-marks .mk.c.cap > i { left: -5px; top: -5px; width: 10px; height: 10px; background: var(--card); border: 2.5px solid var(--ink); box-shadow: none; }
.mf-marks .mk.c > span { left: 8px; transform: translateY(-50%); font: 700 12.5px/1.1 var(--font-ui); }
.mf-marks .mk.c:not(.known) > span { color: var(--ink-muted); }
.mf-marks .mk.you > i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--card);
  border: 3.5px solid var(--ink); }
.mf-marks .mk.you > span { left: 11px; transform: translateY(-50%); background: var(--ink); color: var(--on-spades);
  font: 800 10.5px/1.1 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; }
.mf-marks .mk.on > span { background: var(--ink); color: var(--on-spades); box-shadow: none; }
.mf-marks .mk:focus-visible > span { outline: 2px solid var(--ink); outline-offset: 2px; }
.mf-ctl { position: absolute; z-index: 3; top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right));
  display: flex; flex-direction: column; gap: 9px; }
.mf-ctl button { width: 42px; height: 42px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); display: grid; place-items: center;
  box-shadow: 3px 3px 0 var(--ink); }
.mf-ctl button svg { width: 16px; height: 16px; }
.mf-ctl button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.mf-ctl button[disabled] { opacity: .35; box-shadow: none; cursor: default; }
.mf-ctl .x { margin-bottom: 8px; }
.mf-ctl .me i { width: 15px; height: 15px; border-radius: 50%; border: 3.5px solid var(--ink); background: var(--card); }
.mf-hint { position: absolute; z-index: 2; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: var(--on-spades); padding: 8px 12px 7px; font: 700 12.5px/1.2 var(--font-ui); white-space: nowrap;
  pointer-events: none; transition: opacity .35s; }
.mf-hint.off { opacity: 0; }
.mf-card { position: absolute; z-index: 4; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); max-height: 48%;
  overflow-y: auto; overscroll-behavior: contain; padding-top: 15px; }
.mf-card .mc { padding: 28px 16px 14px; }
.mf-card .mc .tab { font-size: 11.5px; }
.mc-x { position: absolute; right: 6px; top: 15px; width: 36px; height: 36px; display: grid; place-items: center; color: var(--ink-muted); }
.mc-x svg { width: 14px; height: 14px; }
.mc-body { font-size: 15px; line-height: 1.5; }
.mc-body p { margin: 0; }
.mc-meta { color: var(--ink-muted); font-size: 13.5px; font-weight: 600; padding-right: 26px; }
.mc-meta .linkbtn { color: var(--ink); font-size: inherit; }
.mc-blurb { margin-top: 8px !important; }
.mc-standing { margin-top: 8px !important; color: var(--ink-muted); font-size: 14px; }
.mc-standing b { color: var(--ink); }
.mc-here { display: flex; align-items: center; gap: 8px; margin-top: 8px !important; font-weight: 700; }
.mc-here i { flex: none; width: 13px; height: 13px; border-radius: 50%; border: 3.5px solid var(--ink); background: var(--card); }
.mc-sect { margin: 14px 0 4px; display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; }
.mc-sect .lab { color: var(--head); font-size: 11px; }
.mc-sub { color: var(--ink-faint); font-size: 12.5px; font-weight: 600; }
.mc-pl, .mc-modes { list-style: none; margin: 0; padding: 0; }
.mc-pl li { padding: 7px 0 6px; border-top: 1.5px solid var(--tint-sky); }
.mc-pl li:first-child { border-top: 0; padding-top: 2px; }
.mc-pl b { display: inline; }
.mc-pl em { font-style: normal; color: var(--ink-faint); font-size: 12.5px; margin-left: 6px; }
.mc-pl span { display: block; color: var(--ink-muted); font-size: 14px; }
.mc-leg { font-weight: 800; font-size: 13.5px; margin: 8px 0 2px; }
.mc-modes li { display: grid; grid-template-columns: 76px 1fr; gap: 8px; padding: 3px 0; font-size: 14px; }
.mc-modes b { font: 800 10.5px/1.9 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; }
.mc-none { color: var(--ink-muted); font-size: 14px; }
@media (min-width: 760px) {
  .mf-card { left: 20px; right: auto; top: 18px; bottom: auto; width: 380px; max-height: calc(100% - 36px); }
  .mf-hint { font-size: 13px; }
}
.map-pl { font: 700 9.5px var(--font-ui); fill: var(--ink-muted); }
.map-you { font: 800 9px var(--font-ui); letter-spacing: .12em; fill: var(--on-spades); }
.ctry { padding: 12px 0; }
.ctry + .ctry { border-top: 1.5px solid var(--tint-ink); }
.ctry .cn { display: flex; align-items: center; gap: 8px; }
.ctry .cn b { font-size: 16px; }
.ctry .ck { color: var(--ink-faint); font-size: 12px; font-weight: 700; }
.ctry .cb { color: var(--ink-muted); font-size: 13.5px; margin-top: 3px; line-height: 1.45; }
.ctry .standing { font-size: 12.5px; margin-top: 5px; color: var(--ink-muted); }
.ctry .standing b { color: var(--ink); }
.plist { list-style: none; padding: 0; margin: 8px 0 0; }
.plist li { display: grid; grid-template-columns: 14px 1fr; gap: 8px; padding: 5px 0; font-size: 14px; line-height: 1.4; }
.plist li i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); margin-top: 5px; }
.plist li.here i { background: var(--ink); }
.plist li b { font-weight: 700; }
.plist li span { display: block; color: var(--ink-muted); font-size: 12.5px; }
.plist .pimg { margin-top: 6px; border: 2px solid var(--ink); }

.others li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 14.5px; }
.others .on { font-weight: 700; }
.others .ok { color: var(--ink-faint); font-size: 12.5px; text-align: right; }

/* wallet */
.money { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 6px 0 2px; }
.money div { font: 800 34px/1.05 var(--font-ui); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.money small { font-size: 14px; font-weight: 700; color: var(--ink-muted); letter-spacing: 0; margin-left: 4px; }
.inv { list-style: none; padding: 0; margin: 0; }
.inv li { padding: 9px 0; font-size: 15px; }
.inv li + li { border-top: 1.5px solid var(--tint-ink); }
.signout { margin-top: 26px; font-size: 13px; color: var(--ink-faint); text-decoration: underline; text-underline-offset: 3px; }

/* feed */
.feedlist > * + * { margin-top: 12px; }
.feedlist .b-post { max-width: none; }
.feedlist .b-news { padding-top: 4px; padding-bottom: 4px; }
.follow { display: flex; flex-wrap: wrap; gap: 6px; }
.follow span { border: 2px solid var(--ink); padding: 3px 8px; font-size: 12.5px; font-weight: 700; background: var(--card); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 60; background: var(--paper); display: none; align-items: center; justify-content: center;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
.lightbox.on { display: flex; }
.lightbox figure { margin: 0; max-width: min(960px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox .fr { border: 3px solid var(--gold); background: var(--fill-gold); padding: 10px; max-height: calc(100dvh - 110px); display: flex; }
.lightbox img { max-height: calc(100dvh - 134px); width: auto; border: 2px solid var(--ink); object-fit: contain; }
.lightbox figcaption { margin-top: 12px; font-weight: 700; text-align: center; }
.lightbox .x { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 14px; width: 42px; height: 42px; border: 2px solid var(--ink);
  background: var(--card); display: grid; place-items: center; }
.lightbox .x svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------- login: her phone, locked */
.login { position: fixed; inset: 0; display: grid; place-items: center; }
.login .phone { position: relative; transform: none; visibility: visible; inset: auto; width: 100%; height: 100%; z-index: 1; }
.login .lock { cursor: default; }
.login form { margin-top: 0; padding-bottom: 8px; }
.login .lock { padding-bottom: 26px; }
.login label { display: block; text-align: center; margin-bottom: 10px; }
.login input { display: block; width: 100%; border: 2px solid var(--ink); background: var(--card); padding: 12px 14px; font-size: 17px;
  text-align: center; letter-spacing: .2em; outline: none; border-radius: 0; }
.login input:focus { box-shadow: 3px 3px 0 var(--rule-sky); }
.login .btn { width: 100%; justify-content: center; margin-top: 10px; padding: 13px; }
.login .err { min-height: 20px; margin-top: 10px; text-align: center; color: var(--ink); font-size: 13.5px; font-weight: 600; }
.login .shake { animation: shake .4s linear; }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }


/* incoming call, on the phone */
.incall { text-align: center; margin-top: 30px; }
.incall .ic { position: relative; width: 84px; height: 84px; margin: 18px auto 12px; animation: ring 1.1s ease-in-out infinite; }
.incall .ic svg { width: 84px; height: 84px; }
.incall .ic::before, .incall .ic::after { content: ""; position: absolute; inset: 0; border: 2.5px solid var(--p-rule); border-radius: 50%; animation: wave 1.6s ease-out infinite; }
.incall .ic::after { animation-delay: .8s; }
.incall .nm { font: 800 22px/1.2 var(--font-ui); }
.callbtns { display: flex; gap: 8px; justify-content: center; margin-top: 18px; pointer-events: auto; }
.latest .incall { margin-top: 0; }
.note-row .nic { display: block; width: 46px; height: 46px; }
.note-row .nic svg { width: 46px; height: 46px; }
.thread-h { gap: 10px !important; }

/* her wallpaper */
.wallwrap { flex: 1; display: grid; place-items: center; min-height: 120px; padding: 18px 0; }
.wallwrap .wall { width: min(46%, 170px); height: auto; }

/* login */
.login .pass .lab { font-size: 11.5px; }
@media (max-width: 1059px) {
  .login .phone { position: fixed; inset: 4px; }
}

/* --------------------------------------------------------------- wide screens: the story fills the page, the phone lies beside it */
@media (min-width: 1060px) {
  body { font-size: 17px; }
  .stage { display: grid; grid-template-columns: minmax(0, var(--story-w)) 360px; gap: 72px; justify-content: center; padding: 0 32px; }
  .story { margin: 0; padding: 40px 0 0; max-width: none; min-height: 100vh; display: flex; flex-direction: column; }
  .story .feed { flex: 1; padding-bottom: 30px; } /* the last block clears the fade above Spade's box */
  .b-narr, .dbox .say, .b-prob .stmt { font-size: 17.5px; }
  .b-scene h2 { font-size: 30px; }
  .b-line { display: flex; gap: 16px; align-items: flex-start; margin-top: 26px !important; }
  .b-line .pf { position: relative; left: auto; top: 0; width: 92px; height: 92px; }
  .b-line .dbox { flex: 1; min-width: 0; padding-top: 31px; }
  .b-line .dbox .tab { left: 20px; }
  .b-me, .b-answer, .b-ooc.mine { margin-left: 108px; }
  .composer { position: sticky; bottom: 0; left: auto; right: auto; padding: 36px 0 22px; transform: none; }
  .composer .hint { display: block; }
  .peek { display: none; }
  .dock { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; justify-content: center; }
  .phone { position: relative; inset: auto; transform: rotate(-4deg) translateY(12px); visibility: visible; width: 316px;
    height: min(650px, calc(100vh - 90px)); transition: transform .45s var(--ease), filter .3s; filter: drop-shadow(5px 6px 0 rgba(26, 49, 94, .14));
    --bz-x: 11px; --bz-t: 38px; --bz-b: 44px; --sr: 18px; --bz-b-raw: 44px; cursor: pointer; }
  .phone.open { transform: rotate(0) translateY(-4px); filter: drop-shadow(7px 9px 0 rgba(26, 49, 94, .16)); cursor: default; }
  .phone .ear { top: 15px; } .phone .cam { top: 14px; }
  .phone .nav { bottom: 0; }
  .phone:not(.open) .screen { pointer-events: none; }
  .phone:not(.open) .callbtns { pointer-events: auto; }
  body.phone-open::after { display: none; }
  .login .phone { width: 330px; height: min(680px, calc(100vh - 60px)); }
  .phone:not(.open):hover { transform: rotate(-2.5deg) translateY(4px); }
  .scrim { display: none; }
  .demo-mark { top: 14px; left: 18px; }
}
@media (min-width: 1060px) and (max-height: 760px) {
  .phone { width: 290px; }
}
@media (max-width: 1059px) {
  .dock { position: static; }
}
@media (max-width: 380px) {
  .home .apps { gap: 16px 4px; }
  .appic svg { width: 52px; height: 52px; }
  .home .clock { font-size: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.clock.nostart { font-size: 46px !important; letter-spacing: -.02em; }
/* small frames: lean in on the face (portraits are busts with paper above the head) */
.b-line .pf img, .prow .pf img, .notif .pf img, .thread-h .pf img, .b-post .pf img, .hp .pf img, .alts img {
  transform: scale(1.42); transform-origin: 50% 30%; }
@media (min-width: 1060px) { .b-line .pf img { transform: scale(1.2); transform-origin: 50% 26%; } }
