/* Black Hole: the screens and the HUD. Printed paper laid over the toy map: one card, one button, one set of
   labels. Colours, radii, shadows and eases come from tokens.css; see DESIGN.md. */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body { font-family: var(--ui); color: var(--ink); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
p { margin: 0; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- the parts */
.num { font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); letter-spacing: -0.02em; font-variant-numeric: tabular-nums lining-nums; }
.label { font-family: var(--ui); font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.label.loss { color: var(--red-ink); }
.card { background: var(--paper); border: var(--edge); border-radius: var(--r-l); box-shadow: var(--drop); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 18px;
  border: var(--edge); border-radius: var(--r-m); box-shadow: var(--drop);
  font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); font-size: 18px; letter-spacing: -.005em; line-height: 1;
  transition: transform var(--t-1) var(--ease), box-shadow var(--t-1) var(--ease), background-color var(--t-2) var(--ease);
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn.red { background: var(--red); color: var(--white); }
.btn.red:hover { background: #EE3B35; }
.btn.white { background: var(--paper); color: var(--ink); min-height: 44px; font-family: var(--ui); font-weight: 700; font-size: 15px; font-variation-settings: normal; letter-spacing: 0; }
.btn.white:hover { background: var(--white); }
.btn svg { flex-shrink: 0; width: 20px; height: 20px; }
.iconbtn { width: 44px; height: 44px; border-radius: var(--r-m); background: var(--paper); border: var(--edge); box-shadow: var(--drop); display: grid; place-items: center; pointer-events: auto; color: var(--ink);
  transition: transform var(--t-1) var(--ease), box-shadow var(--t-1) var(--ease); }
.iconbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.iconbtn svg { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- the logo */
.logo {
  margin: 0; font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); color: var(--paper); letter-spacing: -0.035em; line-height: .9;
  text-shadow:
    -.026em -.026em 0 var(--ink), .026em -.026em 0 var(--ink), -.026em .026em 0 var(--ink), .026em .026em 0 var(--ink),
    0 -.03em 0 var(--ink), 0 .03em 0 var(--ink), -.03em 0 0 var(--ink), .03em 0 0 var(--ink),
    0 .055em 0 var(--red), 0 .075em 0 var(--red), .026em .085em 0 var(--ink), -.026em .085em 0 var(--ink), 0 .1em 0 var(--ink);
}
/* the o is the hole itself: ink rim, the cut earth, and dark */
/* the o is the hole itself, cut into the line the letters stand on: an ink rim, the far wall of earth, then dark */
.logo .o { display: inline-block; position: relative; width: .54em; height: .4em; margin: 0 .02em; vertical-align: baseline; }
.logo .o::before { content: ""; position: absolute; left: 0; right: 0; bottom: -.075em; height: .3em; border-radius: 50%; background: var(--pit); border: .032em solid var(--ink);
  box-shadow: inset 0 .055em 0 #A27B52, inset 0 .075em 0 #6E5238; }

/* ---------------------------------------------------------------- screens */
.screen { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.screen > * { pointer-events: auto; }
.col { width: 100%; max-width: 440px; padding: 0 var(--gut); }

/* Title: the logo over London, and the day's Budget on a card */
#title { justify-content: space-between; padding: calc(var(--safe-t) + 5vh) 0 calc(var(--safe-b) + 4vh);
  background: linear-gradient(180deg, rgba(255,248,236,.9) 0, rgba(255,248,236,.78) 20%, rgba(255,248,236,0) 42%, rgba(255,248,236,0) 62%, rgba(207,230,225,.55) 100%); }
#title .head { text-align: center; pointer-events: none; padding: 0 var(--gut); }
#title .logo { font-size: clamp(66px, 17vw, 132px); }
#title .tagline { max-width: 26ch; margin: 22px auto 0; font-family: var(--display); font-style: italic; font-weight: 600; font-size: clamp(18px, 4.6vw, 22px); line-height: 1.3; font-variation-settings: "SOFT" 100; text-wrap: balance; }
.titlecard { padding: 16px 18px 14px; box-shadow: var(--lift); }
.titlecard .row { display: flex; justify-content: space-between; align-items: center; min-height: 22px; }
.countdown { font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px 3px; border-radius: var(--r-s); background: var(--gold); color: var(--ink); }
.countdown.today { background: var(--red); color: var(--white); }
.titlecard .target { font-size: 56px; line-height: 1; margin: 10px 0 4px; }
.titlecard .lede { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink-2); margin-bottom: 16px; }
.titlecard .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.titlecard .foot { text-align: center; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-3); margin-top: 12px; min-height: 16px; }

/* The memo from the Forecasters, and How it works (the same sheet) */
#brief { justify-content: center; background: rgba(11,18,34,.32); }
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(11,18,34,.42); padding: var(--gut); overflow-y: auto; }
.modal .memo { width: 100%; max-width: 440px; }
.memo { padding: 18px 20px 20px; box-shadow: var(--lift); }
.memo-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.memo-p { font-family: var(--display); font-style: italic; font-weight: 500; font-variation-settings: "SOFT" 100; font-size: 18px; line-height: 25px; text-wrap: pretty; }
.memo-big { font-size: 64px; line-height: 1; margin: 8px 0 6px; }
.rules { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 14px; }
.rules li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.rules .ic { width: 36px; height: 36px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; }
.rules .ic svg { width: 24px; height: 24px; }
.rules .ic img { width: 36px; height: 36px; border-radius: 50%; }
.rules p { font-size: 15px; line-height: 21px; font-weight: 500; color: var(--ink-2); padding-top: 6px; }
.rules b { color: var(--ink); font-weight: 700; }
.memo .sign { font-family: var(--display); font-style: italic; font-size: 15px; color: var(--ink-2); margin: 0 0 16px; }
.memo .howto { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-3); margin: -2px 0 16px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- the HUD */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#hud .top { position: absolute; left: max(14px, var(--safe-l)); right: max(14px, var(--safe-r)); top: calc(var(--safe-t) + 14px); display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
#hud .lcol { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
#hud .rcol { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.pill { background: var(--paper); border: var(--edge); border-radius: var(--r-m); box-shadow: var(--drop); }

/* the money */
.money { width: 236px; padding: 9px 12px 11px; }
.money .lbl { display: flex; justify-content: space-between; gap: 12px; }
.money .lbl span:last-child { color: var(--ink-3); }
.money .num { display: block; font-size: 34px; line-height: 38px; transition: color var(--t-2) var(--ease); }
.money .bar { height: 6px; border-radius: 3px; background: var(--wash); margin-top: 6px; position: relative; overflow: hidden; }
.money .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ink); transition: width var(--t-2) var(--ease); }
.money .bar s { position: absolute; top: 0; bottom: 0; width: 0; text-decoration: none; background: repeating-linear-gradient(135deg, var(--gold) 0 3px, rgba(245,195,59,.35) 3px 6px); transition: left var(--t-2) var(--ease), width var(--t-2) var(--ease); }
.money .bar b { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink-3); transition: left .3s linear; }
.money.behind .bar b { background: var(--red); }
.money.done .num { color: var(--green); }
.money.done .bar i { background: var(--green); }
.money.done .bar b { display: none; }

