:root {
  color-scheme: dark;
  --ink: #f4f5fb;
  --muted: #9da4bd;
  --faint: #717993;
  --canvas: #0b1020;
  --canvas-soft: #11172a;
  --panel: #151c31;
  --panel-raised: #1a223a;
  --line: rgba(196, 202, 235, .12);
  --line-strong: rgba(196, 202, 235, .22);
  --purple: #a28cff;
  --purple-bright: #c1b4ff;
  --purple-soft: rgba(162, 140, 255, .15);
  --peach: #ffb59d;
  --blue: #75c7ef;
  --green: #84d8ad;
  --red: #ff8e9c;
  --shadow: 0 18px 50px rgba(0, 0, 0, .22);
  --radius: 18px;
  --radius-small: 11px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; overflow-x: hidden; background: var(--canvas); color: var(--ink); font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-small); background: rgba(8, 12, 27, .42); color: var(--ink); outline: none; }
input, select { min-height: 46px; padding: 0 14px; }
textarea { min-height: 110px; padding: 13px 14px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #626b87; }
input:focus, select:focus, textarea:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
select option { background: #151c31; color: var(--ink); }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(25, 32, 56, .98), rgba(17, 23, 42, .98)); box-shadow: var(--shadow); }

.brand { display: inline-flex; min-height: 44px; align-items: center; gap: 9px; font-size: 18px; font-weight: 750; letter-spacing: -.03em; }
.brand-mark { display: inline-grid; width: 27px; height: 27px; place-items: center; border-radius: 9px; background: linear-gradient(135deg, #b8a9ff, #7260d6); color: #17142d; font-size: 17px; box-shadow: 0 7px 18px rgba(145, 117, 255, .25); }
.brand-large { font-size: 24px; }
.brand-large .brand-mark { width: 34px; height: 34px; border-radius: 11px; font-size: 21px; }
.eyebrow { margin: 0 0 8px; color: var(--purple-bright); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(30px, 4vw, 42px); line-height: 1.08; letter-spacing: -.05em; }
h2 { margin-bottom: 4px; font-size: 17px; line-height: 1.25; letter-spacing: -.02em; }
h3 { font-size: 14px; }
.section-subtitle, .panel-heading p { margin-bottom: 0; color: var(--muted); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }

.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 9px; padding: 0 17px; border-radius: 10px; color: var(--ink); font-weight: 750; letter-spacing: -.01em; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { background: linear-gradient(135deg, #a595ff, #7968dc); color: #16132c; box-shadow: 0 10px 24px rgba(122, 102, 221, .2); }
.button-primary:hover { background: linear-gradient(135deg, #b3a5ff, #8877eb); }
.button-secondary { border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .035); }
.button-secondary:hover, .button-quiet:hover { border-color: var(--purple); background: var(--purple-soft); }
.button-quiet { min-height: 44px; border: 1px solid transparent; background: transparent; color: var(--muted); }
.button-wide { width: 100%; }
.text-button { display: inline-flex; min-height: 44px; align-items: center; gap: 7px; padding: 0; background: transparent; color: var(--purple-bright); font-size: 13px; font-weight: 750; }
.text-button:hover { color: #fff; }
.round-button, .icon-button { display: inline-grid; min-width: 44px; min-height: 44px; place-items: center; border-radius: 12px; background: var(--purple-soft); color: var(--purple-bright); font-size: 21px; }
.round-button:hover, .icon-button:hover { background: rgba(162, 140, 255, .25); }
.icon-button { border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 15px; }
.avatar { display: grid; width: 44px; height: 44px; place-items: center; border: 2px solid rgba(177, 160, 255, .52); border-radius: 50%; background: var(--purple-soft); color: var(--purple-bright); font-weight: 800; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(132, 216, 173, .1); }
.pill { display: inline-flex; min-height: 28px; align-items: center; gap: 7px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.pill-muted { border: 1px solid var(--line); background: rgba(255, 255, 255, .035); color: var(--muted); }
.pill-safe { border: 1px solid rgba(132, 216, 173, .22); background: rgba(132, 216, 173, .09); color: var(--green); }
.pill-warn { border: 1px solid rgba(255, 181, 157, .23); background: rgba(255, 181, 157, .09); color: var(--peach); }

.login-view { position: relative; display: grid; min-height: 100vh; place-items: center; overflow: hidden; padding: 28px; background: radial-gradient(circle at 16% 20%, rgba(108, 81, 190, .2), transparent 32%), radial-gradient(circle at 88% 80%, rgba(70, 109, 175, .18), transparent 34%), var(--canvas); }
.login-art { position: absolute; inset: 0; pointer-events: none; opacity: .82; }
.orb { position: absolute; border-radius: 50%; filter: blur(1px); }
.orb-one { top: 10%; left: 12%; width: 24vw; height: 24vw; min-width: 180px; min-height: 180px; background: radial-gradient(circle at 35% 35%, rgba(181, 155, 255, .62), rgba(76, 55, 162, .04) 68%); }
.orb-two { right: 11%; bottom: 3%; width: 31vw; height: 31vw; min-width: 220px; min-height: 220px; background: radial-gradient(circle at 55% 45%, rgba(91, 184, 232, .3), rgba(31, 44, 101, .03) 69%); }
.wave { position: absolute; width: 80vw; height: 30vw; border: 1px solid rgba(181, 165, 255, .19); border-radius: 50%; transform: rotate(-18deg); }
.wave-one { top: 12%; left: -25%; }
.wave-two { right: -33%; bottom: 0; transform: rotate(18deg); border-color: rgba(117, 199, 239, .15); }
.login-card { position: relative; width: min(100%, 470px); padding: 46px; background: rgba(16, 22, 42, .84); backdrop-filter: blur(16px); }
.login-card h1 { margin-top: 26px; font-size: clamp(37px, 6vw, 55px); }
.login-card h1 em { color: var(--purple-bright); font-style: normal; }
.lede { max-width: 360px; margin-bottom: 29px; color: var(--muted); font-size: 16px; }
.stack-form { display: grid; gap: 10px; }
.stack-form label, .settings-form label, .studio-form label, .editor-form label { color: #d7d9e8; font-size: 12px; font-weight: 750; }
.input-with-action { position: relative; }
.input-with-action input { padding-right: 52px; }
.input-with-action .icon-button { position: absolute; top: 1px; right: 1px; color: var(--faint); }
.stack-form .button { margin-top: 10px; }
.form-error { margin: 2px 0 0; color: var(--red); font-size: 12px; }
.privacy-note { display: flex; align-items: center; gap: 9px; margin: 31px 0 0; color: var(--faint); font-size: 11px; }

.topbar { position: sticky; z-index: 20; top: 0; padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--line); background: rgba(11, 16, 32, .88); backdrop-filter: blur(16px); }
.topbar-inner { display: flex; height: 70px; align-items: center; gap: 17px; max-width: 1600px; margin: 0 auto; padding: 0 32px; }
.topbar-spacer { flex: 1; }
.topbar-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.workspace-layout { display: flex; min-height: calc(100vh - 70px); margin: 0 auto; }
.sidebar { display: flex; width: 230px; flex: 0 0 230px; flex-direction: column; border-right: 1px solid var(--line); padding: 30px 17px 24px; }
.nav-list { display: flex; flex-direction: column; gap: 5px; }
.nav-label { margin: 0 12px 8px; color: var(--faint); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.nav-label-spaced { margin-top: 31px; }
.nav-item { display: flex; min-height: 44px; align-items: center; gap: 12px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 650; }
.nav-item:hover { background: rgba(255, 255, 255, .04); color: var(--ink); }
.nav-item.active { border-color: rgba(162, 140, 255, .18); background: var(--purple-soft); color: var(--purple-bright); }
.nav-icon { display: grid; width: 19px; place-items: center; color: currentColor; font-size: 17px; }
.nav-badge { margin-left: auto; padding: 2px 6px; border-radius: 5px; background: rgba(132, 216, 173, .12); color: var(--green); font-size: 9px; text-transform: uppercase; }
.sidebar-footer { margin-top: auto; }
.privacy-card { display: flex; align-items: center; gap: 10px; padding: 13px 11px; border: 1px solid rgba(132, 216, 173, .16); border-radius: 12px; background: rgba(132, 216, 173, .055); }
.privacy-lock { color: var(--green); font-size: 17px; }
.privacy-card strong, .privacy-card small { display: block; }
.privacy-card strong { color: #c4ead4; font-size: 11px; }
.privacy-card small { margin-top: 2px; color: var(--faint); font-size: 10px; }
.version-label { margin: 17px 4px 0; color: var(--faint); font-size: 10px; }
.version-label span { float: right; color: var(--green); }
.main-content { position: relative; width: 100%; min-width: 0; padding: 46px clamp(20px, 4vw, 62px) 70px; }
.page-section { width: min(100%, 1200px); margin: 0 auto; }
.page-heading { margin-bottom: 32px; }
.heading-with-action { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.heading-with-action .button { flex: 0 0 auto; }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { display: flex; align-items: center; gap: 15px; min-height: 123px; padding: 22px; }
.stat-icon { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border-radius: 14px; font-size: 23px; }
.stat-icon.purple { background: rgba(162, 140, 255, .14); color: var(--purple-bright); }
.stat-icon.peach { background: rgba(255, 181, 157, .13); color: var(--peach); }
.stat-icon.blue { background: rgba(117, 199, 239, .13); color: var(--blue); }
.stat-label, .stat-card strong, .stat-card small { display: block; }
.stat-label { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.stat-card strong { font-size: 27px; line-height: 1; letter-spacing: -.05em; }
.stat-card small { margin-top: 7px; color: var(--faint); font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .85fr); gap: 22px; }
.recent-panel, .profile-panel { min-width: 0; padding: 25px; }
.profile-panel .panel-heading { align-items: center; }
.artists-summary-panel { margin-top: 22px; padding: 25px; }
.artist-summary-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 19px; }
.artist-summary-item { display: inline-flex; min-height: 44px; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .025); color: var(--muted); font-size: 12px; }
.artist-summary-item strong { color: var(--ink); }
.draft-list, .profile-list, .management-list, .artist-list { margin-top: 22px; }
.draft-row { display: flex; min-width: 0; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.draft-row:first-child { padding-top: 0; }
.draft-row:last-child { padding-bottom: 0; border-bottom: 0; }
.draft-row:hover .draft-title { color: var(--purple-bright); }
.draft-art { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 11px; background: linear-gradient(145deg, rgba(162, 140, 255, .25), rgba(91, 112, 199, .14)); color: var(--purple-bright); font-size: 18px; }
.draft-meta { min-width: 0; flex: 1; }
.draft-title { overflow: hidden; color: #e9eaf4; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; transition: color .18s ease; }
.draft-subtitle { overflow: hidden; margin-top: 3px; color: var(--faint); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.draft-score { text-align: right; }
.draft-score strong { display: block; font-size: 13px; }
.draft-score small { color: var(--faint); font-size: 10px; }
.score-pass { color: var(--green); }
.score-fail { color: var(--peach); }
.profile-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.profile-item:last-child { border-bottom: 0; }
.profile-avatar { display: grid; width: 37px; height: 37px; flex: 0 0 37px; place-items: center; border-radius: 11px; background: rgba(162, 140, 255, .13); color: var(--purple-bright); font-weight: 800; }
.profile-name { flex: 1; font-size: 13px; font-weight: 700; }
.profile-name small { display: block; margin-top: 3px; color: var(--faint); font-size: 10px; font-weight: 500; }
.profile-language { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.privacy-banner, .corpus-note { display: flex; align-items: center; gap: 15px; margin-top: 22px; padding: 18px 21px; border-color: rgba(132, 216, 173, .16); background: linear-gradient(110deg, rgba(132, 216, 173, .075), rgba(25, 32, 56, .98)); }
.privacy-banner > div:nth-child(2), .corpus-note > div:nth-child(2) { flex: 1; }
.privacy-banner h2, .corpus-note h2 { color: #c5ead4; font-size: 14px; }
.privacy-banner p, .corpus-note p { max-width: 720px; margin: 0; color: var(--muted); font-size: 12px; }
.banner-icon { display: grid; width: 39px; height: 39px; flex: 0 0 39px; place-items: center; border-radius: 12px; background: rgba(132, 216, 173, .12); color: var(--green); font-size: 20px; }

.settings-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .7fr); gap: 22px; }
.settings-card, .info-card, .profiles-management { padding: 26px; }
.settings-card .panel-heading { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.settings-form { display: grid; max-width: 650px; gap: 9px; padding-top: 24px; }
.settings-form .field-help { margin: -3px 0 8px; }
.field-help { color: var(--faint); font-size: 11px; }
.optional-label { color: var(--faint); font-size: 10px; font-weight: 500; }
.form-actions { display: flex; align-items: center; gap: 13px; margin-top: 13px; }
.inline-message { color: var(--green); font-size: 12px; }
.info-card { background: linear-gradient(160deg, rgba(49, 42, 85, .9), rgba(17, 23, 42, .98)); }
.info-icon { display: grid; width: 45px; height: 45px; margin-bottom: 20px; place-items: center; border-radius: 14px; background: rgba(162, 140, 255, .16); color: var(--purple-bright); font-size: 22px; }
.info-card p { color: var(--muted); font-size: 13px; }
.info-list { margin: 27px 0 0; }
.info-list div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.info-list dt { color: var(--faint); font-size: 11px; }
.info-list dd { margin: 0; color: #dfe1ee; font-size: 11px; font-weight: 700; }
.profiles-management { margin-top: 22px; }
.management-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.management-item { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .025); }
.management-item .profile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.management-item .icon-button { margin-left: auto; }

.corpus-layout { display: grid; grid-template-columns: minmax(225px, .65fr) minmax(0, 1.35fr); gap: 22px; align-items: start; }
.artist-panel, .lyric-panel { min-width: 0; padding: 25px; }
.artist-list { display: grid; gap: 7px; }
.artist-button { display: flex; width: 100%; min-height: 56px; align-items: center; gap: 12px; padding: 9px 11px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--muted); text-align: left; }
.artist-button:hover { background: rgba(255, 255, 255, .035); color: var(--ink); }
.artist-button.active { border-color: rgba(162, 140, 255, .2); background: var(--purple-soft); color: var(--purple-bright); }
.artist-folder-icon { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; background: rgba(117, 199, 239, .11); color: var(--blue); }
.artist-button strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.artist-button small { display: block; margin-top: 2px; color: var(--faint); font-size: 10px; }
.artist-button .arrow { margin-left: auto; color: var(--faint); }
.detail-heading { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.detail-heading .heading-actions { display: flex; align-items: center; gap: 6px; }
.lyric-management { display: grid; gap: 15px; margin-top: 20px; }
.lyric-entry { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .022); }
.lyric-entry-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.lyric-entry-heading strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lyric-entry-heading small { display: block; margin-top: 3px; color: var(--faint); font-size: 10px; }
.lyric-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.danger-button { min-height: 44px; padding: 0 11px; border-radius: 9px; background: transparent; color: var(--red); font-size: 12px; font-weight: 700; }
.danger-button:hover { background: rgba(255, 142, 156, .1); }
.add-lyric { margin-top: 19px; padding-top: 19px; border-top: 1px solid var(--line); }
.add-lyric h3 { margin-bottom: 10px; }
.add-lyric-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.corpus-note { margin-top: 22px; }

.workspace-grid, .studio-layout { display: grid; grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr); gap: 22px; align-items: start; }
.editor-card, .verdict-card, .studio-controls, .studio-result { min-width: 0; padding: 25px; }
.editor-card .panel-heading, .studio-controls .panel-heading { padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.editor-form, .studio-form { display: grid; gap: 9px; padding-top: 22px; }
.editor-form textarea { min-height: 365px; }
.editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; }
.character-count { color: var(--faint); font-size: 11px; }
.verdict-card { min-height: 530px; }
.empty-state { display: grid; min-height: 280px; place-content: center; justify-items: center; padding: 25px; text-align: center; }
.empty-state h2 { margin-top: 14px; }
.empty-state p { max-width: 280px; margin-bottom: 0; color: var(--muted); font-size: 12px; }
.empty-icon { display: grid; width: 55px; height: 55px; place-items: center; border: 1px solid rgba(162, 140, 255, .18); border-radius: 17px; background: var(--purple-soft); color: var(--purple-bright); font-size: 25px; }
.studio-empty-icon { box-shadow: 0 0 0 10px rgba(162, 140, 255, .035), 0 0 0 20px rgba(162, 140, 255, .02); }
.reference-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: rgba(5, 8, 20, .28); }
.reference-tab { display: inline-flex; min-height: 44px; flex: 1; align-items: center; justify-content: center; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.reference-tab.active { background: var(--purple-soft); color: var(--purple-bright); }
.reference-pane { margin-top: 3px; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 7px 0 10px; }
.option-grid > div { display: grid; gap: 9px; }
.blend-profiles { display: grid; gap: 7px; }
.profile-check { display: flex; min-height: 44px; align-items: center; gap: 10px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .025); color: var(--muted); font-size: 12px; cursor: pointer; }
.profile-check:has(input:checked) { border-color: rgba(162, 140, 255, .4); background: var(--purple-soft); color: var(--purple-bright); }
.profile-check input { width: 16px; min-height: 16px; accent-color: var(--purple); }
.studio-form .button-wide { margin-top: 3px; }
.result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.result-heading > div { min-width: 0; }
.result-heading h2 { overflow-wrap: anywhere; font-size: 22px; }
.result-meta { margin: 4px 0 0; color: var(--faint); font-size: 11px; }
.result-actions { display: flex; gap: 5px; }
.lyric-display { margin: 22px 0; padding: 19px; border-left: 2px solid var(--purple); border-radius: 0 11px 11px 0; background: rgba(4, 7, 18, .28); }
.lyric-lines { display: grid; gap: 7px; overflow-wrap: anywhere; color: #e4e5f1; font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 1.5; white-space: pre-wrap; }
.lyric-lines span:nth-child(5n) { color: var(--purple-bright); }
.verdict-summary { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; }
.verdict-score { display: grid; width: 61px; height: 61px; place-items: center; border: 1px solid rgba(132, 216, 173, .22); border-radius: 50%; background: rgba(132, 216, 173, .08); color: var(--green); font-size: 17px; font-weight: 800; }
.verdict-score.failed { border-color: rgba(255, 181, 157, .25); background: rgba(255, 181, 157, .08); color: var(--peach); }
.verdict-summary strong { display: block; }
.verdict-summary p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.score-list { display: grid; gap: 9px; margin-bottom: 18px; }
.score-line { display: grid; grid-template-columns: 88px 1fr 37px; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.score-track { height: 6px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.score-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8976e8, #bcaeff); }
.score-value { color: var(--ink); text-align: right; font-weight: 700; }
.verdict-notes { padding: 13px 14px; border: 1px solid rgba(255, 181, 157, .15); border-radius: 11px; background: rgba(255, 181, 157, .06); }
.verdict-notes h3 { margin-bottom: 6px; color: var(--peach); }
.verdict-notes ul { margin: 0; padding-left: 17px; color: var(--muted); font-size: 11px; }
.verdict-notes li + li { margin-top: 4px; }
.result-bottom-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 19px; }
.revision-label { display: inline-flex; margin-top: 8px; color: var(--purple-bright); font-size: 10px; }
.beat-section { margin-top: 21px; padding-top: 19px; border-top: 1px solid var(--line); }
.beat-section h3 { margin-bottom: 4px; }
.beat-section > p { margin-bottom: 12px; color: var(--faint); font-size: 11px; }
.beat-form { display: grid; grid-template-columns: minmax(0, 1fr) 94px auto; gap: 8px; align-items: end; }
.beat-form label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.beat-form input { min-height: 44px; }
.beat-form .button { min-height: 44px; padding: 0 12px; }
.beat-attached { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid rgba(132, 216, 173, .18); border-radius: 10px; background: rgba(132, 216, 173, .06); }
.beat-attached strong { display: block; color: #c7ebd6; font-size: 12px; }
.beat-attached small { display: block; margin-top: 2px; color: var(--faint); font-size: 10px; }
.beat-player { width: 100%; aspect-ratio: 16 / 9; margin-top: 12px; overflow: hidden; border-radius: 11px; background: #05070e; }
.beat-player iframe { display: block; width: 100%; height: 100%; border: 0; }

.drafts-toolbar { display: flex; align-items: center; gap: 11px; margin-bottom: 19px; padding: 12px; }
.search-field { display: flex; min-height: 44px; flex: 1; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--faint); }
.search-field input { min-height: 40px; border: 0; background: transparent; box-shadow: none; padding: 0; }
.search-field:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.filter-field { display: flex; min-height: 44px; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.filter-field select { min-width: 145px; min-height: 44px; }
.draft-history-list { display: grid; gap: 11px; }
.history-card { display: flex; min-width: 0; align-items: center; gap: 15px; padding: 17px 19px; cursor: pointer; }
.history-card:hover { border-color: rgba(162, 140, 255, .35); }
.history-card .draft-art { width: 48px; height: 48px; flex-basis: 48px; }
.history-card .draft-meta { flex: 1; }
.history-card .draft-subtitle { margin-top: 5px; }
.history-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.history-tag { padding: 2px 7px; border-radius: 5px; background: rgba(255, 255, 255, .06); color: var(--faint); font-size: 9px; }
.history-actions { display: flex; align-items: center; gap: 5px; }
.history-actions .icon-button { color: var(--muted); }

.tab-bar { display: none; }
.tab-icon { font-size: 17px; line-height: 1; }
.sheet-scrim { position: fixed; z-index: 39; inset: 0; background: rgba(0, 0, 0, .55); }
.more-sheet { position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 20px 20px 0 0; background: var(--panel-raised); box-shadow: 0 -12px 40px rgba(0, 0, 0, .4); }
.more-sheet h2 { margin-bottom: 12px; }
.sheet-handle { width: 38px; height: 4px; margin: 2px auto 14px; border-radius: 99px; background: var(--line-strong); }
.sheet-nav { display: grid; gap: 6px; }
.sheet-link { display: flex; min-height: 48px; align-items: center; gap: 12px; padding: 0 12px; border: 1px solid transparent; border-radius: 11px; color: var(--muted); font-size: 14px; font-weight: 650; }
.sheet-link:hover { background: rgba(255, 255, 255, .04); color: var(--ink); }
.sheet-link.active { border-color: rgba(162, 140, 255, .18); background: var(--purple-soft); color: var(--purple-bright); }
.sheet-privacy { display: flex; align-items: center; gap: 9px; margin: 16px 0; color: var(--faint); font-size: 11px; }

.loading-state { padding: 24px 8px; color: var(--faint); font-size: 12px; text-align: center; }
.muted-empty { padding: 20px 8px; color: var(--faint); font-size: 12px; }
.toast-region { position: fixed; z-index: 50; top: 84px; right: 25px; display: grid; gap: 8px; width: min(360px, calc(100vw - 32px)); }
.toast { padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 11px; background: #1d2641; box-shadow: var(--shadow); color: #e9eaf4; font-size: 12px; animation: toast-in .2s ease both; }
.toast.success { border-color: rgba(132, 216, 173, .3); }
.toast.error { border-color: rgba(255, 142, 156, .3); color: #ffd5d9; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1050px) {
  .topbar-inner { padding: 0 22px; }
  .main-content { padding-inline: 28px; }
  .sidebar { width: 205px; flex-basis: 205px; }
  .dashboard-grid, .workspace-grid, .studio-layout { grid-template-columns: minmax(0, 1fr); }
  .profile-panel { order: -1; }
  .verdict-card, .studio-result { min-height: 0; }
}

@media (max-width: 767px) {
  .topbar-inner { height: 64px; padding: 0 16px; }
  .topbar-status { display: none; }
  .topbar-inner .button-quiet { margin-left: auto; }
  .workspace-layout { display: block; }
  .sidebar { display: none; }
  .main-content { padding: 32px 16px calc(96px + env(safe-area-inset-bottom)); }
  .tab-bar { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: flex; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--line-strong); background: rgba(11, 16, 32, .94); backdrop-filter: blur(16px); box-shadow: 0 -4px 12px rgba(0, 0, 0, .25); }
  .tab-item { display: flex; min-width: 44px; min-height: 44px; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 2px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; }
  .tab-item.active { background: var(--purple-soft); color: var(--purple-bright); }
  .heading-with-action { align-items: flex-start; flex-direction: column; }
  .heading-with-action .button { width: 100%; }
  .stat-grid { gap: 9px; }
  .stat-card { min-height: 105px; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .stat-icon { width: 35px; height: 35px; flex-basis: 35px; border-radius: 10px; font-size: 17px; }
  .stat-card strong { font-size: 22px; }
  .stat-label { margin-bottom: 2px; font-size: 10px; }
  .stat-card small { display: none; }
  .privacy-banner, .corpus-note { align-items: flex-start; flex-wrap: wrap; }
  .privacy-banner .text-button { margin-left: 54px; }
  .settings-layout, .corpus-layout { grid-template-columns: minmax(0, 1fr); }
  .info-card { order: -1; }
  .management-list { grid-template-columns: minmax(0, 1fr); }
  .corpus-layout { gap: 14px; }
  .corpus-note { margin-top: 14px; }
  .drafts-toolbar { align-items: stretch; flex-direction: column; }
  .filter-field { justify-content: space-between; }
  .filter-field select { flex: 1; }
  .drafts-toolbar .button { width: 100%; }
  .history-card { align-items: flex-start; flex-wrap: wrap; padding: 14px; }
  .history-card .draft-meta { min-width: calc(100% - 65px); }
  .history-card .draft-score { margin-left: 64px; text-align: left; }
  .history-actions { margin-left: auto; }
  .beat-form { grid-template-columns: minmax(0, 1fr) 88px; }
  .beat-form .button { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 480px) {
  .login-view { padding: 16px; }
  .login-card { padding: 28px 22px; }
  .login-card h1 { margin-top: 21px; font-size: 38px; }
  .topbar-inner { gap: 10px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 24px; height: 24px; font-size: 15px; }
  .topbar-inner .button-quiet { padding: 0 7px; font-size: 12px; }
  .avatar { width: 44px; height: 44px; }
  .page-heading { margin-bottom: 23px; }
  h1 { font-size: 33px; }
  .stat-card { padding: 11px; }
  .stat-card strong { font-size: 19px; }
  .stat-icon { width: 31px; height: 31px; flex-basis: 31px; }
  .recent-panel, .profile-panel, .settings-card, .info-card, .profiles-management, .artist-panel, .lyric-panel, .editor-card, .verdict-card, .studio-controls, .studio-result { padding: 18px; }
  .panel-heading { gap: 9px; }
  .panel-heading p { font-size: 11px; }
  .privacy-banner { padding: 15px; }
  .privacy-banner .text-button { margin-left: 0; }
  .option-grid { gap: 8px; }
  .editor-form textarea { min-height: 260px; }
  .editor-footer { align-items: stretch; flex-direction: column; }
  .editor-footer .button { width: 100%; }
  .result-heading { gap: 8px; }
  .result-heading h2 { font-size: 19px; }
  .result-actions { flex-shrink: 0; }
  .lyric-display { padding: 14px; }
  .lyric-lines { font-size: 15px; }
  .score-line { grid-template-columns: 75px 1fr 34px; gap: 6px; font-size: 10px; }
  .beat-form { grid-template-columns: minmax(0, 1fr) 77px; }
  .add-lyric-actions { align-items: stretch; flex-direction: column; }
  .add-lyric-actions .button { width: 100%; }
  .form-actions { align-items: flex-start; flex-direction: column; }
  .form-actions .button { width: 100%; }
  .toast-region { top: 75px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .button, .draft-title { transition: none; }
  .button:hover, .button:active { transform: none; }
  .toast { animation: none; }
}
