:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --surface: #13171c;
  --surface-2: #191e24;
  --line: #272e36;
  --line-strong: #3a434e;
  --text: #f4f4f1;
  --muted: #aeb5be;
  --faint: #717a85;
  --accent: #aebcff;
  --accent-soft: #202641;
  --warm: #f0ae79;
  --green: #78b187;
  --paper: #fffdf8;
  --paper-ink: #1a1b1d;
  font-family: "Manrope", "Noto Sans SC", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; color: var(--text); background: radial-gradient(circle at 84% -8%, rgba(174,188,255,.09), transparent 33%), var(--bg); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid rgba(174,188,255,.34); outline-offset: 3px; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.studio-topbar { position: sticky; top: 0; z-index: 20; height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 clamp(20px, 5vw, 72px); border-bottom: 1px solid rgba(255,255,255,.07); background: rgba(11,13,16,.88); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 156px; height: 64px; display: block; object-fit: contain; object-position: left center; }
.brand-logo-inverse { filter: invert(1) brightness(1.12); }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; color: #0c1020; background: var(--accent); }
.brand-mark svg { width: 26px; stroke-width: 4.3; }
.brand strong { display: flex; align-items: baseline; gap: 6px; font-size: 15px; font-weight: 800; letter-spacing: -.025em; }
.brand strong b { color: var(--accent); font-size: 10px; letter-spacing: .12em; }
.brand small { display: block; margin-top: 4px; color: var(--faint); font-size: 8px; font-weight: 800; letter-spacing: .19em; }
.library-link { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--muted); background: rgba(255,255,255,.025); font-size: 11px; font-weight: 700; }
.library-link:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.library-link svg { width: 17px; }

