/* Senior Games player app: look B with the Field Kit exceptions (design/README.md).
   Tokens only: every color, size and space comes from ../design/tokens.css. */

:root {
  --col: 32rem;
  --fs-title: calc(var(--fs-lead) * 1.5);
  --fs-moment: calc(var(--fs-lead) * 1.7);
  --fs-row: calc(var(--fs-lead) * 1.2);
  --fs-parcel: calc(var(--fs-lead) * 2.6);
  --fs-seal: calc(var(--fs-lead) * 1.7);
  --btn: 3.5rem;
  --seal-soft: color-mix(in srgb, var(--bg) 12%, var(--text));
  --seal-label: color-mix(in srgb, var(--bg) 78%, var(--text));
  --ph1: color-mix(in srgb, var(--text) 6%, var(--bg));
  --ph2: color-mix(in srgb, var(--text) 14%, var(--bg));
  --ph3: color-mix(in srgb, var(--text) 26%, var(--bg));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--fs-body) / 1.4 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1, h2, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; border-radius: 0; }
button { background: none; border: 0; padding: 0 var(--space-4); min-height: var(--tap); cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: 0.55; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
html.sheet-open, html.sheet-open body { overflow: hidden; }

/* ---------- shell ---------- */
#boot { margin: 0; padding: var(--space-6) var(--gutter); font-weight: 700; font-size: var(--fs-brand); }
#boot span { display: block; margin-top: var(--space-2); font-size: var(--fs-caption); font-weight: 400; color: var(--quiet); }
#app:not([hidden]) ~ #boot { display: none; }
#app {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh; height: 100dvh;
  max-width: var(--col); margin: 0 auto; border-inline: var(--hairline);
}
.top { display: flex; justify-content: space-between; align-items: center; padding: var(--space-1) var(--gutter); border-bottom: var(--hairline); }
.top .brand { display: flex; align-items: baseline; gap: var(--space-3); }
.top .title { font-size: var(--fs-brand); font-weight: 700; letter-spacing: -0.01em; }
.top .grade { font-size: var(--fs-caption); color: var(--quiet); }
/* Which backend this page uses: a quiet label. Set by api/backend.js. */
.mark { margin-left: auto; margin-right: var(--space-3); font-size: var(--fs-caption); color: var(--quiet); text-transform: uppercase; letter-spacing: 0.04em; }
#view { overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--gutter); }
.screen { padding-bottom: var(--space-5); }
#tabs { display: flex; border-top: var(--hairline); padding: 0 var(--space-3) env(safe-area-inset-bottom); }
#tabs a {
  flex: 1; min-height: var(--btn); display: grid; place-items: center; position: relative;
  font-size: var(--fs-small); color: var(--quiet); text-decoration: none;
}
#tabs a[aria-current="page"] { color: var(--text); font-weight: 700; }
#tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 18%; right: 18%; top: -1px; height: 2px; background: var(--text); }

/* ---------- type ---------- */
.label { font-size: var(--fs-label); font-weight: var(--fw-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--quiet); }
.note { font-size: var(--fs-fine); color: var(--quiet); }
.lead { font-size: var(--fs-lead); line-height: 1.3; margin-top: var(--space-4); }
.big { font-size: var(--fs-hero); font-weight: var(--fw-hero); letter-spacing: var(--ls-hero); line-height: var(--lh-hero); margin-top: var(--space-4); overflow-wrap: anywhere; }
.quiet { color: var(--quiet); }
.padded { padding: var(--space-4) 0; }
.error { color: var(--red); font-size: var(--fs-small); font-weight: 600; margin-top: var(--space-3); }
.pagehead { padding-top: var(--space-5); }
.pagehead h1 { font-size: var(--fs-title); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-top: var(--space-1); overflow-wrap: anywhere; }
.pagehead .note { margin-top: var(--space-2); }

