/* ==========================================================================
   Shattershard — site styles
   ========================================================================== */

@font-face {
  font-family: "Harting";
  src: url("/assets/fonts/HartingPlain.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/IBMPlexMono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/IBMPlexMono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --bg: #000;
  --surface: #0b0b0c;
  --surface-2: #131315;
  --fg: #e6e6e6;
  --text: #cfd2d8;
  --muted: #c4c6cc;
  --dim: #a2a4ac;
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.34);
  --accent: #d0343f;
  --on-accent: #fff;

  --well: #000;
  --glass: rgba(0, 0, 0, 0.72);
  --glass-strong: rgba(8, 8, 9, 0.96);
  --backdrop: rgba(0, 0, 0, 0.65);
  --shadow: rgba(0, 0, 0, 0.7);
  --spot: rgba(255, 255, 255, 0.09);
  --glitch-tint: transparent;
  --cat-ink: 100%;
  --art-filter: brightness(0.55);
  --logo-glow: drop-shadow(0 0 60px rgba(208, 52, 63, 0.16));
  --gutter-fg: #55555c;
  --maze-wall: #3a3a3f;
  --maze-wall-bg: #141416;
  --green: #2dc55e;
  --ok-fg: #7ee2a0;
  --warn-fg: #f2d06b;
  --err-fg: #ff8a90;

  --font-display: "Harting", "IBM Plex Mono", "Courier New", ui-monospace, monospace;
  --font-text: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 10px;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: clamp(48px, 7vw, 80px);
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1160px;
  --header-h: 60px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root[data-theme="light"] {
  color-scheme: light;
  --cat-ink: 52%;

  --bg: #f3f1ec;
  --surface: #fbfaf7;
  --surface-2: #ece9e2;
  --fg: #141414;
  --text: #2b2b2e;
  --muted: #3d3d42;
  --dim: #5a5a60;
  --line: rgba(0, 0, 0, 0.13);
  --line-strong: rgba(0, 0, 0, 0.3);
  --accent: #c01d2a;

  --well: #fff;
  --glass: rgba(243, 241, 236, 0.82);
  --glass-strong: rgba(251, 250, 247, 0.97);
  --backdrop: rgba(40, 32, 24, 0.32);
  --shadow: rgba(60, 45, 30, 0.18);
  --spot: rgba(0, 0, 0, 0.05);
  --glitch-tint: rgba(18, 18, 18, 0.55);
  --art-filter: grayscale(0.15) contrast(1.05);
  --logo-glow: none;
  --gutter-fg: #a3a19b;
  --maze-wall: #b9b5ab;
  --maze-wall-bg: #e4e0d7;
  --green: #176f38;
  --ok-fg: #17753a;
  --warn-fg: #8a6500;
  --err-fg: #b3121d;
}

.theme-switching,
.theme-switching *,
.theme-switching *::before,
.theme-switching *::after {
  transition: background-color 0.35s, color 0.35s, border-color 0.35s, fill 0.35s, stroke 0.35s !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.brand,
.nav a,
.menu-title,
.pick-title {
  font-family: var(--font-display);
}

main {
  flex: 1;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--fg);
  font-weight: 400;
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2em;
  transition: color 0.2s, text-decoration-color 0.2s;
}

a:hover {
  color: var(--fg);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 1px dashed var(--fg);
  outline-offset: 4px;
  border-radius: 4px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 6px;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

.skip-link:focus-visible {
  clip-path: none;
  opacity: 1;
  pointer-events: auto;
}

.pull-logo {
  --pull: 1;
  position: absolute;
  top: -96px;
  left: 50%;
  width: 80px;
  height: 80px;
  margin-left: -40px;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: calc(0.35 + var(--pull) * 0.65);
  transform: scale(calc(0.7 + var(--pull) * 0.3));
}

.pull-logo img {
  grid-area: 1 / 1;
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 10px rgba(208, 56, 64, 0.55));
}

.pull-ring {
  grid-area: 1 / 1;
  width: 80px;
  height: 80px;
  fill: var(--accent);
  transform: rotate(calc(var(--pull) * 180deg));
}

.pull-logo.is-pulling .pull-ring {
  animation: pull-spin 1.6s linear infinite;
}

.pull-logo.is-pulling img {
  animation: pull-glow 1.2s ease-in-out infinite alternate;
}

@keyframes pull-spin {
  to { rotate: 360deg; }
}

@keyframes pull-glow {
  from { filter: drop-shadow(0 0 4px rgba(208, 56, 64, 0.4)); }
  to   { filter: drop-shadow(0 0 14px rgba(208, 56, 64, 0.9)); }
}

@media (prefers-reduced-motion: reduce) {
  .pull-logo.is-pulling .pull-ring,
  .pull-logo.is-pulling img {
    animation: none;
  }
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--s8);
}

.page-head + .section,
.page-head + .container,
.page-head + .tool-nav-wrap {
  padding-top: var(--s2);
}

.section-title {
  margin-bottom: clamp(var(--s5), 4vw, 40px);
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  color: var(--muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-size: 1.05rem;
  white-space: nowrap;
}

.brand img {
  width: 28px;
  height: 28px;
}

.nav {
  display: flex;
  gap: clamp(4px, 2vw, 12px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.92rem;
  white-space: nowrap;
}

.nav a:hover {
  border-color: var(--line);
}

.nav a[aria-current="page"] {
  color: var(--fg);
  border-color: var(--line-strong);
}

.site-header nav {
  margin-left: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 34px;
  min-width: 34px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-text);
  font-size: 0.78rem;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.icon-btn:hover {
  color: var(--fg);
  border-color: var(--line-strong);
  background: var(--surface);
}

.icon-btn svg {
  width: 14px;
  height: 14px;
}

.icon-btn kbd {
  color: var(--dim);
  font-family: var(--font-text);
  font-size: 0.72rem;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--fg), transparent);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}

