:root {
  --bar: 56px;
  --pen: #1d2f86;
  --hl: #ffe600;
  --stamp: #d3141c;
  --navy: #0a1a44;
  --gold: #ffd400;
  --wallpat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='120'%3E%3Crect width='240' height='120' fill='%23ddd6c5'/%3E%3Cpath d='M0 1.5H240M0 61.5H240M1.5 0V60M121.5 0V60M61.5 60V120M181.5 60V120' stroke='%23c9c1ad' stroke-width='3'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: #ddd6c5; color: #111;
  font-family: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}
button { font-family: inherit; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------------- the break-room wall */
#wall, #loader, .printer {
  background-color: #ddd6c5;
  background-image: radial-gradient(ellipse 80% 70% at 50% 35%, rgba(255, 252, 240, .35), rgba(0, 0, 0, 0) 70%), radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 60%, rgba(60, 45, 20, .18) 100%), var(--wallpat);
  background-size: auto, auto, 240px 120px;
}
#wall { position: fixed; inset: 0; }
#frame {
  position: absolute; top: var(--bar); left: 0; right: 0; bottom: 0;
  overflow: auto; display: flex; padding: 8px 16px 18px;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
#paper {
  position: relative; flex: none; margin: auto;
  background: #fdfcf7;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .12), 0 2px 4px rgba(40, 30, 10, .08), 0 14px 30px rgba(40, 30, 10, .22);
  transform: rotate(-.22deg);
}
body.ready #paper { animation: tapeup .6s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes tapeup { from { transform: translateY(-14px) rotate(-1.2deg); opacity: 0; } }
#sheet { display: block; width: 100%; height: 100%; }
.tape {
  position: absolute; top: -13px; width: 104px; height: 30px; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(240, 228, 190, .88), rgba(228, 214, 172, .86));
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  clip-path: polygon(2% 8%, 9% 0, 17% 9%, 25% 2%, 34% 10%, 44% 1%, 53% 9%, 62% 2%, 71% 8%, 80% 0, 89% 9%, 97% 3%, 100% 50%, 97% 96%, 88% 90%, 79% 100%, 70% 92%, 61% 99%, 52% 91%, 43% 100%, 33% 92%, 24% 99%, 15% 91%, 7% 100%, 0 52%);
}
.tape.tl { left: -26px; transform: rotate(-33deg); }
.tape.tr { right: -26px; transform: rotate(31deg); }

