@charset "UTF-8";

:root {
  --bg0: #0c0e12;
  --bg1: #12151c;
  --card: rgba(255, 255, 255, 0.04);
  --stroke: rgba(255, 255, 255, 0.08);
  --text: #e8eaef;
  --muted: #8b93a7;
  --accent: #7c9cff;
  --accent-dim: rgba(124, 156, 255, 0.15);
  --ok: #5eead4;
  --err: #fb7185;
  --radius: 4px;
  --radius-sm: 3px;
  --shadow: 0 10px 36px rgba(0, 0, 0, 0.35);
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --content-max: min(1120px, 100%);
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(1200px 600px at 20% -10%, rgba(124, 156, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(94, 234, 212, 0.1), transparent 50%),
    linear-gradient(165deg, var(--bg0), var(--bg1));
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.app {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  min-height: 100vh;
  padding: 1rem clamp(0.75rem, 2.5vw, 1.5rem) 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: page-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.app-header-text {
  flex: 1 1 200px;
  min-width: 0;
}

.app-brand {
  margin: 0 0 0.2rem;
  font-family: var(--mono);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.app-subtitle {
  margin: 0;
  max-width: 36rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
}

.btn-add-isrc {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem 0.35rem 0.4rem;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(124, 156, 255, 0.1);
  border: 1px solid rgba(124, 156, 255, 0.3);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.2s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.btn-add-isrc:hover {
  background: rgba(124, 156, 255, 0.16);
  border-color: rgba(124, 156, 255, 0.48);
  transform: translateY(-1px);
}

.btn-add-isrc:active {
  transform: translateY(0) scale(0.99);
}

.btn-add-isrc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #dbe4ff, #7c9cff);
  color: #0b0d11;
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 600;
}

.main-panel {
  flex: 1;
  min-height: 220px;
  padding: 0.75rem 0.85rem 0.85rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.songs-section {
  height: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.section-head {
  margin-bottom: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--stroke);
}

.section-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.songs-surface {
  flex: 1;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  min-height: 180px;
}

.songs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.songs-toolbar-left {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--muted);
}

.btn-secondary {
  padding: 0.35rem 0.6rem;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.songs-list {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.65rem;
  padding: 0.75rem;
}

@media (max-width: 720px) {
  .songs-list {
    grid-template-columns: 1fr;
  }
}

.song-card {
  grid-column: span 4;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.18);
  padding: 0.55rem 0.6rem;
  cursor: pointer;
  min-width: 0;
}

@media (max-width: 980px) {
  .song-card {
    grid-column: span 12;
  }
}

@media (max-width: 1240px) and (min-width: 981px) {
  .song-card {
    grid-column: span 6;
  }
}

.song-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
}

.song-compact {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.6rem;
  width: 100%;
  min-width: 0;
}

.song-img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.song-img--empty {
  display: block;
  background: linear-gradient(135deg, rgba(124, 156, 255, 0.18), rgba(94, 234, 212, 0.08));
}

.song-main {
  min-width: 0;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.song-headrow {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  min-width: 0;
}

.song-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}

.song-sub {
  margin: 0.25rem 0 0;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.35;
}

.song-line {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.song-code {
  font-family: var(--mono);
  font-size: 0.67rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.05rem 0.28rem;
  border-radius: 2px;
}

.song-code-link {
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.song-code-link:hover {
  filter: brightness(1.08);
}

.song-score {
  font-family: var(--mono);
  font-size: 0.64rem;
  color: rgba(139, 147, 167, 0.9);
}

.song-sub-inline {
  font-size: 0.64rem;
  color: rgba(139, 147, 167, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 24ch;
}

.isrc-detail {
  margin: 0.2rem 0.75rem 0.75rem;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.2);
}

.isrc-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--stroke);
}

.detail-box {
  padding: 0.55rem 0.65rem;
}

.detail-box-title {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.status-badge {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.status-badge.ready {
  color: var(--ok);
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.08);
}

.status-badge.pending,
.status-badge.syncing {
  color: rgba(124, 156, 255, 0.95);
  border-color: rgba(124, 156, 255, 0.35);
  background: var(--accent-dim);
}

.status-badge.error {
  color: var(--err);
  border-color: rgba(251, 113, 133, 0.4);
  background: rgba(251, 113, 133, 0.07);
}

.song-meta {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: rgba(139, 147, 167, 0.85);
}

.song-meta code {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.05rem 0.28rem;
  border-radius: 2px;
}

.songs-placeholder {
  height: 100%;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.15rem 1rem;
  color: var(--muted);
}

.songs-placeholder-title {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(232, 234, 239, 0.82);
}

.songs-placeholder-hint {
  margin: 0;
  max-width: 26rem;
  font-size: 0.72rem;
  line-height: 1.45;
}

.app-footer {
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.4;
  padding-top: 0.15rem;
}

/* ——— Modal ——— */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.modal-root.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 10, 0.72);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  max-height: calc(100vh - 1.75rem);
  overflow-y: auto;
  transform: scale(0.94) translateY(16px);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}

.modal-root.is-open .modal-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-card {
  padding: 0.85rem 0.9rem 0.8rem;
  margin: 0;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.modal-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.modal-close {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -0.2rem -0.2rem 0 0;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

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

.modal-lead {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--muted);
}

.card {
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
}

.input-wrap {
  position: relative;
}

.input-wrap::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  background: linear-gradient(120deg, rgba(124, 156, 255, 0.35), rgba(94, 234, 212, 0.2));
  z-index: 0;
  transform: scale(0.98);
}

.input-wrap:focus-within::after {
  opacity: 1;
  transform: scale(1);
}

input[type="text"] {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0.55rem 0.65rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input[type="text"]::placeholder {
  color: rgba(139, 147, 167, 0.55);
  letter-spacing: 0.04em;
}

input[type="text"]:focus {
  border-color: rgba(124, 156, 255, 0.45);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.btn {
  margin-top: 0.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  color: #0b0d11;
  background: linear-gradient(135deg, #dbe4ff, #a5b4fc 45%, #7c9cff);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 4px 18px rgba(124, 156, 255, 0.2);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(124, 156, 255, 0.26);
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-spinner {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid rgba(11, 13, 17, 0.25);
  border-top-color: rgba(11, 13, 17, 0.85);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn.loading .btn-spinner {
  opacity: 1;
  transform: scale(1);
}

.btn.loading .btn-label {
  opacity: 0.85;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.hint {
  margin: 0;
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.35;
}

.feedback {
  margin-top: 0.55rem;
  padding: 0 0.65rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  font-size: 0.75rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(6px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1), transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    max-height 0.4s ease, margin-top 0.3s ease, padding 0.3s ease, border-color 0.2s ease, background 0.2s ease;
}

.feedback--modal.visible,
.feedback.visible {
  opacity: 1;
  transform: translateY(0);
  max-height: 200px;
  margin-top: 0.55rem;
  padding: 0.55rem 0.65rem;
  pointer-events: auto;
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.28);
}

.feedback.ok,
.feedback--modal.ok {
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.08);
}

.feedback.err,
.feedback--modal.err {
  border-color: rgba(251, 113, 133, 0.4);
  background: rgba(251, 113, 133, 0.07);
}

.feedback-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.icon-check {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--ok);
  position: relative;
  flex-shrink: 0;
  animation: pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.icon-check::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 5px;
  height: 8px;
  border: solid #0c0e12;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

@keyframes pop-in {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.mono-small {
  font-family: var(--mono);
  font-size: 0.7rem;
  opacity: 0.9;
}

/* ——— Tabs ——— */

.tabs {
  display: flex;
  border-bottom: 1px solid var(--stroke);
  margin-bottom: 0.85rem;
}

.tab {
  padding: 0.38rem 0.8rem;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ——— Docs ——— */

.docs {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding-bottom: 0.5rem;
}

.doc-ep {
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
}

.doc-ep-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  background: rgba(0, 0, 0, 0.22);
  border-bottom: 1px solid var(--stroke);
}

.doc-ep-desc {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.45;
  color: var(--muted);
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--stroke);
}

.method-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.42rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: var(--radius-sm);
  border: 1px solid;
  flex-shrink: 0;
}

.method-post {
  color: var(--ok);
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.08);
}

.method-get {
  color: var(--accent);
  border-color: rgba(124, 156, 255, 0.35);
  background: var(--accent-dim);
}

.ep-path {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.doc-blocks {
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.doc-block {
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
}

.doc-block-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.28rem 0.65rem;
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid var(--stroke);
}

.doc-block-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc-block-status {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  margin-left: auto;
}

.doc-block-head.ok .doc-block-label,
.doc-block-head.ok .doc-block-status {
  color: var(--ok);
}

.doc-block-head.err .doc-block-label,
.doc-block-head.err .doc-block-status {
  color: var(--err);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
}

.doc-table thead td {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(139, 147, 167, 0.6);
  padding: 0.28rem 0.65rem;
  border-bottom: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.1);
}

.doc-table tbody td {
  padding: 0.35rem 0.65rem;
  border-bottom: 1px solid var(--stroke);
  line-height: 1.45;
  vertical-align: top;
  color: var(--muted);
}

.doc-table tbody tr:last-child td {
  border-bottom: none;
}

.doc-table td.param-name {
  font-family: var(--mono);
  font-size: 0.67rem;
  color: var(--accent);
  white-space: nowrap;
  width: 1%;
}

.doc-table td.param-type {
  white-space: nowrap;
  width: 1%;
}

.doc-table td.param-req {
  white-space: nowrap;
  width: 1%;
  color: rgba(139, 147, 167, 0.7);
}

.doc-table td.param-desc {
  color: var(--text);
}

.doc-table code {
  font-family: var(--mono);
  font-size: 0.67rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.05rem 0.28rem;
  border-radius: 2px;
}

.doc-code {
  margin: 0;
  padding: 0.7rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.67rem;
  line-height: 1.7;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}

.doc-copy-btn {
  margin: 0.65rem 0.8rem 0.8rem;
}

.doc-toggle {
  margin: 0;
  border-top: 1px solid var(--stroke);
}

.doc-toggle > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.55rem 0.8rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--accent);
  user-select: none;
}

.doc-toggle > summary::-webkit-details-marker {
  display: none;
}

.doc-toggle > summary::before {
  content: "▸ ";
}

.doc-toggle[open] > summary::before {
  content: "▾ ";
}

/* ——— Responsive media ——— */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .modal-dialog {
    transform: none !important;
  }
}
