:root {
  --bg: #080b12;
  --panel: #101624;
  --panel-2: #151d30;
  --border: #23304d;
  --text: #eef2ff;
  --muted: #8b9bc1;
  --accent: #f59e0b;
  --accent-2: #10b981;
  --cyan: #38bdf8;
  --danger: #ef4444;
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body {
  overscroll-behavior-y: contain;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(circle at 12% 8%, #16223d 0%, var(--bg) 52%);
  color: var(--text);
  line-height: 1.5;
}
button, a, select, summary, input[type="range"], .nav-link {
  touch-action: manipulation;
}

.wrap { max-width: 1280px; margin: 0 auto; padding: 20px 18px 56px; }

.topbar {
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: rgba(16, 22, 36, 0.92); backdrop-filter: blur(8px); margin-bottom: 18px;
}
.topbar-main {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  width: 100%;
}
.brand h1 { margin: 0; font-size: 1.45rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.brand h1 .badge {
  font-size: 0.72rem; padding: 3px 9px; border-radius: 999px;
  background: rgba(245, 158, 11, 0.16); color: var(--accent); border: 1px solid rgba(245, 158, 11, 0.35);
}
.brand p { margin: 4px 0 0; font-size: 0.85rem; color: var(--muted); }

.conn-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-start;
  width: 100%; padding-top: 10px; border-top: 1px solid rgba(35, 48, 77, 0.55);
}
.conn-bar input {
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 11px; font-size: 0.84rem;
}
.conn-bar input[type="password"] { width: 175px; }
.conn-bar input[type="url"] { width: 215px; }

.pill {
  font-size: 0.76rem; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--muted); white-space: nowrap;
}
.pill.ok { color: var(--accent-2); border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.1); }
.pill.warn { color: var(--accent); border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.1); }
.pill.err { color: var(--danger); border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.1); }

.grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; }
@media (max-width: 960px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 13px;
}
.card h2 {
  margin: 0; font-size: 1.05rem; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.sub { font-size: 0.82rem; color: var(--muted); margin: 0; }

label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
input[type="text"], input[type="email"], input[type="number"], textarea, select {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px; font-size: 0.9rem; font-family: inherit;
}

.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 18px; margin-bottom: 18px;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab-btn {
  padding: 6px 12px; font-size: 0.8rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg); color: var(--muted);
}
.tab-btn.active {
  background: rgba(56, 189, 248, 0.16); color: var(--cyan); border-color: rgba(56, 189, 248, 0.5);
}

.notice-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 0.82rem; color: #cbd5e1; display: grid; gap: 6px;
}
.notice-box.ok { border-color: rgba(16, 185, 129, 0.45); background: rgba(16, 185, 129, 0.08); }
.notice-box.warn { border-color: rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.08); }
.notice-box.err { border-color: rgba(239, 68, 68, 0.45); background: rgba(239, 68, 68, 0.08); }

.demo-box { display: flex; gap: 12px; align-items: center; }
.demo-cover {
  width: 78px; height: 78px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--border); flex-shrink: 0;
  cursor: zoom-in; transition: transform 0.15s ease, border-color 0.15s ease;
}
.demo-cover:hover { transform: scale(1.03); border-color: var(--cyan); }
.demo-meta h3 { margin: 0 0 4px; font-size: 0.96rem; color: var(--text); }
.demo-meta p { margin: 0; font-size: 0.78rem; color: var(--muted); }

