:root {
  color-scheme: light;
  --ink: #25212a;
  --violet: #702082;
  --deep: #46224f;
  --muted: #655e69;
  --line: #dfdbe0;
  --paper: #f5f3f7;
  --surface: #fff;
  --light-violet: #f4eaf5;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: var(--sans);
  --rail-width: 204px;
}
* { box-sizing: border-box; }
html { scrollbar-color: #bdb3be #f4f1f5; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.6 var(--sans); -webkit-text-size-adjust: 100%; }
h1,h2,h3,p { margin: 0; }
h1 { font-size: clamp(27px,2.35vw,37px); line-height: 1.3; letter-spacing: -.035em; font-weight: 650; overflow-wrap: anywhere; text-wrap: balance; }
h2 { font-size: 20px; line-height: 1.4; font-weight: 630; letter-spacing: -.015em; }
h3 { font-size: 16px; line-height: 1.5; font-weight: 630; }
a { text-decoration: none; color: var(--violet); }
a:hover { text-decoration: underline; text-underline-offset: .21em; }
:focus-visible { outline: 3px solid #8a4e98; outline-offset: 3px; }
::selection { background: #e9ceec; color: #301a35; }
[hidden] { display: none !important; }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); white-space: nowrap; overflow: hidden; }
.skip:focus { position: fixed; top: 12px; left: 12px; z-index: 30; background: #fff; padding: 8px 13px; }
.ui-icon { width: 19px; height: 19px; flex: none; vertical-align: middle; }
button, .btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border: 1px solid #c9c0cc; border-radius: 7px; color: var(--ink); background: #fff; font: 600 14px/1.4 var(--sans); cursor: pointer; }
button:hover, .btn:hover { background: #f4eff5; text-decoration: none; }
button:disabled { opacity: .55; cursor: default; }
.primary, .btn.primary { background: var(--violet); color: #fff; border-color: var(--violet); }
.primary:hover, .btn.primary:hover { background: #5b196a; border-color: #5b196a; }
label { display: block; color: #3e3541; font-weight: 550; font-size: 14px; }
input:not([type=checkbox]),textarea,select { margin-top: 6px; min-width: 0; width: 100%; padding: 9px 12px; color: var(--ink); background: #fff; border: 1px solid #c8becb; border-radius: 6px; caret-color: var(--violet); font: 400 15px/1.6 var(--sans); }
input[type=checkbox] { accent-color: var(--violet); }
textarea { display: block; resize: vertical; }
select { min-height: 42px; }
.notice { padding: 11px 15px; margin: 12px 0; border: 1px solid #dac6df; background: #f9f2fa; color: #55365d; border-radius: 8px; font-size: 14px; }
.badge { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 3px 8px; border-radius: 5px; background: #f0eef1; color: #524c56; font: 570 12px/1.5 var(--sans); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.review { color: #6b2e79; background: #f3e9f5; }
.badge.final { color: #35547d; background: #eaf0f9; }
.badge.returned { color: #865316; background: #fbefd9; }
.badge.approved,.badge.archived { color: #2b6754; background: #e7f2ec; }

.shell { display: grid; grid-template-columns: var(--rail-width) minmax(0,1fr); min-height: 100vh; }
.studio-rail { position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.studio-brand { min-width: 0; display: flex; align-items: center; }
.studio-brand img { display: block; max-width: 100%; height: auto; width: 184px; }
.studio-rail > .studio-brand { height: 89px; padding: 0 13px 0 17px; }
.studio-nav { padding: 20px 12px; display: grid; gap: 5px; }
.studio-nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 16px; color: #59525d; border-radius: 7px; font-size: 14px; font-weight: 520; }
.studio-nav a:hover { background: #f8f5f9; text-decoration: none; color: var(--violet); }
.studio-nav a[aria-current] { background: #f2e7f4; color: #652375; font-weight: 650; }
.studio-account { display: flex; align-items: center; gap: 9px; margin: auto 12px 0; padding: 19px 2px; border-top: 1px solid var(--line); }
.account-icon { background: #eee8f0; border-radius: 50%; width: 31px; height: 31px; display: grid; place-content: center; color: #65456e; flex: none; }
.account-icon .ui-icon { width: 16px; height: 16px; }
.studio-person { min-width: 0; flex: 1; }
.studio-person strong,.studio-person small { display: block; overflow-wrap: anywhere; }
.studio-person strong { font-size: 13px; font-weight: 600; }
.studio-person small { color: var(--muted); font-size: 11px; }
.studio-account form { margin: 0; }
.signout { border: 0; padding: 6px; min-width: 32px; min-height: 36px; color: var(--muted); }
.signout .ui-icon { width: 17px; height: 17px; }
.studio-work { min-width: 0; }
.studio-bar { display: flex; align-items: center; gap: 15px; background: #fff; min-height: 62px; padding: 10px clamp(22px,3vw,52px); border-bottom: 1px solid var(--line); }
.studio-bar strong { font-size: 16px; font-weight: 620; }
.studio-bar span { font-size: 13px; color: var(--muted); padding-left: 16px; border-left: 1px solid #d9d1da; }
.workspace { --page-gutter: clamp(22px,3vw,52px); max-width: 1650px; margin: 0 auto; padding: clamp(25px,3vw,47px) var(--page-gutter) 58px; min-width: 0; }
.desk-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 27px; }
.desk-heading .primary { padding-inline: 15px 17px; }
.desk-heading .primary .ui-icon { width: 16px; height: 16px; }
.desk-grid { display: grid; align-items: start; gap: 24px; }
.desk-grid.with-sources { grid-template-columns: minmax(0,1fr) clamp(224px,20vw,292px); }
.record-pane { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.queue-tabs { display: flex; gap: 25px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.queue-tabs a { position: relative; padding: 17px 0 16px; display: inline-flex; gap: 7px; align-items: center; color: var(--muted); font-size: 14px; font-weight: 550; text-decoration: none; }
.queue-tabs a:hover { color: var(--violet); }
.queue-tabs a[aria-current] { color: var(--violet); font-weight: 660; }
.queue-tabs a[aria-current]::after { content: ""; position: absolute; height: 3px; bottom: 0; background: currentColor; left: 0; right: 0; }
.queue-tabs a span,.archive-section span { font: 600 12px/1.4 var(--sans); border-radius: 4px; background: #f0edef; padding: 1px 5px; font-variant-numeric: tabular-nums; }
.queue-tabs a[aria-current] span { background: #f2e6f3; }
.archive-section { margin: 0; display: flex; align-items: center; gap: 8px; padding: 15px 20px; font-size: 16px; }
.queue { width: 100%; border-collapse: collapse; }
.queue th,.queue td { padding: 16px 10px; text-align: left; }
.queue th:first-child { padding-left: 22px; }
.queue :is(th,td):last-child { padding-right: 18px; text-align: right; }
.queue thead { background: #fbfafb; }
.queue thead th { border-bottom: 1px solid #ebe7eb; font-size: 12px; font-weight: 500; color: #6d6370; padding-block: 9px; white-space: nowrap; }
.queue tbody tr + tr { border-top: 1px solid #eee9ee; }
.queue tbody th { width: 47%; font-weight: 570; }
.record-title { color: var(--ink); display: inline-block; line-height: 1.55; font-weight: 630; font-size: 15px; overflow-wrap: anywhere; }
.record-title:hover { color: var(--violet); }
.record-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; color: var(--muted); font: 450 12px/1.5 var(--sans); font-variant-numeric: tabular-nums; }
.queue-person { min-width: 88px; font-size: 13px; color: #4b4350; }
.queue-person span { overflow-wrap: anywhere; }
.queue-person time { font: 400 11px/1.6 var(--sans); color: var(--muted); display: block; font-variant-numeric: tabular-nums; }
.queue-action { white-space: nowrap; }
.queue-action a { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 570; min-height: 36px; }
.queue-action .ui-icon { width: 13px; height: 13px; }
.empty { padding: 28px 22px; color: var(--muted); font-size: 14px; }
.source-shelf { min-width: 0; }
.source-shelf > h2 { margin: 1px 0 12px; font-size: 17px; }
.source-item { border-radius: 12px; border: 1px solid var(--line); background: #fff; overflow: hidden; }
.source-item + .source-item { margin-top: 15px; }
.source-swatch { isolation: isolate; position: relative; display: flex; align-items: center; min-height: 112px; padding: 18px 22px; overflow: hidden; background: #472052; color: #fff; }
.source-swatch time { position: relative; z-index: 1; display: grid; gap: 1px; }
.source-swatch small { color: #f0d8ef; font-size: 12px; }
.source-swatch strong { font: 500 34px/1.15 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.source-swatch i { margin-inline: 4px; color: #d6a8d3; font-weight: 400; font-style: normal; }
.folio,.folio::before,.folio::after { position: absolute; border: 1px solid #ba8cb7; border-radius: 6px; width: 75px; height: 110px; }
.folio { top: 38%; right: 2%; transform: rotate(19deg); background: #5c3168; }
.folio::before,.folio::after { content: ""; left: -10px; top: 4px; background: #673a71; }
.folio::after { left: -20px; top: 9px; background: #805185; }
.source-item-body { padding: 18px 19px 20px; }
.source-item h3 { font-size: 17px; line-height: 1.58; letter-spacing: -.012em; overflow-wrap: anywhere; }
.source-meta { display: grid; gap: 5px; padding: 0; margin: 12px 0; list-style: none; font-size: 13px; color: #514955; }
.source-meta li,.source-quantity { display: flex; align-items: center; gap: 8px; }
.source-meta .ui-icon,.source-quantity .ui-icon { width: 15px; height: 15px; }
.source-meta span { overflow-wrap: anywhere; }
.source-quantity { padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.source-use { margin-top: 13px; width: 100%; font-size: 13px; justify-content: space-between; color: var(--deep); }
.source-use .ui-icon { width: 15px; height: 15px; }
.entry-bar { display: flex; align-items: center; gap: 20px; min-height: 76px; padding: 12px clamp(20px,5vw,80px); background: #fff; border-bottom: 1px solid var(--line); }
.entry-bar .studio-brand img { width: 200px; }
.entry-bar span { border-left: 1px solid var(--line); padding-left: 20px; font-size: 15px; font-weight: 590; }
.entry-main { margin: 0 auto; padding: clamp(40px,10vh,112px) 20px 80px; max-width: 520px; }
.entry,.error { padding: clamp(23px,3vw,43px); border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.entry-title h1 { font-size: 29px; }
.entry-title p,.error .kicker { color: var(--muted); font-size: 14px; margin: 8px 0 22px; }
.entry-form label + label { margin-top: 17px; }
.entry-form button { display: flex; width: 100%; justify-content: space-between; margin: 24px 0 16px; }
.entry > a,.error a { font-size: 14px; }
.error h1 { font-size: 22px; margin: 0 0 18px; }

@media(min-width: 971px) and (max-width: 1190px) {
  :root { --rail-width: 184px; }
  .workspace { --page-gutter: 22px; }
  .desk-grid.with-sources { grid-template-columns: minmax(0,1fr) 209px; gap: 17px; }
  .queue th,.queue td { padding-inline: 7px; }
  .queue th:first-child { padding-left: 13px; }
  .queue :is(th,td):last-child { padding-right: 12px; }
}
@media(max-width: 970px) {
  .shell { display: block; }
  .studio-rail { position: relative; height: auto; width: 100%; display: grid; grid-template-columns: minmax(160px,1fr) auto auto; align-items: center; gap: 12px; padding: 7px 20px; border: 0; border-bottom: 1px solid var(--line); }
  .studio-rail > .studio-brand { height: auto; width: min(170px,100%); padding: 0; }
  .studio-nav { display: flex; gap: 4px; padding: 0; }
  .studio-nav a { padding: 8px 12px; gap: 7px; }
  .studio-account { margin: 0; padding: 0; border: 0; }
  .studio-bar { min-height: 43px; padding: 7px 20px; }
  .studio-bar strong { font-size: 14px; }
  .studio-bar span { font-size: 12px; }
  .workspace { --page-gutter: 20px; }
  .desk-grid.with-sources { grid-template-columns: minmax(0,1fr) 215px; gap: 16px; }
}
@media(max-width: 760px) {
  .desk-grid.with-sources { grid-template-columns: 1fr; }
  .source-item { display: grid; grid-template-columns: minmax(95px, .38fr) 1fr; }
  .source-swatch { align-items: start; }
  .folio { top: 62%; right: 0; }
  .source-shelf { margin-top: 5px; }
}
@media(max-width: 600px) {
  .studio-rail { padding: 12px 15px 5px; grid-template-columns: minmax(0,1fr) auto; row-gap: 9px; }
  .studio-rail > .studio-brand { width: 175px; }
  .studio-nav { grid-column: 1 / -1; grid-row: 2; gap: 9px; }
  .studio-nav a { min-height: 35px; padding: 5px 10px; }
  .studio-nav .ui-icon { width: 16px; height: 16px; }
  .studio-account { grid-column: 2; grid-row: 1; gap: 6px; }
  .studio-person { max-width: 78px; }
  .account-icon { display: none; }
  .studio-bar { display: none; }
  .workspace { --page-gutter: 15px; padding-block: 22px 40px; }
  .desk-heading { margin-bottom: 17px; }
  .desk-heading .primary { padding-inline: 10px; }
  .queue-tabs { gap: 21px; padding-inline: 14px; }
  .queue-tabs a { padding-block: 12px; }
  .queue thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .queue,.queue tbody { display: block; }
  .queue tbody tr { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px 12px; padding: 15px; }
  .queue tbody :is(th,td) { width: auto; padding: 0; text-align: left; }
  .queue tbody th { grid-column: 1; }
  .queue-state { align-self: start; justify-self: end; }
  .queue-person { align-self: end; }
  .queue-person span,.queue-person time { display: inline-block; margin-right: 6px; }
  .queue-person time { font-size: 11px; }
  .queue-action { justify-self: end; align-self: end; }
  .queue .queue-action a { min-height: 30px; }
  .source-item { grid-template-columns: 90px minmax(0,1fr); }
  .source-item h3 { font-size: 16px; }
  .source-swatch { padding: 17px 9px; }
  .source-swatch strong { font-size: 23px; }
  .source-swatch i { margin-inline: 1px; }
  .source-item-body { padding: 12px 14px; }
  .source-meta { margin: 7px 0; }
  .source-quantity { padding-top: 8px; }
  .source-use { margin-top: 8px; }
  .entry-bar { padding: 11px 15px; gap: 12px; min-height: 62px; }
  .entry-bar .studio-brand img { width: min(165px,44vw); }
  .entry-bar span { font-size: 13px; padding-left: 12px; }
}
@media(prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; }
}
