:root {
  --bg: #0f1117;
  --surface: #181c27;
  --surface-2: #222836;
  --border: #2e3548;
  --border-strong: #3b4460;
  --text: #e8ecf4;
  --text-muted: #8b95ab;
  --accent: #6c9eff;
  --accent-soft: rgba(108, 158, 255, 0.15);
  --accent-line: rgba(108, 158, 255, 0.35);
  --chord: #ffb347;
  --chord-soft: rgba(255, 179, 71, 0.14);
  --string: #c4cad8;
  --fret: #3d4558;
  --finger: #6c9eff;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.22), 0 3px 10px rgba(0, 0, 0, 0.16);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 14px 36px rgba(0, 0, 0, 0.4);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --dur: 0.18s;

  --space-page: clamp(0.75rem, 2.5vw, 2rem);
  --content-max: min(960px, 100%);
  --sidebar-w: clamp(200px, 28vw, 280px);
  --dock-nav-height: clamp(3.25rem, 10vw, 4.25rem);
  --dock-height: var(--dock-nav-height);
  --dock-icon-size: clamp(1.05rem, 3.2vw, 1.25rem);
  --dock-label-size: clamp(0.5rem, 2.4vw, 0.58rem);
  --dock-item-count: 7;
  --dock-item-slot: 5.25rem;
  --dock-width-max: min(calc(100% - 1.5rem), calc(var(--dock-item-count) * var(--dock-item-slot)));
  --pill-key-size: clamp(2.15rem, 6.5vw, 2.65rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

::selection {
  background: rgba(108, 158, 255, 0.3);
  color: #fff;
}


:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
  background-color: var(--border-strong);
}

*::-webkit-scrollbar-thumb:hover {
  background-color: #4a557a;
}

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

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

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  padding: calc(var(--space-page) + 0.25rem) var(--space-page);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 130% at 15% -30%, rgba(108, 158, 255, 0.16), transparent 70%),
    radial-gradient(ellipse 40% 110% at 90% -20%, rgba(255, 179, 71, 0.07), transparent 70%),
    var(--surface);
  flex-wrap: wrap;
}


.header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-line), rgba(255, 179, 71, 0.2) 45%, transparent 80%);
  pointer-events: none;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header__logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--accent-line);
  background: linear-gradient(145deg, rgba(108, 158, 255, 0.22), rgba(108, 158, 255, 0.06));
  color: var(--accent);
  font-size: 1.4rem;
  box-shadow: 0 4px 14px rgba(108, 158, 255, 0.18);
}

.header__crumb {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.header__title {
  margin: 0;
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header__subtitle {
  margin: 0.15rem 0 0;
  font-size: clamp(0.75rem, 2.5vw, 0.875rem);
  color: var(--text-muted);
}

.site-footer {
  position: relative;
  margin-top: auto;
  padding: 1.75rem 1.5rem calc(1.25rem + var(--dock-height, 0px) * 0.1);
  border-top: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 140% at 50% 130%, rgba(108, 158, 255, 0.1), transparent 70%),
    var(--surface);
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line) 50%, transparent);
  pointer-events: none;
}

.site-footer__inner {
  max-width: 960px;
  margin: 0 auto;
}

.site-footer__primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1rem;
}

.site-footer__brand {
  display: block;
  margin: 0 auto;
  height: 1.25rem;
  width: auto;
  max-width: 9.5rem;
  object-fit: contain;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.85rem;
}

.site-footer__nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
}

.site-footer__nav a:hover {
  text-decoration: underline;
}

.site-footer__secondary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.site-footer__aux,
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.site-footer__aux a,
.site-footer__legal a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
}

.site-footer__aux a:hover,
.site-footer__legal a:hover {
  color: var(--accent);
}

.site-footer__aux a:not(:last-child)::after,
.site-footer__legal a:not(:last-child)::after {
  content: "·";
  margin-left: 0.5rem;
  color: var(--border);
  pointer-events: none;
}

.site-footer__tagline {
  margin: 0;
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.85;
}


.ad-slot {
  display: none;
  max-width: var(--content-max);
  margin: 1rem auto;
  padding: 0 var(--space-page);
}

.ad-slot[data-ad-slot="pending"] {
  display: none;
}


body.site-nav-open {
  overflow: hidden;
}

