.studio {
  color-scheme: light;
  --bg: #fff; --surface: #fff; --text: #202228; --muted: #656b76;
  --line: #e4e6ea; --accent: #e86133; --accent-ink: #b4431d; --accent-soft: #fff2ec;
  --quiet: #f6f7f9;
  font-size: 14px; letter-spacing: 0;
}
.studio .quiet-action { background:transparent; color:var(--muted); border:0; padding:8px 0; min-height:36px; font-weight:500; }
.studio .quiet-action:hover { background:transparent; color:var(--text); box-shadow:none; }
.account-page { max-width:760px; margin:0 auto; }
.profile-identity { display:flex; align-items:center; gap:20px; margin-bottom:24px; }
.profile-identity .avatar { width:76px; height:76px; border-radius:50%; background:#eef0f2; color:#57616e; display:grid; place-items:center; font-size:24px; font-weight:600; }
.profile-identity h2 { margin:0; font-size:22px; }
.profile-identity p { margin:8px 0 0; }
.account-row { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:24px 0; border-top:1px solid var(--line); }
.account-row > div { min-width:0; }
.account-row h2 { font-size:16px; margin:0 0 8px; }
.account-row p { margin:0; line-height:1.5; overflow-wrap:anywhere; }
.verified-label { display:flex; align-items:center; gap:8px; white-space:nowrap; font-size:13px; }
.verified-label .icon { color:#42845c; }
.studio .preference-switch { min-height:30px; width:48px; border-radius:20px; padding:3px; background:#d6dae0; }
.studio .preference-switch span { display:block; width:22px; height:22px; border-radius:50%; background:white; transform:translateX(-8px); }
.studio .preference-switch[aria-checked=true] { background:var(--accent); }
.studio .preference-switch[aria-checked=true] span { transform:translateX(8px); }
.account-signout { border-block:1px solid var(--line); }
.account-signout .quiet-action { width:100%; justify-content:flex-start; padding:24px 0; color:var(--text); }
.account-signout .icon:last-child { margin-left:auto; }
.account-dialog { max-width:480px; width:calc(100% - 32px); max-height:calc(100dvh - 48px); overflow-y:auto; padding:28px; border:1px solid var(--line); border-radius:8px; color:var(--text); background:var(--bg); }
.account-dialog::backdrop { background:#17202d66; }
.dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; }
.dialog-heading h2 { margin:0; font-size:22px; }
.dialog-heading [data-close-dialog] .icon { transform:rotate(45deg); }
.dialog-actions { display:flex; gap:12px; justify-content:flex-end; margin-top:24px; }
.account-dialog label { display:block; margin-top:20px; }
@media(max-width:560px) { .account-row { flex-wrap:wrap; gap:14px; } .account-row .secondary { font-size:13px; } }
.studio [hidden] { display: none !important; }
.studio a { color: inherit; text-decoration: none; }
.studio a:hover { color: var(--accent-ink); }
.studio .brand { display: flex; align-items: center; gap: 10px; font-size: 18px; white-space: nowrap; }
.studio .brand span { color: inherit; font-weight: 700; }
.brand img { border-radius: 8px; flex-shrink: 0; }
.icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.studio button, .studio .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: 0; padding: 10px 16px; border: 1px solid transparent; border-radius: 6px; background: var(--button-accent,var(--accent)); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.4; cursor: pointer; }
.studio .secondary { color: var(--text); background: var(--surface); border: 1px solid var(--line); }
.studio button:hover, .studio .button:hover { filter: none; box-shadow: inset 0 0 0 100px #00000008; color: #fff; }
.studio .secondary:hover { color: var(--text); background: var(--quiet); }
.studio button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.studio .icon-button { width: 40px; height: 40px; min-height: 40px; padding: 8px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); flex-shrink: 0; }
.studio .icon-button:hover { color: var(--text); background: var(--quiet); }
.studio .danger { color: #b62935; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.workspace-main h1[tabindex="-1"]:focus { outline: none; }
.studio input, .studio select, .studio textarea { font: inherit; color: var(--text); width: 100%; min-height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 10px 12px; margin-top: 8px; }
.studio input:where(:not([type=checkbox]):not([type=radio])):focus,
.studio select:focus, .studio textarea:focus {
  outline: none; border-color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px var(--accent-ink);
}
.studio select:not([multiple]):not([size]) { appearance: none; -webkit-appearance: none; height: 44px; padding-right: 40px; background-image: url('/select-chevron.svg'); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px 18px; cursor: pointer; }
.studio select:disabled { cursor: not-allowed; color: var(--muted); background-color: var(--quiet); }
.studio label { font-size: 13px; font-weight: 500; }
.studio textarea { resize: vertical; line-height: 1.6; }
.studio input[type=checkbox] { width: 18px; height: 18px; min-height: 18px; margin: 0; accent-color: var(--accent-ink); flex-shrink: 0; }
.auth-header { border: 0; padding: 28px 40px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted) !important; }
.studio .auth { max-width: 560px; padding: 72px 24px 64px; }
.auth-mark { display: block; border-radius: 12px; margin: 0 auto 24px; }
.auth h1 { font-size: 30px; text-align: center; }
.auth > .muted { text-align: center; margin: 0 0 40px; }
.auth label { margin-top: 24px; }
.auth .input-wrap { display: flex; align-items: center; gap: 10px; margin-top: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 0 12px; }
.auth .input-wrap > .icon { color: var(--muted); }
.auth .input-wrap input { border: 0; margin: 0; padding-left: 0; min-width: 0; flex: 1; background: transparent; }
.auth .input-wrap:focus-within { outline: none; border-color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-ink); }
.auth .input-wrap input:focus { outline: none; border-color: transparent; box-shadow: none; }
.auth .password-toggle { border: 0; }
.auth .auth-submit { display: flex; width: 100%; justify-content: space-between; margin-top: 32px; padding-inline: 20px; min-height: 48px; }
.auth-note { display: flex; justify-content: center; gap: 8px; color: var(--muted); margin-top: 28px; font-size: 12px; }
.auth-note .icon { width: 16px; height: 16px; }
.sidebar { width: 228px; position: fixed; inset: 0 auto 0 0; padding: 30px 20px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; }
.workspace { font-size: 10px; color: var(--muted); margin: 36px 12px 16px; font-weight: 600; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: 6px; font-weight: 500; }
.sidebar nav [aria-current] { background: var(--accent-soft); color: var(--accent-ink); }
.account { margin-top: auto; padding: 32px 8px 0; display: grid; gap: 8px; overflow-wrap: anywhere; font-size: 12px; color: var(--muted); }
.account-role { font-weight: 600; color: var(--text); }
.account button { margin-top: 12px; }
.studio .workspace-main { max-width: 1710px; margin: 0 0 0 228px; padding: 42px 40px; min-width: 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.page-heading h1 { margin: 0; font-size: 30px; overflow-wrap: anywhere; }
.page-heading h2 { margin: 0; font-size: 18px; }
.page-heading p { margin: 8px 0 0; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 600; margin: 0 0 8px !important; }
.heading-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-flex; background: #eff0f3; color: #565c66; padding: 4px 8px; border-radius: 5px; font-size: 12px; }
.badge.published { background: #eaf5ed; color: #286c40; }
.catalogue-tools { display: flex; gap: 16px; margin-bottom: 12px; align-items: center; max-width: 1080px; }
.search-field { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 6px; padding: 0 12px; flex: 1; min-width: 0; margin: 0; }
.search-field .icon { color: var(--muted); }
.studio .search-field input { margin: 0; border: 0; min-width: 0; padding-left: 0; background: transparent; }
.studio .search-field:focus-within { outline: none; border-color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-ink); }
.studio .search-field input:focus { outline: none; border-color: transparent; box-shadow: none; }
.segmented { display: flex; flex-shrink: 0; border: 1px solid var(--line); border-radius: 6px; padding: 3px; background: var(--quiet); gap: 2px; }
.studio .segmented button { min-height: 36px; padding: 6px 12px; color: var(--muted); background: transparent; font-weight: 500; border-radius: 4px; }
.studio .segmented [aria-pressed=true] { color: var(--accent-ink); background: var(--accent-soft); }
.work-list { max-width: 1080px; }
.work-row { display: flex; gap: 24px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.work-cover { display: block; width: 90px; height: 135px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.cover-placeholder { display: grid; place-items: center; background: var(--quiet); color: var(--muted); }
.cover-placeholder .icon { width: 30px; height: 30px; }
.work-details { flex: 1; min-width: 0; }
.work-details p { margin: 5px 0; }
.work-title { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.text-action { display: flex; align-items: center; gap: 10px; color: var(--accent-ink) !important; font-weight: 500; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { color: var(--muted); font-size: 12px; padding: 12px 16px; font-weight: 500; border-bottom: 1px solid var(--line); }
td { padding: 20px 16px; border-bottom: 1px solid var(--line); }
td:first-child, th:first-child { padding-left: 0; }
td a { font-weight: 500; }
td small { display: block; margin-top: 5px; color: var(--muted); }
.empty { min-height: 320px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.empty-mark { font-size: 40px; color: var(--accent); }
.empty h2 { margin-bottom: 0; }
.empty p { max-width: 420px; margin-bottom: 24px; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; color: var(--muted) !important; font-size: 13px; }
.editor-tabs { display: flex; gap: 20px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.editor-tabs a { white-space: nowrap; padding: 14px 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; }
.editor-tabs [aria-current] { color: var(--accent-ink); border-color: var(--accent); }
.editor { max-width: 860px; }
.editor section { padding: 16px 0 32px; border-bottom: 1px solid var(--line); }
.editor h2 { margin: 0 0 24px; font-size: 18px; }
.fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; }
.editor > section > label { margin-top: 20px; }
fieldset { border: 0; padding: 0; margin: 0 0 24px; }
legend { font-size: 13px; font-weight: 500; margin-bottom: 12px; }
.genre-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.studio .check { display: flex; align-items: center; gap: 10px; font-weight: 400; line-height: 1.5; }
.save-bar, .order-bar { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 16px 0; }
.save-bar { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); }
.chapter-section { padding-top: 8px; }
.notice, .success, .upgrade { padding: 14px 18px; border-radius: 6px; margin: 0 0 24px; }
.notice { border-left: 3px solid #b62935; background: #fff3f3; color: #9b2630; }
.success { border-left: 3px solid #286c40; background: #eff7f1; color: #286c40; }
.upgrade { background: var(--accent-soft); }
.media-section, .publication-section { padding: 8px 0 32px; }
.media-section:not(.chapter-media), .publication-section { max-width: 900px; }
.media-workspace { display: grid; grid-template-columns: minmax(0,1fr); gap: 28px; }
.media-workspace:has(.page-preview:not([hidden])) { grid-template-columns: minmax(0,1fr) minmax(220px,30%); }
.media-main { min-width: 0; }
.media-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 16px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(155px,1fr)); gap: 20px 16px; }
.media-item { min-width: 0; }
.media-item > img, .page-thumbnail img { display: block; width: 100%; height: 180px; object-fit: contain; background: var(--quiet); border-radius: 5px; }
.media-item > img { border: 1px solid var(--line); margin-bottom: 12px; }
.studio .page-thumbnail { display: block; width: 100%; height: 234px; padding: 8px; border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.page-thumbnail img { height: 216px; background: white; }
.studio .page-thumbnail[aria-pressed=true] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.page-caption { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.page-caption .icon { color: var(--muted); width: 16px; height: 16px; }
.page-caption strong { font-size: 12px; font-weight: 500; }
.page-move { display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; margin-top: 8px; }
.position-label { margin: 0; flex: 1; min-width: 0; text-align: center; color: var(--muted); font-size: 10px !important; }
.studio .position-label input { min-height: 40px; height: 40px; padding: 5px; margin-top: 3px; text-align: center; }
.media-meta { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 8px; }
.media-meta small { font-size: 10px; }
.media-item[draggable] { cursor: grab; }
.media-item.dragging { opacity: .45; }
.page-preview { position: sticky; top: 24px; align-self: start; padding-left: 24px; border-left: 1px solid var(--line); min-width: 0; }
.page-preview h2 { font-size: 18px; margin: 0; }
.page-preview > img { display: block; width: 100%; height: 460px; max-height: 60vh; object-fit: contain; border: 1px solid var(--line); padding: 8px; border-radius: 6px; background: var(--quiet); }
.preview-navigation { display: flex; gap: 8px; margin-top: 16px; }
.page-grid.list-layout { grid-template-columns: minmax(0,1fr); }
.list-layout .media-item { display: grid; grid-template-columns: 80px minmax(80px,1fr) 140px 160px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.studio .list-layout .page-thumbnail { height: 110px; }
.list-layout .page-thumbnail img { height: 92px; }
.list-layout .media-meta { flex-wrap: wrap; }
.uploader { display: grid; gap: 16px; padding: 24px 0; border-top: 1px dashed var(--line); margin-top: 24px; }
.upload-field { margin: 0; }
.upload-field > .icon { color: var(--muted); margin-right: 6px; }
.uploader input[type=file] { background: var(--quiet); padding: 14px; }
.uploader input::file-selector-button { border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; margin-right: 12px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.uploader p, .uploader [role=status] { margin: 0; overflow-wrap: anywhere; }
.uploader > button { justify-self: start; }
.upload-queue { display: flex; gap: 12px; overflow-x: auto; min-width: 0; }
.upload-queue:empty { display: none; }
.upload-queue figure { margin: 0; flex: 0 0 96px; min-width: 0; }
.upload-queue img { width: 96px; height: 120px; object-fit: contain; background: var(--quiet); border-radius: 6px; }
.upload-queue figcaption { font-size: 12px; overflow-wrap: anywhere; }
.uploader progress { width: 100%; height: 6px; accent-color: var(--accent); }
.storage-cleanup { border-top: 1px solid var(--line); padding-top: 24px; }
.publication-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.reader-preview { background: #171819; padding: 20px; text-align: center; border-radius: 6px; }
.reader-preview img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.paged-preview img { max-height: 75vh; width: auto; object-fit: contain; }
.webtoon-preview { padding: 0; max-width: 800px; }
.preview-controls { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
@media(max-width:1100px) {
  .studio .workspace-main { padding: 32px 24px; }
  .media-workspace:has(.page-preview:not([hidden])) { grid-template-columns: minmax(0,1fr); }
  .page-preview { position: static; border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .page-preview > img { height: 360px; }
  .list-layout .media-item { grid-template-columns: 70px minmax(0,1fr) 140px; }
  .list-layout .media-meta { grid-column: 2/-1; }
}
@media(max-width:760px) {
  .sidebar { position: static; width: auto; padding: 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .workspace { display: none; }
  .sidebar nav { display: flex; flex-wrap: wrap; margin-top: 20px; gap: 4px; }
  .sidebar nav a { padding: 10px; gap: 8px; font-size: 13px; }
  .account { padding: 16px 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .account > span:not(.account-role) { display: none; }
  .account button { margin: 0; }
  .studio .workspace-main { margin: 0; padding: 28px 20px; }
  .catalogue-tools { flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .work-row { flex-wrap: wrap; gap: 16px; }
  .work-row .text-action { margin-left: 106px; font-size: 13px; }
  .work-details { flex-basis: calc(100% - 106px); }
  .work-title { font-size: 17px; }
  .fields { grid-template-columns: minmax(0,1fr); }
  .genre-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .page-heading h1 { font-size: 26px; }
  .editor-tabs { gap: 20px; }
  .editor-tabs a { font-size: 13px; }
  .media-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 12px; }
  .media-meta { flex-wrap: wrap; }
  .media-meta .icon-button { width: 36px; height: 36px; min-height: 36px; }
  .studio .page-thumbnail { height: 200px; }
  .page-thumbnail img { height: 182px; }
  .page-move { gap: 3px; }
  .page-move .icon-button { width: 34px; height: 40px; padding: 6px; }
  .list-layout .media-item { grid-template-columns: 60px minmax(0,1fr); }
  .list-layout .page-move { grid-column: 2; grid-row: 2; }
  .list-layout .page-thumbnail { grid-row: 1/3; }
  .save-bar, .order-bar { flex-wrap: wrap; }
  .auth-header { padding: 20px; flex-wrap: wrap; }
  .studio .auth { padding: 48px 24px; }
  .auth h1 { font-size: 26px; }
  .back-link { font-size: 12px; }
}
@media(prefers-reduced-motion:no-preference) {
  .studio button, .studio a { transition: background-color .12s ease, color .12s ease; }
}
.review-images { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 16px; margin: 24px 0; max-width: 900px; }
.review-images figure { margin: 0; min-width: 0; }
.review-images img { width: 100%; height: 260px; object-fit: contain; background: var(--line); border-radius: 6px; }
.review-decision { margin-top: 28px; }
.auth-links { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 20px; }
.field-label { display: flex; align-items: center; gap: 8px; }
.field-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: .55; }
.field-label .icon { width: 18px; height: 18px; color: var(--muted); }
.field-help { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.5; }
.image-slots { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; max-width: 900px; }
.image-slot { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 6px; }
.slot-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.slot-heading h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0; }
.slot-stage { height: 220px; display: flex; align-items: center; justify-content: center; margin: 20px 0; }
.slot-shape { border: 1px dashed #b8bdc6; border-radius: 6px; background: var(--quiet); display: grid; place-items: center; overflow: hidden; }
.slot-shape.cover { height: 220px; aspect-ratio: 2/3; }
.slot-shape.banner { width: 100%; max-height: 220px; aspect-ratio: 16/9; }
.slot-shape.logo { width: 100%; aspect-ratio: 3/1; }
.slot-shape.dark-slot { background: #25262b; }
.slot-shape.dark-slot .field-icon { filter: invert(1); }
.slot-shape > span .field-icon { width: 32px; height: 32px; }
.slot-shape img:not(.field-icon) { width: 100%; height: 100%; object-fit: contain; }
.slot-uploader { gap: 12px; padding: 16px 0 0; margin-top: 16px; }
.slot-picker { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; padding: 12px; border: 1px dashed var(--line); border-radius: 6px; position: relative; }
.studio .slot-picker:focus-within { outline: none; border-style: solid; border-color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-ink); }
.studio .slot-picker input:focus { outline: none; border-color: transparent; box-shadow: none; }
.visually-hidden { position: absolute; width: 1px !important; height: 1px; min-height: 0 !important; padding: 0 !important; margin: -1px !important; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.submission-bar { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px; }
.submission-bar h2 { display: flex; align-items: center; gap: 8px; }
.nav-count { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; }
.profile-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.3fr); gap: 48px; }
.profile-section { border-top: 1px solid var(--line); padding-top: 24px; min-width: 0; }
.profile-section h2 { display: flex; gap: 10px; align-items: center; font-size: 20px; margin-bottom: 24px; }
.profile-section dt { color: var(--muted); font-size: 14px; margin-top: 20px; }

@media (max-width: 767px) {
  .studio input, .studio select, .studio textarea { font-size: 16px; }
}
.profile-section dd { margin: 6px 0 0; overflow-wrap: anywhere; }
.profile-section form { display: grid; gap: 18px; }
.profile-section form button { justify-self: start; }
@media(max-width:800px) { .profile-layout { grid-template-columns: minmax(0,1fr); gap: 32px; } }
@media(max-width:600px) { .image-slots { grid-template-columns: minmax(0,1fr); } }