.is-navigating .site-header::after {
  opacity: 1;
  animation: nav-progress 0.9s var(--ease) infinite;
}

@keyframes nav-progress {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); opacity: 0; }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.25s;
}

@media (max-width: 720px) {
  .icon-btn kbd {
    display: none;
  }

  .icon-btn {
    padding: 0;
  }
}

.theme-btn svg {
  display: none;
  width: 15px;
  height: 15px;
}

.theme-btn:not([data-mode]) .i-dark,
.theme-btn[data-mode="dark"] .i-dark,
.theme-btn[data-mode="light"] .i-light,
.theme-btn[data-mode="auto"] .i-auto {
  display: block;
}

.nav-theme {
  display: none;
}

.theme-seg {
  display: inline-flex;
  padding: 3px;
  background: var(--well);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}

.theme-seg button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 12px;
  background: transparent;
  color: var(--dim);
  border: 0;
  border-radius: 7px;
  font-family: var(--font-text);
  font-size: 0.82rem;
  transition: color 0.2s, background-color 0.2s;
}

.theme-seg svg {
  width: 14px;
  height: 14px;
}

.theme-seg button:hover {
  color: var(--fg);
}

.theme-seg button[aria-pressed="true"] {
  color: var(--bg);
  background: var(--fg);
}

.nav-num,
.menu-toggle {
  display: none;
}

.menu-toggle svg path {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.is-menu-open .menu-toggle .bar1 { transform: translateY(3.5px) rotate(45deg); }

.is-menu-open .menu-toggle .bar2 { opacity: 0; }

.is-menu-open .menu-toggle .bar3 { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-header nav {
    position: absolute;
    top: calc(100% + 8px);
    left: var(--gutter);
    right: var(--gutter);
    margin: 0;
    padding: 8px;
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: 0 24px 60px var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.2s, visibility 0.2s, transform 0.25s var(--ease);
  }

  .is-menu-open .site-header nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav {
    flex-direction: column;
    gap: 2px;
  }

  .nav a {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 14px 14px;
    border-radius: 10px;
    font-size: 1.15rem;
  }

  .nav a[aria-current="page"] {
    background: var(--surface-2);
  }

  .header-actions .theme-btn {
    display: none;
  }

  .nav-theme {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
    padding: 12px 8px 6px 14px;
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-size: 0.85rem;
  }

  .nav-num {
    display: inline;
    color: var(--dim);
    font-family: var(--font-text);
    font-size: 0.75rem;
  }

  body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 45;
    background: var(--backdrop);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
  }

  .is-menu-open body::after {
    opacity: 1;
    visibility: visible;
  }
}

.palette-open,
.palette-open body {
  overflow: hidden;
}

.palette {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: max(10vh, 16px) 16px 16px;
}

.palette[hidden] {
  display: none;
}

.palette-backdrop {
  position: absolute;
  inset: 0;
  background: var(--backdrop);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade-in 0.15s ease-out;
}

.palette-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  max-height: min(560px, 80vh);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 30px 90px var(--shadow);
  animation: palette-in 0.18s var(--ease);
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes palette-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
}

.palette-input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.palette-input svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--dim);
}

.palette-input input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--fg);
  font-size: 16px;
}

.palette-input input::placeholder {
  color: var(--dim);
}

.palette-input kbd,
.palette-foot kbd {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--dim);
  font-family: var(--font-text);
  font-size: 0.72rem;
}

.palette-list {
  flex: 1;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}

.palette-group {
  padding: 12px 10px 6px;
  color: var(--dim);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
}

.palette-item.is-selected {
  background: var(--surface-2);
  border-color: var(--line);
}

.palette-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--muted);
}

.palette-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.palette-icon svg {
  width: 20px;
  height: 20px;
}

.palette-icon.is-logo {
  background: #f2f2f4;
  border-radius: 8px;
}

.palette-icon.is-logo img {
  width: 22px;
  height: 22px;
}

.palette-mono {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--fg);
  font-size: 0.85rem;
}

.palette-text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.palette-title {
  color: var(--fg);
  font-size: 0.92rem;
}

.palette-desc {
  overflow: hidden;
  color: var(--dim);
  font-size: 0.78rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.palette-cat {
  flex-shrink: 0;
  color: var(--dim);
  font-size: 0.72rem;
}

.palette-ext {
  color: var(--dim);
  font-size: 0.8rem;
}

.palette-empty {
  padding: 36px 16px;
  color: var(--dim);
  text-align: center;
}

.palette-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.75rem;
}

.palette-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (hover: none) {
  .palette-foot {
    display: none;
  }
}

@media (max-width: 520px) {
  .palette-cat {
    display: none;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  text-decoration: none;
  line-height: 1.2;
  text-align: center;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}

.btn:hover {
  color: var(--fg);
  border-color: var(--fg);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn svg {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.glitch-text {
  margin: 0;
  background-color: var(--fg);
  background-image: linear-gradient(var(--glitch-tint), var(--glitch-tint)), url("/assets/img/misaimg.webp");
  background-position: 0 0, 50% 30%;
  background-size: 100% 100%, 160% auto;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--fg);
  font-weight: 900;
  line-height: 0.9;
  text-align: center;
  overflow-wrap: break-word;
}

@media (hover: none), (pointer: coarse) {
  .glitch-text {
    animation: pan 18s ease-in-out infinite alternate;
  }
}

@keyframes pan {
  from { background-position: 0 0, 0% 20%; }
  to   { background-position: 0 0, 100% 60%; }
}

.hero {
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-content: center;
  gap: clamp(24px, 4vw, 40px);
  padding-block: 24px 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
}

.hero-art {
  position: relative;
  width: min(100%, 460px, 36svh);
  aspect-ratio: 1;
  margin-inline: auto;
  isolation: isolate;
}

.hero-logo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  filter: var(--logo-glow);
  transition: transform 0.5s var(--ease);
}

.hero-art.has-shards {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.shards {
  position: absolute;
  inset: -20%;
  width: 140%;
  max-width: none;
  height: 140%;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(208, 52, 63, 0.35));
}

.shards-back { z-index: 0; }

.shards-front { z-index: 2; }

.shard,
.shard-body,
.shard-float {
  transform-box: fill-box;
  transform-origin: center;
}

.shard {
  transform: translate(calc(var(--mx, 0) * var(--d) * 5px), calc(var(--my, 0) * var(--d) * 5px));
  transition: transform 0.9s var(--ease);
}

.shard-body {
  --spread: 0;
  --spin: 0deg;
  transform: translate(calc(var(--ux) * var(--spread) * 1px), calc(var(--uy) * var(--spread) * 1px)) rotate(var(--spin));
  transition: transform 1.1s cubic-bezier(0.2, 1.35, 0.35, 1), opacity 0.6s;
}

.shard-float {
  animation: shard-float var(--t, 8s) ease-in-out var(--delay, 0s) infinite alternate;
}

@keyframes shard-float {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(var(--fx), var(--fy)) rotate(var(--fr)); }
}

