/* nodeenvironment — variant 1: faithful editorial adaptation, pure b&w */

:root {
  --bg: #000;
  --fg: #fff;
  --gray-1: rgba(255, 255, 255, 0.72);
  --gray-2: rgba(255, 255, 255, 0.5);
  --gray-3: rgba(255, 255, 255, 0.3);
  --line: rgba(255, 255, 255, 0.1);
  --surface: #0a0a0a;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-card: 22px;
  --r-pill: 999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html {
  scroll-padding-top: 88px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-style: italic; }

:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible { border-radius: var(--r-pill); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 500;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.btn-primary {
  background: var(--fg);
  color: #000;
}
.btn-primary:hover { background: rgba(255, 255, 255, 0.82); }
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
}
.btn-sm { font-size: 13px; padding: 8px 18px; }
.btn-lg { font-size: 15px; padding: 14px 30px; }
.btn-xl { font-size: 16px; padding: 17px 38px; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface);
}
.brand-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.nav-links {
  display: flex;
  gap: 16px;
}
.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--gray-1);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--fg); }
@media (min-width: 720px) {
  .nav-links { gap: 28px; }
}
@media (max-width: 540px) {
  .brand-avatar { display: none; }
  .brand-name { font-size: 12px; letter-spacing: 0; }
  .nav-inner { gap: 8px; }
  .nav-links { gap: 10px; }
  .nav-links a { font-size: 11.5px; }
  .btn-sm { padding: 8px 14px; font-size: 12px; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(40px, 6vh, 72px) 0 clamp(36px, 5vh, 56px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 120%;
  background: radial-gradient(ellipse 55% 45% at 50% 0%, rgba(255, 255, 255, 0.14), transparent 65%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}
.hero-media { display: flex; justify-content: center; }
.hero-preview {
  width: 100%;
  max-width: 270px;
  aspect-ratio: 9 / 16;
  max-height: 460px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #0a0a0a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-preview { max-width: 230px; max-height: 400px; }
}
.hero-headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  max-width: 14ch;
  margin: 0;
  text-wrap: balance;
}
.hero-headline em { font-style: italic; }
.hero-sub {
  margin: 28px auto 0;
  max-width: 560px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--gray-2);
}
.hero-actions {
  position: relative;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- stats ---------- */

.stats {
  padding: clamp(48px, 7vh, 88px) 0;
  border-top: 1px solid var(--line);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 44px 20px;
}
@media (min-width: 720px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 56px 32px; }
}
.stat {
  text-align: center;
  padding: 0 8px;
}
@media (min-width: 720px) {
  .stat:nth-child(3n+2) {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
}
.stat-value {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(64px, 8.5vw, 112px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-value--green {
  color: #35e07a;
  text-shadow: 0 0 34px rgba(53, 224, 122, 0.35);
}
@media (max-width: 560px) {
  .stat-value { font-size: clamp(30px, 9vw, 56px); }
  .stats-grid { gap: 36px 14px; }
}
.stat-label {
  display: block;
  margin-top: 14px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gray-1);
}

/* ---------- marquee ---------- */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 60s linear infinite;
}
.marquee-group {
  display: flex;
  align-items: center;
  flex: none;
}
.mq-item {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gray-1);
  white-space: nowrap;
}
.mq-dot {
  color: var(--gray-3);
  padding: 0 22px;
  font-size: 12px;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- work ---------- */

.work {
  padding: clamp(72px, 11vh, 140px) 0 clamp(56px, 8vh, 100px);
}
.work-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.work-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gray-1);
}
.work-count { color: var(--gray-2); font-weight: 500; }
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-btn {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-1);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 7px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.filter-btn:hover { border-color: rgba(255, 255, 255, 0.4); color: var(--fg); }
.filter-btn[aria-pressed="true"] {
  background: var(--fg);
  color: #000;
  border-color: var(--fg);
}

