/* Black Hole: the finale. 12:30 in the Commons (the 3D chamber is drawn on the canvas underneath), Thursday's
   papers on the breakfast table, then the verdict. Everything is scoped to .finale; tokens come from tokens.css. */
.finale {
  position: fixed; inset: 0; z-index: 60; overflow: hidden;
  background: var(--felt-2); color: var(--ink); font-family: var(--ui);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; color-scheme: light;
}
.finale[data-stage="speech"] { background: transparent; }
.finale *, .finale *::before, .finale *::after { box-sizing: border-box; }
.finale :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
.finale :where(button):focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.finale :where(img) { display: block; }
.finale [hidden] { display: none !important; }
.finale :where(p) { margin: 0; }

.fin-stage { position: absolute; inset: 0; overflow: hidden; }
.fin-num { font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); letter-spacing: -0.02em; font-variant-numeric: tabular-nums lining-nums; }
.fin-eyebrow { font-family: var(--ui); font-weight: 700; font-size: 11px; line-height: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }

/* One button, the same as the game's .btn */
.fin-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 18px; overflow: hidden; isolation: isolate;
  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; line-height: 1; letter-spacing: -.005em;
  transition: transform var(--t-1) var(--ease), box-shadow var(--t-1) var(--ease), background-color var(--t-2) var(--ease); }
.fin-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.fin-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.fin-btn.red { background: var(--red); color: var(--white); }
.fin-btn.red:hover { background: #EE3B35; }
.fin-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; }
.fin-btn.white:hover { background: var(--white); }
.fin-btn .fill { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: rgba(255,255,255,.55); z-index: -1; }
.fin-btn.counting .fill { width: 100%; transition: width var(--count, 7s) linear; }

/* ------------------------------------------------------------------ 12:30, the speech */
.fin-speech { --chH: 58vh; }
.fin-chamber { position: absolute; left: 0; right: 0; top: 0; height: var(--chH); }
.fin-chamber.flat { background: linear-gradient(180deg, #EAE0CB 0 30%, #C9A073 30% 42%, #6E9C7C 42%); }
.fin-chamber::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(11,18,34,.3) 0, rgba(11,18,34,0) 72px, rgba(11,18,34,0) 70%, var(--felt-2) 100%); }
/* below the chamber on a phone, the green of the benches carries on */
.fin-speech::before { content: ""; position: absolute; left: 0; right: 0; top: var(--chH); bottom: 0; background: var(--felt-2); }

.fin-top { position: absolute; left: var(--gut); right: var(--gut); top: max(12px, var(--safe-t)); display: flex; justify-content: space-between; align-items: center; gap: 12px; z-index: 6; }
.fin-clock { display: flex; align-items: center; gap: 8px; background: var(--ink); color: var(--paper); border-radius: var(--r-m); padding: 6px 12px 6px 7px; }
.fin-clock svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--gold); }
.fin-clock b { font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); font-size: 18px; line-height: 20px; font-variant-numeric: tabular-nums; }
.fin-clock span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,248,236,.7); white-space: nowrap; }
.fin-skip { display: flex; align-items: center; gap: 6px; min-height: 40px; background: rgba(11,18,34,.62); color: var(--paper); border-radius: var(--r-m); padding: 0 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.fin-skip svg { width: 14px; height: 14px; }
@media (max-width: 385px) { .fin-clock span { display: none; } }

/* 12:30: order, order */
.fin-intro { position: absolute; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--paper); background: var(--ink);
  clip-path: inset(0 0 0 0); transition: clip-path .5s cubic-bezier(.7,0,.3,1); }