/* ---------- buttons ---------- */
.solid {
  display: flex; justify-content: center; align-items: center; width: 100%; min-height: var(--btn);
  background: var(--red); color: var(--on-red); font-size: var(--fs-lead); font-weight: 700; letter-spacing: -0.01em; text-decoration: none; text-align: center;
}
.dark {
  display: flex; justify-content: center; align-items: center; width: 100%; min-height: var(--btn);
  background: var(--text); color: var(--bg); font-size: var(--fs-lead); font-weight: 700; letter-spacing: -0.01em;
}
.outline {
  display: flex; justify-content: center; align-items: center; width: 100%; min-height: var(--btn);
  border: 2px solid var(--text); font-size: var(--fs-lead); font-weight: 700; letter-spacing: -0.01em;
}
.twin { display: grid; gap: var(--space-3); margin-top: var(--space-5); }
.ghostbtn { display: block; width: 100%; text-align: left; padding: 0; color: var(--quiet); font-size: var(--fs-small); text-decoration: underline; text-underline-offset: 4px; }
.textbtn { padding: 0 var(--space-3); color: var(--text); font-size: var(--fs-small); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.closebtn { color: var(--text); font-size: var(--fs-small); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; padding-inline: 0 0; padding-left: var(--space-3); }
.act { margin-top: var(--space-4); }
.act .note { margin-top: var(--space-2); }
.act.sticky { position: sticky; bottom: 0; background: var(--bg); padding-block: var(--space-3); margin-bottom: calc(var(--space-3) * -1); }
.rowbtn {
  display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: var(--btn); margin-top: var(--space-4);
  padding: 0; border-top: var(--hairline); border-bottom: var(--hairline); text-align: left; font-weight: 700;
}
.rowbtn .go { color: var(--text); font-weight: 700; }
.dot { display: inline-block; width: 9px; height: 9px; background: var(--red); margin-right: var(--space-3); }

/* ---------- home ---------- */
.staterow { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--space-4); }
.staterow .state { color: var(--text); font-size: var(--fs-caption); }
.staterow .state.quiet { color: var(--quiet); }
.inout .bar { display: flex; gap: var(--space-1); height: 10px; margin-top: var(--space-3); }
.inout .bar i { display: block; height: 100%; }
.inout .bar .in { background: var(--text); }
.inout .bar .out { background: var(--bar); }
.inout .nums { display: flex; justify-content: space-between; align-items: baseline; margin-top: var(--space-2); }
.inout .nums b { font-size: var(--fs-stat); font-weight: var(--fw-stat); letter-spacing: var(--ls-stat); line-height: 1; font-variant-numeric: tabular-nums; }
.inout .nums span { font-size: var(--fs-small); color: var(--quiet); margin-left: var(--space-2); }
.inout .nums div:last-child { text-align: right; }
.inout .nums div:last-child b { color: var(--quiet); }
.inout.is-out .bar .in { background: var(--bar); }
.inout.is-out .nums b { color: var(--quiet); }

