:root {
  color-scheme: light dark;
  --canvas: #fafafa;
  --surface: #fff;
  --surface-muted: #f5f5f5;
  --surface-hover: #f0f0f0;
  --ink: #171717;
  --ink-secondary: #555;
  --ink-muted: #707070;
  --line: #e4e4e4;
  --line-strong: #c9c9c9;
  --button-bg: #222;
  --button-ink: #fff;
  --focus: #555;
  --accent: #536c5d;
  --status-scheduled: #536c5d;
  --status-paused: #a1844e;
  --status-busy: #737e8c;
  --status-published: #5d8065;
  --status-failed: #aa5955;
  --status-meta: #71838e;
  --status-neutral: #8d8d8d;
  --radius: 7px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #111;
    --surface: #181818;
    --surface-muted: #202020;
    --surface-hover: #292929;
    --ink: #f0f0f0;
    --ink-secondary: #bcbcbc;
    --ink-muted: #a0a0a0;
    --line: #303030;
    --line-strong: #505050;
    --button-bg: #e8e8e8;
    --button-ink: #171717;
    --focus: #c4c4c4;
    --accent: #9bb4a3;
    --status-scheduled: #9bb4a3;
    --status-paused: #bea978;
    --status-busy: #a3b0c0;
    --status-published: #8cb696;
    --status-failed: #d28a83;
    --status-meta: #97aebe;
    --status-neutral: #a0a0a0;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 0; scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); line-height: 1.5; }
body:has(dialog[open]) { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button, select, input, textarea { color: var(--ink); }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
input, textarea, select, fieldset { min-width: 0; }
fieldset { padding: 0; margin: 0; border: 0; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 2px; }
.main-content:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 100; transform: translateY(-160%); padding: 10px 16px; background: var(--button-bg); color: var(--button-ink); border-radius: var(--radius); }
.skip-link:focus { transform: translateY(0); }

.app-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1512px; min-height: 76px; margin: 0 auto; padding: 0 42px; display: flex; align-items: center; gap: 48px; }
.brand { flex-shrink: 0; font-size: 18px; font-weight: 650; letter-spacing: -.65px; }
.brand span, .login-title span { font-weight: 400; color: var(--ink-muted); }
.main-navigation { display: flex; gap: 28px; align-self: stretch; }
.main-navigation a { display: flex; align-items: center; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 13px; color: var(--ink-secondary); }
.main-navigation a:hover { color: var(--ink); }
.main-navigation a[aria-current="page"], .main-navigation a.active { border-bottom-color: var(--ink); color: var(--ink); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.account-menu { display: flex; align-items: center; gap: 17px; font-size: 12px; }
.account-name { color: var(--ink-secondary); max-width: 140px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.logout-link { color: var(--ink-muted); }
.logout-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.main-content { max-width: 1512px; padding: 42px 42px 60px; margin: 0 auto; }
.client-switcher { margin-bottom: 32px; }
.client-tabs { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0 28px; min-height: 43px; border-bottom: 1px solid var(--line); }
.client-tab { display: inline-flex; align-items: center; justify-content: center; padding: 10px 0 12px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 13px; font-weight: 500; color: var(--ink-muted); }
.client-tab:hover { color: var(--ink); }
.client-tab[aria-current="page"], .client-tab[aria-current="true"], .client-tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 650; }
.client-mobile { display: none; }
.client-picker { max-width: 900px; margin: 36px auto; }
.client-picker .page-heading { margin-bottom: 28px; }
.client-choices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.button.client-choice { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 88px; padding: 20px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 550; text-align: center; overflow-wrap: anywhere; transition: background .12s ease, border-color .12s ease; }
.button.client-choice:hover { background: var(--surface-muted); border-color: var(--ink-muted); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: 1.65px; font-weight: 650; color: var(--ink-muted); margin-bottom: 10px; }
.page-title { font-size: 27px; line-height: 1.2; font-weight: 600; letter-spacing: -1px; }
.page-description { margin-top: 9px; color: var(--ink-muted); font-size: 13px; }
.preview-label { flex-shrink: 0; padding: 5px 9px; border: 1px solid var(--line); border-radius: 4px; font-size: 10px; color: var(--ink-muted); background: var(--surface); }
.heading-actions { display: flex; align-items: center; gap: 10px; }
.button, .icon-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 37px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 12px; line-height: 1.4; font-weight: 550; text-align: center; transition: background .12s ease, border-color .12s ease; }
.button:hover, .icon-button:hover { background: var(--surface-hover); border-color: var(--ink-muted); }
.button.primary { background: var(--button-bg); color: var(--button-ink); border-color: var(--button-bg); }
.button.primary:hover { opacity: .86; }
.button.subtle { background: transparent; border-color: transparent; color: var(--ink-secondary); }
.button.subtle:hover { background: var(--surface-hover); border-color: transparent; }
.button.small { padding: 5px 10px; min-height: 30px; font-size: 11px; }
.button.danger { border-style: solid; font-weight: 650; }
.icon-button { padding: 7px 10px; min-width: 36px; }
.icon-button svg { width: 16px; height: 16px; }
.text-link { display: inline-flex; color: var(--ink-secondary); text-decoration: underline; text-underline-offset: 3px; font-size: 12px; }
.text-link:hover { color: var(--ink); }
.muted { color: var(--ink-muted); }

