:root {
  color-scheme: light dark;
  font-family:
    -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--ink);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --ink: #21232c;
  --secondary: #54596c;
  --muted: #646b7d;
  --accent: #3d4eb0;
  --accent-deep: #344397;
  --tint: #eceefa;
  --line: #2629471c;
  --editor: #fdfdfd;
  --neutral: #f2f2f6;
  --rail: rgba(235, 238, 249, 0.66);
  --toolbar: rgba(250, 250, 255, 0.79);
  --inspector: rgba(237, 239, 248, 0.77);
  --glass-edge: rgba(255, 255, 255, 0.87);
  --glyph-cut: #fff;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #cbd0e6;
}
button,
select {
  font: inherit;
}
button {
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #768aea;
  outline-offset: 3px;
}
button,
select {
  touch-action: manipulation;
}
button {
  transition:
    background-color 130ms var(--ease),
    color 130ms var(--ease),
    box-shadow 150ms var(--ease),
    transform 130ms var(--ease);
}
button:enabled:active {
  transform: translateY(1px);
}
button:disabled {
  color: var(--muted);
}
h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}
svg {
  flex: none;
  vertical-align: middle;
}
svg.lucide {
  stroke-width: 1.65;
}
button,
select {
  -webkit-tap-highlight-color: transparent;
}
::selection {
  background: #ccd5ff;
  color: #232c62;
}
.app {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  position: relative;
  background:
    radial-gradient(ellipse at 95% 0%, #efdfda, transparent 45%),
    radial-gradient(ellipse at 6% 12%, #c3e0ee, transparent 54%),
    linear-gradient(141deg, #aac6da, #b4bfe4 65%, #d2c5dc);
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 20;
  background: white;
  color: #2944a4;
  padding: 9px 13px;
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}
.app-window {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.topbar {
  --bar-height: 64px;
  --bar-padding: 24px;
  flex: none;
  height: calc(var(--bar-height) + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: env(safe-area-inset-top) max(var(--bar-padding), env(safe-area-inset-right)) 0 max(var(--bar-padding), env(safe-area-inset-left));
  background: var(--toolbar);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
  box-shadow: inset 0 1px 0 #fff7;
}
.topbar,
.checklist-pane,
.preview-pane,
.mobile-tabs,
.toast,
.drop-overlay > div,
.reader-tools,
.reader-bottom {
  -webkit-backdrop-filter: blur(28px) saturate(1.25);
  backdrop-filter: blur(28px) saturate(1.25);
}
.brand,
.header-actions,
.btn,
.rail-heading,
.ref-open,
.ref-actions,
.reference-section h3,
.ref-empty,
.privacy,
.editor-heading,
.import-actions,
.list-heading,
.list-heading > span,
.file-meta,
.row-actions,
.pager,
.page-choice,
.preview-heading,
.board-tools,
.output-info,
.reader-tools,
.reader-tools h2,
.reader-bottom,
.error-strip,
.error-strip button,
.toast,
.mobile-tabs button {
  display: flex;
  align-items: center;
}
.brand {
  gap: 11px;
}
.brand h1 {
  font-size: 19px;
  letter-spacing: -0.03em;
  line-height: 1.3;
  font-weight: 650;
}
.studio-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #667ac6 0%, #3a477e 45%, #27314e 100%);
  box-shadow:
    inset 0 1px 1px #dee6ff88,
    0 3px 7px #26325e33;
}
.header-actions {
  gap: 12px;
}
.size-switch {
  display: inline-flex;
  position: relative;
  align-items: center;
  min-height: 40px;
  gap: 7px;
  white-space: nowrap;
  cursor: pointer;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 560;
}
.size-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.switch-track {
  width: 31px;
  height: 19px;
  padding: 2px;
  border-radius: 20px;
  background: #858da1;
  transition: background-color 160ms var(--ease);
}
.switch-track::after {
  content: '';
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px #25304746;
  transition: transform 160ms var(--ease);
}
.size-switch input:checked + .switch-track {
  background: var(--accent);
}
.size-switch input:checked + .switch-track::after {
  transform: translateX(12px);
}
.size-switch input:focus-visible + .switch-track {
  outline: 3px solid #768aea;
  outline-offset: 3px;
}
.limit-short { display: none; }
.size-warning {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  color: #754b20;
  background: #fcf2df;
  font-size: 12px;
  line-height: 1.5;
}
.btn {
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 590;
  white-space: nowrap;
}
.btn:enabled:hover {
  transform: translateY(-1px);
}
.btn:enabled:active {
  transform: translateY(1px) scale(0.985);
}
.export,
.pick-files {
  background: var(--accent);
  color: #fff;
  box-shadow:
    inset 0 1px 0 #ffffff3b,
    0 2px 4px #343b8129;
}
.export:enabled:hover,
.pick-files:hover {
  background: var(--accent-deep);
}
.export:disabled {
  background: #dce0ee;
  color: #737b94;
  box-shadow: inset 0 1px #ffffff67;
}
.preview-toggle,
.icon-button {
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 7px;
  color: var(--secondary);
}
.preview-toggle {
  width: 35px;
  height: 35px;
}
.icon-button {
  width: 30px;
  height: 30px;
}
.icon-button svg {
  max-width: 16px;
  max-height: 16px;
}
.preview-toggle:hover,
.icon-button:enabled:hover {
  color: var(--accent);
  background: var(--tint);
}
.icon-button:disabled {
  opacity: 0.48;
}
.workspace-grid {
  --rail-width: clamp(224px, 17vw, 320px);
  --inspector-width: clamp(300px, 30vw, 900px);
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr) var(--inspector-width);
}
.inspector-closed .workspace-grid {
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
}
.inspector-closed .preview-pane {
  display: none;
}
.checklist-pane,
.editor-pane,
.preview-pane {
  min-width: 0;
  min-height: 0;
}
.checklist-pane {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--rail);
  padding: 26px 18px 17px;
}
.rail-scroll {
  overflow: auto;
  min-height: 0;
  padding: 0 2px 12px;
}
.rail-heading,
.editor-heading,
.list-heading,
.preview-heading,
.reader-tools,
.reader-bottom {
  justify-content: space-between;
  gap: 10px;
}
.rail-heading h2,
.preview-heading h2 {
  font-size: 17px;
  font-weight: 640;
  letter-spacing: -0.02em;
}
.rail-total,
.cat-count,
.item-total,
.file-meta,
.page-choice,
.board-tools {
  font-variant-numeric: tabular-nums;
}
.rail-total {
  font-size: 12px;
  font-weight: 590;
  color: var(--secondary);
}
.check-meter {
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  margin: 12px 0 24px;
  background: #777f9e31;
}
.check-meter i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  transition: transform 210ms var(--ease);
}
.rail-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}
.checklist {
  margin: 6px -1px 0;
}
.check-row {
  width: 100%;
  display: grid;
  grid-template-columns: 14px 23px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 4px;
  text-align: left;
  border-radius: 8px;
  min-height: 46px;
}
.check-row:enabled:hover,
.check-row:focus-visible {
  background: #ffffff61;
}
.cat-name {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 530;
}
.cat-count {
  display: flex;
  gap: 4px;
  align-items: baseline;
  color: var(--muted);
  font-size: 11px;
}
.cat-count b {
  color: var(--ink);
  font-size: 12px;
  font-weight: 610;
}
.cat-count i {
  font-style: normal;
  color: #9297a8;
}
.check-box {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border: 1.25px solid #939cb0;
  border-radius: 50%;
  background: #ffffff54;
  transition:
    background-color 140ms var(--ease),
    border-color 140ms var(--ease);
}
.check-row[aria-checked='true'] .check-box {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  animation: check-in 200ms var(--ease);
}
.check-box svg {
  stroke-dasharray: 20;
  stroke-dashoffset: 0;
  animation: draw-check 190ms var(--ease);
}
@keyframes check-in {
  0% {
    transform: scale(0.83);
  }
  65% {
    transform: scale(1.09);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes draw-check {
  from {
    stroke-dashoffset: 20;
  }
  to {
    stroke-dashoffset: 0;
  }
}
.material-glyph {
  display: block;
}
.glyph-edit {
  color: #535dba;
}
.glyph-production {
  color: #5e76a9;
}
.glyph-character {
  color: #8c6596;
}
.glyph-assets {
  color: #3e867c;
}
.glyph-script {
  color: #4779b2;
}
.rail-hint {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 9px 3px 0;
}
.reference-section {
  margin-top: 25px;
  border-top: 1px solid var(--line);
  padding-top: 21px;
}
.reference-section h3,
.layout-rules h3,
.list-heading h3 {
  font-size: 14px;
  font-weight: 640;
  letter-spacing: -0.01em;
}
.ref-empty {
  width: 100%;
  justify-content: flex-start;
  gap: 8px;
  background: #ffffff55;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 11px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--secondary);
}
.ref-empty svg:last-child {
  margin-left: auto;
}
.ref-empty:hover {
  background: #fffffff0;
}
.reference-list {
  padding: 0;
  list-style: none;
  margin-top: 10px;
}
.reference-list li {
  padding: 5px 0;
}
.ref-open {
  width: 100%;
  gap: 6px;
  text-align: left;
  padding: 3px 0;
  font-size: 12px;
  color: var(--ink);
}
.ref-open > span:nth-child(2) {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ref-open > svg {
  margin-left: auto;
  color: var(--muted);
}
.ref-file {
  color: var(--accent);
}
.ref-source {
  flex: none;
  font-size: 10px;
  color: var(--secondary);
}
.restore-reference {
  padding: 3px 0;
  color: var(--accent);
}
.ref-actions {
  padding-left: 22px;
  justify-content: space-between;
}
.ref-actions > button:first-child {
  padding: 2px 0;
  color: var(--accent);
  font-size: 11px;
}
.privacy {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 15px 3px 0;
  gap: 7px;
  font-size: 11px;
  color: var(--secondary);
}
.editor-pane {
  background: var(--editor);
  padding: 29px clamp(21px, 2.6vw, 43px);
  overflow: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #aeb3c446 transparent;
}
.editor-heading {
  align-items: flex-start;
}
.editor-heading h2 {
  font-size: clamp(27px, 2.2vw, 36px);
  font-weight: 660;
  letter-spacing: -0.035em;
  line-height: 1.27;
}
.editor-heading p {
  font-size: 13px;
  color: var(--secondary);
  line-height: 1.65;
  margin-top: 5px;
}
.item-total {
  font-size: 12px;
  color: var(--secondary);
  padding-top: 9px;
}
.intake {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 25px;
  min-height: clamp(220px, 31dvh, 390px);
  border-radius: 15px;
  padding: 28px clamp(22px, 2.5vw, 50px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  background:
    radial-gradient(ellipse at 78% 26%, #e7e9ff 0%, transparent 55%),
    linear-gradient(116deg, #f1f2fb 0%, #e9ecf9 57%, #cfd9ef 100%);
}
.intake-art {
  width: 39%;
  height: 100%;
  position: absolute;
  right: 2%;
  top: 0;
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.intake-art img {
  display: block;
  object-fit: contain;
  width: 100%;
  height: 85%;
  max-width: clamp(228px, 18vw, 355px);
  filter: drop-shadow(0 10px 8px #394a8230);
  transform: rotate(-4deg);
  transition: transform 260ms var(--ease);
}
.intake:hover .intake-art img {
  transform: translateY(-3px) rotate(-2deg);
}
.intake-copy {
  max-width: 64%;
  color: #24273d;
}
.intake-copy h3 {
  font-size: clamp(23px, 1.8vw, 32px);
  line-height: 1.35;
  font-weight: 625;
  letter-spacing: -0.03em;
}
.intake-copy p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: #545975;
}
.import-actions {
  gap: 6px;
  flex-wrap: wrap;
}
.intake:not(.compact) .import-actions {
  margin-top: 20px;
}
.pick-files {
  font-size: 12.5px;
  padding: 0 12px;
  min-height: 35px;
}
.pick-folder {
  font-size: 12.5px;
  color: #3e4764;
  background: #ffffff9e;
  box-shadow: inset 0 0 0 1px #626b8c33;
  min-height: 35px;
  padding: 0 10px;
}
.pick-folder:hover {
  background: white;
}
.intake.compact {
  min-height: 0;
  margin-top: 16px;
  background: none;
  padding: 0;
  overflow: visible;
  border-radius: 0;
}
.read-status {
  color: var(--muted);
  font-size: 12px;
}
.layout-rules,
.ordered {
  margin-top: 29px;
}
.layout-rules dl {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}
.layout-rules dl > div {
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(95px, 0.76fr) minmax(140px, 1.4fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.layout-rules dt {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 540;
}
.layout-rules dt svg {
  color: var(--secondary);
}
.layout-rules dd {
  color: var(--secondary);
  font-size: 12.5px;
  line-height: 1.55;
}
.ordered {
  margin-top: 24px;
}
.list-heading {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.list-heading > span {
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
}
.touch-hint {
  display: none;
}
@media (hover: none), (max-width: 600px) {
  .pointer-hint {
    display: none;
  }
  .touch-hint {
    display: inline;
  }
}
.file-list {
  position: relative;
  list-style: none;
  padding: 0;
}
.material-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 69px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.material-row.is-dragging {
  opacity: 0.46;
}
.material-row[data-insert]:after {
  position: absolute;
  content: '';
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 4px;
}
.material-row[data-insert='before']:after {
  top: -1px;
}
.material-row[data-insert='after']:after {
  bottom: -1px;
}
.row-handle {
  position: relative;
  display: grid;
  place-items: center;
  width: 19px;
  flex: 0 0 19px;
  align-self: stretch;
  cursor: grab;
  user-select: none;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.row-handle:active {
  cursor: grabbing;
}
.row-handle svg {
  position: absolute;
  opacity: 0;
}
.material-row:hover .row-handle svg,
.material-row:focus-within .row-handle svg {
  opacity: 1;
}
.material-row:hover .row-handle span,
.material-row:focus-within .row-handle span {
  opacity: 0;
}
.file-thumb {
  width: 58px;
  flex: 0 0 58px;
  height: 40px;
  border-radius: 6px;
  background: var(--neutral);
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  color: var(--accent);
  padding: 0;
  border: 1px solid var(--line);
}
.file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #21232c;
}
.file-thumb b,
.pdf-mark b {
  position: absolute;
  font-size: 7px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  border-radius: 3px;
  padding: 0 3px;
  background: var(--accent);
  color: white;
  font-weight: 650;
}
.file-thumb b {
  right: 3px;
  bottom: 3px;
}
.row-detail {
  flex: 1;
  min-width: 0;
}
.file-title {
  display: block;
  max-width: 100%;
  padding: 0;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 565;
}
.file-title:disabled {
  color: var(--ink);
}
.file-title:enabled:hover,
.page-link:hover {
  color: var(--accent);
}
.file-meta {
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10.8px;
  color: var(--muted);
  margin-top: 4px;
}
.category-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}
.category-select select {
  appearance: none;
  border: 0;
  border-radius: 3px;
  background: var(--neutral);
  padding: 2px 13px 2px 4px;
  color: var(--secondary);
  font-size: 10.8px;
  cursor: pointer;
}
.category-select svg {
  pointer-events: none;
  position: absolute;
  right: 1px;
}
.page-link {
  font-size: 10.8px;
  color: var(--accent);
  padding: 1px 0;
}
.file-note {
  display: block;
  margin-top: 3px;
  color: var(--secondary);
  font-size: 11px;
  line-height: 1.5;
}
.row-actions {
  gap: 0;
}
.row-actions .icon-button {
  width: 23px;
  height: 28px;
}
.row-actions svg {
  width: 14px;
  height: 14px;
}
.delete:enabled:hover {
  color: #a3384a;
  background: #efdce0;
}
@media (hover: hover) and (pointer: fine) {
  .row-actions {
    opacity: 0;
    transition: opacity 130ms var(--ease);
  }
  .material-row:hover .row-actions,
  .material-row:focus-within .row-actions {
    opacity: 1;
  }
}
.preview-pane {
  display: flex;
  flex-direction: column;
  overflow: auto;
  background: var(--inspector);
  border-left: 1px solid var(--line);
  padding: 26px clamp(15px, 1.7vw, 28px) 20px;
}
.preview-heading {
  min-height: 29px;
  margin-bottom: 16px;
}
.preview-board {
  display: flex;
  flex-direction: column;
  flex: 1 0 220px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(148deg, #5d6377, #484f64 62%, #444b61);
  box-shadow: inset 0 0 0 1px #262d4517;
}
.stage {
  flex: 1;
  container-type: size;
  padding: clamp(16px, 1.65vw, 28px) clamp(15px, 2.15vw, 36px);
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
}
.stage > .paper {
  width: min(100%, calc(100cqh * var(--page-ratio, 0.70707)));
}
.preview-heading,
.board-tools,
.output-info {
  flex: none;
}
.paper {
  width: 100%;
  background: white;
  color: #20232b;
  box-shadow:
    0 1px 3px #10142333,
    0 9px 20px #141a2c55;
}
.paper canvas {
  display: block;
  width: 100%;
  height: auto;
}
.guide-paper {
  position: relative;
  aspect-ratio: 210/297;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 2.4%;
  gap: 0;
}
.guide-slot {
  width: 100%;
  aspect-ratio: 1.86;
  background-image: url('./frames.jpg');
  background-repeat: no-repeat;
  background-size: 100% 200%;
  display: block;
}
.shot-one {
  background-position: center top;
}
.shot-two {
  background-position: center bottom;
}
.board-tools {
  justify-content: space-between;
  gap: 7px;
  min-height: 35px;
  padding: 4px 11px;
  color: #e7e9f4;
  background: #1a20372c;
  font-size: 11px;
}
.pager {
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.page-choice {
  gap: 4px;
}
.page-choice select {
  color: inherit;
  appearance: auto;
  font-size: 12px;
  border: 0;
  background: transparent;
  min-height: 25px;
  cursor: pointer;
  padding: 0 1px;
}
.page-choice option {
  background: #fff;
  color: #232630;
}
.board-tools .icon-button {
  color: #f0f1ff;
  width: 25px;
  height: 25px;
}
.board-tools .icon-button:hover:enabled {
  background: #ffffff24;
  color: #fff;
}
.board-tools .icon-button:disabled {
  opacity: 0.46;
}
.output-info {
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding: 17px 1px 0;
}
.pdf-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 33px;
  width: 33px;
  height: 37px;
  color: #626b85;
}
.pdf-mark b {
  bottom: 5px;
  right: 0;
  background: #765569;
  font-size: 7px;
}
.output-info h3 {
  font-size: 13px;
  font-weight: 595;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.output-info p {
  font-size: 11.5px;
  color: var(--secondary);
  margin-top: 2px;
}
.loading-paper {
  width: 100%;
  aspect-ratio: 210/297;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  color: #545b73;
  background: #f5f5fa;
  font-size: 12px;
}
.spin {
  animation: turn 0.9s linear infinite;
}
@keyframes turn {
  to {
    transform: rotate(360deg);
  }
}
.updating,
.preview-error {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  background: #fff;
  color: #454b65;
}
.updating {
  position: absolute;
  bottom: 17px;
  box-shadow: 0 3px 9px #2227;
}
.error-strip {
  justify-content: space-between;
  gap: 8px;
  color: #953e4b;
  background: #faf0ef;
  font-size: 12px;
  border-radius: 8px;
  padding: 10px;
  margin-top: 14px;
}
.error-strip button {
  gap: 5px;
  white-space: nowrap;
  color: var(--accent);
}
.reader-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: var(--editor);
}
.reader-dialog[open] {
  animation: reader-in 160ms var(--ease);
}
@keyframes reader-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes dialog-in {
  from {
    opacity: 0.5;
    transform: translateY(7px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.reader-dialog::backdrop {
  background: #1c253c62;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.dialog-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.reader-tools,
.reader-bottom {
  background: var(--toolbar);
  padding: 10px 17px;
  flex: none;
}
.reader-tools h2 {
  gap: 8px;
  min-width: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.reader-scroll {
  position: relative;
  min-height: 0;
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  background: #575d6d;
  scrollbar-color: #9398ac #52596b;
  scrollbar-width: thin;
  padding: 16px clamp(12px, 3vw, 44px);
  overflow-anchor: none;
}
.reader-page {
  position: relative;
  aspect-ratio: var(--page-ratio, 210/297);
  width: 100%;
  margin: 0 auto 16px;
  max-width: clamp(720px, 72vw, 1050px);
}
.reader-page:last-child {
  margin-bottom: 0;
}
.reader-placeholder {
  width: 100%;
  height: 100%;
  background: white;
  box-shadow: 0 3px 12px #2224;
}
.reader-page .paper {
  position: absolute;
  inset: 0;
}
.reader-page canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.reader-scroll > p {
  color: white;
  padding: 24px;
}
.reader-bottom > span {
  font-size: 12px;
  color: var(--secondary);
}
.reader-bottom .pager {
  width: auto;
  gap: 12px;
}
.toast {
  position: fixed;
  bottom: max(15px, 2.2vh);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  max-width: calc(100vw - 24px);
  width: max-content;
  gap: 9px;
  padding: 6px 7px 6px 13px;
  border-radius: 12px;
  color: var(--ink);
  font-size: 12px;
  background: var(--toolbar);
  box-shadow: 0 4px 20px #20274132;
  border: 1px solid var(--glass-edge);
  animation: toast-in 160ms var(--ease);
}
.toast > svg {
  color: var(--accent);
}
@keyframes toast-in {
  from {
    opacity: 0;
    translate: 0 5px;
  }
  to {
    opacity: 1;
    translate: none;
  }
}
.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  display: grid;
  place-items: center;
  background: #434fa232;
  border: 3px solid #7989cb;
}
.drop-overlay > div {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 19px 27px;
  color: #323f83;
  background: #f0f2fff0;
  border-radius: 17px;
  box-shadow: 0 10px 35px #29376c36;
  animation: dialog-in 150ms var(--ease);
}
.drop-overlay strong {
  font-weight: 620;
  font-size: 18px;
}
.mobile-tabs {
  display: none;
}
@media (min-width: 1600px) {
  .intake-art {
    right: 6%;
  }
}
@media (max-width: 1250px) and (min-width: 1001px) {
  .workspace-grid {
    --rail-width: 207px;
    --inspector-width: 29vw;
  }
  .checklist-pane {
    padding-inline: 12px;
  }
  .check-row {
    gap: 6px;
  }
  .editor-pane {
    padding-inline: 20px;
  }
  .intake {
    padding-inline: 18px;
  }
  .intake-art {
    right: 1%;
    width: 35%;
  }
  .cat-name {
    font-size: 12.5px;
  }
  .row-actions .icon-button {
    width: 20px;
  }
  .file-thumb {
    width: 44px;
    flex-basis: 44px;
  }
}
@media (max-width: 1000px) {
  .topbar {
    --bar-height: 62px;
    --bar-padding: 20px;
  }
  .preview-toggle {
    display: none;
  }
  .workspace-grid,
  .inspector-closed .workspace-grid {
    display: flex;
    min-height: 0;
  }
  .workspace-grid > aside,
  .workspace-grid > section {
    width: 100%;
    border: 0;
  }
  .tab-edit .checklist-pane,
  .tab-edit .preview-pane,
  .tab-materials .editor-pane,
  .tab-materials .preview-pane,
  .tab-preview .editor-pane,
  .tab-preview .checklist-pane {
    display: none;
  }
  .tab-preview .preview-pane {
    display: flex;
  }
  .checklist-pane,
  .editor-pane,
  .preview-pane {
    padding: 24px clamp(18px, 5vw, 40px);
  }
  .mobile-tabs {
    --tab-position: 1;
    --tabs-inset: max(8px, env(safe-area-inset-left), env(safe-area-inset-right));
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 5px var(--tabs-inset) max(5px, env(safe-area-inset-bottom));
    position: relative;
    isolation: isolate;
    flex: none;
    width: 100%;
    border-top: 1px solid var(--line);
    background: var(--toolbar);
  }
  .tab-materials .mobile-tabs {
    --tab-position: 0;
  }
  .tab-preview .mobile-tabs {
    --tab-position: 2;
  }
  .mobile-tabs::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 5px;
    bottom: max(5px, env(safe-area-inset-bottom));
    left: var(--tabs-inset);
    width: calc((100% - 2 * var(--tabs-inset)) / 3);
    border-radius: 9px;
    background: var(--tint);
    transform: translateX(calc(var(--tab-position) * 100%));
    transition: transform 220ms var(--ease);
  }
  .mobile-tabs button {
    justify-content: center;
    gap: 7px;
    height: 36px;
    color: var(--secondary);
    font-size: 13px;
    font-weight: 550;
  }
  .mobile-tabs button[aria-pressed='true'] {
    color: var(--accent);
  }
  .preview-board,
  .output-info {
    width: 100%;
  }
  .stage {
    padding: 22px min(6vw, 42px);
  }
  .privacy {
    margin-top: 24px;
  }
  .rail-label,
  .check-row {
    padding-inline: 5px;
  }
  .check-row {
    min-height: 49px;
  }
  .cat-name {
    font-size: 14px;
  }
  .toast {
    bottom: 78px;
  }
  .intake {
    min-height: 223px;
  }
  .intake-art {
    right: 4%;
    width: 38%;
  }
}
@media (max-width: 600px) {
  .header-actions { gap: 7px; }
  .size-switch { gap: 4px; font-size: 11px; }
  .limit-long { display: none; }
  .limit-short { display: inline; }
  .topbar {
    --bar-height: 58px;
    --bar-padding: 16px;
  }
  .brand {
    gap: 8px;
  }
  .brand h1 {
    font-size: 16px;
  }
  .studio-mark {
    width: 31px;
    height: 31px;
    border-radius: 9px;
  }
  .studio-mark svg {
    width: 23px;
  }
  .export {
    font-size: 12px;
    padding: 0 11px;
    min-height: 34px;
  }
  .checklist-pane,
  .editor-pane,
  .preview-pane {
    padding: 22px 17px 20px;
  }
  .editor-heading h2 {
    font-size: 25px;
  }
  .editor-heading p {
    font-size: 12.5px;
  }
  .intake {
    min-height: 211px;
    margin-top: 19px;
    padding: 20px 16px;
    justify-content: flex-end;
  }
  .intake-art {
    width: 40%;
    right: 1.5%;
    top: 4px;
    height: 75%;
  }
  .intake-copy {
    max-width: 60%;
  }
  .intake-copy h3 {
    font-size: 21px;
  }
  .intake-copy p {
    max-width: 145px;
    font-size: 12px;
  }
  .intake:not(.compact) .import-actions {
    margin-top: 16px;
  }
  .layout-rules,
  .ordered {
    margin-top: 24px;
  }
  .layout-rules dl > div {
    grid-template-columns: 90px 1fr;
  }
  .layout-rules dd {
    font-size: 12px;
  }
  .row-handle {
    display: none;
  }
  .row-actions {
    opacity: 1;
  }
  .row-actions .icon-button {
    height: 44px;
    width: clamp(34px, 10.5vw, 44px);
  }
  .material-row {
    gap: 6px;
    min-height: 66px;
  }
  .file-thumb {
    width: 41px;
    flex-basis: 41px;
    height: 34px;
  }
  .file-title {
    font-size: 13px;
  }
  .file-meta {
    gap: 4px;
  }
  .file-meta > span {
    font-size: 10px;
  }
  .mobile-tabs button {
    height: 42px;
  }
  .reader-scroll {
    padding: 12px 8px;
  }
  .reader-tools,
  .reader-bottom {
    padding: 8px 11px;
  }
  .reader-tools h2 {
    font-size: 14px;
  }
  .preview-heading {
    margin-bottom: 11px;
  }
  .stage {
    padding-block: 16px;
  }
  .output-info {
    margin-top: 14px;
    padding-top: 13px;
  }
}
@media (max-width: 380px) {
  .topbar { --bar-padding: 10px; gap: 6px; }
  .brand { gap: 6px; }
  .brand h1 { font-size: 14px; white-space: nowrap; }
  .studio-mark { width: 27px; height: 27px; }
  .export { gap: 4px; padding-inline: 8px; }
}
@media (prefers-color-scheme: dark) {
  .size-warning { color: #efcf94; background: #3d3529; }
  .size-switch input:checked + .switch-track { background: #566cc4; }
  :root {
    --ink: #f0f0f6;
    --secondary: #c0c3d5;
    --muted: #adb1c4;
    --accent: #b7bfff;
    --accent-deep: #c8ceff;
    --tint: #3e445c;
    --line: #e2e5ff27;
    --editor: #25262d;
    --neutral: #32343d;
    --rail: #252936bd;
    --toolbar: #262935dd;
    --inspector: #2b2e3bd4;
    --glass-edge: #ffffff35;
    --glyph-cut: #282b38;
  }
  .app {
    background:
      radial-gradient(ellipse at 90% 0%, #544756, transparent 44%),
      radial-gradient(ellipse at 9% 7%, #34576f, transparent 50%),
      linear-gradient(145deg, #29364c, #444766 58%, #595069);
  }
  .topbar {
    box-shadow: inset 0 1px 0 #ffffff1c;
  }
  .export,
  .pick-files {
    color: #1c244b;
  }
  .export:disabled {
    background: #3e4255;
    color: #a4a8bd;
  }
  .check-row:hover,
  .check-row:focus-visible {
    background: #ffffff13;
  }
  .check-box {
    background: #ffffff09;
  }
  .check-row[aria-checked='true'] .check-box {
    color: #202541;
  }
  .glyph-edit {
    color: #b6bcff;
  }
  .glyph-production {
    color: #9bbbf1;
  }
  .glyph-character {
    color: #d7abd9;
  }
  .glyph-assets {
    color: #86c5bb;
  }
  .glyph-script {
    color: #9ebde7;
  }
  .ref-empty {
    background: #ffffff0b;
  }
  .ref-empty:hover {
    background: #ffffff20;
  }
  .intake {
    background:
      radial-gradient(ellipse at 81% 26%, #4f5474, transparent 55%),
      linear-gradient(115deg, #333642, #373b52 61%, #434957);
  }
  .intake-copy {
    color: var(--ink);
  }
  .intake-copy p {
    color: var(--secondary);
  }
  .pick-folder {
    color: var(--ink);
    background: #ffffff0f;
    box-shadow: inset 0 0 0 1px #d9def73b;
  }
  .pick-folder:hover {
    background: #ffffff25;
  }
  .preview-board {
    background: linear-gradient(145deg, #3c4050, #272c39);
  }
  .pdf-mark {
    color: #b9bdd4;
  }
  .pdf-mark b {
    background: #916b83;
  }
}
@supports not (backdrop-filter: blur(1px)) {
  .topbar,
  .checklist-pane,
  .preview-pane,
  .mobile-tabs,
  .toast {
    background: var(--neutral);
  }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar,
  .checklist-pane,
  .preview-pane,
  .mobile-tabs,
  .toast,
  .reader-tools,
  .reader-bottom {
    background: var(--neutral);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .reader-dialog::backdrop {
    backdrop-filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
  .intake:hover .intake-art img {
    transform: rotate(-4deg);
  }
}
