:root {
  --bg: #f7f9fc;
  --bg-soft: #eef3f9;
  --surface: #ffffff;
  --text: #111827;
  --body: #3f4b5d;
  --muted: #6e7989;
  --line: rgba(15, 20, 26, 0.12);
  --accent: #6721ff;
  --accent-strong: #5a1ae6;
  --accent-soft: rgba(103, 33, 255, 0.12);
  --blue: #4f9cff;

  /* System stack only: no webfont request on the critical path. Latin comes
     from the platform UI font, CJK from PingFang / YaHei / Noto Sans CJK. */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    "Noto Sans SC", sans-serif;

  --shadow-sm: 0 6px 18px rgba(15, 20, 26, 0.05);
  --shadow: 0 18px 50px rgba(15, 20, 26, 0.08);
  --header-h: 68px;
  --footer-h: 62px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  /* CJK needs noticeably more leading than Latin to avoid looking cramped. */
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 {
  /* Negative tracking squashes CJK glyphs, so headings stay at neutral. */
  letter-spacing: 0;
  line-height: 1.4;
  font-weight: 700;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img { max-width: 100%; }
svg { display: block; flex: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(680px 520px at 74% 12%, rgba(103, 33, 255, 0.14), transparent 68%),
    radial-gradient(560px 440px at 14% 4%, rgba(79, 156, 255, 0.10), transparent 70%),
    linear-gradient(180deg, #f7f9fc 0%, #eef3f9 45%, #f7f9fc 100%);
}

.container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(247, 249, 252, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 700; font-size: 1.05rem;
  letter-spacing: -0.02em; white-space: nowrap;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--accent), #9b6cff 55%, var(--blue));
  color: #fff;
  box-shadow: 0 8px 22px rgba(103, 33, 255, 0.28);
}
.nav { display: flex; align-items: center; gap: 1rem; }
.nav-link { color: var(--body); font-weight: 600; font-size: 0.95rem; }
.nav-link:hover { color: var(--accent); }
.nav-user {
  color: var(--body); font-size: 0.925rem; max-width: 130px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  border: 1px solid transparent; border-radius: 999px;
  padding: 0.6rem 1.15rem; cursor: pointer;
  font-weight: 600; line-height: 1.2; letter-spacing: 0.01em;
  transition: transform .15s ease, filter .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  color: #fff;
  box-shadow: 0 10px 28px rgba(103, 33, 255, 0.26);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--line); color: var(--text);
}
.btn-ghost:hover { background: #fff; }
.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.9rem; }
.btn-lg { padding: 0.85rem 1.3rem; }
.btn-xs { padding: 0.32rem 0.7rem; font-size: 0.8rem; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  display: flex; align-items: center;
  min-height: calc(100svh - var(--header-h) - var(--footer-h));
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
}
.hero-inner {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-bottom: 1.75rem;
  padding: 0.45rem 1rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(103, 33, 255, 0.2);
  color: var(--muted);
  font-size: 0.875rem; line-height: 1.4; letter-spacing: 0.02em;
}
.badge svg { color: var(--accent); }

.hero-title {
  margin: 0 0 1.25rem;
  display: grid; gap: 0.45rem;
}
.hero-title > h1, .hero-title > p { margin: 0; }
.hero-title-brand {
  /* Latin-only, so tight tracking reads as intentional here. */
  font-size: clamp(2rem, 5.6vw, 3.75rem);
  font-weight: 800; line-height: 1.12; letter-spacing: -0.03em;
  text-wrap: balance;
  background: linear-gradient(115deg, #111827 6%, var(--accent) 52%, var(--blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-title-main {
  font-size: clamp(1.5rem, 3.6vw, 2.25rem);
  font-weight: 700; line-height: 1.5; letter-spacing: 0.02em;
  color: var(--text);
}
.lede {
  max-width: 36rem; margin: 0 auto 2.5rem;
  color: var(--body);
  font-size: clamp(1rem, 1.5vw, 1.075rem);
  line-height: 1.85; letter-spacing: 0.01em;
  text-wrap: balance;
}

/* ---------- Export panel ---------- */
.export-panel { width: 100%; max-width: 680px; margin-inline: auto; }
.export-bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.export-icon { display: inline-flex; color: var(--muted); }
.export-bar input {
  flex: 1 1 auto; min-width: 0;
  border: 0; outline: none; background: transparent;
  padding: 0.85rem 0.25rem;
  font-size: 1rem; line-height: 1.5;
}
.export-bar input::placeholder { color: var(--muted); letter-spacing: 0.01em; }
.export-bar:focus-within {
  border-color: color-mix(in srgb, var(--accent) 45%, white);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow);
}
.btn-export {
  flex: none; height: 48px; padding-inline: 1.4rem; border-radius: 12px;
  font-size: 0.95rem;
}

.hint {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.85rem; line-height: 1.7; word-break: break-all;
}
.quota-bar {
  margin-top: 1rem; padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: center; align-items: center;
  gap: 0.4rem 1.5rem; flex-wrap: wrap;
  color: var(--muted); font-size: 0.9rem;
}
.quota-bar strong { color: var(--text); font-weight: 700; }
.quota-bar a { color: var(--accent); font-weight: 600; }

.status {
  margin-top: 1rem; padding: 0.85rem 1rem; border-radius: 12px;
  background: var(--accent-soft); color: #4c1d95;
  border: 1px solid rgba(103, 33, 255, 0.18);
  font-size: 0.92rem; line-height: 1.7; text-align: left;
}
.status.error {
  background: rgba(225, 29, 72, 0.08); color: #9f1239;
  border-color: rgba(225, 29, 72, 0.2);
}
.status.ok {
  background: rgba(16, 185, 129, 0.1); color: #065f46;
  border-color: rgba(16, 185, 129, 0.2);
}

.export-panel.has-preview {
  max-width: 860px;
  transition: max-width 0.28s ease;
}

.preview {
  margin-top: 1.15rem;
  display: grid;
  gap: 1rem;
  text-align: left;
}

.sheet {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: sheet-in 0.32s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.sheet-glow {
  position: absolute; inset: -20% -10% auto;
  height: 58%;
  background-size: cover; background-position: center;
  filter: blur(48px) saturate(1.15);
  opacity: 0.28;
  pointer-events: none;
}
.sheet-body { position: relative; padding: 1.25rem; }

.sheet-hero {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 1.35rem;
  align-items: start;
}
.sheet-cover-wrap {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 20, 26, 0.16);
}
.sheet-cover {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  background: var(--bg-soft);
}
.sheet-cover-empty {
  background: linear-gradient(145deg, var(--accent), #9b6cff 50%, var(--blue));
}

.sheet-info { min-width: 0; }
.sheet-kicker {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.sheet-info h3 {
  margin: 0 0 0.2rem;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800; line-height: 1.3;
  overflow-wrap: anywhere;
}
.sheet-artist {
  color: var(--body);
  font-size: 0.975rem; font-weight: 600;
}

.sheet-facts {
  display: flex; flex-wrap: wrap; gap: 0.65rem 1.15rem;
  margin: 0.85rem 0 0; padding: 0;
}
.sheet-facts div { min-width: 4.5rem; }
.sheet-facts dt {
  color: var(--muted); font-size: 0.72rem; letter-spacing: 0.04em;
}
.sheet-facts dd {
  margin: 0.05rem 0 0;
  font-size: 0.92rem; font-weight: 600;
}

.sheet-tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin: 0.95rem 0 1.1rem;
}
.sheet-actions {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
}
.sheet-actions .btn-ghost { padding-block: 0.55rem; }
.tag {
  padding: 0.2rem 0.65rem; border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(103, 33, 255, 0.14);
  color: var(--accent);
  font-size: 0.75rem; line-height: 1.55;
}

.sheet-lyrics {
  margin-top: 1.2rem;
  padding: 1rem 1.1rem 1.05rem;
  border-radius: 16px;
  background: rgba(247, 249, 252, 0.86);
  border: 1px solid var(--line);
}
.sheet-lyrics.is-empty {
  color: var(--muted); font-size: 0.9rem; text-align: center;
}
.sheet-lyrics-head h4 {
  margin: 0 0 0.7rem;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.lyrics-scroll {
  max-height: 360px; overflow: auto;
  padding-right: 0.35rem;
}
.lyric-mark {
  margin: 1rem 0 0.35rem;
  color: var(--accent);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.lyric-mark:first-child { margin-top: 0; }
.lyric-line {
  margin: 0;
  color: var(--text);
  font-size: 0.975rem; line-height: 1.85;
}
.lyric-gap { height: 0.55rem; margin: 0; }

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Capability cards ---------- */
.capability-grid {
  list-style: none; padding: 0;
  margin: 3rem auto 0; width: 100%; max-width: 920px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
}
.capability-grid li {
  display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
  padding: 1.4rem 1rem; border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--body);
  font-size: 0.9rem; line-height: 1.65; letter-spacing: 0.01em;
}
.capability-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 1.15rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 0.75rem 1.5rem; flex-wrap: wrap;
}
.footer-copy { line-height: 1.6; }
.footer-side { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.footer-status { display: inline-flex; align-items: center; gap: 0.5rem; }
.footer-links { display: inline-flex; align-items: center; gap: 0.9rem; }
.footer-links a { color: var(--body); font-weight: 600; }
.footer-links a:hover { color: var(--accent); }

/* ---------- SEO content ---------- */
.seo-section {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
}
.seo-section-faq { padding-bottom: clamp(3rem, 7vw, 5rem); }
.seo-inner { max-width: 920px; }
.seo-section h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
}
.seo-lede {
  margin: 0 0 1.6rem;
  color: var(--body);
  max-width: 38rem;
}
.seo-prose { max-width: 760px; }
.seo-prose p {
  color: var(--body);
  font-size: 1rem; line-height: 1.8;
  text-wrap: pretty;
}
.seo-prose p + p { margin-top: 0.9rem; }
.seo-prose a { color: var(--accent); font-weight: 600; }
.seo-prose code { font-size: 0.9em; color: var(--accent); }
.how-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
}
.how-grid li {
  padding: 1.25rem 1.15rem 1.3rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.how-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin-bottom: 0.7rem;
  border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 0.8rem; font-weight: 800;
}
.how-grid h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}
.how-grid p, .faq-list p {
  margin: 0;
  color: var(--body);
  font-size: 0.95rem;
  line-height: 1.75;
}
.how-grid code, .faq-list code {
  font-size: 0.86em;
  color: var(--accent);
  word-break: break-all;
}
.faq-list { display: grid; gap: 0.7rem; margin-top: 1.25rem; }
.faq-list details {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  padding: 0.15rem 1.1rem 0.15rem;
}
.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 0;
  font-weight: 700;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list details[open] summary { padding-bottom: 0.35rem; }