.site-nav {
  position: relative;
  z-index: 320;

  pointer-events: none;
}

.site-nav__toggle,
.site-nav__backdrop:not([hidden]),
.site-nav__panel:not([hidden]) {
  pointer-events: auto;
}

.site-nav__toggle {
  position: fixed;
  top: clamp(0.75rem, 3vw, 1rem);
  right: clamp(0.75rem, 3vw, 1rem);
  z-index: 322;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(46, 53, 72, 0.65);
  border-radius: 10px;
  background: rgba(15, 17, 23, 0.42);
  backdrop-filter: blur(8px);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, opacity 0.15s;
}

.site-nav__toggle:hover,
.site-nav__toggle:focus-visible {
  background: rgba(15, 17, 23, 0.72);
  border-color: rgba(108, 158, 255, 0.45);
  outline: none;
}

.site-nav__bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 18px;
}

.site-nav__bars span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.15s, opacity 0.15s;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav__toggle[aria-expanded="true"] .site-nav__bars span:nth-child(2) {
  opacity: 0;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav__backdrop {
  position: fixed;
  inset: 0;
  z-index: 320;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.site-nav__panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 321;
  width: min(18rem, 88vw);
  height: 100%;
  padding: clamp(4rem, 12vw, 5rem) 1.25rem 1.5rem;
  border-left: 1px solid var(--border);
  background: var(--surface);
  overflow-y: auto;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.25);
}