/* the printed sheet */
.pg { fill: #fdfcf7; }
#print .pg { fill: #fff; }
.ly-lines line { stroke: #1a1a1a; stroke-width: 1.7; stroke-linecap: square; }
.cbox { fill: #fff; stroke: #1a1a1a; stroke-width: 2.2; }
.typ { font-family: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif; fill: #151515; }
.ttl { font-size: 52px; font-weight: 800; letter-spacing: 4px; }
.rnd { font-size: 12.5px; font-weight: 700; letter-spacing: 1.6px; fill: #3d3d3d; }
.reg { font-size: 40px; font-weight: 800; letter-spacing: 6px; fill: #d5d1c7; }
.cl { font-size: 17px; font-weight: 800; letter-spacing: 5px; }
.sd { font-size: 13px; font-weight: 700; fill: #6a6a6a; }
.nm { font-size: 17px; font-weight: 600; }
.nm.lost { fill: #a2a2a2; font-weight: 500; }
.bye { font-size: 15px; font-weight: 600; font-style: italic; fill: #a8a8a8; letter-spacing: 2px; }
.thb { fill: none; stroke: #1a1a1a; stroke-width: .8; }
.thm.dim { opacity: .4; filter: grayscale(1); }
.hand { font-family: 'Kalam', 'Comic Sans MS', cursive; font-weight: 700; font-size: 19px; fill: var(--pen); }
.hand.champ { font-size: 34px; }
.pc { font-size: 30px; font-weight: 800; }
.cli { font-size: 13px; font-weight: 700; letter-spacing: 2.5px; fill: #6a6a6a; }
.hl { fill: var(--hl); opacity: .62; mix-blend-mode: multiply; }
.circ { fill: none; stroke: var(--pen); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.stmp { opacity: .86; mix-blend-mode: multiply; transform-box: fill-box; transform-origin: center; }
.stmp rect { fill: none; stroke: var(--stamp); stroke-width: 3.4; }
.stmp text { fill: var(--stamp); font-size: 22px; font-weight: 800; letter-spacing: 3.5px; }
.stmp.slam { animation: slam .24s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes slam { from { transform: scale(2); opacity: 0; } to { transform: scale(1); opacity: .86; } }
.hit { fill: transparent; }
.hit.live { cursor: pointer; }
.hit.live:hover { fill: rgba(255, 230, 0, .14); }
.hit:focus { outline: none; }
.hit:focus-visible { fill: rgba(255, 230, 0, .2); stroke: var(--pen); stroke-width: 2.5; }
.hit.next { animation: nextp 1.8s ease-in-out infinite; }
@keyframes nextp { 0%, 100% { fill: rgba(255, 230, 0, 0); } 50% { fill: rgba(255, 230, 0, .22); } }

/* ---------------- sticky notes on the wall */
#bar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--bar); z-index: 40;
  display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 16px; pointer-events: none;
}
.note {
  pointer-events: auto; cursor: pointer; border: 0; border-radius: 1px;
  font-family: 'Kalam', 'Comic Sans MS', cursive; font-weight: 700; font-size: 19px; line-height: 1; color: #3b3200;
  background: linear-gradient(170deg, #fff58f, #ffec5c); min-height: 40px; padding: 10px 16px 6px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .14), 2px 5px 9px rgba(60, 40, 0, .16);
  transform: rotate(-2.2deg); transition: transform .15s;
}
.note:hover { transform: rotate(-1deg) translateY(-1px); }
.note:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; }
.note.snd { width: 44px; height: 42px; padding: 0; display: grid; place-items: center; background: linear-gradient(170deg, #ffd7ea, #ffc2de); transform: rotate(2.4deg); }
.snd svg { width: 22px; height: 22px; fill: none; stroke: #3b3200; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.snd svg path:first-child { fill: #3b3200; }
.snd .off, .snd.muted .on { display: none; }
.snd.muted .off { display: inline; }

/* ---------------- the TV matchup card */
.tv {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center;
  padding: calc(var(--bar) + 2px) 28px 26px; background: rgba(14, 16, 28, .5);
}
.tv.on { animation: fadein .25s both; }
.tv.off { animation: fadeout .3s both; }
@keyframes fadein { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }
.tv-in {
  position: relative; width: min(1200px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain;
  color: #fff; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .14);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0) 0 30%, rgba(255, 255, 255, .05) 30% 46%, rgba(255, 255, 255, 0) 46%),
    radial-gradient(120% 95% at 50% 0%, #1b3d8a 0%, #0c1f52 45%, #060f2c 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}
.tv.on .tv-in { animation: tvin .4s cubic-bezier(.2, .9, .25, 1) both; }
.tv.off .tv-in { animation: tvout .3s ease-in both; }
@keyframes tvin { from { transform: translateY(22px) scale(.975); opacity: 0; } }
@keyframes tvout { to { transform: translateY(30px); opacity: 0; } }
.tv-in:focus { outline: none; }
.tv-in::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .13) 50%, rgba(255, 255, 255, 0) 62%);
  transform: translateX(-110%);
}
.tv.on .tv-in::after { animation: sheen 1.1s .3s ease-out both; }
@keyframes sheen { to { transform: translateX(110%); } }
.tv-top {
  display: flex; align-items: stretch; gap: 0; min-height: 50px;
  background: linear-gradient(180deg, #08143a, #050d27); border-bottom: 3px solid var(--gold);
  font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: 2px; font-size: 22px;
}
.tv-region {
  display: flex; align-items: center; padding: 0 22px 0 20px; background: var(--gold); color: var(--navy);
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
}
.tv-region:empty { display: none; }
.tv-round { display: flex; align-items: center; padding: 0 18px; }
.tv.final .tv-top { background: linear-gradient(90deg, #6b4b00, #b98a00 40%, #6b4b00); border-bottom-color: #fff3b0; }
.tv-x {
  margin-left: auto; width: 50px; border: 0; background: transparent; color: #fff; cursor: pointer;
  font: 400 34px/1 system-ui, sans-serif; opacity: .8;
}
.tv-x:hover, .tv-x:focus-visible { opacity: 1; background: rgba(255, 255, 255, .1); outline: none; }
.tv-split {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px;
  padding: 20px 22px 24px; container-type: inline-size;
}
.tv-team { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tv.on .tv-team[data-side="0"] { animation: inL .55s .06s cubic-bezier(.2, .9, .25, 1) both; }
.tv.on .tv-team[data-side="1"] { animation: inR .55s .06s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes inL { from { transform: translateX(-70px); opacity: 0; } }
@keyframes inR { from { transform: translateX(70px); opacity: 0; } }
.tv-pic {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .2), 0 14px 34px rgba(0, 0, 0, .45);
  transition: box-shadow .35s, filter .45s, transform .35s;
}
.tv-pic .bg { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); object-fit: cover; filter: blur(20px) brightness(.55) saturate(1.2); }
.tv-pic .fg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tv-id { display: flex; align-items: center; gap: 14px; padding-left: 12px; border-left: 7px solid var(--team, #2a4fa8); min-height: 54px; transition: opacity .4s; }
.seed {
  flex: none; display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 6px;
  background: #fff; color: var(--navy); font-weight: 800; font-size: 29px; font-style: normal; border-radius: 3px;
}
.tv-nm { min-width: 0; }
.tv-nm h2 { margin: 0; font-size: clamp(28px, 3.6vw, 48px); line-height: .92; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .3px; overflow-wrap: anywhere; }
.tv-nm p:empty, .cs-id p:empty, .tm-nm small:empty { display: none; }
.tv-nm p { margin: 4px 0 0; font-size: 15px; font-weight: 700; letter-spacing: 2.5px; color: #a9b8e2; text-transform: uppercase; }
.tv-btns { display: flex; gap: 10px; transition: opacity .4s; }
.tv-btns button {
  font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 21px; letter-spacing: 1.5px;
  min-height: 50px; padding: 10px 22px 8px; border-radius: 4px; cursor: pointer;
}
.pick { flex: 1; border: 0; background: linear-gradient(180deg, #ffe14d, var(--gold)); color: var(--navy); box-shadow: 0 3px 0 #a88600; }
.pick:hover { filter: brightness(1.06); }
.pick:active { transform: translateY(2px); box-shadow: 0 1px 0 #a88600; }
.watch { display: inline-flex; align-items: center; gap: 9px; background: rgba(255, 255, 255, .04); color: #fff; border: 2px solid rgba(255, 255, 255, .55); }
.watch:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.watch svg { width: 14px; height: 14px; fill: currentColor; }
.tv-btns button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.tv-vs { position: absolute; left: 50%; top: calc(20px + (100cqw - 68px) * 9 / 64); width: 0; height: 0; pointer-events: none; z-index: 2; }
.tv-vs span {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2d5fd4, #0a1a44 70%); border: 3px solid var(--gold);
  font-size: 30px; font-weight: 800; font-style: italic; letter-spacing: 1px; color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
}
.tv.on .tv-vs span { animation: vsin .45s .32s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes vsin { from { transform: translate(-50%, -50%) scale(2.4); opacity: 0; } }
.tv-team.won .tv-pic { box-shadow: 0 0 0 4px var(--gold), 0 0 44px rgba(255, 212, 0, .55); transform: scale(1.015); }
.tv-team.lost .tv-pic { filter: grayscale(1) brightness(.5); transform: scale(.985); }
.tv-team.lost .tv-id { opacity: .45; }
.tv-team.lost .pick { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; }
.tv-team.won .pick { background: #fff; }
.tv-team.static .tv-pic, .tv-team.static .tv-id { transition: none; }
.stamp {
  position: absolute; left: 50%; top: 50%; z-index: 2; pointer-events: none;
  padding: .02em .28em 0; border: .085em solid var(--stamp); border-radius: .08em;
  color: var(--stamp); font-size: clamp(44px, 6.4vw, 92px); font-weight: 800; letter-spacing: .07em; line-height: 1.04;
  background: rgba(255, 255, 255, .08); opacity: 0; transform: translate(-50%, -50%) rotate(-12deg) scale(2.1);
  -webkit-mask-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' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 1.85'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-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' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 1.85'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  text-shadow: 0 0 1px rgba(211, 20, 28, .6);
}
.tv-team.stamped .stamp { animation: tvslam .26s cubic-bezier(.3, 1.5, .5, 1) forwards; }
.tv-team.static.stamped .stamp { animation: none; opacity: .94; transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
@keyframes tvslam { to { opacity: .94; transform: translate(-50%, -50%) rotate(-12deg) scale(1); } }
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

/* ---------------- teams (a second printout) */
.teams {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  padding: calc(var(--bar) + 4px) 20px 20px; background: rgba(40, 30, 12, .42);
}
.teams-paper {
  position: relative; width: min(1180px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain;
  background: #fdfcf7; padding: 22px 30px 30px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); transform: rotate(.15deg);
}
.teams-paper h2 { margin: 0 0 16px; padding-bottom: 8px; border-bottom: 2.5px solid #111; font-size: 36px; font-weight: 800; letter-spacing: 4px; text-transform: uppercase; }
.teams-x { position: absolute; right: 10px; top: 10px; width: 48px; height: 48px; border: 0; background: transparent; font: 400 36px/1 system-ui, sans-serif; color: #111; cursor: pointer; }
.teams-x:hover, .teams-x:focus-visible { background: rgba(0, 0, 0, .06); outline: none; }
.teams-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 24px; }
.tm-col h3 { margin: 0 0 4px; font-size: 22px; font-weight: 800; letter-spacing: 5px; text-transform: uppercase; color: #8d897e; }
.tm-row {
  display: grid; grid-template-columns: 20px 76px minmax(0, 1fr); align-items: center; gap: 9px;
  width: 100%; padding: 7px 4px; border: 0; border-bottom: 1.5px solid #222; background: transparent;
  text-align: left; cursor: pointer; color: #111;
}
.tm-row:hover, .tm-row:focus-visible { background: rgba(255, 230, 0, .45); outline: none; }
.tm-sd { font-size: 15px; font-weight: 700; color: #666; text-align: right; }
.tm-row img { display: block; width: 76px; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid #222; }
.tm-nm strong { display: block; font-size: 19px; font-weight: 700; line-height: 1.02; }
.tm-nm small { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; letter-spacing: 1.8px; color: #7a7a7a; }
.about { margin-top: 26px; padding-top: 12px; border-top: 2.5px solid #111; font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 15px; line-height: 1.45; color: #222; max-width: 720px; }
.about h3 { margin: 0 0 4px; font-family: 'Barlow Condensed', Arial, sans-serif; font-size: 24px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.about p { margin: 0 0 6px; }
.ab-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ab-links a { color: var(--pen); }

/* ---------------- the case study: the broadcast's feature */
.cs { position: fixed; inset: 0; z-index: 68; display: flex; flex-direction: column; color: #eef2ff; background: radial-gradient(120% 60% at 50% 0%, #10275f, #060f2c 70%); }
.cs.on { animation: fadein .25s both; }
.cs-top {
  flex: none; display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px max(18px, env(safe-area-inset-left));
  background: linear-gradient(180deg, #08143a, #050d27); border-bottom: 4px solid var(--gold);
}
.cs-id { min-width: 0; }
.cs-id h2 { margin: 0; font-size: clamp(26px, 4vw, 46px); line-height: .95; font-weight: 800; font-style: italic; text-transform: uppercase; }
.cs-id p { margin: 3px 0 0; font-size: 14px; font-weight: 700; letter-spacing: 2.5px; color: #a9b8e2; text-transform: uppercase; }
.cs-x { margin-left: auto; flex: none; width: 52px; height: 52px; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .08); color: #fff; font: 400 36px/1 system-ui, sans-serif; cursor: pointer; }
.cs-x:hover, .cs-x:focus-visible { background: rgba(255, 255, 255, .18); outline: none; }
.cs-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.cs-body {
  max-width: 1120px; margin: 0 auto; padding: 26px 22px 72px;
  --ab-fg: #eef2ff; --ab-muted: #a9b8e2; --ab-accent: var(--gold); --ab-chrome: 120px;
  font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 18px; line-height: 1.5;
}
.cs-body .ab-lede { font-size: 22px; line-height: 1.4; max-width: 46em; }
.cs-body .ab-heading { font-family: 'Barlow Condensed', Arial, sans-serif; font-size: 26px; font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: 1px; padding-left: 12px; border-left: 6px solid var(--gold); }
.cs-body .ab-text { max-width: 46em; color: #d6def5; }
.cs-body .ab-credits { padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .2); }
.cs-body .ab-frame { box-shadow: 0 0 0 2px rgba(255, 255, 255, .14), 0 14px 34px rgba(0, 0, 0, .45); }
.cs-body figcaption { font-family: 'Barlow Condensed', Arial, sans-serif; font-weight: 700; font-size: 17px; letter-spacing: 1.5px; text-transform: uppercase; }
.cs-body audio { filter: invert(.92) hue-rotate(180deg); }

/* ---------------- the champion's montage */
.montage { position: fixed; inset: 0; z-index: 70; background: #000; overflow: hidden; color: #fff; }
.mt-stage { position: absolute; inset: 0; }
.shot { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease-in-out; }
.shot.in { opacity: 1; }
.shot .bg { position: absolute; inset: -60px; width: calc(100% + 120px); height: calc(100% + 120px); object-fit: cover; filter: blur(34px) brightness(.38) saturate(1.15); }
.shot .fg {
  position: absolute; left: 7%; top: 10%; width: 86%; height: 80%; object-fit: contain;
  filter: contrast(1.05) saturate(.9) sepia(.08) brightness(1.02);
  animation: push var(--d, 6s) linear both;
}
@keyframes push { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.075) translate(var(--dx, 0), var(--dy, 0)); } }
.mt-film { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(84vw, calc(78vh * 16 / 9)); aspect-ratio: 16 / 9; background: #000; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.mt-film.portrait { width: auto; height: min(80vh, calc(84vw * 16 / 9)); aspect-ratio: 9 / 16; }
.mt-film iframe { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
.shot.film .mt-film { opacity: 0; transition: opacity 1.4s ease-in-out; }
.shot.film.playing .mt-film { opacity: 1; }
.shot.film .fg { transition: opacity 1.4s ease-in-out; }
.shot.film.playing .fg { opacity: 0; }
.mt-grain {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, .6) 100%), linear-gradient(180deg, rgba(255, 220, 160, .05), rgba(0, 0, 0, 0));
}
.montage::before, .montage::after { content: ''; position: absolute; left: 0; right: 0; height: 6.5vh; background: #000; z-index: 3; pointer-events: none; }
.montage::before { top: 0; }
.montage::after { bottom: 0; }
.mt-lower {
  position: absolute; left: 6vw; bottom: calc(6.5vh + 34px); z-index: 4; pointer-events: none;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  opacity: 0; transform: translateX(-36px); transition: opacity 1s ease, transform 1.2s cubic-bezier(.2, .9, .25, 1);
}
.montage.lower .mt-lower { opacity: 1; transform: none; }
.mt-lower .seed { min-width: 50px; height: 50px; font-size: 32px; }
.mt-name { font-size: clamp(32px, 5vw, 70px); line-height: .95; font-weight: 800; font-style: italic; text-transform: uppercase; text-shadow: 0 3px 16px rgba(0, 0, 0, .7); }
.mt-tag { padding: 6px 12px 4px; background: var(--gold); color: var(--navy); font-size: clamp(15px, 1.6vw, 21px); font-weight: 800; letter-spacing: 5px; text-transform: uppercase; }
.mt-btns { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: 12px; z-index: 5; display: flex; gap: 8px; }
.mt-btns button {
  min-height: 40px; padding: 8px 16px 6px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 3px;
  background: rgba(0, 0, 0, .35); color: rgba(255, 255, 255, .85); font-weight: 700; font-size: 17px; letter-spacing: 2px; text-transform: uppercase; cursor: pointer;
}
.mt-btns button:hover, .mt-btns button:focus-visible { background: rgba(255, 255, 255, .16); color: #fff; outline: none; }
.black { position: fixed; inset: 0; z-index: 90; background: #000; opacity: 0; pointer-events: none; transition: opacity .9s ease; }
.black.on { opacity: 1; pointer-events: auto; }

/* ---------------- the break-room printer */
.printer { position: fixed; inset: 0; z-index: 65; overflow: hidden; }
.pr-machine { position: absolute; left: 50%; top: 4vh; width: min(980px, 90vw); transform: translateX(-50%); transition: transform .8s cubic-bezier(.5, 0, .3, 1), opacity .7s; z-index: 2; }
.pr-top { height: 20px; margin: 0 9%; border-radius: 9px 9px 0 0; background: linear-gradient(180deg, #ecebe6, #d4d1c8); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6); }
.pr-body {
  position: relative; height: clamp(104px, 17vh, 160px); border-radius: 12px;
  background: linear-gradient(180deg, #f4f3ef, #dedbd3 70%, #cfcbc1);
  box-shadow: 0 12px 30px rgba(40, 30, 10, .28), inset 0 -7px 0 rgba(0, 0, 0, .07), inset 0 2px 0 rgba(255, 255, 255, .7);
}
.pr-lcd {
  position: absolute; right: 7%; top: 20%; width: 28%; height: 30%; display: grid; place-items: center;
  background: linear-gradient(180deg, #a9bea3, #94ab8e); border: 3px solid #4d4d4d; border-radius: 4px;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .35); color: #1c2a19; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: clamp(12px, 1.9vw, 19px);
}
.pr-led { position: absolute; right: 7%; top: 63%; width: 10px; height: 10px; border-radius: 50%; background: #39d35a; box-shadow: 0 0 8px #39d35a; }
.printer.run:not(.done) .pr-led { animation: blink .5s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.pr-grille { position: absolute; left: 7%; top: 22%; width: 46%; height: 30%; border-radius: 3px; background: repeating-linear-gradient(90deg, #c4c0b6 0 3px, rgba(0, 0, 0, 0) 3px 8px); opacity: .75; }
.pr-slot { height: 15px; margin: -7px 4% 0; border-radius: 0 0 7px 7px; background: #262626; box-shadow: inset 0 5px 7px rgba(0, 0, 0, .7); }
.pr-out { position: absolute; overflow: hidden; z-index: 1; transition: top .7s cubic-bezier(.5, 0, .3, 1), left .7s, width .7s, height .7s; }
.pr-page { position: relative; margin: 0 auto; background: #fff; transform: translateY(-101%); box-shadow: 0 8px 20px rgba(40, 30, 10, .25); }
.printer.run .pr-page { transform: translateY(0); transition: transform 5.3s steps(40, end); }
.printer.done .pr-machine { transform: translate(-50%, -150%); opacity: 0; }
.printer.done .pr-out { overflow: auto; display: flex; padding: 6px 14px 14px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.printer.done .pr-page { margin: auto; flex: none; transform: rotate(.3deg); transition: width .7s cubic-bezier(.5, 0, .3, 1), height .7s cubic-bezier(.5, 0, .3, 1), transform .7s; }
.pr-page svg { display: block; width: 100%; height: 100%; }
.pr-btns {
  position: absolute; left: 0; right: 0; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 3;
  display: flex; justify-content: center; align-items: center; gap: 12px; opacity: 0; pointer-events: none; transition: opacity .4s .5s;
}
.printer.done .pr-btns { opacity: 1; pointer-events: auto; }
.pr-btns button {
  border: 0; border-radius: 1px; cursor: pointer; min-height: 44px; padding: 11px 18px 7px;
  font-family: 'Kalam', 'Comic Sans MS', cursive; font-weight: 700; font-size: 19px; line-height: 1; color: #3b3200;
  background: linear-gradient(170deg, #fff58f, #ffec5c); box-shadow: 0 1px 1px rgba(0, 0, 0, .14), 2px 5px 9px rgba(60, 40, 0, .16);
}
#pr-watch { transform: rotate(-2deg); }
#pr-new { transform: rotate(1.6deg); background: linear-gradient(170deg, #ffd7ea, #ffc2de); }
#pr-x { width: 44px; padding: 0; font: 400 30px/1 system-ui, sans-serif; background: linear-gradient(170deg, #d5f1ff, #bfe6fb); transform: rotate(-1deg); }
.pr-btns button:focus-visible { outline: 3px solid var(--pen); outline-offset: 3px; }

/* ---------------- loading: the printer warms up */
#loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; transition: opacity .45s ease; }
#loader.gone { opacity: 0; pointer-events: none; }
.ld-box {
  position: relative; width: min(380px, 82vw); height: 150px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(180deg, #f4f3ef, #dedbd3 70%, #cfcbc1);
  box-shadow: 0 12px 30px rgba(40, 30, 10, .28), inset 0 -7px 0 rgba(0, 0, 0, .07), inset 0 2px 0 rgba(255, 255, 255, .7);
}
.ld-lcd {
  width: 68%; padding: 12px 14px 10px; border: 3px solid #4d4d4d; border-radius: 5px;
  background: linear-gradient(180deg, #a9bea3, #94ab8e); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .35);
  color: #1c2a19; font-weight: 700; font-size: 21px; letter-spacing: 3px; text-transform: uppercase;
}
.ld-bar { height: 11px; margin-top: 7px; border: 2px solid #1c2a19; padding: 1px; }
.ld-bar i { display: block; height: 100%; width: 0; background: #1c2a19; transition: width .2s; }
.ld-led { position: absolute; right: 18px; bottom: 16px; width: 10px; height: 10px; border-radius: 50%; background: #39d35a; box-shadow: 0 0 8px #39d35a; animation: blink .6s steps(2) infinite; }

/* ---------------- phones */
@media (max-width: 759px) {
  :root { --bar: 54px; }
  #frame { padding: 6px 12px 12px; }
  .tv { padding: var(--bar) 0 0; place-items: stretch; }
  .tv-in { width: 100%; height: 100%; max-height: none; border-radius: 0; border: 0; }
  .tv-top { font-size: 18px; min-height: 46px; letter-spacing: 1.5px; }
  .tv-region { padding: 0 18px 0 14px; }
  .tv-round { padding: 0 12px; }
  .tv-split { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 14px 20px; }
  .tv-team { gap: 10px; }
  .tv-vs { position: relative; left: auto; top: auto; width: auto; height: 36px; display: flex; align-items: center; gap: 12px; }
  .tv-vs::before, .tv-vs::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, rgba(255, 212, 0, 0), var(--gold)); }
  .tv-vs::after { background: linear-gradient(90deg, var(--gold), rgba(255, 212, 0, 0)); }
  .tv-vs span { position: static; transform: none; flex: none; width: 40px; height: 40px; font-size: 18px; border-width: 2px; }
  .tv.on .tv-vs span { animation: vsinp .45s .3s cubic-bezier(.3, 1.6, .5, 1) both; }
  @keyframes vsinp { from { transform: scale(2.2); opacity: 0; } }
  .tv-id { min-height: 44px; gap: 10px; padding-left: 10px; border-left-width: 6px; }
  .seed { min-width: 36px; height: 36px; font-size: 23px; }
  .tv-nm h2 { font-size: 27px; }
  .tv-nm p { font-size: 13px; letter-spacing: 2px; }
  .tv-btns button { font-size: 18px; min-height: 46px; padding: 9px 16px 7px; }
  .tv-split { padding: 10px 14px 12px; gap: 4px; }
  .tv-team { gap: 8px; }
  .tv-vs { height: 30px; }
  .tv-pic {
    aspect-ratio: auto;
    height: clamp(110px, calc((100vh - 384px) / 2), calc((100vw - 28px) * 9 / 16));
    height: clamp(110px, calc((100dvh - 384px) / 2), calc((100vw - 28px) * 9 / 16));
  }
  .teams { padding: var(--bar) 0 0; place-items: stretch; }
  .teams-paper { width: 100%; height: 100%; max-height: none; padding: 16px 16px 30px; transform: none; }
  .teams-paper h2 { font-size: 30px; }
  .teams-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .cs-top { gap: 10px; padding: 8px 8px 8px 12px; }
  .cs-id h2 { font-size: 26px; }
  .cs-id p { font-size: 12px; letter-spacing: 2px; }
  .cs-x { width: 46px; height: 46px; }
  .cs-body { padding: 18px 14px 60px; font-size: 17px; --ab-chrome: 96px; }
  .cs-body .ab-lede { font-size: 19px; }
  .mt-lower { left: 5vw; right: 5vw; bottom: calc(6.5vh + 56px); gap: 10px; }
  .mt-lower .seed { min-width: 38px; height: 38px; font-size: 24px; }
  .mt-film { width: 92vw; }
  .mt-film.portrait { width: auto; height: min(70vh, calc(92vw * 16 / 9)); }
  .shot .fg { left: 3%; width: 94%; }
}
@media (max-height: 500px) and (orientation: landscape) {
  :root { --bar: 46px; }
  #bar { padding-left: max(16px, env(safe-area-inset-left)); }
  .note { min-height: 36px; padding: 8px 14px 5px; font-size: 17px; }
  .note.snd { width: 40px; height: 36px; }
  .tv { padding: var(--bar) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left)); place-items: stretch; }
  .tv-in { width: 100%; height: 100%; max-height: none; display: flex; flex-direction: column; overflow: hidden; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .14); }
  .tv-top { flex: none; min-height: 36px; font-size: 16px; letter-spacing: 1.5px; border-bottom-width: 2px; }
  .tv-region { padding: 0 16px 0 12px; }
  .tv-round { padding: 0 12px; }
  .tv-x { width: 46px; font-size: 30px; }
  .tv-split { flex: 1 1 0; min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 16px; padding: 8px 12px 10px; }
  .tv-team { min-height: 0; gap: 8px; }
  .tv-pic { flex: 1 1 0; min-height: 0; height: auto; aspect-ratio: auto; }
  .tv-id { flex: none; height: 40px; min-height: 0; gap: 9px; padding-left: 9px; border-left-width: 5px; }
  .seed { min-width: 32px; height: 32px; font-size: 21px; }
  .tv-nm h2 { font-size: clamp(18px, 2.7vw, 26px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 2px; }
  .tv-nm p { margin-top: 2px; font-size: 11px; letter-spacing: 1.6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tv-btns { flex: none; }
  .tv-btns button { min-height: 40px; font-size: 17px; padding: 7px 14px 5px; }
  .tv-vs { position: absolute; left: 50%; top: calc(8px + (100% - 114px) / 2); width: 0; height: 0; display: block; }
  .tv-vs::before, .tv-vs::after { content: none; }
  .tv-vs span { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); width: 50px; height: 50px; font-size: 21px; border-width: 2px; }
  .tv.on .tv-vs span { animation: vsin .45s .32s cubic-bezier(.3, 1.6, .5, 1) both; }
  .stamp { font-size: clamp(34px, 5vw, 60px); }
  .teams { padding: var(--bar) 12px 8px; place-items: stretch; }
  .teams-paper { width: 100%; height: 100%; max-height: none; padding: 14px 18px 24px; transform: none; }
  .teams-paper h2 { font-size: 28px; }
  .teams-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-top { padding: 6px 8px 6px max(14px, env(safe-area-inset-left)); }
  .cs-id h2 { font-size: 26px; }
  .cs-x { width: 44px; height: 44px; }
  .cs-body { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); --ab-chrome: 70px; }
  .mt-lower { bottom: calc(6.5vh + 26px); }
  .mt-name { font-size: clamp(28px, 4.4vw, 46px); }
  .mt-film { width: min(84vw, calc(74vh * 16 / 9)); }
  .mt-film.portrait { width: auto; height: 74vh; }
  .pr-machine { top: 2vh; }
  .pr-body { height: clamp(78px, 22vh, 104px); }
  .pr-btns { bottom: max(8px, env(safe-area-inset-bottom)); }
  .pr-btns button { min-height: 40px; padding: 9px 16px 6px; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