.admin-card { margin-bottom: 18px; border-color: rgba(16, 185, 129, 0.35); }
.user-list { display: grid; gap: 8px; max-height: 300px; overflow-y: auto; }
.user-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.user-info { display: grid; gap: 2px; font-size: 0.82rem; }
.user-info .u-email { font-weight: 700; color: var(--text); }
.user-info .u-meta { font-size: 0.75rem; color: var(--muted); }
.user-actions { display: flex; gap: 6px; flex-wrap: wrap; }
button.btn-sm { padding: 6px 10px; font-size: 0.76rem; border-radius: 8px; }
button.btn-ok { background: rgba(16, 185, 129, 0.16); border-color: rgba(16, 185, 129, 0.5); color: #6ee7b7; }
button.btn-no { background: rgba(239, 68, 68, 0.16); border-color: rgba(239, 68, 68, 0.5); color: #fca5a5; }
textarea { resize: vertical; min-height: 110px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.84rem; line-height: 1.5; }
.row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .row, .row2 { grid-template-columns: 1fr; } }

.actions { display: flex; flex-wrap: wrap; gap: 9px; }
button {
  cursor: pointer; border: 1px solid var(--border); background: var(--panel-2); color: var(--text);
  border-radius: 10px; padding: 9px 14px; font-weight: 600; font-size: 0.86rem; transition: 0.15s ease;
}
button:hover:not(:disabled) { border-color: var(--cyan); transform: translateY(-1px); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary { background: linear-gradient(135deg, #f59e0b, #ea580c); color: #090b10; border-color: transparent; }
button.reflex { background: linear-gradient(135deg, #10b981, #0284c7); color: #050a12; border-color: transparent; }
button.koma { background: rgba(56, 189, 248, 0.14); border-color: rgba(56, 189, 248, 0.45); color: #bae6fd; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 600px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
.metric {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px;
}
.metric .k { font-size: 0.72rem; color: var(--muted); }
.metric .v { font-size: 1.05rem; font-weight: 700; margin-top: 2px; color: var(--text); }

.bars { display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 105px 1fr 78px; gap: 8px; align-items: center; font-size: 0.78rem; }
.bar-track { height: 10px; border-radius: 999px; background: var(--bg); overflow: hidden; border: 1px solid var(--border); }
.bar-fill { height: 100%; border-radius: 999px; }
.z3 { background: var(--cyan); }
.z6 { background: var(--accent); }
.z0 { background: var(--accent-2); }

.tokens { display: flex; flex-wrap: wrap; gap: 6px; max-height: 120px; overflow-y: auto; }
.tok {
  font-size: 0.74rem; padding: 3px 8px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border); color: #cbd5e1;
}
.tok b { color: var(--accent); }

.koma-keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 7px; }
.koma-key {
  padding: 9px 8px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border);
  text-align: left; font-size: 0.76rem;
}
.koma-key:hover { border-color: var(--accent); }
.koma-key .deg { font-weight: 700; color: var(--accent); display: block; }
.koma-key .hz { color: var(--muted); font-family: ui-monospace, monospace; font-size: 0.72rem; }

.log {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-family: ui-monospace, monospace; font-size: 0.78rem;
  color: #cbd5e1; max-height: 150px; overflow-y: auto; white-space: pre-wrap;
}

audio { width: 100%; margin-top: 4px; }
.brand-lockup { display: flex; align-items: center; gap: 13px; }
.brand-logo { width: 44px; height: 44px; flex-shrink: 0; border-radius: 11px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; margin-left: auto; }
.nav-link {
  text-decoration: none; font-size: 0.84rem; font-weight: 600; color: var(--muted);
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); transition: 0.15s ease;
}
.nav-link:hover { color: var(--text); border-color: var(--cyan); }
.nav-link.active {
  color: #050a12; background: linear-gradient(135deg, #f59e0b, #38bdf8);
  border-color: transparent;
}

.doc-hero {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(56, 189, 248, 0.08));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 18px;
}
.doc-hero h2 { margin: 0 0 8px; font-size: 1.4rem; }
.doc-hero p { margin: 0; color: #cbd5e1; font-size: 0.94rem; max-width: 880px; }

.doc-stack { display: flex; flex-direction: column; gap: 18px; }
.step-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: grid; gap: 12px;
}
.step-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 0.86rem; background: rgba(245, 158, 11, 0.18);
  color: var(--accent); border: 1px solid rgba(245, 158, 11, 0.45); flex-shrink: 0;
}
.step-head h3 { margin: 0; font-size: 1.08rem; }
.step-card p, .step-card li { color: #cbd5e1; font-size: 0.9rem; }
.step-card ul, .step-card ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 780px) { .compare-grid { grid-template-columns: 1fr; } }
.compare-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px;
}
.compare-box.folk { border-color: rgba(245, 158, 11, 0.4); }
.compare-box.acad { border-color: rgba(56, 189, 248, 0.4); }
.compare-box h4 { margin: 0 0 8px; font-size: 0.9rem; }
.compare-box.folk h4 { color: var(--accent); }
.compare-box.acad h4 { color: var(--cyan); }