.shard polygon {
  stroke: rgba(255, 210, 210, 0.45);
  stroke-width: 0.12;
  stroke-linejoin: round;
}

.shard .glint {
  fill: none;
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 0.18;
  stroke-linecap: round;
}

.hero-art:hover .shard-body {
  --spread: calc(var(--r) * 0.05);
  --spin: calc(var(--rot) * 0.15);
}

.hero-art.is-burst .shard-body {
  --spread: var(--burst);
  --spin: var(--rot);
  transition: transform 0.45s cubic-bezier(0.1, 0.8, 0.2, 1), opacity 0.3s;
}

.hero-art.is-burst .hero-logo {
  transform: scale(0.94);
  transition-duration: 0.15s;
}

.hero-art.is-scattered .shard-body {
  --spread: calc(var(--burst) * 1.6);
  --spin: calc(var(--rot) * -1.5);
  opacity: 0;
  transition: none;
}

.shards-flash {
  position: absolute;
  inset: 20%;
  z-index: 3;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 100, 0.45), transparent 65%);
  opacity: 0;
  transform: scale(0.4);
  pointer-events: none;
}

.hero-art.is-burst .shards-flash {
  animation: shard-flash 0.6s ease-out;
}

@keyframes shard-flash {
  20% { opacity: 1; }
  to  { opacity: 0; transform: scale(1.4); }
}

@media (prefers-reduced-motion: reduce) {
  .shard-float {
    animation: none;
  }
}

.hero .glitch-text {
  font-size: clamp(2rem, 11.5vw, 4.6rem);
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero .glitch-text {
    font-size: clamp(2rem, 5.6vw, 5.2rem);
  }

  .hero-art {
    width: min(100%, 460px, 70svh);
  }
}

.menu {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
}

.menu-item {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "num arrow"
    "icon icon"
    "title title"
    "sub sub";
  align-content: start;
  gap: 4px;
  min-height: 150px;
  padding: 16px 18px 18px;
  overflow: hidden;
  background: var(--well);
  color: var(--muted);
  border-radius: 12px;
  text-decoration: none;
  isolation: isolate;
  transition: transform 0.35s var(--ease), color 0.25s, background-color 0.25s;
}