.sealwrap { margin-top: var(--space-5); }
.seal {
  display: grid; position: relative; width: 100%; min-height: 13rem; padding: 0; overflow: hidden; text-align: left;
  background: var(--text); color: var(--bg);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pan-y;
}
.seal > * { grid-area: 1 / 1; }
.seal .flap {
  align-self: start; height: 62%; background: var(--seal-soft); clip-path: polygon(0 0, 100% 0, 50% 100%);
  transition: transform 0.35s ease, opacity 0.25s;
}
.seal .fillbar { align-self: end; height: 4px; background: var(--bg); transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease-out, opacity 0.3s; pointer-events: none; }
.seal .stamp { place-self: start center; margin-top: 30%; width: 32px; height: 32px; background: var(--bg); }
.seal .closed { display: flex; flex-direction: column; justify-content: flex-end; padding: var(--space-4) var(--gutter); }
.seal .closed .label { color: var(--seal-label); }
.seal .closed strong { font-size: var(--fs-lead); font-weight: 700; letter-spacing: -0.01em; margin-top: var(--space-1); }
.seal .opened { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-4) var(--gutter); }
.seal .opened .who { min-width: 0; flex: 1; display: block; }
.seal .opened .label { display: block; color: var(--seal-label); }
.seal .opened .nm { display: block; margin-top: var(--space-2); font-size: var(--fs-seal); line-height: 1.04; font-weight: 700; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.seal .opened .nm span { display: block; }
.seal .opened .rm { display: block; margin-top: var(--space-3); font-size: var(--fs-small); }
.seal .ph {
  flex: none; width: 84px; height: 84px; display: grid; place-items: center; position: relative;
  background: var(--ph2); color: var(--text); font-weight: 700; font-size: var(--fs-lead); letter-spacing: 0.02em;
}
.seal .ph small { position: absolute; left: 0; right: 0; top: 100%; margin-top: var(--space-1); text-align: center; font-size: var(--fs-fine); font-weight: 400; color: var(--bg); letter-spacing: 0; }
.seal:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.seal.is-open .flap { transform: translateY(-100%); opacity: 0; transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out; }
.seal .stamp { transition: opacity 0.4s; }
.seal.is-open .stamp { opacity: 0; }
/* The suspense: the bar fills over 1.2 s while the panel trembles, a little more near the end, then the flap lifts and the name rises. */
.seal.is-filling .fillbar { transform: scaleX(1); transition: transform 1.2s linear; }
.seal.is-filling { animation: tremble 1.2s linear both; }
.seal.is-open { animation: none; }
.seal.is-open .fillbar { opacity: 0; }
.seal.is-shown .opened .who, .seal.is-shown .opened .ph, .seal.is-shown .opened .tphoto { animation: rise 0.5s ease-out both; }
.seal .tphoto { flex: none; width: 96px; height: 96px; object-fit: cover; background: var(--ph2); }
.sealhint { display: flex; justify-content: space-between; align-items: center; margin-top: var(--space-1); }
.waitrow { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); margin-top: var(--space-4); padding: var(--space-4) 0; border-top: var(--hairline); border-bottom: var(--hairline); }
.waitrow strong { font-size: var(--fs-small); }
.dropstrip {
  display: flex; justify-content: space-between; align-items: center; min-height: var(--btn); margin-top: var(--space-4); padding: 0 var(--space-4);
  background: var(--drop-fill); color: var(--drop-ink); font-weight: 700; text-decoration: none;
}
.dropstrip .pulse { display: inline-block; width: 10px; height: 10px; background: var(--drop-ink); margin-right: var(--space-3); }
.dropstrip.live .pulse { animation: pulse 1.6s ease-in-out infinite; }
.banner { display: flex; flex-direction: column; gap: var(--space-1); margin-top: var(--space-4); padding: var(--space-3) 0; border-top: 2px solid var(--text); border-bottom: var(--hairline); }
.banner strong { font-size: var(--fs-lead); }
.ruled { margin-top: var(--space-5); }
.ruled li { padding: var(--space-3) 0; border-top: var(--hairline); line-height: 1.35; }
.ruled li:last-child { border-bottom: var(--hairline); }
.ruled:not(.plain) li { display: grid; grid-template-columns: 6rem 1fr; gap: var(--space-3); }
.ruled-stat { margin-top: var(--space-6); padding-top: var(--space-4); border-top: var(--hairline); display: flex; align-items: baseline; gap: var(--space-3); }
.ruled-stat b { font-size: var(--fs-hero); font-weight: var(--fw-hero); letter-spacing: var(--ls-hero); }
.ruled-stat span { color: var(--quiet); }

