/* =====================================================================
   たなぼためる — Official Website
   Redesign: "Midnight Atelier" — sapphire blue + platinum, chic & noble
   ===================================================================== */

:root {
  color-scheme: dark;

  /* type */
  --font-serif: "Shippori Mincho B1", "Yu Mincho", serif;
  --font-display: "Cormorant Garamond", "Shippori Mincho B1", serif;
  --font-sans: "Zen Kaku Gothic New", "Hiragino Sans", system-ui, sans-serif;
  --font-label: "Jost", "Zen Kaku Gothic New", sans-serif;

  /* dark palette */
  --bg-0: #05070e;
  --bg-1: #090d18;
  --bg-2: #0c1322;
  --ink: #e9eefb;
  --ink-soft: #aab6cc;
  --muted: #7e8aa2;
  --accent: #5aa2ff;
  --accent-bright: #8cc0ff;
  --accent-strong: #2f7bf0;
  --accent-rgb: 90, 162, 255;
  --platinum: #d6e2f2;
  --platinum-rgb: 214, 226, 242;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(var(--accent-rgb), 0.30);
  --panel: rgba(12, 18, 31, 0.62);
  --panel-solid: rgba(10, 15, 27, 0.92);
  --surface: rgba(14, 20, 34, 0.55);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.85);
  --shadow-soft: 0 18px 50px -24px rgba(0, 0, 0, 0.7);

  --header-bg: linear-gradient(180deg, rgba(5, 7, 14, 0.72), rgba(5, 7, 14, 0));
  --body-bg:
    radial-gradient(120% 80% at 82% -10%, rgba(var(--accent-rgb), 0.16), transparent 55%),
    radial-gradient(90% 60% at 8% 105%, rgba(47, 123, 240, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-0) 100%);
  --hero-overlay:
    linear-gradient(180deg, rgba(5, 7, 14, 0.10) 0%, rgba(5, 7, 14, 0.46) 58%, var(--bg-0) 100%),
    linear-gradient(90deg, rgba(5, 7, 14, 0.55), transparent 46%, rgba(5, 7, 14, 0.30));
  --hero-filter: saturate(0.55) hue-rotate(178deg) brightness(0.82) contrast(1.05);
  --grain-opacity: 0.05;
  --cue-blend: screen;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg-0: #eef3fb;
  --bg-1: #f6f9ff;
  --bg-2: #ffffff;
  --ink: #131c2c;
  --ink-soft: #44546e;
  --muted: #6c7991;
  --accent: #1f6fe0;
  --accent-bright: #2f7bf0;
  --accent-strong: #0a55c8;
  --accent-rgb: 31, 111, 224;
  --platinum: #4a5e7e;
  --platinum-rgb: 74, 94, 126;
  --line: rgba(18, 32, 56, 0.10);
  --line-strong: rgba(var(--accent-rgb), 0.28);
  --panel: rgba(255, 255, 255, 0.74);
  --panel-solid: rgba(255, 255, 255, 0.95);
  --surface: rgba(255, 255, 255, 0.7);
  --shadow: 0 30px 70px -34px rgba(20, 45, 95, 0.45);
  --shadow-soft: 0 16px 44px -26px rgba(20, 45, 95, 0.4);
  --header-bg: linear-gradient(180deg, rgba(246, 249, 255, 0.82), rgba(246, 249, 255, 0));
  --body-bg:
    radial-gradient(120% 80% at 84% -12%, rgba(var(--accent-rgb), 0.18), transparent 52%),
    radial-gradient(90% 60% at 6% 106%, rgba(120, 170, 255, 0.20), transparent 58%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 50%, var(--bg-1) 100%);
  --hero-overlay:
    linear-gradient(180deg, rgba(246, 249, 255, 0.30) 0%, rgba(246, 249, 255, 0.66) 60%, var(--bg-1) 100%),
    linear-gradient(90deg, rgba(246, 249, 255, 0.55), transparent 50%, rgba(246, 249, 255, 0.28));
  --hero-filter: saturate(0.6) hue-rotate(176deg) brightness(1.12) contrast(0.98);
  --grain-opacity: 0.035;
  --cue-blend: multiply;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--body-bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.6s ease, color 0.4s ease;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }

::selection { background: rgba(var(--accent-rgb), 0.3); color: var(--ink); }

/* ===================== Entrance / intro ===================== */
.intro {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  pointer-events: none;
}
body.intro-done .intro { display: none; }

.intro__panel {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  background: var(--bg-0);
  z-index: 1;
}
.intro__panel--top {
  top: 0;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.25);
  animation: introTop 1.2s cubic-bezier(0.76, 0, 0.24, 1) 1.7s forwards;
}
.intro__panel--bottom {
  bottom: 0;
  border-top: 1px solid rgba(var(--accent-rgb), 0.25);
  animation: introBottom 1.2s cubic-bezier(0.76, 0, 0.24, 1) 1.7s forwards;
}

.intro__core {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 26px;
  animation: introCoreOut 0.7s ease 1.7s forwards;
}

.intro__ring {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.25), inset 0 0 24px rgba(var(--accent-rgb), 0.12);
  opacity: 0;
  transform: scale(0.82);
  animation: introRing 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s forwards;
}
.intro__mark-image {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(86, 148, 222, 0.28));
}
.intro__mark {
  font-family: "Cinzel", serif;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--platinum);
  text-shadow: 0 0 22px rgba(var(--accent-rgb), 0.45);
}
.intro__mark em { font-style: italic; color: var(--accent-bright); }

.intro__name {
  display: flex;
  gap: 0.12em;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 5vw, 2.1rem);
  letter-spacing: 0.22em;
  color: var(--ink);
}
.intro__name span {
  opacity: 0;
  transform: translateY(14px);
  animation: introChar 0.6s ease forwards;
}
.intro__name span:nth-child(1) { animation-delay: 0.55s; }
.intro__name span:nth-child(2) { animation-delay: 0.65s; }
.intro__name span:nth-child(3) { animation-delay: 0.75s; }
.intro__name span:nth-child(4) { animation-delay: 0.85s; }
.intro__name span:nth-child(5) { animation-delay: 0.95s; }
.intro__name span:nth-child(6) { animation-delay: 1.05s; }

.intro__rule {
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  animation: introRule 1s ease 1s forwards;
}

/* ===================== Ambient ===================== */
.sparkle-canvas, .cursor-light, .grain { pointer-events: none; position: fixed; inset: 0; }
.sparkle-canvas { z-index: 3; opacity: 0.8; mix-blend-mode: screen; }
.cursor-light {
  z-index: 2;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(var(--accent-rgb), 0.13), transparent 16rem);
  transition: background 0.18s linear;
}
.grain {
  z-index: 4;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===================== Header ===================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(20px, 4vw, 58px);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: padding 0.4s ease, background 0.4s ease;
}
.site-header.is-shrunk {
  padding-block: 12px;
  background: var(--panel-solid);
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; min-width: 0; }
.brand__logo {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.24em;
  font-family: "Cinzel", serif;
  font-weight: 500;
  font-size: 1.18rem;
  letter-spacing: 0.16em;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
  transition: letter-spacing 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.3s ease;
}
.brand__logo em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.4);
}
.brand:hover .brand__logo { letter-spacing: 0.26em; color: var(--ink); }
.brand:hover .brand__logo em { color: var(--accent-bright); }
.brand__logo--sm { font-size: 0.92rem; letter-spacing: 0.14em; color: var(--ink-soft); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 38px);
  font-family: var(--font-label);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.nav a { position: relative; display: inline-flex; align-items: baseline; gap: 7px; padding: 4px 0; }
.nav a span { font-size: 0.62rem; color: var(--accent); letter-spacing: 0.1em; }
.nav a b { font: inherit; }
.nav a i { display: none; font-style: normal; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.6, 0, 0.2, 1);
}
.nav a:hover, .nav a:focus-visible { color: var(--ink); }
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.theme-toggle {
  flex: none;
  width: 56px; height: 30px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.08);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.theme-toggle:hover { border-color: rgba(var(--accent-rgb), 0.7); }