.work-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.work-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  padding: 4px 0 8px;
  mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
}
.work-row::-webkit-scrollbar { display: none; }
/* endless rows: a softer fade at both edges so cards slide in and out of view */
.work-row--loop {
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.work-row:active { cursor: grabbing; }
.work-item {
  flex: 0 0 auto;
  width: clamp(190px, 21vw, 250px);
  min-width: 0;
}
@media (max-width: 560px) {
  .work-item { width: 44vw; }
}
.work-item[hidden] { display: none; }

.card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--surface);
}
.card-toggle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-toggle:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: -4px;
  border-radius: var(--r-card);
}
.play-ic {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.play-ic::after {
  content: "";
  display: block;
  margin-left: 4px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent var(--fg);
}
.card.playing .play-ic {
  opacity: 0;
  transform: scale(0.85);
}
.card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 4px 0;
}
.card-title {
  margin: 0;
  font-family: var(--sans, inherit);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-cat {
  flex: none;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gray-2);
}

/* ---------- faq ---------- */

.faq {
  padding: clamp(72px, 11vh, 140px) 0;
  border-top: 1px solid var(--line);
}
.faq-inner { max-width: 760px; }
.faq-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5.5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 40px;
}
.faq-item {
  border-top: 1px solid var(--line);
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-size: 16.5px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: "+";
  content: "+" / "";
  flex: none;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
  color: var(--gray-2);
  transition: transform 0.25s ease;
}
.faq-item[open] .faq-q::after { transform: rotate(45deg); }
.faq-q:hover { color: var(--gray-1); }
.faq-a {
  padding: 0 0 26px;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.7;
  color: var(--gray-1);
}

/* ---------- final cta ---------- */

.cta {
  position: relative;
  padding: clamp(110px, 18vh, 200px) 0;
  text-align: center;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: auto -20% -50%;
  height: 110%;
  background: radial-gradient(ellipse 55% 50% at 50% 100%, rgba(255, 255, 255, 0.1), transparent 65%);
  pointer-events: none;
}
.cta-inner { position: relative; }
.cta-headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 8vw, 96px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  max-width: 14ch;
  margin: 0 auto;
  text-wrap: balance;
}
.cta-sub {
  margin: 24px auto 0;
  max-width: 520px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--gray-2);
}
.cta .btn-xl {
  margin-top: 44px;
  position: relative;
  overflow: hidden;
  font-size: 19px;
  font-weight: 600;
  padding: 24px 56px;
  animation: cta-pulse 2.4s ease-out infinite;
}
.cta .btn-xl::after {
  content: "\2192";
  margin-left: 12px;
  display: inline-block;
  transition: transform 0.2s ease;
}
.cta .btn-xl:hover::after { transform: translateX(5px); }
.cta .btn-xl::before {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(0, 0, 0, 0.14), transparent);
  animation: cta-shine 3s ease-in-out infinite;
}
@keyframes cta-shine {
  0%, 55% { left: -80%; }
  85%, 100% { left: 130%; }
}
@keyframes cta-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45); }
  70%, 100% { box-shadow: 0 0 0 22px rgba(255, 255, 255, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .cta .btn-xl { animation: none; }
  .cta .btn-xl::before { animation: none; display: none; }
}
.contacts {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.contacts a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--gray-1);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.contacts a svg { width: 21px; height: 21px; fill: currentColor; }
.contacts a:hover {
  color: #000;
  background: var(--fg);
  border-color: var(--fg);
  transform: translateY(-3px);
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--gray-2);
}
.footer-brand { font-weight: 600; color: var(--gray-1); }

/* ---------- load error ---------- */

.load-error {
  padding: 120px var(--gutter);
  text-align: center;
  color: var(--gray-1);
  font-size: 15px;
}

/* ---------- entrance reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .marquee { overflow: hidden; }
  .marquee-track { animation: none; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn, .filter-btn, .play-ic, .faq-q::after {
    transition: none;
  }
}

/* ---------- utilities / structural ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.faq-list { display: block; }
.footer-loc, .footer-year { color: var(--gray-2); }

/* ---------- hero kicker (grafted from variant 2) ---------- */
.hero-kicker {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gray-2);
  margin-bottom: 28px;
}