/* the seven faces */
.tray { display: flex; gap: 4px; padding: 5px 6px; }
.face { --f: 0; position: relative; width: 34px; height: 34px; border-radius: 50%; padding: 2.5px; flex-shrink: 0;
  background: conic-gradient(var(--red) calc(var(--f) * 1turn), var(--wash) 0); transition: transform var(--t-2) var(--pop); }
.face img { width: 100%; height: 100%; border-radius: 50%; display: block; background: var(--paper); }
.face .tip { position: absolute; top: calc(100% + 9px); left: 50%; transform: translate(-50%, -4px); white-space: nowrap; font-size: 11px; line-height: 14px; font-weight: 700;
  background: var(--ink); color: var(--paper); border-radius: var(--r-s); padding: 3px 7px; opacity: 0; transition: opacity var(--t-2) var(--ease), transform var(--t-2) var(--ease); z-index: 2; }
.face.named .tip, .face.hot .tip, .face.out .tip { opacity: 1; transform: translate(-50%, 0); }
.face.hot .tip { background: var(--red); color: var(--white); }
.face.hot { animation: wobble .5s ease-in-out infinite alternate; }
.face.ping { animation: ping .45s var(--ease); }
.face.out { background: var(--red); }
.face.out img { filter: grayscale(.8); }
@keyframes wobble { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes ping { 0% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* the clock and the seats */
.clock { display: flex; align-items: center; gap: 9px; padding: 6px 12px 6px 8px; transition: background-color var(--t-2) var(--ease), color var(--t-2) var(--ease); }
.clock svg { width: 30px; height: 30px; }
.clock .num { font-size: 26px; line-height: 28px; }
.clock .label { font-size: 11px; line-height: 13px; white-space: nowrap; }
.clock.late { background: var(--red); color: var(--white); }
.clock.late .label { color: rgba(255,255,255,.8); }
.clock.late svg circle:first-child { fill: var(--white); }
.clock.frozen { background: #DCEBF6; }
.seats { min-width: 132px; padding: 7px 12px 8px; }
.seats .row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.seats .num { font-size: 26px; line-height: 28px; }
.seats .gauge { position: relative; height: 6px; margin-top: 5px; border-radius: 3px; background: var(--wash); overflow: hidden; }
.seats .gauge i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); transition: width var(--t-2) var(--ease); }
.seats .gauge u { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--red) 0 3px, rgba(229,50,45,.3) 3px 6px); transition: left var(--t-2) var(--ease), width var(--t-2) var(--ease); }
.seats .gauge b { position: absolute; top: 0; bottom: 0; width: 2px; left: calc(326 / 650 * 100%); background: var(--paper); }
.seats .note { font-size: 11px; line-height: 14px; font-weight: 600; color: var(--ink-2); margin-top: 5px; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.seats .note.loss { color: var(--red-ink); }
.seats.hit, .money.hit { animation: hit .4s var(--ease); }
.seats.danger .gauge i { background: var(--red); }
@keyframes hit { 0% { transform: translateX(0); background: #FFE2DE; } 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 100% { transform: none; background: var(--paper); } }

/* power-ups, under the faces */
.power { display: flex; align-items: center; gap: 10px; padding: 6px 12px 7px 6px; min-width: 200px; animation: rise var(--t-3) var(--ease); }
.power .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--white); flex-shrink: 0; }
.power .ic svg { width: 20px; height: 20px; }
.power .name { font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); font-size: 16px; line-height: 18px; }
.power .line { font-size: 12px; line-height: 15px; font-weight: 600; color: var(--ink-2); }
.power .left { height: 3px; border-radius: 2px; background: var(--wash); margin-top: 5px; overflow: hidden; }
.power .left i { display: block; height: 100%; background: var(--ink); }