.theme-toggle__track { position: relative; display: block; width: 100%; height: 100%; }
.theme-toggle__thumb {
  position: absolute; top: 50%; left: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent-bright), var(--accent-strong));
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.6);
  transform: translate(0, -50%);
  transition: transform 0.32s cubic-bezier(0.5, 1.4, 0.5, 1);
}
:root[data-theme="light"] .theme-toggle__thumb { transform: translate(26px, -50%); }

/* ===================== Shared type ===================== */
.kicker {
  margin: 0 0 18px;
  font-family: var(--font-label);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker .dot {
  display: inline-block; width: 5px; height: 5px; margin: 0 8px 2px;
  border-radius: 50%; background: var(--platinum); vertical-align: middle;
}
.section__title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0.02em;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
}
.section__sub {
  margin: 20px 0 0;
  max-width: 38ch;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 300;
}

/* ===================== Hero ===================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 140px clamp(22px, 7vw, 120px) 100px;
  isolation: isolate;
  overflow: hidden;
  perspective: 1200px;
}
.hero__backdrop {
  position: absolute; inset: 0; z-index: -2;
  background-image: url("assets/hero-atmosphere.png");
  background-size: cover;
  background-position: center 30%;
  filter: var(--hero-filter);
  transform: scale(1.06);
  animation: slowBreath 18s ease-in-out infinite alternate;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--hero-overlay);
}
.hero__beam {
  position: absolute; top: -10%; right: 12%; z-index: -1;
  width: 46vw; height: 120%;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.16), transparent 60%);
  filter: blur(30px);
  transform: rotate(8deg);
  mix-blend-mode: screen;
  opacity: 0.7;
  animation: beamSway 12s ease-in-out infinite alternate;
}

/* spatial floating light orbs (bokeh depth) */
.hero__orbs { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__orb {
  position: absolute;
  --d: 30;
  transform: translate3d(calc(var(--mx, 0) * var(--d) * 1px), calc(var(--my, 0) * var(--d) * 1px), 0);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}
.hero__orb::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  filter: blur(44px);
  mix-blend-mode: screen;
  opacity: 0.55;
  background: var(--orb-bg);
  animation: orbFloat var(--orb-dur, 16s) ease-in-out infinite alternate;
}
.hero__orb--1 { width: 380px; height: 380px; left: 4%; top: 34%; --d: 22;
  --orb-bg: radial-gradient(circle, rgba(var(--accent-rgb), 0.5), transparent 70%); --orb-dur: 15s; }
.hero__orb--2 { width: 300px; height: 300px; right: 14%; top: 12%; --d: 46;
  --orb-bg: radial-gradient(circle, rgba(140, 192, 255, 0.45), transparent 70%); --orb-dur: 19s; }
.hero__orb--3 { width: 240px; height: 240px; left: 46%; bottom: 4%; --d: 62;
  --orb-bg: radial-gradient(circle, rgba(var(--platinum-rgb), 0.32), transparent 70%); --orb-dur: 17s; }
.hero__orb--4 { width: 180px; height: 180px; right: 32%; bottom: 22%; --d: 80;
  --orb-bg: radial-gradient(circle, rgba(var(--accent-rgb), 0.4), transparent 70%); --orb-dur: 13s; }