/* ---------- keycap CTA (hero) ---------- */
.btn-keycap {
  display: inline-block;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.keysvg {
  display: block;
  width: clamp(200px, 24vw, 252px);
  height: auto;
  overflow: visible;
  animation: key-float 3.4s ease-in-out infinite;
}
@keyframes key-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}
.keycap {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.1s ease-out;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.55));
  animation: key-hue 10s linear infinite;
}
@keyframes key-hue {
  from { filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.55)) hue-rotate(0deg); }
  to { filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.55)) hue-rotate(360deg); }
}
.btn-keycap:hover .keycap {
  transform: translateY(-7px);
  animation: key-hue 10s linear infinite, key-shake 0.5s ease-in-out infinite;
}
@keyframes key-shake {
  0%, 100% { transform: translateY(-7px) rotate(0deg); }
  25% { transform: translate(-1.6px, -8.5px) rotate(-1.2deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
  75% { transform: translate(1.6px, -8.5px) rotate(-0.7deg); }
}
.btn-keycap:active .keycap,
.btn-keycap .keycap.is-pressed {
  transform: translateY(32px);
  animation: key-hue 10s linear infinite;
}
.keycap-label {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: 0.01em;
  fill: #ffffff;
}
.pupil {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.12s ease-out;
}
.eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: key-blink 4.6s ease-in-out infinite;
}
.eye-r { animation-delay: 0.12s; }
@keyframes key-blink {
  0%, 91%, 97%, 100% { transform: scaleY(1); }
  94% { transform: scaleY(0.08); }
}
.doodles path, .doodles circle {
  stroke: #c084fc;
  stroke-width: 5;
  stroke-linecap: round;
  fill: none;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: scale(0.6);
}
.doodles .dot { fill: #c084fc; stroke: none; }
.btn-keycap:hover .doodles path,
.btn-keycap:hover .doodles circle,
.keycap.is-pressed ~ .doodles path,
.btn-keycap.burst .doodles path,
.btn-keycap.burst .doodles circle {
  opacity: 1;
  transform: scale(1);
}
.btn-keycap:hover .doodles path { animation: key-wiggle 0.9s ease-in-out infinite; }
@keyframes key-wiggle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.08) rotate(3deg); }
}
.btn-keycap:focus-visible .keysvg {
  outline: 2px solid var(--fg);
  outline-offset: 8px;
  border-radius: 24px;
}
@media (prefers-reduced-motion: reduce) {
  .keysvg, .eye, .doodles path, .keycap, .btn-keycap:hover .keycap { animation: none; }
  .keycap, .pupil, .doodles path, .doodles circle { transition: none; }
  .doodles path, .doodles circle { opacity: 1; transform: none; }
}

/* ---------- views badge ---------- */
.card-views {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #35e07a;
  border: 1px solid rgba(53, 224, 122, 0.35);
  pointer-events: none;
}
.card-views svg {
  width: 11px;
  height: 11px;
  fill: #35e07a;
}