/* the General Strike: not a power-up, a penalty, across the top */
.status { position: absolute; left: 50%; top: calc(var(--safe-t) + 14px); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 10px;
  background: var(--red); color: var(--white); border: var(--edge); border-radius: var(--r-m); box-shadow: var(--drop); font-size: 13px; line-height: 16px; font-weight: 700; white-space: nowrap; animation: rise var(--t-3) var(--ease); }
.status svg { width: 18px; height: 18px; }
.status b { font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); font-size: 15px; }

.controls { position: absolute; right: max(14px, var(--safe-r)); bottom: calc(var(--safe-b) + 14px); display: flex; gap: 8px; pointer-events: auto; }

/* the bottom of the screen: news and notices */
.bottom { position: absolute; left: max(14px, var(--safe-l)); right: calc(max(14px, var(--safe-r)) + 56px); bottom: calc(var(--safe-b) + 14px); display: flex; align-items: flex-end; gap: 12px; pointer-events: none; }
.toasts { display: flex; flex-direction: column-reverse; gap: 6px; align-items: flex-start; max-width: 360px; flex: 0 1 360px; }
.toast { background: var(--paper); border: var(--edge); border-radius: var(--r-m); box-shadow: var(--drop); padding: 7px 11px; font-size: 13px; line-height: 17px; font-weight: 600; color: var(--ink-2); animation: toast 3.4s var(--ease) forwards; }
.toast b { font-weight: 700; color: var(--ink); }
.toast.dark { background: var(--ink); color: rgba(255,248,236,.82); }
.toast.dark b { color: var(--paper); }
@keyframes toast { 0% { opacity: 0; transform: translateY(8px); } 7% { opacity: 1; transform: none; } 88% { opacity: 1; } 100% { opacity: 0; } }