.hero__content {
  max-width: 920px;
  position: relative;
  transform-style: preserve-3d;
  transform:
    rotateX(calc(var(--my, 0) * -1.6deg))
    rotateY(calc(var(--mx, 0) * 2.4deg))
    translate3d(calc(var(--mx, 0) * -12px), calc(var(--my, 0) * -9px), 0);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero__kicker {
  opacity: 0;
  animation: heroFade 0.9s ease 1.85s forwards;
}

/* name — refined label, not a giant block */
.hero__name {
  margin: 0 0 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  animation: heroFade 0.9s ease 1.95s forwards;
}
.hero__name-text {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  letter-spacing: 0.34em;
  color: var(--ink);
}
.hero__name-roman {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-label);
  font-size: clamp(0.7rem, 1vw, 0.82rem);
  font-weight: 400;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero__name-roman::before {
  content: "";
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* statement — the editorial focal point */
.hero__statement {
  margin: 0 0 46px;
  max-width: 17ch;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6.4vw, 5rem);
  line-height: 1.18;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-shadow: 0 14px 50px rgba(0, 0, 0, 0.4);
}
.hero__statement-line {
  display: block;
  opacity: 0;
  transform: translateY(0.45em);
  animation: heroLineRise 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero__statement-line:nth-child(1) { animation-delay: 2.05s; }
.hero__statement-line:nth-child(2) { animation-delay: 2.22s; }
.hero__statement-line--accent {
  font-style: italic;
  color: var(--accent);
}

.hero__watermark {
  position: absolute;
  right: clamp(8px, 3vw, 64px);
  top: 50%;
  z-index: -1;
  --d: 54;
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.6rem, 7vw, 6.5rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  white-space: nowrap;
  color: rgba(var(--accent-rgb), 0.12);
  user-select: none;
  opacity: 0;
  transform: translate(0, -50%) translate3d(calc(var(--mx, 0) * var(--d) * 1px), calc(var(--my, 0) * var(--d) * 1px), 0);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: heroFade 1.3s ease 2.5s forwards;
}

.hero__actions {
  display: flex; flex-wrap: wrap; gap: 16px;
  opacity: 0;
  animation: heroFade 0.9s ease 2.5s forwards;
}

.button {
  min-height: 52px;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 0 26px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-label);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  background: var(--surface);
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.button__glyph { font-size: 0.72rem; }
.button--primary {
  border-color: transparent;
  color: #04101f;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-strong));
  box-shadow: 0 16px 40px -14px rgba(var(--accent-rgb), 0.6);
}
.button--primary:hover { box-shadow: 0 20px 50px -12px rgba(var(--accent-rgb), 0.8); }
.button:hover, .button:focus-visible { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), 0.8); }
:root[data-theme="light"] .button--primary { color: #f6f9ff; }

.scroll-cue {
  position: absolute; left: clamp(22px, 7vw, 120px); bottom: 38px;
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-label);
  font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: heroFade 0.9s ease 2.7s forwards;
}
.scroll-cue__line {
  position: relative; width: 56px; height: 1px; background: var(--line-strong); overflow: hidden;
}
.scroll-cue__line span {
  position: absolute; inset: 0; width: 40%;
  background: var(--accent);
  animation: cueSlide 2s ease-in-out infinite;
}

/* ===================== Sections ===================== */
.section {
  position: relative;
  z-index: 5;
  padding: clamp(90px, 12vw, 160px) clamp(20px, 5vw, 80px);
}
.section__head { width: min(1160px, 100%); margin: 0 auto 56px; }
.section__head--split {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}

/* ----- Videos ----- */
.video-grid {
  width: min(1160px, 100%); margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.video-card {
  position: relative; min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(26px);
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.video-card.is-visible { animation: cardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.video-card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.video-frame {
  position: relative; aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 68% 22%, rgba(var(--accent-rgb), 0.3), transparent 60%),
    linear-gradient(135deg, rgba(47, 123, 240, 0.26), rgba(8, 12, 22, 0.9));
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-card--short .video-frame {
  width: min(100%, 320px);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
}
.video-placeholder { position: absolute; inset: 0; display: grid; place-items: center; }
.video-placeholder span {
  width: 66px; height: 66px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.55);
  background: rgba(5, 8, 16, 0.4);
  color: var(--accent-bright);
  font-size: 0.9rem;
  box-shadow: 0 0 36px rgba(var(--accent-rgb), 0.3);
  transition: transform 0.3s ease, background 0.3s ease;
}
.video-card:hover .video-placeholder span { transform: scale(1.1); background: rgba(var(--accent-rgb), 0.18); }
.video-card__body { padding: 20px 22px 24px; display: grid; gap: 8px; }
.video-card__body h3 {
  margin: 0; font-family: var(--font-serif); font-weight: 500; font-size: 1.18rem; letter-spacing: 0.02em;
}
.video-card__body p {
  margin: 0; font-family: var(--font-label); font-size: 0.74rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.video-more-note {
  width: min(1160px, 100%);
  margin: 24px auto 0;
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
  color: var(--muted);
}

/* ----- Repertoire ----- */
.repertoire-count {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--font-display);
}
.repertoire-count__num { font-size: 3.6rem; line-height: 1; color: var(--accent); font-weight: 600; }
.repertoire-count__div { font-size: 2rem; color: var(--muted); }
.repertoire-count__total { font-size: 2rem; color: var(--ink-soft); }
.repertoire-count__label {
  font-family: var(--font-label); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); margin-left: 4px;
}

.controls {
  width: min(1160px, 100%); margin: 0 auto 22px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 14px; align-items: center;
}
.search {
  min-width: 0; height: 50px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search:focus-within { border-color: rgba(var(--accent-rgb), 0.7); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12); }
.search__icon { color: var(--accent); font-size: 1.2rem; }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; letter-spacing: 0.02em; }
.search input::placeholder { color: var(--muted); }

