@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  --bg:        #0a0a0a;
  --surface:   #111111;
  --surface2:  #181818;
  --border:    #1f1f1f;
  --border2:   #2a2a2a;
  --text:      #ffffff;
  --muted:     #8a8a8a;
  --muted2:    #4a4a4a;
  --accent:    #e05252;
  --accent-dim:#2e1111;
  --code-bg:   #141414;
  --r:         10px;
  --r-sm:      6px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

nav {
  width: 100%;
  z-index: 10;
}

.nav-inner {
  border-bottom: 1px solid var(--border);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.logo-img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
  display: block;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.12s;
}

.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-form { display: flex; }

.nav-link-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 0;
  transition: color 0.12s;
}

.nav-link-button:hover { color: var(--text); }

.container      { max-width: 720px;  margin: 0 auto; padding: 0 1.5rem; }
.container-wide { max-width: 900px;  margin: 0 auto; padding: 0 1.5rem; }

main {
  min-height: calc(100vh - 58px);
}

.index-main {
  position: relative;
  overflow: hidden;
}

.index-main::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(224,82,82,.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero {
  text-align: center;
  padding: 5.5rem 1rem 2.5rem;
  position: relative;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 0.65rem;
  line-height: 1.2;
}

.hero-accent { color: var(--accent); }

.hero p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 420px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

.hero-formats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-formats span {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  letter-spacing: 0.04em;
  font-family: 'Courier New', monospace;
}

.hero-formats-sep {
  background: none !important;
  border: none !important;
  color: var(--muted2) !important;
  padding: 0 !important;
  font-size: 14px !important;
}

.download-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 1px solid rgba(224,82,82,.2);
  border-radius: var(--r);
  padding: 1.75rem;
  margin-top: 2rem;
}

.download-card > * {
  position: relative;
  z-index: 1;
}

.download-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: stretch;
}

.input-wrap {
  position: relative;
  margin-bottom: 0;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  pointer-events: none;
}

.url-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  min-height: 44px;
  padding: 0.72rem 3rem 0.72rem 2.35rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.url-input::placeholder { color: var(--muted2); }
.url-input:focus        { border-color: var(--border2); box-shadow: 0 0 0 3px rgba(224,82,82,.12); }

.btn-icon {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 32px;
  height: 32px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.btn-icon:hover {
  background: var(--surface2);
  border-color: var(--border2);
  color: var(--text);
}

.btn-icon img {
  width: 15px;
  height: 15px;
  display: block;
  transition: filter 0.12s;
}

.btn-icon:hover img {
  filter: brightness(1.8);
}

.card-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.card-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
  min-width: 46px;
}

.tabs {
  display: flex;
  gap: 5px;
  width: 100%;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.tab-btn {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 32px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 11px;
  transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.12s;
  line-height: 1;
}

.tab-icon {
  width: 15px;
  height: 15px;
  display: block;
  flex-shrink: 0;
  transition: filter 0.12s, transform 0.12s;
}

.tab-btn:hover  {
  background: var(--surface);
  border-color: var(--border2);
  color: var(--text);
}

.tab-btn:hover .tab-icon { filter: brightness(1.8); }

.tab-btn.active {
  background: var(--surface2);
  border-color: var(--border2);
  color: var(--text);
}

.tab-btn.active .tab-icon {
  filter: brightness(0) saturate(100%) invert(47%) sepia(77%) saturate(772%) hue-rotate(321deg) brightness(94%) contrast(88%);
  transform: translateY(-1px);
}

.format-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.format-row label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}

.format-select {
  width: 100%;
  background-color: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 5px 28px 5px 10px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("/static/icons/chevron-down.svg");
  background-repeat: no-repeat;
  background-position: right 9px center;
  transition: border-color 0.12s;
}

.format-select:focus { border-color: var(--border2); }

.format-input {
  width: 100%;
  background-color: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  padding: 5px 10px;
  outline: none;
  transition: border-color 0.12s;
}

.format-input::placeholder { color: var(--muted2); }
.format-input:focus { border-color: var(--border2); }

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: var(--r-sm);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 0.65rem 1.5rem;
  transition: opacity 0.12s, transform 0.12s;
  letter-spacing: -0.01em;
  margin-top: 0.25rem;
}

