@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Montserrat", system-ui, sans-serif;
  background: #121212;
  color: #ffffff;
  font-synthesis: none;
  --bg: #121212;
  --sidebar: #0b0b0b;
  --surface: #1a1a1a;
  --surface-hover: #242424;
  --line: #333333;
  --text: #ffffff;
  --secondary: #aaaaaa;
  --muted: #666666;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
}

body {
  min-width: 320px;
  font-size: 14px;
  font-weight: 400;
}

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

button,
a,
input,
textarea,
select {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 16px;
  background: var(--sidebar);
  border-right: 1px solid #202020;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 0 8px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #3b3b3b;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  font-weight: 600;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.navigation {
  display: grid;
  gap: 4px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px 0 16px;
  border-radius: 8px;
  color: var(--secondary);
  font-size: 13px;
  transition: background-color 80ms ease, color 80ms ease;
}

.nav-item:hover {
  background: #171717;
  color: var(--text);
}

.nav-item:active {
  transform: scale(0.98);
}

.nav-item.is-active {
  background: var(--surface);
  color: var(--text);
}

.nav-indicator {
  position: absolute;
  left: 0;
  width: 2px;
  height: 16px;
  border-radius: 2px;
  background: transparent;
}

.nav-item.is-active .nav-indicator {
  background: #ffffff;
}

.nav-status {
  width: 5px;
  height: 5px;
  margin-left: auto;
  border-radius: 50%;
  background: #3c3c3c;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.prototype-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.45;
}

.main-content {
  min-width: 0;
  padding: 32px 40px 48px;
}

.main-content:focus {
  outline: none;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

h2 {
  font-size: 20px;
  font-weight: 600;
}

.page-header p,
.album-header p,
.placeholder-view p {
  margin-top: 8px;
  color: var(--secondary);
  line-height: 1.6;
}

.album-list {
  overflow: hidden;
  background: var(--surface);
  border-radius: 12px;
}

.album-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 16px;
  min-height: 80px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  transition: background-color 80ms ease;
}

.album-row:last-child {
  border-bottom: 0;
}

.album-row:hover {
  background: var(--surface-hover);
}

.album-row:active {
  transform: scale(0.995);
}

.album-row img,
.album-header img {
  display: block;
  object-fit: cover;
  background: #202020;
}

.album-row img {
  border-radius: 4px;
}

.album-identity strong,
.album-identity small {
  display: block;
}

.album-identity strong {
  font-size: 15px;
  font-weight: 600;
}

.album-identity small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.album-count {
  color: var(--secondary);
  font-size: 12px;
}

.row-arrow {
  color: var(--muted);
  font-size: 18px;
}

.placeholder-view {
  max-width: 580px;
  padding-top: 72px;
}

.placeholder-view p {
  max-width: 520px;
}

.availability {
  display: inline-block;
  margin-top: 24px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--secondary);
  font-size: 12px;
}

.back-link,
.text-link {
  display: inline-block;
  color: var(--secondary);
}

.back-link:hover,
.text-link:hover {
  color: var(--text);
}

.album-header {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin-top: 32px;
}

.album-header img {
  border-radius: 8px;
}

.track-section {
  margin-top: 40px;
}

.track-table {
  margin-top: 16px;
  overflow: hidden;
  background: var(--surface);
  border-radius: 12px;
}

.track-row {
  display: grid;
  grid-template-columns: 40px minmax(180px, 1.2fr) minmax(180px, 1fr) 72px 110px;
  align-items: center;
  min-height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  column-gap: 16px;
}

.track-row:last-child {
  border-bottom: 0;
}

.track-row strong {
  font-size: 14px;
  font-weight: 600;
}

.track-row span {
  color: var(--secondary);
  font-size: 12px;
}

.track-row strong,
.track-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-head {
  min-height: 40px;
  color: var(--muted);
}

.track-head span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.track-position {
  font-variant-numeric: tabular-nums;
}

.loading-state {
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  background: #202020;
  color: var(--text);
  cursor: pointer;
}