/* ---------- board ---------- */
.edition { margin-top: var(--space-5); }
.edition ul { margin-top: var(--space-2); }
.edition li { padding: var(--space-3) 0; border-top: var(--hairline); line-height: 1.35; }
.edition li:last-child { border-bottom: var(--hairline); }
.segs { display: flex; margin-top: var(--space-5); border: 1px solid var(--text); }
.segs button { flex: 1; min-height: var(--tap); padding: 0 var(--space-2); font-weight: 600; font-size: var(--fs-small); }
.segs button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.podium { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin-top: var(--space-4); border-top: var(--hairline); border-bottom: var(--hairline); }
.podium li { padding: var(--space-3) 0 var(--space-3) var(--space-3); border-left: var(--hairline); min-width: 0; }
.podium li:first-child { border-left: 0; padding-left: 0; }
.podium .rk { font-size: var(--fs-fine); color: var(--quiet); }
.podium b { display: block; margin-top: var(--space-1); font-size: var(--fs-hero); line-height: 1; font-weight: 700; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.podium .nm { margin-top: var(--space-1); font-size: var(--fs-small); font-weight: 600; }
.podium li.me .nm { font-weight: 800; }
.badge { display: inline-block; margin: var(--space-2) 0 0 0; padding: var(--space-1) var(--space-2); border: 1px solid var(--quiet); color: var(--quiet); font-size: var(--fs-fine); font-weight: 600; line-height: 1.3; }
.list { width: 100%; border-collapse: collapse; margin-top: var(--space-2); }
.list tr { border-bottom: var(--hairline); }
.list th { text-align: left; font-weight: 500; padding: var(--space-3) var(--space-3) var(--space-3) 0; }
.list th i { font-style: normal; color: var(--quiet); margin-right: var(--space-3); font-variant-numeric: tabular-nums; display: inline-block; min-width: 1.5em; }
.list th .badge { margin: 0 0 0 var(--space-3); }
.list td { text-align: right; font-size: var(--fs-row); line-height: 1.1; padding: var(--space-3) 0; font-variant-numeric: tabular-nums; }
.list td.small { font-size: var(--fs-small); color: var(--quiet); }
.list tr.me th, .list tr.me td { font-weight: 800; }
.updated { margin-top: var(--space-3); }
.pinned {
  position: sticky; bottom: 0; margin: var(--space-5) calc(var(--gutter) * -1) calc(var(--space-5) * -1); padding: 0 var(--gutter);
  min-height: var(--btn); display: flex; justify-content: space-between; align-items: center;
  background: var(--bg); border-top: 2px solid var(--text); font-weight: 800; font-size: var(--fs-lead);
}
.pinned span { font-weight: 600; font-size: var(--fs-small); color: var(--quiet); margin-left: var(--space-2); }
.pinned b { font-size: var(--fs-stat); font-weight: 800; letter-spacing: var(--ls-stat); }

/* ---------- drops ---------- */
.prog { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-1); margin-top: var(--space-3); }
.prog li { font-size: var(--fs-fine); color: var(--quiet); padding-top: var(--space-2); border-top: 4px solid var(--hair); }
.prog .done { border-top-color: var(--text); color: var(--text); }
.prog .cur { border-top-color: var(--drop-fill); color: var(--drop-text); font-weight: 700; }
.prog.pay { margin-top: var(--space-5); } /* the donation line is not a drop, so it keeps the drop color out */
.prog.pay .cur { border-top-color: var(--text); color: var(--text); }
.clue { margin-top: var(--space-5); font-size: var(--fs-title); line-height: 1.12; font-weight: 700; letter-spacing: -0.035em; }
.spotwrap { margin-top: var(--space-4); }
.spot { position: relative; height: 150px; overflow: hidden; border: var(--hairline); background: var(--ph1); }
.spot svg { display: block; width: 100%; height: 100%; }
.spot .ph1 { fill: var(--ph1); }
.spot .ph2 { fill: var(--ph2); }
.spot .ph3 { fill: var(--ph3); }
.spot figcaption { position: absolute; left: 0; bottom: 0; padding: var(--space-1) var(--space-2); font-size: var(--fs-fine); background: var(--bg); }
.hintrow { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); margin-top: var(--space-4); padding: var(--space-3) 0; border-top: var(--hairline); border-bottom: var(--hairline); font-size: var(--fs-small); }
.hintrow span:first-child { color: var(--quiet); }
.hintrow b { color: var(--drop-text); }
.hints li { padding: var(--space-3) 0; border-bottom: var(--hairline); }
.hints .k { display: inline-block; min-width: 4.5rem; color: var(--drop-text); font-weight: 700; font-size: var(--fs-small); }
.status-line { margin-top: var(--space-4); padding: var(--space-3) 0; border-top: var(--hairline); border-bottom: var(--hairline); font-size: var(--fs-lead); font-weight: 700; }
.past { margin-top: var(--space-6); }
.past .list { margin-top: var(--space-2); }