.genre-filters { display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; }
.chip {
  height: 42px; padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-label); font-size: 0.82rem; letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: var(--surface);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}
.chip:hover { transform: translateY(-2px); color: var(--ink); border-color: var(--line-strong); }
.chip[aria-pressed="true"] {
  color: var(--ink);
  border-color: rgba(var(--accent-rgb), 0.7);
  background: rgba(var(--accent-rgb), 0.16);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.2);
}
.chip__heart { color: var(--accent); transition: color 0.2s ease; }
.chip--favorite[aria-pressed="true"] .chip__heart { color: #ff6f8d; }
.chip--favorite[aria-pressed="true"] { background: rgba(255, 111, 141, 0.14); border-color: rgba(255, 111, 141, 0.5); }

.table-shell {
  width: min(1160px, 100%); margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.repertoire-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.repertoire-table col { }
.col-index { width: 64px; }
.favorite-col { width: 72px; text-align: center; }

.repertoire-table th {
  position: sticky; top: 0; z-index: 2;
  padding: 16px 20px;
  text-align: left;
  background: var(--panel-solid);
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.repertoire-table td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.repertoire-table tbody tr {
  position: relative;
  transition: background 0.18s ease;
}
.repertoire-table tbody tr::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--accent);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.22s ease;
}
.repertoire-table tbody tr:hover { background: rgba(var(--accent-rgb), 0.07); }
.repertoire-table tbody tr:hover::before { transform: scaleY(1); transform-origin: top; }
.cell-index { font-family: var(--font-display); font-size: 1.05rem; color: var(--muted); }
.cell-title { font-weight: 500; letter-spacing: 0.01em; }
.cell-artist { color: var(--ink-soft); font-weight: 300; }

.sort-button {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; padding: 0; background: transparent; cursor: pointer;
  font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit;
}
.sort-button:hover { color: var(--ink); }
.sort-ind { width: 12px; font-size: 0.8rem; color: var(--accent-bright); }

.genre-badge {
  --gc: var(--accent);
  display: inline-flex; min-width: 84px; justify-content: center;
  padding: 5px 12px;
  border: 1px solid color-mix(in oklab, var(--gc) 38%, transparent);
  border-radius: 999px;
  font-family: var(--font-label);
  font-size: 0.74rem; letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
  color: var(--gc);
  background: color-mix(in oklab, var(--gc) 14%, transparent);
}
.genre-badge[data-genre="J-POP"]   { --gc: oklch(0.74 0.13 252); }
.genre-badge[data-genre="ボカロ"]   { --gc: oklch(0.76 0.13 205); }
.genre-badge[data-genre="洋楽"]     { --gc: oklch(0.72 0.14 295); }
.genre-badge[data-genre="アニソン"] { --gc: oklch(0.74 0.14 338); }

.favorite-button {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.16s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.favorite-button:hover, .favorite-button:focus-visible { transform: scale(1.12); color: #ff8fa3; border-color: rgba(255, 111, 141, 0.5); }
.favorite-button.is-active { color: #ff6f8d; border-color: rgba(255, 111, 141, 0.55); background: rgba(255, 111, 141, 0.12); }
.favorite-button.just-liked { animation: heartPop 0.42s cubic-bezier(0.5, 1.6, 0.5, 1); }

.empty-state { margin: 0; padding: 56px 20px; text-align: center; color: var(--muted); font-weight: 300; }

/* ----- Contact ----- */
.section--contact { padding-bottom: clamp(70px, 9vw, 120px); }
.contact-panel {
  width: min(1160px, 100%); margin: 0 auto;
  padding: clamp(48px, 6vw, 84px) clamp(28px, 5vw, 72px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(120% 130% at 88% 50%, rgba(var(--accent-rgb), 0.16), transparent 60%),
    var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.contact-panel__title { font-family: var(--font-display); font-weight: 500; font-style: italic; }
.contact-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.contact-links a {
  min-height: 50px; padding: 0 24px;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-label); font-size: 0.9rem; letter-spacing: 0.04em;
  color: var(--ink-soft);
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.contact-links a:hover { transform: translateY(-3px); color: var(--ink); background: rgba(var(--accent-rgb), 0.12); border-color: rgba(var(--accent-rgb), 0.8); }

/* ----- Footer ----- */
.site-footer {
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap;
  padding: 40px 24px 56px;
  border-top: 1px solid var(--line);
  font-family: var(--font-label);
  font-size: 0.8rem; letter-spacing: 0.06em;
  color: var(--muted);
}
.site-footer__top { transition: color 0.2s ease; }
.site-footer__top:hover { color: var(--accent); }

/* ===================== Scroll reveal ===================== */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ===================== Keyframes ===================== */
@keyframes introTop { to { transform: translateY(-100%); } }
@keyframes introBottom { to { transform: translateY(100%); } }
@keyframes introCoreOut { to { opacity: 0; transform: translateY(-12px); } }
@keyframes introRing { to { opacity: 1; transform: scale(1); } }
@keyframes introChar { to { opacity: 1; transform: translateY(0); } }
@keyframes introRule { to { transform: scaleX(1); } }
@keyframes heroFade { to { opacity: 1; } }
@keyframes heroLineUp { to { transform: translateY(0); } }
@keyframes heroLineRise { to { opacity: 1; transform: none; } }
@keyframes slowBreath { to { transform: scale(1.12) translate3d(-1.4%, -1%, 0); } }
@keyframes beamSway { to { transform: rotate(2deg) translateX(-3%); opacity: 0.45; } }
@keyframes orbFloat { from { transform: translate3d(-4%, -6%, 0) scale(1); } to { transform: translate3d(5%, 8%, 0) scale(1.08); } }
@keyframes cueSlide { 0% { transform: translateX(-100%); } 50% { transform: translateX(160%); } 100% { transform: translateX(160%); } }
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }
@keyframes heartPop { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ===================== Responsive ===================== */
@media (max-width: 980px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav a span { display: none; }
}
@media (max-width: 760px) {
  .nav { gap: 16px; font-size: 0.76rem; }
  .controls { grid-template-columns: 1fr; }
  .genre-filters { justify-content: flex-start; }
  .section__head--split { align-items: flex-start; }
}
@media (max-width: 600px) {
  .site-header {
    gap: 12px;
    padding: 14px 14px;
  }

  .brand {
    flex: 0 0 auto;
  }

  .brand__logo {
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    font-size: 0;
    letter-spacing: 0;
    background: rgba(var(--accent-rgb), 0.08);
  }

  .brand__logo::before {
    content: "";
    width: 32px;
    height: 32px;
    background: url("assets/brand-mark-soft.png") center / contain no-repeat;
    filter: drop-shadow(0 0 7px rgba(86, 148, 222, 0.22));
  }

  .brand__logo em {
    display: none;
  }

  .brand:hover .brand__logo {
    letter-spacing: 0;
  }

  .nav {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
    gap: 12px;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
  }

  .nav__diagnosis {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.08) url("assets/hamster-mascot.svg") center / 27px 27px no-repeat;
  }

  .nav__diagnosis span,
  .nav__diagnosis b {
    display: none;
  }

  .nav__diagnosis i {
    display: none;
  }

  .theme-toggle {
    width: 48px;
    height: 28px;
  }

  .video-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
  .section--repertoire {
    padding-inline: 14px;
  }

  .controls {
    gap: 12px;
    margin-bottom: 14px;
  }

  .genre-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .genre-filters::-webkit-scrollbar {
    display: none;
  }

  .genre-filters .chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .chip {
    height: 38px;
    padding-inline: 14px;
    font-size: 0.76rem;
  }

  .table-shell {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .repertoire-table,
  .repertoire-table thead,
  .repertoire-table tbody,
  .repertoire-table tr,
  .repertoire-table th,
  .repertoire-table td {
    display: block;
  }

  .repertoire-table thead {
    position: sticky;
    top: 72px;
    z-index: 4;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in oklab, var(--panel-solid) 88%, transparent);
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  }

  .repertoire-table thead tr {
    display: flex;
    gap: 8px;
    padding: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .repertoire-table thead tr::-webkit-scrollbar {
    display: none;
  }

  .repertoire-table th {
    position: static;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .repertoire-table th.col-index,
  .repertoire-table th.favorite-col {
    display: none;
  }

  .sort-button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    background: rgba(var(--accent-rgb), 0.08);
  }

  .sort-button:hover,
  .sort-button:focus-visible {
    color: var(--ink);
    border-color: rgba(var(--accent-rgb), 0.6);
  }

  .repertoire-table tbody {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
  }

  .repertoire-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 42px;
    grid-template-areas:
      "title genre favorite"
      "artist genre favorite";
    gap: 3px 10px;
    align-items: center;
    min-height: 68px;
    padding: 10px 8px 10px 10px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background:
      linear-gradient(90deg, rgba(var(--accent-rgb), 0.07), transparent 54%),
      transparent;
    box-shadow: none;
  }

  .repertoire-table tbody tr:last-child {
    border-bottom: 0;
  }

  .repertoire-table tbody tr::before {
    display: none;
  }

  .repertoire-table td {
    padding: 0;
    border: 0;
    min-width: 0;
  }

  .repertoire-table .cell-index {
    display: none;
  }

  .cell-title {
    grid-area: title;
    font-size: 0.94rem;
    line-height: 1.28;
    font-weight: 600;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .cell-artist {
    grid-area: artist;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.25;
    font-weight: 400;
    overflow-wrap: anywhere;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .repertoire-table td:nth-child(4) {
    grid-area: genre;
    align-self: center;
  }

  .genre-badge {
    min-width: 0;
    padding: 4px 8px;
    font-size: 0.64rem;
    letter-spacing: 0.03em;
  }

  .favorite-col {
    grid-area: favorite;
    width: auto;
    align-self: center;
  }

  .favorite-button {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.04);
  }

  .repertoire-count__num { font-size: 2.6rem; }
}

@media (max-width: 380px) {
  .nav {
    gap: 10px;
    font-size: 0.66rem;
  }
}

@media (pointer: coarse), (max-width: 760px) {
  body {
    background-attachment: scroll;
  }

  .sparkle-canvas,
  .cursor-light {
    display: none;
  }

  .grain {
    opacity: 0.025;
  }

  .site-header,
  .button,
  .search,
  .table-shell,
  .contact-panel {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .hero {
    perspective: none;
  }

  .hero__backdrop,
  .hero__beam,
  .hero__orb::before {
    animation: none;
  }

  .hero__content,
  .hero__orb,
  .hero__watermark {
    transform: none;
    transition: none;
    will-change: auto;
  }

  .hero__orb::before {
    filter: blur(32px);
    opacity: 0.28;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .intro__panel--top { transform: translateY(-100%); }
  .intro__panel--bottom { transform: translateY(100%); }
  [data-reveal] { opacity: 1; transform: none; }
  .hero__statement-line { opacity: 1; transform: none; }
  .hero__content { transform: none; }
  .hero__orb { transform: none; }
  .hero__watermark { transform: translate(0, -50%); }
  .hero__kicker, .hero__name, .hero__statement-line, .hero__actions, .scroll-cue, .hero__watermark { opacity: 1; }
}