.filters { display: flex; align-items: end; gap: 12px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.filter-field { width: 200px; max-width: 100%; }
.field, .form-field { display: flex; flex-direction: column; min-width: 0; gap: 7px; }
.field label, .filter-field label, .form-field label, .field-label { display: block; color: var(--ink-secondary); font-size: 12px; font-weight: 550; }
.filter-field label { margin-bottom: 7px; }
.input, .select, .textarea, .field input, .field select, .filter-field select, .form-field input:not([type="checkbox"]):not([type="file"]), .form-field select, .form-field textarea, .form-section > textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--surface); font-size: 13px; line-height: 1.5; }
.select, .field select, .filter-field select, .form-field select { min-height: 40px; padding-right: 26px; }
textarea, .textarea { resize: vertical; min-height: 150px; }
input::placeholder, textarea::placeholder { color: var(--ink-muted); opacity: 1; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--ink); }
.field-hint, .field-error { font-size: 12px; color: var(--ink-muted); line-height: 1.5; }
.field-error { color: var(--ink); font-weight: 550; }
.field-error:empty { display: none; }
.field-error:not(:empty) { margin-top: 9px; }
.filter-reset { margin: 0 0 4px 3px; }
.month-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 17px; }
.month-label { font-size: 19px; line-height: 1.35; letter-spacing: -.5px; font-weight: 600; }
.month-navigation .month-label { margin: 0 8px; }
.month-navigation { display: flex; align-items: center; gap: 6px; }
.month-navigation .button { margin-left: 5px; }
.result-count { font-size: 12px; color: var(--ink-muted); }
.filters .result-count { margin-left: auto; padding-bottom: 10px; }
.calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.weekday-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.weekday { padding: 12px 14px; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; color: var(--ink-muted); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-day { position: relative; min-width: 0; min-height: 139px; padding: 10px 11px 13px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day:nth-last-child(-n+7) { border-bottom: 0; }
.calendar-day.outside { background: var(--canvas); }
.calendar-day.outside .day-number { color: var(--ink-muted); }
.calendar-day.today { background: var(--surface-muted); }
.calendar-day.selected { outline: 1px solid var(--ink-muted); outline-offset: -2px; }
.day-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 14px; min-height: 23px; }
.day-number { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; border-radius: 50%; font-size: 11px; color: var(--ink-secondary); font-variant-numeric: tabular-nums; }
.day-number:hover { background: var(--surface-hover); }
.today .day-number { background: var(--ink); color: var(--surface) !important; border-radius: 50%; font-weight: 600; }
.day-header .muted { font-size: 9px; }
.day-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 5px; }
.calendar-post { position: relative; display: block; padding: 0; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 5px; min-width: 0; width: 100%; aspect-ratio: 1; overflow: hidden; transition: border-color .12s ease; }
.calendar-post:hover { border-color: var(--ink-muted); }
.calendar-post:focus-visible { outline-offset: 2px; z-index: 1; }
.mini-art { display: flex; width: 100%; height: 100%; object-fit: cover; align-items: center; justify-content: center; font-size: 9px; color: var(--ink-secondary); }
.mini-art img { width: 100%; height: 100%; object-fit: cover; }
.media-placeholder { display: flex; align-items: center; justify-content: center; color: var(--ink-muted); background: var(--surface-muted); font-size: 12px; text-align: center; }
.mini-art.media-placeholder { font-size: 9px; padding-bottom: 8px; }
.post-marker { position: absolute; bottom: 3px; left: 3px; right: 3px; display: flex; justify-content: space-between; align-items: center; gap: 2px; }
.platform-badge { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 23px; padding: 2px 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; color: var(--ink-secondary); font-size: 9px; line-height: 1.1; font-weight: 650; letter-spacing: .1px; }
.post-marker .platform-badge { min-width: 17px; padding: 2px 3px; font-size: 8px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; background: var(--status-neutral); vertical-align: middle; }
.post-marker .status-dot { box-shadow: 0 0 0 2px var(--surface); margin-right: 2px; }
.status-queued { background: var(--status-scheduled); }
.status-paused { background: var(--status-paused); }
.status-creating, .status-ready, .status-publishing { background: var(--status-busy); }
.status-published { background: var(--status-published); }
.status-failed { background: var(--status-failed); }
.status-meta_scheduled { background: var(--status-meta); }
.status-cancelled, .status-validated { background: var(--status-neutral); }
.status-label { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-secondary); font-size: 11px; line-height: 1.4; white-space: nowrap; }
.more-posts { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; min-height: 26px; padding: 2px 5px; color: var(--ink-muted); font-size: 10px; border: 0; border-radius: 4px; background: transparent; }
.more-posts:hover { color: var(--ink); background: var(--surface-hover); }
.status-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 20px; padding-top: 17px; }
.status-legend .status-label { font-size: 10px; }
.agenda { display: none; }
.calendar-empty-note { margin-top: 18px; color: var(--ink-muted); font-size: 12px; text-align: center; }