/* ---------- me ---------- */
.kvs { margin-top: var(--space-5); }
.kv { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); padding: var(--space-3) 0; border-top: var(--hairline); }
.kv:last-child { border-bottom: var(--hairline); }
.kv dt { color: var(--quiet); font-size: var(--fs-small); }
.kv dd { font-weight: 700; text-align: right; }
.block { margin-top: var(--space-6); }
.block > .label { display: block; margin-bottom: var(--space-2); }
.block .segs { margin-top: var(--space-2); }
.block h2 { font-size: var(--fs-small); font-weight: 700; margin-top: var(--space-4); }
.block .ruled { margin-top: var(--space-2); }

/* ---------- sheets ---------- */
#toasts { position: fixed; z-index: 15; top: 3.5rem; left: 0; right: 0; max-width: var(--col); margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: var(--space-2); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: var(--space-3); min-height: var(--tap);
  background: var(--text); color: var(--bg); padding: var(--space-2) 0 var(--space-2) var(--space-4); font-size: var(--fs-small); font-weight: 600;
  animation: rise 0.3s ease-out both;
}
.toast p { flex: 1; }
.toast a { color: var(--bg); white-space: nowrap; display: inline-flex; align-items: center; min-height: var(--tap); }
.toast .toastx { color: var(--bg); min-width: var(--tap); padding: 0; font-size: var(--fs-lead); }
.sheet { position: fixed; z-index: 20; inset: 0; display: flex; justify-content: center; overflow-y: auto; background: var(--bg); overscroll-behavior: contain; }
.sheet-inner { width: 100%; max-width: var(--col); min-height: 100%; border-inline: var(--hairline); padding: 0 var(--gutter) calc(var(--space-5) + env(safe-area-inset-bottom)); }
.sheet-body { display: flex; flex-direction: column; min-height: 100%; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-1) 0; border-bottom: var(--hairline); min-height: 3.5rem; }
.sheet-head h1 { font-size: var(--fs-lead); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.previewfig { margin-top: var(--space-4); background: var(--ph1); display: grid; place-items: center; border: var(--hairline); }
.previewfig img { display: block; max-width: 100%; max-height: 45vh; max-height: 45dvh; object-fit: contain; }
.verdict { margin-top: var(--space-4); font-size: var(--fs-lead); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.verdict.flag { color: var(--text); }
.sheet .note { margin-top: var(--space-2); }
.working { margin-top: var(--space-5); }
.progress { height: 6px; margin-top: var(--space-4); background: var(--hair); overflow: hidden; }
.progress i { display: block; height: 100%; width: 40%; background: var(--text); animation: slide 1.1s ease-in-out infinite; }
.theirphoto { margin-top: var(--space-4); }
.theirphoto .hatch { display: grid; place-items: center; aspect-ratio: 4 / 3; max-height: 40vh; width: 100%; background: repeating-linear-gradient(135deg, var(--ph2) 0 10px, var(--ph1) 10px 20px); color: var(--quiet); font-weight: 600; }
.theirphoto .reportphoto { display: block; width: 100%; max-height: 45vh; max-height: 45dvh; object-fit: contain; background: var(--ph1); border: var(--hairline); }
.theirphoto figcaption { margin-top: var(--space-2); font-size: var(--fs-fine); color: var(--quiet); }
.choices { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
.choice { min-height: var(--btn); border: 1px solid var(--quiet); text-align: left; font-size: var(--fs-body); font-weight: 600; padding: 0 var(--space-4); }
.choice[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.scanbox { position: relative; width: min(100%, 18rem); aspect-ratio: 1; margin: var(--space-5) auto var(--space-3); background: color-mix(in srgb, var(--text) 5%, var(--bg)); border: var(--hairline); overflow: hidden; }
.scanbox.off { display: none; }
.scanvideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanbox i { position: absolute; width: 34px; height: 34px; border: 0 solid var(--text); }
.scanbox i:nth-of-type(1) { left: var(--space-3); top: var(--space-3); border-left-width: 4px; border-top-width: 4px; }
.scanbox i:nth-of-type(2) { right: var(--space-3); top: var(--space-3); border-right-width: 4px; border-top-width: 4px; }
.scanbox i:nth-of-type(3) { left: var(--space-3); bottom: var(--space-3); border-left-width: 4px; border-bottom-width: 4px; }
.scanbox i:nth-of-type(4) { right: var(--space-3); bottom: var(--space-3); border-right-width: 4px; border-bottom-width: 4px; }
.scanbox:not(.off) i { border-color: var(--bg); mix-blend-mode: normal; }
.scanmsg { text-align: center; font-size: var(--fs-small); color: var(--quiet); min-height: 2.6em; }
.codeform { margin-top: var(--space-4); }
.codeform .label { display: block; }
.codeform .error { margin: 0 0 var(--space-3); }
.codeinput { display: block; width: 100%; min-height: var(--btn); margin: var(--space-2) 0 var(--space-3); padding: 0 var(--space-3); background: none; border: 0; border-bottom: 2px solid var(--quiet); font-size: var(--fs-lead); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.codeinput::placeholder { color: var(--quiet); opacity: 0.6; }
.input.codeinput6 { letter-spacing: 0.3em; font-variant-numeric: tabular-nums; }
.scanner .ghostbtn { margin-top: var(--space-3); text-align: center; }

/* ---------- the moments ---------- */
.moment .stage { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: var(--space-6) 0; }
.moment .act { width: 100%; margin-top: var(--space-6); }
.moment-out { background: color-mix(in srgb, var(--bar) 8%, var(--bg)); animation: fade 1.4s ease-out both; }
.momenttitle { font-size: var(--fs-hero); font-weight: var(--fw-hero); letter-spacing: var(--ls-hero); line-height: var(--lh-hero); color: var(--quiet); margin-top: var(--space-2); animation: rise 0.8s ease-out 0.5s both; }
.momentsub { margin-top: var(--space-3); font-size: var(--fs-lead); line-height: 1.3; color: var(--quiet); animation: rise 0.8s ease-out 1s both; }
.moment-out .act { animation: rise 0.6s ease-out 1.4s both; }
.parcel { position: relative; width: 220px; height: 220px; }
.parcel .inside { position: absolute; inset: 0; border: 2px solid var(--drop-fill); display: grid; place-items: center; background: var(--bg); }
.parcel .inside b { font-size: var(--fs-parcel); font-weight: 700; letter-spacing: -0.04em; color: var(--drop-text); }
.parcel .lid { position: absolute; left: 0; right: 0; height: 50%; display: flex; padding: var(--space-3); background: var(--drop-fill); color: var(--drop-ink); font-weight: 700; font-size: var(--fs-small); }
.parcel .lid.t { top: 0; align-items: flex-start; transform: translateY(-102%); opacity: 0; }
.parcel .lid.b { bottom: 0; align-items: flex-end; justify-content: flex-end; transform: translateY(102%); opacity: 0; }
.moment-parcel .msg { margin-top: var(--space-5); width: 100%; }
.moment-parcel .msg h1 { margin-top: var(--space-1); font-size: var(--fs-moment); line-height: 1.08; font-weight: 700; letter-spacing: -0.04em; }
.moment-parcel .msg p { margin-top: var(--space-2); font-size: var(--fs-lead); line-height: 1.3; color: var(--quiet); }
.moment-parcel .msg .label { display: block; }
.moment-parcel.late .parcel .lid { transform: none; opacity: 1; background: var(--bar); }
.moment-parcel.late .parcel .inside { border-color: var(--bar); }
.moment-parcel.late .parcel .inside b { color: var(--quiet); }
.moment-parcel.play .parcel { animation: parcel-in 0.45s ease-out both; }
.moment-parcel.play .parcel .inside b { animation: reveal 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) 1.35s both; }
.moment-parcel.play .parcel .lid.t { animation: lift 0.6s ease-in-out 0.9s both; }
.moment-parcel.play .parcel .lid.b { animation: lower 0.6s ease-in-out 0.9s both; }
.moment-parcel.play .msg { animation: rise 0.5s ease-out 1.9s both; }
.moment-parcel.play.late .parcel { animation: parcel-in 0.45s ease-out both, shake 0.5s ease-in-out 0.9s both; }
.moment-parcel.play.late .parcel .lid.t, .moment-parcel.play.late .parcel .lid.b, .moment-parcel.play.late .parcel .inside b { animation: none; }
.moment-parcel.play.late .msg { animation-delay: 1.5s; }

/* the new-target reseal on the panel */
.seal.reseal { animation: shuffle 0.7s ease-in-out both; }
.seal.reseal .flap { animation: flap-down 0.55s ease-out both; }
.seal.reseal .stamp { animation: stamp-in 0.5s ease-out 0.45s both; }


/* ---------- sign-up flow ---------- */
.flow { padding-bottom: var(--space-5); }
#app:not([data-flow="off"]) #tabs { display: none; }
.flowstep { display: block; padding-top: var(--space-5); color: var(--text); font-size: var(--fs-caption); }
.flowtitle { margin-top: var(--space-2); font-size: var(--fs-title); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.flow .big { margin-top: var(--space-2); }
.raised { margin-top: var(--space-6); padding-top: var(--space-4); border-top: var(--hairline); }
.raised b { display: block; margin-top: var(--space-1); font-size: var(--fs-hero); font-weight: var(--fw-hero); letter-spacing: var(--ls-hero); line-height: var(--lh-hero); font-variant-numeric: tabular-nums; }
.raised span { display: block; margin-top: var(--space-1); color: var(--quiet); font-size: var(--fs-small); }
.line { height: 4px; margin-top: var(--space-3); background: var(--hair); }
.line i { display: block; height: 100%; background: var(--text); }
.flowform { margin-top: var(--space-5); }
.fieldwrap { margin-top: var(--space-5); }
.fieldwrap:first-child { margin-top: 0; }
.fieldwrap .label { display: block; }
.fieldwrap .note { margin-top: var(--space-2); }
.input { display: block; width: 100%; min-height: var(--btn); margin-top: var(--space-1); padding: 0; background: none; border: 0; border-bottom: 2px solid var(--quiet); font-size: var(--fs-lead); font-weight: 600; }
.input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-bottom-color: var(--text); }
.input[aria-invalid="true"] { border-bottom-color: var(--red); }
.input::placeholder { color: var(--quiet); opacity: 0.6; font-weight: 400; }
.flowform .act { margin-top: var(--space-5); }
.flow > .ghostbtn { min-height: var(--tap); margin-top: var(--space-3); display: flex; align-items: center; }
.photoblock { display: grid; grid-template-columns: 8rem 1fr; gap: var(--space-4); align-items: end; }
.avatar { width: 8rem; height: 8rem; display: grid; place-items: center; overflow: hidden; background: repeating-linear-gradient(135deg, var(--ph2) 0 10px, var(--ph1) 10px 20px); color: var(--quiet); font-size: var(--fs-fine); text-align: center; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.privacy { margin-top: var(--space-3); }
.photobtns { display: grid; gap: var(--space-2); }
.photobtns .outline { font-size: var(--fs-body); }
.picks { margin-top: var(--space-2); }
.picks button { padding: 0 var(--space-1); min-height: var(--btn); }
.fieldwrap .choices { margin-top: var(--space-2); }
.howhint { min-height: 1.4em; }
.councilnote { margin: var(--space-5) 0 0; padding: var(--space-4) 0; border-top: 2px solid var(--text); border-bottom: var(--hairline); }
.councilnote p:last-child { margin-top: var(--space-2); font-size: var(--fs-lead); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.kv dd.code { font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.mehead { display: flex; gap: var(--space-4); align-items: flex-end; }
.mephoto { flex: none; width: 5rem; height: 5rem; object-fit: cover; background: var(--ph2); }
.moment-in { background: var(--bg); }
.moment-in .momenttitle { color: var(--text); animation-delay: 0.35s; animation-duration: 0.9s; }
.moment-in .momentsub { color: var(--quiet); animation-delay: 0.9s; }
.moment-in .stage .label { animation: fade 0.5s ease-out both; }
.moment-in .act { animation: rise 0.5s ease-out 1.3s both; }

/* ---------- board: scoreboard, season, leaderboard, activity ---------- */
.boardbody { padding-top: var(--space-2); }
.segs.sub { margin-top: var(--space-4); border-color: var(--quiet); }
.segs.sub button { min-height: var(--tap); font-weight: 500; }
.scoretable { margin-top: var(--space-4); border-top: 2px solid var(--text); }
.scoretable + .raised { margin-top: var(--space-5); border-top: 0; padding-top: 0; }
.scoretable th { font-size: var(--fs-body); color: var(--text); }
.scoretable td small { font-size: var(--fs-small); color: var(--quiet); }
.season { margin-top: var(--space-6); }
.weekhead, .weeks { display: grid; grid-template-columns: repeat(7, 1fr); }
.weekhead { margin-top: var(--space-2); }
.weekhead li { text-align: center; font-size: var(--fs-fine); color: var(--quiet); padding-bottom: var(--space-1); }
.weeks .day { position: relative; height: 2.75rem; display: grid; place-items: center; border-top: var(--hairline); font-size: var(--fs-small); color: var(--quiet); font-variant-numeric: tabular-nums; }
.weeks .day.bygone { color: var(--text); }
.weeks .day.final { background: var(--weekend); }
.weeks .day.today { background: var(--text); color: var(--bg); font-weight: 800; }
.weeks .day.roll::after { content: ""; position: absolute; left: 28%; right: 28%; bottom: 5px; height: 3px; background: currentColor; }
.weeks .day.drop::before { content: ""; position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; background: var(--drop-fill); }
.key { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-top: var(--space-3); font-size: var(--fs-fine); color: var(--quiet); }
.key li { display: flex; align-items: center; gap: var(--space-2); }
.key i { display: inline-block; flex: none; }
.key .k-today { width: 12px; height: 12px; background: var(--text); }
.key .k-roll { width: 14px; height: 3px; background: var(--text); }
.key .k-drop { width: 8px; height: 8px; background: var(--drop-fill); }
.key .k-final { width: 14px; height: 12px; background: var(--weekend); border: var(--hairline); }
.season .caption { margin-top: var(--space-3); font-size: var(--fs-small); color: var(--text); }
.boardbody > .label { display: block; margin-top: var(--space-5); }
.feed { margin-top: var(--space-2); }
.feed li { display: grid; grid-template-columns: 4.5rem 1fr; gap: var(--space-3); padding: var(--space-3) 0; border-top: var(--hairline); line-height: 1.35; }
.feed li:last-child { border-bottom: var(--hairline); }
.feed .when { color: var(--quiet); font-size: var(--fs-small); font-variant-numeric: tabular-nums; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes parcel-in { from { transform: scale(0.88); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes lift { from { transform: none; opacity: 1; } to { transform: translateY(-102%); opacity: 0; } }
@keyframes lower { from { transform: none; opacity: 1; } to { transform: translateY(102%); opacity: 0; } }
@keyframes reveal { from { transform: scale(0.7); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes shuffle { 0%, 100% { transform: none; } 15% { transform: translateX(-8px) rotate(-0.6deg); } 35% { transform: translateX(7px) rotate(0.5deg); } 55% { transform: translateX(-5px); } 75% { transform: translateX(3px); } }
@keyframes flap-down { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tremble {
  0% { transform: translate(0, 0); }
  10% { transform: translate(-0.4px, 0.2px); }
  20% { transform: translate(0.5px, -0.3px); }
  30% { transform: translate(-0.7px, 0.4px); }
  40% { transform: translate(0.9px, -0.5px); }
  50% { transform: translate(-1.2px, 0.6px); }
  60% { transform: translate(1.4px, -0.8px); }
  70% { transform: translate(-1.8px, 0.9px) rotate(-0.1deg); }
  80% { transform: translate(2px, -1px) rotate(0.15deg); }
  90% { transform: translate(-2.4px, 1.2px) rotate(-0.2deg); }
  100% { transform: translate(2.6px, -1.2px); }
}
@keyframes stamp-in { from { transform: scale(2); opacity: 0; } to { transform: none; opacity: 1; } }

@media (min-width: 700px) {
  body { background: var(--bg); }
  .parcel { width: 240px; height: 240px; }
}

/* Reduced motion: no movement at all. Every moment still ends where it would have. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .progress i { animation: none; width: 100%; }
  .seal.reseal { animation: none; }
  /* No tremble and no lift. The bar still fills, then the name appears. */
  .seal.is-filling { animation: none; }
  .seal.is-open .flap { transform: none; }
  .seal .fillbar { transition-duration: 0.35s !important; }
  .seal.is-filling .fillbar { transition-duration: 1.2s !important; }
}
