:root {
  color-scheme: light;
  --ink: #1b2925;
  --muted: #68756f;
  --line: #d9dfd9;
  --paper: #f4f5f0;
  --panel: #ffffff;
  --rail: #14211d;
  --rail-soft: #1e302a;
  --pine: #2f6e58;
  --mint: #b9e5ce;
  --sky: #d9eaf0;
  --amber: #e5c16a;
  --rose: #e9c5bf;
  --slate: #dce2e4;
  --shadow: 0 12px 30px rgb(27 41 37 / 8%);
  font-family: "Noto Sans SC", "Microsoft YaHei UI", "Segoe UI Variable Text", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 320px;
  height: 100dvh;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--paper);
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.studio-shell {
  height: 100dvh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr) 308px;
  overflow: hidden;
}

.side-rail {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 26px 16px 18px;
  color: #edf4ee;
  background: var(--rail);
}

.brand {
  display: grid;
  width: max-content;
  color: inherit;
  line-height: .94;
  text-decoration: none;
  letter-spacing: 0;
}

.brand span { font-size: 14px; font-weight: 780; }
.brand strong { color: var(--mint); font-size: 25px; font-weight: 850; }
.brand em { margin-top: 8px; color: #94b4a3; font-size: 10px; font-style: normal; font-weight: 700; letter-spacing: .08em; }

.nav-list { display: grid; gap: 6px; margin-top: 54px; }
.nav-item {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #b7c9be;
  background: transparent;
  text-align: left;
  font-weight: 700;
}
.nav-item:hover, .nav-item.is-active { border-color: #426958; color: #fff; background: var(--rail-soft); }

.rail-storage {
  margin-top: auto;
  padding: 15px 12px 12px;
  border: 1px solid #365545;
  border-radius: 6px;
  background: rgb(255 255 255 / 4%);
}
.rail-storage p, .rail-storage span { margin: 0; color: #a6bcaf; font-size: 11px; }
.rail-storage strong { display: block; margin: 6px 0 1px; color: #fff; font-size: 23px; }
.meter { height: 6px; margin: 13px 0 10px; overflow: hidden; border-radius: 99px; background: #385445; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--mint); }
.text-action { padding: 0; border: 0; color: var(--mint); background: transparent; font-size: 11px; font-weight: 700; }

.workspace { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 106px; padding: 24px 30px 20px; border-bottom: 1px solid var(--line); background: #fbfcf9; }
.eyebrow { margin: 0 0 5px; color: var(--pine); font-size: 10px; font-weight: 800; letter-spacing: .11em; }
h1 { margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 31px; font-weight: 680; letter-spacing: 0; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.safe-mode { padding: 7px 9px; border-radius: 99px; color: #315d4a; background: #e2f1e8; font-size: 12px; font-weight: 750; white-space: nowrap; }
.primary-action { min-height: 38px; padding: 0 14px; border: 1px solid #285a48; border-radius: 5px; color: #fff; background: var(--pine); font-size: 13px; font-weight: 800; }
.primary-action:hover { background: #245642; }

.view-panel { min-height: 0; flex: 1; padding: 21px 30px 26px; overflow: auto; }
#projectsView { display: flex; flex-direction: column; overflow: hidden; }
#projectsView .summary-strip, #projectsView .library-toolbar, #projectsView .lifecycle-guide { flex: 0 0 auto; }
#projectsView .project-library { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
#projectsView .table-wrap { flex: 1 1 auto; min-height: 0; max-height: none; }
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--line); }
.summary-strip article { min-height: 78px; padding: 14px 16px; background: var(--panel); }
.summary-strip span { display: block; color: var(--muted); font-size: 12px; font-weight: 650; }
.summary-strip strong { display: block; margin-top: 4px; color: var(--ink); font-family: Georgia, "Noto Serif SC", serif; font-size: 25px; }

.library-toolbar { display: grid; grid-template-columns: minmax(160px, 1fr) 132px 132px 120px; gap: 10px; align-items: end; margin: 18px 0 10px; }
.library-toolbar label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 750; }
.library-toolbar input, .library-toolbar select { width: 100%; min-height: 35px; border: 1px solid #cbd4cd; border-radius: 4px; color: var(--ink); background: #fff; }
.library-toolbar input { padding: 0 10px; }
.library-toolbar select { padding: 0 7px; }
.search-field span { display: none; }

.project-library { min-height: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 14px; border-bottom: 1px solid #bbd9c7; color: #234f3d; background: #e9f5ed; font-size: 12px; }
.bulk-bar div { display: flex; gap: 7px; }
.bulk-bar button, .detail-actions button { min-height: 29px; padding: 0 9px; border: 1px solid #9ebfae; border-radius: 4px; color: #28513f; background: #fff; font-size: 12px; font-weight: 750; }
.table-wrap { overflow: auto; max-height: calc(100dvh - 312px); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { position: sticky; top: 0; z-index: 1; padding: 11px 10px; border-bottom: 1px solid var(--line); color: var(--muted); background: #f7f9f6; text-align: left; font-size: 10px; letter-spacing: .04em; white-space: nowrap; }
td { padding: 12px 10px; border-bottom: 1px solid #eef1ed; vertical-align: middle; }
tbody tr { transition: background 150ms ease; }
tbody tr:hover, tbody tr.is-focused { background: #f1f7f2; }
tbody tr:last-child td { border-bottom: 0; }
input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--pine); }
.project-button { display: grid; gap: 3px; width: 100%; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; }
.project-button strong { font-size: 13px; }
.project-button span { color: var(--muted); font-size: 11px; }
.asset-stack { display: grid; gap: 3px; color: var(--muted); font-size: 11px; }
.asset-stack strong { color: var(--ink); font-size: 12px; }
.size-value { font-weight: 800; white-space: nowrap; }
.size-value small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 650; }
.status-badge { display: inline-flex; align-items: center; width: max-content; min-height: 22px; padding: 0 8px; border: 1px solid transparent; border-radius: 99px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status-active { border-color: #a6d1b7; color: #21563e; background: #e8f5ed; }
.status-expiring { border-color: #e6cb85; color: #795813; background: #fff7df; }
.status-retained { border-color: #b9ced4; color: #41646f; background: #edf5f6; }
.status-recovery { border-color: #e6bbb2; color: #7c3f37; background: #fff0ee; }
.status-delete_queue { border-color: #d2c2e0; color: #614378; background: #f5effa; }

.lifecycle-guide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 12px 0 0; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lifecycle-guide div { display: grid; gap: 3px; min-width: 0; }
.lifecycle-guide strong { color: var(--ink); font-size: 12px; }
.lifecycle-guide span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.danger-action { border-color: #cb9b9b !important; color: #8b3434 !important; }
.gallery-state { color: var(--muted); font-size: 11px; }
.gallery-state strong { display: block; color: var(--ink); font-size: 12px; }
.empty-state { margin: 0; padding: 34px; color: var(--muted); text-align: center; font-size: 13px; }

.studio-shell.is-workbench { grid-template-columns: 216px minmax(0, 1fr); }
.studio-shell.is-workbench .detail-panel { display: none; }
.studio-shell.is-workbench #workbenchView { padding: 18px 24px; overflow: hidden; }
.project-workbench { display: grid; height: 100%; min-height: 0; grid-template-rows: auto minmax(0, 1fr); gap: 14px; }
.workbench-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; min-width: 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.workbench-back, .fixture-nav button { min-height: 31px; padding: 0 10px; border: 1px solid #bcc9c0; border-radius: 4px; color: #29483b; background: #fff; font-size: 11px; font-weight: 800; }
.workbench-back:hover, .fixture-nav button:hover { border-color: #709b83; background: #f1f7f2; }
.workbench-head-actions { display: flex; align-items: center; justify-content: end; gap: 8px; }
.publish-client-button { min-height: 32px; padding: 0 10px; border: 1px solid #285a48; border-radius: 4px; color: #fff; background: var(--pine); font-size: 11px; font-weight: 850; white-space: nowrap; }
.publish-client-button:hover { background: #245642; }
.workbench-context { min-width: 0; }
.workbench-context h2 { overflow: hidden; margin: 0; font-family: Georgia, serif; font-size: 21px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.workbench-context > p:last-child { overflow: hidden; margin: 4px 0 0; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.workbench-layout { display: grid; min-height: 0; grid-template-columns: minmax(0, 1fr) 304px; gap: 16px; }
.workbench-review { display: grid; min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; }
.fixture-review-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fixture-review-toolbar > div:first-child { display: grid; gap: 2px; min-width: 0; }
.fixture-review-toolbar strong { color: var(--ink); font-size: 13px; }
.fixture-review-toolbar span { color: var(--muted); font-size: 10px; }
.fixture-nav { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.fixture-nav span { min-width: 43px; color: var(--ink); text-align: center; font-size: 11px; font-weight: 750; }
.fixture-viewer { position: relative; min-height: 0; overflow: hidden; border: 1px solid #cbd5cf; border-radius: 6px; outline: none; background: #d5e1dc; }
.fixture-viewer:focus-visible { box-shadow: 0 0 0 3px rgb(47 110 88 / 22%); }
.fixture-scene { position: absolute; inset: 0; overflow: hidden; background: #d9e5df; }
.fixture-scene span { position: absolute; display: block; }
.fixture-sky { inset: 0 0 39%; background: #c9dfdf; }
.fixture-ground { right: 0; bottom: 0; left: 0; height: 42%; background: #b9ac98; }
.fixture-building { bottom: 32%; background: #819596; }
.fixture-building-one { left: 8%; width: 23%; height: 42%; }
.fixture-building-two { right: 10%; width: 27%; height: 54%; background: #94a8a5; }
.fixture-tree { bottom: 31%; width: 18%; height: 37%; background: #496e58; }
.fixture-tree::before { position: absolute; top: -31%; left: 9%; width: 81%; height: 42%; border-radius: 50%; background: #5f8368; content: ""; }
.fixture-tree-one { left: 28%; }
.fixture-tree-two { right: 28%; width: 14%; height: 29%; }
.fixture-subject { z-index: 1; bottom: 18%; left: 48%; width: 12%; height: 45%; border-radius: 42% 42% 26% 26%; background: #33464c; transform: translateX(-50%); }
.fixture-subject::before { position: absolute; top: -20%; left: 26%; width: 48%; height: 26%; border-radius: 50%; background: #a87561; content: ""; }
.fixture-scene--gallery .fixture-sky { background: #d8d3cc; }
.fixture-scene--gallery .fixture-ground { background: #c8c1b5; }
.fixture-scene--gallery .fixture-building { background: #b5a59a; }
.fixture-scene--gallery .fixture-tree { display: none; }
.fixture-scene--gallery .fixture-subject { left: 64%; background: #6e4d44; }
.fixture-scene--garden .fixture-sky { background: #c7d9bd; }
.fixture-scene--garden .fixture-ground { background: #9fb38d; }
.fixture-scene--garden .fixture-building { display: none; }
.fixture-scene--garden .fixture-tree { bottom: 25%; width: 24%; height: 49%; background: #3f6e52; }
.fixture-scene--garden .fixture-tree-two { right: 14%; }
.fixture-scene--garden .fixture-subject { left: 42%; background: #806652; }
.fixture-scene--ceremony .fixture-sky { background: #d9cfc6; }
.fixture-scene--ceremony .fixture-ground { background: #b9a89a; }
.fixture-scene--ceremony .fixture-building { background: #aa8d78; }
.fixture-scene--ceremony .fixture-tree { background: #6b7b69; }
.fixture-scene--ceremony .fixture-subject { left: 56%; height: 50%; background: #f3eee5; }
.fixture-viewer-meta { position: absolute; right: 13px; bottom: 12px; left: 13px; display: grid; gap: 2px; padding: 10px 11px; border: 1px solid rgb(255 255 255 / 25%); border-radius: 4px; color: #fff; background: rgb(20 33 29 / 78%); }
.fixture-viewer-meta span { color: #b9e5ce; font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.fixture-viewer-meta strong { font-size: 13px; }
.fixture-viewer-meta small { color: #d7e1db; font-size: 10px; }
.fixture-filmstrip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.fixture-film-item { display: grid; min-width: 0; min-height: 42px; gap: 1px; padding: 6px 5px; border: 1px solid #cbd5cf; border-radius: 4px; color: var(--muted); background: #fff; text-align: left; }
.fixture-film-item:hover, .fixture-film-item.is-active { border-color: #5f9276; color: #1f5a42; background: #edf6ef; }
.fixture-film-item span { font-size: 11px; font-weight: 850; }
.fixture-film-item small { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.workbench-inspector { min-width: 0; overflow: hidden; border-left: 1px solid var(--line); padding-left: 16px; }
.workbench-control-section { display: grid; gap: 8px; padding: 0 0 8px; border-bottom: 1px solid var(--line); }
.workbench-control-section + .workbench-control-section { padding-top: 8px; }
.workbench-control-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.workbench-control-head .detail-kicker { margin-bottom: 4px; }
.workbench-control-head h3 { margin: 0; font-size: 13px; }
.workbench-control-head > strong { color: var(--pine); font-size: 10px; text-align: right; }
.workbench-control-section label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 750; }
.workbench-control-section select, .workbench-control-section input[type="text"] { width: 100%; min-height: 30px; padding: 0 7px; border: 1px solid #cbd4cd; border-radius: 4px; color: var(--ink); background: #fff; }
.workbench-control-section input[type="range"] { width: 100%; margin: 0; accent-color: var(--pine); }
.range-value { color: var(--pine); font-size: 10px; }
.workbench-control-section .fixture-check { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 11px; }
.workbench-policy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px 8px; }
.workbench-policy-grid > label { min-width: 0; }
.workbench-policy-grid .workbench-quality-control, .workbench-policy-grid .workbench-selection-message { grid-column: 1 / -1; }
.workbench-policy-grid .fixture-check { align-self: end; min-height: 30px; }
.fixture-choice-grid, .fixture-tags { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.fixture-choice, .fixture-tag { min-height: 27px; padding: 0 5px; border: 1px solid #bcc9c0; border-radius: 4px; color: #456155; background: #fff; font-size: 9px; font-weight: 800; }
.fixture-choice.is-active, .fixture-tag.is-active { border-color: #4f8a6d; color: #1f563e; background: #e7f4eb; }
.fixture-note { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.35; }
.workbench-lifecycle { display: grid; gap: 3px; padding-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.workbench-lifecycle strong { color: var(--ink); font-size: 11px; }

.publish-dialog { width: min(600px, calc(100vw - 32px)); max-height: min(660px, calc(100dvh - 32px)); padding: 0; overflow: auto; border: 1px solid #9fb3a5; border-radius: 6px; color: var(--ink); background: #fbfcf9; box-shadow: 0 24px 60px rgb(18 33 26 / 28%); }
.publish-dialog::backdrop { background: rgb(13 24 19 / 48%); }
.publish-dialog-card { padding: 22px; }
.publish-dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.publish-dialog-head .detail-kicker { margin-bottom: 5px; }
.publish-dialog-head h2 { margin: 0; font-family: Georgia, serif; font-size: 25px; }
.publish-dialog-close { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; padding: 0; border: 1px solid #bcc9c0; border-radius: 4px; color: #335044; background: #fff; font-size: 16px; font-weight: 850; line-height: 1; }
.publish-dialog-close:hover { border-color: #709b83; background: #f1f7f2; }
.publish-dialog-status { margin: 15px 0 12px; color: var(--muted); font-size: 13px; }
.publish-access-fields { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 10px; }
.publish-access-fields label, .publish-message-field { display: grid; min-width: 0; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 800; }
.publish-access-fields .publish-link-field, .publish-message-field { grid-column: 1 / -1; }
.publish-access-fields input, .publish-message-field textarea { width: 100%; min-height: 34px; padding: 7px 8px; border: 1px solid #cbd4cd; border-radius: 4px; color: var(--ink); background: #fff; font: inherit; font-weight: 650; }
.publish-message-field { margin-top: 12px; }
.publish-message-field textarea { min-height: 92px; resize: vertical; line-height: 1.45; }
.publish-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.publish-dialog-actions a, .publish-dialog-actions button { display: grid; min-height: 36px; place-items: center; padding: 0 10px; border: 1px solid #285a48; border-radius: 4px; color: #fff; background: var(--pine); font-size: 12px; font-weight: 850; text-decoration: none; }
.publish-dialog-actions button { border-color: #9ebfae; color: #28513f; background: #fff; }
.publish-dialog-actions a:hover { background: #245642; }
.publish-dialog-actions button:hover { border-color: #709b83; background: #f1f7f2; }
.publish-dialog-note { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }

.detail-panel { min-height: 0; border-left: 1px solid var(--line); background: #fbfcf9; overflow: auto; }
.detail-empty, .detail-content { padding: 28px 22px; }
.detail-empty { color: var(--muted); font-size: 13px; line-height: 1.7; }
.detail-kicker { margin: 0 0 7px; color: var(--pine); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.detail-content h2 { margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 23px; line-height: 1.25; }
.detail-client { margin: 7px 0 20px; color: var(--muted); font-size: 13px; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 22px; }
.detail-actions button:last-child { grid-column: span 2; border-color: #d4b1a9; color: #843f35; }
.detail-section { padding: 16px 0; border-top: 1px solid var(--line); }
.detail-section h3 { margin: 0 0 11px; font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 8px; }
.detail-grid span { display: block; color: var(--muted); font-size: 10px; }
.detail-grid strong { display: block; margin-top: 3px; font-size: 13px; }
.detail-timeline { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.detail-timeline li { position: relative; padding-left: 14px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.detail-timeline li::before { position: absolute; top: 5px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--pine); content: ""; }
.detail-timeline strong { color: var(--ink); }

.gallery-overview, .storage-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gallery-card, .storage-card { min-height: 170px; padding: 22px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: var(--shadow); }
.gallery-card h2, .storage-card h2 { margin: 7px 0 5px; font-family: Georgia, "Noto Serif SC", serif; font-size: 24px; }
.gallery-card p, .storage-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.storage-breakdown { display: grid; gap: 12px; margin-top: 21px; }
.storage-row { display: grid; grid-template-columns: 80px 1fr 52px; gap: 8px; align-items: center; font-size: 12px; }
.storage-row .meter { margin: 0; background: #e5ece6; }
.storage-row .meter span { background: var(--pine); }
.storage-row strong { text-align: right; }
.activity-list { display: grid; gap: 0; max-width: 760px; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.activity-list li { display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; padding: 15px 17px; border-bottom: 1px solid var(--line); font-size: 12px; }
.activity-list li:last-child { border-bottom: 0; }
.activity-list time { color: var(--muted); }
.activity-list span { color: var(--muted); }

.toast { position: fixed; right: 24px; bottom: 22px; z-index: 3; max-width: min(360px, calc(100vw - 48px)); padding: 12px 15px; border-radius: 5px; color: #fff; background: #1f332b; box-shadow: 0 16px 30px rgb(10 23 17 / 20%); font-size: 13px; font-weight: 700; }

@media (max-width: 1160px) {
  .studio-shell { grid-template-columns: 164px minmax(0, 1fr) 250px; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
  .studio-shell.is-workbench { grid-template-columns: 164px minmax(0, 1fr); }
  .studio-shell.is-workbench #workbenchView { padding: 16px 20px 18px; }
  .workbench-layout { grid-template-columns: minmax(0, 1fr) 276px; }
  .side-rail { padding: 22px 12px 16px; }
  .nav-list { margin-top: 34px; }
  .nav-item { padding: 0 9px; }
  .topbar { min-height: 92px; padding: 18px 20px; }
  .view-panel { padding: 16px 20px 18px; }
  .summary-strip article { min-height: 68px; padding: 11px; }
  .library-toolbar { grid-template-columns: minmax(130px, 1fr) 108px 108px; }
  .library-toolbar label:last-child { display: none; }
  .detail-panel { grid-column: 3; border-top: 0; border-left: 1px solid var(--line); }
}

@media (max-width: 820px) {
  body { height: auto; }
  .studio-shell { display: block; height: auto; min-height: 100dvh; overflow: visible; }
  .side-rail { min-height: auto; padding: 16px; }
  .brand { display: block; }
  .brand span, .brand strong, .brand em { display: inline; margin: 0; }
  .brand strong { margin-left: 3px; font-size: 17px; }
  .brand em { margin-left: 8px; font-size: 9px; }
  .nav-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; margin-top: 14px; overflow: visible; }
  .nav-item { min-width: 0; min-height: 36px; padding: 4px 2px; font-size: 9px; line-height: 1.15; text-align: center; white-space: normal; }
  .rail-storage { display: none; }
  .workspace { min-height: auto; overflow: visible; }
  .studio-shell.is-workbench { display: block; height: auto; min-height: 100dvh; overflow: visible; }
  .studio-shell.is-workbench #workbenchView { padding: 14px 16px 22px; overflow: visible; }
  .project-workbench { height: auto; min-height: 0; }
  .workbench-head { grid-template-columns: minmax(0, 1fr) auto; }
  .workbench-context { grid-column: 1 / -1; grid-row: 1; }
  .workbench-head .workbench-back { grid-column: 1; grid-row: 2; justify-self: start; }
  .workbench-head-actions { grid-column: 2; grid-row: 2; }
  .workbench-layout { grid-template-columns: minmax(0, 1fr); }
  .workbench-review { min-height: 0; }
  .fixture-viewer { min-height: 340px; height: 52dvh; }
  .fixture-review-toolbar { align-items: start; flex-direction: column; }
  .fixture-nav { width: 100%; justify-content: space-between; }
  .fixture-filmstrip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workbench-inspector { overflow: visible; border-top: 1px solid var(--line); border-left: 0; padding: 16px 0 0; }
  .workbench-policy-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .publish-dialog-card { padding: 18px; }
  .publish-access-fields { grid-template-columns: minmax(0, 1fr) 116px; }
  .detail-panel { min-height: auto; border-top: 1px solid var(--line); }
  .topbar { min-height: 86px; padding: 16px; }
  h1 { font-size: 26px; }
  .safe-mode { display: none; }
  .view-panel { padding: 14px 16px 22px; overflow: visible; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-strip article { min-height: 67px; padding: 11px; }
  .summary-strip strong { font-size: 22px; }
  .library-toolbar { grid-template-columns: 1fr 1fr; }
  .lifecycle-guide { grid-template-columns: 1fr; gap: 9px; }
  .library-toolbar .search-field { grid-column: span 2; }
  .table-wrap { max-height: none; }
  table { min-width: 720px; }
  .project-library { overflow: auto; }
  .gallery-overview, .storage-overview { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .workbench-head-actions { align-items: end; flex-direction: column-reverse; }
  .publish-dialog { width: calc(100vw - 22px); max-height: calc(100dvh - 22px); }
  .publish-dialog-card { padding: 16px; }
  .publish-dialog-head h2 { font-size: 22px; }
  .publish-access-fields, .publish-dialog-actions { grid-template-columns: 1fr; }
  .publish-access-fields .publish-link-field, .publish-message-field { grid-column: auto; }
  .topbar-actions { gap: 0; }
  .primary-action { padding: 0 10px; font-size: 12px; }
  .bulk-bar { align-items: flex-start; flex-direction: column; }
  .activity-list li { grid-template-columns: 1fr; gap: 5px; }
}
