:root {
  color-scheme: light;
  --ink: #191511;
  --orange: #fa7c20;
  --orange-hover: #ff9447;
  --orange-soft: #fff0df;
  --canvas: #f5f1ea;
  --paper: #fffbf6;
  --surface: #ffffff;
  --muted: #6f655b;
  --line: #ded4c6;
  --green: #2d6638;
  --red: #a33421;
  --shadow: 5px 5px 0 var(--ink);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-width: 320px; color: var(--ink); line-height: 1.6; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: #a34308; text-underline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
img, svg { vertical-align: middle; }
img { max-width: 100%; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}
[hidden], .hidden { display: none !important; }
::selection { color: var(--ink); background: #ffcb94; }

.app-shell { min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: 250px;
  padding: 28px 20px 20px;
  color: var(--paper);
  background: var(--ink);
  border-right: 4px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0 4px 28px; color: inherit; text-decoration: none; }
.brand-mark {
  display: inline-flex;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: var(--ink);
  background: var(--orange);
  border: 3px solid var(--paper);
  box-shadow: 3px 3px 0 var(--orange);
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
}
.brand-name { display: block; font-size: 20px; font-weight: 900; line-height: 1.3; letter-spacing: .02em; }
.brand-caption { display: block; margin-top: 5px; color: #c7bdb1; font-size: 9px; font-weight: 700; letter-spacing: .15em; line-height: 1.5; }
.nav-list { display: flex; flex: 1; flex-direction: column; gap: 9px; min-height: 0; margin: 0; padding: 4px 4px 18px; overflow-y: auto; list-style: none; }
.nav-button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 45px;
  padding: 10px 13px;
  border: 2px solid transparent;
  border-radius: 0;
  color: #f5eee5;
  background: transparent;
  text-align: left;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.nav-button:hover { background: #302820; border-color: #5a4c3e; }
.nav-button.active { color: var(--ink); background: var(--orange); border-color: var(--orange); box-shadow: 3px 3px 0 #78654f; }
.nav-button svg { flex-shrink: 0; width: 18px; height: 18px; }
.nav-button .number { color: inherit; font-size: 12px; opacity: .65; }
.sidebar-footer { margin: auto 4px 0; padding: 18px 0 0; border-top: 1px solid #54483c; color: #c7bdb1; font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.sidebar-footer .badge { margin-top: 8px; }
.workspace { min-width: 0; min-height: 100vh; margin-left: 250px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 16px 34px;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}
.topbar-title { min-width: 0; font-size: 15px; font-weight: 800; }
.topbar-meta { display: flex; align-items: center; justify-content: flex-end; gap: 14px; color: var(--muted); font-size: 12px; }
.topbar-meta > span { display: inline-flex; align-items: center; gap: 7px; }
.page { width: 100%; max-width: 1680px; margin: 0 auto; padding: 32px 34px 48px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.eyebrow { margin-bottom: 7px; color: #b74c08; font-size: 10px; font-weight: 900; letter-spacing: .18em; line-height: 1.5; text-transform: uppercase; }
.page-title { font-size: clamp(26px, 2.4vw, 36px); font-weight: 900; line-height: 1.3; letter-spacing: -.035em; }
.page-description { max-width: 760px; margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.header-actions { display: flex; flex-shrink: 0; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 9px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.four + .grid { margin-top: 25px; }
.compact-table { min-width: 0; table-layout: fixed; }
.compact-table th, .compact-table td { padding: 12px 10px; }
.compact-table th:last-child { width: 76px; }
.compact-table .badge { white-space: normal; }
.grid > *, .form-grid > * { min-width: 0; }
.stat-card { position: relative; min-height: 150px; padding: 21px 23px; background: var(--surface); border: 3px solid var(--ink); box-shadow: var(--shadow); }
.stat-label { color: #5f554b; font-size: 12px; font-weight: 800; }
.stat-number { margin: 8px 0 3px; color: var(--ink); font-size: 42px; font-weight: 900; line-height: 1.2; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.stat-card:first-child .stat-number { color: #bb4d08; }
.stat-note { color: var(--muted); font-size: 11px; line-height: 1.7; }
.panel { min-width: 0; margin-bottom: 25px; background: var(--surface); border: 3px solid var(--ink); box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; min-height: 66px; padding: 16px 22px; border-bottom: 2px solid var(--ink); }
.panel-body { padding: 23px; }
.panel-body > :last-child { margin-bottom: 0; }
.section-title { display: inline-flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 900; line-height: 1.4; }
.number { color: #b74c08; font-size: 21px; font-weight: 900; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 145px; max-width: 260px; }
.search-field { flex: 1 1 220px; min-width: 160px; max-width: 420px; }
.search-field .input { width: 100%; max-width: none; }
.table-wrap { max-width: 100%; overflow: auto; background: var(--surface); border: 3px solid var(--ink); }
.panel > .table-wrap { border: 0; }
.panel-body .table-wrap { border-width: 2px; }
table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 12px; line-height: 1.6; text-align: left; }
th { padding: 13px 16px; color: var(--paper); background: var(--ink); border-right: 1px solid #514438; font-size: 11px; font-weight: 800; white-space: nowrap; }
th:last-child { border-right: 0; }
td { padding: 16px; vertical-align: middle; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fffbf6; }
td .text-muted { margin-top: 3px; font-size: 11px; }
td .actions { flex-wrap: nowrap; }
td strong { font-size: 13px; font-weight: 800; }

.badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; max-width: 100%; min-height: 24px; padding: 2px 8px; border: 1.5px solid var(--ink); color: #554a3f; background: #eee7dd; font-size: 10px; font-weight: 800; line-height: 1.5; white-space: nowrap; }
.badge.success { color: #28542d; background: #e4f0dd; }
.badge.warning { color: #775013; background: #fff0c8; }
.badge.danger { color: #8e2a1c; background: #ffe4dc; }
.badge.muted { color: #74695e; background: #f1ece5; border-color: #b6a99b; }
.badge.orange { color: #713400; background: #ffd6ad; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 16px; color: var(--ink); background: var(--surface); border: 2px solid var(--ink); border-radius: 0; box-shadow: 3px 3px 0 var(--ink); font-size: 12px; font-weight: 800; line-height: 1.4; text-align: center; text-decoration: none; white-space: nowrap; transition: background-color 120ms ease, transform 100ms ease, box-shadow 100ms ease; }
.btn:hover { background: var(--paper); transform: translateY(-1px); box-shadow: 3px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.primary { background: var(--orange); border-color: var(--ink); }
.btn.primary:hover { background: var(--orange-hover); }
.btn.danger { color: #8f2d20; background: #fff0e9; }
.btn.danger:hover { background: #ffd8ca; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: #eee5d8; box-shadow: none; }
.btn.small { min-height: 30px; padding: 5px 9px; border-width: 1.5px; box-shadow: 2px 2px 0 var(--ink); font-size: 10px; }
.btn.icon { flex-shrink: 0; width: 38px; min-width: 38px; padding: 8px; }
.btn.icon.small { width: 30px; min-width: 30px; }
.btn svg { width: 16px; height: 16px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .46; transform: none; box-shadow: none; pointer-events: none; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.empty-state { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; min-height: 220px; padding: 35px 24px; text-align: center; }
.empty-title { color: var(--ink); font-size: 17px; font-weight: 900; line-height: 1.5; }
.empty-description { max-width: 460px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.empty-state .btn { margin-top: 9px; }
.empty-state > svg { width: 36px; height: 36px; margin-bottom: 7px; color: #9b8b77; }

.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { display: block; color: var(--ink); font-size: 12px; font-weight: 800; line-height: 1.5; }
.hint { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.8; }
.input, .textarea, .select { display: block; width: 100%; min-width: 0; min-height: 42px; margin: 0; padding: 10px 12px; color: var(--ink); background: var(--surface); border: 2px solid var(--ink); border-radius: 0; outline: none; font-size: 13px; line-height: 1.5; transition: box-shadow 120ms ease; }
.input::placeholder, .textarea::placeholder { color: #94877a; opacity: 1; }
.input:focus, .textarea:focus, .select:focus { box-shadow: 3px 3px 0 var(--orange); outline: 2px solid var(--orange); outline-offset: 1px; }
.input:disabled, .textarea:disabled, .select:disabled { color: #8b7e70; background: #eee8df; border-color: #c8bbad; cursor: not-allowed; }
.input[readonly], .textarea[readonly] { background: #f8f3eb; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--red); }
.textarea { min-height: 150px; resize: vertical; }
.select { padding-right: 30px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; min-height: 28px; color: #4e443a; font-size: 12px; line-height: 1.8; }
.checkbox-row input, .account-option input[type="checkbox"], .account-option input[type="radio"] { flex-shrink: 0; width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--orange); cursor: pointer; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.account-option { display: flex; align-items: flex-start; gap: 11px; min-width: 0; padding: 13px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; }
.account-option:hover { border-color: var(--ink); }
.account-option:has(input:checked) { background: var(--orange-soft); border-color: var(--ink); box-shadow: 3px 3px 0 var(--orange); }
.account-option:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.account-option > div { min-width: 0; }
.platform-mark { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 34px; height: 34px; color: var(--ink); background: #ffdab5; border: 2px solid var(--ink); font-size: 12px; font-weight: 900; line-height: 1; }
.browser-card { min-width: 0; padding: 21px; border: 3px solid var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.browser-card > .inline, .browser-card > .actions { margin-bottom: 15px; }
.browser-card .actions:last-child { margin-top: 18px; margin-bottom: 0; padding-top: 15px; border-top: 1px solid var(--line); }
.detail-list { display: grid; grid-template-columns: minmax(90px, .35fr) minmax(0, 1fr); column-gap: 15px; row-gap: 11px; margin: 0; font-size: 12px; line-height: 1.8; }
.detail-list dt { color: var(--muted); font-weight: 500; }
.detail-list dd { min-width: 0; margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.status-dot { display: inline-block; flex-shrink: 0; width: 9px; height: 9px; border: 1px solid var(--ink); background: #b5a99b; vertical-align: middle; }
.status-dot.online { background: #66a66e; }
.status-dot.offline { background: #a89b8d; }
.banner { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 22px; padding: 14px 17px; color: #514436; background: #eee7db; border: 2px solid var(--ink); font-size: 12px; line-height: 1.85; }
.banner.warning { color: #6a4816; background: #fff1cf; }
.banner.error { color: #8b2e20; background: #ffe7dd; }
.banner.success { color: #2e5732; background: #e6f1e0; }
.banner > svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; }

.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 25px; }
.editor-main, .editor-aside { min-width: 0; }
.editor-aside { position: sticky; top: 100px; }
.editor-aside .account-grid { grid-template-columns: minmax(0, 1fr); }
.editor-main .textarea { min-height: 250px; }
.media-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 13px; margin-top: 15px; }
.media-card { min-width: 0; overflow: hidden; border: 2px solid var(--ink); background: var(--paper); }
.media-card img, .media-card video { display: block; width: 100%; height: 150px; object-fit: contain; background: #e9e0d3; }
.media-card .file-name { display: block; padding: 10px 11px; border-top: 1px solid var(--ink); }
.media-card .actions { padding: 0 10px 10px; }
.file-name { color: #4f453a; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.progress { display: block; width: 100%; height: 11px; overflow: hidden; border: 2px solid var(--ink); border-radius: 0; background: #e8ded0; appearance: none; }
.progress > span, .progress > div { display: block; height: 100%; background: var(--orange); }
.progress::-webkit-progress-bar { background: #e8ded0; }
.progress::-webkit-progress-value { background: var(--orange); }
.progress::-moz-progress-bar { background: var(--orange); }
.record-detail { min-width: 0; padding: 17px; color: #4c4137; background: var(--paper); border: 2px solid var(--line); font-size: 12px; line-height: 1.9; overflow-wrap: anywhere; }
.record-detail pre { max-height: 340px; margin: 12px 0 0; overflow: auto; white-space: pre-wrap; }

.auth-shell { display: grid; grid-template-columns: .95fr 1.05fr; align-items: stretch; width: min(1080px, calc(100% - 64px)); min-height: 620px; margin: 54px auto; border: 4px solid var(--ink); background: var(--surface); box-shadow: 9px 9px 0 var(--ink); }
.auth-brand { display: flex; flex-direction: column; justify-content: space-between; gap: 35px; min-width: 0; padding: 45px 38px; color: var(--paper); background: var(--ink); }
.auth-brand .brand { padding: 0; }
.auth-brand .eyebrow { color: var(--orange); }
.auth-brand .page-title { max-width: 390px; color: var(--paper); font-size: clamp(29px, 3vw, 43px); line-height: 1.45; }
.auth-brand .page-description { color: #c5b9aa; }
.auth-brand .platform-mark { color: var(--paper); border-color: #7f6b55; background: #30271f; }
.auth-card { min-width: 0; padding: 43px 42px; }
.auth-title { margin-bottom: 10px; font-size: 27px; font-weight: 900; line-height: 1.4; letter-spacing: -.025em; }
.auth-card .page-description { margin: 0 0 24px; }
.auth-card .form-grid { gap: 20px; }
.auth-card .btn.primary { width: 100%; min-height: 44px; margin-top: 5px; }
.tabs { display: flex; gap: 0; margin-bottom: 23px; border-bottom: 3px solid var(--ink); }
.tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 41px; padding: 10px 18px; color: var(--muted); background: transparent; border: 2px solid transparent; border-bottom: 0; border-radius: 0; font-size: 12px; font-weight: 800; line-height: 1.5; }
.tab:hover { color: var(--ink); background: var(--orange-soft); }
.tab.active { color: var(--ink); background: var(--orange); border-color: var(--ink); }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 28px; background: rgb(25 21 17 / 52%); }
.modal { display: flex; flex-direction: column; width: min(620px, 100%); max-width: calc(100vw - 56px); max-height: calc(100vh - 56px); max-height: calc(100dvh - 56px); margin: auto; padding: 0; color: var(--ink); background: var(--surface); border: 3px solid var(--ink); border-radius: 0; box-shadow: 8px 8px 0 var(--ink); }
.modal.wide { width: min(960px, 100%); }
dialog.modal:not([open]) { display: none; }
dialog.modal::backdrop { background: rgb(25 21 17 / 52%); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; flex-shrink: 0; gap: 18px; padding: 21px 24px; background: var(--paper); border-bottom: 3px solid var(--ink); }
.modal-header h2, .modal-header h3 { font-size: 20px; font-weight: 900; line-height: 1.5; }
.modal-header .btn.icon { min-height: 32px; width: 32px; min-width: 32px; padding: 5px; }
.modal-body { min-height: 0; padding: 24px; overflow-y: auto; overscroll-behavior: contain; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; flex-shrink: 0; gap: 11px; padding: 17px 24px; background: var(--paper); border-top: 2px solid var(--ink); }
.toast-stack { position: fixed; right: 26px; bottom: 26px; z-index: 120; display: grid; gap: 12px; width: min(420px, calc(100vw - 40px)); pointer-events: none; }
.toast { padding: 13px 16px; color: var(--ink); background: var(--surface); border: 3px solid var(--ink); border-left-width: 8px; box-shadow: 4px 4px 0 var(--ink); font-size: 12px; font-weight: 700; line-height: 1.8; overflow-wrap: anywhere; pointer-events: auto; }
.toast.error { background: #ffe8df; border-left-color: var(--red); }
.toast.success { background: #e7f0e0; border-left-color: var(--green); }
.loading { display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 70px; color: var(--muted); font-size: 12px; font-weight: 700; }
.loading::before { content: ""; display: block; width: 17px; height: 17px; border: 2px solid var(--line); border-top-color: var(--ink); border-right-color: var(--orange); border-radius: 50%; animation: loading-turn 850ms linear infinite; }
.skeleton { display: block; min-height: 18px; background: #e7ded1; animation: skeleton-pulse 1.5s ease-in-out infinite; }
.pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 18px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.pagination .actions { gap: 7px; }
.pagination .btn { min-width: 31px; }

.text-muted { color: var(--muted); }
.text-danger, .error-text { color: var(--red); }
.text-success { color: var(--green); }
.error-text { min-height: 18px; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.truncate { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: "Cascadia Code", "Consolas", "SFMono-Regular", monospace; font-size: .92em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.spacer { flex: 1 1 auto; }
.inline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 37px; width: 37px; height: 37px; overflow: hidden; color: var(--paper); background: var(--ink); border: 2px solid var(--ink); font-size: 13px; font-weight: 900; line-height: 1; }
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.divider { height: 1px; margin: 22px 0; border: 0; background: var(--line); }
.tag-list { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.reserved { padding: 20px; color: var(--muted); background: var(--paper); border: 2px dashed #a08d77; font-size: 12px; line-height: 1.9; }
.reserved .section-title { color: var(--ink); }
.link-button { display: inline; margin: 0; padding: 2px 0; color: #a34308; background: transparent; border: 0; box-shadow: none; font-size: inherit; font-weight: 700; line-height: inherit; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: var(--ink); }
.link-button:disabled { color: #a99c8d; cursor: not-allowed; }

@keyframes loading-turn { to { transform: rotate(360deg); } }
@keyframes skeleton-pulse { 50% { opacity: .45; } }

/* R01: shared compact workspace components, keeping the approved orange/black system. */
.app-shell { grid-template-columns: 218px minmax(0, 1fr); }
.sidebar { width: 218px; padding-right: 20px; padding-left: 20px; }
.workspace { margin-left: 218px; }
.brand-name { font-size: 22px; }
.brand-caption { font-size: 8px; letter-spacing: 1px; white-space: nowrap; }
.nav-button { min-height: 46px; padding: 10px 13px; font-size: 14px; }
.topbar { min-height: 70px; padding: 14px 32px; }
.topbar-meta { gap: 12px; flex-wrap: wrap; font-size: 12px; }
.page { padding: 27px 32px 38px; }
.page-title { font-size: 28px; }
.page-description { margin-top: 6px; font-size: 13px; }
.page-header { margin-bottom: 22px; }
.hint { font-size: 12px; }
.btn { min-height: 40px; padding: 8px 14px; font-size: 13px; }
.btn.small { min-height: 36px; padding: 7px 11px; font-size: 12px; }
.platform-chip { display: inline-flex; flex-shrink: 0; align-items: center; gap: 7px; max-width: 100%; min-height: 31px; padding: 3px 7px; background: white; border: 1.5px solid var(--ink); font-size: 12px; font-weight: 800; line-height: 1.5; white-space: nowrap; vertical-align: middle; }
.platform-chip img { flex: 0 0 22px; width: 22px; height: 22px; object-fit: contain; }
.platform-chip span { white-space: nowrap; }
td .platform-chip { margin-top: 7px; }
.environment-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 23px; border: 3px solid var(--ink); box-shadow: var(--shadow); background: white; }
.environment-summary > div { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 20px; border-right: 1px solid var(--line); }
.environment-summary > div:last-child { border-right: 0; }
.environment-summary strong { font-size: 26px; font-weight: 900; }
.environment-summary span { color: var(--muted); font-size: 12px; }
.environment-summary .small-label { color: var(--green); font-size: 13px; }
.env-toolbar { gap: 9px; }
.env-toolbar .select { min-width: 125px; max-width: 170px; }
.env-toolbar .search-field { max-width: 340px; }
.view-switch { display: flex; }
.view-switch .btn { box-shadow: none; }
.view-switch .btn + .btn { margin-left: -2px; }
.view-switch .selected { color: white; background: var(--ink); }
.environment-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 22px; margin-bottom: 23px; }
.browser-card { padding: 0; }
.environment-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 20px; padding: 16px 0 13px; border-bottom: 2px solid var(--ink); }
.environment-card-content { padding: 15px 20px 18px; }
.environment-card-content h2 { overflow: hidden; font-size: 21px; text-overflow: ellipsis; white-space: nowrap; }
.environment-card-content > .hint { margin: 3px 0 12px; }
.environment-card-content .tag-list { margin-top: 10px; }
.environment-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 18px; margin: 19px 0; font-size: 12px; }
.environment-facts dt { margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.environment-facts dd { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.environment-card-footer { padding-top: 15px; border-top: 1px solid var(--line); }
.browser-card .environment-card-footer .actions { margin: 0; padding: 0; border: 0; }
.browser-card .environment-card-footer .row-secondary { margin-top: 10px; }
.row-secondary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 9px; }
.row-secondary .link-button { min-height: 30px; font-size: 11px; }
.detail-list { grid-template-columns: minmax(0, 1fr); }
.detail-list > div { display: grid; grid-template-columns: minmax(90px, .35fr) minmax(0, 1fr); gap: 15px; }
.detail-list > .inline { display: flex; }
.modal.detail-drawer { align-self: stretch; width: 510px; max-height: 100dvh; margin: -28px -28px -28px auto; border-right: 0; box-shadow: -5px 0 0 var(--ink); }
.modal.detail-drawer .modal-header { padding: 18px 22px; }
.modal.detail-drawer .modal-body { padding: 22px; }
.editor-layout { grid-template-columns: minmax(0, 1fr) 310px; gap: 23px; }
.editor-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 21px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); font-size: 12px; }
.editor-steps strong { color: #a34308; }
.editor-main .textarea { min-height: 185px; }
.editor-action-bar { position: sticky; bottom: 14px; z-index: 35; display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; padding: 14px 18px; background: white; border: 3px solid var(--ink); box-shadow: var(--shadow); }
.editor-action-bar > div { min-width: 0; }
.editor-action-bar strong { font-size: 12px; }
.editor-action-bar .hint { margin-top: 3px; font-size: 11px; }
.editor-aside .account-option { align-items: flex-start; padding: 11px; }
.account-option > span { min-width: 0; }
.account-option strong { display: block; overflow-wrap: anywhere; }
.account-option .platform-chip { display: inline-flex; margin-top: 6px; }
.account-option small { display: block; margin-top: 5px; color: var(--muted); }
.account-option .badge { margin-left: auto; }
.publish-checks { display: grid; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; color: #8c581b; font-size: 12px; }
.publish-checks li { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.publish-checks li::before { content: '!'; display: inline-block; width: 19px; font-weight: 900; }
.publish-checks li.text-success::before { content: '✓'; }
.media-meta { padding: 0 11px 11px; }
.cover-selection { margin-top: 16px; padding: 10px; background: var(--orange-soft); border: 1.5px solid var(--ink); font-size: 12px; }
.upload-status { position: sticky; top: 0; z-index: 40; width: 100%; padding: 10px 32px; background: var(--paper); }
.upload-feedback { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin: 12px 0; padding: 13px 15px; background: #fff0df; border: 2px solid var(--ink); font-size: 12px; }
.upload-feedback > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.upload-feedback p { color: var(--muted); font-size: 11px; }
.upload-feedback .progress { margin-top: 8px; }
.upload-feedback.failed { background: #ffe7de; }
.recovery-notice { flex-wrap: wrap; align-items: center; }
.recovery-notice p { margin: 5px 0; }
.toast-stack { bottom: 110px; right: 22px; width: min(390px, calc(100vw - 40px)); gap: 10px; }
.toast { position: relative; padding-right: 35px; font-size: 12px; }
.toast-dismiss { position: absolute; top: 6px; right: 6px; padding: 2px 5px; background: transparent; border: 0; color: inherit; font-size: 17px; cursor: pointer; }
@media (max-width: 1200px) { .app-shell { grid-template-columns: 196px minmax(0,1fr); } .sidebar { width: 196px; padding-left: 15px; padding-right: 15px; } .workspace { margin-left: 196px; } .page { padding-left: 23px; padding-right: 23px; } .environment-grid { grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); } .environment-summary > div { padding: 12px; } .editor-layout { grid-template-columns: minmax(0,1fr) 280px; gap: 18px; } .editor-action-bar .actions { gap: 8px; } }

@media (min-width: 1800px) {
  .page { padding-right: 46px; padding-left: 46px; }
  .topbar { padding-right: 46px; padding-left: 46px; }
  .editor-layout { grid-template-columns: minmax(0, 1fr) 370px; }
}
@media (max-width: 1350px) {
  .page { padding: 28px 28px 42px; }
  .topbar { padding-right: 28px; padding-left: 28px; }
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { min-height: 136px; }
  .header-actions { gap: 9px; }
}
@media (max-width: 1180px) {
  .page-header { gap: 18px; }
  .page-description { max-width: 540px; }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-layout { grid-template-columns: minmax(0, 1fr); }
  .editor-aside { position: static; }
  .editor-aside .account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { gap: 10px; }
  .toolbar .select { min-width: 125px; }
  .panel-header, .panel-body { padding-right: 19px; padding-left: 19px; }
}
@media (max-width: 960px) {
  .sidebar { position: relative; inset: auto; width: 100%; padding: 19px 22px 17px; border-right: 0; border-bottom: 3px solid var(--ink); }
  .brand { padding: 0 0 20px; }
  .brand-mark { width: 40px; height: 40px; flex-basis: 40px; font-size: 23px; }
  .brand-name { font-size: 19px; }
  .nav-list { flex: initial; flex-direction: row; gap: 8px; padding: 3px 3px 8px; overflow-x: auto; overflow-y: hidden; }
  .nav-list > * { flex-shrink: 0; }
  .nav-button { width: auto; min-height: 38px; padding: 8px 12px; font-size: 12px; white-space: nowrap; }
  .sidebar-footer { display: none; }
  .workspace { margin-left: 0; }
  .topbar { min-height: 63px; padding: 13px 24px; }
  .page { padding: 26px 24px 38px; }
  .editor-aside .account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar { align-items: flex-start; gap: 12px; }
  .topbar-meta { gap: 9px; font-size: 10px; }
  .page-header { flex-direction: column; gap: 15px; margin-bottom: 22px; }
  .header-actions { justify-content: flex-start; width: 100%; padding-top: 0; }
  .page-title { font-size: 29px; }
  .grid, .grid.two, .grid.three { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .grid.four { gap: 15px; }
  .stat-card { min-height: 132px; padding: 17px; box-shadow: 3px 3px 0 var(--ink); }
  .stat-number { font-size: 35px; }
  .form-grid.two { grid-template-columns: minmax(0, 1fr); }
  .panel { margin-bottom: 21px; box-shadow: 4px 4px 0 var(--ink); }
  .panel-header { min-height: 60px; padding: 15px 17px; }
  .panel-body { padding: 19px 17px; }
  .toolbar .input, .toolbar .select { flex: 1 1 140px; max-width: none; }
  .search-field { flex-basis: 100%; max-width: none; }
  .auth-shell { grid-template-columns: minmax(0, 1fr); width: calc(100% - 40px); min-height: 0; margin: 25px auto 38px; box-shadow: 6px 6px 0 var(--ink); }
  .auth-brand { gap: 24px; padding: 28px; }
  .auth-brand .page-title { font-size: 30px; }
  .auth-card { padding: 28px; }
  .modal-backdrop { padding: 18px; }
  .modal { max-width: calc(100vw - 36px); max-height: calc(100dvh - 36px); box-shadow: 5px 5px 0 var(--ink); }
  .modal-header, .modal-body { padding: 19px; }
  .modal-footer { padding: 15px 19px; }
  .detail-list { grid-template-columns: 90px minmax(0, 1fr); gap: 10px; }
}
@media (max-width: 480px) {
  .sidebar { padding-right: 16px; padding-left: 16px; }
  .topbar { flex-direction: column; gap: 7px; padding: 12px 18px; }
  .topbar-meta { flex-wrap: wrap; justify-content: flex-start; }
  .page { padding: 23px 17px 33px; }
  .page-title { font-size: 27px; }
  .page-description { font-size: 12px; }
  .header-actions .btn { flex: 1 1 auto; }
  .grid.four, .account-grid, .editor-aside .account-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-card { min-height: 122px; }
  .stat-number { margin-top: 6px; font-size: 34px; }
  .section-title { gap: 9px; font-size: 15px; }
  .number { font-size: 19px; }
  .panel-header > .actions { width: 100%; }
  .btn { min-height: 40px; padding-right: 13px; padding-left: 13px; }
  .auth-shell { width: calc(100% - 28px); margin-top: 18px; }
  .auth-brand, .auth-card { padding: 23px; }
  .auth-title { font-size: 25px; }
  .tabs .tab { flex: 1; padding-right: 10px; padding-left: 10px; }
  .modal-backdrop { padding: 10px; }
  .modal { max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .modal-header, .modal-body { padding: 17px; }
  .modal-footer { padding: 14px 17px; }
  .modal-footer .btn { flex: 1 1 auto; }
  .toast-stack { right: 16px; bottom: 17px; width: calc(100vw - 32px); }
  .pagination { padding: 15px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
  .loading::before { border-color: var(--ink); border-top-color: var(--orange); }
}