.download-search .btn-primary {
  width: auto;
  min-width: 142px;
  min-height: 44px;
  margin-top: 0;
}

.btn-img {
  width: 14px;
  height: 14px;
  display: block;
  flex-shrink: 0;
}

.btn-primary:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.status-area { margin-top: 1rem; min-height: 22px; }

.status-msg {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-msg.loading { color: var(--muted); }
.status-msg.error   { color: var(--accent); }
.status-msg.success { color: #5cc97b; }

.spinner {
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--border2);
  border-top-color: var(--muted);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}

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

.docs-hero {
  padding: 3.5rem 0 2rem;
}

.docs-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.docs-hero p {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 540px;
}

.api-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 2rem 0 2.75rem;
}

.api-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.1rem 1.25rem 1.25rem;
  transition: border-color 0.12s;
}

.api-card:hover { border-color: var(--border2); }

.api-pill {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 20px;
  color: var(--muted);
  font-family: 'Courier New', monospace;
  font-size: 10.5px;
  padding: 2px 9px;
  margin-bottom: 0.65rem;
  letter-spacing: 0.01em;
}

.api-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.api-card p { color: var(--muted); font-size: 13px; line-height: 1.5; }

.docs-section {
  border-top: 1px solid var(--border);
  padding-top: 2.25rem;
  margin-bottom: 2.5rem;
}

.docs-section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}

.docs-section > p, .docs-section > .section-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 0.75rem;
  line-height: 1.65;
}

.route-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.method-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: monospace;
  letter-spacing: 0.03em;
}

.method-get  { background: #132513; color: #5cc97b; }
.method-post { background: #261f0d; color: #c9a55c; }

.route-path {
  font-family: 'Courier New', monospace;
  font-size: 13.5px;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-top: 0.6rem;
}

.param-table, .error-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 480px;
}

.param-table th, .error-table th {
  background: var(--surface);
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.55rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.param-table td, .error-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.param-table tr:last-child td, .error-table tr:last-child td { border-bottom: none; }

.p-name { font-family: monospace; color: var(--text); font-size: 13px; }
.p-type { color: var(--muted); font-size: 12px; }
.p-desc { color: var(--muted); font-size: 13px; line-height: 1.55; }

code {
  font-family: 'Courier New', monospace;
  font-size: 12.5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--text);
}

.badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 500;
  padding: 1px 8px;
  border-radius: 4px;
  letter-spacing: 0.01em;
}

.badge-req { background: var(--accent-dim); color: var(--accent); }
.badge-opt { background: var(--surface2);   color: var(--muted); border: 1px solid var(--border2); }

.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1rem 1.25rem;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  overflow-x: auto;
  margin: 0.75rem 0;
  white-space: pre;
  color: #b8b8b8;
  line-height: 1.7;
}