/* a late edition, slipped in at the bottom */
.press { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 14px); width: min(460px, calc(100vw - 32px)); transform: translateX(-50%); pointer-events: none; }
.headline { background: var(--paper); border: var(--edge); border-radius: 4px; box-shadow: var(--lift); padding: 8px 14px 10px; text-align: center; animation: press 3.2s var(--ease) forwards; }
.headline .mast { display: flex; justify-content: space-between; padding-bottom: 5px; margin-bottom: 7px; border-bottom: 1px solid var(--ink); font-family: var(--display); font-weight: 900; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.headline .mast span:last-child { font-family: var(--ui); font-weight: 700; letter-spacing: .08em; color: var(--ink-2); }
.headline .h { font-family: var(--display); font-weight: 900; font-variation-settings: "SOFT" 0, "opsz" 144; font-size: 32px; line-height: 1; letter-spacing: -0.02em; text-transform: uppercase; text-wrap: balance; }
.headline .sub { font-size: 13px; line-height: 17px; font-weight: 600; color: var(--ink-2); margin-top: 6px; }
@keyframes press { 0% { opacity: 0; transform: translateY(40px); } 9% { opacity: 1; transform: none; } 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(16px); } }

/* the tier-up: the hole's new name, big, over the hole */
.banner { position: absolute; left: 50%; top: 31%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; width: max-content; max-width: 92vw; }
.banner .t { font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); font-size: clamp(48px, 12vw, 96px); line-height: .95; letter-spacing: -0.03em; color: var(--paper);
  text-shadow: -.03em -.03em 0 var(--ink), .03em -.03em 0 var(--ink), -.03em .03em 0 var(--ink), .03em .03em 0 var(--ink), 0 -.035em 0 var(--ink), 0 .035em 0 var(--ink), -.035em 0 0 var(--ink), .035em 0 0 var(--ink), 0 .08em 0 var(--ink); }
.banner.gold .t { color: var(--gold); }
.banner .s { margin-top: 12px; display: inline-block; background: var(--ink); color: var(--paper); border-radius: var(--r-s); padding: 6px 12px; font-weight: 700; font-size: 14px; line-height: 18px; }
.banner .v { display: block; width: max-content; margin: 8px auto 0; font-family: var(--display); font-style: italic; font-weight: 600; font-size: 17px; line-height: 22px; color: var(--ink); background: var(--paper); border: var(--edge); border-radius: var(--r-s); padding: 2px 10px 3px; box-shadow: var(--drop); }
.banner.go { animation: banner 2s var(--pop) forwards; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.7); } 14% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 82% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -58%); } }

/* ---------------------------------------------------------------- things that ride on the map */
.layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bubble { position: absolute; transform: translate(-50%, -100%); background: var(--white); border: var(--edge); border-radius: var(--r-m); padding: 4px 10px 5px; font-size: 13px; line-height: 17px; font-weight: 700; white-space: nowrap; box-shadow: var(--drop); animation: bubble 1.5s var(--ease) forwards; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 9px; height: 9px; margin-left: -4.5px; background: var(--white); border-right: var(--edge); border-bottom: var(--edge); transform: rotate(45deg); }
@keyframes bubble { 0% { opacity: 0; transform: translate(-50%, -85%) scale(.8); } 12% { opacity: 1; transform: translate(-50%, -100%) scale(1); } 82% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -125%); } }
/* the till: what this run of swallowing is worth, under the hole */
.till { position: absolute; transform: translate(-50%, 0); display: flex; flex-direction: column; align-items: center; gap: 3px; transition: opacity var(--t-3) var(--ease); }
.till .amt { font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); font-size: 22px; line-height: 24px; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums;
  background: var(--paper); border: var(--edge); border-radius: var(--r-s); box-shadow: var(--drop); padding: 3px 9px 2px; }
.till .amt.big { background: var(--gold); }
.till .amt.bump { animation: bump .28s var(--pop); }
.till .word { font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--paper); background: var(--ink); border-radius: var(--r-s); padding: 3px 8px; white-space: nowrap; animation: rise var(--t-3) var(--pop); }
.till.idle { opacity: 0; }
@keyframes bump { 0% { transform: scale(1.14); } 100% { transform: scale(1); } }
.place { position: absolute; transform: translate(-50%, -50%); font-family: var(--display); font-style: italic; font-weight: 700; color: rgba(20,35,58,.62); white-space: nowrap; font-variation-settings: "SOFT" 100;
  text-shadow: 0 0 3px rgba(255,248,236,.95), 0 0 8px rgba(255,248,236,.75); }
