@property --sky-top { syntax: '<color>'; inherits: true; initial-value: #000000; }
@property --sky-mid { syntax: '<color>'; inherits: true; initial-value: #000000; }
@property --sky-low { syntax: '<color>'; inherits: true; initial-value: #000000; }
@property --c { syntax: '<color>'; inherits: true; initial-value: #000000; }

/* ================= themes =================
   Each theme only sets variables. Add a theme: copy a block,
   change the id, and add it to the list in theme.js. */

:root {
  --font: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Courier New", monospace;
  --r: 3px;
  --bevel: inset 0 0 0 0 transparent;
  --bar-img: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 4px);
  --bar-size: auto;
  --title-transform: none; --h1-transform: none;
  --sky-img: none; --sky-img-size: auto;
  --hills-display: block;
  --ok: #6fcf97;
  --trees-display: none; --tree-back: #000; --tree-front: #000;
  --orb-x: 86%; --orb-y: 16%; --orb-size: 64px; --orb-op: 1;
  --scene-display: none; --overcast: 0; --overcast-color: transparent; --haze: 0; --haze-color: #fff; --tint: 0;
  --cap: #fff; --cloud-bright: 1; --star-mult: 1; --tree-dim: 1; --rain-color: rgba(200, 210, 230, 0.5);
  --sky-top: #8e88b4; --sky-mid: #b0a9cf; --sky-low: #cfc5d6;
  --ink: #231a3a; --muted: #50466f;
  --paper: #e4dff0; --paper-2: #d3cce5; --line: #382d5e;
  --bar: #4d3c8f; --bar-ink: #f1edfa;
  --accent: #b85b80; --accent-ink: #ffffff;
  --shadow: rgba(36, 27, 61, 0.34);
  --cloud: #e6e0f2; --cloud-op: 0.45;
  --hill-back: #867eb2; --hill-front: #6e639f;
  --orb: #ece3ee; --orb-glow: rgba(255, 255, 255, 0.4); --orb-shade: #ece3ee;
  --star-op: 0; --counter-bg: #1c1540; --counter-ink: #f0b4cb;
}

[data-theme="nightfall"] {
  --sky-top: #0e0b22; --sky-mid: #1c1740; --sky-low: #32275c;
  --ink: #ece7fa; --muted: #a69dcc;
  --paper: #241f49; --paper-2: #1b1640; --line: #8470d1;
  --bar: #44368a; --bar-ink: #ece7fa;
  --accent: #ff8f9e; --accent-ink: #2a0f16;
  --shadow: rgba(0, 0, 0, 0.5);
  --cloud: #3a3270; --cloud-op: 0.45;
  --hill-back: #19143a; --hill-front: #120f2c;
  --orb: #e7e2f5; --orb-glow: rgba(231, 226, 245, 0.28); --orb-shade: #bdb4de;
  --star-op: 1; --counter-bg: #120e2b; --counter-ink: #ff8f9e;
}

[data-theme="pine"] {
  --scene-display: block;
  --hills-display: none; --trees-display: block;
  --tree-back: #0b2418; --tree-front: #020805;
  --sky-top: #020604; --sky-mid: #06120b; --sky-low: #0e2a1b;
  --ink: #d9e8dd; --muted: #7fa08b;
  --paper: #08130d; --paper-2: #050d09; --line: #2f6e47;
  --bar: #153d28; --bar-ink: #d9e8dd;
  --accent: #e07a3a; --accent-ink: #220e04;
  --shadow: rgba(0, 0, 0, 0.65);
  --cloud: #0f241a; --cloud-op: 0.4;
  --orb: #cfe0d3; --orb-glow: rgba(207, 224, 211, 0.16); --orb-shade: #93ad9a;
  --star-op: 0.9; --counter-bg: #020604; --counter-ink: #e07a3a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--sky-top);
  transition: color 0.4s, background 0.4s;
}

/* ---------- sky ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background-image: var(--sky-img), linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--sky-low) 100%);
  background-size: var(--sky-img-size), auto;
}
.stars { position: absolute; inset: 0; opacity: calc(var(--star-op) * var(--star-mult)); transition: opacity 1.2s; }
.stars i {
  position: absolute;
  background: #fff;
  animation: twinkle var(--d, 3s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 0.9; } }

.orb {
  position: absolute;
  left: var(--orb-x);
  top: var(--orb-y);
  translate: -50% -50%;
  opacity: var(--orb-op);
  transition: left 1.8s ease, top 1.8s ease, opacity 1.2s, background 1s, box-shadow 1s, width 1s, height 1s;
  width: var(--orb-size);
  height: var(--orb-size);
  border-radius: 50%;
  background: var(--orb);
  box-shadow: 0 0 56px 12px var(--orb-glow), inset -14px -5px 0 0 var(--orb-shade);
  animation: float 10s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.cloud {
  position: absolute;
  height: 30px;
  width: 120px;
  background: var(--cloud);
  border-radius: 40px;
  opacity: var(--cloud-op);
  transition: opacity 1.2s;
  animation: drift var(--t, 90s) linear infinite;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 50px; height: 50px; top: -24px; left: 22px; }
.cloud::after { width: 36px; height: 36px; top: -16px; left: 62px; }
.clouds { position: absolute; inset: 0; filter: brightness(var(--cloud-bright)); transition: filter 1.2s; }
.cloud:nth-child(n+5) { display: none; }
[data-theme="pine"] .cloud:nth-child(n+4) { display: none; }
[data-theme="pine"][data-weather="cloudy"] .cloud:nth-child(-n+10) { display: block; }
[data-theme="pine"][data-weather="rain"] .cloud:nth-child(-n+12) { display: block; }
[data-theme="pine"][data-weather="storm"] .cloud { display: block; }
@keyframes drift { from { left: -200px; } to { left: 110%; } }

/* ---------- hills (nightfall; pine shows the forest instead) ---------- */
.hills { position: absolute; left: 0; bottom: 0; width: 100%; display: var(--hills-display); }
.h-back { height: 38vh; fill: var(--hill-back); }
.h-front { height: 26vh; fill: var(--hill-front); }



/* ---------- pine forest + particles ---------- */
.trees { position: absolute; inset: 0; display: var(--trees-display); pointer-events: none; filter: brightness(var(--tree-dim)); transition: filter 1.2s; }
.trow svg .cap { fill: var(--cap); opacity: var(--cap-on, 0); transition: opacity 2.5s ease; }
/* snow dims with distance: brightest on the front row */
.trow.r1 svg .cap { fill: color-mix(in srgb, var(--cap) 50%, var(--c)); }
.trow.r2 svg .cap { fill: color-mix(in srgb, var(--cap) 74%, var(--c)); }
.trow.r3 svg .cap { fill: color-mix(in srgb, var(--cap) 60%, #ffffff); }
.trow { transition: --c 1.8s; position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: var(--lift); background: linear-gradient(to top, var(--c) var(--lift), transparent var(--lift)); }
.trow svg { display: block; width: 100%; height: auto; fill: var(--c); transform-origin: 50% 100%; animation: sway var(--sway, 10s) ease-in-out infinite; }
.trow.r1 { --lift: 9vh; --c: var(--tree-back); --sway: 12s; }
.trow.r2 { --lift: 4vh; --c: color-mix(in srgb, var(--tree-back) 45%, var(--tree-front)); --sway: 9s; }
.trow.r3 { --lift: 0vh; --c: var(--tree-front); --sway: 7s; }
@keyframes sway { 0%, 100% { transform: skewX(-0.35deg); } 50% { transform: skewX(0.35deg); } }

.theme-menu .grp { font-weight: 700; color: var(--ink); margin-top: 6px; }

/* ---------- scene layers ---------- */
.overcast { position: absolute; inset: 0; display: var(--scene-display); background: var(--overcast-color); opacity: var(--overcast); transition: opacity 1.2s, background 1s; pointer-events: none; }
.sky-fx { position: absolute; inset: 0; display: var(--scene-display); pointer-events: none; }
#precip { position: absolute; inset: 0; width: 100%; height: 100%; }
.haze { position: absolute; inset: 0; background: linear-gradient(to top, var(--haze-color) 0%, transparent 75%); opacity: var(--haze); transition: opacity 1.2s; }
.tint { position: absolute; inset: 0; background: rgba(150, 190, 255, var(--tint)); transition: background 1.2s; }
.lightning { position: absolute; inset: 0; background: rgba(215, 228, 255, 0); }
.lightning.on { animation: flash 0.7s ease-out; }
@keyframes flash { 0% { background: rgba(215, 228, 255, 0); } 8% { background: rgba(215, 228, 255, 0.8); } 22% { background: rgba(215, 228, 255, 0.12); } 34% { background: rgba(215, 228, 255, 0.62); } 100% { background: rgba(215, 228, 255, 0); } }
.bolt { position: absolute; inset: 0; width: 100%; height: 100%; animation: bolt 0.6s ease-out forwards; }
.bolt path { fill: none; stroke: #eaf3ff; stroke-width: 2.5; stroke-linejoin: round; filter: drop-shadow(0 0 6px #9cc4ff); }
@keyframes bolt { 0%, 35% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- pine scene: time of day ---------- */
[data-theme="pine"][data-time="night"] {
  --sky-top: #020604; --sky-mid: #06120b; --sky-low: #0e2a1b;
  --tree-back: #0b2418; --tree-front: #020805;
  --orb: #cfe0d3; --orb-glow: rgba(207, 224, 211, 0.16); --orb-shade: #93ad9a;
  --orb-x: 78%; --orb-y: 17%; --orb-size: 64px; --star-op: 1;
  --cloud: #243a31; --cap: #aebdc7; --overcast-color: #03070a; --haze-color: #4e5e6c; --rain-color: rgba(190, 210, 235, 0.5);
}
[data-theme="pine"][data-time="sunrise"] {
  --sky-top: #101c2e; --sky-mid: #4a4a62; --sky-low: #e08a5c;
  --tree-back: #34403f; --tree-front: #0a100d;
  --orb: #ffb27a; --orb-glow: rgba(255, 170, 110, 0.45); --orb-shade: #ffb27a;
  --orb-x: 17%; --orb-y: 62%; --orb-size: 92px; --star-op: 0.25;
  --cloud: #e9a784; --cap: #f4d8c8; --overcast-color: #3a3040; --haze-color: #b9a5a8; --rain-color: rgba(205, 190, 200, 0.5);
}
[data-theme="pine"][data-time="morning"] {
  --sky-top: #5f9bc4; --sky-mid: #a6cfe2; --sky-low: #efe3cc;
  --tree-back: #5f957a; --tree-front: #1a4533;
  --orb: #fff4da; --orb-glow: rgba(255, 244, 218, 0.5); --orb-shade: #fff4da;
  --orb-x: 31%; --orb-y: 26%; --orb-size: 76px; --star-op: 0;
  --cloud: #ffffff; --cap: #f4f8fb; --overcast-color: #8e9ba6; --haze-color: #c3d0d8; --rain-color: rgba(90, 110, 140, 0.55);
}
[data-theme="pine"][data-time="midday"] {
  --sky-top: #3a82c4; --sky-mid: #78b4e0; --sky-low: #c5e0ef;
  --tree-back: #4e8f6c; --tree-front: #17432f;
  --orb: #fffdf2; --orb-glow: rgba(255, 253, 242, 0.55); --orb-shade: #fffdf2;
  --orb-x: 52%; --orb-y: 10%; --orb-size: 70px; --star-op: 0;
  --cloud: #ffffff; --cap: #ffffff; --overcast-color: #8693a0; --haze-color: #dfe8ee; --rain-color: rgba(80, 100, 135, 0.55);
}
[data-theme="pine"][data-time="sundown"] {
  --sky-top: #25244c; --sky-mid: #8a4a6a; --sky-low: #f08650;
  --tree-back: #3a2c34; --tree-front: #0e080a;
  --orb: #ff8a4c; --orb-glow: rgba(255, 120, 60, 0.5); --orb-shade: #ff8a4c;
  --orb-x: 84%; --orb-y: 60%; --orb-size: 98px; --star-op: 0.2;
  --cloud: #f0a07a; --cap: #f2cdbd; --overcast-color: #3a2a40; --haze-color: #c59a98; --rain-color: rgba(210, 170, 175, 0.5);
}

/* ---------- pine scene: water falling ---------- */
[data-theme="pine"][data-weather="clear"] { --overcast: 0; --orb-op: 1; --star-mult: 1; --cloud-bright: 1; --cloud-op: 0.55; --tree-dim: 1; --haze: 0; }
[data-theme="pine"][data-weather="cloudy"] { --overcast: 0.38; --orb-op: 0.4; --star-mult: 0.3; --cloud-bright: 0.9; --cloud-op: 0.95; --tree-dim: 0.92; --haze: 0; }
[data-theme="pine"][data-weather="rain"] { --overcast: 0.55; --orb-op: 0.12; --star-mult: 0; --cloud-bright: 0.62; --cloud-op: 0.95; --tree-dim: 0.78; --haze: 0.09; }
[data-theme="pine"][data-weather="storm"] { --overcast: 0.72; --orb-op: 0; --star-mult: 0; --cloud-bright: 0.34; --cloud-op: 0.98; --tree-dim: 0.62; --haze: 0.15; }

/* ---------- pine scene: cold ---------- */
/* cold: snow on the trees and a cool blue tint (the "cold vibe"); lighter while it's snowing */
[data-theme="pine"][data-temp="cold"] { --cap-on: 1; --tint: 0.07; }
/* snowing: a light, white-ish mist near the ground; snow brightens the scene instead of dimming it like rain */
[data-theme="pine"][data-temp="cold"][data-weather="rain"] { --haze: 0.1; --haze-color: color-mix(in srgb, var(--cap) 50%, #ffffff); --tree-dim: 0.95; --overcast: 0.35; --cloud-bright: 0.88; --tint: 0.03; }
[data-theme="pine"][data-temp="cold"][data-weather="storm"] { --haze: 0.22; --haze-color: color-mix(in srgb, var(--cap) 50%, #ffffff); --tree-dim: 0.9; --cloud-bright: 0.6; --tint: 0.03; }

/* ---------- scene panel ---------- */
.scene-picker { position: relative; }
:root:not([data-theme="pine"]) .scene-picker { display: none; }
.theme-menu.scene-menu { display: flex; flex-direction: column; gap: 14px; width: min(400px, 92vw); }
.theme-menu.scene-menu[hidden] { display: none; }
.srow label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.srow label b { color: var(--ink); }
.srow input[type="range"] { accent-color: var(--accent); width: 100%; padding: 0; border: 0; background: none; height: 22px; }
.srow label.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.switch .track { flex: none; position: relative; width: 40px; height: 22px; background: var(--paper-2); border: 2px solid var(--line); }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; background: var(--muted); transition: transform 0.15s, background 0.15s; }
.switch input:checked + .track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); background: var(--accent-ink); }
.switch input:focus-visible + .track { outline: 2px solid var(--ink); outline-offset: 2px; }
.ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.srow.top, .srow.tour { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sbtn { font: inherit; font-size: 13px; color: var(--ink); background: var(--paper-2); border: 2px solid var(--line); border-radius: var(--r); padding: 2px 12px; cursor: pointer; }
.sbtn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 22px;
  background: var(--paper);
  border-bottom: 2px solid var(--line);
  transition: background 0.4s, border-color 0.4s;
}
.brand { font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: 0.02em; }
.topbar nav { display: flex; gap: 6px 14px; flex: 1; flex-wrap: wrap; font-size: 14px; }
.topbar nav a { color: var(--muted); text-decoration: none; }
.topbar nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

.theme-picker { position: relative; }
.theme-btn {
  font: inherit;
  font-size: 13px;
  color: var(--bar-ink);
  background: var(--bar);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 2px 14px;
  cursor: pointer;
  box-shadow: var(--bevel), 2px 2px 0 var(--shadow);
}
.theme-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.theme-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 60;
  width: min(380px, 92vw);
  max-height: 72vh;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: 4px 4px 0 var(--shadow);
}
.theme-menu[hidden] { display: none; }
.theme-menu .hint { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--muted); }
.theme-opt {
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.theme-opt:hover { transform: translate(-1px, -1px); }
.theme-opt[aria-checked="true"] { outline: 2px solid var(--accent); outline-offset: 1px; }
.theme-opt b { font-size: 13px; }
.theme-opt small { color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.theme-opt .chips { display: flex; height: 12px; border: 1.5px solid var(--line); }
.theme-opt .chips i { flex: 1; }
.theme-opt .chips i:nth-child(1) { background: var(--sky-top); }
.theme-opt .chips i:nth-child(2) { background: var(--bar); }
.theme-opt .chips i:nth-child(3) { background: var(--accent); }
.theme-opt .chips i:nth-child(4) { background: var(--paper-2); }

/* ---------- windows ---------- */
.desktop {
  grid-auto-flow: row dense; /* small windows fill any gaps */
  max-width: 1120px;
  margin: 28px auto 0;
  padding: 0 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 26px;
  align-items: start;
}
.span-all { grid-column: 1 / -1; }
.span-2 { grid-column: span 2; }
/* a column of small windows that sits beside a wide one */
.stack { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
@media (max-width: 700px) { .span-2 { grid-column: 1 / -1; } }
.about-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0 30px; }
.about-cols > div > h3:first-child { margin-top: 0; }
@media (max-width: 900px) { .about-cols { grid-template-columns: 1fr; } .about-cols > div > h3:first-child { margin-top: 1em; } }

.win {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--bevel), 4px 4px 0 var(--shadow);
  overflow: hidden;
  color: var(--ink);
  transition: background 0.4s, border-color 0.4s, box-shadow 0.2s;
  animation: pop 0.5s ease-out both;
}
.win:nth-child(2) { animation-delay: 0.05s; }
.win:nth-child(3) { animation-delay: 0.1s; }
.win:nth-child(4) { animation-delay: 0.15s; }
.win:nth-child(5) { animation-delay: 0.2s; }
.win:nth-child(6) { animation-delay: 0.25s; }
@keyframes pop { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }

.win.dragging { box-shadow: var(--bevel), 8px 8px 0 var(--shadow); }
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  background-color: var(--bar);
  background-image: var(--bar-img);
  background-size: var(--bar-size);
  color: var(--bar-ink);
  border-bottom: 2px solid var(--bar-line, var(--line));
  cursor: grab;
  user-select: none;
  touch-action: none;
  font-size: 13px;
  letter-spacing: 0.05em;
  transition: background-color 0.4s;
}
.dragging .bar { cursor: grabbing; }
.bar .title { text-transform: var(--title-transform); }
.btns { display: flex; gap: 6px; }
.btns i, .btns button {
  width: 12px; height: 12px; padding: 0;
  border: 2px solid var(--bar-ink);
  border-radius: 0;
  background: transparent;
  display: block;
  opacity: 0.8;
}
.btns button { cursor: pointer; }
.btns button:hover { background: var(--accent); border-color: var(--accent); opacity: 1; }

.body { padding: 16px 18px 18px; }
.win.collapsed .body { display: none; }
.body h3 { margin: 18px 0 6px; font-size: 13px; text-transform: lowercase; letter-spacing: 0.06em; color: var(--muted); }
.body p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

.pill {
  display: inline-block;
  font: inherit;
  font-size: 14px;
  color: var(--accent-ink);
  background: var(--accent);
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 3px 16px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--bevel), 3px 3px 0 var(--shadow);
  transition: transform 0.1s, box-shadow 0.1s;
}
.pill:hover { transform: translate(-1px, -1px); box-shadow: var(--bevel), 4px 4px 0 var(--shadow); }
.pill:active { transform: translate(3px, 3px); box-shadow: none; }
.pill.alt { background: transparent; color: var(--ink); }

/* ---------- hero ---------- */
.hero-body { display: flex; gap: 38px; align-items: center; flex-wrap: wrap; padding: 26px 30px; }
.hero h1 { text-transform: var(--h1-transform); margin: 6px 0 2px; font-size: clamp(26px, 5vw, 40px); line-height: 1.15; letter-spacing: -0.01em; }
.tagline { color: var(--muted); font-size: 15px; }
.greet { font-size: 16px; }
.now { font-size: 13px; color: var(--muted); }
.cta { margin-top: 16px; }
.status { font-size: 13px; color: var(--muted); }
.dot {
  display: inline-block; width: 8px; height: 8px; margin-right: 8px;
  background: var(--ok);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(111, 207, 151, 0.7); } 100% { box-shadow: 0 0 0 9px rgba(111, 207, 151, 0); } }

.mascot-wrap { position: relative; padding-top: 44px; }
.mascot {
  width: 168px; height: auto; display: block;
  animation: bob 3.6s steps(4, end) infinite;
  image-rendering: pixelated;
}
.mascot:hover { animation-duration: 1.2s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.bubble {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12.5px; padding: 3px 12px;
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--r);
  box-shadow: 2px 2px 0 var(--shadow);
}
.bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 9px; height: 9px;
  background: var(--paper); border-right: 2px solid var(--line); border-bottom: 2px solid var(--line);
  transform: translateX(-50%) rotate(45deg);
}

/* ---------- about / games / music ---------- */
.tags, .rules, .tracks, .links { margin: 0; padding: 0; list-style: none; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tags li {
  font-size: 12.5px; padding: 1px 10px;
  background: var(--paper-2); border: 1.5px solid var(--line); border-radius: var(--r);
}
.rules li::before { content: "> "; color: var(--accent); font-weight: 700; }
.stats { margin: 0; display: grid; gap: 4px; }
.stats div { display: grid; grid-template-columns: auto 8.5em 1fr; gap: 0 4px; }
.stats div::before { content: "> "; color: var(--accent); font-weight: 700; }
.stats dt { color: var(--muted); }
.stats dd { margin: 0; color: var(--ink); }

.tracks li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1.5px dashed var(--line);
}
.tracks li:last-child { border-bottom: 0; }
.tracks span { color: var(--muted); font-size: 13px; text-align: right; }
.tracks { counter-reset: t; margin-top: 8px; }
.tracks li::before { counter-increment: t; content: counter(t) "."; color: var(--accent); font-weight: 700; margin-right: 8px; }
.tracks li b { flex: 1; }

.player { display: flex; align-items: center; gap: 14px; padding: 10px 12px; background: var(--paper-2); border: 2px solid var(--line); border-radius: var(--r); }
.play {
  width: 36px; height: 36px; flex: none; border-radius: var(--r);
  border: 2px solid var(--line); background: var(--accent); cursor: pointer;
  position: relative; box-shadow: 2px 2px 0 var(--shadow);
}
.play::before { content: ""; position: absolute; left: 13px; top: 8px; border-left: 13px solid var(--accent-ink); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.play[aria-pressed="true"]::before { left: 10px; top: 10px; width: 12px; height: 12px; border: 0; background: linear-gradient(90deg, var(--accent-ink) 0 35%, transparent 35% 65%, var(--accent-ink) 65%); }
.eq { display: flex; align-items: flex-end; gap: 4px; height: 36px; flex: 1; }
.eq i { flex: 1; height: 12%; background: var(--accent); transition: height 0.08s linear; }

/* ---------- status / dice ---------- */
.label { font-size: 12.5px; color: var(--muted); margin: 12px 0 4px !important; }
.label:first-child { margin-top: 0 !important; }
.counter { display: flex; gap: 4px; }
.counter span {
  width: 28px; height: 38px; display: grid; place-items: center;
  background: var(--counter-bg); color: var(--counter-ink); font-size: 22px; font-weight: 700;
  border: 2px solid var(--line); border-radius: var(--r);
}
.face { margin-left: 6px; color: var(--ink); }
.meter { position: relative; height: 22px; border: 2px solid var(--line); border-radius: var(--r); background: var(--paper-2); overflow: hidden; }
.meter .fill { height: 100%; background: var(--accent); animation: grow 1.2s steps(12, end) both; }
@keyframes grow { from { width: 0 !important; } }
.meter span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--ink); text-shadow: 0 0 4px var(--paper), 0 0 2px var(--paper); }
.phrase { font-size: 15px; }

/* ---------- guestbook ---------- */
.gb { display: flex; flex-direction: column; gap: 10px; }
.gb-form { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.gb-form input, .gb-form textarea { padding: 5px 8px; }
.gb-send { display: flex; justify-content: space-between; align-items: center; }
.gb-form label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.gb-form p { margin: 0 !important; }
input, textarea {
  font: inherit; color: var(--ink);
  background: var(--paper-2); border: 2px solid var(--line); border-radius: var(--r);
  padding: 7px 10px; width: 100%; resize: vertical;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hp { position: absolute !important; left: -9999px; }
.flash { padding: 6px 10px; background: var(--paper-2); border: 2px solid var(--accent); border-radius: var(--r); font-size: 13px; }
.gb-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow: auto; padding-right: 4px; }
.note { display: flex; gap: 8px; padding: 6px 8px; font-size: 13px; background: var(--paper-2); border: 2px solid var(--line); border-radius: var(--r); animation: pop 0.4s ease-out both; }
.avatar {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center; font-size: 13px;
  font-weight: 700; color: #1d1535;
  background: hsl(var(--h) 28% 72%); border: 2px solid var(--line); border-radius: var(--r);
}
.who { margin: 0 0 2px !important; }
.msg { margin: 0 !important; white-space: pre-wrap; overflow-wrap: anywhere; }

.contact { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.contact p { margin: 0; }
.links { display: flex; gap: 16px; }

.foot { max-width: 1120px; margin: 34px auto 0; padding: 18px 18px 120px; text-align: center; font-size: 12.5px; color: var(--ink); text-shadow: 0 0 6px var(--sky-mid); }


/* ---------- mascot: headpats ---------- */
.mascot-wrap { display: flex; flex-direction: column; align-items: center; }
.mascot-btn { position: relative; padding: 0; border: 0; background: none; cursor: pointer; }
.mascot-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.mascot-btn.patted .mascot { animation: pat 0.35s steps(3, end); }
@keyframes pat { 0% { transform: scale(1, 1); } 40% { transform: scale(1.06, 0.9) translateY(6px); } 100% { transform: scale(1, 1); } }
.heart { position: absolute; top: 10%; color: #f25bd9; font-size: 20px; pointer-events: none; animation: rise 0.9s ease-out forwards; text-shadow: 2px 2px 0 var(--shadow); }
@keyframes rise { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-46px); } }
.pats { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.pats b { color: var(--accent); }
.dot[data-status="idle"] { background: #f2c94c; }
.dot[data-status="dnd"] { background: #e05252; }
.dot[data-status="offline"] { background: #808080; animation: none; }

/* ---------- top bar: sound ---------- */
:root:not([data-theme="pine"]) .scene-only { display: none; }

/* ---------- music player ---------- */
.np { display: flex; flex-direction: column; min-width: 0; }
.np b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#music .eq { margin: 8px 0 4px; height: 24px; }
.seek { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.seek input, .vol input { flex: 1; accent-color: var(--accent); padding: 0; border: 0; background: none; min-width: 0; }
.pctl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 8px 0 4px; }
.vol { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex: 1; min-width: 110px; }
.tracks { max-height: 230px; overflow: auto; }
.trk { flex: 1; display: flex; justify-content: space-between; gap: 10px; font: inherit; color: var(--ink); background: none; border: 0; padding: 2px 0; cursor: pointer; text-align: left; min-width: 0; }
.trk b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trk:hover b, .trk[aria-current="true"] b { color: var(--accent); }

/* ---------- top 5 + favourite albums ---------- */
.top-head { margin: 10px 0 4px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
#albums .top-head { margin-top: 0; }
.top5, .albums { margin: 0; padding: 0; list-style: none; }
.top5 li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.top5 li:last-child, .albums li:last-child { border-bottom: 0; }
.rank { font-size: 22px; font-weight: 700; color: var(--accent); text-align: center; line-height: 1; }
.song { display: flex; flex-direction: column; min-width: 0; }
.song .trk { padding: 0; }
.song b { overflow-wrap: anywhere; }
/* title with the listen badges beside it */
.song-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.song-top .listen { margin-left: auto; flex: none; flex-wrap: nowrap; gap: 4px; }
.top5 li[aria-current="true"] .trk b { color: var(--accent); }
.top5 li[aria-current="true"] .rank { animation: beat 1.2s ease-in-out infinite; }
.top5 li.no-file .trk { cursor: default; }
.listen { display: flex; gap: 5px; flex-wrap: wrap; }
.listen a { font-size: 11px; padding: 1px 6px; border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); text-decoration: none; white-space: nowrap; }
.listen a:hover { color: var(--ink); border-color: var(--accent); }
.listen a.ico { display: inline-grid; place-items: center; height: 18px; padding: 0; border: 0; color: #fff; font-size: 9.5px; font-weight: 700; letter-spacing: 0; line-height: 1; }
.listen a.ico:hover { color: #fff; filter: brightness(1.15); }
.ico.sp { width: 18px; border-radius: 50%; background: #1db954; color: #0b0b0b !important; }
.ico.yt { width: 24px; border-radius: 5px; background: #e62117; }
.albums li { display: flex; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.cover { flex: none; width: 44px; height: 44px; font-size: 13px; display: grid; place-items: center; overflow: hidden; border-radius: 6px; font-weight: 700; color: #fff; background: hsl(var(--h) 35% 32%); }

/* ---------- weather ---------- */
.wx-now { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.wx-now p { margin: 2px 0 0; }
.wx-temp { white-space: nowrap; font-size: 42px; font-weight: 700; color: var(--accent); line-height: 1; }
.wx-rows { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; }
.wx-rows dt { color: var(--muted); }
.wx-rows dd { margin: 0; text-align: right; }

/* ---------- wolfabor.ref ---------- */
.char { display: flex; flex-direction: column; gap: 20px; }
/* pictures use the full width of the window (one picture = full width, more share it) */
.char-art { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.char-info { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0 30px; align-items: start; }
@media (max-width: 760px) { .char-info { grid-template-columns: 1fr; } }
.char-art figure { margin: 0; }
.char-art img { display: block; width: 100%; height: auto; border: 2px solid var(--line); border-radius: var(--r); background: #000; }
.char-art figcaption { font-size: 12px; margin-top: 6px; }
.char-info h3 { margin-top: 0; }
.char-info .label:first-child { margin-top: 0; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.swatches li { aspect-ratio: 1; background: var(--c); border: 2px solid var(--line); border-radius: var(--r); position: relative; }
.swatches span { position: absolute; left: 0; right: 0; bottom: -18px; font-size: 10px; color: var(--muted); text-align: center; opacity: 0; }
.swatches li:hover span { opacity: 1; }

/* ---------- games.dat (Discord-style activity cards) ---------- */
.act-head { margin: 0 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.activity { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.act { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--paper-2); border: 2px solid var(--line); border-radius: 8px; transition: border-color 0.3s; }
.act-icon { flex: none; width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden; border-radius: 10px;
  font-size: 20px; font-weight: 700; color: #fff; background: hsl(var(--h) 38% 34%); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25); }
.act-icon, .cover { position: relative; }
.act-icon img, .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* logos with see-through backgrounds (png) are shown whole on the tile, not cropped */
.act-icon img[src$="png"] { object-fit: contain; padding: 6px; background: hsl(var(--h) 38% 34%); }
.act-icon.is-heart { background: #3a1430; }
.act-icon.is-heart svg { width: 34px; height: auto; fill: #f25bd9; animation: beat 1.2s ease-in-out infinite; }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.15); } 30% { transform: scale(1.05); } }
.act-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.35; }
.act-text b { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-text span { color: var(--muted); }
.act-time { font-variant-numeric: tabular-nums; }
.act-live { color: #3ba55d !important; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.act-live[hidden] { display: none; }
.act-live i { width: 8px; height: 8px; border-radius: 50%; background: #3ba55d; }
.act.live { border-color: #3ba55d; }

/* ---------- stickers, art, artists ---------- */
.stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.stickers.scroll { max-height: 200px; overflow: auto; padding: 4px 4px 4px 0; }
.stickers a { display: block; cursor: zoom-in; }
.stickers img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; transition: transform 0.15s; }
.stickers a:hover img { transform: scale(1.08) rotate(-3deg); }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.art-grid figure { margin: 0; }
.art-grid a { display: block; cursor: zoom-in; }
.art-grid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 2px solid var(--line); border-radius: var(--r); background: #000; }
.art-grid figcaption { font-size: 12px; margin-top: 6px; }
.artists { margin: 0; padding: 0; list-style: none; }
.artists li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.artists li:last-child { border-bottom: 0; }
.artists span { color: var(--muted); font-size: 13px; text-align: right; }

/* ---------- pixel pad + wall ---------- */
.pad { display: flex; flex-direction: column; gap: 14px; }
.pad-tool { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
#pad { width: min(240px, 100%); height: auto; aspect-ratio: 1; image-rendering: pixelated; touch-action: none; cursor: crosshair;
  border: 2px solid var(--line); border-radius: var(--r); background: var(--paper-2); }
.pad-side { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.pad-side label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.pad-side p { margin: 0; }
.pad-pal { display: grid; grid-template-columns: repeat(8, 22px); gap: 4px; }
.sw { aspect-ratio: 1; background: var(--c); border: 2px solid var(--line); border-radius: var(--r); cursor: pointer; padding: 0; }
.sw[aria-checked="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.pad-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.pad-btns .sbtn { padding: 2px 8px; }
.wall-sub { margin: 0 0 8px; }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; max-height: 270px; overflow: auto; padding-right: 4px; }
.art { margin: 0; position: relative; animation: pop 0.4s ease-out both; }
.art .del { position: absolute; top: 5px; right: 5px; }
.art canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; image-rendering: pixelated; background: var(--paper-2); border: 2px solid var(--line); border-radius: var(--r); }
.art figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- picture viewer (fake window) ---------- */
.viewer-back { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.55); }
.viewer { display: flex; flex-direction: column; max-width: min(1200px, 96vw); max-height: 94vh; margin: 0; animation: pop 0.25s ease-out both; }
.viewer .bar { cursor: move; touch-action: none; }
.viewer .body { padding: 10px; overflow: auto; display: flex; justify-content: center; }
.viewer img { display: block; max-width: 100%; max-height: calc(94vh - 70px); height: auto; }
.viewer .big-art { display: block; width: min(384px, 80vw); height: auto; image-rendering: pixelated; background: var(--paper-2); }
.btns .x { width: auto; height: auto; min-width: 26px; padding: 1px 6px; font: inherit; font-size: 16px; font-weight: 700; line-height: 1; color: var(--bar-ink); opacity: 1; }
.char-art a { cursor: zoom-in; }
.art canvas { cursor: zoom-in; }

/* ---------- dice.exe ---------- */
.dice-ctl { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.dice-pick { display: flex; flex-wrap: wrap; gap: 4px; }
.dice-pick .sbtn { padding: 1px 7px; font-size: 12px; }
.dice-pool { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; align-items: center; min-height: 28px; font-size: 12.5px; color: var(--muted); }
.chip { font: inherit; font-size: 12px; color: var(--ink); background: var(--paper-2); border: 2px solid var(--line); border-radius: var(--r); padding: 1px 8px; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.tray { display: block; width: 100%; height: 170px; margin: 10px 0 6px; cursor: pointer; border: 2px solid var(--line); border-radius: var(--r);
  background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--paper-2) 82%, var(--accent)) 0%, var(--paper-2) 78%);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35); }
.tray:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dice-result { margin: 0; font-size: 15px; }
.dice-result b { font-size: 22px; color: var(--accent); margin-right: 6px; }

/* ---------- admin ---------- */
.admin-bar { margin: 0; padding: 6px 12px; font-size: 13px; background: var(--accent); color: var(--accent-ink); border: 2px solid var(--line); border-radius: var(--r); }
.del { font: inherit; font-size: 11px; min-width: 52px; color: #fff; background: #a33; border: 0; border-radius: var(--r); padding: 1px 6px; cursor: pointer; }
.del.armed { background: #e03030; }
.den { max-width: 420px; margin: 12vh auto 0; }
.den-form { display: flex; flex-direction: column; gap: 10px; }
.den-form label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }

/* ---------- admin page ---------- */
body.admin { background: var(--paper-2); }
.admin .topbar form { margin: 0; }
.admin-desk { grid-template-columns: 1fr; max-width: 980px; }
.editor { display: flex; flex-direction: column; gap: 12px; }
.editor .field { display: flex; flex-direction: column; gap: 4px; }
.editor .field .label { margin: 0; }
.editor input:not([type="checkbox"]):not([type="color"]), .editor textarea { width: 100%; }
.editor textarea { resize: vertical; }
.fold { border: 2px solid var(--line); border-radius: var(--r); padding: 6px 12px 10px; }
.fold > summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.fold[open] > summary { margin-bottom: 8px; }
.obj { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.list { display: flex; flex-direction: column; gap: 8px; }
.list .item { display: flex; gap: 8px; align-items: flex-start; padding: 6px; border: 1px dashed var(--line); border-radius: var(--r); }
.list .item > :first-child { flex: 1; min-width: 0; }
.list .item .obj { flex-direction: row; flex-wrap: wrap; }
.list .item .obj .field { flex: 1 1 160px; }
.tools { display: flex; gap: 4px; flex: none; }
.tools .sbtn, .sbtn.add { padding: 1px 8px; }
.sbtn.add { align-self: flex-start; }
.sbtn.danger, .sbtn.armed { color: #fff; background: #a33; border-color: #a33; }
.image-field { display: flex; gap: 6px; align-items: center; }
.image-field img { width: 40px; height: 40px; object-fit: contain; border: 2px solid var(--line); border-radius: var(--r); background: var(--paper-2); flex: none; }
.image-field input { flex: 1; min-width: 0; }
.color-field { display: flex; gap: 6px; align-items: center; }
.color-field input[type="color"] { width: 38px; height: 30px; padding: 0; border: 2px solid var(--line); background: none; }
.save-row { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 16px;
  background: var(--paper); border-top: 2px solid var(--line); }
.save-row input { flex: 1; min-width: 200px; }
.warn { color: #e6a23c; }
.ok { color: #5fc57a; }
.versions { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.versions li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.v-info { flex: 1; min-width: 200px; }
.v-view { max-width: 820px; }
pre.json { margin: 0; max-height: 65vh; overflow: auto; font-size: 12px; white-space: pre-wrap; background: var(--paper-2); padding: 10px; border-radius: var(--r); }
.admin-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.admin-note { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 2px solid var(--line); border-radius: var(--r); }
.note-tools { display: flex; gap: 6px; align-items: center; }
.note-tools .muted { flex: 1; }
.admin-trash { display: flex; flex-direction: column; gap: 6px; }
.trash-item { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.trash-item canvas { width: 48px; height: 48px; image-rendering: pixelated; background: var(--paper-2); border: 2px solid var(--line); }
.trash-item > span:first-of-type { flex: 1; min-width: 160px; }

/* ---------- contact ---------- */
.contacts { margin: 0; padding: 0; list-style: none; display: flex; gap: 10px 28px; flex-wrap: wrap; }
.contacts li { display: flex; align-items: center; gap: 8px; }
.contacts .label { margin: 0 !important; }

/* ---------- fireflies ---------- */
.flies { position: absolute; inset: 0; pointer-events: none; display: none; }
[data-theme="pine"][data-flies="1"] .flies { display: block; }
.flies i { position: absolute; width: 4px; height: 4px; background: #f3ff9e; box-shadow: 0 0 6px 2px rgba(222, 255, 120, 0.55);
  animation: fly-drift var(--fd) ease-in-out infinite alternate, blink var(--bd) ease-in-out infinite; }
@keyframes fly-drift { from { transform: translate(0, 0); } to { transform: translate(var(--dx), var(--dy)); } }
@keyframes blink { 0%, 100% { opacity: 0; } 45%, 60% { opacity: 1; } }

/* ---------- easter egg: biters ---------- */
.biters { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.biter { position: absolute; left: 0; padding: 0; border: 0; background: none; cursor: crosshair; pointer-events: auto;
  transform: translateX(-90px); animation: march linear forwards; }
.biter svg { display: block; width: 100%; height: auto; }
.biter .f1 { animation: legs 0.32s steps(1) infinite; }
.biter .f0 { animation: legs 0.32s steps(1) -0.16s infinite; }
@keyframes legs { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes march { from { transform: translateX(-90px); } to { transform: translateX(calc(100vw + 90px)); } }
.biter.dead { animation-play-state: paused; pointer-events: none; }
.biter.dead svg { animation: splat 0.6s ease-out forwards; }
@keyframes splat { to { transform: scale(1.4, 0.2) translateY(30px); filter: hue-rotate(60deg) saturate(2); opacity: 0; } }
.alert { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 80; padding: 8px 16px; font-size: 14px;
  background: #313031; color: #ffe6c0; border: 2px solid #e39827; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; }
.alert.show { animation: toast 4s ease-out forwards; }
@keyframes toast { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }

@media (max-width: 900px) {
  .pad { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  /* top bar: name on its own line, buttons below it, links in a row you can swipe */
  .topbar { position: relative; flex-wrap: wrap; gap: 8px; padding: 8px 12px 6px; }
  .brand { flex: 1 1 100%; }
  .topbar nav { order: 5; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; gap: 16px; padding: 2px 0 4px; scrollbar-width: none; }
  .theme-btn { font-size: 12px; padding: 2px 8px; white-space: nowrap; }
  #scene-name { display: inline-block; max-width: 11ch; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
  .scene-picker, .theme-picker { position: static; }
  .theme-menu { left: 8px; right: 8px; width: auto; top: calc(100% + 6px); }
  .gb { grid-template-columns: 1fr; }
  .pad-side { width: 100%; }
  .bar { cursor: default; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
#wall-empty { grid-column: 1 / -1; margin: 0; }
.albums .song { flex: 1; }