.empty-state, .loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 60px 24px; min-height: 220px; color: var(--ink-muted); text-align: center; font-size: 13px; }
.empty-state h2, .empty-state h3 { color: var(--ink-secondary); font-weight: 550; font-size: 15px; }
.empty-state .button { margin-top: 6px; }
.skeleton { background: var(--surface-muted); border-radius: 4px; min-height: 14px; animation: loading-pulse 1.5s ease-in-out infinite; }
.loading-state > .skeleton { width: 110px; margin-bottom: 4px; }
@keyframes loading-pulse { 50% { opacity: .45; } }
.table-wrap { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post-table { border-collapse: collapse; width: 100%; text-align: left; table-layout: fixed; }
.post-table th { padding: 13px 16px; background: var(--canvas); color: var(--ink-muted); font-size: 10px; letter-spacing: .65px; text-transform: uppercase; font-weight: 600; }
.post-table td { padding: 15px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-secondary); vertical-align: middle; overflow-wrap: anywhere; }
.post-table th:first-child { width: 33%; }
.post-table th:nth-child(2) { width: 14%; }
.post-table th:nth-child(3) { width: 12%; }
.post-table th:nth-child(4) { width: 19%; }
.post-table th:last-child { width: 56px; }
.post-table td:last-child { padding-left: 3px; padding-right: 7px; }
.table-post { display: flex; align-items: center; gap: 12px; min-width: 0; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; }
.platform-cell { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.date-cell { display: block; font-variant-numeric: tabular-nums; }
.date-cell small { display: block; font-size: 10px; color: var(--ink-muted); margin-top: 3px; }
.post-table tbody tr:hover { background: var(--surface-muted); }
.post-table .post-row { cursor: pointer; }
.post-row { display: flex; align-items: center; gap: 13px; min-width: 0; width: 100%; padding: 0; border: 0; background: none; text-align: left; color: inherit; }
tr.post-row { display: table-row; }
.post-thumb { width: 46px; height: 46px; flex: 0 0 46px; display: flex; align-items: center; justify-content: center; border-radius: 5px; border: 1px solid var(--line); background: var(--surface-muted); overflow: hidden; object-fit: cover; font-size: 10px; color: var(--ink-muted); }
.post-thumb img, .post-thumb video { width: 100%; height: 100%; object-fit: cover; }
.post-info { min-width: 0; flex: 1; }
.post-info strong { font-size: 12px; color: var(--ink); font-weight: 600; }
.post-caption { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: var(--ink-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.post-info .post-caption { margin-top: 4px; }
.post-info .status-label { margin-top: 6px; }
.post-row-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.post-date { display: block; color: var(--ink-muted); font-size: 10px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.post-row-bottom { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.post-row-bottom .status-label { margin-top: 0; }
.post-row-bottom > .muted { font-size: 10px; }
.list-mobile { display: none; }

dialog { padding: 0; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
dialog::backdrop { background: rgb(0 0 0 / .28); }
.post-dialog { position: fixed; inset: 0 0 0 auto; width: min(540px, 100%); height: 100dvh; max-width: 100%; max-height: 100dvh; margin: 0; border-width: 0 0 0 1px; overflow: auto; overscroll-behavior: contain; }
#post-panel { display: flex; flex-direction: column; min-height: 100%; }
#post-panel > form { display: flex; flex-direction: column; flex: 1; }
.panel-header { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
.panel-header > div { min-width: 0; }
.panel-kicker { color: var(--ink-muted); font-size: 11px; margin-bottom: 3px; }
.panel-title { font-size: 18px; line-height: 1.35; font-weight: 600; letter-spacing: -.4px; overflow-wrap: anywhere; }
.panel-body { flex: 1; padding: 25px 28px; }
.panel-body > .post-row { padding: 16px 0; }
.panel-body > .post-row + .post-row { border-top: 1px solid var(--line); }
.panel-footer { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: flex-end; gap: 8px; padding: 17px 28px; background: var(--surface); border-top: 1px solid var(--line); }
.panel-footer.action-bar { justify-content: flex-start; }
.media-viewer { margin-bottom: 24px; }
.media-stage { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1; background: var(--surface-muted); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.media-stage > img, .media-stage > video { width: 100%; height: 100%; max-height: 480px; object-fit: contain; }
.media-stage > p, .media-stage > span { color: var(--ink-muted); font-size: 13px; }
.media-navigation { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 10px; }
.media-counter { font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.detail-caption { margin: 24px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.75; }
.detail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; padding: 21px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 0 20px; }
.meta-item { min-width: 0; font-size: 12px; color: var(--ink-secondary); overflow-wrap: anywhere; }
.meta-item dt, .meta-item > .field-label { margin-bottom: 5px; font-size: 10px; color: var(--ink-muted); font-weight: 400; }
.meta-item dd { margin: 0; }
.meta-item > span:first-child { display: block; color: var(--ink-muted); font-size: 10px; margin-bottom: 6px; }
.meta-item > strong { display: block; color: var(--ink-secondary); font-size: 12px; font-weight: 500; }
.meta-item > small { display: block; color: var(--ink-muted); font-size: 10px; margin-top: 4px; }
.copy-section { margin-top: 24px; }
.copy-section > h3 { color: var(--ink-muted); font-size: 11px; font-weight: 500; }
.copy-section .detail-caption { margin-top: 11px; }
.detail-note, .error-message, .group-note { padding: 13px 15px; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-muted); color: var(--ink-secondary); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.error-message { border-left: 3px solid var(--ink-muted); }
.group-note { background: none; padding: 0; border: 0; }
.action-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.action-bar .button.danger { margin-left: auto; }

.form-card { max-width: 860px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.form-section { padding: 26px 30px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.form-section > legend { float: left; width: 100%; padding: 0; margin-bottom: 18px; font-size: 13px; font-weight: 600; }
.form-section > legend + * { clear: both; }
.panel-body .form-section { padding: 24px 0; }
.panel-body > .form-section:first-child { padding-top: 0; }
.panel-body > .form-section:last-of-type { border-bottom: 0; }
.date-section > .field-hint { font-size: 11px; }
.form-card > .detail-note { margin: 22px 30px; }
.form-section > h2, .form-section > h3 { font-size: 14px; font-weight: 600; margin-bottom: 19px; }
.form-section > p { color: var(--ink-muted); font-size: 12px; margin-bottom: 19px; }
.form-section > .form-field + .form-field, .panel-body .form-field + .form-field { margin-top: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-grid + .form-field, .form-field + .form-grid { margin-top: 20px; }
.form-grid .form-field + .form-field { margin-top: 0; }
.check-options { display: flex; flex-wrap: wrap; gap: 10px; }
.check-option { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; padding: 10px 14px; min-height: 43px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 12px; cursor: pointer; }
.check-option input[type="checkbox"] { flex: 0 0 15px; }
.check-option > span { min-width: 0; overflow-wrap: anywhere; }
.check-option strong, .check-option small { display: block; }
.check-option small { margin-top: 3px; color: var(--ink-muted); font-size: 11px; font-weight: 400; }
.check-option:has(input:checked) { border-color: var(--ink-muted); background: var(--surface-muted); }
.check-option:has(input:disabled) { color: var(--ink-muted); cursor: not-allowed; }
input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: var(--ink-secondary); }
.drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 30px 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--canvas); text-align: center; min-height: 140px; }
.drop-zone > p { font-size: 13px; color: var(--ink-secondary); }
.drop-zone .field-hint { font-size: 11px; }
.drop-zone .button { margin-top: 3px; }
.drop-zone.dragover { background: var(--surface-hover); border-color: var(--ink); }
.upload-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 15px; list-style: none; }
.upload-item { min-width: 0; padding: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.upload-preview { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; background: var(--surface-muted); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.upload-preview img, .upload-preview video { width: 100%; height: 100%; object-fit: cover; }
.upload-filename { display: block; font-size: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-muted); margin-top: 6px; }
.upload-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px; margin-top: 6px; }
.upload-actions .button, .upload-actions .icon-button { padding: 4px 5px; min-width: 27px; min-height: 27px; font-size: 10px; }
.caption-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.char-count { font-size: 10px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.form-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; padding: 20px 30px; }
.form-footer .feedback { margin-right: auto; }
.form-footer-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.form-footer .feedback:not(:empty) { margin-top: 0; }
.feedback { font-size: 12px; color: var(--ink-muted); overflow-wrap: anywhere; }
.feedback:not(:empty) { margin-top: 12px; }
.feedback.error:not(:empty) { flex: 1 0 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-left: 3px solid var(--ink-secondary); border-radius: var(--radius); background: var(--surface-muted); color: var(--ink); font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }
.destination-summary { width: 100%; min-width: 0; padding: 14px 16px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--canvas); color: var(--ink-secondary); font-size: 12px; line-height: 1.7; white-space: normal; overflow-wrap: anywhere; }
.destination-summary > strong, .destination-summary > p:first-child { color: var(--ink); }
.destination-summary p + p { margin-top: 4px; }
.form-footer > .destination-summary { flex: 1 0 100%; }
.client-change-notice { padding: 13px 16px; margin: 0 0 22px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink-secondary); font-size: 12px; line-height: 1.65; white-space: normal; overflow-wrap: anywhere; }
.form-card > .client-change-notice { margin: 22px 30px; }
.toast-region { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 20; width: max-content; max-width: calc(100% - 32px); pointer-events: none; }
.toast { padding: 12px 18px; background: var(--button-bg); color: var(--button-ink); border-radius: var(--radius); font-size: 12px; text-align: center; border: 1px solid var(--line-strong); margin-top: 8px; overflow-wrap: anywhere; }
.toast.error { font-weight: 550; }
.confirm-dialog { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 40px); border-radius: 8px; }
.confirm-body { padding: 27px 27px 22px; }
.confirm-body h2, .confirm-body h3 { font-size: 18px; line-height: 1.4; letter-spacing: -.35px; font-weight: 600; margin-bottom: 10px; }
.confirm-body p { font-size: 13px; color: var(--ink-secondary); line-height: 1.65; }
.confirm-body .eyebrow { font-size: 10px; color: var(--ink-muted); }
.confirm-body .form-grid, .confirm-body .form-field { margin-top: 18px; }
.confirm-body .form-grid .form-field { margin-top: 0; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 27px 26px; }
.mobile-only { display: none !important; }
.noscript-message { padding: 20px; text-align: center; }

.login-page { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 32px 22px; }
.login-main { width: 100%; max-width: 366px; }
.login-intro { margin-bottom: 31px; }
.login-title { font-size: 31px; font-weight: 600; line-height: 1.25; letter-spacing: -1.1px; }
.login-intro .page-description { font-size: 13px; }
.login-form { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 27px; }
.login-form h2 { font-size: 14px; font-weight: 600; margin-bottom: 24px; }
.login-form .form-field { margin-top: 19px; }
.login-form .button { width: 100%; margin-top: 27px; min-height: 41px; }
.login-form .error-message { margin: -3px 0 20px; }
.login-footer { margin-top: 22px; font-size: 10px; color: var(--ink-muted); text-align: center; }

@media (min-width: 1500px) {
  .calendar-day { min-height: 150px; }
  .day-posts { gap: 7px; }
}

@media (max-width: 1100px) {
  .header-inner { padding: 0 28px; gap: 32px; }
  .main-navigation { gap: 22px; }
  .main-content { padding: 32px 28px 48px; }
  .header-actions { gap: 20px; }
  .account-name { max-width: 100px; }
  .calendar-day { min-height: 125px; padding: 9px 7px; }
  .day-posts { gap: 4px; }
  .day-header { margin-bottom: 12px; }
  .post-marker { bottom: 2px; left: 2px; right: 2px; }
  .post-marker .platform-badge { padding: 1px 2px; min-width: 15px; font-size: 7px; }
  .post-marker .status-dot { width: 5px; height: 5px; flex-basis: 5px; }
  .post-table th, .post-table td { padding-left: 11px; padding-right: 11px; }
  .post-table th:first-child { width: 30%; }
}

@media (max-width: 760px) {
  .header-inner { min-height: 70px; padding: 0 20px; gap: 25px; }
  .header-actions { gap: 16px; }
  .account-name { display: none; }
  .account-menu { gap: 0; }
  .main-navigation { gap: 18px; }
  .main-content { padding: 28px 20px 42px; }
  .page-heading { margin-bottom: 25px; }
  .page-title { font-size: 25px; }
  .filters { flex-wrap: wrap; gap: 12px; }
  .filter-field { flex: 1 1 150px; width: auto; }
  .filters .result-count { flex-basis: 100%; padding-bottom: 0; margin-left: 0; }
  .calendar-day { min-height: 112px; }
  .day-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-post:nth-child(3) { grid-column: 1; }
  .weekday { padding: 10px 8px; font-size: 9px; letter-spacing: .3px; }
  .post-table th, .post-table td { padding: 12px 9px; font-size: 11px; }
  .post-table .post-thumb { width: 34px; height: 34px; flex-basis: 34px; }
  .table-post { gap: 8px; }
  .platform-cell > span:not(.platform-badge) { display: none; }
  .status-label { white-space: normal; }
  .client-tabs { gap: 0 20px; }
  .client-tab { font-size: 12px; }
  .client-choices { gap: 9px; }
  .button.client-choice { padding: 17px 10px; font-size: 12px; }
}

@media (max-width: 640px) {
  .client-switcher { margin-bottom: 26px; }
  .client-tabs { display: none; }
  .client-mobile { display: grid; gap: 8px; width: 100%; }
  .client-mobile label { color: var(--ink-secondary); font-size: 12px; font-weight: 550; }
  .client-mobile select { width: 100%; min-width: 0; min-height: 47px; padding: 10px 32px 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 550; }
  .client-picker { margin-top: 12px; }
  .client-choices { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .button.client-choice { justify-content: flex-start; min-height: 58px; padding: 16px 18px; font-size: 14px; text-align: left; }
}

@media (max-width: 600px) {
  .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 0 12px; padding: 17px 18px 0; }
  .brand { font-size: 18px; grid-column: 1; grid-row: 1; }
  .header-actions { display: contents; }
  .new-post-button { grid-column: 3; grid-row: 1; justify-self: end; font-size: 11px; min-height: 34px; padding: 7px 11px; }
  .account-menu { grid-column: 2; grid-row: 1; justify-self: end; gap: 10px; min-width: 0; }
  .account-name { display: inline; max-width: 64px; font-size: 10px; }
  .logout-link { font-size: 11px; }
  .main-navigation { grid-column: 1 / -1; grid-row: 2; height: 48px; gap: 20px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
  .main-navigation::-webkit-scrollbar { display: none; }
  .main-navigation a { font-size: 12px; flex-shrink: 0; }
  .main-content { padding: 26px 18px 40px; }
  .page-heading { display: flex; align-items: start; gap: 14px; margin-bottom: 24px; }
  .preview-label { font-size: 9px; padding: 4px 7px; }
  .page-title { font-size: 24px; }
  .eyebrow { font-size: 9px; margin-bottom: 8px; }
  .page-description { font-size: 12px; line-height: 1.65; margin-top: 8px; }
  .heading-actions { flex-shrink: 0; }
  .filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 10px; padding-bottom: 20px; margin-bottom: 22px; }
  .filter-field { width: 100%; min-width: 0; }
  .filter-field label { font-size: 11px; }
  .filters .result-count { grid-column: 1 / -1; font-size: 11px; }
  .filter-reset { grid-column: 1 / -1; justify-self: start; margin: 0; }
  .month-toolbar { flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
  .month-label { font-size: 17px; }
  .month-navigation .month-label { margin: 0 6px; }
  .month-navigation { gap: 4px; }
  .month-navigation .button, .month-navigation .icon-button { min-height: 33px; padding: 6px 9px; min-width: 31px; font-size: 11px; }
  .month-navigation .button { margin-left: 2px; }
  .calendar { display: none; }
  .agenda { display: block; }
  .agenda-day { margin-top: 22px; }
  .agenda-day:first-child { margin-top: 0; }
  .agenda-date { display: flex; align-items: center; gap: 9px; padding-bottom: 10px; font-size: 11px; color: var(--ink-muted); font-weight: 550; }
  .agenda-date .day-number { width: 22px; height: 22px; }
  .agenda-items { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
  .agenda-items .post-row { padding: 13px 12px; gap: 11px; }
  .agenda-items .post-row + .post-row { border-top: 1px solid var(--line); }
  .post-row:hover { background: var(--surface-muted); }
  .post-row > .status-label { max-width: 90px; flex-shrink: 0; font-size: 10px; }
  .post-thumb { width: 48px; height: 48px; flex-basis: 48px; }
  .post-info { font-size: 11px; }
  .post-info strong { font-size: 12px; }
  .post-info .post-caption { font-size: 11px; }
  .post-info .muted { font-size: 10px; }
  .status-legend { justify-content: flex-start; border-top: 1px solid var(--line); margin-top: 26px; gap: 9px 16px; }
  .table-wrap { display: none; }
  .list-mobile { display: block; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
  .list-mobile .post-row { padding: 15px 12px; }
  .list-mobile .post-row + .post-row { border-top: 1px solid var(--line); }
  .post-dialog { width: 100%; border: 0; }
  .panel-header { padding: 18px 20px; }
  .panel-title { font-size: 17px; }
  .panel-body { padding: 21px 20px; }
  .panel-footer { padding: 16px 20px max(16px, env(safe-area-inset-bottom)); }
  .media-stage > img, .media-stage > video { max-height: 420px; }
  .detail-caption { font-size: 13px; }
  .detail-meta { gap: 18px 16px; }
  .action-bar { gap: 7px; }
  .action-bar .button { padding: 8px 11px; font-size: 11px; }
  .form-card { border-radius: var(--radius); }
  .form-section { padding: 22px 18px; }
  .form-card > .detail-note { margin: 18px; }
  .form-card > .client-change-notice { margin: 18px; }
  .form-section > h2, .form-section > h3 { font-size: 13px; margin-bottom: 17px; }
  .form-grid { gap: 15px 12px; }
  .form-grid .form-field { grid-column: 1 / -1; }
  .form-grid:has(input[type="date"]):has(input[type="time"]) .form-field { grid-column: auto; }
  .input, .select, .textarea, .field input, .field select, .filter-field select, .form-field input:not([type="checkbox"]):not([type="file"]), .form-field select, .form-field textarea, .form-section > textarea { font-size: 16px; padding: 9px 10px; }
  .filter-field select { font-size: 13px; }
  .form-field input[type="date"], .form-field input[type="time"] { font-size: 14px; }
  .check-option { padding: 9px 11px; font-size: 12px; }
  .drop-zone { padding: 24px 12px; }
  .drop-zone > p { font-size: 12px; }
  .upload-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .form-footer { padding: 18px; flex-wrap: wrap; }
  .form-footer .feedback { flex-basis: 100%; }
  .confirm-body { padding: 24px 22px 20px; }
  .confirm-actions { padding: 0 22px 22px; }
  .empty-state, .loading-state { min-height: 190px; padding: 38px 16px; }
  .toast-region { bottom: max(16px, env(safe-area-inset-bottom)); }
  .toast { padding: 12px 15px; }
  .mobile-only { display: block !important; }
  .desktop-only { display: none !important; }
}

/* Revisión e Insumos */
.rv-toolbar { display: grid; gap: 14px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.rv-toolbar-row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; min-width: 0; }
.rv-toolbar-actions { align-items: center; }
.rv-schedule-button { margin-left: auto; }
.rv-counts { padding-bottom: 10px; font-size: 12px; color: var(--ink-muted); }
.check-option.rv-only { min-height: 37px; padding: 7px 12px; }
.rv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.rv-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rv-card.selected { outline: 2px solid var(--ink); outline-offset: -2px; }
.rv-card-main { display: flex; flex-direction: column; flex: 1; width: 100%; min-width: 0; padding: 0; border: 0; background: none; color: inherit; text-align: left; }
.rv-card-main:focus-visible { outline-offset: -3px; }
.rv-thumb { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; background: var(--surface-muted); overflow: hidden; }
.rv-thumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity .12s ease; }
.rv-card-main:hover .rv-thumb img { opacity: .9; }
.rv-thumb .media-placeholder { width: 100%; height: 100%; }
.rv-thumb .rv-chip { position: absolute; top: 8px; left: 8px; }
.rv-version { position: absolute; top: 8px; right: 8px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink-secondary); font-size: 10px; font-weight: 650; }
.rv-card-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 10px 11px 12px; color: var(--ink-muted); font-size: 11px; }
.rv-card-info strong { color: var(--ink); font-size: 12px; font-weight: 600; }
.rv-card-info > span { overflow-wrap: anywhere; }
.rv-card-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-secondary); }
.rv-select { display: flex; align-items: center; gap: 8px; padding: 10px 11px; border-top: 1px solid var(--line); font-size: 12px; cursor: pointer; }
.rv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-secondary); font-size: 10px; font-weight: 650; line-height: 1.3; white-space: nowrap; }
.rv-chip::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--status-neutral); }
.rv-pendiente::before, .in-abierta::before { background: var(--status-paused); }
.rv-aprobado::before, .in-resuelta::before { background: var(--status-published); }
.rv-cambios::before { background: var(--status-failed); }
.in-recibida::before { background: var(--status-busy); }
.rv-batch { position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding: 12px 14px max(12px, env(safe-area-inset-bottom)); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.rv-batch-count { font-size: 12px; font-weight: 600; }
.rv-batch-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.review-dialog { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: 100%; max-height: 100dvh; margin: 0; border: 0; overflow: auto; overscroll-behavior: contain; }
#review-panel { display: flex; flex-direction: column; min-height: 100%; }
.rv-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.rv-head-text { min-width: 0; }
.rv-head-nav { display: flex; flex-shrink: 0; align-items: center; gap: 6px; }
.rv-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
.rv-stage-col { --rv-stage-h: calc(100dvh - 220px); display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 20px 24px; background: var(--canvas); }
.rv-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; padding: 20px 24px 28px; border-left: 1px solid var(--line); }
.rv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.segmented { display: inline-flex; flex-wrap: wrap; max-width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.seg { min-height: 32px; padding: 5px 11px; border: 0; border-right: 1px solid var(--line); background: var(--surface); color: var(--ink-secondary); font-size: 11px; font-weight: 550; }
.seg:last-child { border-right: 0; }
.seg.active { background: var(--button-bg); color: var(--button-ink); }
.seg:focus-visible { outline-offset: -4px; }
.rv-left { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-secondary); }
.rv-left select { min-height: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rv-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.rv-track::-webkit-scrollbar { display: none; }
.rv-slide { display: flex; flex: 0 0 100%; justify-content: center; min-width: 0; scroll-snap-align: center; }
.rv-frame { position: relative; width: min(100%, calc(var(--rv-stage-h) * var(--arn, .8))); aspect-ratio: var(--ar, 4 / 5); margin: 0 auto; overflow: hidden; background: var(--surface-muted); border: 1px solid var(--line); border-radius: 4px; }
.rv-frame.pinnable { cursor: crosshair; }
.rv-frame img, .rv-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.rv-pins { position: absolute; inset: 0; pointer-events: none; }
.rv-pin { position: absolute; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; transform: translate(-50%, -50%); border: 2px solid #fff; border-radius: 50%; background: #e0185e; color: #fff; font-size: 11px; font-weight: 700; box-shadow: 0 1px 4px rgb(0 0 0 / .45); pointer-events: auto; }
.rv-pin.pending { background: #171717; border-style: dashed; }
.rv-video { display: flex; justify-content: center; }
.rv-video video { width: auto; max-width: 100%; max-height: var(--rv-stage-h); background: #000; border-radius: 4px; }
.rv-hint { color: var(--ink-muted); font-size: 11px; }
.rv-pin-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-secondary); }
.rv-compare-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rv-compare-side figure { min-width: 0; margin: 0; }
.rv-compare-side figcaption { margin-bottom: 6px; color: var(--ink-secondary); font-size: 11px; font-weight: 650; }
.rv-compare-side .rv-frame { --rv-stage-h: calc(100dvh - 260px); }
.rv-range { display: flex; align-items: center; gap: 10px; color: var(--ink-secondary); font-size: 11px; }
.rv-range input { flex: 1; min-width: 0; accent-color: var(--ink-secondary); }
.rv-diff-note { color: var(--ink-secondary); font-size: 12px; }
.rv-decision { display: grid; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.rv-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink-muted); font-size: 11px; }
.rv-decision-actions, .rv-footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rv-decision-actions .button, .rv-footer .button { min-height: 42px; font-size: 13px; }
.rv-footer { display: none; }
#rv-composer:empty { display: none; }
.rv-composer { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface-muted); }
.rv-composer h3 { font-size: 13px; font-weight: 600; }
.rv-composer textarea, .in-reply textarea { width: 100%; min-height: 96px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 13px; line-height: 1.5; }
.rv-tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.rv-tag { min-height: 30px; padding: 4px 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-secondary); font-size: 11px; font-weight: 550; }
.rv-tag.active { background: var(--button-bg); color: var(--button-ink); border-color: var(--button-bg); }
.rv-tag.static { min-height: 0; padding: 1px 7px; font-size: 10px; }
.check-option.rv-time { min-height: 36px; padding: 7px 10px; background: var(--surface); }
.rv-composer-actions, .in-reply-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.rv-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin: 0; }
.rv-meta div { min-width: 0; }
.rv-meta dt { margin-bottom: 4px; color: var(--ink-muted); font-size: 10px; }
.rv-meta dd { margin: 0; color: var(--ink-secondary); font-size: 12px; overflow-wrap: anywhere; }
.rv-copy h3, .rv-comments h3 { color: var(--ink-muted); font-size: 11px; font-weight: 500; }
.rv-copy .detail-caption { margin: 8px 0 0; font-size: 13px; line-height: 1.65; }
.rv-empty { margin-top: 8px; font-size: 12px; }
.rv-comment-list { display: grid; gap: 12px; margin-top: 10px; list-style: none; }
.rv-comment { display: flex; gap: 10px; min-width: 0; }
.rv-comment > div { flex: 1; min-width: 0; }
.rv-comment p { font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.rv-comment-num { display: inline-flex; flex: 0 0 22px; align-items: center; justify-content: center; height: 22px; border-radius: 50%; background: #e0185e; color: #fff; font-size: 10px; font-weight: 700; }
.rv-comment-num.old { flex-basis: auto; padding: 0 6px; border-radius: 4px; background: var(--surface-muted); color: var(--ink-secondary); border: 1px solid var(--line); }
.rv-comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; color: var(--ink-muted); font-size: 10px; }
.rv-old { margin-top: 14px; color: var(--ink-secondary); font-size: 12px; }
.rv-old summary { cursor: pointer; }
.rv-platforms { display: grid; gap: 8px; margin-top: 16px; }
.rv-platforms legend { margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.confirm-body .rv-schedule-summary { margin-top: 14px; color: var(--ink); font-weight: 550; }
.rv-schedule-list { max-height: 38vh; margin-top: 10px; overflow: auto; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); }
.rv-schedule-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; padding: 8px 10px; border-top: 1px solid var(--line); font-size: 12px; }
.rv-schedule-list li:first-child { border-top: 0; }
.rv-schedule-list strong { font-weight: 600; }
.rv-schedule-list li.error span { color: var(--ink); font-weight: 550; overflow-wrap: anywhere; }

