/* HEARTS.FM: the HeartPod Mini Pro, a music player that is one object: upright on a tall window, turned a quarter to the
   left on a wide one (wheel on the right). Drawn at 420 x 770 and placed by site.js; the banner sits on top and the
   channel icons under it. */
@font-face { font-family: Michroma; src: url(/assets/Michroma.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Doto; src: url(/assets/Doto-ExtraBold.woff2) format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: Geom; src: url(/assets/Geom-VariableFont_wght.ttf) format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Protomo Outline'; src: url(/assets/Protomo-Outline.otf) format('opentype'); font-display: swap; }

:root {
  color-scheme: dark;
  --ink: #000;
  --fg: #ececf1;
  --dim: #85858f;
  --line: #1d1d22;
  --teal: #2ef2e0;
  --pink: #ff2d78;
  --brand: Michroma, 'Eurostile', 'Arial', sans-serif;
  --lcd: Doto, 'Courier New', monospace;
  --ui: Geom, system-ui, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--fg); overflow: hidden; }
body { font: 14px/1.5 var(--ui); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bgword { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; overflow: hidden;
  font: 400 min(22vw, 300px)/1 'Protomo Outline', sans-serif; color: rgba(255,255,255,.06); letter-spacing: .04em; white-space: nowrap; }
.grain { position: fixed; inset: -50%; opacity: .06; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain .4s steps(3) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 33%{transform:translate(-3%,2%)} 66%{transform:translate(2%,-3%)} }

.foot { position: fixed; left: 0; right: 0; bottom: max(10px, env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 18px;
  font: 600 10px var(--ui); letter-spacing: .24em; color: #55555c; }
.foot a { color: #77777f; text-decoration: none; }
.foot a:hover { color: #fff; }

/* ---------- the device: one object, 420 x 770, square screen. site.js places it by its centre and, when the window is
   wide, turns it a quarter to the left (wheel on the right). Only the lit things turn back: the screen's picture
   (.view) and the wheel's glyphs (.glyphs), so they always read upright. */
.dev { position: fixed; left: 0; top: 0; width: 420px; height: 770px; transform-origin: 210px 385px; visibility: hidden; }
.dev.ready { visibility: visible; }
.dev.moving { transition: transform 1s cubic-bezier(.65, 0, .25, 1); }
.dev > * { position: absolute; }
.shell { left: 0; top: 0; width: 100%; height: 100%; border-radius: 64px; overflow: hidden;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, rgba(0,0,0,.03) 1px 3px),
              linear-gradient(180deg, #f7f8fa 0%, #d2d5db 46%, #eceef1 54%, #b3b7bf 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.9), inset 0 -3px 6px rgba(0,0,0,.35), 0 30px 70px rgba(0,0,0,.7); }
/* the room's light stays above: turned, a sideways-lit finish fades in over the top-lit one */
.shell::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 1px, rgba(0,0,0,.03) 1px 3px),
              linear-gradient(90deg, #b3b7bf 0%, #eceef1 46%, #d2d5db 54%, #f7f8fa 100%); }
.wide .shell::before { opacity: 1; }
/* a soft band of clean white light drifting across the metal now and then */
.shell::after { content: ""; position: absolute; inset: -20%; pointer-events: none;
  background: linear-gradient(105deg, transparent 34%, rgba(255,255,255,.18) 44%, rgba(255,255,255,.55) 50%, rgba(255,255,255,.18) 56%, transparent 66%);
  background-size: 320% 100%; background-position: 130% 0; mix-blend-mode: soft-light; filter: blur(6px); animation: glimmer 11s ease-in-out infinite; }
@keyframes glimmer { 0%, 72% { background-position: 130% 0; } 94%, 100% { background-position: -30% 0; } }

.print { left: 0; width: 420px; text-align: center; white-space: nowrap; color: rgba(0,0,0,.55); pointer-events: none; }
.print.brand { top: 30px; font: 400 17px/1.2 var(--brand); letter-spacing: .2em; }
.print.model { top: 740px; font: 600 10px var(--ui); letter-spacing: .3em; }

/* the screen: square; its picture turns back with the device */
.screen { left: 40px; top: 76px; width: 340px; height: 340px; border-radius: 28px; background: #000; overflow: hidden;
  box-shadow: 0 0 0 3px rgba(0,0,0,.85), 0 0 0 4px rgba(255,255,255,.9), inset 0 0 40px rgba(255,255,255,.04); }
.screen::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 3px); }
.screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 6; background: linear-gradient(160deg, rgba(255,255,255,.13), transparent 34%); }
.view { position: absolute; inset: 0; }
.dev.moving .view, .dev.moving .glyphs { transition: transform 1s cubic-bezier(.65, 0, .25, 1); }
.wide .view, .wide .glyphs { transform: rotate(90deg); }

/* the wheel: a touch ring whose glyphs are lit from below, so they turn with the screen */
.wheel { left: 75px; top: 452px; width: 270px; height: 270px; border-radius: 50%; touch-action: none; cursor: grab;
  background: radial-gradient(circle at 50% 45%, #e9ebee, #c3c6cc 70%, #a9adb4);
  box-shadow: inset 0 0 8px rgba(0,0,0,.25), 0 0 0 1px rgba(255,255,255,.6); }
.wheel:active { cursor: grabbing; }
.glyphs { position: absolute; inset: 0; }
.wheel .lbl { position: absolute; display: grid; place-items: center; width: 70px; height: 46px; border: 0; background: none; cursor: pointer;
  color: #2a2b30; font: 700 12px var(--ui); letter-spacing: .16em; border-radius: 10px; }
.wheel .lbl:active { opacity: .5; }
.wheel .n { left: 100px; top: 6px; }
.wheel .s { left: 100px; bottom: 4px; font-size: 21px; letter-spacing: 0; }
.wheel .w { left: 0; top: 112px; }
.wheel .e { right: 0; top: 112px; }
.wheel .mid { position: absolute; left: 72px; top: 72px; width: 126px; height: 126px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #fafbfc, #d9dbdf);
  box-shadow: 0 1px 5px rgba(0,0,0,.25); transition: transform .1s ease; }
.wheel .mid:active { transform: scale(.97); }
/* optical centre: the heart's weight sits 9 % above its box centre */
.wheel .mid svg { width: 72px; height: 60px; fill: #2a2b30; transform: translateY(3px); }

/* − VOL + and FX down the right edge (along the top once turned), like a phone's volume buttons */
.key { left: 414px; width: 12px; padding: 0; border: 0; cursor: pointer; background: linear-gradient(90deg, #b9bcc3, #e4e6ea);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.9), inset 2px 0 2px rgba(0,0,0,.18), 1px 0 1.5px rgba(0,0,0,.45);
  transition: transform .14s cubic-bezier(.3,0,.2,1), filter .14s ease; }
.key::after { content: ""; position: absolute; left: -14px; right: -22px; top: -4px; bottom: -4px; }     /* a bigger touch target */
.k1 { top: 120px; height: 38px; border-radius: 1px 5px 0 1px; }
.k2 { top: 158px; height: 38px; border-radius: 1px 0 5px 1px; border-top: 1px solid rgba(0,0,0,.18); }
.k3 { top: 218px; height: 66px; border-radius: 1px 5px 5px 1px; }
.key:hover, .key:focus-visible { transform: translateX(-1.5px); filter: brightness(.94); }
.key:active, .key[aria-pressed="true"] { transform: translateX(-3px); filter: brightness(.9); }
/* printed beside them, reading downwards (so it reads normally once turned) */
.klbl { font: 700 10px var(--ui); letter-spacing: .3em; color: rgba(0,0,0,.55); white-space: nowrap; transform-origin: 0 0; transform: rotate(90deg); pointer-events: none; }
.l1 { left: 404px; top: 128px; } .l3 { left: 404px; top: 240px; }
.dev.fx .l3 { color: #11a99b; text-shadow: 0 0 6px rgba(46,242,224,.6); }

/* the round key that turns it by hand: on desktops only (phones turn it by being turned) */
.rot { left: 30px; top: 700px; width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #fafbfc, #d1d4d9); box-shadow: 0 1px 4px rgba(0,0,0,.3); color: #2a2b30; }
.rot svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.dev.moving .rot svg { transition: transform 1s cubic-bezier(.65, 0, .25, 1); }
.wide .rot svg { transform: rotate(90deg); }
.rot:hover { color: #000; }
@media (pointer: coarse) { .rot { display: none; } }

.ui { position: absolute; inset: 0; padding: 22px 24px 18px; display: grid; grid-template-rows: auto auto auto 1fr auto auto; gap: 4px; }
.top, .by, .times { font: 800 12px var(--lcd); letter-spacing: .2em; color: rgba(255,255,255,.6); }
.top { display: flex; justify-content: space-between; align-items: center; }
.top .bat { display: inline-flex; gap: 6px; align-items: center; }
.top .bat i { width: 20px; height: 9px; border: 1px solid rgba(255,255,255,.6); border-radius: 2px; position: relative; }
.top .bat i::after { content: ""; position: absolute; inset: 1px 4px 1px 1px; background: rgba(255,255,255,.75); }
.title { font: 800 32px/1.15 var(--lcd); letter-spacing: .02em; white-space: nowrap; overflow: hidden; margin-top: 8px; color: #fff; }
.title span { display: inline-block; }
.by { font-size: 13px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spec { width: 100%; height: 110px; align-self: end; }
.bar { height: 14px; margin: 0 -2px; position: relative; cursor: pointer; touch-action: none; }
.bar::before { content: ""; position: absolute; left: 2px; right: 2px; top: 6px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.18); }
.bar b { position: absolute; left: 2px; top: 6px; height: 3px; border-radius: 2px; background: #fff; }
.bar b::after { content: ""; position: absolute; right: -4px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff; }
.times { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.times .hint { color: #fff; display: inline-flex; align-items: baseline; gap: .55em; white-space: nowrap; }
/* drawn on the screen's own 7-dot grid: the LCD font has no arrow */
.times .hint svg { width: calc(1cap * 8 / 7); height: 1cap; flex: none; fill: currentColor; }

.fxpad { position: absolute; inset: 0; z-index: 4; display: none; touch-action: none; cursor: crosshair; }
.dev.fx .fxpad { display: block; }
.dev.fx .ui { opacity: .3; transition: opacity .2s ease; }
.fxpad canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fxname { position: absolute; left: 0; right: 0; top: 16px; text-align: center; font: 800 20px var(--lcd); letter-spacing: .16em; color: #fff; pointer-events: none; }
.fxaxis { position: absolute; left: 20px; right: 20px; bottom: 14px; display: flex; justify-content: space-between; font: 800 10px var(--lcd);
  letter-spacing: .16em; color: rgba(255,255,255,.55); pointer-events: none; }
.menu { position: absolute; inset: 0; padding: 16px 18px; background: #000; z-index: 2; display: flex; flex-direction: column; gap: 1px; }
.menu h2 { margin: 0 4px 6px; font: 800 11px var(--lcd); letter-spacing: .24em; color: rgba(255,255,255,.6); display: flex; justify-content: space-between; }
.menu ol { list-style: none; margin: 0; padding: 0; overflow: auto; scrollbar-width: none; }
.menu li button { width: 100%; display: flex; justify-content: space-between; gap: 12px; padding: 3px 8px; border: 0; border-radius: 5px; background: none; cursor: pointer;
  color: #fff; font: 800 15px/1.3 var(--lcd); letter-spacing: .08em; text-align: left; }
.menu li button span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu li button small { font: inherit; opacity: .6; }
.menu li button.sel { background: #fff; color: #000; }
.menu li button.now span:first-child::before { content: "> "; }

.boot { position: absolute; inset: 0; z-index: 3; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  transition: opacity .6s ease; }
.boot.out { opacity: 0; }
.boot svg { width: 92px; height: 77px; overflow: visible; }
.boot .trace { fill: none; stroke: #fff; stroke-width: 22; stroke-dasharray: 1000; stroke-dashoffset: 1000; filter: drop-shadow(0 0 3px rgba(255,255,255,.45)); }
.boot .fill { fill: #fff; opacity: 0; }
.boot .word { font: 800 18px var(--lcd); letter-spacing: .14em; opacity: .85; min-height: 1.3em; }
.boot.go .trace { animation: trace 2.2s cubic-bezier(.65,0,.35,1) forwards; }
.boot.go .fill { animation: fillin .9s 1.8s ease-in-out forwards; }
@keyframes trace { to { stroke-dashoffset: 0; } }
@keyframes fillin { to { opacity: 1; } }

/* the five channels: glossy square app icons with their names under them, like a 2007 phone's home screen */
.chan { position: fixed; left: 0; right: 0; top: calc(var(--dev-bottom, 70vh) + 22px); display: flex; justify-content: center; gap: 12px; }
.chan a { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 62px; text-decoration: none; color: #fff; }
.chan a i { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 13px; overflow: hidden;
  box-shadow: 0 6px 14px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08), inset 0 0 0 1px rgba(0,0,0,.25); transition: transform .15s ease, box-shadow .15s ease; }
/* the gloss: a soft curved shine over the top half */
.chan a i::before { content: ""; position: absolute; left: -10%; right: -10%; top: -55%; height: 100%; border-radius: 0 0 50% 50% / 0 0 22% 22%;
  background: linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,.08)); pointer-events: none; }
.chan a i svg { position: relative; width: 28px; height: 28px; fill: #fff; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
.chan a[href*="youtube"] i { background: linear-gradient(#ff3b4f, #e0001b); }
.chan a[href*="tiktok"] i { background: linear-gradient(#2a2a2e, #050506); }
.chan a[href*="tiktok"] i svg { filter: drop-shadow(-1.5px -1px 0 #25f4ee) drop-shadow(1.5px 1px 0 #fe2c55); }
.chan a[href*="twitch"] i { background: linear-gradient(#a970ff, #772ce8); }
.chan a[href*="instagram"] i { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.chan a[href*="x.com"] i { background: linear-gradient(#2a2a2e, #050506); }
.chan a:hover i, .chan a:focus-visible i { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.25), inset 0 0 0 1px rgba(0,0,0,.25); }
.chan a:active i { transform: scale(.95); }
.chan a span b { font: 600 10px var(--ui); letter-spacing: .04em; text-shadow: 0 1px 2px #000; }
.chan a span em { display: none; }

/* the banner at the top: live now, or the latest video */
.now { position: fixed; z-index: 5; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 24px));
  display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 16px; color: #fff; text-decoration: none; overflow: hidden;
  background: linear-gradient(180deg, rgba(44,44,50,.94), rgba(14,14,17,.94)); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.09); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 12px 30px rgba(0,0,0,.6);
  animation: drop .5s cubic-bezier(.2,.8,.2,1) both; }
.now::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 50%; background: linear-gradient(180deg, rgba(255,255,255,.07), transparent); pointer-events: none; }
.now:hover { border-color: rgba(255,255,255,.22); }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -10px); } }
.now-pic { flex: none; width: 64px; height: 36px; border-radius: 7px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px rgba(255,255,255,.1); }
.now-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.now.noimg .now-pic { display: none; }
.now-text { display: grid; gap: 1px; min-width: 0; flex: 1; }
.now-text b { font: 800 10px var(--lcd); letter-spacing: .22em; color: rgba(255,255,255,.55); display: flex; align-items: center; gap: 7px; }
.now-text span { font: 600 13px/1.25 var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now.live .now-text b { color: #ff3b5c; }
.now.live .now-text b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 8px #ff3b5c; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.now-go { font: 300 26px/1 var(--ui); color: rgba(255,255,255,.45); }

/* short, wide windows (a phone held sideways): the icons stand in a column on the right, the footer steps aside */
.short .chan { left: auto; right: max(14px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); flex-direction: column; gap: 10px; }
.short .chan a { width: auto; }
.short .chan a i { width: 44px; height: 44px; border-radius: 11px; }
.short .chan a i svg { width: 22px; height: 22px; }
.short .chan a span { display: none; }
.short .foot { display: none; }

@media (prefers-reduced-motion: reduce) {
  .shell::after, .grain, .now, .now.live .now-text b::before { animation: none; }
  .dev.moving, .dev.moving .view, .dev.moving .glyphs, .dev.moving .rot svg { transition: none; }
  .boot.go .trace, .boot.go .fill { animation-duration: .01s; animation-delay: 0s; }
}