.place.hood { font-size: 12.5px; font-weight: 600; color: rgba(20,35,58,.5); }
.place.hood.park { color: rgba(30,74,52,.7); }
.place.t1 { font-size: 22px; } .place.t2 { font-size: 17px; } .place.t3 { font-size: 14px; } .place.t4, .place.t5 { font-size: 12px; }
/* a pledge, on its plinth */
.plaque { position: absolute; transform: translate(-50%, -100%); background: var(--ink); color: var(--paper); border: var(--edge); border-radius: var(--r-m); padding: 6px 11px 7px; text-align: center; white-space: nowrap; box-shadow: var(--drop); }
.plaque .k { font-size: 11px; line-height: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.plaque .v { font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); font-size: 17px; line-height: 20px; }
.plaque .n { font-size: 11px; line-height: 14px; font-weight: 600; color: rgba(255,248,236,.72); margin-top: 1px; }
.plaque.open { background: var(--red); }
.plaque.open .k { color: var(--paper); }
.plaque.open .n { color: var(--white); }
.tag { position: absolute; transform: translate(-50%, -100%); font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--paper); border: var(--edge); border-radius: var(--r-s); padding: 3px 8px; white-space: nowrap; box-shadow: var(--drop); }
.tag.gold { background: var(--gold); }
/* things off the edge of the screen */
.arrow { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--paper); border: var(--edge); box-shadow: var(--drop); display: grid; place-items: center; color: var(--ink); }
.arrow svg { width: 22px; height: 22px; }
.arrow .pt { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.arrow .pt::before { content: ""; position: absolute; left: 25px; top: -6px; border: 6px solid transparent; border-left: 8px solid var(--ink); }
.arrow .d { position: absolute; top: calc(100% + 5px); left: 50%; transform: translateX(-50%); font-size: 11px; line-height: 14px; font-weight: 700; background: var(--ink); color: var(--paper); border-radius: var(--r-s); padding: 1px 6px; white-space: nowrap; }
.arrow.red { background: var(--red); color: var(--white); }
.arrow.gold { background: var(--gold); }

.holdring { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
.holdring .lbl { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 8px; background: var(--red); color: var(--white); font-weight: 700; font-size: 13px; line-height: 17px; padding: 5px 11px; border-radius: var(--r-m); white-space: nowrap; border: var(--edge); box-shadow: var(--drop); }
.joy { position: absolute; width: 108px; height: 108px; margin: -54px 0 0 -54px; border-radius: 50%; border: 2px solid rgba(20,35,58,.3); background: rgba(255,248,236,.22); }
.joy i { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--paper); border: var(--edge); box-shadow: var(--drop); }
.hint { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 22%); transform: translateX(-50%); background: var(--ink); color: var(--paper); border-radius: var(--r-m); padding: 10px 16px; font-weight: 700; font-size: 15px; line-height: 19px; white-space: nowrap; transition: opacity .5s var(--ease); }