.menu-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(220px circle at var(--mx) var(--my), var(--spot), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.menu-item:hover,
.menu-item:focus-visible {
  color: var(--fg);
  background: var(--surface);
  transform: translateY(-4px);
}

.menu-item:hover::before,
.menu-item:focus-visible::before {
  opacity: 1;
}

.menu-item:focus-visible {
  outline: none;
}

.menu-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.menu-frame rect {
  x: 0.5px;
  y: 0.5px;
  width: calc(100% - 1px);
  height: calc(100% - 1px);
  rx: 12px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 5 4;
  opacity: 0.7;
  transition: stroke 0.25s, opacity 0.25s;
}

.menu-item:hover .menu-frame rect,
.menu-item:focus-visible .menu-frame rect {
  stroke: var(--fg);
  opacity: 1;
  animation: march 0.6s linear infinite;
}

@keyframes march {
  to { stroke-dashoffset: -9; }
}

.menu-num {
  grid-area: num;
  color: var(--dim);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.menu-arrow,
.menu-state {
  grid-area: arrow;
  justify-self: end;
}

.menu-arrow {
  width: 14px;
  height: 14px;
  color: var(--dim);
  transition: transform 0.3s var(--ease), color 0.25s;
}

.menu-item:hover .menu-arrow {
  color: var(--fg);
  transform: translate(3px, -3px);
}

.menu-icon {
  grid-area: icon;
  display: flex;
  align-items: flex-end;
  height: 40px;
  margin: 10px 0 8px;
  color: var(--muted);
  transition: color 0.25s, transform 0.35s var(--ease);
}

.menu-icon svg {
  width: 30px;
  height: 30px;
}

.menu-item:hover .menu-icon {
  color: var(--fg);
  transform: scale(1.08);
  transform-origin: left bottom;
}

.menu-title {
  grid-area: title;
  color: var(--fg);
  font-size: 1.12rem;
  line-height: 1.2;
}

.menu-sub {
  grid-area: sub;
  color: var(--dim);
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.menu-hint {
  color: var(--dim);
  font-size: 0.78rem;
  text-align: center;
}

.menu-hint kbd {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

@media (hover: none) {
  .menu-hint {
    display: none;
  }
}

.menu-state {
  color: var(--dim);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.eq {
  gap: 4px;
}

.eq i {
  width: 5px;
  height: 30%;
  background: currentColor;
  border-radius: 2px;
  transition: height 0.3s;
}

.eq i:nth-child(2) { height: 55%; }

.eq i:nth-child(3) { height: 40%; }

.eq i:nth-child(4) { height: 70%; }

.eq i:nth-child(5) { height: 45%; }

.menu-radio.is-playing .menu-icon {
  color: var(--accent);
}

.menu-radio.is-playing .eq i {
  animation: eq 0.9s ease-in-out infinite alternate;
}

.menu-radio.is-playing .eq i:nth-child(2) { animation-duration: 0.7s; animation-delay: -0.2s; }

.menu-radio.is-playing .eq i:nth-child(3) { animation-duration: 1.1s; animation-delay: -0.5s; }

.menu-radio.is-playing .eq i:nth-child(4) { animation-duration: 0.8s; animation-delay: -0.1s; }

.menu-radio.is-playing .eq i:nth-child(5) { animation-duration: 1s; animation-delay: -0.4s; }

@keyframes eq {
  from { height: 15%; }
  to   { height: 100%; }
}

.menu-radio.is-playing .menu-state {
  color: var(--accent);
}

.menu-radio.is-loading .menu-state {
  animation: blink 0.8s steps(2) infinite;
}

@media (max-width: 900px) {
  .menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-radio {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .menu {
    gap: 10px;
  }

  .menu-item {
    min-height: 0;
    padding: 12px 14px 14px;
  }

  .menu-icon {
    height: 28px;
    margin: 6px 0 4px;
  }

  .menu-icon svg {
    width: 24px;
    height: 24px;
  }

  .menu-title {
    font-size: 0.98rem;
  }

  .menu-sub {
    font-size: 0.7rem;
  }
}

.page-head {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 18px;
  padding-block: clamp(32px, 6vw, 64px) clamp(24px, 4vw, 40px);
}

.page-head .glitch-text {
  font-size: clamp(2.8rem, 8vw, 5.6rem);
  line-height: 0.95;
  text-align: left;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crumbs a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 10px;
  color: var(--muted);
  text-decoration: none;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}

.crumbs a:hover {
  color: var(--fg);
  border-color: var(--accent);
  transform: translateX(-2px);
}

.crumbs svg {
  width: 13px;
  height: 13px;
}

.crumbs b {
  color: var(--accent);
  font-weight: 500;
}

.page-head .page-lead {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
  text-align: left;
}

.page-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.page-stats li {
  padding: 7px 14px;
  color: var(--dim);
  font-size: 0.8rem;
  background: var(--glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.page-stats b {
  margin-right: 4px;
  color: var(--fg);
  font-weight: 500;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.search {
  position: relative;
  flex: 1 1 260px;
}

.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--dim);
  pointer-events: none;
}

.search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 44px 10px 40px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.2s;
}

.search input::placeholder {
  color: var(--dim);
}

.search input:focus {
  outline: none;
  border-color: var(--fg);
}

.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--dim);
  font: inherit;
  font-size: 0.8rem;
  pointer-events: none;
}

.search input:focus + kbd,
.search input:not(:placeholder-shown) + kbd {
  display: none;
}

@media (hover: none) {
  .search kbd {
    display: none;
  }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 600px) {
  .toolbar .chips {
    flex-wrap: nowrap;
    width: calc(100% + 2 * var(--gutter));
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
  }

  .toolbar .chips::-webkit-scrollbar {
    display: none;
  }

  .toolbar .chip {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

.chip {
  min-height: 36px;
  padding: 6px 14px;
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.chip:hover {
  color: var(--fg);
  border-color: var(--line-strong);
}

.chip[aria-pressed="true"] {
  color: var(--bg);
  background: var(--muted);
  border-color: var(--muted);
}

.result-count {
  width: 100%;
  color: var(--dim);
  font-size: 0.85rem;
}

.empty-state {
  padding: 48px 0;
  text-align: center;
  color: var(--dim);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s, background-color 0.25s, transform 0.25s var(--ease);
}

.card:hover,
.card:focus-within {
  border-color: var(--line-strong);
  background: var(--surface-2);
  transform: translateY(-3px);
}

.card[hidden] {
  display: none;
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.card-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  object-fit: contain;
}

.card-title {
  color: var(--fg);
  font-size: 1.15rem;
  line-height: 1.25;
}

.card-title a {
  text-decoration: none;
}

.card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card-title a:focus-visible {
  outline: none;
}

.card:has(.card-title a:focus-visible) {
  outline: 1px dashed var(--fg);
  outline-offset: 3px;
}

.card-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  font-size: 0.78rem;
  color: var(--dim);
}

.tag {
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.card-mono {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--fg);
  font-size: 1.3rem;
}

.card-arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-left: auto;
  color: var(--dim);
  transition: transform 0.25s var(--ease), color 0.25s;
}

.card:hover .card-arrow {
  color: var(--fg);
  transform: translate(2px, -2px);
}

.card-cmd {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 6px 10px;
  background: var(--well);
  color: var(--dim);
  border: 1px dashed var(--line);
  border-radius: 6px;
  text-align: left;
  transition: color 0.2s, border-color 0.2s;
}

.card-cmd:hover {
  color: var(--fg);
  border-color: var(--line-strong);
}

.card-cmd code {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.card-cmd code::before {
  content: "$ ";
  color: var(--accent);
}

.card-cmd svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.card-hint {
  margin: -6px 0 0;
  color: var(--dim);
  font-size: 0.72rem;
  line-height: 1.45;
}

.card-hint button {
  position: relative;
  z-index: 1;
  padding: 0;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 1px dashed var(--line-strong);
  font: inherit;
  cursor: copy;
  transition: color 0.2s, border-color 0.2s;
}

.card-hint button:hover {
  color: var(--fg);
  border-color: var(--accent);
}

.card-hint code {
  font-size: inherit;
}

.card-download {
  color: var(--accent);
}

.feature {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.feature-img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  max-height: 560px;
  object-fit: cover;
  border-radius: var(--radius);
}

@media (min-width: 768px) {
  .feature {
    grid-template-columns: 1fr 1fr;
  }
}

.link-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.link-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: border-color 0.25s, background-color 0.25s;
}

.link-item:hover,
.link-item:focus-within {
  border-color: var(--line-strong);
  background: var(--surface);
}

.link-item-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
}

.link-item-icon svg {
  width: 22px;
  height: 22px;
}

.link-item h3 {
  font-size: 1.2rem;
}

.link-item p {
  font-size: 0.85rem;
  color: var(--muted);
}

.link-item a {
  text-decoration: none;
}

.link-item a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.link-item a:focus-visible {
  outline: none;
}

.link-item:has(a:focus-visible) {
  outline: 1px dashed var(--fg);
  outline-offset: 3px;
}

.link-item-split a::after {
  content: none;
}

.link-item-split h3 {
  font-size: 1.2rem;
}

.link-split {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.link-split a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 0.85rem;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.link-split a:hover,
.link-split a:focus-visible {
  color: var(--fg);
  border-color: var(--fg);
  background: var(--surface-2);
}

.link-split .card-arrow {
  width: 10px;
  height: 10px;
}

.link-item.link-item-split:hover .card-arrow {
  color: inherit;
  transform: none;
}

.link-item-split .link-split a:hover .card-arrow {
  transform: translate(2px, -2px);
}

.link-item:hover .card-arrow {
  color: var(--fg);
  transform: translate(2px, -2px);
}

.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ref-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 1.05rem;
  text-decoration: none;
  transition: border-color 0.25s, background-color 0.25s, color 0.25s;
}

.ref-grid a:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.ref-grid a:hover .card-arrow {
  color: var(--fg);
  transform: translate(2px, -2px);
}

.parallax {
  position: relative;
  height: 80vh;
  height: 80svh;
  clip-path: inset(0);
  --fade: transparent, rgba(0, 0, 0, 0.12) 4%, rgba(0, 0, 0, 0.32) 8%, rgba(0, 0, 0, 0.55) 12%,
    rgba(0, 0, 0, 0.75) 16%, rgba(0, 0, 0, 0.9) 20%, rgba(0, 0, 0, 0.97) 24%, #000 28%,
    #000 72%, rgba(0, 0, 0, 0.97) 76%, rgba(0, 0, 0, 0.9) 80%, rgba(0, 0, 0, 0.75) 84%,
    rgba(0, 0, 0, 0.55) 88%, rgba(0, 0, 0, 0.32) 92%, rgba(0, 0, 0, 0.12) 96%, transparent;
  -webkit-mask-image: linear-gradient(var(--fade));
  mask-image: linear-gradient(var(--fade));
}

.parallax::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("/assets/img/misaimg.webp") center / cover no-repeat;
  filter: var(--art-filter);
}

main:has(> .parallax:last-child) + .site-footer {
  border-top-color: transparent;
}

.site-footer {
  padding-block: 40px calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.92rem;
  position: relative;
  background: var(--bg);
}

.site-footer .container {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
}

.copy-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: color 0.2s, border-color 0.2s;
}

.copy-btn:hover {
  color: var(--fg);
  border-color: var(--line-strong);
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.copyright {
  color: var(--dim);
}

.radio {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(340px, calc(100vw - 96px));
  padding: 6px 14px 6px 6px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.82rem;
  transition: border-color 0.4s, box-shadow 0.4s, max-width 0.4s var(--ease);
}

.radio.is-playing,
.radio.is-loading {
  max-width: min(480px, calc(100vw - 96px));
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line-strong));
  box-shadow: 0 10px 34px -14px color-mix(in srgb, var(--accent) 70%, transparent);
}

.radio-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  padding: 0;
  overflow: hidden;
  background: var(--surface-2) center / cover no-repeat;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.radio-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.radio-btn svg {
  position: relative;
  width: 16px;
  height: 16px;
}

.radio-btn .icon-pause,
.radio.is-playing .radio-btn .icon-play {
  display: none;
}

.radio.is-playing .radio-btn .icon-pause {
  display: block;
}

.radio.is-loading .radio-btn svg {
  animation: blink 0.8s steps(2) infinite;
}

@keyframes blink {
  50% { opacity: 0.2; }
}

.radio-info {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.25;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--dim);
  font-size: 0.72rem;
  white-space: nowrap;
}