.formula {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem; color: #93c5fd; overflow-x: auto; white-space: pre;
}

.figure {
  margin: 4px 0 0; background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px;
}
.figure img { width: 100%; height: auto; border-radius: 8px; display: block; }
.figure figcaption { font-size: 0.78rem; color: var(--muted); margin-top: 8px; text-align: center; }

.tbl-wrap { overflow-x: auto; }
table.spec { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
table.spec th, table.spec td {
  border-bottom: 1px solid var(--border); padding: 9px 10px; text-align: left;
}
table.spec th { color: var(--cyan); font-weight: 700; background: rgba(8, 11, 18, 0.65); }

a.dl { color: var(--cyan); font-size: 0.84rem; text-decoration: none; font-weight: 600; }
a.dl:hover { text-decoration: underline; }

.user-lib-list { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; }
.lib-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lib-head { display: flex; flex-direction: column; align-items: stretch; gap: 7px; }
.lib-title { font-weight: 700; font-size: 14px; color: var(--text); }
.lib-meta { font-size: 11px; color: var(--muted); }
.lib-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lib-btn {
  padding: 4px 9px;
  font-size: 11px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #111827;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lib-btn:hover { border-color: var(--accent); color: var(--accent); }
.lib-btn.koma { border-color: rgba(56, 189, 248, 0.45); color: var(--accent2); }
.lib-btn.del:hover { border-color: var(--err); color: var(--err); }
.lib-koma-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(148, 163, 184, 0.2);
}
.lib-koma-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 11px;
  color: var(--accent2);
}
.lib-koma-chip a, .lib-koma-chip button {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0 2px;
  font-size: 11px;
  text-decoration: none;
}
.lib-koma-chip a:hover, .lib-koma-chip button:hover { color: var(--accent); }

.queue-table-wrap { overflow-x: auto; }
.queue-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.queue-table th, .queue-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.queue-table th { color: var(--muted); font-weight: 600; font-size: 12px; }
.queue-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.queue-badge.run { background: rgba(16, 185, 129, 0.16); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.queue-badge.wait { background: rgba(245, 158, 11, 0.16); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.queue-badge.eta { background: rgba(56, 189, 248, 0.14); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.4); }

.lib-main {
  display: flex;
  gap: 12px;
  align-items: center;
}
.lib-cover {
  width: 78px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: #0f172a;
  cursor: zoom-in;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.lib-cover:hover {
  transform: scale(1.03);
  border-color: var(--cyan);
}
.lib-cover-placeholder {
  width: 78px;
  height: 78px;
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.8);
  color: var(--muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
  padding: 6px;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(4, 7, 15, 0.86);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  max-width: 94vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}
.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  line-height: 1;
}
.lightbox-img {
  display: block;
  max-width: 88vw;
  max-height: 76vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
  background: #090d16;
}
.lightbox-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lightbox-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

@media (max-width: 520px) {
  .lib-main {
    align-items: flex-start;
  }
  .lib-cover,
  .lib-cover-placeholder {
    width: 64px;
    height: 64px;
  }
}

/* ---------- Keşfet (Topluluk Vitrini) & Sticky Player ---------- */
body.has-sticky-player { padding-bottom: 104px; }
body.has-sticky-player .grecaptcha-badge { bottom: 112px !important; z-index: 850 !important; }
.discover-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
}
.discover-stats { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.discover-cta-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 6px 13px; border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #090b10; font-size: 0.78rem; font-weight: 700;
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}
.discover-cta-btn:hover { filter: brightness(1.08); }
.discover-controls {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px;
}
.discover-search-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1; justify-content: flex-end; }
.discover-search-row input[type="search"] {
  min-width: 210px; max-width: 340px; flex: 1;
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; font-size: 0.88rem; font-family: inherit;
}
.discover-search-row select { width: auto; padding: 8px 10px; font-size: 0.84rem; }