.in-panel { margin-bottom: 28px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.in-panel-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.in-panel-head h2, .in-title { font-size: 16px; font-weight: 600; letter-spacing: -.3px; }
.in-panel-head p { margin-top: 4px; font-size: 12px; }
.in-panel-head .filter-field { width: 220px; }
.in-stages { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; list-style: none; }
.in-stage { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--canvas); color: var(--ink-muted); font-size: 11px; }
.in-stage-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 10px; font-weight: 650; }
.in-stage-name { line-height: 1.35; overflow-wrap: anywhere; }
.in-stage.done { color: var(--ink-secondary); }
.in-stage.done .in-stage-num { background: var(--status-published); border-color: var(--status-published); color: var(--surface); }
.in-stage.current { border-color: var(--ink); background: var(--surface); color: var(--ink); font-weight: 600; }
.in-stage.current .in-stage-num { background: var(--button-bg); border-color: var(--button-bg); color: var(--button-ink); }
.in-summary { margin-top: 14px; color: var(--ink-secondary); font-size: 13px; line-height: 1.6; }
.in-sub { margin: 18px 0 8px; font-size: 12px; font-weight: 600; }
.in-blocks { display: grid; gap: 4px; padding-left: 18px; color: var(--ink-secondary); font-size: 13px; overflow-wrap: anywhere; }
.in-requests .in-title { margin-bottom: 14px; }
.in-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.in-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-secondary); font-size: 12px; font-weight: 550; }
.in-tab.active { background: var(--button-bg); border-color: var(--button-bg); color: var(--button-ink); }
.in-tab-count { opacity: .8; font-variant-numeric: tabular-nums; }
.in-list { display: grid; gap: 14px; }
.in-card { display: grid; gap: 10px; min-width: 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.in-card.urgent { border-color: var(--status-failed); box-shadow: inset 3px 0 0 var(--status-failed); }
.in-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; color: var(--ink-muted); font-size: 11px; }
.in-type { font-size: 10px; font-weight: 650; letter-spacing: .8px; text-transform: uppercase; }
.in-deadline { color: var(--ink-secondary); font-weight: 600; }
.in-deadline.urgent { color: var(--status-failed); }
.in-need { font-size: 15px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.in-why, .in-how, .in-blocked { color: var(--ink-secondary); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.in-how > span, .in-blocked > span:first-child { color: var(--ink-muted); }
.in-chip { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--canvas); font-size: 11px; overflow-wrap: anywhere; }
.in-files, .in-replies { display: grid; gap: 8px; list-style: none; }
.in-files li { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 12px; }
.in-files img, .in-file-icon { display: inline-flex; flex: 0 0 44px; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-muted); color: var(--ink-muted); font-size: 9px; object-fit: cover; }
.in-file-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.in-file-text a { overflow-wrap: anywhere; }
.in-file-text .muted { font-size: 10px; }
.in-replies li { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--canvas); font-size: 13px; }
.in-replies p { white-space: pre-wrap; overflow-wrap: anywhere; }
.in-replies .muted { display: block; margin-top: 4px; font-size: 10px; }
.in-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
.in-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.in-actions label.button { cursor: pointer; }
label.button:focus-within { outline: 2px solid var(--focus); outline-offset: 4px; }
label.button.is-busy { opacity: .6; cursor: progress; }
.in-reply { display: grid; gap: 8px; }

