/* Future: Tense — visual system. Plum / rust / tan, Tomorrow + B612 Mono, grain. */

:root {
  --night: #141215; --bone: #ece5d8; --bone-dim: #bdb8af; --ink: #221f1d;
  --plum: #6c5478; --plum-deep: rgba(52, 38, 64, .92); --rust: #8c5b3c; --rust-ink: #6b3d22;
  --tan: #d6b98f; --lit: #d8c09a; --debit: #b0573c; --alert: #e05a3a;
  --notice: #e8dcc4; --paper: #f3efe6; --hudbg: rgba(20, 18, 21, .72);
  --bone-2: rgba(236, 229, 216, .88);   /* secondary text: never dimmer than this (R2-03) */
  --band: rgba(20, 18, 21, .6);          /* dark backing for small text on a sky */
  /* one border language (R2-01): square, flat, visible */
  --lw: 1.5px; --line: var(--lw) solid rgba(236, 229, 216, .55); --line-ink: var(--lw) solid var(--ink);
  --f-ui: 'Tomorrow', system-ui, sans-serif; --f-mono: 'B612 Mono', ui-monospace, monospace;
  --f-gu: 'Noto Sans Gujarati', 'Tomorrow', sans-serif;
  --horizon: 73%; --ground: 27%;
  --cap: max(15px, 1.35vw);
  --ease: cubic-bezier(.22, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--night); color: var(--bone); }
body { font-family: var(--f-mono); -webkit-font-smoothing: antialiased; overscroll-behavior: none; touch-action: none; }
body.ending { touch-action: auto; }
p, h1, h2, ol { margin: 0; }
button { font: inherit; color: inherit; }
img { display: block; }
[lang="gu"], .gu { font-family: var(--f-gu); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nojs { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; z-index: 99; background: var(--night); }
:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em; padding: 14px 20px 13px;
  background: var(--plum); color: var(--bone); border: var(--line);
  font: 600 15px/1 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { background: #7a6187; border-color: var(--bone); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: rgba(236, 229, 216, .07); border-color: var(--bone); }

/* ---------- world ---------- */
#world, #track, #actor { position: fixed; inset: 0; transition: filter .8s var(--ease), opacity .5s; }
#world { z-index: 0; overflow: hidden; background: #6f7d64; }
#worlds, .run { position: absolute; inset: 0; }
.run { overflow: hidden; }
.run > * { position: absolute; }
.run .sky { top: 0; height: 100%; background-size: cover; background-position: center 35%; will-change: transform; }
.run .grade { inset: 0; mix-blend-mode: color; opacity: .3; }
.run .layer { left: 0; top: 0; width: 100%; height: 100%; will-change: transform; }
.run .far { opacity: .62; filter: saturate(.7) contrast(.85); }
.run .haze { left: 0; right: 0; height: 22%; top: calc(var(--horizon) - 15%); pointer-events: none; opacity: .55; }
.run .ground { left: 0; right: 0; bottom: 0; height: var(--ground); background-repeat: repeat-x; background-size: auto 100%; }
.run .ground::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 18%; background: linear-gradient(rgba(0,0,0,.14), transparent); }
.prop { position: absolute; height: auto; pointer-events: none; }
.prop.shade { filter: brightness(.82) saturate(.9); }
.prop.bob { animation: bob 3.4s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 2px; rotate: -1deg; } }
.layer .html { position: absolute; }

/* flood water (R2-35): the sea photo, graded brown-green */
.run .sky.flip { scale: -1 1; }
.run .water {
  left: 0; right: 0; bottom: -4px; height: calc(var(--ground) + 3% + 4px);
  background-repeat: repeat-x; background-size: auto 100%; background-color: #2c2a22; will-change: transform;
}
.run .water::before { content: ''; position: absolute; inset: 0; background: #6d5a3a; mix-blend-mode: color; opacity: .55; }
.run .water::after { content: ''; position: absolute; inset: 0; background: linear-gradient(var(--tint) 0, transparent 30%, rgba(36, 30, 22, .55) 75%); mix-blend-mode: multiply; opacity: .5; }
/* December ground (R2-50): land graded with the world tint, plus a dried-silt wash */
.run .ground.silt::after { content: ''; position: absolute; inset: 0; background: var(--tint); mix-blend-mode: color; opacity: .55; }
.run .rain { inset: -10% 0 0; pointer-events: none; }
/* rain (R2-36): one layer of thin bone streaks, falling down-left like the sky photo */
.rain i {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg stroke='%23ece5d8' stroke-opacity='.25' stroke-width='1'%3E%3Cpath d='M40 20l-11 24M170 70l-11 24M110 150l-11 24M220 190l-11 24M60 205l-11 24M195 5l-11 24'/%3E%3C/g%3E%3C/svg%3E");
  animation: rain 1.5s linear infinite;
}
@keyframes rain { to { background-position: -110px 240px; } }

/* food smoke */
.smoke { position: absolute; width: 22vw; height: 60vh; transform: translateX(-50%); pointer-events: none; }
.smoke i {
  position: absolute; left: 50%; bottom: 0; width: 40%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(70, 58, 66, .5), rgba(70, 58, 66, 0) 70%);
  animation: smoke 9s linear infinite; opacity: 0;
}
.smoke i:nth-child(2) { animation-delay: -3s; } .smoke i:nth-child(3) { animation-delay: -6s; }
@keyframes smoke {
  0% { transform: translate(-50%, 0) scale(.6); opacity: 0; }
  15% { opacity: .9; }
  100% { transform: translate(10%, -120%) scale(2.6); opacity: 0; }
}

/* the soft join between worlds */
#join { position: absolute; top: 0; bottom: 0; left: 0; opacity: 0; pointer-events: none; will-change: transform, opacity; }

/* ---------- story layer ---------- */
#track { z-index: 1; pointer-events: none; overflow: hidden; }
#strip { position: absolute; left: 0; top: 0; height: 100%; will-change: transform; }
.beat { position: absolute; top: 0; height: 100%; }
.beat > * { pointer-events: auto; }