main { width: min(1320px, calc(100% - 40px)); margin: 0 auto; }
.studio-hero { min-height: 520px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .7fr); align-items: center; gap: clamp(48px, 9vw, 130px); padding: 66px 38px 58px; border-bottom: 1px solid var(--line); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--faint); font-size: 9px; font-weight: 800; letter-spacing: .17em; }
.eyebrow span:first-child { color: var(--accent); }
.eyebrow i { width: 24px; height: 1px; background: var(--line-strong); }
.hero-copy h1 { max-width: 690px; margin: 0; font: 700 clamp(44px, 5.8vw, 76px)/1.03 "Noto Serif SC", serif; letter-spacing: -.055em; }
.hero-copy h1 em { color: var(--accent); font-style: normal; }
.hero-copy > p:not(.eyebrow) { max-width: 600px; margin: 24px 0 30px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.create-score-button { width: min(100%, 360px); min-height: 72px; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 13px; padding: 10px 16px 10px 12px; border: 1px solid rgba(174,188,255,.45); border-radius: 11px; text-align: left; color: var(--text); background: linear-gradient(135deg, rgba(174,188,255,.17), rgba(174,188,255,.065)); cursor: pointer; transition: transform 170ms ease, border-color 170ms ease, background 170ms ease; }
.create-score-button:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--accent-soft); }
.create-score-button .plus { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 9px; color: #0c1020; background: var(--accent); font-size: 27px; font-weight: 500; }
.create-score-button strong, .create-score-button small { display: block; }
.create-score-button strong { font-size: 14px; }
.create-score-button small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.create-score-button > b { color: var(--accent); font-size: 24px; font-weight: 400; }

.hero-score { position: relative; min-height: 365px; padding: 34px 38px; overflow: hidden; color: var(--paper-ink); background: var(--paper); border-radius: 3px; box-shadow: 0 34px 80px rgba(0,0,0,.34); transform: rotate(1.4deg); }
.hero-score::after { content: ""; position: absolute; right: -55px; bottom: -75px; width: 210px; height: 210px; border: 1px solid rgba(39,53,73,.09); border-radius: 50%; box-shadow: 0 0 0 24px rgba(39,53,73,.035), 0 0 0 49px rgba(39,53,73,.025); }
.paper-label { display: flex; justify-content: space-between; color: #8b8d8e; font-size: 7px; font-weight: 800; letter-spacing: .16em; }
.paper-label b { color: #4f647f; }
.paper-title { width: 58%; height: 16px; margin: 34px auto 14px; border-radius: 2px; background: #2c2e31; opacity: .88; }
.paper-meta { margin-bottom: 32px; color: #67696b; text-align: center; font-size: 9px; }
.notation-row { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 13px 0 18px; border-bottom: 1px solid #deddd8; font-size: 24px; font-weight: 600; text-align: center; }
.notation-row i { position: absolute; left: 10%; right: 52%; bottom: 15px; height: 2px; background: #242629; }
.notation-row.second { margin-top: 10px; }
.notation-row.second i { left: 52%; right: 10%; }
.paper-lyrics { width: 74%; height: 5px; margin: 25px auto 0; background: #d2d0c9; }
.paper-lyrics.short { width: 52%; margin-top: 10px; }
.paper-sign { position: absolute; left: 38px; bottom: 26px; color: #a3a19a; font-size: 7px; font-weight: 700; letter-spacing: .1em; }

.draft-workspace { padding: 46px 38px 80px; }
.workspace-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.workspace-head p { margin: 0 0 5px; color: var(--warm); font-size: 9px; font-weight: 800; letter-spacing: .17em; }
.workspace-head h2 { margin: 0; font-size: 30px; letter-spacing: -.035em; }
.draft-search { width: min(390px, 44vw); height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); }
.draft-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(174,188,255,.13); }
.draft-search svg { width: 18px; color: var(--faint); }
.draft-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; }
.draft-search input::placeholder { color: var(--faint); }

.stats-strip { min-height: 76px; display: grid; grid-template-columns: repeat(3, minmax(120px, 160px)) 1fr; align-items: stretch; margin-bottom: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-strip > div { display: grid; align-content: center; padding: 12px 22px 12px 0; }
.stats-strip > div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.stats-strip span { color: var(--faint); font-size: 9px; }
.stats-strip strong { margin-top: 4px; color: var(--accent); font-size: 17px; font-variant-numeric: tabular-nums; }
.stats-strip > p { align-self: center; justify-self: end; display: flex; align-items: center; gap: 8px; margin: 0; color: var(--faint); font-size: 10px; }
.save-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(120,177,135,.12); }

.draft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); gap: 14px; }
.draft-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.draft-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 16px 38px rgba(0,0,0,.24); }
.draft-preview { min-height: 150px; padding: 23px 24px; color: var(--paper-ink); background: var(--paper); }
.draft-preview-head { display: flex; justify-content: space-between; margin-bottom: 26px; color: #92918d; font-size: 7px; font-weight: 800; letter-spacing: .13em; }
.draft-preview-head b { color: #526a86; }
.preview-notes { min-height: 39px; display: flex; align-items: baseline; gap: clamp(8px, 2vw, 18px); overflow: hidden; padding-bottom: 11px; border-bottom: 1px solid #dfded9; font-size: 20px; font-weight: 600; white-space: nowrap; }
.preview-notes i { width: 22px; height: 1.5px; margin-left: -4px; background: currentColor; }
.preview-empty { color: #a5a39e; font: 500 12px "Noto Sans SC", sans-serif; }
.draft-body { padding: 16px; }
.draft-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.draft-title-row h3 { min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.draft-title-row span { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 8px; font-weight: 700; }
.draft-meta { margin: 8px 0 15px; color: var(--faint); font-size: 9px; }
.continue-button { width: 100%; height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: var(--surface-2); cursor: pointer; font-size: 11px; font-weight: 700; }
.continue-button:hover { color: #0d1120; border-color: var(--accent); background: var(--accent); }
.continue-button span:last-child { font-size: 17px; font-weight: 400; }

.draft-empty { min-height: 290px; display: grid; place-items: center; align-content: center; gap: 10px; padding: 40px; border: 1px dashed var(--line-strong); border-radius: 12px; text-align: center; }
.empty-mark { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); background: var(--accent-soft); font-size: 23px; }
.draft-empty h3 { margin: 4px 0 0; font-size: 17px; }
.draft-empty p { margin: 0 0 8px; color: var(--muted); font-size: 11px; }
.draft-empty button { height: 42px; padding: 0 16px; border: 0; border-radius: 8px; color: #0c1020; background: var(--accent); cursor: pointer; font-weight: 750; }

footer { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 max(20px, calc((100vw - 1240px) / 2)); border-top: 1px solid var(--line); color: var(--faint); font-size: 9px; }
.studio-toast { position: fixed; left: 50%; bottom: 24px; z-index: 30; padding: 11px 15px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: var(--surface-2); box-shadow: 0 14px 44px rgba(0,0,0,.38); opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity 160ms ease, transform 160ms ease; font-size: 11px; }
.studio-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  main { width: min(100% - 24px, 760px); }
  .studio-hero { grid-template-columns: 1fr; gap: 46px; padding: 50px 18px; }
  .hero-score { width: min(100%, 520px); justify-self: center; }
  .draft-workspace { padding: 38px 18px 70px; }
  .stats-strip { grid-template-columns: repeat(3, 1fr); }
  .stats-strip > p { grid-column: 1 / -1; justify-self: start; padding: 12px 0; border-top: 1px solid var(--line); }
}

@media (max-width: 620px) {
  .studio-topbar { height: 66px; padding: 0 14px; }
  .brand-logo { width: 126px; height: 54px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-copy small { display: none; }
  .library-link { width: 42px; padding: 0; justify-content: center; }
  .library-link span { display: none; }
  main { width: 100%; }
  .studio-hero { min-height: auto; padding: 40px 18px 44px; }
  .eyebrow { font-size: 7px; }
  .hero-copy h1 { font-size: clamp(38px, 12vw, 52px); }
  .hero-copy > p:not(.eyebrow) { margin-top: 19px; font-size: 12px; }
  .hero-score { min-height: 310px; padding: 28px 24px; transform: none; }
  .workspace-head { align-items: stretch; flex-direction: column; }
  .draft-search { width: 100%; }
  .stats-strip { grid-template-columns: repeat(3, 1fr); }
  .stats-strip > div { padding: 12px 8px; }
  .stats-strip > div + div { padding-left: 12px; }
  .stats-strip strong { font-size: 14px; }
  .draft-grid { grid-template-columns: 1fr; }
  footer { padding: 18px; flex-direction: column; justify-content: center; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