/* ---------- tools / stack ---------- */
.tools {
  padding: clamp(56px, 9vh, 110px) 0;
  border-top: 1px solid var(--line);
}
.tools-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px 14px;
  margin: 48px auto 0;
  max-width: 980px;
}
.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, hsl(var(--h) 92% 88%), hsl(var(--h) 80% 74%));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.75),
    inset 0 -3px 6px hsl(var(--h) 60% 55% / 0.45),
    0 10px 24px rgba(0, 0, 0, 0.45);
  color: hsl(var(--h) 55% 28%);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transform: rotate(var(--r)) translateY(var(--ty));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
  will-change: transform;
  cursor: default;
  user-select: none;
}
.tool-pill img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  flex: none;
}
.tool-pill:hover {
  transform: rotate(0deg) translateY(calc(var(--ty) - 6px)) scale(1.12);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.75),
    inset 0 -3px 6px hsl(var(--h) 60% 55% / 0.45),
    0 18px 44px hsl(var(--h) 80% 60% / 0.35);
  z-index: 2;
  position: relative;
}
@media (max-width: 640px) {
  .tool-pill { font-size: 15.5px; padding: 11px 18px 11px 12px; gap: 9px; border-radius: 14px; }
  .tool-pill img { width: 28px; height: 28px; border-radius: 7px; }
  .tools-grid { gap: 12px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .tool-pill { transition: none; }
}

/* ---------- card sound toggle ---------- */
.card-sound {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.card-sound svg { width: 18px; height: 18px; fill: currentColor; }
.card-sound:hover { background: rgba(0, 0, 0, 0.8); border-color: rgba(255, 255, 255, 0.6); transform: scale(1.08); }
.card-sound:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

/* ---------- lightbox ---------- */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.lightbox-inner {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
#lightbox-video {
  width: min(92vw, calc(82vh * 9 / 16));
  aspect-ratio: 9 / 16;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 20px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}
.lightbox-caption {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
}
.lightbox-title { font-weight: 600; color: var(--fg); }
.lightbox-meta { color: #35e07a; font-weight: 500; }
.lightbox-close {
  position: absolute;
  top: -6px;
  right: calc(50% - min(46vw, 41vh * 9 / 16) - 54px);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.15); transform: scale(1.06); }
.lightbox-close:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
@media (max-width: 640px) {
  .lightbox-close { right: 4vw; top: -54px; }
}

/* ---------- scribble arrow (hero) ---------- */
.scribble-arrow {
  position: absolute;
  left: calc(clamp(200px, 24vw, 252px) - 2px);
  bottom: 84px;
  width: clamp(160px, 17vw, 230px);
  height: auto;
  pointer-events: none;
  animation: key-hue-plain 10s linear infinite;
}
@keyframes key-hue-plain {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(360deg); }
}
@media (max-width: 860px) {
  .scribble-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scribble-arrow { animation: none; }
}

/* ---------- formats drawer ---------- */
.drawer[hidden] { display: none; }
.drawer { position: fixed; inset: 0; z-index: 70; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 94vw);
  background: #0a0a0a;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  animation: drawer-in 0.28s ease-out;
}
@keyframes drawer-in {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 28px 18px;
  border-bottom: 1px solid var(--line);
}
.drawer-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.01em;
}
.drawer-title em { font-style: italic; }
.drawer-close {
  width: 38px;
  height: 38px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: transparent;
  color: var(--fg);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.drawer-close:hover { background: rgba(255, 255, 255, 0.12); }
.drawer-close:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.drawer-body {
  overflow-y: auto;
  padding: 10px 28px 36px;
  overscroll-behavior: contain;
}
.drawer-cat {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 21px;
  margin-top: 28px;
}
.drawer-note {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--gray-2);
}
.drawer-list {
  list-style: none;
  margin-top: 12px;
}
.drawer-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 14.5px;
  color: var(--gray-1);
}
.tier {
  flex: none;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--gray-1);
}
.tier-s { color: #35e07a; border-color: rgba(53, 224, 122, 0.5); }
.tier-a { color: #ffffff; border-color: rgba(255, 255, 255, 0.45); }
.drawer-legend {
  margin-top: 22px;
  font-size: 12px;
  color: var(--gray-2);
}
.stat-button {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  padding: 0;
}
.stat-button:focus-visible { outline: 2px solid var(--fg); outline-offset: 6px; border-radius: 12px; }
.stat-hint {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #35e07a;
  border-bottom: 1px dashed rgba(53, 224, 122, 0.5);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}
.stat-button:hover .stat-hint { border-bottom-style: solid; }
@media (prefers-reduced-motion: reduce) {
  .drawer-panel { animation: none; }
}

/* ---------- contact picker ---------- */
.chooser[hidden] { display: none; }
.chooser {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.chooser-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.chooser-panel {
  position: relative;
  width: min(420px, 100%);
  padding: 30px 26px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  animation: chooser-in 0.24s ease-out;
}
@keyframes chooser-in {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.chooser-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: transparent;
  color: var(--fg);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.chooser-close:hover { background: rgba(255, 255, 255, 0.12); }
.chooser-close:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.chooser-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  letter-spacing: -0.01em;
  padding-right: 40px;
}
.chooser-title em { font-style: italic; }
.chooser-sub {
  margin-top: 6px;
  color: var(--gray-1);
  font-size: 14.5px;
}
.chooser-list {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chooser-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--fg);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.chooser-item:hover { background: var(--fg); border-color: var(--fg); color: #000; transform: translateY(-2px); }
.chooser-item:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.chooser-icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.chooser-icon svg { width: 20px; height: 20px; fill: currentColor; }
.chooser-item:hover .chooser-icon { border-color: rgba(0, 0, 0, 0.2); }
.chooser-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.chooser-name { font-weight: 600; font-size: 16px; }
.chooser-note { font-size: 13px; color: var(--gray-1); }
.chooser-item:hover .chooser-note { color: rgba(0, 0, 0, 0.6); }
.chooser-arrow { font-size: 18px; opacity: 0.7; }