.radio-listeners {
  overflow: hidden;
  text-overflow: ellipsis;
}

.radio-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dim);
}

.radio.is-playing .radio-live {
  display: none;
}

.radio-label .radio-eq {
  display: none;
  height: 9px;
  color: var(--accent);
}

.radio-label .radio-eq i {
  width: 2px;
}

.radio.is-playing .radio-label .radio-eq {
  display: flex;
}

.radio-vol {
  display: none;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-left: 2px;
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.radio.is-playing .radio-vol,
.radio.is-loading .radio-vol {
  display: flex;
  animation: radio-vol-in 0.4s var(--ease);
}

@keyframes radio-vol-in {
  from { opacity: 0; transform: translateX(-6px); }
}

.radio-mute {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}

.radio-mute:hover {
  color: var(--fg);
  background: var(--surface-2);
}

.radio-mute[aria-pressed="true"] {
  color: var(--accent);
}

.radio-mute svg {
  width: 17px;
  height: 17px;
}

.radio-vol[data-level="0"] .w1,
.radio-vol[data-level="0"] .w2,
.radio-vol[data-level="1"] .w2,
.radio-vol:not([data-level="0"]) .x {
  display: none;
}

.radio-slider {
  --val: 80%;
  width: 84px;
  height: 22px;
  margin: 0 4px 0 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.radio-slider::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(90deg, var(--accent) var(--val), var(--line-strong) var(--val));
  border-radius: 2px;
}

.radio-slider::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  background: var(--fg);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--glass-strong);
  transition: transform 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.radio-slider::-moz-range-track {
  height: 3px;
  background: var(--line-strong);
  border-radius: 2px;
}

.radio-slider::-moz-range-progress {
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.radio-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--fg);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--glass-strong);
}

.radio-slider:hover::-webkit-slider-thumb,
.radio-slider:focus-visible::-webkit-slider-thumb {
  transform: scale(1.2);
}