.fin-intro.out { clip-path: inset(0 0 100% 0); }
.fin-intro-in { animation: fin-introin .5s var(--ease) both; padding: 0 var(--gut); }
.fin-intro .fin-eyebrow { color: var(--gold); }
.fin-intro b { display: block; margin: 8px 0 12px; font-size: clamp(88px, 28vw, 168px); line-height: .9; color: var(--paper); text-shadow: 0 .05em 0 var(--red), 0 .085em 0 #070C17; }
.fin-intro p { font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(18px, 4.6vw, 24px); line-height: 1.3; color: rgba(255,248,236,.86); text-wrap: balance; }
@keyframes fin-introin { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* the scoreboard and the speech notes, stacked at the bottom on a phone */
.fin-col { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 var(--gut) max(16px, var(--safe-b)); pointer-events: none; z-index: 4; }
.fin-col > * { pointer-events: auto; }
.fin-board { width: 100%; max-width: 520px; background: var(--paper); border: var(--edge); border-radius: var(--r-l); box-shadow: var(--drop);
  padding: 10px 14px 12px; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 8px; align-items: center; }
.fin-hemi { width: 96px; height: auto; display: block; overflow: visible; }
.fin-hemi circle { fill: var(--wash); transition: fill .35s; }
.fin-hemi circle.on { fill: var(--ink); }
.fin-hemi circle.gone { fill: #EFB3AE; }
.fin-hemi circle.lost { fill: var(--red); transition: fill .08s; }
.fin-hemi circle.won { fill: var(--green); transition: fill .08s; }
.fin-hemi .maj { stroke: var(--red); stroke-width: .016; }
.fin-hemi .majlbl { font-family: var(--ui); font-weight: 700; font-size: .14px; fill: var(--ink-2); text-anchor: middle; }
.fin-seats { min-width: 0; }
.fin-seatrow { display: flex; align-items: center; gap: 8px; }
.fin-seatnum { font-size: 40px; line-height: 42px; transition: color var(--t-2); }
.fin-seatnum.down { color: var(--red); }
.fin-seatnum.up { color: var(--green); }
.fin-delta { font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); font-size: 15px; line-height: 15px; padding: 5px 8px 4px; border-radius: var(--r-s); color: var(--white); background: var(--red);
  opacity: 0; transform: scale(.5); transition: opacity var(--t-1), transform var(--t-2) var(--pop); white-space: nowrap; }
.fin-delta.show { opacity: 1; transform: none; }
.fin-delta.pos { background: var(--green); }
.fin-seatlbl { font-size: 13px; line-height: 16px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.fin-seatlbl b { color: var(--ink); font-weight: 700; }
.fin-seatlbl b.bad { color: var(--red-ink); }
.fin-money { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.fin-money .fin-num { font-size: 19px; line-height: 20px; white-space: nowrap; transition: color var(--t-2); }
.fin-money .fin-num.struck { color: var(--red); }
.fin-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--wash); position: relative; overflow: hidden; }
.fin-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ink); transition: width .7s var(--ease), background-color var(--t-2); }
.fin-bar i.full { background: var(--green); }
.fin-bar u { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); text-decoration: none; }
.fin-money small { font-size: 12px; line-height: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }

/* heckles come out of the Members who shout them */
.fin-heckles { position: absolute; left: 0; right: 0; top: 0; height: var(--chH); z-index: 3; pointer-events: none; }
.fin-heckle { position: absolute; transform: translate(-50%, -100%); margin-top: -14px; max-width: min(64%, 300px); background: var(--white); border: var(--edge); border-radius: var(--r-m); padding: 6px 12px 7px; box-shadow: var(--drop);
  font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); font-size: 16px; line-height: 19px; color: var(--ink); white-space: nowrap;
  transform-origin: 50% 100%; animation: fin-heck 1.9s var(--ease) forwards; }
.fin-heckle::after { content: ""; position: absolute; left: calc(50% + var(--tail, 0px)); bottom: -6px; width: 10px; height: 10px; margin-left: -5px; background: inherit; border-right: var(--edge); border-bottom: var(--edge); transform: rotate(45deg); }
.fin-heckle.red { background: var(--red); color: var(--white); }
.fin-heckle.gold { background: var(--gold); }
@keyframes fin-heck { 0% { opacity: 0; transform: translate(-50%, -100%) scale(.6); } 12% { opacity: 1; transform: translate(-50%, -100%) scale(1); } 82% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -125%); } }

.fin-notes { position: relative; width: 100%; max-width: 620px; background: var(--paper); border: var(--edge); border-radius: var(--r-l); box-shadow: var(--lift);
  padding: 12px 18px 18px; min-height: 168px; display: flex; flex-direction: column; }