.button:hover { background: #292929; }
.button:disabled { cursor: wait; opacity: .45; }
.button-primary { border-color: #fff; background: #fff; color: #111; }
.button-primary:hover { background: #ddd; }
.button-quiet { background: transparent; }
.button-danger { color: #ffaaa4; }
.button-small { min-height: 32px; padding: 0 11px; font-size: 12px; }

.production-view,
.editor-view { max-width: 1180px; margin: 0 auto; }

.catalog-tabs { display: flex; gap: 24px; margin: 30px 0 8px; border-bottom: 1px solid var(--line); }
.catalog-tab { position: relative; padding: 0 0 12px; border: 0; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; cursor: pointer; }
.catalog-tab::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 1px; background: transparent; content: ""; }
.catalog-tab:hover { color: var(--text); }
.catalog-tab.is-active { color: var(--text); }
.catalog-tab.is-active::after { background: var(--text); }
.schedule-year { margin-top: 38px; }
.schedule-year > h2 { margin: 0 0 12px; font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.release-table { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.release-head,
.release-row { display: grid; grid-template-columns: 88px minmax(180px, .8fr) minmax(260px, 1.35fr) 150px 120px 84px; align-items: center; }
.release-head { min-height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .055em; text-transform: uppercase; }
.release-row { min-height: 62px; padding: 0 14px; border-bottom: 1px solid var(--line); transition: background-color 140ms ease-out; }
.release-row:last-child { border-bottom: 0; }
.release-row:hover { background: var(--surface-hover); }
.release-row-main { display: grid; grid-column: 1 / 5; grid-template-columns: 88px minmax(180px, .8fr) minmax(260px, 1.35fr) 150px; align-items: center; min-width: 0; height: 100%; color: inherit; }
.release-row-main > * { min-width: 0; padding-right: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.release-row-main strong { font-size: 13px; font-weight: 610; }
.release-code { color: var(--secondary); font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: .045em; }
.release-concept,
.release-date { color: var(--secondary); font-size: 12px; }
.release-brief { min-width: 0; font-size: 12px; }
.brief-link { color: #a9c8ff; text-decoration: underline; text-underline-offset: 3px; }
.brief-empty { color: var(--muted); }
.release-delete { justify-self: end; padding: 7px 0 7px 10px; border: 0; background: transparent; color: transparent; font-size: 11px; cursor: pointer; }
.release-row:hover .release-delete,
.release-delete:focus-visible { color: #ffaaa4; }
.release-done { justify-self: end; color: var(--muted); font-size: 11px; }
.release-row.is-idea { background: #211d0f; color: #f1c84c; }
.release-row.is-idea:hover { background: #292314; }
.release-row.is-idea .release-code,
.release-row.is-idea .release-concept,
.release-row.is-idea .release-date,
.release-row.is-idea .brief-empty { color: #c5a640; }
.release-row.is-released { color: #8a8a8a; }
.release-row.is-released .release-code,
.release-row.is-released .release-concept,
.release-row.is-released .release-date { color: #666; }
.schedule-archive { margin-top: 44px; border-top: 1px solid var(--line); }
.schedule-archive > summary { display: flex; align-items: center; gap: 8px; padding: 18px 0; color: var(--secondary); font-size: 13px; cursor: pointer; list-style: none; }
.schedule-archive > summary::-webkit-details-marker { display: none; }
.schedule-archive > summary::before { content: "+"; color: var(--muted); font-size: 16px; }
.schedule-archive[open] > summary::before { content: "−"; }
.schedule-archive > summary span { color: var(--muted); font-variant-numeric: tabular-nums; }

.empty-state { padding: 56px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.empty-state p { margin: 10px 0 22px; color: var(--secondary); }

.editor-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 28px 0 24px; }
.editor-header p { max-width: 700px; margin-top: 8px; color: var(--secondary); line-height: 1.5; }
.editor-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.form-grid { display: grid; grid-template-columns: 160px 1fr; gap: 20px; max-width: 820px; padding: 24px; }
.field { display: grid; gap: 8px; }
.field span { color: var(--secondary); font-size: 11px; }
.field-wide { grid-column: 1 / -1; }
.field input, .field textarea, .field select, .repeat-row input { width: 100%; border: 1px solid #3b3b3b; border-radius: 8px; background: #101010; color: var(--text); }
.field input, .field select, .repeat-row input { min-height: 42px; padding: 0 12px; }
.field textarea { min-height: 96px; padding: 12px; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus, .repeat-row input:focus { border-color: #777; outline: none; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.field-note { color: var(--muted); font-size: 10px; line-height: 1.45; }
.form-spacer { flex: 1; }
.header-actions { display: flex; gap: 8px; }

.editor-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.album-summary { position: sticky; top: 24px; display: grid; gap: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #161616; }
.album-summary div span, .album-summary div strong { display: block; }
.album-summary div span { margin-bottom: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.album-summary div strong { font-size: 12px; line-height: 1.4; }
.album-summary .text-link { font-size: 11px; line-height: 1.5; }
.album-workspace-main { display: grid; gap: 20px; min-width: 0; }
.track-workspace { overflow: hidden; }
.track-workspace-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.track-workspace-header h2 { font-size: 17px; }
.track-metrics { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.track-metrics span { display: flex; align-items: baseline; gap: 5px; }
.track-metrics strong { color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; }
.read-only-label { color: var(--muted); font-size: 11px; }
.production-track-list { display: grid; }
.production-track-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px; border-bottom: 1px solid var(--line); }
.production-track-row:last-child { border-bottom: 0; }
.production-track-main { display: grid; grid-template-columns: minmax(170px, 1.15fr) minmax(145px, .9fr) 110px minmax(120px, .8fr); align-items: center; gap: 14px; min-width: 0; min-height: 68px; padding: 10px 16px 10px 24px; border: 0; background: transparent; color: var(--text); text-align: left; }
button.production-track-main { cursor: pointer; }
button.production-track-main:hover { background: var(--surface-hover); }
.production-track-main > span { min-width: 0; }
.production-track-main strong, .production-track-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.production-track-main strong { font-size: 13px; }
.production-track-main small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.track-state { color: var(--secondary); font-size: 10px; font-weight: 600; line-height: 1.4; }
.track-state.is-revisions { color: #e2b95e; }
.track-state.is-ready, .track-state.is-mastered { color: #86d49b; }
.track-technical, .track-missing { color: var(--secondary); font-size: 10px; line-height: 1.45; }
.track-folder-link { align-self: center; justify-self: end; margin-right: 16px; color: #a9c8ff; font-size: 10px; text-decoration: underline; text-underline-offset: 3px; }
.track-empty { padding: 34px 24px; color: var(--muted); font-size: 12px; }
.track-editor-panel { grid-column: 1 / -1; padding: 22px 24px; border-top: 1px solid var(--line); background: #151515; }
.track-workspace-header + .track-editor-panel { border-top: 0; border-bottom: 1px solid var(--line); }
.track-form { display: grid; gap: 20px; }
.track-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.track-field-wide { grid-column: span 3; }
.delivery-checks { display: flex; flex-wrap: wrap; gap: 16px 24px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.delivery-checks legend { padding: 0 6px; color: var(--muted); font-size: 10px; }
.delivery-checks label { display: flex; align-items: center; gap: 7px; color: var(--secondary); font-size: 11px; }
.delivery-checks input { accent-color: #fff; }
.track-form-actions { display: flex; align-items: center; gap: 10px; }
.brief-editor { display: grid; gap: 16px; min-width: 0; }
.brief-empty-state { padding: 42px; border: 1px dashed var(--line); border-radius: 12px; }
.brief-empty-state h2 { margin-bottom: 8px; font-size: 18px; }
.brief-empty-state p { max-width: 540px; margin-bottom: 20px; color: var(--secondary); line-height: 1.55; }
.section-card { display: grid; gap: 20px; padding: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading h2 { font-size: 16px; }
.repeat-row { display: grid; align-items: center; gap: 10px; margin-top: 10px; }
.reference-row { grid-template-columns: minmax(140px, .8fr) minmax(220px, 1.2fr) 32px; }
.requirement-row { grid-template-columns: 24px minmax(0, 1fr) 32px; }
.row-number { color: var(--muted); font-size: 11px; text-align: center; }
.icon-button { width: 32px; height: 32px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.icon-button:hover { color: #ffaaa4; }
.sticky-actions { position: sticky; bottom: 16px; z-index: 4; display: flex; justify-content: flex-end; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(15,15,15,.94); backdrop-filter: blur(12px); }

.login-main, .public-main { grid-column: 1 / -1; }
.login-main { display: grid; place-items: center; min-height: 100vh; }
.login-card { width: min(380px, 100%); padding: 32px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.login-card .brand-mark { margin-bottom: 30px; }
.login-card h1 { margin-bottom: 24px; }
.form-stack { display: grid; gap: 16px; }
.form-error { color: #ffaaa4; font-size: 12px; }

.brief-preview, .public-brief { width: min(1480px, 100%); margin: 0 auto; }
.brief-preview > .back-link { margin-bottom: 24px; }
.brief-document { min-height: calc(100vh - 96px); padding: clamp(28px, 3vw, 48px); border-radius: 14px; background: #f4f1eb; color: #171717; }
.preview-label { margin-bottom: 16px; color: #696761; font-size: 11px; font-weight: 600; letter-spacing: .12em; }
.brief-masthead { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid #cfcbc2; color: #65625d; font-size: 10px; letter-spacing: .12em; }
.brief-masthead strong { color: #171717; font-size: 11px; }
.brief-layout { display: grid; grid-template-columns: minmax(170px, .65fr) minmax(420px, 2fr) minmax(250px, .9fr); gap: clamp(28px, 4vw, 64px); padding-top: clamp(32px, 4vw, 64px); }
.brief-body { max-width: 74ch; }
.brief-body h1 { margin: 0 0 34px; font-size: clamp(38px, 4vw, 64px); font-weight: 600; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; }
.brief-document h2 { margin: 0 0 18px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.brief-document p, .brief-document li { font-size: 15px; line-height: 1.65; }
.brief-document p { margin: 0; }
.brief-document p + p { margin-top: 18px; }
.brief-document a { color: #174ea6; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.brief-reference-rail ul, .brief-requirements ol { margin: 0; padding: 0; list-style: none; }
.brief-reference-rail li { padding: 11px 0; border-top: 1px solid #d8d4cc; line-height: 1.35; }
.brief-reference-rail li:last-child { border-bottom: 1px solid #d8d4cc; }
.brief-reference-rail.is-empty { min-height: 1px; }
.brief-facts { position: sticky; top: 32px; align-self: start; }
.brief-deadline, .brief-release { padding: 0 0 20px; }
.brief-release { padding-top: 20px; border-top: 1px solid #cfcbc2; }
.brief-deadline span, .brief-release span { display: block; margin-bottom: 8px; color: #68655f; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.brief-deadline strong { display: block; font-size: clamp(25px, 2.4vw, 36px); line-height: 1.08; }
.brief-release strong { display: block; font-size: 17px; line-height: 1.3; }
.brief-cutoff { padding: 20px 0; border-top: 1px solid #cfcbc2; color: #55524d; font-size: 12px !important; line-height: 1.55 !important; }
.brief-requirements { padding-top: 22px; border-top: 1px solid #cfcbc2; }
.brief-requirements li { position: relative; padding: 8px 0 8px 28px; font-size: 13px; line-height: 1.4; }
.brief-requirements li::before { position: absolute; left: 0; content: counter(list-item, decimal-leading-zero); color: #77736c; font-size: 10px; font-variant-numeric: tabular-nums; }
.brief-participate { width: 100%; min-height: 48px; margin-top: 30px; border: 0; border-radius: 8px; background: #171717; color: #fff; font-weight: 600; }
.brief-participate:disabled { cursor: not-allowed; opacity: .42; }
.public-main { min-height: 100vh; padding: 48px; background: #222; }

.license-posts-view,
.license-post-editor {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.license-post-list {
  border-top: 1px solid var(--line);
}

.license-post-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(180px, 1fr) 170px 150px 20px;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  transition: background-color 100ms ease;
}

.license-post-row:hover {
  background: var(--surface-hover);
}

.license-post-identity strong,
.license-post-identity small {
  display: block;
}

.license-post-identity strong {
  margin-bottom: 5px;
  font-size: 15px;
  font-weight: 600;
}

.license-post-identity small,
.license-post-feature,
.license-post-row time {
  color: var(--secondary);
  font-size: 12px;
}

.license-post-status {
  justify-self: start;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--secondary);
  font-size: 11px;
}

.license-post-status.is-ready {
  color: #ffffff;
}

.license-post-status.is-published_manual {
  border-color: #55715d;
  color: #b9dec3;
}

.license-post-editor-layout {
  display: grid;
  grid-template-columns: minmax(340px, 440px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.license-post-source {
  position: sticky;
  top: 32px;
  display: grid;
  gap: 24px;
  padding: 24px;
}

.compact-field {
  display: grid;
  gap: 6px;
  min-width: 170px;
}

.compact-field span {
  color: var(--muted);
  font-size: 11px;
}

.compact-field select {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111111;
  color: var(--text);
}

.license-source-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.license-track-picker { min-width: 0; }
.selected-tracks { display: grid; gap: 7px; margin-bottom: 8px; }
.selection-empty { min-height: 42px; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 12px; }
.selected-track { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 10px 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #151515; }
.selected-track span, .selected-track strong, .selected-track small { display: block; min-width: 0; }
.selected-track strong { overflow: hidden; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.selected-track small { margin-top: 3px; color: var(--secondary); font-size: 10px; }
.selected-track button { width: 28px; height: 28px; flex: 0 0 auto; border: 0; border-radius: 6px; background: transparent; color: var(--secondary); font-size: 20px; cursor: pointer; }
.selected-track button:hover { background: #292929; color: var(--text); }
.catalog-search { position: relative; }
.catalog-search > input { width: 100%; }
.catalog-results { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; left: 0; max-height: 330px; overflow-y: auto; padding: 5px; border: 1px solid #3a3a3a; border-radius: 9px; background: #181818; box-shadow: 0 18px 50px #000a; }
.catalog-results button { display: grid; width: 100%; gap: 3px; padding: 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.catalog-results button:hover { background: #292929; }
.catalog-results strong { font-size: 13px; font-weight: 600; }
.catalog-results span, .catalog-results small { color: var(--secondary); font-size: 10px; }
.catalog-results p { padding: 12px; color: var(--muted); font-size: 12px; }
.selected-thanks { display: flex; flex-wrap: wrap; gap: 7px; }
.selected-thanks:not(:empty) { margin-bottom: 8px; }
.thanks-tag { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 5px 0 11px; border: 1px solid var(--line); border-radius: 999px; background: #202020; color: var(--text); font-size: 12px; }
.thanks-tag button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--secondary); font-size: 16px; cursor: pointer; }
.thanks-tag button:hover { background: #333; color: var(--text); }
.thanks-results { max-height: 230px; }

.license-caption-workspace {
  min-width: 0;
}

.caption-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.caption-heading h2 {
  font-size: 20px;
}

.caption-heading p {
  color: var(--secondary);
  font-size: 12px;
}

.caption-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.caption-editor {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.caption-editor header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.caption-actions { display: flex; gap: 7px; }

.caption-editor h3 {
  font-size: 15px;
  font-weight: 600;
}

.caption-editor textarea {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  padding: 14px;
  border: 1px solid #2f2f2f;
  border-radius: 8px;
  background: #111111;
  color: var(--text);
  line-height: 1.55;
}

.caption-editor textarea:focus {
  border-color: #6a6a6a;
}

@media (max-width: 900px) {
  .license-post-editor-layout {
    grid-template-columns: 1fr;
  }

  .license-post-source {
    position: static;
  }

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

  .license-post-row {
    grid-template-columns: minmax(0, 1fr) auto 20px;
    gap: 12px;
  }

  .license-post-feature,
  .license-post-row time {
    display: none;
  }
}

@media (max-width: 980px) {
  .brief-layout { grid-template-columns: 1fr; }
  .brief-body { grid-row: 1; max-width: 74ch; }
  .brief-facts { position: static; grid-row: 2; }
  .brief-reference-rail { grid-row: 3; }
  .brief-reference-rail.is-empty { display: none; }
}

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: 360px; padding: 12px 16px; border: 1px solid #3a3a3a; border-radius: 9px; background: #222; box-shadow: 0 12px 40px #0008; font-size: 12px; }
.toast.is-error { color: #ffaaa4; }

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #66666680;
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid #202020;
  }

  .brand {
    margin-bottom: 16px;
  }

  .navigation {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .nav-item {
    flex: 0 0 auto;
    padding: 0 12px;
  }

  .nav-indicator,
  .nav-status,
  .sidebar-footer {
    display: none;
  }

  .main-content {
    padding: 32px 16px;
  }

  .album-row {
    grid-template-columns: 56px minmax(0, 1fr) 20px;
  }

  .album-count {
    display: none;
  }

  .album-header {
    align-items: flex-end;
  }

  .album-header img {
    width: 112px;
    height: 112px;
  }

  .track-table {
    overflow-x: auto;
  }

  .track-row {
    min-width: 720px;
  }

  .release-table { overflow-x: auto; }
  .release-head, .release-row { min-width: 820px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .editor-layout { grid-template-columns: 1fr; }
  .album-summary { position: static; grid-template-columns: repeat(3, 1fr); }
  .album-summary .text-link { grid-column: 1 / -1; }
  .track-workspace-header { padding: 18px; }
  .production-track-row { grid-template-columns: 1fr; }
  .production-track-main { grid-template-columns: 1fr; gap: 7px; padding: 16px 18px; }
  .track-folder-link { justify-self: start; margin: 0; padding: 0 18px 16px; }
  .track-editor-panel { padding: 18px; }
  .track-form-grid { grid-template-columns: 1fr; }
  .track-field-wide { grid-column: auto; }
  .delivery-checks { display: grid; grid-template-columns: 1fr 1fr; }
  .track-form-actions { flex-wrap: wrap; }
  .reference-row { grid-template-columns: 1fr 32px; }
  .reference-row input:nth-child(2) { grid-column: 1; }
  .reference-row .icon-button { grid-column: 2; grid-row: 1 / 3; }
  .sticky-actions { flex-wrap: wrap; }
  .login-main { min-height: 100vh; }
  .public-main { padding: 0; }
  .brief-document { min-height: 100vh; padding: 24px 20px 36px; border-radius: 0; }
  .brief-masthead { align-items: flex-start; }
  .brief-layout { gap: 40px; padding-top: 38px; }
  .brief-body h1 { margin-bottom: 28px; font-size: clamp(34px, 12vw, 48px); }
}
