:root {
  --bg: #0a0a0c;
  --bg-alt: #101013;
  --panel: #15151a;
  --panel-2: #1c1c22;
  --border: #26262d;
  --text: #f2f2f4;
  --muted: #8b8b96;
  --accent: #ff1f1f;
  --accent-2: #ff4d4d;
  --danger: #ff1f1f;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  --glow: 0 0 18px rgba(255, 31, 31, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

body {
  padding-bottom: 160px;
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(255, 31, 31, 0.10), transparent 60%),
    var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 520px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo-mark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
}
.logo-mark i {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: bottom;
  animation: eqBounce 1.3s ease-in-out infinite;
}
.logo-mark i:nth-child(1) { height: 8px;  animation-delay: 0s; }
.logo-mark i:nth-child(2) { height: 14px; animation-delay: 0.18s; }
.logo-mark i:nth-child(3) { height: 21px; animation-delay: 0.36s; }
.logo-mark i:nth-child(4) { height: 12px; animation-delay: 0.54s; }
.logo-text { font-weight: 800; font-size: 21px; letter-spacing: -0.5px; color: var(--text); }

@keyframes eqBounce {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

.nav { display: flex; gap: 28px; }
.nav a {
  color: #c6c6cf;
  font-weight: 500;
  font-size: 15px;
  padding: 6px 0;
  transition: color .15s ease;
}
.nav a:hover { color: #fff; }
.nav a.active { color: var(--accent); }

/* Hero */
.hero {
  position: relative;
  padding: 76px 0 60px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -160px;
  width: 720px;
  height: 360px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 31, 31, 0.28), transparent);
  animation: glowPulse 4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.12); }
}
.hero-emblem {
  position: relative;
  display: inline-flex;
  width: 132px;
  height: 132px;
  margin: 0 0 30px;
  animation: emblemIn 1.15s cubic-bezier(.18, .7, .3, 1.15) both;
}
.hero-emblem::before {
  content: "";
  position: absolute;
  inset: -16px;
  background: radial-gradient(closest-side, rgba(255, 31, 31, 0.45), transparent 72%);
  animation: glowPulse 4s ease-in-out infinite;
  pointer-events: none;
}
.emblem-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 14px rgba(255, 31, 31, 0.35));
}

@keyframes emblemIn {
  0%   { transform: scale(.35) rotate(-14deg); opacity: 0; filter: blur(6px); }
  55%  { transform: scale(1.07) rotate(2deg);  opacity: 1; filter: blur(0); }
  75%  { transform: scale(.97); }
  100% { transform: scale(1); }
}