.cap {
  position: absolute; max-width: min(46vw, 640px); font: 400 var(--cap)/1.5 var(--f-mono); color: var(--ink); text-wrap: pretty;
  opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.cap span {
  background: var(--tan); padding: .14em .5em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.cap b, .band b { color: var(--rust-ink); font-weight: 700; }
.cap.in { opacity: 1; transform: none; }

/* hero */
.hero .eyebrow, .eyebrow {
  font: 600 14px/1 var(--f-ui); letter-spacing: .2em; color: var(--bone); text-transform: uppercase;
}
.hero .eyebrow { position: absolute; left: 10vw; top: calc(23vh - 34px); display: flex; align-items: center; gap: 10px; }
.hero .eyebrow::before { content: ''; width: 7px; height: 7px; background: var(--alert); transform: rotate(45deg); }
.hero .cap { left: 10vw; opacity: 1; transform: none; max-width: min(56vw, 760px); }
.hero .cta { position: absolute; left: 10vw; }
/* small text on a sky: 15px mono on a dark band (R2-10, R2-03) */
.note-band { display: inline-block; padding: 6px 10px 5px; background: var(--band); font: 400 15px/1.3 var(--f-mono); color: rgba(236, 229, 216, .9); letter-spacing: .02em; }
.hero .note { position: absolute; left: 10vw; }
.hero .credit { position: absolute; right: 40px; top: 40px; transition: opacity .6s; }
body:not(.at-hero) .hero .credit { opacity: 0; }
.timeline { position: absolute; left: 10vw; right: 10vw; bottom: 7.5vh; display: flex; justify-content: space-between; }
.timeline::before { content: ''; position: absolute; left: 4px; right: 4px; top: 4px; height: 1px; background: rgba(236, 229, 216, .55); }
.timeline div { position: relative; font: 600 15px/1.25 var(--f-ui); letter-spacing: .12em; color: var(--bone); }
.timeline div:last-child { text-align: right; }
.timeline i { display: block; width: 9px; height: 9px; margin-bottom: 12px; }
.timeline div:last-child i { margin-left: auto; }
.timeline small { display: block; font: 400 13px/1.3 var(--f-mono); letter-spacing: .06em; color: var(--bone-2); }

/* carbon ID */
.idc { position: absolute; left: 50%; top: 50%; width: min(600px, 92vw); transform: translate(-50%, -50%); text-align: center; }
.idc .cap { position: relative; opacity: 1; transform: none; max-width: none; margin-bottom: 22px; }
.card {
  position: relative; text-align: left; background: #e9e2d3; color: var(--ink); overflow: hidden;
  transform: rotate(2deg);
  transition: transform .5s var(--ease);
}
.card .hd { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 46px; padding: 0 18px; background: var(--plum); color: var(--bone); }
.card .hd p { font: 600 13px/1.2 var(--f-ui); letter-spacing: .12em; }
.card .hd .gu { font-size: 15px; font-weight: 600; white-space: nowrap; }
.card .bd { display: grid; grid-template-columns: 140px 1fr; gap: 22px; padding: 22px 24px 14px; }
.card .ph { height: 168px; background: #cbc4b5 url(../assets/svg/walker.svg) 40% 18px / 130% auto no-repeat; }
.card .bars { height: 40px; margin-top: 10px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 3px, var(--ink) 3px 4px, transparent 4px 7px, var(--ink) 7px 10px, transparent 10px 11px); }
.card label, .card dt { display: block; font: 600 11px/1 var(--f-ui); letter-spacing: .16em; color: var(--plum); margin: 0 0 4px; }
.card dl { margin: 12px 0 0; } .card dd { margin: 0 0 12px; font: 700 17px/1.2 var(--f-mono); }
.card .nm { display: flex; align-items: center; border: 1.5px solid var(--plum); background: #f3efe6; padding: 0 8px; }
.card input { flex: 1; min-width: 0; border: 0; background: none; font: 700 17px/1 var(--f-mono); color: var(--ink); padding: 10px 0 9px; outline: none; letter-spacing: .04em; caret-color: var(--ink); }
.card input::placeholder { color: rgba(34, 31, 29, .55); font-weight: 400; }
.card .nm:focus-within { box-shadow: inset 0 0 0 1px var(--plum); }
.card .fine { padding: 0 24px 20px; font: 400 13px/1.4 var(--f-mono); color: #3a3531; }
.card::after { content: ''; position: absolute; inset: 46px 7px 7px; border: 1px solid var(--ink); border-top: 0; pointer-events: none; }
.card.signed { transform: rotate(0deg); }
.card .sig {
  position: absolute; right: 22px; bottom: 30px; padding: 5px 10px 4px; border: 2.5px solid var(--rust); color: var(--rust);
  font: 800 16px/1 var(--f-ui); letter-spacing: .14em; transform: rotate(-9deg) scale(1.6); opacity: 0; transition: .35s var(--ease);
}
.card.signed .sig { opacity: .9; transform: rotate(-9deg) scale(1); }
.idc .btn { margin-top: 26px; }
.idc-note { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 14px; white-space: nowrap; }

/* notices */
.notice { position: absolute; width: clamp(240px, 23.5vw, 360px); }
.notice .post { position: absolute; left: 50%; width: 7px; margin-left: -3px; top: 70%; background: #2a2523; }
.notice .post::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 90px; height: 12px; transform: translateX(-50%); background: radial-gradient(rgba(0,0,0,.35), transparent 70%); }
.notice .sheet { position: relative; padding: 6px; background: var(--notice); color: var(--ink); transform: rotate(-2deg); }
.notice .frame { border: var(--line-ink); }
.notice .nh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; background: #974326; color: var(--bone); padding: 7px 12px 6px; font: 600 11px/1 var(--f-ui); letter-spacing: .12em; }
.notice .nh small { font: 400 11px/1 var(--f-mono); opacity: .8; letter-spacing: .04em; }
.notice .nb { padding: 12px 14px 12px; }
.notice h3 { margin: 0; font: 800 clamp(14px, 1.25vw, 19px)/1.1 var(--f-ui); letter-spacing: .02em; }
.notice .big { font: 800 clamp(40px, 4.4vw, 68px)/1 var(--f-ui); color: #a9502f; letter-spacing: -.01em; margin: 4px 0 2px; }
.notice .sub { font: 700 clamp(13px, .94vw, 15px)/1.35 var(--f-mono); }
.notice .lang { margin-top: 6px; font-size: 14px; color: var(--plum); }
.notice .lang .gu { font-weight: 600; } .notice .lang em { font: italic 400 13px/1 var(--f-mono); color: #4f4540; white-space: nowrap; }

/* price board (food) */
.board { width: clamp(170px, 13.5vw, 220px); padding: 12px 14px 14px; background: #2b2622; color: var(--bone); border: var(--line); font: 400 14px/1.3 var(--f-mono); }
.board::before, .board::after { content: ''; position: absolute; top: 100%; width: 5px; height: 14vh; background: #2a2523; }
.board::before { left: 18%; } .board::after { right: 18%; }
.board b { display: block; font: 700 12px/1 var(--f-ui); letter-spacing: .16em; color: var(--tan); margin-bottom: 8px; }
.board span { display: block; } .board strong { display: block; font: 800 22px/1.1 var(--f-ui); color: #e8a37f; margin-bottom: 6px; }
.board em { display: block; font-size: 12px; color: var(--bone-2); margin-top: 2px; }

/* the PUNARNIRMAAN phone (R2-52): a real 9:19.5 phone, a dating app run by the state */
.phone {
  --ph-h: min(650px, 74vh);
  position: absolute; width: calc(var(--ph-h) * 9 / 19.5); height: var(--ph-h); display: flex; flex-direction: column;
  padding: 14px 18px 12px; border-radius: 40px; background: #1d1a1c; color: var(--bone); border: 9px solid #47404a;
  font: 400 13px/1.3 var(--f-mono); opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.phone.in { opacity: 1; transform: none; }
.ph-buzz { position: absolute; left: -9px; bottom: calc(100% + 18px); white-space: nowrap; }
.ph-status { display: flex; justify-content: space-between; align-items: center; padding: 2px 6px 0; font: 600 13px/1 var(--f-ui); }
.ph-status span:last-child { font: 400 12px/1 var(--f-mono); }
.ph-notch { width: 34%; height: 22px; border-radius: 12px; background: #000; }
.ph-app { margin-top: 14px; text-align: center; font: 800 15px/1 var(--f-ui); letter-spacing: .12em; color: var(--tan); }
.ph-sub { margin-top: 5px; text-align: center; font: 400 11px/1.3 var(--f-mono); color: var(--bone-2); }
.ph-h { margin: 14px 0 12px; text-align: center; font: 600 clamp(22px, 3.2vh, 30px)/1.1 var(--f-ui); }
.ph-card { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 10px; border: 1px solid rgba(236, 229, 216, .55); }
.ph-face { flex: 1; min-height: 60px; position: relative; overflow: hidden; background: linear-gradient(#5a4766, #3b3040); }
.ph-face::before, .ph-face::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); filter: blur(10px); border-radius: 50%; }
.ph-face::before { top: 18%; width: 38%; aspect-ratio: 1; background: #c9a383; }
.ph-face::after { top: 68%; width: 80%; height: 60%; background: #6e5878; }
.ph-note { margin: 8px 0 7px; font: 400 12px/1.2 var(--f-mono); color: var(--bone-2); }
.ph-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.ph-tags span { padding: 3px 6px 2px; border: 1px solid rgba(236, 229, 216, .55); font: 400 11px/1.2 var(--f-mono); }
.ph-pct { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; font: 400 13px/1 var(--f-mono); }
.ph-pct b { font: 800 clamp(34px, 5vh, 44px)/1 var(--f-ui); color: var(--tan); }
.ph-bar { height: 4px; margin: 8px 0 12px; background: rgba(236, 229, 216, .18); } .ph-bar i { display: block; height: 100%; background: var(--tan); }
.ph-reward { padding: 8px 10px 7px; background: var(--tan); color: var(--ink); font: 400 12px/1.3 var(--f-mono); }
.ph-reward b { font: 800 14px/1 var(--f-ui); margin-right: 4px; }
.ph-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 10px; }
.ph-btns span { padding: 11px 0 10px; text-align: center; font: 600 15px/1 var(--f-ui); border: 1.5px solid var(--bone); }
.ph-btns .ph-acc { background: var(--plum); border-color: #9a82a6; }
.ph-order { text-align: center; font: 400 11px/1 var(--f-mono); color: var(--bone-2); }

/* ---------- you ---------- */
#actor { z-index: 2; pointer-events: none; }
#prints { position: absolute; left: 0; top: 0; height: 100%; will-change: transform; }
#prints img { position: absolute; width: 30px; opacity: .5; transition: opacity 2.4s linear; }
#walker, #raft { position: absolute; left: 0; top: 0; transform-origin: 50% 100%; will-change: transform; }
#walker img, #raft img { width: 100%; height: auto; }
#walker img { filter: drop-shadow(0 2px 0 rgba(0,0,0,.12)); }
#raft { opacity: 0; }
#tag {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: 6px 11px 5px 9px;
  background: rgba(108, 84, 120, .82); border: 1.5px solid rgba(236, 229, 216, .55); color: var(--bone);
  font: 600 clamp(16px, 1.45vw, 22px)/1 var(--f-ui); letter-spacing: .1em; opacity: 0; transition: opacity .5s;
}
#tag svg { width: .9em; height: .9em; }
#tag.on { opacity: 1; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
#hud > * { pointer-events: auto; }

#logo {
  position: fixed; left: 10vw; top: 23vh; display: flex; align-items: baseline; gap: .08em;
  padding: .12em .26em .14em .16em; background: var(--plum); color: var(--bone); white-space: nowrap;
  font-size: clamp(44px, 6.6vw, 112px); line-height: 1; transform-origin: 0 0; pointer-events: none;
  transition: transform 1.1s var(--ease), background-color 1.1s var(--ease);
}
#logo .f { font: italic 300 1em/1 var(--f-ui); letter-spacing: -.01em; }
#logo .t { font: 800 1em/1 var(--f-ui); letter-spacing: .01em; }
body.docked #logo { background: var(--rust); }

/* readout: ● PLACE · MON 2070 │ DATA · DATA — one size, one baseline (R2-04) */
#readout {
  position: fixed; left: 190px; top: 34px; display: flex; align-items: baseline; gap: 10px; padding: 8px 14px 7px;
  background: var(--hudbg); border: var(--line); font: 400 13px/1 var(--f-mono); letter-spacing: .06em; color: var(--bone-2);
  opacity: 0; transition: opacity .6s; white-space: nowrap;
}
#readout i { align-self: center; width: 6px; height: 6px; border-radius: 50%; background: var(--alert); }
#readout b { font: 600 13px/1 var(--f-ui); letter-spacing: .12em; color: var(--bone); }
#readout .rule { align-self: stretch; width: 1px; margin: -3px 0; background: rgba(236, 229, 216, .45); }
#readout .data { display: flex; align-items: baseline; gap: 10px; }
body.signed #readout { opacity: 1; }

#wallet {
  position: fixed; left: 28px; top: 66px; width: max-content; min-width: 214px; padding: 11px 13px 11px; background: rgba(34, 31, 29, .9); border: var(--line);
  transform-origin: 0 0; transition: transform 1.1s var(--ease), opacity .6s;
}
.wl-h { font: 600 11px/1 var(--f-ui); letter-spacing: .12em; color: var(--tan); white-space: nowrap; }
.wl-h span { font: 400 11px/1 var(--f-mono); color: var(--bone-2); margin-left: 4px; letter-spacing: 0; }
.wl-n { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 7px; font: 400 12px/1 var(--f-mono); color: var(--bone-2); }
.wl-n b { font: 800 30px/1 var(--f-ui); color: var(--bone); letter-spacing: .01em; }
.chip { display: inline-block; min-width: 0; padding: 3px 5px 2px; font: 700 12px/1 var(--f-mono); opacity: 0; transition: opacity .3s; }
.chip.on { opacity: 1; } .chip.minus { background: var(--debit); color: #fff; } .chip.plus { background: var(--tan); color: var(--ink); }
.wl-bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.wl-bar i { height: 3px; background: rgba(236, 229, 216, .18); transition: background .4s; }
.wl-bar i.on { background: var(--lit); } .wl-bar i.lost { background: var(--debit); }
.wl-cap { position: absolute; left: 0; top: calc(100% + 10px); white-space: nowrap; opacity: 0; transition: opacity .6s; }
body.at-hero .wl-cap { opacity: 1; }

/* health pass chip under the wallet (K09) */
#pass {
  position: fixed; left: 28px; top: 160px; display: flex; align-items: center; gap: 9px; padding: 8px 12px 7px;
  background: rgba(34, 31, 29, .9); border: var(--line); font: 600 12px/1 var(--f-ui); letter-spacing: .1em; color: var(--bone);
  transform: rotate(1deg); opacity: 0; transition: opacity .6s; pointer-events: none;
}
#pass::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #7fb069; }
#pass.on { opacity: 1; }
body.ending #pass { opacity: 0; }

#stamp {
  position: fixed; left: 214px; top: 70px; padding: 6px 12px 5px; border: 3px solid var(--debit); color: var(--debit);
  text-align: center; transform: rotate(-8deg) scale(1.6); opacity: 0; pointer-events: none;
  background: rgba(236, 229, 216, .06);
}
#stamp span { display: block; font: 800 13px/1 var(--f-ui); letter-spacing: .3em; }
#stamp b { display: block; font: 800 30px/1 var(--f-ui); letter-spacing: .02em; }
#stamp.credit { border-color: var(--tan); color: var(--tan); }
#stamp.on { animation: stamp 2.9s var(--ease) forwards; }
@keyframes stamp {
  0% { opacity: 0; transform: rotate(-8deg) scale(1.6); }
  8% { opacity: .95; transform: rotate(-8deg) scale(1); }
  80% { opacity: .95; transform: rotate(-8deg) scale(1); }
  100% { opacity: 0; transform: rotate(-8deg) scale(1); }
}

/* messages: one at a time, top-centre under the readout (R2-21) */
#msgs { position: fixed; left: 50%; top: 70px; width: 360px; margin-left: -180px; pointer-events: none; transition: opacity .4s; }
.msg {
  position: absolute; left: 0; right: 0; top: 0; background: rgba(28, 25, 26, .94); border: var(--line); padding: 11px 14px 12px; color: var(--bone);
  animation: msg-in .45s var(--ease); transition: opacity .4s, transform .4s;
}
.msg.out { opacity: 0; transform: translateY(-6px); }
.msg p:first-child { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font: 600 12px/1.2 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; color: #cdb6da; }
.msg p:first-child::before { content: ''; flex: none; width: 7px; height: 7px; background: #9c7cad; }
.msg.alert p:first-child { color: #f2876b; } .msg.alert p:first-child::before { background: var(--alert); }
.msg p + p { font: 500 15px/1.4 var(--f-ui); text-wrap: pretty; }
body.cp-on #msgs { opacity: 0; }
.msg p + p b { font-weight: 700; }
@keyframes msg-in { from { opacity: 0; transform: translateY(-8px); } }

/* meters (R2-20): live value on top of the bar, delta chip above the icon,
   label box under both; ↑/↓ preview sits just outside the strip */
#meters {
  --seg: clamp(3px, .52vh, 5px);
  position: fixed; right: 28px; top: 76px; width: 106px; padding: 12px 12px 10px; display: flex; flex-direction: column; gap: clamp(6px, 1.6vh, 16px);
  background: rgba(30, 27, 29, .86); border: var(--line); opacity: 0; transition: opacity .6s, transform .7s var(--ease);
}
body.signed #meters { opacity: 1; }
body.cp-on #meters { transform: translateX(calc(var(--cp-shift, 0px) * -1)); }
.mt {
  position: relative; display: grid; grid-template-columns: 1fr 18px; grid-template-rows: auto 1fr auto auto; column-gap: 8px;
  grid-template-areas: ". v" "d bar" "ic bar" "l l"; margin: 0 -6px; padding: 4px 6px 2px;
}
.mt.up { animation: m-up 1.1s var(--ease); } .mt.down { animation: m-down 1.1s var(--ease); }
@keyframes m-up { 20% { background: rgba(214, 185, 143, .38); } }
@keyframes m-down { 20% { background: rgba(176, 87, 60, .5); } }
.mt .v { grid-area: v; justify-self: center; margin-bottom: 5px; font: 700 12px/1 var(--f-mono); color: var(--bone); }
.mt .d { grid-area: d; justify-self: center; align-self: end; margin-bottom: 7px; padding: 3px 5px 2px; font: 700 16px/1 var(--f-mono); visibility: hidden; }
.mt .d.on { visibility: visible; } .mt .d.minus { background: var(--debit); color: #fff; } .mt .d.plus { background: var(--bone); color: var(--ink); }
.mt .ic { grid-area: ic; justify-self: center; width: 28px; height: 28px; color: var(--bone); }
.mt .bar { grid-area: bar; display: flex; flex-direction: column-reverse; gap: 2px; }
.mt .bar i { width: 18px; height: var(--seg); background: rgba(236, 229, 216, .16); transition: background .2s; }
.mt .bar i.on { background: var(--lit); }
.mt .bar i.flash { background: var(--bone); }
.mt .bar i.drop { background: var(--debit); }
.mt .l { grid-area: l; display: flex; align-items: center; justify-content: center; height: 2.5em; margin-top: 6px; text-align: center; font: 500 12px/1.2 var(--f-ui); color: var(--bone); }
.mt .pv { position: absolute; right: calc(100% + 10px); top: 40%; font: 700 20px/1 var(--f-ui); }
.mt .pv.up, .mt .pv.down { padding: 3px 5px 2px; background: rgba(20, 18, 21, .8); }
.mt .pv.up { color: var(--tan); } .mt .pv.down { color: #e57a5a; }

#sound {
  position: fixed; right: 24px; bottom: 18px; display: flex; align-items: center; gap: 6px; padding: 7px 10px 6px;
  background: var(--hudbg); border: var(--line); cursor: pointer;
  font: 400 12px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--bone);
}
#sound svg { width: 15px; height: 15px; } #sound .w { opacity: .25; } #sound[aria-pressed="true"] .w { opacity: 1; }
#sound:hover { border-color: var(--bone); }

#hint {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); padding: 9px 15px 8px; background: var(--hudbg); border: var(--line);
  font: 600 12px/1 var(--f-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--bone); white-space: nowrap;
  opacity: 0; transition: opacity .6s; pointer-events: none;
}
#hint.on { opacity: 1; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(calc(-50% + 5px)); } }

#prog { position: fixed; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(20, 18, 21, .45); opacity: 0; transition: opacity .6s; }
body.signed #prog { opacity: 1; }
#prog b { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--tan); }
#prog i { position: absolute; top: -3px; width: 2px; height: 9px; background: var(--bone-dim); }
#prog i.done { background: var(--tan); }

/* hero states */
body.at-hero #readout, body.at-hero #meters { opacity: 0; }
body.cp-on #hud { z-index: 5; }   /* the HUD stays sharp and undimmed over the checkpoint */
body.ending #hud { z-index: 6; pointer-events: none; }
body.ending #readout, body.ending #wallet, body.ending #meters, body.ending #msgs, body.ending #hint,
body.ending #prog, body.ending #stamp, body.ending #sound { opacity: 0; visibility: hidden; transition: opacity .6s, visibility 0s .6s; }

/* ---------- checkpoint ---------- */
body.cp-on #world, body.cp-on #track, body.cp-on #actor { filter: brightness(.6) saturate(.5) blur(4px); }
#cp {
  position: fixed; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 90px 160px 60px; background: rgba(20, 18, 21, .28); opacity: 0; visibility: hidden;
  transition: opacity .6s, visibility 0s .6s;
}
#cp.on { opacity: 1; visibility: visible; transition: opacity .6s; }
#cp.after { background: transparent; pointer-events: none; }
#cp > * { transition: opacity .6s var(--ease), transform .6s var(--ease); }
#cp .cp-bar, #cp .cp-because, #cp .cp-lead, #cp .cp-q { opacity: 0; transform: translateY(10px); }
#cp.show .cp-bar, #cp.show .cp-because, #cp.show .cp-lead, #cp.show .cp-q { opacity: 1; transform: none; }
#cp.show .cp-lead { transition-delay: .1s; } #cp.show .cp-q { transition-delay: .2s; }
#cp.after .cp-bar, #cp.after .cp-because, #cp.after .cp-lead, #cp.after .cp-q { opacity: 0; }
.cp-bar {
  display: flex; align-items: center; gap: 14px; padding: 10px 16px 9px; margin-bottom: 4vh;
  background: var(--hudbg); border: var(--line); font: 400 13px/1 var(--f-mono); letter-spacing: .1em;
}
.cp-l { font: 600 13px/1 var(--f-ui); letter-spacing: .24em; color: var(--tan); }
.cp-n { font: 800 20px/1 var(--f-ui); letter-spacing: .16em; }
.cp-sep { width: 1px; height: 16px; background: rgba(236,229,216,.35); }
.cp-m { font: 600 13px/1 var(--f-ui); letter-spacing: .12em; }
.cp-dots { display: flex; gap: 3px; } .cp-dots i { width: 9px; height: 3px; background: rgba(236,229,216,.25); } .cp-dots i.on { background: var(--tan); }
.cp-because { font: 600 13px/1.2 var(--f-ui); letter-spacing: .18em; color: var(--tan); margin-bottom: 12px; text-align: center; }
.cp-lead { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 2.5vh; font: 400 var(--cap)/1.5 var(--f-mono); color: var(--ink); text-align: center; }
.cp-lead:empty { display: none; }
.cp-lead span { background: var(--tan); padding: .14em .5em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.cp-lead b { color: var(--rust-ink); font-weight: 700; }
.cp-because:empty { display: none; }
.cp-q { max-width: 900px; text-align: center; text-wrap: pretty; font: 500 clamp(22px, 2.6vw, 38px)/1.25 var(--f-ui); color: var(--bone); text-shadow: 0 1px 12px rgba(20,18,21,.5); margin-bottom: 5vh; }
.cp-opts { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 300px)); gap: clamp(14px, 2vw, 26px); width: 100%; justify-content: center; }
.opt {
  position: relative; display: flex; flex-direction: column; text-align: left; padding: 16px 16px 18px; min-height: 128px;
  background: var(--plum-deep); border: var(--line); color: var(--bone); cursor: pointer;
  opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .2s, background .2s;
}
#cp.show .opt { opacity: 1; transform: none; }
#cp.show .opt:nth-child(2) { transition-delay: .3s, .3s, 0s, 0s; } #cp.show .opt:nth-child(3) { transition-delay: .4s, .4s, 0s, 0s; }
#cp.show .opt:nth-child(1) { transition-delay: .2s, .2s, 0s, 0s; }
.opt:hover:not(:disabled), .opt:focus-visible { border-color: var(--bone); outline: none; background: rgba(62, 46, 76, .95); }
.opt .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.opt .k { width: 20px; height: 20px; display: grid; place-items: center; background: var(--bone); color: var(--ink); font: 700 11px/1 var(--f-ui); }
.opt .p { padding: 5px 7px 4px; font: 700 12px/1 var(--f-mono); border: 1px solid rgba(236,229,216,.55); color: var(--bone); }
.opt .p.minus { background: var(--debit); border-color: var(--debit); color: #fff; }
.opt .p.plus { background: var(--tan); border-color: var(--tan); color: var(--ink); }
.opt .ti { font: 600 clamp(16px, 1.3vw, 20px)/1.25 var(--f-ui); margin-bottom: 8px; text-wrap: pretty; }
.opt .wy { font: italic 400 14px/1.5 var(--f-mono); color: var(--bone-2); text-wrap: pretty; }
.opt .lk { margin-top: auto; padding-top: 10px; font: 700 12px/1 var(--f-ui); letter-spacing: .16em; color: #f07b5e; }
.opt:disabled { cursor: not-allowed; background: rgba(40, 34, 44, .82); }
.opt:disabled .ti, .opt:disabled .wy, .opt:disabled .top { opacity: .55; }
.opt.shake, .shake { animation: shake .42s; }
@keyframes shake { 20% { translate: -7px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 2px 0; } }
#cp.chose .opt:not(.sel) { opacity: 0 !important; transform: translateY(10px) scale(.98); transition-delay: 0s !important; }
.opt.sel, .opt.armed { border-color: var(--tan); }
.opt .ta { display: none; margin-top: auto; padding-top: 10px; font: 600 12px/1 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--tan); }
.opt.armed .ta { display: block; }
#cp.after .opt.sel { opacity: 0; transform: translateY(-8px); transition-delay: .9s; }
.cp-after {
  position: absolute; left: max(250px, 10vw); top: 28%; width: min(720px, 56vw); transform: translateY(10px);
  font: 400 calc(var(--cap) * 1.05)/1.5 var(--f-mono); color: var(--ink); opacity: 0; text-wrap: pretty;
}
.cp-after span { background: var(--tan); padding: .18em .55em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
#cp.after .cp-after.on { opacity: 1; transform: none; transition-delay: 1s; }
#cp.after .cp-after.on.gone { opacity: 0; transition-delay: 0s; }

/* ---------- ending (K11) ---------- */
#end {
  position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: row-reverse; align-items: safe center; justify-content: safe center; gap: 6vw;
  padding: 90px 7vw 50px; background: radial-gradient(120% 90% at 30% 30%, #4b4848, #2f2d2e 70%);
  opacity: 0; visibility: hidden; transition: opacity 1.2s, visibility 0s 1.2s; overflow-y: auto; overscroll-behavior: contain;
}
#end.on { opacity: 1; visibility: visible; transition: opacity 1.2s; }
.end-side { flex: 0 1 620px; min-width: 0; }
.end-step { display: none; }
.end-step.on { display: block; animation: rise .8s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.end-side .eyebrow { color: var(--tan); font-size: 14px; margin-bottom: 20px; }
.end-lede { font: 500 clamp(22px, 2vw, 30px)/1.3 var(--f-ui); margin-bottom: 30px; text-wrap: pretty; }
#to-verdict { opacity: 0; transition: opacity .6s; } #to-verdict.in { opacity: 1; }
#verdict { font: 600 clamp(30px, 3.2vw, 48px)/1.15 var(--f-ui); margin-bottom: 28px; text-wrap: pretty; }
#verdict:focus { outline: none; }
#verdict em { display: block; font-style: italic; font-weight: 300; color: var(--tan); }
#ask { max-width: 560px; margin-bottom: 26px; padding: 14px 16px 15px; background: rgba(20, 18, 21, .55); border: var(--line); }
#ask .ask-h { margin-bottom: 8px; font: 600 13px/1.2 var(--f-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--tan); }
#ask .ask-q { font: 400 16px/1.55 var(--f-mono); color: var(--bone); text-wrap: pretty; }
/* big meters: the HUD meter, larger */
#bigmeters { display: grid; grid-template-columns: repeat(4, minmax(0, 132px)); gap: 14px; margin-bottom: 30px; }
.bm {
  display: grid; grid-template-columns: 1fr 22px; grid-template-rows: auto 1fr auto; grid-template-areas: ". v" "ic bar" "l l"; column-gap: 10px;
  padding: 14px 14px 12px; background: rgba(20, 18, 21, .45); border: var(--line); cursor: pointer; text-align: center;
}
.bm:hover { border-color: var(--bone); }
.bm[aria-pressed="true"] { border-color: var(--tan); background: rgba(20, 18, 21, .8); box-shadow: inset 0 0 0 1px var(--tan); }
.bm .v { grid-area: v; margin-bottom: 8px; font: 700 15px/1 var(--f-mono); }
.bm .ic { grid-area: ic; align-self: end; justify-self: center; width: 30px; height: 30px; }
.bm .ic svg { width: 100%; height: 100%; }
.bm .bar { grid-area: bar; display: flex; flex-direction: column-reverse; gap: 2px; }
.bm .bar i { height: 6px; background: rgba(236, 229, 216, .16); transition: background .3s; }
.bm .bar i.on { background: var(--lit); }
.bm .l { grid-area: l; display: flex; align-items: center; justify-content: center; min-height: 2.5em; margin-top: 10px; font: 500 14px/1.2 var(--f-ui); }
.end-q { margin-bottom: 18px; font: italic 300 20px/1.3 var(--f-ui); color: var(--bone); }
.end-btns { display: flex; flex-wrap: wrap; gap: 12px; }
#end .credit { margin-top: 48px; font-size: 14px; white-space: nowrap; }

/* receipt */
.end-receipt { flex: none; position: relative; width: 470px; }
.rc {
  position: relative; background: var(--paper); color: var(--ink); padding: 26px 30px 20px; font: 400 13px/1.45 var(--f-mono);
  outline: 1px solid var(--ink); outline-offset: -8px; transform: rotate(-1.5deg); transform-origin: 50% 0;
}
.rc::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 9px;
  background: linear-gradient(-45deg, transparent 6px, var(--paper) 0) 0 0 / 12px 9px repeat-x, linear-gradient(45deg, transparent 6px, var(--paper) 0) 0 0 / 12px 9px repeat-x; }
.rl { opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s; }
.rl.in { opacity: 1; transform: none; }
.rc .c { text-align: center; }
.rc .auth { font: 600 12px/1 var(--f-ui); letter-spacing: .16em; }
.rc .ttl { font: 800 20px/1.15 var(--f-ui); letter-spacing: .01em; margin: 7px 0 5px; white-space: nowrap; }
.rc .sm { font-size: 13px; color: #3e3a36; letter-spacing: .03em; }
.rc hr { border: 0; border-top: 1.5px solid var(--ink); margin: 10px 0; }
.rc h4 { margin: 0 0 6px; font: 600 12px/1 var(--f-ui); letter-spacing: .14em; }
.rc svg { display: block; width: 100%; height: auto; overflow: visible; }
.rc .bal { position: relative; }
.rc .mrow { display: grid; grid-template-columns: 96px 1fr 56px; align-items: end; gap: 10px; margin-bottom: 4px; }
.rc .mrow span { font: 600 12px/1 var(--f-ui); letter-spacing: .1em; padding-bottom: 4px; }
.rc .mrow b { font: 400 13px/1 var(--f-mono); text-align: right; padding-bottom: 3px; white-space: nowrap; }
.rc table { width: 100%; border-collapse: collapse; font-size: 14px; } .rc td { padding: 2px 0; vertical-align: top; }
.rc td:first-child { width: 44px; color: #4d4843; } .rc td:last-child { text-align: right; white-space: nowrap; padding-left: 8px; }
.rc td.minus { color: var(--rust-ink); }
.rc .close { display: flex; justify-content: space-between; font: 700 16px/1 var(--f-ui); letter-spacing: .06em; }
.rc .foot { margin-top: 12px; text-align: center; font-size: 11px; color: #4d4843; }
/* SURVIVED 2070: lower right, over the balance chart, never over the header (R2-65) */
.rc .rstamp {
  position: absolute; right: 30px; bottom: 22px; padding: 6px 12px 4px; border: 3px solid rgba(176, 87, 60, .8); color: rgba(176, 87, 60, .8);
  text-align: center; transform: rotate(-8deg) scale(1.5); opacity: 0; transition: .4s var(--ease); pointer-events: none;
}
.rc .rstamp span { display: block; font: 800 13px/1 var(--f-ui); letter-spacing: .3em; } .rc .rstamp b { display: block; font: 800 30px/1 var(--f-ui); }
.rc .rstamp.in { opacity: 1; transform: rotate(-8deg) scale(1); }

#fade { position: fixed; inset: 0; z-index: 8; background: var(--night); opacity: 0; pointer-events: none; transition: opacity .7s; }
#fade.on { opacity: 1; }
#grain {
  position: fixed; inset: 0; z-index: 7; pointer-events: none; opacity: .1; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.6 -.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.notrans *, body.notrans *::before { transition: none !important; }

/* debug panel */
#dbg {
  position: fixed; right: 100px; bottom: 50px; z-index: 9; width: 260px; max-height: 60vh; overflow: auto; padding: 10px 12px;
  background: rgba(0,0,0,.85); color: #cfe; font: 400 10.5px/1.45 var(--f-mono); white-space: pre-wrap; border: 1px solid #456;
}
#dbg input { width: 50px; background: #123; color: #cfe; border: 1px solid #456; font: inherit; }
#dbg button { background: #234; border: 1px solid #456; color: #cfe; cursor: pointer; padding: 1px 6px; }

/* ---------- phone ---------- */
@media (max-width: 760px), (orientation: portrait) {
  :root { --cap: 15px; --lw: 1px; }
  #logo { font-size: 44px; left: 6vw; }
  .wl-cap { left: auto; right: 0; }
  #readout { left: 140px; top: 18px; max-width: calc(100vw - 150px); overflow: hidden; }
  #readout .place { overflow: hidden; text-overflow: ellipsis; }
  #readout .data, #readout .rule, #readout .sep, #readout .mon { display: none; }
  #wallet { left: 16px; top: 54px; width: 150px; min-width: 0; padding: 8px 10px; }
  .wl-n b { font-size: 22px; }
  #stamp { left: 176px; top: 56px; } #stamp b { font-size: 22px; }
  #pass { left: 16px; font-size: 11px; padding: 6px 9px 5px; }
  body.cp-on #pass { opacity: 0; }
  #msgs { left: 16px; right: 84px; top: 128px; width: auto; margin-left: 0; }
  .msg { padding: 9px 11px 10px; } .msg p:first-child { font-size: 11px; } .msg p + p { font-size: 14px; }
  #meters { --seg: 3px; right: 8px; top: 54px; width: 72px; padding: 8px 6px 6px; gap: 6px; }
  .mt { grid-template-columns: 1fr 12px; column-gap: 5px; margin: 0 -4px; padding: 3px 4px 1px; }
  .mt .bar { gap: 1px; } .mt .bar i { width: 12px; }
  .mt .ic { width: 18px; height: 18px; } .mt .v { font-size: 11px; margin-bottom: 3px; }
  .mt .d { font-size: 12px; margin-bottom: 4px; padding: 2px 3px 1px; }
  .mt .l { font-size: 11px; height: 2.4em; margin-top: 3px; letter-spacing: 0; }
  .mt .pv { right: calc(100% + 6px); font-size: 15px; }
  .wl-h span { display: none; }
  .cap { max-width: calc(100vw - 108px); }
  .hero .eyebrow, .hero .cap, .hero .cta, .hero .note { left: 6vw; }
  .hero .cap { max-width: 88vw; }
  .timeline { left: 6vw; right: 6vw; }
  /* six worlds don't fit one row at 390px: two rows of three */
  .timeline { display: grid; grid-template-columns: repeat(3, 1fr); row-gap: 16px; bottom: 64px; }
  .timeline::before { display: none; }
  .timeline div { font-size: 13px; letter-spacing: .06em; } .timeline small { font-size: 12px; }
  .timeline div:last-child { text-align: left; } .timeline div:last-child i { margin-left: 0; }
  .timeline i { margin-bottom: 6px; }
  .hero .credit { left: 6vw; right: 6vw; }
  .note-band { font-size: 13px; }
  .card .bd { grid-template-columns: 84px 1fr; gap: 12px; padding: 16px 16px 10px; } .card .ph { height: 100px; } .card .bars { height: 30px; }
  .card dd, .card input { font-size: 14px; } .card .fine { padding: 0 16px 16px; }
  .idc-note { white-space: normal; }
  body.docked:not(.signed) #actor, body.actor-hide #actor { opacity: 0; }   /* the card needs the whole width */
  #logo { top: 19vh; }
  .notice { width: 200px; }
  .phone { --ph-h: min(560px, 66vh); padding: 10px 14px 10px; border-width: 7px; border-radius: 32px; }
  .ph-app { margin-top: 10px; } .ph-h { margin: 10px 0 8px; } .ph-pct { margin-top: 10px; } .ph-btns { margin: 10px 0 8px; }
  .ph-pct b { font-size: 32px; } .ph-sub { font-size: 10.5px; }
  #cp { padding: 130px 98px 84px 16px; justify-content: flex-start; overflow-y: auto; }
  .cp-bar { gap: 8px; padding: 8px 10px; margin-bottom: 18px; white-space: nowrap; } .cp-dots, .cp-l { display: none; }
  .cp-q { font-size: 20px; margin-bottom: 18px; }
  .cp-opts { grid-template-columns: 1fr; gap: 10px; max-width: 420px; }
  .opt { min-height: 0; padding: 12px 14px 13px; } .opt .top { margin-bottom: 6px; } .opt .ti { margin-bottom: 4px; }
  .cp-after { left: 5vw; width: calc(100vw - 110px); top: 46%; }
  #end { flex-direction: column; align-items: center; justify-content: flex-start; gap: 34px; padding: 80px 16px 50px; }
  .end-receipt { width: min(440px, calc(100vw - 40px)); }
  .rc { padding: 22px 20px 18px; } .rc .mrow { grid-template-columns: 82px 1fr 50px; gap: 6px; } .rc .ttl { font-size: 19px; }
  .rc .ttl { font-size: 17px; white-space: normal; }
  .rc .rstamp { right: 14px; bottom: 24px; padding: 4px 8px 3px; } .rc .rstamp b { font-size: 20px; } .rc .rstamp span { font-size: 10px; }
  #bigmeters { gap: 8px; } .bm { padding: 10px 8px 9px; column-gap: 6px; grid-template-columns: 1fr 14px; } .bm .l { font-size: 12px; }
  .bm .bar i { height: 4px; } .bm .ic { width: 22px; height: 22px; }
  #end .credit { margin-top: 32px; white-space: normal; }
  .rc { transform: none; }
  .end-receipt { order: 2; }
  .end-side { flex: none; width: 100%; max-width: 520px; }
  #hint { bottom: 56px; }
}
@media (max-width: 760px) and (max-height: 700px) { #cp { padding-top: 110px; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; transition-delay: 0s !important; }
  .rain i, .smoke i, #hint.on, .prop.bob { animation: none !important; }
  .smoke i { opacity: .5; transform: translate(-50%, -40%) scale(1.6); }
  #stamp.on { animation: none !important; opacity: .95; transform: rotate(-8deg); }
  body.cp-on #world, body.cp-on #track, body.cp-on #actor { filter: brightness(.55) saturate(.5); }
}