.faq-list details p { padding-bottom: 1rem; }

/* ---------- Legal pages ---------- */
.legal { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.legal-inner { max-width: 760px; }
.legal-head { margin-bottom: 2.25rem; }
.legal-head h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 800; line-height: 1.2;
}
.legal-updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.1rem; }
.legal-lede { margin: 0; max-width: none; text-align: left; text-wrap: pretty; }
.legal section { margin-bottom: 2rem; }
.legal h2 {
  margin: 0 0 0.7rem;
  font-size: 1.3rem;
}
.legal h3 {
  margin: 1.1rem 0 0.35rem;
  font-size: 1.02rem;
  color: var(--text);
}
.legal p, .legal li {
  color: var(--body);
  font-size: 0.98rem;
  line-height: 1.8;
}
.legal p + p { margin-top: 0.75rem; }
.legal ul { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.45rem; }
.legal a { color: var(--accent); font-weight: 600; }
.legal code { font-size: 0.9em; color: var(--accent); }
.legal-foot {
  margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.9rem;
}

/* ---------- Blog ---------- */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: var(--muted); font-size: 0.875rem;
}
.crumbs a { color: var(--body); font-weight: 600; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] {
  max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.blog { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.blog-inner { max-width: 860px; }
.blog-head { margin-bottom: 2.25rem; }
.blog-head h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  font-weight: 800; line-height: 1.2;
}
.blog-lede { margin: 0; max-width: 40rem; text-align: left; text-wrap: pretty; }
.blog-empty { color: var(--muted); }

.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.post-card {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.post-card-link {
  display: grid; grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.25rem; align-items: center;
  padding: 1rem;
}
.post-card-cover {
  width: 100%; height: auto; aspect-ratio: 40 / 21;
  object-fit: cover; border-radius: 12px;
  border: 1px solid var(--line);
}
.post-card-body { min-width: 0; padding: 0.25rem 0.35rem 0.25rem 0; }
.post-card h2 {
  margin: 0.35rem 0 0.45rem;
  font-size: 1.25rem; line-height: 1.35;
}
.post-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  color: var(--muted); font-size: 0.85rem;
}
.post-excerpt { color: var(--body); font-size: 0.95rem; line-height: 1.7; }
.post-author a { color: var(--text); font-weight: 600; }
.post-author a:hover { color: var(--accent); }
.post-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }

.post { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.post-inner { max-width: 740px; }
.post-head { margin-bottom: 1.75rem; }
.post-head h1 {
  margin: 0.5rem 0 0.75rem;
  font-size: clamp(1.9rem, 4.6vw, 2.7rem);
  font-weight: 800; line-height: 1.2;
  text-wrap: balance;
}
.post-lede { color: var(--body); font-size: 1.05rem; line-height: 1.75; text-wrap: pretty; }
.post-cover {
  margin: 0 0 2rem;
  border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.post-cover img { display: block; width: 100%; height: auto; }

.prose { color: var(--body); font-size: 1.02rem; line-height: 1.85; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 {
  margin-top: 2.4rem; margin-bottom: 0.6rem;
  font-size: 1.45rem; color: var(--text);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.prose h3 {
  margin-top: 1.8rem; margin-bottom: 0.4rem;
  font-size: 1.12rem; color: var(--text);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.prose p { margin: 0; }
.prose p + p { margin-top: 1.1rem; }
.prose a { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(103, 33, 255, 0.35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.4rem; display: grid; gap: 0.45rem; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose strong { color: var(--text); }
.prose code {
  padding: 0.12rem 0.4rem; border-radius: 6px;
  background: rgba(103, 33, 255, 0.08); color: #4c1d95;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em;
  overflow-wrap: anywhere;
}
.prose pre {
  padding: 1rem 1.1rem; border-radius: 14px; overflow: auto;
  background: #16182a; color: #e6e8f2;
  font-size: 0.9rem; line-height: 1.65;
}
.prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.prose blockquote {
  margin: 1.25rem 0; padding: 0.85rem 1.1rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: rgba(103, 33, 255, 0.06);
  color: var(--text);
}
.prose blockquote p { margin: 0; }
.prose img { border-radius: 14px; border: 1px solid var(--line); }
.prose figure.shot { margin: 1.4rem 0; }
.prose figure.shot img {
  display: block; width: 100%; height: auto;
  box-shadow: var(--shadow-sm);
}
.prose figure.shot-narrow img { width: min(300px, 100%); margin-inline: auto; }
.prose figure.shot figcaption {
  margin-top: 0.6rem;
  color: var(--muted); font-size: 0.88rem; line-height: 1.6; text-align: center;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; }
.prose .callout {
  padding: 1rem 1.15rem; border-radius: 14px;
  background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.22);
  color: #065f46;
}
.prose .callout.warn {
  background: rgba(245, 158, 11, 0.09); border-color: rgba(245, 158, 11, 0.28);
  color: #78350f;
}
.prose .callout p { margin: 0; }
.prose .callout p + p { margin-top: 0.5rem; }

.post-cta {
  margin-top: 3rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem;
  padding: 1.5rem 1.6rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(103, 33, 255, 0.08), rgba(79, 156, 255, 0.08));
  border: 1px solid rgba(103, 33, 255, 0.18);
}
.post-cta h2 { margin: 0.2rem 0 0.35rem; font-size: 1.3rem; }
.post-cta p { color: var(--body); font-size: 0.95rem; max-width: 34rem; }
.post-foot {
  margin-top: 2rem; padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.9rem;
}
.post-foot a { color: var(--accent); font-weight: 600; }

/* ---------- 404 ---------- */
.notfound-actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

/* ---------- Login modal ---------- */
body.modal-open { overflow: hidden; }
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 1rem;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 20, 26, 0.45);
  backdrop-filter: blur(4px);
  animation: fade-in 0.18s ease both;
}
.modal-card {
  position: relative;
  width: min(400px, 100%);
  padding: 2.25rem 1.75rem 2rem;
  border-radius: 20px; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 30px 70px rgba(15, 20, 26, 0.22);
  animation: modal-rise 0.22s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.modal-close {
  position: absolute; top: 0.85rem; right: 0.85rem;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--muted);
  transition: background .2s ease, color .2s ease;
}
.modal-close:hover { background: rgba(15, 20, 26, 0.06); color: var(--text); }
.modal-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin-bottom: 1.1rem;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--accent), #9b6cff 55%, var(--blue));
  color: #fff;
  box-shadow: 0 12px 28px rgba(103, 33, 255, 0.3);
}
.modal-title {
  margin: 0 0 0.35rem;
  font-size: 1.5rem; line-height: 1.4; letter-spacing: 0.01em;
}
.modal-sub {
  color: var(--muted); font-size: 0.925rem; line-height: 1.7;
}
.modal-fine {
  margin-top: 0.9rem;
  color: var(--muted); font-size: 0.8rem; line-height: 1.7;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modal-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- Login ---------- */
.login-section {
  min-height: calc(100svh - var(--header-h) - var(--footer-h));
  display: grid; place-items: center;
  padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1rem, 4vw, 2rem);
}
.login-card {
  width: min(440px, 100%); padding: 2.25rem 1.75rem;
  border-radius: 18px; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.login-card .brand { justify-content: center; margin-bottom: 1.15rem; }
.login-card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.55rem; line-height: 1.5; letter-spacing: 0.01em;
}
.login-card .lede { margin-bottom: 0.5rem; font-size: 0.975rem; }
.google-auth {
  margin: 1.5rem 0 0;
  min-height: 44px;
}
.google-btn-wrap {
  display: flex; justify-content: center;
  min-height: 44px;
}
.google-signing {
  display: flex; align-items: center; justify-content: center; gap: 0.65rem;
  min-height: 44px; padding: 0 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #eef1f5;
  color: var(--muted);
  font-weight: 600; font-size: 0.95rem;
}
.google-signing[hidden] { display: none; }
.google-signing-spinner {
  width: 18px; height: 18px; flex: none;
  border: 2px solid rgba(15, 20, 26, 0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: google-spin 0.7s linear infinite;
}
@keyframes google-spin { to { transform: rotate(360deg); } }
.modal.is-signing-in .modal-close {
  opacity: 0.35; pointer-events: none;
}
.modal.is-signing-in .modal-backdrop { pointer-events: none; }
.modal .status { margin-top: 1rem; text-align: center; }
.admin-login-form { display: grid; gap: 0.9rem; margin-top: 1.3rem; text-align: left; }
.admin-login-form label {
  display: grid; gap: 0.4rem;
  color: var(--muted); font-size: 0.9rem;
}
.admin-login-form input {
  width: 100%; min-height: 50px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
  padding: 0.75rem 1rem; outline: none;
}
.admin-login-form input:focus {
  border-color: color-mix(in srgb, var(--accent) 45%, white);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.admin-login-body { background: var(--bg); min-height: 100vh; }

/* ---------- Admin ---------- */
.admin-body { background: var(--bg-soft); }
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-nav {
  padding: 1.3rem 1rem; border-right: 1px solid var(--line);
  background: #fff; display: flex; flex-direction: column; gap: 0.35rem;
}
.admin-nav .brand { margin-bottom: 1rem; }
.admin-label {
  margin: 0.4rem 0; color: var(--muted); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.admin-nav a { padding: 0.62rem 0.75rem; border-radius: 10px; color: var(--body); }
.admin-nav a.active, .admin-nav a:hover { background: var(--accent-soft); color: var(--accent); }
.admin-who { margin-top: auto; color: var(--muted); font-size: 0.85rem; }
.admin-account .status,
.admin-panel .status { margin: 0 0 1rem; }
.admin-form { display: grid; gap: 0.95rem; max-width: 420px; }
.admin-form label { display: grid; gap: 0.4rem; color: var(--muted); font-size: 0.9rem; }
.admin-form input {
  width: 100%; min-height: 48px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
  padding: 0.7rem 0.95rem; outline: none; color: var(--text);
}
.admin-form input:focus {
  border-color: color-mix(in srgb, var(--accent) 45%, white);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.admin-form .btn { justify-self: start; margin-top: 0.2rem; }
.admin-main { padding: 1.5rem clamp(1rem, 3vw, 2rem) 2.5rem; }
.admin-header h1 { margin: 0 0 0.3rem; font-size: 1.6rem; }
.admin-header p { margin-bottom: 1.4rem; color: var(--muted); }
.stat-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem; margin-bottom: 1.4rem;
}
.stat, .admin-panel {
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.stat { padding: 1.1rem 1.15rem; border-radius: 14px; }
.stat-label { display: block; margin-bottom: 0.3rem; color: var(--muted); font-size: 0.85rem; }
.stat strong { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.admin-panel { border-radius: 14px; padding: 1.1rem; }
.admin-panel h2 { margin: 0 0 0.85rem; font-size: 1.05rem; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td {
  text-align: left; padding: 0.75rem 0.55rem;
  border-bottom: 1px solid var(--line); vertical-align: top;
  line-height: 1.6;
}
th { color: var(--muted); font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; }
.truncate { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.actions form { display: inline; }
.pill {
  display: inline-block; padding: 0.15rem 0.55rem;
  border-radius: 999px; font-size: 0.75rem;
  background: rgba(15, 20, 26, 0.06);
}
.pill.ok { background: rgba(16, 185, 129, 0.12); color: #047857; }
.pill.error { background: rgba(225, 29, 72, 0.1); color: #be123c; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .how-grid { grid-template-columns: 1fr; }
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav {
    flex-direction: row; flex-wrap: wrap; align-items: center;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .admin-who { margin: 0; }
}
@media (max-width: 700px) {
  .nav-user { display: none; }
  .post-card-link { grid-template-columns: 1fr; }
  .post-card-body { padding: 0 0.25rem 0.25rem; }
  .brand { font-size: 0.95rem; }
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; }
}
@media (max-width: 720px) {
  .sheet-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .sheet-cover-wrap { width: min(220px, 70vw); }
  .sheet-facts { justify-content: center; }
  .sheet-tags { justify-content: center; }
  .sheet-actions { justify-content: center; }
  .sheet-lyrics { text-align: left; }
}
@media (max-width: 560px) {
  .capability-grid { grid-template-columns: 1fr; }
  .export-bar { flex-wrap: wrap; padding: 0.75rem; row-gap: 0.6rem; }
  .export-bar input { flex-basis: calc(100% - 2rem); }
  .btn-export { width: 100%; }
  .sheet-body { padding: 1rem; }
}