.radio-slider:focus-visible {
  outline: 1px dashed var(--fg);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (max-width: 480px) {
  .radio-slider {
    width: 64px;
  }

  .radio.is-playing .radio-listeners {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .radio.is-playing .radio-vol,
  .radio.is-loading .radio-vol {
    animation: none;
  }
}

.radio-track {
  overflow: hidden;
  color: var(--fg);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--glass);
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s var(--ease), color 0.2s;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  color: var(--fg);
}

.to-top svg {
  width: 18px;
  height: 18px;
}

.update-bar {
  position: fixed;
  left: 50%;
  bottom: calc(80px + env(safe-area-inset-bottom));
  z-index: 61;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 6px 6px 6px 18px;
  color: var(--fg);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: 0 14px 40px -16px rgba(0, 0, 0, 0.7);
  font-size: 0.85rem;
  transform: translateX(-50%);
  animation: fade-in 0.3s var(--ease);
}

.update-bar span {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.update-bar button {
  flex-shrink: 0;
  height: 32px;
  white-space: nowrap;
  padding: 0 14px;
  color: var(--fg);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}

.update-bar .update-reload {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.update-bar .update-close {
  width: 32px;
  padding: 0;
}

@media (max-width: 560px) {
  .update-bar {
    left: 16px;
    right: 16px;
    width: auto;
    max-width: none;
    padding: 8px 8px 8px 16px;
    border-radius: 20px;
    transform: none;
  }

  .update-bar button {
    height: 36px;
  }

  .update-bar .update-close {
    width: 36px;
  }

  .toast {
    border-radius: 20px;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(80px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: min(520px, calc(100vw - 32px));
  padding: 6px 18px 6px 6px;
  overflow: hidden;
  color: var(--fg);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  box-shadow: 0 14px 40px -16px rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px) scale(0.98);
  transition: opacity 0.25s, visibility 0.25s, transform 0.3s var(--ease);
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.toast::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform-origin: left;
  opacity: 0.8;
}

.toast.is-visible::after {
  animation: toast-timer 2.4s linear forwards;
}

@keyframes toast-timer {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

.toast-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.toast-icon svg {
  width: 15px;
  height: 15px;
}

.toast-text {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.toast-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.toast-detail {
  overflow: hidden;
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast-detail[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast.is-visible {
    transform: translate(-50%, 0);
  }

  .toast.is-visible::after {
    animation: none;
  }
}

.radio-mini {
  display: none;
}

.radio-mini-wrap {
  position: relative;
  display: inline-flex;
}

.radio-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  display: grid;
  gap: 8px;
  width: 280px;
  padding: 12px 14px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line-strong));
  border-radius: 14px;
  box-shadow: 0 14px 40px -16px rgba(0, 0, 0, 0.7);
  font-size: 0.82rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.25s var(--ease);
}

.radio-pop::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 12px;
}

.radio-pop .radio-label .radio-eq {
  display: flex;
}

.radio-pop .radio-track {
  line-height: 1.3;
}

.radio-pop .radio-vol {
  display: flex;
  margin: 2px 0 0;
  padding: 8px 0 0;
  border-left: 0;
  border-top: 1px solid var(--line);
}

.radio-pop .radio-slider {
  flex: 1;
  width: auto;
}

.radio-eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.radio-eq i {
  width: 3px;
  height: 100%;
  background: currentColor;
  border-radius: 1px;
  transform-origin: bottom;
  animation: radio-eq 0.9s ease-in-out infinite alternate;
}

.radio-eq i:nth-child(2) { animation-duration: 0.7s; animation-delay: -0.3s; }

.radio-eq i:nth-child(3) { animation-duration: 1.1s; animation-delay: -0.6s; }

.radio-mini.is-loading .radio-eq i {
  animation-duration: 0.35s;
  opacity: 0.6;
}

@keyframes radio-eq {
  from { transform: scaleY(0.25); }
  to { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .radio-eq i { animation: none; transform: scaleY(0.7); }
}

body.has-radio .site-footer {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

.js .glitch-text[data-reveal] {
  transform: none;
  transition: opacity 0.7s var(--ease) var(--delay, 0s);
}

.page-lead {
  margin-top: calc(-1 * clamp(8px, 2vw, 20px));
  color: var(--dim);
  font-size: 0.9rem;
  text-align: center;
}

.picks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.picks li {
  display: flex;
}

.pick {
  position: relative;
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 18px;
  overflow: hidden;
  background: var(--well);
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  text-align: left;
  transition: border-color 0.25s, background-color 0.25s, transform 0.3s var(--ease);
}

.pick::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--cat), transparent 70%);
  opacity: 0.12;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}

.pick:hover {
  border-color: var(--cat);
  background: var(--surface);
  transform: translateY(-3px);
}

.pick:hover::after {
  opacity: 0.3;
  transform: scale(1.3);
}

.pick-icon {
  margin-bottom: 8px;
  color: var(--cat);
}

.pick-icon svg {
  width: 28px;
  height: 28px;
}

.pick-title {
  color: var(--fg);
  font-size: 1.02rem;
  line-height: 1.25;
}

.pick-sub {
  color: var(--dim);
  font-size: 0.78rem;
}

@media (max-width: 900px) {
  .picks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 520px) {
  .pick {
    padding: 14px;
  }

  .pick-icon svg {
    width: 22px;
    height: 22px;
  }

  .pick-title {
    font-size: 0.9rem;
  }

  .pick-sub {
    font-size: 0.7rem;
  }
}

.ai-card {
  overflow: hidden;
}

.ai-card::before {
  content: "";
  position: absolute;
  inset: -1px 16px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cat), transparent);
  opacity: 0.55;
  transition: opacity 0.25s;
}

.ai-card:hover::before,
.ai-card:focus-within::before {
  opacity: 1;
}