/* revolts and power-ups tint the edges of the screen */
.veil { position: absolute; inset: 0; pointer-events: none; transition: opacity .5s var(--ease); opacity: 0; }
.veil.frost { box-shadow: inset 0 0 120px 30px rgba(220,236,248,.9); }
.veil.stealth { box-shadow: inset 0 0 140px 20px rgba(11,18,34,.42); }
.veil.drag { box-shadow: inset 0 0 120px 20px rgba(123,92,196,.32); }
.veil.on { opacity: 1; }
.letter { position: absolute; left: 50%; bottom: 0; width: min(88vw, 420px); transform: translate(-50%, 100%); background: var(--white); border: var(--edge); border-radius: 4px; box-shadow: var(--lift); padding: 20px 22px 22px; font-family: var(--display); font-size: 16px; line-height: 23px; animation: letter 3.6s var(--ease) forwards; pointer-events: none; }
.letter .addr { text-align: right; font-size: 13px; line-height: 17px; color: var(--ink-2); margin-bottom: 12px; font-style: italic; }
.letter .sign { margin-top: 12px; font-style: italic; color: var(--ink-2); }
@keyframes letter { 0% { transform: translate(-50%, 100%); } 12% { transform: translate(-50%, -24px); } 84% { transform: translate(-50%, -24px); } 100% { transform: translate(-50%, 100%); } }
.stamp { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%) rotate(-8deg); border: 6px solid var(--red); color: var(--red); border-radius: var(--r-m); padding: 4px 22px; font-family: var(--display); font-weight: 900; font-variation-settings: "SOFT" 0; font-size: clamp(52px, 14vw, 108px); line-height: 1.05; letter-spacing: .02em; background: rgba(255,248,236,.86); animation: stamp 2.4s var(--pop) forwards; pointer-events: none; white-space: nowrap; }
@keyframes stamp { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(2); } 12% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } 82% { opacity: 1; } 100% { opacity: 0; } }
.flash { position: absolute; inset: 0; background: var(--white); opacity: 0; pointer-events: none; }
.flash.go { animation: flash .5s var(--ease); }
@keyframes flash { 0% { opacity: .4; } 100% { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* the end of the round: the route, drawn over Britain */
.routecap { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 28px); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); background: var(--paper); border: var(--edge); border-radius: var(--r-l); box-shadow: var(--lift); padding: 12px 20px 13px; text-align: center; animation: capIn var(--t-3) var(--ease) both; }
.routecap .label { color: var(--red-ink); }
.routecap .t { font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); font-size: 24px; line-height: 28px; margin: 2px 0 1px; }
.routecap .s { font-size: 14px; line-height: 18px; font-weight: 600; color: var(--ink-2); }
@keyframes capIn { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------------------------------------------------------------- phones */
@media (max-width: 600px) {
  /* two rows: the money and the clock, then the faces and the seats */
  #hud .top { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 8px; align-items: start; }
  #hud .lcol, #hud .rcol { display: contents; }
  .money { grid-column: 1; grid-row: 1; }
  .clock { grid-column: 2; grid-row: 1; align-self: stretch; }
  .tray { grid-column: 1; grid-row: 2; justify-content: space-between; }
  .seats { grid-column: 2; grid-row: 2; align-self: stretch; width: 118px; }
  #h-power { grid-column: 1 / -1; grid-row: 3; }
  .titlecard .target { font-size: 48px; }
  .memo-big { font-size: 54px; }
  .money { width: auto; min-width: 0; padding: 7px 10px 9px; }
  .money .num { font-size: 26px; line-height: 30px; }
  .tray { padding: 4px 5px; gap: 2px; }
  .face { width: 28px; height: 28px; padding: 2px; }
  .clock { gap: 7px; padding: 5px 10px 5px 6px; }
  .clock svg { width: 26px; height: 26px; }
  .clock .num { font-size: 22px; line-height: 24px; }
  .seats { min-width: 0; padding: 6px 10px 7px; }
  .seats .num { font-size: 22px; line-height: 24px; }
  .seats .note { max-width: 132px; }
  .power { min-width: 0; padding: 5px 10px 6px 5px; }
  .power .ic { width: 30px; height: 30px; }
  .power .name { font-size: 14px; line-height: 16px; }
  .power .line { font-size: 11px; line-height: 14px; }
  .status { top: auto; bottom: calc(var(--safe-b) + 74px); }
  .bottom { left: max(12px, var(--safe-l)); right: max(12px, var(--safe-r)); bottom: calc(var(--safe-b) + 70px); }
  .toasts { max-width: 100%; }
  .toast { font-size: 12.5px; line-height: 16px; padding: 6px 10px; }
  .press { bottom: calc(var(--safe-b) + 70px); }
  .headline .h { font-size: 26px; }
  .headline .sub { font-size: 12.5px; line-height: 16px; }
  .press:not(:empty) ~ .bottom, .bottom.lifted { transform: translateY(-120px); }
}
@media (max-width: 380px) {
  #hud .top { left: 10px; right: 10px; gap: 6px; }
  .face { width: 27px; height: 27px; }
  .money .num { font-size: 24px; line-height: 28px; }
  .clock .num, .seats .num { font-size: 20px; line-height: 22px; }
  .clock svg { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .face.hot, .face.ping, .seats.hit, .money.hit { animation: none; }
  .banner.go, .headline, .toast, .bubble, .stamp, .letter, .power, .status, .routecap, .till .word { animation-duration: .01ms; animation-iteration-count: 1; }
  .banner.go { animation: none; opacity: 1; }
  .flash.go { animation: none; }
}

/* The link-preview picture (?og) */
body.og #title .col, body.og #hud { display: none !important; }
body.og #title { justify-content: flex-start; padding-top: 40px; background: linear-gradient(180deg, rgba(255,248,236,.8) 0, rgba(255,248,236,0) 45%); }
body.og #title .logo { font-size: 132px; }
body.og #title .tagline { font-size: 26px; max-width: none; margin-top: 24px; }