@media (max-width: 900px) {
  .rv-body { grid-template-columns: minmax(0, 1fr); }
  .rv-stage-col { --rv-stage-h: 60dvh; }
  .rv-side { border-left: 0; border-top: 1px solid var(--line); }
  .rv-decision-actions { display: none; }
  .rv-footer { position: sticky; bottom: 0; z-index: 5; display: grid; padding: 10px 16px max(10px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
  .in-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .rv-toolbar { padding-bottom: 18px; margin-bottom: 18px; }
  .rv-toolbar-row .rv-month { flex: 1 1 100%; width: 100%; }
  .rv-counts { padding-bottom: 0; }
  .rv-toolbar-actions > * { flex: 1 1 auto; }
  .rv-schedule-button { flex-basis: 100%; margin-left: 0; }
  .rv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rv-card-info { padding: 9px 9px 10px; }
  .rv-batch { flex-direction: column; align-items: stretch; }
  .rv-batch-actions .button { flex: 1 1 auto; }
  .rv-head { padding: 10px 14px; gap: 8px; }
  .rv-head .panel-title { font-size: 15px; }
  .rv-head .panel-kicker { font-size: 10px; }
  .rv-head-nav { gap: 4px; }
  .rv-head-nav .icon-button { min-width: 32px; min-height: 34px; padding: 5px 8px; }
  .rv-stage-col { --rv-stage-h: 56dvh; padding: 14px; }
  .rv-compare-side .rv-frame { --rv-stage-h: 44dvh; }
  .rv-side { padding: 16px 14px 24px; }
  .rv-keys { display: none; }
  .rv-meta { gap: 12px; }
  .in-panel { padding: 16px 14px; }
  .in-panel-head .filter-field { width: 100%; }
  .in-card { padding: 16px 14px; }
  .in-stage { padding: 8px 6px; font-size: 10px; }
  .in-actions > * { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Programmatic focus targets (panel titles) are not keyboard stops: no ring. */
[tabindex="-1"]:focus { outline: none; }