.fin-say { padding: 2px 0 30px; } /* room for the stamp, which lands on the bottom edge */
.fin-notes-hd { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 9px; margin-bottom: 11px; border-bottom: 1px solid var(--line); }
.fin-who { font-weight: 700; font-size: 11px; line-height: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink); display: flex; align-items: center; gap: 6px; }
.fin-who.chair { color: var(--ink-2); }
.fin-who.news { color: var(--white); background: var(--red); border-radius: var(--r-s); padding: 2px 7px; }
.fin-pips { display: flex; gap: 4px; }
.fin-pips i { width: 12px; height: 4px; border-radius: 2px; background: var(--wash); transition: background-color var(--t-2), width var(--t-2) var(--ease); }
.fin-pips i.on { background: var(--ink-3); }
.fin-pips i.now { background: var(--ink); width: 20px; }
.fin-line { font-family: var(--display); font-weight: 800; font-variation-settings: "SOFT" 50, "WONK" 0; font-size: clamp(22px, 6.4vw, 44px); line-height: 1.16; letter-spacing: -.014em; color: var(--ink); text-wrap: pretty; }
.fin-line .w { white-space: nowrap; }
.fin-line .c { opacity: 0; }
.fin-line .c.on { opacity: 1; }
.fin-line em { font-style: normal; background-image: linear-gradient(transparent 62%, rgba(245,195,59,.8) 62%, rgba(245,195,59,.8) 92%, transparent 92%); background-size: 0% 100%; background-repeat: no-repeat; transition: background-size .45s var(--ease); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.fin-line em.lit { background-size: 100% 100%; }
.fin-punch { margin-top: 10px; font-family: var(--display); font-style: italic; font-weight: 600; font-variation-settings: "SOFT" 100; font-size: clamp(19px, 5vw, 30px); line-height: 1.2; color: var(--red-ink); opacity: 0; transform: translateY(6px); transition: opacity var(--t-2), transform var(--t-3) var(--pop); }
.fin-punch.show { opacity: 1; transform: none; }

/* a rubber stamp lands on the notes (the one thing here that sits at an angle) */
.fin-stamp { --tone: var(--red); position: absolute; right: 14px; bottom: -16px; z-index: 5; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px 9px; color: var(--tone); background: var(--paper);
  border: 3px solid var(--tone); border-radius: var(--r-m); padding: 6px 8px 6px 11px; box-shadow: var(--drop);
  transform: rotate(-3deg); animation: fin-stamp .32s var(--pop) both; max-width: calc(100% - 28px); }
.fin-stamp b { font-family: var(--display); font-weight: 900; font-variation-settings: "SOFT" 0; font-size: 15px; line-height: 17px; letter-spacing: .03em; text-transform: uppercase; text-align: right; }
.fin-stamp span { flex-shrink: 0; font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); font-size: 14px; line-height: 14px; color: var(--white); background: var(--tone); border-radius: var(--r-s); padding: 5px 7px 4px; white-space: nowrap; }
.fin-stamp.good { --tone: var(--green); }
.fin-stamp.meh { --tone: var(--gold-ink); }
@keyframes fin-stamp { from { opacity: 0; transform: rotate(-3deg) scale(2); } 70% { opacity: 1; } to { opacity: 1; transform: rotate(-3deg) scale(1); } }

/* and one more thing */
.fin-magic { position: absolute; left: 50%; top: 0; width: 140px; margin-left: -70px; z-index: 5; pointer-events: none; opacity: 0; transform: translateY(30px) scale(.7); transition: opacity var(--t-2), transform .45s var(--pop); }
.fin-magic.show { opacity: 1; transform: none; }
.fin-magic svg { width: 100%; height: auto; overflow: visible; }
.fin-magic .hr-rabbit { transform: translateY(96px); transition: transform .62s cubic-bezier(.25,1.6,.4,1); }
.fin-magic.out .hr-rabbit { transform: none; }
.fin-magic .hr-paws { opacity: 0; transition: opacity .15s .4s; }
.fin-magic.out .hr-paws { opacity: 1; }
.fin-spark { position: absolute; left: 50%; top: 40%; width: 18px; height: 18px; margin: -9px 0 0 -9px; opacity: 0; }
.fin-magic.out .fin-spark { animation: fin-spark .9s var(--ease) forwards; }
@keyframes fin-spark { 0% { opacity: 0; transform: translate(0, 0) scale(.3) rotate(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1) rotate(160deg); } }