.code-block .c-cmd  { color: var(--accent); }
.code-block .c-flag { color: #8fbcd4; }
.code-block .c-str  { color: #9ecb8c; }
.code-block .c-key  { color: #8fbcd4; }
.code-block .c-val  { color: #9ecb8c; }
.code-block .c-num  { color: #d19a66; }
.code-block .c-bool { color: #56b6c2; }

.status-code     { font-family: monospace; font-weight: 600; }
.status-4xx      { color: #c49a5e; }
.status-5xx      { color: var(--accent); }

.login-wrap {
  max-width: 520px;
  margin: 5rem auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 1px solid rgba(224,82,82,.2);
  border-radius: var(--r);
  padding: 1.75rem;
}

.login-heading {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.35rem;
}

.login-sub {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

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

.login-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  align-items: stretch;
}

.login-input { padding-left: 1rem; }

.login-btn {
  width: auto;
  min-width: 92px;
  margin-top: 0;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

.login-error {
  color: var(--accent);
  font-size: 13px;
}

.error-main {
  display: flex;
  align-items: center;
  padding: 3rem 0;
}

.error-card {
  max-width: 520px;
  margin: 3rem auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 1px solid rgba(224,82,82,.2);
  border-radius: var(--r);
  padding: 1.75rem;
  text-align: center;
}

.error-mark {
  width: 42px;
  height: 42px;
  margin: 0 auto 1rem;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-mark img {
  width: 26px;
  height: 26px;
  display: block;
}

.error-code {
  color: var(--accent);
  font-family: 'Courier New', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.error-card h1 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.45rem;
}

.error-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  max-width: 380px;
  margin: 0 auto;
}

.error-detail {
  margin-top: 0.65rem !important;
  color: var(--muted2) !important;
  font-size: 12.5px !important;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.35rem;
  flex-wrap: wrap;
}

.error-primary,
.error-secondary {
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
  padding: 0.48rem 1rem;
  transition: opacity 0.12s, border-color 0.12s, color 0.12s;
}

.error-primary {
  background: var(--accent);
  color: #fff;
}

.error-primary:hover { opacity: 0.88; }

.error-secondary {
  border: 1px solid var(--border2);
  color: var(--text);
}

.error-secondary:hover { border-color: var(--muted2); }

footer {
  margin-top: 4rem;
}

.footer-inner {
  border-top: 1px solid var(--border);
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  color: #6b7280;
  font-size: 12px;
  text-align: center;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.footer-links a {
  color: #6b7280;
  font-size: 12px;
  transition: color 0.12s;
}

.footer-links a:hover { color: var(--muted); }

.footer-sep {
  color: var(--muted2);
  font-size: 12px;
}

.footer-copy {
  font-size: 12px;
}

.legal-list {
  list-style: none;
  margin: 0.5rem 0 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-list li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  padding-left: 1rem;
  position: relative;
}

.legal-list li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--muted2);
}

.legal-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(224,82,82,.35);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.12s;
}

.legal-link:hover { text-decoration-color: var(--accent); }

.info-panel {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
}

.info-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.95rem;
  align-items: stretch;
}

.info-art {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--border);
}

.info-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.68), transparent 62%);
  pointer-events: none;
}

.info-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--border);
}

.info-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 0.65rem;
}

.confirm-label {
  position: absolute;
  left: 0.5rem;
  bottom: 0.45rem;
  z-index: 1;
  display: inline-flex;
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: rgba(0,0,0,.65);
  border-radius: 4px;
  padding: 1px 6px;
}

.info-title {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.info-options {
  margin: 0.65rem 0;
  display: grid;
  gap: 0.5rem;
  width: 100%;
}

.info-opt-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.confirm-btns {
  width: 100%;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  flex-direction: row;
}

.btn-confirm-all {
  flex: 1;
  min-width: 130px;
  background: var(--accent);
  border: none;
  border-radius: var(--r-sm);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 0.48rem 1rem;
  transition: opacity 0.12s;
  white-space: nowrap;
}

.btn-confirm-all:hover { opacity: 0.85; }

.btn-confirm-single {
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  padding: 0.48rem 1rem;
  transition: border-color 0.12s;
  white-space: nowrap;
}

.btn-confirm-single:hover { border-color: var(--muted2); }

.btn-confirm-cancel {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  padding: 0.48rem 1rem;
  transition: color 0.12s;
  white-space: nowrap;
}

.btn-confirm-cancel:hover { color: var(--text); }

.track-list-wrap {
  max-height: 220px;
  overflow-y: auto;
  margin: 0.6rem 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.track-list-wrap::-webkit-scrollbar { width: 4px; }
.track-list-wrap::-webkit-scrollbar-track { background: transparent; }
.track-list-wrap::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

.track-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.75rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  min-width: 0;
}

.track-row:last-child { border-bottom: none; }
.track-row:hover { background: var(--surface2); }

.track-num {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--muted2);
  font-variant-numeric: tabular-nums;
  width: 22px;
  text-align: right;
}

.track-title {
  flex: 1;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.track-duration {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--muted2);
  font-variant-numeric: tabular-nums;
}

.track-row--more {
  justify-content: center;
  color: var(--muted2);
  font-size: 11.5px;
  font-style: italic;
}

.track-row--more:hover { background: transparent; }