.emblem-flash {
  transform-box: fill-box;
  transform-origin: center;
  animation: emblemFlash 1.2s ease-out .1s both;
}
@keyframes emblemFlash {
  0%   { transform: scale(.55); opacity: .9; }
  100% { transform: scale(2); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-emblem,
  .emblem-flash,
  .hero-emblem::before { animation: none; }
}

.hero h1 {
  position: relative;
  font-size: 58px;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 14px;
  color: #fff;
}
.hero h1 .hl { color: var(--accent); text-shadow: 0 0 22px rgba(255, 31, 31, 0.7); }
.hero-sub { position: relative; color: #9a9aa4; font-size: 19px; margin: 0 0 28px; }
.hero-actions { position: relative; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { background: var(--accent-2); box-shadow: 0 0 26px rgba(255, 31, 31, 0.55); }
.btn-outline { border-color: #3a3a42; color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; margin-bottom: 20px; }

/* Sections */
.section { padding: 52px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: 24px; font-weight: 700; margin: 0 0 20px; color: #fff; }
.page-title { font-size: 32px; font-weight: 800; margin: 0 0 6px; color: #fff; }
.page-sub { color: var(--muted); margin: 0 0 28px; }
code {
  background: var(--panel-2);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #ff9b9b;
  border: 1px solid var(--border);
}

/* About */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.about-text p { margin: 0 0 14px; color: #b9b9c2; }
.about-facts {
  list-style: none;
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0;
}
.about-facts li { padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--muted); }
.about-facts li:last-child { border-bottom: none; }
.about-facts strong { color: var(--text); }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color .15s ease, transform .15s ease;
}
.service:hover { border-color: var(--accent); transform: translateY(-2px); }
.service h3 { margin: 0 0 8px; color: var(--text); font-size: 17px; }
.service p { margin: 0; color: var(--muted); font-size: 14px; }

.cta-section { text-align: center; }
.cta-section p { color: var(--muted); margin: 0 0 22px; }

/* Genre tabs */
.portfolio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 20px;
}
.genre-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.genre-tab {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease;
}
.genre-tab:hover { border-color: #3a3a42; color: var(--text); }
.genre-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: var(--glow);
}
.track-genre { color: var(--accent); font-weight: 600; }
.track.hidden { display: none; }

/* Tracklist */
.tracklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.track {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.track:hover {
  border-color: #3a3a42;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.track.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 31, 31, 0.4), 0 6px 18px rgba(0, 0, 0, 0.5);
}

.track-art {
  position: relative;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 5px;
  overflow: hidden;
  background: linear-gradient(135deg, #1c1c22, #101013);
}
.track-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.track-play {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s ease, background .15s ease;
}
.track:hover .track-play, .track.active .track-play { opacity: 1; }
.track-play .disc {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(17, 17, 19, 0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background .15s ease, box-shadow .15s ease;
}
.track-play:hover .disc { background: var(--accent); }
.track.active .track-play .disc {
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 31, 31, 0.55); }
  50% { box-shadow: 0 0 0 7px rgba(255, 31, 31, 0); }
}

.track-info { flex: 1 1 30%; min-width: 0; }
.track-title { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-artist { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.track-wave { flex: 1 1 auto; height: 44px; min-width: 120px; }
.track-wave canvas { width: 100%; height: 100%; display: block; cursor: pointer; }

.track-duration { color: var(--muted); flex: 0 0 auto; font-variant-numeric: tabular-nums; font-size: 14px; }

.track-loudness {
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
  min-width: 18px;
  min-height: 18px;
  border-radius: 50%;
  transition: color .2s ease, background .2s ease;
}
.track-loudness[data-status="ready"] {
  color: var(--accent);
  background: rgba(255, 31, 31, 0.08);
}
.track-loudness[data-status="ready"]::before { content: "\1F50A"; }  /* 🔊 */
.track-loudness[data-status="pending"] {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  animation: loudness-pulse 1.2s ease-in-out infinite;
}
.track-loudness[data-status="pending"]::before { content: "\2026"; }  /* … */
.track-loudness[data-status="off"] { display: none; }

@keyframes loudness-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.empty {
  padding: 40px;
  text-align: center;
  background: var(--panel);
  border: 1px dashed #3a3a42;
  border-radius: var(--radius);
  color: var(--muted);
}

/* Player */
.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(16, 16, 19, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
  padding: 12px 24px 10px;
}
.player-wrap { max-width: 1080px; margin: 0 auto; }
.player-main { display: flex; align-items: center; gap: 20px; }
.player-left { flex: 0 0 200px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-art {
  width: 46px;
  height: 46px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--accent), #7a0f0f);
  flex: 0 0 auto;
  overflow: hidden;
}
.player-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player-title { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-artist { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.player-center { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; }
.player-controls { display: flex; align-items: center; justify-content: center; gap: 18px; }
.pc-btn {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color .15s ease;
}
.pc-btn-main {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: var(--glow);
  transition: background .15s ease, box-shadow .15s ease;
}
.pc-btn:hover { color: var(--accent); }
.pc-btn-main:hover { background: var(--accent-2); box-shadow: 0 0 24px rgba(255, 31, 31, 0.6); color: #fff; }

.player-seek {
  display: flex;
  align-items: center;
  width: 100%;
}

.player-spec { height: 56px; margin-top: 8px; }
.player-spec canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 4px;
  background: #0d0d10;
  border: 1px solid var(--border);
}

.player-right {
  flex: 0 0 220px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.player-time { display: flex; align-items: center; gap: 6px; }
.pt { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.loudness-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  color: var(--muted);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.loudness-toggle:hover { color: var(--text); border-color: #4a4a55; }
.loudness-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.loudness-switch {
  position: relative;
  display: inline-block;
  width: 26px;
  height: 14px;
  background: #33333b;
  border-radius: 999px;
  transition: background .15s ease;
}
.loudness-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  background: #e8e8ee;
  border-radius: 50%;
  transition: transform .15s ease, background .15s ease;
}
.loudness-toggle input:checked ~ .loudness-switch { background: var(--accent); }
.loudness-toggle input:checked ~ .loudness-switch::after {
  transform: translateX(12px);
  background: #fff;
}
.loudness-toggle input:checked ~ .loudness-label { color: var(--text); }
.loudness-label { white-space: nowrap; }
.loudness-progress {
  display: none;
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
}
.loudness-toggle.busy {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 31, 31, 0.15);
  animation: loudness-pulse 1.2s ease-in-out infinite;
}
.loudness-toggle.busy .loudness-progress { display: inline; }

input[type="range"].volume,
input[type="range"].seek {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 3px;
  background: #33333b;
  outline: none;
  cursor: pointer;
}
input[type="range"].volume::-webkit-slider-thumb,
input[type="range"].seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255, 31, 31, 0.6);
}
input[type="range"].volume::-moz-range-thumb,
input[type="range"].seek::-moz-range-thumb {
  width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; background: var(--accent); cursor: pointer;
}
input[type="range"].volume { width: 84px; }
input[type="range"].seek { flex: 1; width: 100%; }

/* Forms */
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form label { display: flex; flex-direction: column; gap: 5px; }
.contact-form label span { font-size: 14px; color: var(--muted); font-weight: 500; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  background: var(--panel);
  border: 1px solid #33333b;
  border-radius: 6px;
  color: var(--text);
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  resize: vertical;
  transition: border-color .15s ease;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-info { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.contact-info h3 { margin: 0 0 10px; }
.contact-info ul { list-style: none; padding: 0; margin: 14px 0; }
.contact-info li { padding: 5px 0; color: var(--muted); }
.contact-info strong { color: var(--text); }
.muted { color: var(--muted); font-size: 14px; }

/* Flashes */
.flashes { margin-top: 16px; }
.flash { padding: 12px 16px; border-radius: 6px; margin-bottom: 8px; font-weight: 500; border: 1px solid transparent; }
.flash-success { background: #0f241a; color: #7ee2a8; border-color: #1f4d33; }
.flash-error { background: #2a1212; color: #ff9a9a; border-color: #5b2525; }

/* Admin */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.messages { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 12px; }
.message { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.message-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.message-date { color: var(--muted); font-size: 12px; margin-left: auto; }
.message-subject { color: var(--accent); font-size: 13px; margin-top: 4px; font-weight: 600; }
.message-body { margin: 8px 0 0; color: #c9c9d2; }

/* Admin panel: upload */
.upload-card {
  margin-top: 20px;
  background: var(--panel);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .15s, background .15s;
}
.upload-card.is-drag {
  border-color: var(--accent);
  background: rgba(255, 31, 31, 0.06);
}
.upload-prompt {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.upload-icon {
  font-size: 28px;
  color: var(--accent);
  background: var(--panel-2);
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}
.upload-text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.upload-text strong { font-size: 16px; }
.upload-text span { color: var(--muted); font-size: 14px; }
.upload-text small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.upload-btn { position: relative; cursor: pointer; }
.upload-btn input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}

.upload-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
}
.upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
}
.upload-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item-size { color: var(--muted); font-size: 12px; }
.upload-item-remove {
  background: transparent; border: 0; color: var(--muted);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.upload-item-remove:hover { color: var(--accent); }

.upload-progress {
  position: relative;
  margin-top: 16px;
  height: 8px;
  background: var(--panel-2);
  border-radius: 4px;
  overflow: hidden;
}
.upload-progress-bar {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .1s linear;
}
.upload-progress-text {
  position: absolute; right: 0; top: 14px;
  font-size: 12px; color: var(--muted);
}

.upload-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Admin panel: tracks table */
.tracks-table-wrap {
  margin-top: 28px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.tracks-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tracks-table th, .tracks-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tracks-table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: var(--panel-2); }
.tracks-table tr:last-child td { border-bottom: 0; }
.tracks-table tr:hover { background: rgba(255,255,255,0.02); }
.track-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.track-title { font-weight: 600; }
.track-meta { color: var(--muted); font-size: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.track-filename { font-family: ui-monospace, monospace; opacity: .8; }
.track-actions { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; }
.btn-sm { padding: 6px 10px; font-size: 12px; }

.meta-edit summary { list-style: none; cursor: pointer; user-select: none; }
.meta-edit summary::-webkit-details-marker { display: none; }
.meta-form {
  position: absolute;
  z-index: 5;
  margin-top: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, 90vw);
  box-shadow: var(--shadow);
}
.meta-form[open] summary ~ * { animation: fadeIn .12s ease-out; }
.meta-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.meta-form input, .meta-form textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  font: inherit;
  resize: vertical;
}
.meta-form input:focus, .meta-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.track-actions { position: relative; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .tracks-table thead { display: none; }
  .tracks-table, .tracks-table tbody, .tracks-table tr, .tracks-table td { display: block; width: 100%; }
  .tracks-table tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  .tracks-table td { border: 0; padding: 6px 14px; }
  .tracks-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; margin-bottom: 2px; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  color: var(--muted);
  font-size: 13px;
  background: var(--bg-alt);
}

@media (max-width: 768px) {
  .hero h1 { font-size: 40px; }
  .about, .contact-grid { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .track-wave { display: none; }
  .player-left { flex-basis: 120px; }
  .player-right { flex-basis: auto; }
  .loudness-label { display: none; }
  .loudness-toggle { padding: 4px; }
  body { padding-bottom: 150px; }
}

/* Audio Hub */
.hub-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 24px; }
.hub-filters a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); font-size: 13px; }
.hub-filters a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.hub-filters a.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.hub-filters .sep { color: var(--muted); align-self: center; }
.hub-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hub-row { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.hub-row-title { font-size: 17px; font-weight: 600; }
.hub-row-title .star { color: var(--accent); margin-right: 6px; }
.hub-row-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.hub-row-files { color: var(--muted); font-size: 12px; margin-top: 4px; }
.hub-jobs { width: 100%; border-collapse: collapse; margin-top: 12px; }
.hub-jobs th, .hub-jobs td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; }
.hub-jobs th { color: var(--muted); font-weight: 500; }
.hub-jobs .ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.status-new, .status-syncing, .status-ready, .status-processing { background: rgba(255,200,0,0.15); color: #ffc800; }
.status-imported { background: rgba(0,200,120,0.15); color: #00c878; }
.status-error { background: rgba(255,31,31,0.15); color: var(--accent); }

/* Audio Hub — revision timeline */
.nowrap { white-space: nowrap; }
.rev-timeline { margin-bottom: 24px; }
.rev-timeline-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; font-size: 14px; }
.rev-badge { background: rgba(255,255,255,0.08); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; font-size: 12px; color: var(--muted); }
.rev-table { margin-top: 4px; }
.rev-table tr.rev-current td { background: rgba(0,200,120,0.06); }
.rev-table tr.rev-pruned td { opacity: 0.55; }
.rev-player { height: 30px; max-width: 220px; vertical-align: middle; }
.rev-table td .btn, .rev-table td form { margin-right: 4px; }
.rev-table td .btn { font-size: 12px; padding: 4px 8px; }
.status-pill { padding: 2px 8px; border-radius: 999px; font-size: 12px; white-space: nowrap; }

/* Audio Hub — forms and work detail */
.hub-new-work { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px; }
.hub-new-work summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.hub-section { margin-top: 32px; }
.hub-section h2 { font-size: 20px; margin-bottom: 12px; }
.hub-section h3 { font-size: 15px; margin: 16px 0 8px; color: var(--muted); }
.hub-form { display: flex; flex-direction: column; gap: 12px; }
.hub-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); flex: 1; }
.hub-form input[type=text],
.hub-form input[type=number],
.hub-form select,
.hub-form textarea { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font: inherit; }
.hub-form input[type=file] { color: var(--text); }
.hub-form textarea { font-family: inherit; resize: vertical; }
.hub-form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.hub-form-row > label { min-width: 140px; }
.hub-check { flex-direction: row !important; align-items: center !important; gap: 6px !important; color: var(--text) !important; }
.hub-form-actions { display: flex; gap: 10px; }
.hub-work-head { display: flex; gap: 20px; align-items: flex-start; margin: 12px 0 8px; }
.hub-work-cover { width: 200px; }
.hub-work-cover img { width: 200px; height: 200px; object-fit: cover; border-radius: var(--radius); background: var(--panel-2); display: block; }
.hub-cover-empty { width: 200px; height: 200px; background: var(--panel-2); border: 1px dashed var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.hub-cover-form { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.btn { display: inline-block; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; font: inherit; }
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { color: #fff; opacity: 0.9; }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-outline { background: transparent; }

/* Search bar */
.hub-search { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; }
.hub-search .hub-form-row { align-items: flex-end; }

/* Share / client page */
.share-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 32px; text-align: center; margin: 24px auto; }
.share-cover { width: 100%; max-width: 360px; aspect-ratio: 1; object-fit: cover; border-radius: 8px; margin: 0 auto 16px; display: block; }
.share-card audio { width: 100%; margin: 16px 0; }

/* Client-facing revision list */
.share-current { display: flex; flex-direction: column; gap: 2px; font-size: 14px; margin-bottom: 4px; }
.share-revisions { margin-top: 28px; text-align: left; border-top: 1px solid var(--border); padding-top: 20px; }
.share-revisions h2 { font-size: 16px; margin-bottom: 4px; }
.share-rev-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.share-rev-list li {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(255,255,255,0.02);
}
.share-rev-list li.is-current { border-color: var(--accent); }
.share-rev-info { display: flex; flex-direction: column; gap: 1px; flex: 1 1 220px; font-size: 13px; min-width: 0; }
.share-rev-info .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-rev-list audio { flex: 1 1 260px; max-width: 340px; height: 32px; }
.share-rev-tag { align-self: flex-start; background: rgba(0,200,120,0.15); color: #00c878; border-radius: 999px; padding: 0 8px; font-size: 11px; }
.share-formats { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 4px 0 8px; }
.share-specs { font-size: 13px; }

/* Client-facing expiry notice — the deadline is announced, not discovered */
.share-notice {
  margin: 24px 0 0; padding: 12px 14px; text-align: left;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  border-radius: 10px; font-size: 13px; line-height: 1.5; color: var(--muted);
}
.share-notice-urgent { border-color: rgba(255,200,0,0.4); background: rgba(255,200,0,0.07); color: var(--text); }

/* Admin: bundle items attached to a share link */
.share-bundle-admin { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.share-bundle-admin li { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.share-bundle-admin summary { cursor: pointer; color: var(--accent); font-size: 12px; }
.hub-form-compact { margin-top: 8px; }
.hub-form-compact .hub-form-row { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.hub-inline-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.hub-check { flex-direction: row !important; align-items: center; gap: 6px; }

/* Public portfolio — work cards */
.public-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.work-card { display: block; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: transform 0.15s ease, border-color 0.15s ease; }
.work-card:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }
.work-card-cover { position: relative; aspect-ratio: 1; background: var(--panel-2); overflow: hidden; }
.work-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-card-cover-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 96px; font-weight: 800; color: var(--accent); opacity: 0.4; }
.work-card-play { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; padding-left: 4px; backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.15s ease; }
.work-card:hover .work-card-play { opacity: 1; }
.work-card-body { padding: 12px 14px 14px; }
.work-card-title { font-weight: 600; font-size: 15px; line-height: 1.2; }
.work-card-title .star { color: var(--accent); margin-right: 4px; }
.work-card-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.work-card-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); font-size: 11px; }
.public-pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 32px 0; }

/* Public work page */
.work-page { display: grid; grid-template-columns: 320px 1fr; gap: 32px; margin: 20px 0 32px; align-items: start; }
.work-page-cover img, .work-page-cover .work-card-cover-empty { width: 320px; height: 320px; object-fit: cover; border-radius: var(--radius); position: relative; }
.work-page-cover .work-card-cover-empty { background: var(--panel-2); border: 1px solid var(--border); }
.work-page-h2 { font-size: 18px; margin: 16px 0 10px; }
.work-page-desc { white-space: pre-wrap; margin: 12px 0; }
.work-page audio { width: 100%; margin-top: 12px; }
.version-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.version-list li { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
@media (max-width: 720px) {
  .work-page { grid-template-columns: 1fr; }
  .work-page-cover img, .work-page-cover .work-card-cover-empty { width: 100%; height: auto; aspect-ratio: 1; }
}

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.dash-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.dash-card-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.dash-card-value { font-size: 24px; font-weight: 700; margin: 4px 0; }
.dash-bar { height: 6px; background: var(--panel-2); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.dash-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #ff6b6b); }
.dash-bar-fill.fill-warning { background: linear-gradient(90deg, #ffc800, #ff9f1c); }
.dash-bar-fill.fill-critical { background: linear-gradient(90deg, #ff6b6b, #ff1f1f); }
.dash-bar-fill.fill-unreachable { background: #55555f; }
.dash-card-critical { border-color: rgba(255,31,31,0.5); }
.dash-card-warning { border-color: rgba(255,200,0,0.45); }

/* Dashboard: what needs a human, said once, at the top */
.alert {
  border-radius: var(--radius); padding: 14px 16px; margin: 16px 0;
  font-size: 14px; line-height: 1.55; border: 1px solid var(--border);
  background: var(--panel);
}
.alert strong { display: inline; }
.alert-warn { border-color: rgba(255,200,0,0.45); background: rgba(255,200,0,0.07); }
.alert-error { border-color: rgba(255,31,31,0.5); background: rgba(255,31,31,0.08); }
.alert-list { margin: 8px 0 4px; padding-left: 20px; font-size: 13px; }
.alert-list a { color: var(--accent); }
.hub-activity { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.hub-activity li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 6px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.hub-act-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.hub-act-actor { color: var(--accent); font-weight: 600; }
.hub-act-action code { background: var(--panel-2); padding: 1px 6px; border-radius: 3px; font-size: 12px; }

/* ---------- Share links: client identity, stats, bulk ---------- */

.hub-stat-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.hub-stat {
  flex: 1; min-width: 150px; padding: 12px 14px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.hub-stat-label { display: block; font-size: 12px; color: var(--muted); }
.hub-stat strong { font-size: 22px; }

.hub-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
.hub-search input[type=search] {
  flex: 1; min-width: 220px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 12px; font: inherit;
}

.hub-row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.btn-ghost {
  background: transparent; border: 1px solid transparent;
  color: var(--muted); padding: 4px 8px; font-size: 12px;
}
.btn-ghost:hover { color: var(--accent); border-color: var(--border); }

.hub-jobs tr.is-dim td { opacity: 0.55; }
.hub-jobs tr.is-held td { background: rgba(255,200,0,0.06); }

.hub-bulk-bar {
  display: flex; gap: 14px; align-items: center;
  margin: 16px 0 8px;
}
.hub-bulk-table input[type=checkbox] { width: 16px; height: 16px; }

.hub-duplicates { margin: 16px 0; }
.hub-dupe {
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; justify-content: space-between;
  padding: 6px 0;
}
.hub-dupe strong { display: block; }

.hub-created {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; margin: 12px 0; background: var(--panel);
}
.hub-created-head {
  display: flex; justify-content: space-between;
  align-items: center; gap: 10px; margin-bottom: 6px;
}
.hub-created-url {
  display: block; word-break: break-all;
  font-size: 12px; color: var(--muted); margin-bottom: 10px;
}
.hub-created .hub-row-actions { margin-top: 4px; }

/* Toast shown after a copy, so the button is not silent feedback. */
.js-flash {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  padding: 8px 18px; border-radius: 999px; font-size: 13px; z-index: 9999;
  background: var(--panel); border: 1px solid var(--border);
  transition: opacity 0.4s ease;
}
.js-flash.is-ok { border-color: rgba(0,200,120,0.6); color: #00c878; }
.js-flash.is-bad { border-color: rgba(255,31,31,0.6); color: var(--accent); }
.js-flash.is-out { opacity: 0; }

/* ---------- Client page: sizes, archive, report ---------- */

.share-archive {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; margin: 12px 0; padding: 14px;
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.share-archive .muted { font-size: 12px; text-align: center; }

.share-report { margin-top: 20px; font-size: 13px; }
.share-report summary { cursor: pointer; color: var(--muted); }
.share-report summary:hover { color: var(--accent); }
.share-report form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.share-report textarea {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 10px; font: inherit; resize: vertical;
}

/* Client page: history is a fallback, folded away by default.
   The brief is that clients take the newest render without reading, so the
   previous versions must not compete with the download button above them. */
.share-history { margin-top: 18px; }
.share-history > summary {
  cursor: pointer; color: var(--muted); font-size: 13px;
  padding: 8px 0; list-style: none;
}
.share-history > summary::-webkit-details-marker { display: none; }
.share-history > summary::before { content: "? "; }
.share-history[open] > summary::before { content: "? "; }
.share-history > summary:hover { color: var(--accent); }
.share-history p { margin: 4px 0 8px; }
.share-history .share-rev-list { opacity: 0.75; }

/* ==========================================================================
   Public site: refinement pass

   Everything below is scoped to .is-public, which only the marketing pages
   put on <body>. The hub admin keeps its denser, tool-like look: the two
   audiences read very different pages and a shared "prettier" treatment
   would make the admin tables worse to work in.

   The few global rules (focus rings, selection, scrollbars, font smoothing)
   are additive and help every page.
   ========================================================================== */

:root {
  /* Focus and surface tokens, used only by the refinements below. */
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px rgba(255, 31, 31, 0.62);
  --ring-soft: 0 0 0 3px rgba(255, 31, 31, 0.16);
  --hairline: rgba(255, 255, 255, 0.07);
  --surface: linear-gradient(180deg, #17171d 0%, #131318 100%);
  --surface-2: linear-gradient(180deg, #1b1b22 0%, #16161c 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 32px -14px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 28px 64px -28px rgba(0, 0, 0, 0.9);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* ---------- Global polish ---------- */

/* The fixed player needs room under the last element, but the reservation
   was unconditional: every short page — a work, the contact form, the
   portfolio — ended with a 160px gap under the footer for a player that was
   not there. Reserve it only when a player actually exists. */
.is-public { padding-bottom: 48px; }
.is-public:has(.player:not([hidden])) { padding-bottom: 172px; }

@media (max-width: 768px) {
  .is-public:has(.player:not([hidden])) { padding-bottom: 160px; }
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(255, 31, 31, 0.3);
  color: #fff;
}

/* A visible keyboard focus is the single cheapest accessibility win; the
   admin already relied on browser defaults in places. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: #2b2b34;
  border-radius: 999px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #3b3b46; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Header ---------- */

.is-public .site-header {
  background: rgba(10, 10, 12, 0.66);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
}

.is-public .header-inner { height: 66px; }

.is-public .logo-text { letter-spacing: -0.6px; }

.is-public .nav { gap: 26px; }

/* The hub links are a different tool, not a different section of the same
   site — a hairline between them makes that legible without a relabel. */
.nav-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  align-self: center;
  margin: 0 2px;
}

.is-public .nav a {
  position: relative;
  padding: 6px 1px;
  font-size: 14.5px;
  letter-spacing: 0.005em;
  color: #a6a6b1;
  transition: color 0.18s ease;
}
.is-public .nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(255, 31, 31, 0.5);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s var(--ease);
}
.is-public .nav a:hover { color: #fff; }
.is-public .nav a:hover::after,
.is-public .nav a.active::after { transform: scaleX(1); }
.is-public .nav a.active { color: #fff; }

/* ---------- Type rhythm ---------- */

.is-public .hero h1 {
  font-size: clamp(44px, 9vw, 68px);
  letter-spacing: -0.03em;
}

.is-public .hero-sub {
  max-width: 34em;
  margin: 0 auto 30px;
  line-height: 1.6;
  text-wrap: balance;
}

.is-public .hero-actions .btn { min-width: 168px; text-align: center; }

/* A short accent rule above each heading gives the page a spine without
   adding wrapper markup to every section. */
.is-public .section-title,
.is-public .page-title { letter-spacing: -0.02em; text-wrap: balance; }

.is-public .section-title { font-size: clamp(21px, 3.2vw, 28px); margin: 0 0 16px; }
.is-public .page-title { font-size: clamp(28px, 4.6vw, 40px); margin: 0 0 10px; }

.is-public .section-title::before,
.is-public .page-title::before {
  content: "";
  display: block;
  width: 30px;
  height: 3px;
  border-radius: 3px;
  margin-bottom: 16px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px rgba(255, 31, 31, 0.45);
}

.is-public .page-sub {
  max-width: 62ch;
  line-height: 1.65;
  text-wrap: pretty;
}

.is-public p { text-wrap: pretty; }

/* ---------- Buttons ---------- */

.is-public .btn {
  border-radius: 10px;
  letter-spacing: -0.005em;
  box-shadow: var(--shadow-sm);
}
.is-public .btn:active { transform: translateY(0); }

.is-public .btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-color: transparent;
}

.is-public .btn-outline {
  border-color: #34343d;
  background: rgba(255, 255, 255, 0.02);
}
.is-public .btn-outline:hover {
  border-color: rgba(255, 31, 31, 0.55);
  background: rgba(255, 31, 31, 0.08);
}

.is-public .btn:focus-visible { outline: none; box-shadow: var(--ring); }

/* ---------- Cards ---------- */

.is-public .services { gap: 18px; counter-reset: service; }

.is-public .service {
  position: relative;
  background: var(--surface);
  border-radius: 14px;
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, transform 0.18s var(--ease), box-shadow 0.18s ease;
}
.is-public .service:hover {
  border-color: rgba(255, 31, 31, 0.38);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.is-public .service h3 {
  font-size: 18px;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
/* Numbers from CSS rather than the template: the order is the whole point of
   the row, and hand-writing 01/02/03 in markup is the kind of thing that
   drifts when a service is added. */
.is-public .service h3::before {
  counter-increment: service;
  content: "0" counter(service);
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  opacity: 0.85;
  margin-bottom: 12px;
}
.is-public .service p { font-size: 14.5px; line-height: 1.62; }

.is-public .about { gap: 36px; }
.is-public .about-text p { font-size: 16px; line-height: 1.7; color: #bcbcc5; }
.is-public .about-facts {
  background: var(--surface);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.is-public .about-facts li { padding: 10px 0; }
.is-public .about-facts li:last-child { border-bottom: none; }

/* ---------- Genre filter ---------- */

.is-public .genre-tabs {
  gap: 3px;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.is-public .genre-tab {
  border: none;
  background: transparent;
  padding: 6px 15px;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.is-public .genre-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}
.is-public .genre-tab.active {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #fff;
}

/* ---------- Tracklist ---------- */

.is-public .tracklist { gap: 8px; }

.is-public .track {
  position: relative;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.is-public .track::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  bottom: 16%;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease, top 0.2s ease, bottom 0.2s ease;
}
.is-public .track.active::before { opacity: 1; top: 12px; bottom: 12px; }
.is-public .track:hover { border-color: rgba(255, 255, 255, 0.11); }

.is-public .track-art {
  flex-basis: 60px;
  width: 60px;
  height: 60px;
  border-radius: 10px;
}
.is-public .track-title { font-size: 16px; letter-spacing: -0.01em; }
.is-public .track-duration { font-size: 13px; }
.is-public .track-wave { height: 48px; }

.is-public .empty {
  border-radius: 14px;
  background: var(--surface);
  line-height: 1.65;
}

/* Without hover there is no way to reach the play button on a phone, which
   made the whole portfolio unusable on touch. */
@media (hover: none) {
  .is-public .track-play { opacity: 1; }
  .is-public .track-play .disc { width: 32px; height: 32px; }
}

/* ---------- Player ---------- */

.is-public .player {
  background: rgba(13, 13, 17, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  border-top-color: var(--hairline);
  padding: 14px 24px 12px;
}
.is-public .player-art { border-radius: 8px; box-shadow: var(--shadow-sm); }
.is-public .player-main { gap: 24px; }

/* ---------- Portfolio page ---------- */

.is-public .public-grid { gap: 22px; }
.is-public .work-card {
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), border-color 0.18s ease, box-shadow 0.18s ease;
}
.is-public .work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.is-public .work-card-body { padding: 14px 16px 16px; }
.is-public .work-card-title { font-size: 16px; letter-spacing: -0.01em; }
.is-public .chip {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  color: #a2a2ad;
}

/* ---------- Work page ---------- */

.is-public .work-page { gap: 40px; margin: 24px 0 40px; }
.is-public .work-page-cover img,
.is-public .work-page-cover .work-card-cover-empty {
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}
.is-public .work-page h1 { letter-spacing: -0.025em; }
.is-public .work-page-h2 { letter-spacing: -0.01em; }
.is-public .version-list li {
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 16px;
}
.is-public .version-list { gap: 8px; }

/* ---------- Contact ---------- */

.is-public .contact-form { gap: 18px; }
.is-public .contact-form input,
.is-public .contact-form select,
.is-public .contact-form textarea {
  background: var(--bg-alt);
  border-color: var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.is-public .contact-form input:hover,
.is-public .contact-form select:hover,
.is-public .contact-form textarea:hover { border-color: #3a3a45; }
.is-public .contact-form input:focus,
.is-public .contact-form select:focus,
.is-public .contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--ring-soft);
  background: var(--bg);
}
.is-public .contact-info {
  background: var(--surface);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.is-public .contact-info li { padding: 7px 0; }

/* ---------- Call to action ---------- */

.is-public .cta-section { position: relative; }
.is-public .cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(640px 240px at 50% 118%, rgba(255, 31, 31, 0.14), transparent 70%);
  pointer-events: none;
}
.is-public .cta-section .container { position: relative; }
.is-public .cta-section p {
  max-width: 46ch;
  margin: 0 auto 24px;
  line-height: 1.65;
  text-wrap: balance;
}

/* ---------- Footer ---------- */

.is-public .site-footer {
  padding: 30px 0;
  border-top-color: var(--hairline);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  flex-wrap: wrap;
}
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-nav a { color: #94949f; font-size: 13.5px; transition: color 0.15s ease; }
.footer-nav a:hover { color: #fff; }

/* ---------- Small screens ---------- */

/* The header used to be the widest thing on the page: logo plus three links
   came to ~500px, so on a 390px phone the whole document got that width and
   every section below was clipped on the right. The nav now yields first —
   and if it ever runs out of room again it scrolls inside itself instead of
   widening the page. */
.header-inner { min-width: 0; }
.nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { white-space: nowrap; }

@media (max-width: 768px) {
  .is-public .header-inner { height: 58px; }
  .is-public .nav { gap: 18px; }
  .is-public .hero { padding: 64px 0 48px; }
  .is-public .hero-actions .btn { min-width: 0; flex: 1 1 auto; }
  .is-public .section { padding: 40px 0; }
  .is-public .track { padding: 10px 12px; gap: 12px; }
  .is-public .track-art { flex-basis: 52px; width: 52px; height: 52px; }
  .is-public .player-main { gap: 14px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 640px) {
  /* "Заказать сведение" is the longest label and the least necessary one to
     spell out on a phone; the shortened form still reads as a command. */
  .is-public .nav-tail { display: none; }
  .is-public .container { padding: 0 16px; }
  .is-public .nav { gap: 16px; }
  .is-public .nav a { font-size: 13.5px; }
  .is-public .logo-text { font-size: 18px; }
  .is-public .logo { gap: 8px; }
}