.ai-card:hover,
.ai-card:focus-within,
.card[style*="--cat"]:hover,
.card[style*="--cat"]:focus-within {
  border-color: var(--line-strong);
  border-color: color-mix(in srgb, var(--cat) 45%, transparent);
  box-shadow: 0 10px 40px -18px var(--cat);
}

.ai-logo {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  background: #f2f2f4;
  border-radius: 11px;
  box-shadow: 0 0 0 1px var(--line);
}

.ai-logo img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: contain;
}

.ai-cat,
.cat-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--cat);
  color: color-mix(in srgb, var(--cat) var(--cat-ink), #000);
  font-size: 0.75rem;
}

.ai-cat::before,
.cat-label::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cat);
}

.tag-hl {
  color: var(--muted);
  border-color: var(--line-strong);
}

.chip-cat::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  vertical-align: 0.12em;
  border-radius: 50%;
  background: var(--cat);
}

.chip-cat[aria-pressed="true"] {
  background: var(--cat);
  border-color: var(--cat);
}

.chip-cat[aria-pressed="true"]::before {
  background: var(--well);
}

code,
kbd {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
}

p code,
p kbd,
.step-text code,
.step-text kbd,
figcaption kbd {
  padding: 1px 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--fg);
}

.term {
  --fg: #e6e6e6;
  --dim: #8e9098;
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.34);
  --surface-2: #131315;

  --t-fg: #d6dbe5;
  --t-green: #2dc55e;
  --t-yellow: #ffcc3e;
  --t-red: #f8111a;
  --t-blue: #2a84d2;
  --t-cursor: #1eaa29;
  --t-ghost: #005f5f;

  max-width: 860px;
  margin: 0 auto;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.term-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding-inline: 14px;
  background: #1c1c1e;
  border-bottom: 1px solid #000;
}

.term-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}

.term-bar span:nth-child(2) { background: #febc2e; }

.term-bar span:nth-child(3) { background: #28c840; }

.term-bar p {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #8e8e93;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.78rem;
  pointer-events: none;
}

.term-body {
  margin: 0;
  padding: 18px 20px 22px;
  overflow-x: auto;
  color: var(--t-fg);
  font-family: "LigaSFMono Nerd Font", "SF Mono", ui-monospace, Menlo, monospace;
  font-size: clamp(0.72rem, 2.4vw, 0.95rem);
  line-height: 1.55;
}

.term-body b { font-weight: 700; }

.t-fg { color: var(--t-fg); }

.t-green { color: var(--t-green); }

.t-yellow { color: var(--t-yellow); }

.t-red { color: var(--t-red); }

.t-blue { color: var(--t-blue); }

.t-ghost { color: var(--t-ghost); }

.t-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--t-cursor);
  animation: blink 1s steps(2) infinite;
}

.term figcaption {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.82rem;
}

.steps {
  display: grid;
  gap: 14px;
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 22px 22px 22px 76px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 22px;
  top: 20px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--fg);
  font-family: var(--font-text);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
}

.step h3 {
  font-size: 1.2rem;
}

.step-text {
  font-size: 0.9rem;
  line-height: 1.65;
}

.step-text b {
  color: var(--fg);
  font-weight: 400;
}

.step .btn {
  justify-self: start;
}

.step .card-cmd code {
  font-size: 0.8rem;
}

@media (max-width: 560px) {
  .step {
    padding: 64px 16px 18px;
  }

  .step::before {
    left: 16px;
    top: 16px;
  }
}

.code {
  max-width: 860px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.85rem;
}

.code-actions {
  display: flex;
  gap: 6px;
}

.code-actions .chip {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.code pre {
  max-height: 520px;
  margin: 0;
  padding: 18px 20px;
  overflow: auto;
  color: var(--text);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  tab-size: 4;
}

.code pre .c { color: var(--dim); }

.code-body summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s, background-color 0.2s;
}

.code-body summary::-webkit-details-marker {
  display: none;
}

.code-body summary::before {
  content: "▸";
  transition: transform 0.2s;
}

.code-body[open] summary::before {
  transform: rotate(90deg);
}

.code-body summary:hover {
  color: var(--fg);
  background: var(--surface-2);
}

.code-body[open] summary {
  border-bottom: 1px solid var(--line);
}

.aliases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 10px;
  max-width: 860px;
  margin: 0 auto;
}

.aliases div {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.aliases dt {
  color: var(--green);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.95rem;
}

.aliases dd {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.one-liner {
  display: grid;
  gap: 14px;
  max-width: 860px;
  margin: 0 auto 18px;
  padding: 22px;
  background: var(--surface);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%), var(--surface);
  border: 1px dashed var(--accent);
  border: 1px dashed color-mix(in srgb, var(--accent) 70%, transparent);
  border-radius: var(--radius);
}

.one-liner h3 {
  margin-bottom: 6px;
  font-size: 1.2rem;
}

.one-liner a {
  color: var(--fg);
}

.one-liner .card-cmd code {
  font-size: 0.9rem;
}

.tool {
  width: calc(100% - 2 * var(--gutter));
  max-width: 860px;
  margin-block: var(--s5);
  padding: clamp(var(--s4), 3vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  scroll-margin-top: calc(var(--header-h) + 76px);
}

.tool-head code,
.tool-status code,
.check code {
  padding: 1px 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--fg);
}

@media (max-width: 700px) {
  .tool {
    padding: 18px 16px;
  }
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}

.check input {
  position: relative;
  flex-shrink: 0;
  width: 34px;
  height: 20px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.check input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: var(--fg);
  border-radius: 50%;
  transition: transform 0.2s var(--ease), background-color 0.2s;
}

.check input:checked {
  background: var(--accent);
}

.check input:checked::before {
  background: #fff;
  transform: translateX(14px);
}

.check input:focus-visible {
  outline: 1px dashed var(--fg);
  outline-offset: 3px;
}

.check:hover {
  color: var(--fg);
}

.calc {
  --calc-line: 1.75;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  height: clamp(320px, 55vh, 560px);
  overflow: hidden;
  background: var(--well);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.calc:focus-within {
  border-color: var(--fg);
}

@media (max-width: 600px) {
  #calc.tool {
    width: 100%;
    padding: var(--s3) 0 0;
    background: none;
    border: 0;
    border-radius: 0;
  }

  .calc {
    --calc-line: 1.7;
    grid-template-columns: minmax(0, 1fr) fit-content(45%);
    height: calc(100svh - var(--header-h) - 190px);
    min-height: 300px;
    border-inline: 0;
    border-radius: 0;
  }
}

.tool {
  position: relative;
}

.help-box {
  width: min(520px, 100%);
}

.help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 14px 18px;
  border-bottom: 1px solid var(--line);
}

