/* RANDOM TV TIME, browser version 3.2.6. By Elliott Lipinsky. */
@font-face { font-family: "VCR OSD"; src: url(fonts/VCR_OSD_MONO.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Kids Display"; src: url(fonts/kids_display.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Kids Body"; src: url(fonts/kids_body.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Intertitle"; src: url(fonts/intertitle.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Marquee Deco"; src: url(fonts/deco.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Screen Serif"; src: url(fonts/screen_serif.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Screen Serif"; src: url(fonts/screen_serif_bold.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Teletext"; src: url(fonts/bedstead.otf) format("opentype"); font-display: swap; }
@font-face { font-family: "Segment"; src: url(fonts/DSEG7Classic-Bold.ttf) format("truetype"); font-display: swap; }

:root {
  --bg: #000; --accent: #3cff3c; --text: #fff; --dim: rgba(255,255,255,.55); --panel: rgba(0,0,0,.9);
  --body: "VCR OSD", "Courier New", monospace; --display: "VCR OSD", monospace;
  --pad: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--body); overflow: hidden; }
#set { position: fixed; inset: 0; background: var(--bg); --wl: 0px; --wt: 0px; --wr: 0px; --wb: 0px; }
/* the tube: the picture and everything drawn over it, inside the window the cabinet leaves */
#tube { position: absolute; left: var(--wl); top: var(--wt); right: var(--wr); bottom: var(--wb); overflow: hidden; background: #000; }
#tv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
#noise, #fade, #crt, #tint, #grain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#dressing { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#noise[hidden] { display: none; }
#fade { background: var(--bg); opacity: 0; transition: opacity .35s; }
#fade.on { opacity: 1; transition: none; }
#tint { background: transparent; }
#grain { opacity: 0; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .9 0 0 0 0 .88 0 0 0 0 .8 0 0 0 .6 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>"); animation: grain .3s steps(3) infinite; }
@keyframes grain { 0% { transform: translate(0,0); } 33% { transform: translate(-20px,10px); } 66% { transform: translate(15px,-25px); } 100% { transform: translate(0,0); } }
/* the overlay effects, switched by the look: scanlines, vignette, flicker, the curved tube */
#crt { display: none; }
.fx-scan #crt, .fx-vig #crt, .fx-flicker #crt, .fx-curve #crt { display: block; }
.fx-scan #crt { background: repeating-linear-gradient(to bottom, rgba(0,0,0,.25) 0 1px, transparent 1px 3px); }
#crt::after { content: ""; position: absolute; inset: 0; }
.fx-vig #crt::after { background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.4) 85%, rgba(0,0,0,.7) 100%); }
.fx-curve #crt::after { border-radius: 3vmin; box-shadow: inset 0 0 0 3vmin #000; }
.fx-flicker #crt::after { animation: flicker .18s infinite; }
@keyframes flicker { 0% { opacity: 1; } 50% { opacity: .96; } 100% { opacity: 1; } }
/* the on-screen display sits inside the window too */
#osd { position: absolute; left: var(--wl); top: var(--wt); right: var(--wr); bottom: var(--wb); pointer-events: none; }
#osd.hidden, #osd[hidden] { display: none; }
#osd > * { pointer-events: auto; }
#corner { position: absolute; top: var(--pad); left: var(--pad); display: flex; align-items: center; gap: 6px; user-select: none; background: rgba(0,0,0,.45); border-radius: 30px; padding: 4px 12px 4px 10px; }
#number { font-family: var(--display); font-size: 36px; color: var(--accent); text-shadow: 2px 2px 2px rgba(0,0,0,.8); line-height: 1; }
.fx-glow #number { text-shadow: 0 0 8px var(--accent), 2px 2px 2px rgba(0,0,0,.8); }
#logo { width: 44px; height: 44px; }
#topright { position: absolute; top: var(--pad); right: var(--pad); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; max-width: 70%; }
#sleep { font-size: 10px; color: var(--dim); }
#status { position: absolute; left: 10%; right: 10%; top: 50%; transform: translateY(-50%); text-align: center; font-family: var(--body); font-size: 22px; letter-spacing: .3em; color: var(--accent); text-shadow: 0 0 6px var(--accent); }
#status[hidden] { display: none; }
#fault { position: absolute; left: 10%; right: 10%; top: 50%; margin-top: 30px; text-align: center; font-size: 11px; line-height: 1.5; color: var(--dim); white-space: pre-line; }
#fault[hidden] { display: none; }
#meta { position: absolute; left: var(--pad); bottom: 64px; width: 62%; opacity: 0; transition: opacity .3s; }
#meta.on { opacity: 1; }
#metaRule { display: none; height: 1px; background: var(--accent); margin-bottom: 8px; }
#title { display: block; font-size: 15px; font-weight: bold; color: var(--text); text-decoration: none; text-shadow: 0 0 3px rgba(0,0,0,.8); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#link { display: block; font-size: 11px; color: var(--dim); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#numbers { font-size: 11px; color: var(--dim); }
#caption { font-size: 12px; color: rgba(255,255,255,.7); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#caption[hidden] { display: none; }
#bottomright { position: absolute; right: var(--pad); bottom: var(--pad); display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
.b { font-family: var(--body); font-size: 12px; color: #fff; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.25); border-radius: 18px; padding: 8px 12px; cursor: pointer; text-decoration: none; display: inline-block; line-height: 1.2; }
.b:hover, .b:focus-visible { border-color: var(--accent); outline: none; }
.b.next { border-color: var(--accent); color: var(--accent); font-weight: bold; }
.b:active { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.b.kept { color: var(--accent); }
.b[hidden] { display: none; }
.b.big { font-size: 18px; padding: 14px 28px; }
.b.wide { display: block; width: 100%; text-align: left; border-radius: 8px; margin: 6px 0; }
.b.wide .dim { font-size: 12px; margin-top: 4px; }
#panel { position: absolute; inset: 0; background: var(--panel); overflow: auto; -webkit-overflow-scrolling: touch; }
#panel[hidden] { display: none; }
#panelInner { max-width: 760px; margin: 0 auto; padding: 22px; padding-bottom: 60px; }
#panelInner h2 { font-family: var(--display); font-size: 12px; letter-spacing: .3em; color: var(--accent); margin: 10px 0; flex: 1; }
#panelInner h3 { font-size: 16px; margin: 18px 0 8px; color: var(--text); }
#panelInner h3.group { font-family: var(--display); font-size: 11px; letter-spacing: .3em; color: var(--accent); margin: 22px 0 6px; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); padding-bottom: 6px; }
#panelInner p { font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.9); }
#panelInner p.dim, .dim { color: var(--dim); font-size: 12px; }
#panelInner label { display: block; font-size: 13px; padding: 6px 0; }
#panelInner input[type=text] { width: 100%; font-family: var(--body); font-size: 14px; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.4); border-radius: 6px; padding: 10px; }
#panelInner input[type=range] { width: 100%; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.credit { display: flex; gap: 10px; align-items: center; margin: 16px 0; font-size: 13px; border-top: 1px solid rgba(255,255,255,.2); padding-top: 14px; }
.list .entry { display: flex; gap: 12px; padding: 8px 6px; border-radius: 6px; text-decoration: none; color: inherit; align-items: flex-start; }
.list .entry:hover { background: rgba(255,255,255,.08); }
.list .when, .list .num { color: var(--dim); font-size: 11px; padding-top: 2px; min-width: 40px; font-family: var(--display); }
.list .t { font-size: 13px; font-weight: bold; }
.list .t.kept { color: var(--accent); }
.stats { display: flex; gap: 6px; }
.stats .cell { flex: 1; border: 1px solid rgba(255,255,255,.2); border-radius: 4px; padding: 12px; }
.stats .l { font-size: 10px; letter-spacing: .2em; color: var(--dim); }
.stats .v { font-family: var(--display); font-size: 26px; color: var(--accent); margin-top: 6px; }
#splash { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 24px; background: var(--bg); }
#splash[hidden] { display: none; }
#splash img { width: 160px; height: 160px; }
#splashName { font-family: var(--display); font-size: 26px; color: var(--accent); letter-spacing: .1em; text-shadow: 0 0 8px var(--accent); }
#splashNote { max-width: 460px; font-size: 12px; color: var(--dim); line-height: 1.5; }
#splashNote a { color: var(--text); }

/* ---------- Default: the early 2000s set ---------- */
body[data-style=crt] { --bg: #000; }

/* ---------- Cartoons ---------- */
body[data-style=kids] { --bg: #3B1E63; --accent: #FF7A00; --text: #fff; --dim: #FFE08A; --panel: rgba(59,30,99,.95); --body: "Kids Body", "Arial Rounded MT Bold", sans-serif; --display: "Kids Display", Impact, sans-serif; }
body[data-style=kids] #corner { background: transparent; padding: 0; }
body[data-style=kids] #number { font-size: 40px; color: #fff; background: #7CFC00; border: 3px solid #3B1E63; border-radius: 26px; padding: 4px 16px 6px; text-shadow: 2px 2px 0 #3B1E63; }
body[data-style=kids] #status { font-family: var(--display); font-size: 30px; letter-spacing: .05em; color: #fff; text-shadow: 2px 2px 3px #3B1E63; }
body[data-style=kids] #meta { background: rgba(59,30,99,.9); border: 3px solid #FF7A00; border-radius: 18px; padding: 12px 14px; }
body[data-style=kids] #title { font-size: 17px; text-shadow: 1px 1px 2px #000; }
body[data-style=kids] .b { background: #FF7A00; border: 3px solid #3B1E63; border-radius: 22px; font-size: 13px; text-shadow: 1px 1px 1px rgba(0,0,0,.5); }
body[data-style=kids] .b.next { color: #fff; border-color: #7CFC00; background: #3B1E63; }
body[data-style=kids] .b:active { background: #7CFC00; color: #3B1E63; }
body[data-style=kids] #panelInner h2 { color: #fff; font-size: 14px; letter-spacing: .04em; }
body[data-style=kids] .stats .v { color: #fff; }

/* ---------- Silent Pictures ---------- */
body[data-style=silent] { --bg: #000; --accent: #F2E6C8; --text: #F2E6C8; --dim: rgba(242,230,200,.7); --panel: rgba(10,8,6,.95); --body: "Intertitle", Georgia, serif; --display: "Marquee Deco", Georgia, serif; }
body[data-style=silent] #corner { background: transparent; padding: 0; }
body[data-style=silent] #number { font-size: 22px; letter-spacing: .12em; color: var(--text); background: rgba(0,0,0,.7); border: 1px solid var(--text); padding: 5px 12px; text-shadow: none; }
body[data-style=silent] #status { font-family: var(--display); color: var(--text); text-shadow: none; }
body[data-style=silent] #meta { left: 14%; right: 14%; width: auto; text-align: center; background: rgba(0,0,0,.95); border: 2px solid var(--text); outline: 1px solid var(--text); outline-offset: -6px; padding: 14px 18px; }
body[data-style=silent] #title { font-size: 19px; letter-spacing: .04em; text-shadow: none; }
body[data-style=silent] #link, body[data-style=silent] #numbers, body[data-style=silent] #caption { letter-spacing: .08em; }
body[data-style=silent] .b { background: rgba(0,0,0,.6); border: 1px solid rgba(242,230,200,.6); border-radius: 0; color: var(--text); letter-spacing: .08em; }
body[data-style=silent] .b:active { background: var(--text); color: #000; }

/* ---------- Classic Films ---------- */
body[data-style=classic] { --bg: #0B0B0D; --accent: #C9A961; --text: #F3ECDC; --dim: rgba(243,236,220,.6); --panel: rgba(11,11,13,.95); --body: "Screen Serif", Georgia, serif; --display: "Screen Serif", Georgia, serif; }
body[data-style=classic] #crt::after { background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.35) 90%, rgba(0,0,0,.6) 100%); }
body[data-style=classic] #fade { transition: opacity .7s; }
body[data-style=classic] #number { font-size: 18px; letter-spacing: .14em; color: var(--accent); text-shadow: 0 0 3px rgba(0,0,0,.8); }
body[data-style=classic] #status { letter-spacing: .35em; text-shadow: none; }
body[data-style=classic] #metaRule { display: block; }
body[data-style=classic] #meta { background: linear-gradient(to bottom, rgba(11,11,13,.55), rgba(11,11,13,.94)); border-radius: 4px; padding: 12px; }
body[data-style=classic] #title { font-size: 20px; font-weight: 700; text-shadow: none; }
body[data-style=classic] #link, body[data-style=classic] #numbers { color: rgba(201,169,97,.8); letter-spacing: .14em; font-size: 10px; text-transform: uppercase; font-family: Helvetica, Arial, sans-serif; }
body[data-style=classic] .b { background: rgba(11,11,13,.55); border: 1px solid rgba(201,169,97,.4); border-radius: 2px; color: var(--text); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
body[data-style=classic] .b:active { background: var(--accent); color: #0B0B0D; }
body[data-style=classic] #panelInner h2 { letter-spacing: .3em; }

/* ---------- Film Noir ---------- */
body[data-style=noir] { --bg: #000; --accent: #E6E2D6; --text: #F2EFE6; --dim: rgba(242,239,230,.6); --panel: rgba(8,8,8,.95); --body: "Screen Serif", Georgia, serif; --display: "Screen Serif", Georgia, serif; }
body[data-style=noir] #crt::after { background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,.55) 80%, rgba(0,0,0,.92) 100%); }
body[data-style=noir] #fade { transition: opacity .9s; }
body[data-style=noir] #number { font-size: 18px; letter-spacing: .16em; color: var(--accent); text-shadow: 0 0 4px rgba(0,0,0,.9); }
body[data-style=noir] #status { letter-spacing: .4em; text-shadow: none; font-weight: 700; }
body[data-style=noir] #metaRule { display: block; background: rgba(230,226,214,.5); }
body[data-style=noir] #meta { background: linear-gradient(to bottom, rgba(0,0,0,.4), rgba(0,0,0,.95)); padding: 12px; }
body[data-style=noir] #title { font-size: 20px; font-weight: 700; text-shadow: none; }
body[data-style=noir] #link, body[data-style=noir] #numbers { letter-spacing: .14em; font-size: 10px; text-transform: uppercase; font-family: Helvetica, Arial, sans-serif; }
body[data-style=noir] .b { background: rgba(0,0,0,.6); border: 1px solid rgba(230,226,214,.4); border-radius: 0; color: var(--text); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
body[data-style=noir] .b:active { background: var(--accent); color: #000; }

/* ---------- Cable TV ---------- */
body[data-style=tv] { --bg: #000; --accent: #FFD54F; --text: #fff; --dim: rgba(255,255,255,.7); --panel: rgba(16,30,60,.96); --body: Helvetica, Arial, sans-serif; --display: Helvetica, Arial, sans-serif; }
body[data-style=tv] #corner { background: transparent; padding: 0; }
body[data-style=tv] #number { font-size: 30px; font-weight: bold; color: #fff; background: rgba(11,24,51,.8); border: 2px solid #6F8FD6; border-radius: 3px; padding: 2px 12px 4px; text-shadow: none; }
body[data-style=tv] #status { font-weight: bold; letter-spacing: .2em; text-shadow: none; }
body[data-style=tv] #meta { left: var(--pad); right: var(--pad); width: auto; background: linear-gradient(to bottom, rgba(28,58,120,.94), rgba(11,24,51,.94)); border: 1px solid #6F8FD6; border-radius: 4px; padding: 12px; }
body[data-style=tv] #title { font-size: 17px; text-shadow: 1px 1px 1px rgba(0,0,0,.7); }
body[data-style=tv] #link, body[data-style=tv] #caption { color: rgba(220,230,255,.9); }
body[data-style=tv] #numbers { color: var(--accent); }
body[data-style=tv] .b { background: rgba(20,42,92,.9); border: 1px solid #6F8FD6; border-radius: 3px; font-weight: bold; }
body[data-style=tv] .b.next { color: #FFD54F; border-color: #FFD54F; }
body[data-style=tv] .b:active { background: var(--accent); color: #000; }

/* ---------- The 1950s ---------- */
body[data-style=d1950] { --bg: #0A0906; --accent: #EAD9B0; --text: #F5ECD8; --dim: rgba(245,236,216,.7); --panel: rgba(22,16,6,.96); --body: "Screen Serif", Georgia, serif; --display: "Screen Serif", Georgia, serif; }
body[data-style=d1950] #tube { border-radius: 4vmin; }
body[data-style=d1950] #crt::after { border-radius: 6vmin; box-shadow: inset 0 0 0 2.5vmin #000, inset 0 0 6vmin rgba(0,0,0,.9); background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.45) 82%, rgba(0,0,0,.8) 100%); }
body[data-style=d1950] #number { font-size: 22px; letter-spacing: .1em; color: var(--accent); }
body[data-style=d1950] #status { letter-spacing: .3em; text-shadow: none; }
body[data-style=d1950] #meta { background: rgba(10,9,6,.8); border: 1px solid rgba(234,217,176,.35); padding: 10px 12px; }
body[data-style=d1950] #title { font-size: 18px; font-weight: 700; text-shadow: none; }
body[data-style=d1950] .b { background: rgba(10,9,6,.7); border: 1px solid rgba(234,217,176,.5); border-radius: 3px; color: var(--text); font-size: 11px; letter-spacing: .1em; }
body[data-style=d1950] .b:active { background: var(--accent); color: #0A0906; }

/* ---------- The 1960s ---------- */
body[data-style=d1960] { --bg: #120A04; --accent: #E0A030; --text: #F5E6C8; --dim: rgba(245,230,200,.7); --panel: rgba(26,15,6,.96); --body: "Screen Serif", Georgia, serif; --display: "Screen Serif", Georgia, serif; }
body[data-style=d1960] #tube { border-radius: 5vmin; }
body[data-style=d1960] #crt::after { border-radius: 7vmin; box-shadow: inset 0 0 0 2.5vmin #000, inset 0 0 5vmin rgba(0,0,0,.8); background: radial-gradient(ellipse at center, transparent 52%, rgba(0,0,0,.4) 85%, rgba(0,0,0,.75) 100%); }
body[data-style=d1960] #number { font-size: 22px; letter-spacing: .1em; }
body[data-style=d1960] #status { letter-spacing: .3em; }
body[data-style=d1960] #meta { background: rgba(18,10,4,.82); border: 1px solid rgba(224,160,48,.4); padding: 10px 12px; }
body[data-style=d1960] #title { font-size: 18px; font-weight: 700; text-shadow: none; }
body[data-style=d1960] .b { background: rgba(18,10,4,.7); border: 1px solid rgba(224,160,48,.5); border-radius: 3px; color: var(--text); font-size: 11px; letter-spacing: .1em; }
body[data-style=d1960] .b:active { background: var(--accent); color: #120A04; }

/* ---------- The 1970s ---------- */
body[data-style=d1970] { --bg: #17110A; --accent: #F2B33D; --text: #FFF1D6; --dim: rgba(255,241,214,.7); --panel: rgba(38,26,14,.96); --body: "Kids Body", "Arial Rounded MT Bold", sans-serif; --display: "Kids Body", "Arial Rounded MT Bold", sans-serif; }
body[data-style=d1970] #tube { border-radius: 3vmin; }
body[data-style=d1970] #crt::after { border-radius: 4vmin; box-shadow: inset 0 0 0 2vmin #000, inset 0 0 4vmin rgba(0,0,0,.8); background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.4) 85%, rgba(0,0,0,.7) 100%); }
body[data-style=d1970] #number { font-size: 30px; color: #2A2A1A; background: #F2B33D; border-radius: 6px; padding: 2px 12px 4px; text-shadow: none; }
body[data-style=d1970] #corner { background: transparent; padding: 0; }
body[data-style=d1970] #status { letter-spacing: .2em; text-shadow: none; }
body[data-style=d1970] #meta { background: rgba(23,17,10,.85); border: 2px solid #6B7A2E; border-radius: 8px; padding: 10px 12px; }
body[data-style=d1970] #title { font-size: 17px; text-shadow: none; }
body[data-style=d1970] .b { background: #6B7A2E; border: 1px solid #E9D28A; border-radius: 8px; color: #FFF1D6; font-size: 12px; }
body[data-style=d1970] .b.next { color: #2A2A1A; background: #F2B33D; border-color: #F2B33D; }
body[data-style=d1970] .b:active { background: var(--accent); color: #17110A; }

/* ---------- The 1980s ---------- */
body[data-style=d1980] { --bg: #000; --accent: #3CFF3C; --text: #fff; --dim: rgba(255,255,255,.55); --panel: rgba(0,0,0,.92); --body: "VCR OSD", "Courier New", monospace; --display: "VCR OSD", monospace; }
body[data-style=d1980] #crt::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4%; background: repeating-linear-gradient(to bottom, rgba(255,255,255,.25) 0 2px, rgba(0,0,0,.35) 2px 5px); animation: tracking 1.7s infinite; }
@keyframes tracking { 0% { transform: translateY(0) skewX(0); opacity: .7; } 40% { transform: translateY(-4px) skewX(-8deg); opacity: .9; } 70% { transform: translateY(2px) skewX(5deg); opacity: .5; } 100% { transform: translateY(0) skewX(0); opacity: .7; } }
body[data-style=d1980] #number { font-size: 34px; }
body[data-style=d1980] #meta { background: rgba(0,0,0,.6); padding: 8px 10px; }
body[data-style=d1980] .b { border-radius: 2px; border-color: rgba(255,255,255,.4); }

/* ---------- The 1990s ---------- */
body[data-style=d1990] { --bg: #000; --accent: #6FA8FF; --text: #fff; --dim: rgba(255,255,255,.7); --panel: rgba(20,26,38,.96); --body: Helvetica, Arial, sans-serif; --display: Helvetica, Arial, sans-serif; }
body[data-style=d1990] #corner { background: transparent; padding: 0; }
body[data-style=d1990] #number { font-size: 28px; font-weight: bold; color: #fff; background: #1436A8; border: 2px solid #6FA8FF; border-radius: 2px; padding: 2px 12px 4px; text-shadow: none; }
body[data-style=d1990] #status { font-weight: bold; letter-spacing: .2em; text-shadow: none; }
body[data-style=d1990] #meta { left: var(--pad); right: var(--pad); width: auto; background: rgba(20,26,38,.9); border: 1px solid #6FA8FF; border-radius: 2px; padding: 10px 12px; }
body[data-style=d1990] #title { font-size: 17px; text-shadow: none; }
body[data-style=d1990] #numbers { color: var(--accent); }
body[data-style=d1990] .b { background: rgba(20,26,38,.9); border: 1px solid #6FA8FF; border-radius: 2px; font-weight: bold; }
body[data-style=d1990] .b:active { background: var(--accent); color: #000; }

/* ---------- Commercials ---------- */
body[data-style=ads] { --bg: #1A0A0A; --accent: #FFD60A; --text: #fff; --dim: rgba(255,255,255,.7); --panel: rgba(38,16,16,.96); --body: "Kids Body", "Arial Rounded MT Bold", sans-serif; --display: "Kids Display", Impact, sans-serif; }
body[data-style=ads] #corner { background: transparent; padding: 0; }
body[data-style=ads] #number { font-size: 34px; color: #FF3B30; text-shadow: 2px 2px 0 #fff; }
body[data-style=ads] #status { font-family: var(--display); font-size: 28px; letter-spacing: .06em; color: #FFD60A; text-shadow: 3px 3px 0 #FF3B30; }
body[data-style=ads] #meta { background: #FFD60A; color: #1A0A0A; border: 3px solid #FF3B30; border-radius: 6px; padding: 10px 12px; transform: rotate(-1deg); }
body[data-style=ads] #title { color: #1A0A0A; font-size: 17px; text-shadow: none; }
body[data-style=ads] #link, body[data-style=ads] #numbers, body[data-style=ads] #caption { color: #5A1A10; }
body[data-style=ads] .b { background: #FF3B30; border: 2px solid #FFD60A; border-radius: 6px; font-size: 13px; }
body[data-style=ads] .b.next { color: #1A0A0A; background: #FFD60A; border-color: #FF3B30; }
body[data-style=ads] .b:active { background: #fff; color: #FF3B30; }

/* ---------- News and Newsreels ---------- */
body[data-style=news] { --bg: #050505; --accent: #E8E8E0; --text: #F0F0EA; --dim: rgba(240,240,234,.7); --panel: rgba(16,16,16,.96); --body: "Teletext", "Courier New", monospace; --display: "Teletext", "Courier New", monospace; }
body[data-style=news] #crt::after { background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.4) 88%, rgba(0,0,0,.75) 100%); }
body[data-style=news] #corner { left: calc(var(--pad) + 4.5vmin); }
body[data-style=news] #number { font-size: 26px; letter-spacing: .1em; text-shadow: none; }
body[data-style=news] #status { letter-spacing: .2em; text-shadow: none; }
body[data-style=news] #meta { left: calc(var(--pad) + 4.5vmin); background: rgba(5,5,5,.85); border-top: 2px solid #E8E8E0; border-bottom: 2px solid #E8E8E0; padding: 10px 12px; }
body[data-style=news] #title { font-size: 17px; text-transform: uppercase; letter-spacing: .04em; text-shadow: none; }
body[data-style=news] #bottomright, body[data-style=news] #topright { right: calc(var(--pad) + 4.5vmin); }
body[data-style=news] .b { background: rgba(5,5,5,.7); border: 1px solid rgba(232,232,224,.5); border-radius: 0; letter-spacing: .06em; }
body[data-style=news] .b:active { background: var(--accent); color: #050505; }

/* ---------- Old Sports ---------- */
body[data-style=sports] { --bg: #06120A; --accent: #FFB300; --text: #fff; --dim: rgba(255,255,255,.7); --panel: rgba(11,26,16,.96); --body: Helvetica, Arial, sans-serif; --display: "Segment", monospace; }
body[data-style=sports] #corner { background: #0B1A10; border: 2px solid #FFB300; border-radius: 4px; padding: 4px 12px; }
body[data-style=sports] #number { font-size: 32px; color: #FFB300; text-shadow: 0 0 6px rgba(255,179,0,.7); }
body[data-style=sports] #status { font-weight: bold; letter-spacing: .2em; text-shadow: none; }
body[data-style=sports] #meta { background: rgba(6,18,10,.88); border-left: 6px solid #FFB300; padding: 10px 12px; }
body[data-style=sports] #title { font-size: 17px; font-weight: bold; text-transform: uppercase; text-shadow: none; }
body[data-style=sports] .b { background: rgba(6,18,10,.8); border: 1px solid rgba(255,179,0,.6); border-radius: 3px; font-weight: bold; }
body[data-style=sports] .b:active { background: var(--accent); color: #06120A; }

/* ---------- Game Shows ---------- */
body[data-style=gameshow] { --bg: #0A1440; --accent: #FFC94A; --text: #fff; --dim: rgba(255,255,255,.7); --panel: rgba(14,28,85,.96); --body: "Kids Body", "Arial Rounded MT Bold", sans-serif; --display: "Kids Display", Impact, sans-serif; }
body[data-style=gameshow] #corner { background: #0A1440; border: 2px solid #FFC94A; border-radius: 30px; box-shadow: 0 0 10px rgba(255,201,74,.6); }
body[data-style=gameshow] #number { font-size: 34px; color: #FFC94A; text-shadow: 0 0 8px rgba(255,201,74,.8); }
body[data-style=gameshow] #status { font-family: var(--display); font-size: 26px; letter-spacing: .05em; color: #FFC94A; text-shadow: 0 0 10px rgba(255,201,74,.9); }
body[data-style=gameshow] #meta { background: rgba(10,20,64,.9); border: 2px solid #FFC94A; border-radius: 10px; padding: 10px 12px; }
body[data-style=gameshow] #title { font-size: 17px; text-shadow: none; }
body[data-style=gameshow] .b { background: #1E3CFF; border: 2px solid #FFC94A; border-radius: 20px; font-size: 13px; }
body[data-style=gameshow] .b.next { color: #0A1440; background: #FFC94A; }
body[data-style=gameshow] .b:active { background: #fff; color: #0A1440; }

/* ---------- Public Access and Home Movies ---------- */
body[data-style=home] { --bg: #000; --accent: #FF4040; --text: #fff; --dim: rgba(255,255,255,.7); --panel: rgba(16,16,16,.92); --body: "VCR OSD", "Courier New", monospace; --display: "VCR OSD", monospace; }
body[data-style=home] #tube { animation: wobble 6s infinite; }
@keyframes wobble { 0%, 92%, 100% { transform: translate(0,0); } 94% { transform: translate(1px,-1px); } 96% { transform: translate(-1px,1px); } 98% { transform: translate(1px,0); } }
body[data-style=home] #number { font-size: 30px; color: #fff; text-shadow: 2px 2px 0 #000; }
body[data-style=home] #status { color: #fff; text-shadow: 2px 2px 0 #000; }
body[data-style=home] #meta { background: rgba(0,0,0,.6); padding: 8px 10px; }
body[data-style=home] .b { border-radius: 2px; border-color: rgba(255,255,255,.4); }
body[data-style=home] .b.next { color: #FF4040; border-color: #FF4040; }

/* ---------- Late Night ---------- */
body[data-style=late] { --bg: #05070F; --accent: #9FB7FF; --text: #E8ECFF; --dim: rgba(232,236,255,.7); --panel: rgba(10,15,38,.96); --body: "Screen Serif", Georgia, serif; --display: "Screen Serif", Georgia, serif; }
body[data-style=late] #crt::after { background: radial-gradient(ellipse at center, transparent 50%, rgba(5,7,15,.45) 85%, rgba(5,7,15,.85) 100%); }
body[data-style=late] #fade { transition: opacity .9s; }
body[data-style=late] #number { font-size: 20px; letter-spacing: .14em; }
body[data-style=late] #status { letter-spacing: .3em; }
body[data-style=late] #meta { background: linear-gradient(to bottom, rgba(5,7,15,.4), rgba(5,7,15,.95)); border-radius: 4px; padding: 12px; }
body[data-style=late] #title { font-size: 19px; font-weight: 700; text-shadow: none; }
body[data-style=late] .b { background: rgba(5,7,15,.7); border: 1px solid rgba(159,183,255,.4); border-radius: 2px; color: var(--text); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
body[data-style=late] .b:active { background: var(--accent); color: #05070F; }

/* ---------- narrow screens ---------- */
@media (max-width: 640px), (orientation: portrait) {
  #meta { width: auto; right: var(--pad); bottom: 96px; }
  body[data-style=silent] #meta { left: var(--pad); right: var(--pad); }
  #bottomright { left: var(--pad); }
  #topright { max-width: 60%; }
  #corner { padding: 3px 9px 3px 8px; }
  #logo { width: 34px; height: 34px; }
}
@media (min-width: 1400px) { :root { --pad: 20px; } .b { font-size: 14px; } #number { font-size: 44px; } #title { font-size: 18px; } }
