/* TOTAL MILADY AWARENESS. A RemiliaNET-style surveillance wall: every milady pfp on X, on a live wall of CRTs.
   DESIGN.md is the contract: tokens below, nothing literal further down outside the wall.

   The wall itself is drawn in em, and #wall's font-size is px-per-centimetre,
   so 1em is one centimetre of candy plastic at whatever size the cover is. */

:root {
  /* page (DESIGN.md colors) */
  --fog: #eaeaea;
  --paper: #fcf8e8;
  --cream: #f7eecf;
  --straw: #f0e6c2;
  --rule: #dfd19f;
  --gold: #826c1c;
  --brass: #ae8e1e;
  --ink: rgb(0 0 0 / .8);
  --ink2: rgb(0 0 0 / .6);
  --ink3: rgb(0 0 0 / .4);
  --peri: #7084cd;
  --blue: #26349a;
  --glass-hi: #dfe7ee;
  --glass: #b0c2d0;
  --glass-lo: #8d959d;
  /* radii: three, total */
  --r-pill: 3px;
  --r-card: 6px;
  --r-glass: 18px;
  /* spacing */
  --gap: 8px;
  --pad: 16px;
  --gutter: 16px;
  /* type */
  --mono: 'Fira Mono', Menlo, Consolas, monospace;
  --cjk: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  /* inside the televisions */
  --phos: #8dff7c;
  --royal: linear-gradient(180deg, #3134b4 0%, #4350d4 55%, #5a72e6 100%);
  --sky: linear-gradient(180deg, #2a62b6 0%, #3a82cc 60%, #4f97da 100%);
  --green: linear-gradient(180deg, #1b8a37 0%, #25a045 60%, #2fb050 100%);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--fog); overflow-anchor: none; } /* the wall keeps the reader still itself */
body { margin: 0; color: var(--ink); font: 400 15px/1.35 var(--mono); -webkit-font-smoothing: antialiased; }
i[lang=zh], .k[lang=zh] { font-style: normal; font-family: var(--cjk); font-weight: 500; }
a { color: inherit; }

/* ------------------------------------------------------------ status pip, focus */
.pip { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--peri); box-shadow: 0 0 0 3px rgb(112 132 205 / .2); animation: pip 1.4s steps(1) infinite; }
.pip.down { background: #c99a2e; box-shadow: 0 0 0 3px rgb(201 154 46 / .2); }
@keyframes pip { 50% { opacity: .3; } }
:focus-visible { outline: 2px solid var(--peri); outline-offset: 2px; }

/* ------------------------------------------------------------ panels */
.page { padding: var(--gutter); }
.panel {
  background: var(--paper); border-radius: var(--r-card) var(--r-card) 2px 2px;
  border: 1px solid var(--rule); border-bottom: 3px solid var(--brass); overflow: clip;
}
.tabs {
  margin: 0; display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px;
  background: var(--cream); border-bottom: 1px solid var(--rule);
  font: 400 15px/1 var(--mono); color: var(--ink);
}
.tab i[lang=zh] { color: var(--gold); font-size: 15px; }

/* the cover: an endless wall, the glass card docked to the bottom of your screen */
.tabs { padding-left: 0; gap: 0; position: sticky; top: 0; z-index: 6; }
.tab { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; }
.tab.on { background: var(--paper); border-right: 1px solid var(--rule); box-shadow: inset 0 -1px 0 var(--paper); margin-bottom: -1px; }
h1.tab { margin: 0; font: inherit; white-space: nowrap; flex: none; }
h1.tab .mark { width: 19px; height: 19px; flex: none; margin-right: 2px; }
h1.tab .short { display: none; }
.tab-meta {
  margin-left: auto; padding: 0 12px; min-width: 0; display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink3); white-space: nowrap; overflow: hidden;
}
.tab-meta [data-k=meta] { overflow: hidden; text-overflow: ellipsis; }
.newpill {
  flex: none; margin-right: 8px; padding: 4px 9px; border: 0; border-radius: var(--r-pill); cursor: pointer;
  font: 500 12px/1 var(--mono); color: #fff; background: var(--peri);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 1px 0 rgb(60 70 140 / .4);
}
.newpill[hidden] { display: none; }
.tab.sound {
  flex: none; white-space: nowrap; gap: 6px; padding: 0 12px; border: 0; border-left: 1px solid var(--rule); background: none;
  font: inherit; font-size: 13px; color: var(--ink2); cursor: pointer;
}
.tab.sound:hover { background: var(--straw); }
.tab.sound[aria-pressed=true] { background: var(--paper); color: var(--ink); }
.tab.sound svg { width: 18px; height: 18px; flex: none; }
.tab.sound .w { opacity: .25; }
.tab.sound[aria-pressed=true] .w { opacity: 1; }
.tab.sound small { font-size: 11px; color: var(--ink3); min-width: 2.2em; text-align: left; }
.stage { position: relative; min-height: calc(100svh - 2 * var(--gutter) - 40px); overflow: clip; background: #2b4fbf; }
/* The sky behind the pile: a CC0 cloud photo, wobbled, then error-diffused to the eight corners
   of the RGB cube at half resolution, so each pixel is 2 CSS px. It stays put (sticky, one
   viewport tall, taking no height) while the wall scrolls past in front of it. */
.sky {
  position: sticky; top: 0; height: 100svh; margin-bottom: -100svh; pointer-events: none;
  background: #2b4fbf url(sky.webp) 50% 30% / 2560px 1600px no-repeat;
  image-rendering: pixelated;
}

#wall { position: relative; overflow: clip; width: 100%; }
.pile { position: absolute; left: 0; right: 0; top: 0; }
.chunk { position: absolute; content-visibility: auto; }
.sentinel { height: 1px; }
.end-plaque {
  display: none; margin: 0; padding: 28px 16px 40px; text-align: center;
  font: 500 13px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #fff;
  text-shadow: 0 1px 0 rgb(0 0 0 / .6), 0 0 6px rgb(0 0 40 / .6);
}
.stage.end .end-plaque { display: block; }

/* ------------------------------------------------------------ the hardware */
/* RemiliaNET's own hardware (the BeetleBox on its BeetleCatch page), not beige office kit: a
   glossy candy shell with a moulded rim, recessed panels with a light lip, a black bezel, glossy
   lime and orange keys on a dark rubber deck. 1em is a centimetre. Shell colours: --top (the
   light along the top), --face, --rim (the moulded edge), --deep (shadow), --ink (printing). */
.u {
  --r: 1.2em;
  position: absolute; isolation: isolate; border-radius: var(--r);
  background: linear-gradient(180deg, color-mix(in srgb, var(--rim), #fff 22%), var(--rim) 34%, color-mix(in srgb, var(--rim), #000 16%));
  box-shadow: 0 .25em .6em rgb(10 18 60 / .55), inset 0 -.14em .1em rgb(0 0 0 / .14);
}
.u::before, .u::after {
  content: ''; position: absolute; inset: .3em; z-index: -1; pointer-events: none;
  border-radius: calc(var(--r) - .3em);
}
.u::before { /* the face, moulded inside the rim */
  background: linear-gradient(180deg, var(--top), var(--face) 22%, var(--face) 74%, color-mix(in srgb, var(--face), var(--rim) 60%));
  box-shadow: inset 0 .14em 0 rgb(255 255 255 / .75), inset 0 -.14em .08em color-mix(in srgb, var(--rim), transparent 30%);
}
.u::after { background: linear-gradient(162deg, rgb(255 255 255 / .4) 0 8%, rgb(255 255 255 / 0) 22%); } /* gloss */
.u > i { position: absolute; font-style: normal; } /* absolute already makes them blocks; grid and flex parts keep theirs */
.mon { --r: 1.8em; }
.aio { --r: 1.5em; }
.desk { --r: 1.05em; }
.slim { --r: .85em; }
.tower { --r: 1.25em; }
.spk { --r: 1em; }
.u[data-s=teal] { --top: #d3f5ef; --face: #a8e7dd; --rim: #4fc6b6; --deep: #237f74; --ink: #1fcdb5; }
.u[data-s=aqua] { --top: #d8f1fd; --face: #acdcf4; --rim: #58ade0; --deep: #23628f; --ink: #2f97e3; }
.u[data-s=mint] { --top: #e0f8ec; --face: #b9edd5; --rim: #66cba0; --deep: #2a7c58; --ink: #23bf84; }
.u[data-s=pink] { --top: #ffe6f0; --face: #fbc6da; --rim: #ec8bb2; --deep: #9c3f69; --ink: #ea5f9c; }
.u[data-s=lilac] { --top: #f0eaff; --face: #d8ccfb; --rim: #a08eea; --deep: #554399; --ink: #8a6fe8; }
.u[data-s=pearl] { --top: #ffffff; --face: #eaefed; --rim: #bccac5; --deep: #67766f; --ink: #87a59b; }
.u[data-s=lemon] { --top: #fff8d8; --face: #fdeaa6; --rim: #e9c457; --deep: #8a6d14; --ink: #d9a21c; }
.u[data-s=deck] { --top: #8f988f; --face: #6d756e; --rim: #4a514b; --deep: #1f231f; --ink: #a4ada5; }
.u[data-f=royal] { --glow: rgb(92 108 255 / .45); }
.u[data-f=sky] { --glow: rgb(120 190 255 / .42); }
.u[data-f=green] { --glow: rgb(80 235 110 / .34); }

/* a recessed panel: the lip of the moulding round it */
.pnl {
  border-radius: .6em;
  background: linear-gradient(180deg, color-mix(in srgb, var(--face), var(--rim) 30%), var(--face) 45%, var(--top));
  box-shadow: inset 0 0 0 .13em color-mix(in srgb, var(--rim), transparent 20%), 0 0 0 .15em var(--top), inset 0 .16em .22em rgb(0 0 0 / .12);
}
/* speaker holes, staggered: ::before is the offset rows */
.dots, .dots::before {
  --dot: color-mix(in srgb, var(--deep), #000 58%);
  background: radial-gradient(circle at 50% 25%, var(--dot) .16em, transparent .2em) 0 0 / .66em 1em;
}
.dots::before { content: ''; position: absolute; left: .33em; right: .33em; top: .5em; bottom: 0; }

/* the screen's black surround, the model engraved in its chin */
.bezel {
  --lip: 0 0 0 .15em color-mix(in srgb, var(--rim), #000 12%), 0 0 0 .3em color-mix(in srgb, var(--top), transparent 15%), inset 0 .1em .06em rgb(255 255 255 / .08);
  border-radius: .9em;
  background: linear-gradient(180deg, #2d2b26, #1d1b17 50%, #25231f);
  box-shadow: var(--lip), 0 0 1.3em .15em var(--glow);
  transition: box-shadow .5s;
}
.onair .bezel { box-shadow: var(--lip), 0 0 2.6em .8em var(--glow); }
.model { display: grid; place-items: center; overflow: hidden; color: #8e8b84; text-shadow: 0 -.04em 0 rgb(0 0 0 / .8); }
.model span { font-family: 'VT323', monospace; font-style: italic; letter-spacing: .16em; line-height: 1; white-space: nowrap; }

/* the dark rubber deck and what is on it */
.deckp {
  border-radius: .7em;
  background: linear-gradient(180deg, #434944, #646b65 24%, #5a615b 76%, #3c413d);
  box-shadow: inset 0 .14em .3em rgb(0 0 0 / .55), 0 .08em 0 rgb(255 255 255 / .2);
}
.key { border-radius: .45em; padding: .28em .5em; overflow: hidden; }
.key span { display: block; font-family: 'VT323', monospace; line-height: 1; letter-spacing: .03em; white-space: nowrap; }
.key.lime {
  color: #6f9032; background: linear-gradient(180deg, #ebffb6, #d3f685 40%, #c1ea6c);
  box-shadow: inset 0 .08em 0 rgb(255 255 255 / .8), 0 .3em 0 #7c9f37, 0 .42em .35em rgb(0 0 0 / .45);
}
.key.org {
  color: #aa6620; background: linear-gradient(180deg, #ffe3b0, #ffca78 40%, #ffb95c);
  box-shadow: inset 0 .08em 0 rgb(255 255 255 / .8), 0 .3em 0 #c07f2e, 0 .42em .35em rgb(0 0 0 / .45);
}
.tile {
  border-radius: .45em; background: linear-gradient(180deg, #555c56, #6d756e);
  box-shadow: inset 0 .14em .22em rgb(0 0 0 / .5), 0 .07em 0 rgb(255 255 255 / .18);
}
.tile.f { background: linear-gradient(180deg, var(--tf) 0 70%, var(--tb) 70%); box-shadow: 0 .16em .25em rgb(0 0 0 / .45), inset 0 .08em 0 rgb(255 255 255 / .6); }
.tile.f::before { content: ''; position: absolute; left: 16%; right: 16%; top: 6%; height: 58%; background: var(--ic) center / contain no-repeat; }
.tile.f::after { content: attr(data-n); position: absolute; left: 0; right: 0; bottom: 4%; text-align: center; font: 1.05em/1 'VT323', monospace; color: rgb(255 255 255 / .82); }
.tile[data-c=p] { --tf: #f9aacb; --tb: #7c3a58; }
.tile[data-c=y] { --tf: #fff0a8; --tb: #7a682a; }
.tile[data-c=w] { --tf: #eef0ee; --tb: #5c605c; }
.tile[data-c=g] { --tf: #c4e6b2; --tb: #4b6943; }
.tile[data-i=heart] { --ic: var(--ic-heart); }
.tile[data-i=star] { --ic: var(--ic-star); }
.tile[data-i=bow] { --ic: var(--ic-bow); }
.tile[data-i=cig] { --ic: var(--ic-cig); }
.tile[data-i=eye] { --ic: var(--ic-eye); }
.slider {
  border-radius: .45em; overflow: hidden;
  background: linear-gradient(90deg, #353a36, #4a504b 50%, #353a36);
  box-shadow: inset 0 .12em .2em rgb(0 0 0 / .6), 0 .07em 0 rgb(255 255 255 / .18);
}
.slider::before { /* the ribbed knob */
  content: ''; position: absolute; left: 9%; right: 9%; top: 4%; height: 44%; border-radius: .35em;
  background: repeating-linear-gradient(180deg, rgb(0 0 0 / 0) 0 .34em, rgb(0 0 0 / .2) .34em .42em), linear-gradient(90deg, #c9cdd0, #f7f8f9 45%, #bfc4c7);
  box-shadow: 0 .14em .22em rgb(0 0 0 / .5), inset 0 .06em 0 #fff;
}
.slider::after { /* the eject track */
  content: 'EJECT'; position: absolute; left: 16%; right: 16%; top: 52%; bottom: 4%; border-radius: .3em; overflow: hidden;
  display: grid; place-items: center; writing-mode: vertical-rl; font: .72em/1 'VT323', monospace; letter-spacing: .12em; color: rgb(70 25 25 / .6);
  background: linear-gradient(90deg, #8c5450, #ab726d 50%, #8c5450); box-shadow: inset 0 .08em .12em rgb(0 0 0 / .35);
}

/* the grey LCD */
.lcd, .turbo, .clock {
  --lcd: linear-gradient(180deg, #7e7a82, #9a969d 26%, #918d94);
  --lcd-lip: inset 0 .16em .35em rgb(0 0 0 / .45), 0 0 0 .15em color-mix(in srgb, var(--rim), #000 10%), 0 0 0 .3em var(--top);
  background: var(--lcd); box-shadow: var(--lcd-lip); color: #34313a;
}
.lcd { border-radius: .55em; padding: .7em .75em; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: .4em; }
.lcd > span:last-child { font-family: 'VT323', monospace; line-height: 1.02; text-transform: uppercase; text-align: justify; word-spacing: .12em; }
.lcd-head { display: flex; align-items: flex-start; gap: .12em; line-height: .9; color: #45424a; }
.lcd-head::before { content: ''; flex: none; width: .8em; height: .78em; margin-right: .08em; background: currentColor; -webkit-mask: var(--ic-mark) center / contain no-repeat; mask: var(--ic-mark) center / contain no-repeat; }
.lcd-head b { font: 400 1em/.9 var(--serif); letter-spacing: -.01em; }
.lcd-head i { font-family: var(--cjk); font-style: normal; font-weight: 500; font-size: .3em; align-self: flex-end; margin-left: .1em; }
.turbo { border-radius: .35em; padding: .3em .45em; }
.turbo svg { display: block; width: 100%; height: 100%; overflow: visible; }
.turbo rect { fill: rgb(40 36 46 / .1); }
.turbo rect.on { fill: #312e36; }
.clock { border-radius: .35em; display: grid; place-items: center; }
.clock span { font-family: 'VT323', monospace; line-height: 1; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* the rubber stamp */
.seal { background: var(--ink); opacity: .9; -webkit-mask: var(--seal) center / contain no-repeat; mask: var(--seal) center / contain no-repeat; }

/* a die-cut sticker on a few sets: a bow, a heart, a star */
.sticker {
  background: var(--ic) center / contain no-repeat; transform: rotate(var(--rot, -10deg));
  filter: drop-shadow(.09em 0 0 #fff) drop-shadow(-.09em 0 0 #fff) drop-shadow(0 .09em 0 #fff) drop-shadow(0 -.09em 0 #fff) drop-shadow(0 .12em .1em rgb(0 0 0 / .3));
}
.sticker[data-i=heart] { --ic: var(--ic-heart); }
.sticker[data-i=star] { --ic: var(--ic-star); }
.sticker[data-i=bow] { --ic: var(--ic-bow); }

/* knobs, slots, lights */
.knob {
  border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fff 0 9%, var(--k1) 32%, var(--k2) 100%);
  box-shadow: 0 .14em .22em rgb(0 0 0 / .42), 0 0 0 .1em color-mix(in srgb, var(--k2), #000 25%);
}
.knob.lime { --k1: #ddfc95; --k2: #8ab842; }
.knob.org { --k1: #ffd696; --k2: #e48e32; }
.knob.pearl { --k1: #ffffff; --k2: #b7c2be; }
.slot {
  border-radius: .4em; background: linear-gradient(180deg, #111, #2b2925 70%, #3a3732);
  box-shadow: inset 0 .14em .14em #000, 0 0 0 .13em color-mix(in srgb, var(--rim), #000 10%), 0 0 0 .27em var(--top);
}
.slot.door::before { content: ''; position: absolute; left: 4%; right: 4%; top: 16%; height: 30%; border-radius: .2em; background: linear-gradient(180deg, rgb(255 255 255 / .12), rgb(255 255 255 / 0)); }
.led { border-radius: 50%; background: #3d4a44; box-shadow: inset 0 .06em .1em rgb(0 0 0 / .6); }
.led.g, .led.pwr { background: #7dff8a; box-shadow: 0 0 .45em #5bff74, inset 0 -.06em .1em rgb(0 0 0 / .25); }
.onair .led.pwr { background: #ff3d24; box-shadow: 0 0 .9em .15em #ff3d24; animation: tally .9s steps(1) infinite; }
@keyframes tally { 50% { opacity: .25; } }

/* ------------------------------------------------------------ screens */
.scr {
  position: absolute; display: block; border-radius: .55em / .65em;
  color: inherit; text-decoration: none; outline: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scr.idle { cursor: default; }
.scr:focus-visible { outline: .22em solid #fff; outline-offset: .4em; }
.glass {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden; isolation: isolate;
  background: #20241f;
}
.glass[data-f=royal] { background: var(--royal); }
.glass[data-f=sky] { background: var(--sky); }
.glass[data-f=green] { background: var(--green); }
.glass::after {
  content: ''; position: absolute; inset: 0; z-index: 7; pointer-events: none; border-radius: inherit;
  background:
    radial-gradient(130% 95% at 26% 10%, rgb(255 255 255 / .2), transparent 40%),
    repeating-linear-gradient(180deg, rgb(0 0 0 / .15) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 0 1.6em .25em rgb(0 0 0 / .5), inset 0 0 .25em rgb(0 0 0 / .7);
}

.pic { position: absolute; inset: 0; will-change: transform; }

/* A post, laid out the way X lays one out, glowing on the tube: avatar, name, handle and
   age on one row, the words at full width under it, the picture in whatever room is left. */
.tw {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: calc(var(--fs) * .55);
  padding: var(--pad) calc(var(--pad) * 1.15);
  font: 400 var(--fs)/1.24 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #fff; text-align: left;
  text-shadow: 0 0 .4em rgb(255 255 255 / .22), 0 .05em .12em rgb(0 0 0 / .6);
}
.tw-head { display: flex; align-items: center; gap: calc(var(--fs) * .5); min-width: 0; flex: none; }
.tw-av {
  flex: none; width: var(--av); height: var(--av); border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: rgb(255 255 255 / .2);
  font-weight: 700; font-size: calc(var(--av) * .45);
  box-shadow: 0 0 0 .1em rgb(255 255 255 / .5), 0 .1em .3em rgb(0 0 0 / .35);
}
.tw-av img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.15) contrast(1.05); }
.tw-id { min-width: 0; display: grid; line-height: 1.15; }
.tw-name, .tw-meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tw-name { font-weight: 700; }
.tw-meta { color: rgb(255 255 255 / .74); font-size: .92em; }
.tw-text {
  flex: none; overflow: hidden; overflow-wrap: anywhere; white-space: pre-wrap;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--lines);
}
.tw-media {
  flex: 1 1 0; min-height: 0; width: 100%; object-fit: cover; border-radius: calc(var(--fs) * .7);
  box-shadow: 0 0 0 .08em rgb(255 255 255 / .35); filter: saturate(1.1) contrast(1.05);
}

/* Between posts a CRT is never still. Three cheap layers, all transform/opacity so the
   compositor runs them: fine static that never settles, the hum bar rolling down the
   tube, and the picture's brightness flickering. Phases come from per-screen vars. */
.buzz {
  position: absolute; inset: -40px; z-index: 4; pointer-events: none;
  background: var(--buzz) 0 0 / 160px 120px; opacity: .24;
  animation: buzz .42s steps(1) infinite; animation-delay: var(--bd, 0s); will-change: transform;
}
@keyframes buzz {
  0% { transform: translate3d(0, 0, 0); }
  17% { transform: translate3d(-23px, 11px, 0); }
  33% { transform: translate3d(13px, -29px, 0); }
  50% { transform: translate3d(-31px, -7px, 0); }
  67% { transform: translate3d(7px, 23px, 0); }
  83% { transform: translate3d(29px, -17px, 0); }
}
.glass::before { /* the hum bar */
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 34%; z-index: 5; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgb(255 255 255 / .07) 35%, rgb(255 255 255 / .11) 50%, rgb(0 0 0 / .1) 72%, transparent);
  animation: hum var(--hs, 5s) linear infinite; animation-delay: var(--hd, 0s); will-change: transform;
}
@keyframes hum { from { transform: translateY(-100%); } to { transform: translateY(300%); } }
.pic { animation: flick .9s steps(1) infinite; animation-delay: var(--fd, 0s); }
@keyframes flick {
  0% { opacity: 1; } 11% { opacity: .9; } 14% { opacity: 1; } 47% { opacity: .95; }
  52% { opacity: 1; } 78% { opacity: .88; } 81% { opacity: 1; }
}
.idle .buzz { opacity: .75; }

.snow {
  position: absolute; inset: 0; z-index: 5; opacity: 0; pointer-events: none;
  background: var(--snow) 0 0 / 256px 192px; image-rendering: pixelated;
}
.tuning .snow { opacity: .95; animation: snow .18s steps(1) infinite; }
@keyframes snow {
  0% { background-position: 0 0; }
  25% { background-position: -91px 47px; }
  50% { background-position: 53px -117px; }
  75% { background-position: -140px -33px; }
}

.osd {
  position: absolute; inset: 6% 6.5%; z-index: 6; pointer-events: none;
  font-size: var(--osd); line-height: 1; color: #f2fff0;
  text-shadow: 0 0 .25em rgb(140 255 130 / .85), .08em .08em 0 rgb(0 0 0 / .85);
  opacity: 0; transition: opacity .35s;
}
.osd .ch { position: absolute; right: 0; bottom: 0; color: #a4ff92; }
/* a live post coming in is being recorded: the camera's REC light */
.osd::before {
  content: '● REC'; position: absolute; left: 0; bottom: 0; color: #ff4a32; opacity: 0;
  text-shadow: 0 0 .35em rgb(255 74 50 / .8), .08em .08em 0 rgb(0 0 0 / .85);
}
.fresh .osd::before { opacity: 1; animation: tally .9s steps(1) infinite; }
/* the channel number shows on a dark set and while a new post comes in, never over the words */
.idle .osd, .fresh .osd { opacity: 1; }
.idle .osd .ch { opacity: .8; }

/* ------------------------------------------------------------ the cover photograph */
.dither, .grain { position: absolute; inset: 0; pointer-events: none; }
.vignette { position: sticky; top: 0; height: 100svh; margin-bottom: -100svh; pointer-events: none; }
/* a coloured ordered dither, like the reference's cover photos */
.dither { z-index: 2; background: var(--dither) 0 0 / 96px 96px; image-rendering: pixelated; mix-blend-mode: overlay; opacity: .2; }
.grain {
  z-index: 3; opacity: .11; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette { z-index: 3; background: radial-gradient(ellipse 95% 85% at 50% 50%, transparent 58%, rgb(10 6 2 / .45) 100%); }

/* ------------------------------------------------------------ the ID card */
.dock { position: sticky; bottom: 0; height: 0; z-index: 5; }
.idcard {
  position: absolute; left: 24px; bottom: 24px; width: clamp(300px, 47%, 430px);
  padding: 10px; border-radius: var(--r-glass);
  background: linear-gradient(135deg, var(--glass-hi) 0%, var(--glass) 38%, var(--glass-lo) 62%, var(--glass) 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .9), inset 0 0 0 1px rgb(255 255 255 / .35), 0 0 0 1px rgb(60 70 80 / .35), 0 14px 30px rgb(0 0 0 / .45);
  display: grid; gap: 8px; container-type: inline-size;
}
.idcard::after { /* the glass sheen that crosses the card when it is re-issued */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .55) 48%, transparent 60%) -200% 0 / 200% 100% no-repeat;
}
.idcard.issued::after { animation: sheen .9s ease-out; }
@keyframes sheen { to { background-position: 200% 0; } }
.id-inner { background: #f2edd9; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .6); }
.id-title {
  margin: 0; padding: 10px 14px 4px; background: var(--cream); text-align: center;
  font: 400 22px/1.1 var(--mono); letter-spacing: .06em; color: var(--ink);
}
.id-title i { letter-spacing: .02em; }
.id-rank {
  margin: 0; padding: 0 14px 8px; background: var(--cream); text-align: center;
  font: 500 11.5px/1.2 var(--mono); letter-spacing: .12em; color: var(--gold);
}
.id-rank i { letter-spacing: .04em; margin-right: .3em; }
.id-body { display: grid; grid-template-columns: clamp(96px, 31%, 132px) 1fr; gap: 14px; padding: 14px 14px 8px; }
.id-photo { display: block; aspect-ratio: 1; border-radius: 2px; overflow: hidden; background: #d9cfae; box-shadow: 0 0 0 1px rgb(120 90 40 / .35); }
.id-ph, .id-ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.id-fields { min-width: 0; display: grid; align-content: start; gap: 6px; }
.row {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 10px; padding: 2px 4px 7px;
  background: linear-gradient(var(--rule), var(--rule)) 6px 100% / calc(100% - 12px) 1px no-repeat;
  position: relative;
}
.row::before, .row::after { /* the diamond-ended rule */
  content: ''; position: absolute; bottom: -3px; width: 7px; height: 7px; background: var(--rule); transform: rotate(45deg);
}
.row::before { left: 0; } .row::after { right: 0; }
.row .k { font-size: 14px; color: var(--ink2); min-width: 2.2em; text-align: right; }
.row .v { font-size: 17px; text-align: right; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); }
.row .v.h { color: var(--peri); }
.id-say { display: grid; grid-template-columns: 54px 1fr; gap: 10px; align-items: start; margin-top: 6px; }
.id-qr {
  display: block; aspect-ratio: 1; padding: 5px; border-radius: var(--r-card);
  background: linear-gradient(160deg, #fff, #dfe4ea); box-shadow: 0 0 0 1px #c3cad2, 0 1px 2px rgb(0 0 0 / .2);
}
.id-qr svg { display: block; width: 100%; height: 100%; }
.id-qr:empty { visibility: hidden; }
.id-say p {
  margin: 0; font: 400 13.5px/1.35 var(--mono); color: var(--ink); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.id-foot { display: flex; align-items: center; gap: 12px; padding: 4px 14px 12px; font: 400 13px/1 Arial, sans-serif; color: var(--ink3); }
.id-foot .box { border: 1px solid var(--ink3); padding: 3px 6px; letter-spacing: .06em; color: var(--ink2); }
.id-plate {
  height: 46px; display: grid; place-items: center; border-radius: 10px;
  background: linear-gradient(170deg, #f4f6f8 0%, #dde0e3 40%, #eef0f3 55%, #cfd4da 100%);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgb(255 255 255 / .5);
}
.id-plate span {
  font: 400 clamp(12px, 4.4cqi, 21px)/1 var(--serif); letter-spacing: .12em; text-transform: uppercase; color: #eef1f4; white-space: nowrap;
  text-shadow: 1px 1px 0 rgb(70 80 92 / .75), -1px -1px 0 #fff, 0 0 1px rgb(70 80 92 / .5);
}

.nojs { position: fixed; inset: auto 0 40%; text-align: center; font-size: 18px; }

/* ------------------------------------------------------------ narrow */
@media (max-width: 640px) {
  :root { --gutter: 10px; }
  .tab { padding: 0 10px; }
  .tab-meta { font-size: 11px; padding: 0 8px; }
  .tab.sound { padding: 0 10px; }
  .tab.sound small { display: none; }
  h1.tab .full { display: none; }
  h1.tab .short { display: inline; }
  .idcard { left: 8px; right: 8px; bottom: 8px; width: auto; padding: 6px; border-radius: 14px; gap: 6px; }
  .id-title { font-size: 17px; padding: 7px 10px 2px; }
  .id-rank { font-size: 10.5px; padding-bottom: 6px; }
  .id-body { grid-template-columns: 96px 1fr; gap: 10px; padding: 10px 10px 4px; }
  .row .v { font-size: 15px; }
  .row .k { font-size: 13px; }
  .id-say { grid-template-columns: 1fr; margin-top: 2px; }
  .id-qr { display: none; }
  .id-say p { -webkit-line-clamp: 3; font-size: 12.5px; }
  .id-foot { display: none; }
  .id-plate { height: 30px; border-radius: 8px; }
  .id-plate span { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .onair .led.pwr, .clock span, .pip, .idcard.issued::after, .buzz, .glass::before, .pic, .fresh .osd::before { animation: none; }
  .glass::before { display: none; }
  .bezel, .osd { transition: none; }
}