.discover-card.is-playing {
  border-color: rgba(16, 185, 129, 0.7);
  background: rgba(16, 185, 129, 0.06);
}
.koma-chip.is-playing-chip {
  border-color: rgba(16, 185, 129, 0.75);
  background: rgba(16, 185, 129, 0.14);
}
.discover-card .lib-body {
  flex: 1;
  min-width: 0;
}
.discover-title-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: nowrap; width: 100%;
}
.discover-title-wrap {
  display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; flex: 1; min-width: 0;
}
.rank-pill {
  font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: rgba(148, 163, 184, 0.14); color: var(--muted); border: 1px solid var(--border);
}
.rank-pill.top {
  background: rgba(245, 158, 11, 0.18); color: #fcd34d; border-color: rgba(245, 158, 11, 0.45);
}
.author-pill {
  font-size: 0.74rem; color: #93c5fd; background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3); padding: 2px 8px; border-radius: 999px;
}

.heart-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px;
  border-radius: 999px; font-size: 0.82rem; font-weight: 700;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); color: var(--muted);
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}
.heart-btn:hover:not(:disabled) { border-color: rgba(244, 63, 94, 0.6); color: #fda4af; }
.heart-btn.liked {
  background: rgba(244, 63, 94, 0.18); border-color: rgba(244, 63, 94, 0.65); color: #fb7185;
}

.pagination-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--border);
}
.page-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.page-btn { padding: 6px 11px; font-size: 0.8rem; border-radius: 8px; }
.page-btn.active { background: rgba(56, 189, 248, 0.2); border-color: rgba(56, 189, 248, 0.55); color: var(--cyan); }

.sticky-player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  background: rgba(15, 23, 42, 0.96); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(56, 189, 248, 0.35); padding: 10px 16px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}
.sp-inner {
  max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.sp-track { display: flex; align-items: center; gap: 10px; min-width: 180px; flex: 1; }
.sp-cover { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.sp-meta { min-width: 0; }
.sp-title { font-size: 0.88rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-author { font-size: 0.74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-controls { display: flex; flex-direction: column; gap: 4px; flex: 1.5; min-width: 240px; }
.sp-buttons { display: flex; justify-content: center; align-items: center; gap: 10px; }
.sp-btn { padding: 5px 10px; font-size: 0.85rem; border-radius: 999px; }
.sp-play { background: linear-gradient(135deg, #10b981, #0284c7); color: #050a12; border-color: transparent; padding: 5px 14px; }
.sp-progress-wrap { display: flex; align-items: center; gap: 8px; }
.sp-time { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; }
.sp-seek { flex: 1; accent-color: #38bdf8; cursor: pointer; }
.sp-volume-wrap { display: flex; align-items: center; gap: 6px; }
.sp-btn.is-active {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.85);
  color: #6ee7b7;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.28);
}
.doc-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}
.doc-toc a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.doc-toc a:hover {
  border-color: var(--cyan);
  color: var(--text);
}
.doc-cta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 13px;
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, filter 0.15s ease;
}
.dl:hover { border-color: var(--cyan); }
.doc-shot img, .figure img { cursor: zoom-in; }

/* ---------- Site Footer (werr.io / werracle.io / answerr.me ekosistemi) ---------- */
.site-footer {
  margin-top: 28px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(16, 22, 36, 0.78);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}
.site-footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.site-footer-org {
  color: var(--text);
  font-weight: 600;
  font-size: 0.82rem;
}
.site-footer-lic {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.45;
}
.site-footer-lic a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.site-footer-lic a:hover { text-decoration: underline; }
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(35, 48, 77, 0.55);
}
.site-footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.78rem;
  transition: color 0.15s ease;
}
.site-footer-links a:hover { color: var(--cyan); }
.demo-play-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.demo-selected-hint {
  font-size: 0.78rem;
  color: var(--muted);
}
.demo-makam-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.demo-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.demo-pill:hover {
  border-color: var(--cyan);
  color: var(--text);
}
.demo-pill.is-active {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.85);
  color: #6ee7b7;
}
.workshop-actions {
  gap: 6px;
}
.workshop-actions button {
  padding: 8px 10px;
  font-size: 0.8rem;
  white-space: nowrap;
  flex: 1 1 auto;
}
.wizard-banner {
  margin-bottom: 18px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(56, 189, 248, 0.08));
}
.wizard-modal-card {
  max-width: 680px;
  width: 94vw;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  gap: 12px;
}
.wiz-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-right: 34px;
}
.wiz-step {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border);
  color: var(--muted);
}
.wiz-step.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.8);
  color: #fcd34d;
}
.wiz-step.done {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.65);
  color: #6ee7b7;
}
.wiz-pane {
  display: none;
  gap: 10px;
}
.wiz-pane.active {
  display: grid;
}
.wiz-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.wiz-dur-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wiz-summary {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}
.lib-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.lib-likes-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid var(--border);
  color: var(--muted);
}
.lib-likes-pill.has-likes {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.55);
  color: #fda4af;
}
.lib-quality-select {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 7px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: #111827;
  color: #bae6fd;
  cursor: pointer;
  width: auto;
  max-width: 155px;
}
.lib-quality-select:hover {
  border-color: var(--cyan);
}
@keyframes focusPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); border-color: rgba(16, 185, 129, 0.9); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); border-color: rgba(56, 189, 248, 0.75); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); border-color: var(--border); }
}
.card.is-focus-pulse {
  animation: focusPulse 1.5s ease-out 1;
}
.sp-volume { width: 84px; accent-color: #10b981; cursor: pointer; }
.sp-close { padding: 5px 9px; font-size: 0.8rem; border-radius: 999px; }
.sp-mini-pill {
  position: fixed; right: 16px; bottom: 16px; z-index: 910;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(15, 23, 42, 0.96); border: 1px solid rgba(16, 185, 129, 0.65);
  color: var(--text); font-size: 0.82rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.sp-mini-pill:hover { border-color: var(--cyan); }

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  align-items: start;
  grid-template-areas:
    "workshop monitor"
    "workshop koma"
    "library  library";
}
.studio-grid > .card { min-width: 0; }
.notice-box, .log { overflow-wrap: anywhere; word-break: break-word; }
#workshopCard { grid-area: workshop; }
#monitorCard { grid-area: monitor; }
#komaCard { grid-area: koma; }
#userLibraryCard { grid-area: library; }
@media (max-width: 960px) {
  .studio-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "workshop"
      "monitor"
      "koma"
      "library";
  }
}