/* ------------------------------------------------------------------ Thursday, the papers */
.fin-papers { background: var(--desk); display: flex; flex-direction: column; align-items: center; }
.fin-papers::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(60,30,10,0) 0 46px, rgba(60,30,10,.07) 46px 48px, rgba(255,230,190,.04) 48px 92px, rgba(60,30,10,.06) 92px 93px); }
.fin-mug { position: absolute; right: -46px; top: 64px; width: 170px; opacity: .96; z-index: 0; }
.fin-papers-hd { position: relative; z-index: 2; text-align: center; padding-top: max(18px, var(--safe-t)); color: var(--paper); }
.fin-papers-hd .fin-eyebrow { color: var(--gold); }
.fin-papers-hd h2 { margin: 4px 0 0; font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); font-size: 30px; line-height: 34px; letter-spacing: -.02em; }
.fin-pile { position: relative; z-index: 1; flex: 1; width: 100%; min-height: 0; margin: 8px 0 0; }
.fin-papers-ft { position: relative; z-index: 2; width: 100%; max-width: 400px; padding: 0 var(--gut) max(16px, var(--safe-b)); }

/* a front page: real paper, so it may land at an angle */
.fin-fp { position: absolute; left: 50%; top: 0; width: min(318px, 82vw); margin-left: calc(min(318px, 82vw) / -2); background: #FBF8F1; color: var(--ink); border-radius: 2px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,.18), 0 18px 36px rgba(40,20,8,.32); transform: translate(var(--x, 0), 0) rotate(var(--rot, 0deg)); opacity: 0; }
.fin-fp.in { opacity: 1; animation: fin-drop .5s cubic-bezier(.3,.8,.3,1.02) both; }
@keyframes fin-drop { 0% { opacity: 0; transform: translate(var(--x, 0), -40px) rotate(calc(var(--rot, 0deg) - 8deg)) scale(1.24); } 60% { opacity: 1; } 100% { opacity: 1; transform: translate(var(--x, 0), 0) rotate(var(--rot, 0deg)) scale(1); } }
.fin-fp .fp-head { margin: 0; text-wrap: balance; }
.fin-fp .fp-photo { position: relative; overflow: hidden; background: var(--sea); }
.fin-fp .fp-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(.25) contrast(1.05); }
.fin-fp .fp-photo img.fit { object-fit: contain; padding: 6%; filter: none; }
.fin-fp .fp-photo::after { content: ""; position: absolute; inset: 0; mix-blend-mode: multiply; opacity: .28; background-image: radial-gradient(circle at 1.5px 1.5px, #14233A 1px, transparent 1.4px); background-size: 4px 4px; }
.fin-fp .fp-lines { display: flex; flex-direction: column; gap: 5px; }
.fin-fp .fp-lines i { display: block; height: 3px; border-radius: 2px; background: rgba(20,35,58,.16); }
.fin-fp .fp-lines i:nth-child(3n) { width: 82%; }
.fin-fp .fp-lines i:nth-child(4n+1) { width: 94%; }

/* tabloid */
.fp-tabloid .fp-mast { display: flex; justify-content: space-between; align-items: flex-end; background: var(--red); padding: 7px 12px 6px; border-bottom: 3px solid var(--ink); }
.fp-tabloid .fp-mast b { font-family: var(--display); font-weight: 900; font-variation-settings: "SOFT" 0, "WONK" 1; font-style: italic; font-size: 32px; line-height: 32px; letter-spacing: -.04em; color: var(--white); text-shadow: 2px 2px 0 var(--ink); }
.fp-tabloid .fp-mast span { font-size: 11px; font-weight: 700; color: var(--white); letter-spacing: .06em; }
.fp-tabloid .fp-kicker { display: inline-block; margin: 9px 12px 0; background: var(--ink); color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .1em; padding: 3px 6px; }
.fp-tabloid .fp-head { padding: 4px 12px 8px; font-family: var(--display); font-weight: 900; font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0; text-transform: uppercase; letter-spacing: -.04em; word-spacing: .14em; line-height: .9; font-size: 46px; }
.fp-tabloid .fp-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; padding: 0 12px; align-items: start; }
.fp-tabloid .fp-photo { aspect-ratio: 1 / 1; border: 2px solid var(--ink); }
.fp-tabloid .fp-strap { font-family: var(--display); font-weight: 800; font-size: 15px; line-height: 17px; letter-spacing: -.01em; color: var(--red-ink); }
.fp-tabloid .fp-stand { padding: 10px 12px 14px; font-size: 12px; line-height: 15px; font-weight: 600; }

/* broadsheet */
.fp-broad { background: #FAF8F3; }
.fp-broad .fp-mast { text-align: center; padding: 12px 12px 6px; border-bottom: 1px solid var(--ink); margin: 0 12px; }
.fp-broad .fp-mast b { display: block; font-family: var(--display); font-weight: 600; font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1; font-size: 27px; line-height: 30px; letter-spacing: -.01em; }
.fp-broad .fp-date { display: flex; justify-content: space-between; margin: 0 12px; padding: 4px 0; border-bottom: 3px double var(--ink); font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.fp-broad .fp-head { padding: 10px 12px 4px; font-family: var(--display); font-weight: 700; font-variation-settings: "opsz" 72, "SOFT" 0; font-size: 25px; line-height: 27px; letter-spacing: -.02em; }
.fp-broad .fp-strap { padding: 0 12px 10px; font-family: var(--display); font-style: italic; font-weight: 400; font-size: 14px; line-height: 17px; color: var(--ink-2); }
.fp-broad .fp-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; padding: 0 12px 14px; }
.fp-broad .fp-photo { aspect-ratio: 4 / 3; }
.fp-broad .fp-stand { font-family: var(--display); font-size: 11.5px; line-height: 14px; font-weight: 500; margin-bottom: 7px; }

/* pink money paper */
.fp-pink { background: #F9DCCB; }
.fp-pink .fp-mast { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 0 6px; border-bottom: 2px solid var(--ink); margin: 0 12px; }
.fp-pink .fp-mast b { font-family: var(--display); font-weight: 800; font-variation-settings: "opsz" 144, "SOFT" 0; font-size: 22px; line-height: 24px; letter-spacing: .06em; }
.fp-pink .fp-mast span { font-size: 10px; font-weight: 700; }
.fp-pink .fp-tick { display: flex; gap: 10px; margin: 0 12px; padding: 5px 0; border-bottom: 1px solid rgba(20,35,58,.35); font-size: 9.5px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; overflow: hidden; }
.fp-pink .fp-tick .dn { color: var(--red-ink); }
.fp-pink .fp-tick .upx { color: var(--green); }
.fp-pink .fp-head { padding: 10px 12px 6px; font-family: var(--display); font-weight: 700; font-variation-settings: "opsz" 72, "SOFT" 0; font-size: 24px; line-height: 26px; letter-spacing: -.02em; }
.fp-pink .fp-row { display: grid; grid-template-columns: 1fr 1.1fr; gap: 10px; padding: 2px 12px 14px; align-items: start; }
.fp-pink .fp-chart { background: rgba(255,255,255,.35); border: 1px solid rgba(20,35,58,.25); padding: 6px; }
.fp-pink .fp-chart b { display: block; font-size: 8.5px; letter-spacing: .08em; font-weight: 700; margin-bottom: 2px; }
.fp-pink .fp-chart svg { width: 100%; height: auto; display: block; }
.fp-pink .fp-strap { font-family: var(--display); font-style: italic; font-size: 12.5px; line-height: 15px; margin-bottom: 6px; color: var(--ink-2); }
.fp-pink .fp-stand { font-size: 11px; line-height: 14px; font-weight: 600; margin-bottom: 7px; }

/* ------------------------------------------------------------------ the verdict */
.fin-verdict { background: var(--sea); overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.fin-vwrap { position: relative; min-height: 100%; display: flex; justify-content: center; align-items: center; gap: 56px; padding: max(18px, var(--safe-t)) var(--gut) max(18px, var(--safe-b)); }
.fin-vcol { width: 100%; max-width: 430px; display: flex; flex-direction: column; gap: 12px; }
.fin-vhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 2px; }
.fin-vhead .fin-eyebrow b { color: var(--ink); font-weight: 700; }

/* who you turned out to be */
.fin-persona { background: var(--paper); border: var(--edge); border-radius: var(--r-l); box-shadow: var(--drop); overflow: hidden; animation: fin-up var(--t-3) var(--ease) both; }
.fin-persona .pic { position: relative; height: 150px; display: flex; align-items: center; justify-content: center; background: var(--bg, #E3DAF5); border-bottom: var(--edge); }
.fin-persona .pic img { position: relative; height: 124px; width: auto; }
.fin-persona .pic img.face { height: 112px; border-radius: 50%; }
.fin-persona .pic img.round { width: 112px; height: 112px; object-fit: cover; object-position: 50% 30%; border-radius: 50%; border: var(--edge); }
.fin-persona .txt { padding: 14px 16px 16px; text-align: center; }
.fin-grade { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--white); background: var(--green); border-radius: var(--r-s); padding: 4px 8px 3px; animation: fin-pop var(--t-3) var(--pop) .35s both; }
.fin-grade.bad { background: var(--red); }
.fin-grade.meh { background: var(--gold); color: var(--ink); }
.fin-persona .nm { margin-top: 10px; font-family: var(--display); font-weight: 900; font-variation-settings: var(--soft); font-size: 30px; line-height: 32px; letter-spacing: -.02em; text-wrap: balance; }
.fin-persona .ln { margin-top: 4px; font-family: var(--display); font-style: italic; font-weight: 500; font-size: 17px; line-height: 22px; color: var(--ink-2); text-wrap: balance; }
@keyframes fin-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fin-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

.fin-ticket { background: var(--paper); border: var(--edge); border-radius: var(--r-l); box-shadow: var(--drop); padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 12px; animation: fin-up var(--t-3) var(--ease) .12s both; }
.fin-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.fin-stat { padding: 0 10px; border-left: 1px solid var(--line); }
.fin-stat:first-child { padding-left: 0; border-left: 0; }
.fin-stat .fin-num { font-size: clamp(24px, 7vw, 32px); line-height: 1.1; white-space: nowrap; }
.fin-stat small { display: block; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-2); }
.fin-stat .bad { color: var(--red); }
.fin-stat .good { color: var(--green); }
.fin-rule { height: 1px; background: var(--line); }
.fin-angry { display: flex; flex-direction: column; gap: 9px; }
.fin-angry-hd b { font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.fin-faces { display: flex; justify-content: space-between; gap: 4px; }
.fin-face { position: relative; width: 44px; height: 44px; border-radius: 50%; padding: 3px; flex-shrink: 0; background: conic-gradient(var(--red) calc(var(--f) * 1turn), var(--wash) 0); }
.fin-face img { width: 38px; height: 38px; border-radius: 50%; background: var(--paper); }
.fin-face.calm img { opacity: .8; }
.fin-face.revolt { background: var(--red); }
.fin-face.revolt::after { content: "!"; position: absolute; right: -3px; top: -3px; width: 17px; height: 17px; border-radius: 50%; background: var(--red); color: var(--white); border: 2px solid var(--paper); font-family: var(--display); font-weight: 900; font-size: 11px; line-height: 13px; text-align: center; }
.fin-lost { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-2); text-wrap: pretty; }
.fin-lost b { color: var(--ink); font-weight: 700; }
.fin-actions { display: flex; flex-direction: column; gap: 10px; animation: fin-up var(--t-3) var(--ease) .24s both; }
.fin-two { display: flex; gap: 10px; }
.fin-two .fin-btn { flex: 1; }
.fin-small { text-align: center; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-2); }

/* you vs the real Budget (only once src/real.js is filled in) */
.fin-real { background: var(--paper); border: var(--edge); border-radius: var(--r-l); box-shadow: var(--drop); padding: 12px 14px 13px; display: flex; flex-direction: column; gap: 8px; animation: fin-up var(--t-3) var(--ease) .18s both; }
.fin-real.d { display: none; }
.fin-real-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.fin-real-hd b { font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink); }
.fin-real-hd span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.fin-real-sum { font-family: var(--display); font-weight: 800; font-variation-settings: "SOFT" 50; font-size: 17px; line-height: 21px; letter-spacing: -.01em; text-wrap: pretty; }
.fin-real-grid { display: grid; grid-template-columns: auto 1fr 1fr; column-gap: 12px; align-items: center; border-top: 1px solid var(--line); padding-top: 6px; }
.fin-real-grid > span { padding: 5px 0; min-width: 0; }
.fin-real-grid > span:nth-child(n+4) { border-top: 1px solid var(--line); }
.fin-real-grid .col { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding: 0 0 2px; }
.fin-real-grid .k { font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.fin-real-grid .v { font-size: 20px; line-height: 22px; }
.fin-real-grid .t { font-size: 13px; line-height: 16px; font-weight: 700; color: var(--ink); }
.fin-real-grid .t.bad { color: var(--red-ink); }
.fin-real-grid .faces { display: flex; align-items: center; }
.fin-real-grid .faces img { width: 28px; height: 28px; border-radius: 50%; margin-right: -5px; box-shadow: 0 0 0 2px var(--paper); background: var(--paper); }
.fin-real-grid .faces img.both { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--gold); margin-right: 1px; }
.fin-real-grid .faces em { font-style: italic; font-family: var(--display); font-size: 13px; color: var(--ink-2); }
.fin-real-line { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 13.5px; line-height: 18px; color: var(--ink-2); text-wrap: pretty; }
.fin-real-line span { font-style: normal; font-family: var(--ui); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); margin-right: 2px; }
@media (max-width: 859px), (max-height: 559px) {
  .fin-verdict.has-real .fin-persona .pic { height: 112px; }
  .fin-verdict.has-real .fin-persona .pic img { height: 96px; }
  .fin-verdict.has-real .fin-persona .pic img.face, .fin-verdict.has-real .fin-persona .pic img.round { height: 90px; width: auto; }
  .fin-verdict.has-real .fin-persona .pic img.round { width: 90px; }
  .fin-verdict.has-real .fin-small { display: none; }
  /* when the page is taller than the phone, the buttons stay in reach */
  .fin-verdict.has-real .fin-actions { position: sticky; bottom: 0; z-index: 3; margin: 0 calc(-1 * var(--gut)) calc(-1 * max(18px, var(--safe-b))); padding: 16px var(--gut) max(16px, var(--safe-b));
    background: linear-gradient(180deg, rgba(207,230,225,0) 0, var(--sea) 18px); }
}