@media (max-width: 768px) {
  .nav-inner { padding: 0 1.25rem; }
  .nav-links { gap: 1.25rem; }

  .container      { padding: 0 1.25rem; }
  .container-wide { padding: 0 1.25rem; }

  .hero { padding: 4rem 0 2rem; }
  .hero h1 { font-size: 1.9rem; }

  .docs-hero { padding: 2.75rem 0 1.5rem; }
  .docs-hero h1 { font-size: 1.7rem; }

  .api-grid { grid-template-columns: repeat(2, 1fr); }

  .docs-section { padding-top: 1.75rem; margin-bottom: 2rem; }

  .download-card { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .nav-inner { padding: 0 1rem; height: 52px; }
  .nav-links { gap: 0.9rem; }
  .nav-links a { font-size: 13px; }
  .logo-img { width: 24px; height: 24px; }
  .nav-logo { font-size: 14px; gap: 7px; }

  .container      { padding: 0 1rem; }
  .container-wide { padding: 0 1rem; }

  .hero { padding: 3rem 0 1.75rem; }
  .hero h1 { font-size: 1.55rem; letter-spacing: -0.025em; }
  .hero p  { font-size: 0.875rem; }

  .download-card { padding: 1.25rem; margin-top: 1.5rem; }
  .download-search { grid-template-columns: 1fr; }
  .download-search .btn-primary { width: 100%; }
  .info-art { aspect-ratio: 16 / 9; }
  .info-opt-row { grid-template-columns: 1fr; gap: 0.35rem; }
  .format-select { width: 100%; }
  .confirm-btns { display: flex; flex-direction: column; }

  .login-wrap { margin-top: 3rem; padding: 1.25rem; }
  .login-row { grid-template-columns: 1fr; }
  .login-btn { width: 100%; }
  .error-card { margin-top: 1.5rem; padding: 1.25rem; }
  .error-actions { display: grid; grid-template-columns: 1fr; }

  .docs-hero { padding: 2rem 0 1.25rem; }
  .docs-hero h1 { font-size: 1.45rem; }

  .api-grid { grid-template-columns: 1fr; }

  .docs-section { padding-top: 1.5rem; margin-bottom: 1.5rem; }
  .docs-section h2 { font-size: 1.05rem; }

  .code-block { font-size: 12px; padding: 0.75rem 0.9rem; }

  footer { padding: 1.25rem 1rem; }
}

/* --- Services strip on index ---------------------------------------- */
.services-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 auto 1rem;
  max-width: 720px;
  padding: 0 0.5rem;
}

.service-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
}

.service-chip-name { font-weight: 500; letter-spacing: -0.01em; }

.service-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.service-chip-dot--ok { background: #2ecc71; box-shadow: 0 0 6px rgba(46, 204, 113, 0.45); }

.service-chip-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  letter-spacing: 0.04em;
}
.service-chip-tag--muted { background: #1a1a1a; color: var(--muted); }
.service-chip-tag--off { background: #1a1a1a; color: var(--muted2); }

.service-chip--unconfigured { opacity: 0.65; }
.service-chip--coming_soon  { opacity: 0.65; }

.services-strip-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  transition: color 0.12s;
}
.services-strip-link:hover { color: var(--text); }

/* --- Dashboard ------------------------------------------------------- */
.dashboard-main { padding: 2rem 0 3rem; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.dashboard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dashboard-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.dashboard-card-body { color: var(--muted); font-size: 13px; line-height: 1.55; }
.dashboard-card-reason { color: var(--muted2); font-size: 12px; font-style: italic; }
.dashboard-card-env { font-size: 12px; color: var(--muted); }
.dashboard-card-env code {
  background: var(--code-bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
}
.dashboard-card-env-label { color: var(--muted2); margin-right: 4px; }

.dashboard-card-cta {
  align-self: flex-start;
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 4px 10px;
  border-radius: var(--r-sm);
  transition: background 0.12s, color 0.12s;
}
.dashboard-card-cta:hover { background: var(--accent-dim); }

.status-pill {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-pill--ok    { background: rgba(46, 204, 113, 0.12); color: #2ecc71; }
.status-pill--warn  { background: var(--accent-dim); color: var(--accent); }
.status-pill--muted { background: #1a1a1a; color: var(--muted); }
.status-pill--off   { background: #1a1a1a; color: var(--muted2); }

.status-link {
  margin-left: 6px;
  color: var(--accent);
  text-decoration: underline;
}