.site-nav__backdrop[hidden],
.site-nav__panel[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.site-nav__title {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-nav__sections {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.site-nav__section-title {
  margin: 0 0 0.35rem;
  padding: 0 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-nav__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__list li + li {
  margin-top: 0.15rem;
}

.site-nav__list a {
  display: block;
  padding: 0.65rem 0.5rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.site-nav__list a:hover,
.site-nav__list a:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.site-nav__list a[aria-current="page"] {
  color: var(--accent);
  background: rgba(108, 158, 255, 0.12);
}

.site-nav__group {
  margin-top: 0.15rem;
}

.site-nav__group-title {
  margin: 0;
  padding: 0.55rem 0.5rem 0.2rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.site-nav__list--nested {
  margin: 0;
  padding: 0 0 0 0.65rem;
  list-style: none;
  border-left: 1px solid var(--border);
  margin-left: 0.5rem;
}

.site-nav__list--nested a {
  font-size: 0.86rem;
  font-weight: 500;
  padding: 0.5rem 0.5rem;
}


.back-to-top {
  position: fixed;
  right: clamp(0.75rem, 3vw, 1.1rem);
  bottom: calc(var(--dock-height) + clamp(0.85rem, 3vw, 1.35rem) + env(safe-area-inset-bottom, 0px));
  z-index: 280;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border: 1px solid rgba(108, 158, 255, 0.28);
  border-radius: 999px;
  background: rgba(15, 17, 23, 0.28);
  backdrop-filter: blur(6px);
  color: rgba(232, 236, 244, 0.72);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}

.back-to-top.is-visible {
  opacity: 0.72;
  pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  opacity: 1;
  background: rgba(15, 17, 23, 0.55);
  color: var(--accent);
  border-color: rgba(108, 158, 255, 0.5);
  outline: none;
  transform: translateY(-2px);
}

.back-to-top[hidden] {
  display: none;
}


.paywall-ribbon {
  position: sticky;
  top: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid rgba(255, 179, 71, 0.28);
  background:
    linear-gradient(90deg, rgba(255, 179, 71, 0.12), rgba(108, 158, 255, 0.14) 50%, rgba(255, 179, 71, 0.1)),
    rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(10px);
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text);
}

.paywall-ribbon__label {
  font-weight: 700;
  color: var(--chord);
  letter-spacing: 0.02em;
}

.paywall-ribbon a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.paywall-ribbon a:hover {
  text-decoration: underline;
}

.paywall-ribbon__close {
  margin-left: 0.25rem;
  width: 1.6rem;
  height: 1.6rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.paywall-ribbon__close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}


.plan-notice {
  position: fixed;
  left: 50%;
  top: 42%;
  z-index: 400;
  width: min(calc(100% - 2rem), 22rem);
  padding: 1.25rem 1.25rem 1.1rem;
  border: 1px solid rgba(108, 158, 255, 0.45);
  border-radius: 18px;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(108, 158, 255, 0.16), transparent 58%),
    var(--surface, #fff);
  box-shadow: 0 18px 48px rgba(26, 35, 50, 0.22);
  color: var(--text, #1a2332);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -40%) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.plan-notice.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.plan-notice__badge {
  margin: 0 0 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #2f5fbf;
}

.plan-lock-icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: -0.15em;
  color: #2f5fbf;
}

.plan-lock-text {
  display: inline;
}

body.plan-pending .is-plan-locked {
  opacity: 1;
  border-style: solid;
}

.btn.is-plan-locked,
button.is-plan-locked,
.dock-toggle__btn.is-plan-locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn.is-plan-locked {
  opacity: 0.85;
  border-style: dashed;
}

.plan-notice__title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text, #1a2332);
}

.plan-notice__body {
  margin: 0 0 1rem;
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--text-muted, #4b5563);
}

.plan-notice__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.plan-notice__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7rem;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  background: var(--studio-fill);
  color: #0f1117;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(124, 90, 240, 0.35);
}

.plan-notice__link:hover {
  filter: brightness(1.06);
}

.plan-notice__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border, #d5d8df);
  border-radius: 999px;
  background: var(--surface-2, #eeedeb);
  color: var(--text, #1a2332);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.plan-notice__close:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff;
}


body.compact-diagrams .chord-card__diagram,
body.compact-diagrams .chain-block__diagram,
body.compact-diagrams .seq-preview__item .diagram-svg,
body.compact-diagrams .capo-suggestions {
  display: none !important;
}

body.compact-diagrams .chord-card {
  padding: 0.65rem 0.75rem;
}


body.compact-diagrams .chord-grid {
  --chord-grid-gap: 0.55rem;
  grid-template-columns: repeat(
    auto-fill,
    minmax(max(5rem, (100% - var(--chord-grid-gap) * 5) / 6), 1fr)
  );
}

body.compact-diagrams .chain-block--chord {
  min-width: 0;
}

body.compact-diagrams .seq-preview__item {
  min-width: 3.5rem;
  padding: 0.35rem 0.5rem;
}

.header__controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.header__key {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.key-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.key-select {
  appearance: none;
  padding: 0.6rem 2.25rem 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b95ab' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.key-select:hover,
.key-select:focus {
  border-color: var(--accent);
  outline: none;
}

.main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}

@media (min-width: 720px) {
  .main {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }
}

.badge--wide {
  max-width: 100%;
  white-space: normal;
  line-height: 1.4;
  text-align: left;
}

.seq-group {
  margin: 1rem 0 0.4rem;
  padding: 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  list-style: none;
}

.seq-group:first-child {
  margin-top: 0;
}

.sidebar {
  border-right: none;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: clamp(0.85rem, 2.5vw, 1.25rem);
  overflow-y: auto;
  max-height: min(38vh, 280px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (min-width: 720px) {
  .sidebar {
    border-right: 1px solid var(--border);
    border-bottom: none;
    position: sticky;
    top: 0.75rem;
    align-self: start;

    max-height: var(
      --sidebar-block-height,
      calc(100dvh - var(--dock-height) - 1.5rem - env(safe-area-inset-bottom, 0px))
    );
    overflow: hidden;
  }

  .sidebar .seq-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-top: 0.15rem;
    padding-right: 0.2rem;
  }
}


@media (max-width: 719px) {
  body.mobile-detail-view .sidebar {
    display: none;
  }

  body.mobile-detail-view .detail {
    min-height: 60vh;
  }

  .detail__back-to-list {
    display: none;
    align-items: center;
    gap: 0.25rem;
    margin: 0 0 0.85rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
  }

  body.mobile-detail-view .detail__back-to-list {
    display: inline-flex;
  }
}

@media (min-width: 720px) {
  .detail__back-to-list {
    display: none !important;
  }
}

.sidebar__title {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.sidebar__name-legend {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  line-height: 1.4;
}

.sidebar__name-legend a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.sidebar__name-legend a:hover {
  color: var(--accent);
}

.sidebar__filter {
  margin-bottom: 1rem;
}

.sidebar__filter-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sidebar__filter-select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  transition: border-color var(--dur) var(--ease);
}

.sidebar__filter-select:hover,
.sidebar__filter-select:focus {
  border-color: var(--accent-line);
  outline: none;
}

.seq-list__empty {
  padding: 1rem 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  list-style: none;
}

.seq-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.seq-item {
  position: relative;
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.seq-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform var(--dur) var(--ease);
}

.seq-item:hover {
  background: var(--surface-2);
}

.seq-item.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
  font-weight: 600;
}

.seq-item.is-active::before {
  transform: scaleY(1);
}

.seq-item__sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.seq-item.is-active .seq-item__sub {
  color: var(--accent);
  opacity: 0.75;
}

.seq-item__section {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  color: #f0a050;
  font-weight: 400;
  line-height: 1.35;
}

.seq-item.is-active .seq-item__section {
  color: #ffc080;
}

.detail {
  padding: var(--space-page);
  overflow-y: auto;
  min-width: 0;
}

.detail__empty {
  display: grid;
  place-items: center;
  min-height: 320px;
  margin: clamp(0.5rem, 2vw, 1rem) 0;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.015);
  color: var(--text-muted);
  font-size: 1rem;
  text-align: center;
}

.detail__header {
  margin-bottom: 2rem;
}

.detail__header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.detail__play-all {
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.detail__play-all:hover:not(:disabled) {
  background: rgba(108, 158, 255, 0.25);
  border-color: rgba(108, 158, 255, 0.55);
  transform: translateY(-1px);
}

.detail__play-all:disabled {
  opacity: 0.6;
  cursor: wait;
}

.detail__builder-action {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 1rem;
}

.detail__builder-action p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.detail__desc {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.detail__name {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}


.seq-title--degree {
  color: var(--text-muted);
  font-weight: 600;
}

.seq-title--crafted {
  color: var(--crafted-label, #9a6230);
}

.seq-title--theory {
  color: var(--theory-label, #2f6f6a);
}

.detail__sub {
  margin: 0.35rem 0 0;
  font-size: 1rem;
  color: var(--text-muted);
}

.detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.detail__song-meta {
  position: relative;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(240, 160, 80, 0.25);
  border-left: 3px solid rgba(240, 160, 80, 0.55);
  background: rgba(240, 160, 80, 0.06);
}

.detail__sections,
.detail__impression {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

.detail__impression {
  margin-top: 0.35rem;
}

.detail__impression--crafted .detail__impression-text {
  color: var(--crafted-label, #9a6230);
}

.detail__impression--theory .detail__impression-text {
  color: var(--theory-label, #2f6f6a);
}

.detail__aliases {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

.detail__meta-label {
  display: inline-block;
  min-width: 7.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #f0a050;
}

.badge {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-muted);
  line-height: 1.4;
}


.chord-grid {
  --chord-grid-gap: 0.75rem;
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(max(6.5rem, (100% - var(--chord-grid-gap) * 5) / 6), 1fr)
  );
  gap: var(--chord-grid-gap);
}

.chord-grid--before-theory {
  margin-bottom: 1.25rem;
}

.chord-card {
  padding: 0.9rem 0.6rem 0.8rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%), var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.chord-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.chord-card__index {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.chord-card__name {
  margin: 0 0 0.2rem;
  font-size: clamp(1.15rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 700;
  color: var(--chord);
  font-family: "JetBrains Mono", monospace;
}

.chord-card__label {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
}

.chord-card__diagram {
  display: flex;
  justify-content: center;
}


.diagram-fret-num {
  fill: var(--text);
}

.chord-card__note {
  margin-top: 0.55rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.chord-card__play {
  margin-top: 0.6rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.chord-card__play:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-line);
}

.capo-suggestions {
  margin-top: 0.65rem;
  text-align: left;
}

.capo-suggestions__title {
  margin: 0 0 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.capo-suggest {
  display: block;
  width: 100%;
  margin-bottom: 0.3rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.68rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.capo-suggest:hover,
.capo-suggest.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(108, 158, 255, 0.35);
}

@media (max-width: 599px) {
  .header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .header__brand {
    flex-direction: column;
    gap: 0.35rem;
  }

  .header__logo {
    width: clamp(40px, 12vw, 48px);
    height: clamp(40px, 12vw, 48px);
    font-size: clamp(1.1rem, 4vw, 1.4rem);
  }
}