/* the share card, as it will be posted */
.fin-cardcol { display: none; }
.fin-thumb { display: block; width: 30px; height: 38px; margin: -6px 4px -6px -4px; flex-shrink: 0; border: 2px solid var(--ink); border-radius: 3px; overflow: hidden; background: var(--paper); animation: fin-pop var(--t-3) var(--pop) both; }
.fin-thumb img { width: 100%; height: 100%; display: block; }
.fin-btn.has-thumb > svg { display: none; }
.fin-card { width: 100%; aspect-ratio: 1080 / 1350; border-radius: 4px; background: var(--paper); border: 1px solid rgba(20,35,58,.2); box-shadow: 0 2px 0 rgba(20,35,58,.18), 0 24px 48px rgba(20,35,58,.24); overflow: hidden; position: relative; animation: fin-up .5s var(--ease) .15s both; }
.fin-card img { width: 100%; height: 100%; }
.fin-card .wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-style: italic; font-size: 18px; color: var(--ink-2); }
.fin-cardcap { margin-top: 16px; text-align: center; font-size: 13px; font-weight: 600; color: var(--ink-2); }

.fin-toast { position: absolute; left: 50%; top: max(16px, var(--safe-t)); z-index: 80; transform: translate(-50%, -20px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--paper); border-radius: var(--r-m); padding: 10px 15px; font-size: 13.5px; font-weight: 700; box-shadow: var(--lift); transition: opacity var(--t-2), transform var(--t-3) var(--pop); white-space: nowrap; }
.fin-toast.show { opacity: 1; transform: translate(-50%, 0); }
.fin-toast svg { width: 16px; height: 16px; color: #8FE0B4; }

/* stage changes */
.fin-stage.enter { animation: fin-fadein .4s var(--ease) both; }
@keyframes fin-fadein { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------------ wide screens */
@media (min-width: 860px) and (min-height: 560px) {
  .fin-speech { --chH: 100vh; }
  .fin-speech::before { display: none; }
  .fin-chamber::after { background: linear-gradient(180deg, rgba(11,18,34,.3) 0, rgba(11,18,34,0) 90px, rgba(11,18,34,0) 55%, rgba(11,18,34,.45) 100%); }
  .fin-top { left: 32px; right: 32px; top: 24px; }
  .fin-clock { padding: 7px 16px 7px 8px; }
  .fin-clock b { font-size: 22px; line-height: 24px; }
  .fin-clock svg { width: 26px; height: 26px; }
  .fin-skip { padding: 0 16px; min-height: 42px; }
  .fin-col { display: contents; }
  .fin-board { position: absolute; right: 32px; top: 84px; width: 400px; padding: 14px 18px 16px; column-gap: 18px; z-index: 4; }
  .fin-hemi { width: 140px; }
  .fin-seatnum { font-size: 52px; line-height: 52px; }
  .fin-heckles { height: 70vh; }
  .fin-heckle { font-size: 21px; line-height: 24px; padding: 8px 14px 9px; }
  .fin-say { padding-bottom: 6px; }
  .fin-notes { position: absolute; left: 50%; bottom: 40px; width: min(780px, calc(100vw - 64px)); margin-left: calc(min(780px, calc(100vw - 64px)) / -2); padding: 16px 30px 28px; min-height: 210px; z-index: 4; }
  .fin-who { font-size: 12px; }
  .fin-line { font-size: 44px; line-height: 1.12; }
  .fin-punch { font-size: 30px; }
  .fin-stamp { right: 28px; bottom: -22px; padding: 7px 10px 7px 16px; flex-wrap: nowrap; }
  .fin-stamp b { font-size: 22px; line-height: 24px; white-space: nowrap; }
  .fin-stamp span { font-size: 18px; line-height: 18px; padding: 6px 9px 5px; }
  .fin-magic { width: 200px; margin-left: -100px; }

  .fin-papers-hd { padding-top: 34px; }
  .fin-papers-hd h2 { font-size: 40px; line-height: 44px; }
  .fin-mug { width: 230px; right: 4vw; top: auto; bottom: -40px; }
  .fin-fp { width: 340px; margin-left: -170px; }
  .fp-tabloid .fp-head { font-size: 52px; }
  .fp-broad .fp-head { font-size: 28px; line-height: 30px; }
  .fp-pink .fp-head { font-size: 27px; line-height: 29px; }
  .fin-papers-ft { padding-bottom: 32px; max-width: 360px; }

  .fin-cardcol { display: block; width: min(480px, calc((100vh - 120px) * .8)); flex-shrink: 0; }
  .fin-thumb { display: none; }
  .fin-btn.has-thumb > svg { display: inline; }
  .fin-verdict.has-real .fin-cardcol { width: min(440px, calc((100vh - 400px) * .8)); min-width: 340px; }
  .fin-real.m { display: none; }
  .fin-real.d { display: flex; margin-top: 20px; }
  .fin-real.d .fin-real-sum { font-size: 16px; line-height: 20px; }
  .fin-real.d .fin-real-grid > span { padding: 4px 0; }
  .fin-vcol { max-width: 440px; }
  .fin-persona .pic { height: 160px; }
  .fin-persona .nm { font-size: 32px; line-height: 34px; }
}

/* short laptops */
@media (min-width: 860px) and (min-height: 560px) and (max-height: 800px) {
  .fin-persona .pic { height: 120px; }
  .fin-persona .pic img { height: 100px; }
  .fin-persona .pic img.face, .fin-persona .pic img.round { height: 96px; width: auto; }
  .fin-persona .pic img.round { width: 96px; }
  .fin-persona .nm { font-size: 28px; line-height: 30px; }
  .fin-vcol { gap: 10px; }
}

/* short phones */
@media (max-height: 700px) and (max-width: 859px) {
  .fin-speech { --chH: 50vh; }
  .fin-vcol { gap: 9px; }
  .fin-persona .pic { height: 104px; }
  .fin-persona .pic img { height: 88px; }
  .fin-persona .pic img.face, .fin-persona .pic img.round { height: 84px; width: auto; }
  .fin-persona .pic img.round { width: 84px; }
  .fin-persona .txt { padding: 10px 12px 12px; }
  .fin-persona .nm { font-size: 24px; line-height: 26px; margin-top: 8px; }
  .fin-persona .ln { font-size: 14px; line-height: 18px; }
  .fin-ticket { padding: 10px 12px; gap: 9px; }
  .fin-stat .fin-num { font-size: 24px; }
  .fin-stat small { font-size: 11px; line-height: 14px; }
  .fin-face { width: 38px; height: 38px; }
  .fin-face img { width: 32px; height: 32px; }
  .fin-lost { font-size: 12px; line-height: 16px; }
  .fin-btn { min-height: 48px; font-size: 17px; }
  .fin-btn.white { min-height: 42px; }
  .fin-small { display: none; }
  .fin-notes { min-height: 132px; }
  .fin-line { font-size: 21px; }
  .fin-hemi { width: 76px; }
  .fin-seatnum { font-size: 32px; line-height: 34px; }
}

/* ------------------------------------------------------------------ calm mode */
.finale[data-reduced] *, .finale[data-reduced] *::before, .finale[data-reduced] *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
@media (prefers-reduced-motion: reduce) {
  .finale *, .finale *::before, .finale *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
}