.help-head h2 {
  font-size: 1.15rem;
}

.help-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
}

.help-list div {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
}

.help-list div:hover {
  background: var(--surface-2);
}

.help-list dt {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--dim);
}

.help-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
}

.help-list kbd,
.help-head kbd {
  min-width: 24px;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--fg);
  font-family: var(--font-text);
  font-size: 0.78rem;
  text-align: center;
}

.help-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 520px) {
  .help-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.card.is-pickable .card-top {
  padding-right: 40px;
}

.card-top > div {
  min-width: 0;
}

.card-title {
  overflow-wrap: anywhere;
}

.pick-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  background: var(--well);
  color: var(--dim);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease);
}

.pick-btn svg {
  width: 14px;
  height: 14px;
}

.pick-btn .tick,
.card.is-picked .pick-btn .plus {
  display: none;
}

.card.is-picked .pick-btn .tick {
  display: block;
}

.pick-btn:hover {
  color: var(--fg);
  border-color: var(--fg);
  transform: scale(1.06);
}

.card.is-picked {
  border-color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent) inset;
}

.card.is-picked .pick-btn {
  color: #fff;
  background: var(--accent);
  border-style: solid;
  border-color: var(--accent);
}

.brew-tray {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 42;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  width: min(760px, calc(100vw - 2 * var(--gutter)));
  padding: 12px 14px 12px 18px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--accent);
  border-radius: 14px;
  box-shadow: 0 20px 60px var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s, visibility 0.25s, transform 0.3s var(--ease);
}

.brew-tray.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.brew-tray-info {
  display: grid;
  flex: 1 1 220px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.brew-tray-info b {
  color: var(--fg);
  font-weight: 500;
}

.brew-tray-info code {
  overflow: hidden;
  color: var(--dim);
  font-size: 0.75rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brew-tray-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-sm {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 0.9rem;
}

.btn-accent {
  color: #fff;
  background: var(--accent);
  border-style: solid;
  border-color: var(--accent);
}

.btn-accent:hover {
  color: #fff;
  background: #e0464f;
  border-color: #e0464f;
}

body.has-brew-tray .site-footer {
  padding-bottom: calc(200px + env(safe-area-inset-bottom));
}

@media (max-width: 600px) {
  .brew-tray {
    padding: 12px;
  }

  .brew-tray-actions {
    width: 100%;
  }

  .brew-tray-actions .btn {
    flex: 1;
  }
}

.maze {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: 100%;
}

.maze-board {
  --cols: 29;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  width: min(100%, 640px);
  padding: 10px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  font-family: var(--font-text);
  font-size: min(calc((min(100vw - 2 * var(--gutter), 640px) - 22px) / var(--cols) * 0.95), 20px);
  line-height: 1;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.maze-board span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  color: var(--dim);
}

.maze-board .is-wall {
  color: var(--maze-wall);
  background: var(--maze-wall-bg);
}

.maze-board .is-trail {
  color: var(--accent);
  color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.maze-board .is-player {
  color: #fff;
  background: var(--accent);
  border-radius: 3px;
  font-weight: 500;
  box-shadow: 0 0 12px var(--accent);
}

.maze-board .is-exit {
  color: #2dc55e;
  animation: blink 1.2s ease-in-out infinite;
}

.maze.is-bump .maze-board {
  animation: bump 0.18s;
}

@keyframes bump {
  30% { transform: translateX(-3px); }
  70% { transform: translateX(3px); }
}

.maze.is-won .maze-board {
  border-color: #2dc55e;
  box-shadow: 0 0 40px rgba(45, 197, 94, 0.25);
}

.maze-status {
  min-height: 1.6em;
  color: var(--muted);
  font-size: 0.9rem;
}

.maze-pad {
  display: grid;
  grid-template-columns: repeat(3, 48px);
  grid-template-areas: ". up ." "left down right";
  gap: 6px;
}

.maze-pad button {
  width: 48px;
  height: 48px;
  font-size: 1.1rem;
}

.maze-pad [data-maze-dir="0,-1"] { grid-area: up; }

.maze-pad [data-maze-dir="-1,0"] { grid-area: left; }

.maze-pad [data-maze-dir="0,1"] { grid-area: down; }

.maze-pad [data-maze-dir="1,0"] { grid-area: right; }

@media (hover: hover) and (pointer: fine) {
  .maze-pad {
    display: none;
  }
}

.not-found {
  min-height: calc(100svh - var(--header-h) - 140px);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 28px;
  padding-block: 48px;
  text-align: center;
}

.not-found .glitch-text {
  font-size: clamp(6rem, 30vw, 14rem);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

.tool .chips .chip {
  font-family: var(--font-text);
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tool .chips .chip:hover {
  color: var(--fg);
  border-color: var(--accent);
}

.tool[hidden] {
  display: none;
}

#diff.tool {
  max-width: 1160px;

  --d-add: rgba(45, 197, 94, 0.12);
  --d-add-mark: rgba(45, 197, 94, 0.34);
  --d-del: rgba(208, 52, 63, 0.13);
  --d-del-mark: rgba(208, 52, 63, 0.38);
}

@media (hover: none) {
  .radio .radio-vol,
  .radio.is-playing .radio-vol,
  .radio.is-loading .radio-vol,
  .radio-pop {
    display: none;
  }
}