.studio-details {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  padding: 8px 11px;
}
.studio-details summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
}
.studio-details[open] summary { margin-bottom: 10px; color: var(--text); }

.lib-koma-chip.is-playing-chip {
  border-color: rgba(16, 185, 129, 0.75);
  background: rgba(16, 185, 129, 0.16);
}
.lib-item.is-playing {
  border-color: rgba(16, 185, 129, 0.7);
  background: rgba(16, 185, 129, 0.06);
}
.discover-meta-tags {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lyrics-modal-card { max-width: 640px; width: 92vw; }
.lm-lyrics {
  margin: 0; padding: 12px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; font-family: inherit; font-size: 0.88rem; line-height: 1.6;
  white-space: pre-wrap; max-height: 55vh; overflow-y: auto; color: var(--text);
}

@media (max-width: 640px) {
  .wrap {
    padding: 12px 12px calc(84px + env(safe-area-inset-bottom));
  }
  body.has-sticky-player .wrap {
    padding-bottom: calc(210px + env(safe-area-inset-bottom));
  }
  .topbar {
    padding: 12px 14px;
    margin-bottom: 14px;
    gap: 10px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .brand h1 {
    font-size: 1.18rem;
    flex-wrap: wrap;
    gap: 6px;
  }
  .brand h1 .badge {
    font-size: 0.68rem;
    white-space: nowrap;
  }
  .brand p {
    font-size: 0.78rem;
    line-height: 1.4;
  }
  .conn-bar {
    gap: 7px;
    padding-top: 8px;
  }
  .conn-bar input[type="password"] {
    flex: 1 1 100%;
    width: 100%;
    min-height: 40px;
  }
  .conn-bar button, .conn-bar .pill {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }
  input[type="text"], input[type="password"], input[type="search"], input[type="email"], textarea, select {
    font-size: 16px;
  }
  .topbar-main #btnPwaInstall {
    margin-left: auto;
    min-height: 34px;
    padding: 5px 12px;
    font-size: 0.78rem;
  }
  /* Native App-Like Fixed Bottom Tab Bar */
  .nav-links {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 880;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(10, 14, 24, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(56, 189, 248, 0.28);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
  }
  .nav-links .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 44px;
    min-height: 44px;
    padding: 4px 4px;
    font-size: 0.71rem;
    line-height: 1.15;
    border-radius: 10px;
    white-space: normal;
  }
  .grecaptcha-badge {
    transform: scale(0.72);
    transform-origin: bottom right;
    opacity: 0.78;
    bottom: calc(62px + env(safe-area-inset-bottom)) !important;
    z-index: 850 !important;
  }
  body.has-sticky-player .grecaptcha-badge {
    bottom: calc(192px + env(safe-area-inset-bottom)) !important;
  }
  .discover-stats { width: 100%; gap: 6px; }
  .discover-cta-btn { margin-left: auto; padding: 7px 12px; min-height: 36px; font-size: 0.76rem; }
  .discover-controls { flex-direction: column; align-items: stretch; gap: 10px; }
  .discover-controls .tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
  .discover-controls .tab-btn { width: 100%; min-height: 40px; text-align: center; justify-content: center; padding: 8px; font-size: 0.8rem; }
  .discover-search-row { width: 100%; justify-content: stretch; gap: 8px; }
  .discover-search-row input[type="search"] { flex: 1 1 100%; min-width: 0; width: 100%; max-width: none; min-height: 42px; padding: 9px 12px; }
  .discover-search-row select { flex: 1 1 46%; min-width: 0; min-height: 40px; padding: 8px 10px; }
  .discover-search-row button { flex: 1 1 46%; min-width: 0; min-height: 40px; padding: 8px 10px; }
  .discover-card .heart-btn { flex-shrink: 0; min-height: 36px; padding: 6px 11px; }
  .discover-card .lib-actions button,
  .discover-card .lib-actions a,
  .discover-card .lib-actions select,
  .lib-item .lib-actions button,
  .lib-item .lib-actions a,
  .lib-item .lib-actions select,
  .discover-card .actions button,
  .discover-card .actions a,
  .discover-card .actions select,
  .discover-card .actions .dl {
    min-height: 36px;
    padding: 6px 11px;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
  }
  .wizard-modal-card { width: 96vw; padding: 16px; }
  .wizard-modal-card .row { grid-template-columns: 1fr; }
  .wiz-step { font-size: 0.7rem; padding: 3px 8px; }
  .wiz-footer { flex-direction: column-reverse; align-items: stretch; }
  .wiz-footer button { width: 100%; min-height: 42px; }
  .workshop-actions button, #btnConnect, #btnAuthSignup, #btnAuthLogin, #btnForgotKey {
    min-height: 40px;
  }
  .workshop-actions button { flex: 1 1 100%; white-space: normal; }
  .demo-pill { min-height: 32px; padding: 5px 10px; }
  /* Doc TOC horizontal scroll chip bar on mobile */
  .doc-toc {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 4px;
  }
  .doc-toc::-webkit-scrollbar { display: none; }
  .doc-toc a { flex-shrink: 0; min-height: 36px; }
  .doc-cta .actions { width: 100%; display: grid; grid-template-columns: 1fr; gap: 8px; }
  .doc-cta .actions .dl { width: 100%; min-height: 42px; }
  .formula { white-space: pre-wrap; word-break: break-word; font-size: 0.76rem; }
  table.spec th, table.spec td { padding: 7px 8px; font-size: 0.76rem; }
  /* Sticky Player docked cleanly above Bottom Tab Bar */
  .sticky-player {
    bottom: calc(57px + env(safe-area-inset-bottom));
    padding: 8px 12px;
    border-radius: 14px 14px 0 0;
  }
  .sp-inner { gap: 6px; }
  .sp-track { min-width: 0; flex: 1 1 0; order: 1; }
  .sp-cover { width: 38px; height: 38px; }
  .sp-volume-wrap { display: none; }
  #spMinimize { order: 2; min-width: 36px; min-height: 36px; }
  .sp-close { order: 3; margin-left: 0; min-width: 36px; min-height: 36px; }
  .sp-controls { flex: 1 1 100%; min-width: 0; order: 4; gap: 4px; }
  .sp-btn { min-height: 36px; min-width: 36px; display: inline-flex; align-items: center; justify-content: center; }
  .sp-play { min-height: 36px; padding: 6px 16px; }
  .sp-mini-pill {
    bottom: calc(64px + env(safe-area-inset-bottom));
    right: 12px;
    min-height: 38px;
  }
}
