:root {
  color-scheme: dark;
  --bg: #080b10;
  --surface: #0d1118;
  --surface-2: #111720;
  --surface-3: #171e28;
  --line: rgba(255, 255, 255, .075);
  --line-strong: rgba(255, 255, 255, .13);
  --text: #f1eee6;
  --muted: #959ba5;
  --dim: #646b77;
  --gold: #c9a227;
  --gold-soft: #e3c864;
  --gold-bg: rgba(201, 162, 39, .11);
  --green: #61d19b;
  --red: #ef7974;
  --radius: 16px;
  --safe-bottom: max(14px, env(safe-area-inset-bottom));
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; overflow-x: hidden; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; }

.studio-shell, .workspace { min-height: 100vh; }
.desktop-sidebar, .desktop-topbar { display: none; }

.mobile-header { position: sticky; z-index: 10; top: 0; height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 8px 15px; border-bottom: 1px solid var(--line); background: rgba(8, 11, 16, .9); backdrop-filter: blur(20px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(201, 162, 39, .38); border-radius: 11px; background: linear-gradient(145deg, rgba(201,162,39,.17), rgba(201,162,39,.045)); color: var(--gold-soft); font: 700 21px Georgia, serif; }
.brand-mark span { position: absolute; right: 7px; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.brand > span:last-child { display: grid; gap: 2px; }
.brand b { font-size: 12px; letter-spacing: .12em; }
.brand small { color: var(--dim); font-size: 7px; letter-spacing: .16em; }
.header-actions { display: flex; align-items: center; gap: 9px; }
@media (max-width: 430px) {
  .mobile-header .brand.compact > span:last-child { display: none; }
  .mobile-header .header-actions { min-width: 0; gap: 6px; }
}
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.025); color: var(--muted); cursor: pointer; font-size: 18px; }
.icon-btn:active { transform: scale(.96); }
.icon-btn.is-spinning { animation: spin .9s linear infinite; }
.access-chip { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid rgba(201,162,39,.32); background: var(--gold-bg); color: var(--gold-soft); cursor: pointer; }
.access-chip i, .operator-access-chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 12%, transparent); }
.access-chip-mobile { width: 38px; height: 38px; border-radius: 50%; font: 700 12px Georgia, serif; }
.access-chip[data-tone="ready"], .operator-access-chip[data-tone="ready"] { border-color: rgba(97,209,155,.25); background: rgba(97,209,155,.07); color: var(--green); }
.access-chip[data-tone="limited"], .operator-access-chip[data-tone="limited"] { border-color: rgba(227,200,100,.32); color: var(--gold-soft); }
.access-chip[data-tone="error"], .operator-access-chip[data-tone="error"] { border-color: rgba(239,121,116,.34); background: rgba(239,121,116,.07); color: var(--red); }

.content { width: 100%; max-width: 1500px; margin: 0 auto; padding: 24px 14px calc(98px + var(--safe-bottom)); }
.view { animation: view-in .22s ease; }
.view-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.view-hero > div { min-width: 0; }
.eyebrow, .sheet-head span, .action-sheet header span, .section-head span { display: block; margin-bottom: 8px; color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .2em; }
.view-hero h1 { margin: 0; font: 400 clamp(29px, 8.6vw, 46px)/1.02 Georgia, serif; letter-spacing: -.045em; }
.view-hero h1 em { color: var(--gold-soft); font-weight: 400; }
.view-hero p { max-width: 680px; margin: 11px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.view-hero.compact { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.hero-count { color: var(--gold-soft); font: 400 30px Georgia, serif; }
.selection-toggle { flex: 0 0 auto; height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(255,255,255,.03); color: var(--muted); font-size: 10px; }
.selection-toggle.is-active { border-color: rgba(201,162,39,.35); background: var(--gold-bg); color: var(--gold-soft); }

.mobile-search { height: 44px; display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--dim); }
.mobile-search span { font-size: 21px; transform: rotate(-18deg); }
.mobile-search input, .desktop-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.mobile-search input::placeholder, .desktop-search input::placeholder { color: var(--dim); }

.metric-scroller { display: flex; gap: 9px; margin: 20px -14px 0; padding: 0 14px 3px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.metric-scroller::-webkit-scrollbar, .type-tabs::-webkit-scrollbar, .filters::-webkit-scrollbar { display: none; }
.metric-scroller article { min-width: 118px; padding: 14px; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.012)); }
.metric-scroller span, .metric-scroller small { display: block; color: var(--dim); font-size: 8px; }
.metric-scroller strong { display: block; margin: 6px 0 3px; color: #eee9db; font: 400 23px Georgia, serif; }

.type-tabs { display: flex; gap: 5px; margin: 22px -14px 0; padding: 0 14px 11px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.type-tabs button { min-height: 34px; padding: 0 11px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); white-space: nowrap; font-size: 10px; }
.type-tabs button b { margin-left: 4px; color: var(--dim); font-size: 7px; }
.type-tabs button.is-active { border-color: rgba(201,162,39,.18); background: var(--gold-bg); color: #f0e5b9; }

.filters { display: flex; gap: 8px; margin: 11px -14px 0; padding: 0 14px 5px; overflow-x: auto; }
.filters label { flex: 0 0 auto; display: grid; gap: 5px; }
.filters label > span, .field > span { color: var(--dim); font-size: 8px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
select, input, textarea { border: 1px solid var(--line); outline: 0; border-radius: 10px; background: #0b1017; color: #c6cad1; }
select:focus, input:focus, textarea:focus { border-color: rgba(201,162,39,.38); box-shadow: 0 0 0 3px rgba(201,162,39,.06); }
.filters select { height: 34px; min-width: 116px; padding: 0 28px 0 10px; font-size: 9px; }
.result-line { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--dim); font-size: 8px; }
.result-line span:last-child { color: var(--gold); text-align: right; }

.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.media-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .18s, transform .18s; }
.media-card:active { transform: scale(.985); }
.media-card.is-selected { border-color: rgba(224,194,94,.62); box-shadow: 0 0 0 2px rgba(201,162,39,.1); }
.select-check { position: absolute; z-index: 4; top: 8px; left: 8px; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; background: rgba(5,7,10,.74); color: transparent; backdrop-filter: blur(8px); }
.media-card.is-selected .select-check { border-color: var(--gold-soft); background: var(--gold); color: #171108; font-weight: 900; }
.media-preview { position: relative; aspect-ratio: 4/5; overflow: hidden; background: #07090d; }
.media-preview::after { content: ""; position: absolute; inset: auto 0 0; height: 42%; background: linear-gradient(transparent, rgba(0,0,0,.67)); pointer-events: none; }
.media-preview img, .media-preview video { width: 100%; height: 100%; display: block; object-fit: cover; }
.preview-badges { position: absolute; z-index: 2; top: 8px; right: 8px; display: flex; gap: 4px; }
.preview-badges span { min-height: 20px; display: inline-flex; align-items: center; padding: 0 6px; border: 1px solid rgba(255,255,255,.13); border-radius: 6px; background: rgba(5,7,10,.65); color: #e7e4dc; backdrop-filter: blur(9px); font-size: 8px; }
.preview-badges .meta-present { border-color: rgba(201,162,39,.3); color: var(--gold-soft); }
.duration-badge { position: absolute; z-index: 2; right: 8px; bottom: 8px; padding: 3px 5px; border-radius: 5px; background: rgba(0,0,0,.68); color: #fff; font-size: 7px; }
.preview-fallback { position: absolute; z-index: 0; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 18px; background: radial-gradient(circle at 50% 42%, rgba(201,162,39,.1), transparent 48%), #080b10; color: var(--dim); text-align: center; }
.preview-fallback svg { width: 30px; }
.preview-fallback b { color: var(--muted); font-size: 9px; }
.preview-fallback span { font-size: 7px; line-height: 1.4; }
.media-preview img { position: relative; z-index: 1; background: #07090d; }
.media-preview.is-preview-missing img { display: none; }
.file-preview { height: 100%; display: grid; place-content: center; gap: 8px; text-align: center; background: radial-gradient(circle at center, rgba(201,162,39,.08), transparent 50%); color: var(--muted); }
.file-preview svg { width: 34px; margin: auto; }
.file-preview b { font-size: 9px; letter-spacing: .1em; }
.audio-preview { height: 100%; display: flex; align-items: center; justify-content: center; gap: 4px; background: linear-gradient(145deg, #111824, #090d13); }
.audio-preview i { width: 3px; border-radius: 5px; background: linear-gradient(var(--gold-soft), #765f18); }
.audio-preview i:nth-child(odd) { height: 30%; }.audio-preview i:nth-child(2n) { height: 58%; }.audio-preview i:nth-child(3n) { height: 76%; }
.card-body { padding: 10px; }
.card-title, .card-path { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card-title { color: #e6e3dc; font-size: 10px; font-weight: 650; }
.card-path { margin-top: 4px; color: var(--dim); font-size: 8px; }
.card-organize { min-height: 20px; display: flex; align-items: center; gap: 4px; margin-top: 8px; overflow: hidden; }
.card-rating { color: var(--gold-soft); font-size: 8px; letter-spacing: -.04em; white-space: nowrap; }
.card-rating.is-empty { color: var(--dim); letter-spacing: 0; }
.card-stage, .tag-chip { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 5px; border-radius: 5px; background: rgba(255,255,255,.045); color: var(--muted); font-size: 7px; text-transform: uppercase; }
.card-stage.prepared { background: rgba(97,209,155,.08); color: var(--green); }
.card-meta { display: flex; justify-content: space-between; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.05); color: var(--dim); font-size: 8px; }
.card-meta span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.skeleton-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.skeleton-card i, .skeleton-card span { display: block; background: linear-gradient(90deg, #111720, #1a222d, #111720); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.skeleton-card i { aspect-ratio: 4/5; }.skeleton-card span { height: 8px; margin: 11px; border-radius: 4px; }.skeleton-card span:last-child { width: 52%; margin-top: -4px; }
.empty-state { grid-column: 1/-1; min-height: 260px; display: grid; place-content: center; justify-items: center; padding: 24px; border: 1px dashed var(--line-strong); border-radius: 15px; color: var(--muted); text-align: center; }
.empty-state svg { width: 34px; margin-bottom: 12px; color: var(--dim); }.empty-state strong { font-size: 12px; }.empty-state p { max-width: 380px; margin: 7px 0 0; color: var(--dim); font-size: 9px; line-height: 1.5; }
.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 24px; }
.pagination button, .pagination span { min-width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); font-size: 9px; }
.pagination button.is-active { border-color: rgba(201,162,39,.3); background: var(--gold-bg); color: var(--gold-soft); }
.pagination button:disabled { opacity: .35; }

.requests-hero { align-items: center; }
.request-create { border-color: rgba(201,162,39,.36); background: linear-gradient(145deg, rgba(201,162,39,.2), rgba(201,162,39,.07)); color: var(--gold-soft); }
.request-grid { display: grid; gap: 11px; }
.request-card { position: relative; overflow: hidden; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.012)); cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s; }
.request-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--dim); opacity: .55; }
.request-card.priority-high::before { background: var(--gold); opacity: .9; }
.request-card.priority-urgent::before { background: var(--red); opacity: 1; }
.request-card:active { transform: scale(.988); }
.request-card-head { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: start; gap: 11px; }
.request-type-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(201,162,39,.18); border-radius: 12px; background: var(--gold-bg); color: var(--gold-soft); font-size: 19px; }
.request-title-wrap { min-width: 0; }
.request-title-wrap small { display: block; margin-bottom: 5px; color: var(--dim); font-size: 7px; letter-spacing: .1em; text-transform: uppercase; }
.request-title-wrap strong { display: -webkit-box; overflow: hidden; color: #ebe7dd; font: 400 16px/1.25 Georgia, serif; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.request-status { flex: 0 0 auto; padding: 5px 7px; border-radius: 7px; background: rgba(255,255,255,.05); color: var(--muted); font-size: 7px; text-transform: uppercase; white-space: nowrap; }
.request-status.new, .request-status.briefing { background: var(--gold-bg); color: var(--gold-soft); }
.request-status.in_progress { background: rgba(85,156,255,.1); color: #8db9ff; }
.request-status.review { background: rgba(192,124,255,.1); color: #d09bff; }
.request-status.completed { background: rgba(97,209,155,.09); color: var(--green); }
.request-status.cancelled { background: rgba(239,121,116,.08); color: var(--red); }
.request-card-details { display: -webkit-box; overflow: hidden; margin: 12px 0 0 53px; color: var(--muted); font-size: 9px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.request-tags { display: flex; gap: 5px; margin: 11px 0 0 53px; overflow: hidden; }
.request-tags span { max-width: 120px; overflow: hidden; padding: 4px 6px; border-radius: 6px; background: rgba(255,255,255,.045); color: #a9aeb6; font-size: 7px; white-space: nowrap; text-overflow: ellipsis; }
.request-card-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 13px; padding-top: 11px; border-top: 1px solid rgba(255,255,255,.055); }
.request-card-meta span { min-width: 0; color: var(--dim); font-size: 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.request-card-meta b { color: #c5c3bd; font-weight: 650; }
.request-progress { height: 3px; margin-top: 11px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.05); }
.request-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8f7117, var(--gold-soft)); }

.upload-drop { min-height: 78px; display: flex; align-items: center; gap: 12px; margin-top: 15px; padding: 12px; border: 1px dashed rgba(201,162,39,.28); border-radius: 13px; background: var(--gold-bg); cursor: pointer; }
.upload-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-drop > i { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(201,162,39,.25); border-radius: 11px; color: var(--gold-soft); font-style: normal; font-size: 19px; }
.upload-drop span, .upload-drop b, .upload-drop small { display: block; }
.upload-drop b { color: #ded7bd; font-size: 9px; }
.upload-drop small { margin-top: 5px; color: #a89f7c; font-size: 7px; line-height: 1.45; }
.upload-queue { display: grid; gap: 6px; margin-top: 9px; }
.upload-file { min-height: 42px; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.upload-file > i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.04); color: var(--gold-soft); font-style: normal; }
.upload-file span { min-width: 0; }
.upload-file b, .upload-file small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.upload-file b { font-size: 8px; }.upload-file small { margin-top: 3px; color: var(--dim); font-size: 7px; }
.upload-file button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: rgba(239,121,116,.07); color: var(--red); }

.request-detail-hero { padding: 15px; margin: 12px 0; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, rgba(201,162,39,.09), rgba(255,255,255,.015)); }
.request-detail-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.request-detail-top > div { display: flex; gap: 6px; flex-wrap: wrap; }
.priority-pill { padding: 5px 7px; border-radius: 7px; background: rgba(255,255,255,.05); color: var(--muted); font-size: 7px; text-transform: uppercase; }
.priority-pill.high { background: var(--gold-bg); color: var(--gold-soft); }.priority-pill.urgent { background: rgba(239,121,116,.09); color: var(--red); }
.request-detail-hero p { margin: 13px 0 0; color: #b4b7be; font-size: 10px; line-height: 1.65; white-space: pre-wrap; }
.request-detail-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 12px; }
.request-detail-facts div { padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,.12); }
.request-detail-facts span, .request-detail-facts b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.request-detail-facts span { color: var(--dim); font-size: 7px; }.request-detail-facts b { margin-top: 5px; color: #c8c6c0; font-size: 8px; }
.request-detail-section { margin-top: 17px; }
.request-detail-section > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.request-detail-section h3 { margin: 0; color: #c5c2ba; font-size: 9px; letter-spacing: .09em; text-transform: uppercase; }
.request-detail-section header span { color: var(--dim); font-size: 7px; }
.attachment-list, .activity-list { display: grid; gap: 7px; }
.attachment-row { min-height: 54px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.attachment-row > i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: var(--gold-bg); color: var(--gold-soft); font-style: normal; font-size: 16px; }
.attachment-row b, .attachment-row small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.attachment-row b { font-size: 8px; }.attachment-row small { margin-top: 4px; color: var(--dim); font-size: 7px; }
.attachment-actions { display: flex; gap: 5px; }.attachment-actions a, .attachment-actions button { min-width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.03); color: var(--gold-soft); text-decoration: none; font-size: 10px; }.attachment-actions button { color: var(--red); }
.request-linked-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.request-linked-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; }
.request-linked-card .media-preview { aspect-ratio: 1/1; }.request-linked-card .card-body { padding: 8px; }
.unlink-request-item { position: absolute; z-index: 3; top: 6px; left: 6px; width: 27px; height: 27px; border: 1px solid rgba(239,121,116,.25); border-radius: 8px; background: rgba(7,8,11,.8); color: var(--red); }
.activity-row { position: relative; padding: 9px 10px 9px 29px; border-left: 1px solid rgba(201,162,39,.2); color: #adb1b8; font-size: 8px; line-height: 1.5; }
.activity-row::before { content: ""; position: absolute; top: 13px; left: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(201,162,39,.08); }
.activity-row b, .activity-row small { display: block; }.activity-row b { color: #c9c6be; font-size: 8px; }.activity-row small { margin-top: 3px; color: var(--dim); font-size: 7px; }
.detail-empty { min-height: 62px; display: grid; place-items: center; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; color: var(--dim); font-size: 8px; text-align: center; }

.workflow-list, .jobs-list, .settings-grid { display: grid; gap: 9px; margin-top: 20px; }
.workflow-row, .job-card, .setting-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.workflow-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 13px; }
.workflow-name { min-width: 0; }.workflow-name strong, .workflow-name small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.workflow-name strong { font-size: 10px; }.workflow-name small { margin-top: 5px; color: var(--dim); font-size: 7px; }
.workflow-meta { display: flex; gap: 7px; margin-top: 8px; color: var(--muted); font-size: 7px; }
.download-square { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--gold-soft); text-decoration: none; }
.download-square svg { width: 14px; }

.prep-hero { flex-direction: column; align-items: flex-start; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.prep-hero-seal { min-width: 98px; display: grid; justify-items: start; gap: 2px; }
.prep-hero-seal span { padding: 5px 7px; border: 1px solid rgba(97,209,155,.18); border-radius: 6px; color: var(--green); font-size: 6px; font-weight: 800; letter-spacing: .12em; }
.prep-hero-seal strong { color: var(--gold-soft); font: 400 30px Georgia, serif; }
.prep-hero-seal small { color: var(--dim); font-size: 7px; }
.prep-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 16px; }
.prep-metrics article { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(145deg,rgba(255,255,255,.03),rgba(255,255,255,.012)); }
.prep-metrics span, .prep-metrics small { display: block; overflow: hidden; color: var(--dim); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.prep-metrics span { font-weight: 800; letter-spacing: .11em; }
.prep-metrics strong { display: block; margin: 6px 0 3px; font: 400 22px Georgia, serif; }
.prep-toolbar { display: grid; gap: 9px; margin-top: 13px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: rgba(13,17,24,.72); }
.prep-search { height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: #090d13; color: var(--dim); }
.prep-search > span { font-size: 18px; transform: rotate(-16deg); }
.prep-search input { width: 100%; min-width: 0; border: 0; background: transparent; font-size: 9px; }
.prep-filter-row { display: flex; flex-wrap: nowrap; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.prep-filter-row::-webkit-scrollbar { display: none; }
.prep-filter-row label { min-width: 112px; display: grid; gap: 4px; }
.prep-filter-row label > span { color: var(--dim); font-size: 6px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.prep-filter-row select { width: 100%; height: 44px; padding: 0 8px; font-size: 9px; }
.prep-clear { min-width: 72px; height: 44px; align-self: end; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); font-size: 9px; }
#jobsView .prep-filter-row { flex-wrap: nowrap; overflow-x: auto; }#jobsView .prep-filter-row select, #jobsView .prep-clear { min-height: 44px; }

.job-card { min-width: 0; overflow: hidden; padding: 15px; }
.job-card.readiness-ready { border-color: rgba(97,209,155,.16); }
.job-card.readiness-attention, .job-card.readiness-blocked { border-color: rgba(239,121,116,.18); }
.job-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.job-identity { min-width: 0; }
.job-code { display: block; overflow: hidden; margin-bottom: 6px; color: var(--gold); font: 650 7px ui-monospace,Consolas,monospace; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.job-head strong, .job-head small { display: block; }.job-head strong { font-size: 12px; }.job-head small { overflow: hidden; margin-top: 5px; color: var(--dim); font-size: 8px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.job-badges { flex: 0 0 auto; display: grid; justify-items: end; gap: 5px; }
.job-state, .job-readiness { padding: 4px 6px; border-radius: 6px; background: rgba(255,255,255,.05); color: var(--muted); font-size: 6px; font-weight: 750; text-transform: uppercase; white-space: nowrap; }
.job-state.completed { background: rgba(97,209,155,.07); color: var(--green); }.job-state.failed { background: rgba(239,121,116,.08); color: var(--red); }.job-state.running, .job-state.queued { background: var(--gold-bg); color: var(--gold-soft); }
.job-readiness.ready { background: rgba(97,209,155,.11); color: var(--green); }.job-readiness.attention, .job-readiness.blocked { background: rgba(239,121,116,.1); color: var(--red); }.job-readiness.processing, .job-readiness.queued { background: var(--gold-bg); color: var(--gold-soft); }
.job-facts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.job-facts div { min-width: 0; padding: 8px; border-right: 1px solid var(--line); }.job-facts div:last-child { border-right: 0; }
.job-facts span, .job-facts b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.job-facts span { color: var(--dim); font-size: 7px; }.job-facts b { margin-top: 4px; color: #d7d3c9; font-size: 9px; }
.job-recipe { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }.job-recipe span { max-width: 100%; overflow: hidden; padding: 5px 7px; border-radius: 6px; background: rgba(255,255,255,.035); color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.job-progress { height: 4px; margin-top: 12px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.06); }.job-progress i { display: block; height: 100%; background: linear-gradient(90deg,#97791b,var(--gold-soft)); transition: width .3s; }
.job-errors { display: grid; gap: 4px; margin-top: 10px; padding: 9px; border: 1px solid rgba(239,121,116,.13); border-radius: 8px; background: rgba(239,121,116,.045); }.job-errors b { color: var(--red); font-size: 8px; }.job-errors span { overflow: hidden; color: #b88b88; font-size: 7px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.job-outputs { margin-top: 10px; border: 1px solid var(--line); border-radius: 9px; background: #0a0e14; }
.job-outputs summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; color: var(--muted); cursor: pointer; font-size: 9px; list-style: none; }.job-outputs summary::-webkit-details-marker { display: none; }.job-outputs summary i { font-style: normal; transition: transform .2s; }.job-outputs[open] summary i { transform: rotate(180deg); }
.job-outputs > div { display: grid; border-top: 1px solid var(--line); }.job-outputs a { min-width: 0; display: grid; gap: 3px; padding: 9px 10px; border-bottom: 1px solid var(--line); color: #c8c5bd; text-decoration: none; }.job-outputs a:last-child { border-bottom: 0; }.job-outputs a span { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }.job-outputs a small { color: var(--dim); font-size: 7px; }
.job-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 11px; }
.job-actions a, .job-actions button { min-width: 0; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); color: var(--muted); text-decoration: none; font-size: 9px; cursor: pointer; }
.job-actions .primary-job-action { grid-column: 1 / -1; border-color: rgba(201,162,39,.28); background: var(--gold-bg); color: var(--gold-soft); }
.all-operations { margin-top: 22px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.012); }
.all-operations > summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; cursor: pointer; list-style: none; }.all-operations > summary::-webkit-details-marker { display: none; }.all-operations summary span { min-width: 0; }.all-operations summary b, .all-operations summary small { display: block; }.all-operations summary b { font-size: 9px; }.all-operations summary small { margin-top: 4px; color: var(--dim); font-size: 7px; }.all-operations summary i { color: var(--gold); font-style: normal; transition: transform .2s; }.all-operations[open] summary i { transform: rotate(180deg); }
#allOperationsSlot { max-width: 100%; overflow: auto; border-top: 1px solid var(--line); }#allOperationsSlot:empty { display: none; }#allOperationsSlot #jhubRoot { max-width: 100%; margin: 0; }

.policy-switch.is-exception { border-color: rgba(239,121,116,.27); background: rgba(239,121,116,.045); }
.watermark-controls { margin-top: 9px; }.watermark-controls .notice-card { margin-bottom: 9px; }.notice-card.warning { border-color: rgba(239,179,116,.18); background: rgba(239,179,116,.045); }
.preflight-card { margin-top: 14px; overflow: hidden; border: 1px solid rgba(97,209,155,.16); border-radius: 12px; background: #090e14; }.preflight-card.is-blocked { border-color: rgba(239,121,116,.25); }
.preflight-card > header { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 11px; border-bottom: 1px solid var(--line); }.preflight-card > header span { color: var(--dim); font-size: 6px; font-weight: 800; letter-spacing: .12em; }.preflight-card > header b { color: var(--green); font-size: 8px; }.preflight-card.is-blocked > header b { color: var(--red); }
#preflightBody > p { margin: 0; padding: 12px; color: var(--muted); font-size: 8px; line-height: 1.55; }
.preflight-loading, .receipt-loading { min-height: 90px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); font-size: 8px; }.preflight-loading .loader, .receipt-loading .loader { width: 22px; height: 22px; }
.preflight-summary { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px; border-bottom: 1px solid var(--line); }.preflight-summary span { padding: 4px 6px; border-radius: 6px; background: rgba(255,255,255,.04); color: var(--muted); font-size: 7px; }
.preflight-checks { display: grid; }.preflight-check { display: grid; grid-template-columns: 19px minmax(0,1fr); gap: 8px; padding: 9px 10px; border-bottom: 1px solid var(--line); }.preflight-check > i { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.05); color: var(--muted); font: 700 8px/1 sans-serif; }.preflight-check.pass > i { background: rgba(97,209,155,.1); color: var(--green); }.preflight-check.warn > i { background: var(--gold-bg); color: var(--gold-soft); }.preflight-check.block > i { background: rgba(239,121,116,.1); color: var(--red); }.preflight-check b, .preflight-check small { display: block; }.preflight-check b { font-size: 8px; }.preflight-check small { margin-top: 3px; color: var(--dim); font-size: 7px; line-height: 1.45; }
.preflight-operations { margin: 9px; border: 1px solid var(--line); border-radius: 8px; }.preflight-operations summary { padding: 9px; color: var(--muted); cursor: pointer; font-size: 7px; }.preflight-operations ol { margin: 0; padding: 0 12px 10px 28px; color: var(--dim); font-size: 7px; line-height: 1.65; }.authority-line { margin: 0; padding: 0 10px 11px; color: var(--green); font-size: 6px; line-height: 1.5; }
.preflight-note { display: grid; gap: 5px; padding: 12px; }.preflight-note b { font-size: 8px; }.preflight-note span { color: var(--muted); font-size: 7px; line-height: 1.5; }.preflight-note.is-block b { color: var(--red); }

.receipt-sheet { width: min(560px,100vw); }.sheet-download { text-decoration: none; }
.receipt-hero { display: grid; gap: 5px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: radial-gradient(circle at top right,rgba(201,162,39,.08),transparent 55%),var(--surface); }.receipt-hero span { color: var(--dim); font-size: 6px; font-weight: 800; letter-spacing: .14em; }.receipt-hero strong { color: var(--gold-soft); font: 400 25px Georgia,serif; }.receipt-hero.verified strong { color: var(--green); }.receipt-hero.action-required strong { color: var(--red); }.receipt-hero small { color: var(--muted); font-size: 7px; }
.receipt-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin-top: 9px; }.receipt-facts div { padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }.receipt-facts span, .receipt-facts b { display: block; }.receipt-facts span { color: var(--dim); font-size: 6px; }.receipt-facts b { margin-top: 4px; font-size: 9px; }
.receipt-evidence { display: grid; gap: 7px; margin-top: 10px; }.receipt-evidence article { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 9px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }.receipt-evidence article > span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(97,209,155,.09); color: var(--green); font-size: 8px; }.receipt-evidence article.has-issue > span { background: rgba(239,121,116,.09); color: var(--red); }.receipt-evidence b, .receipt-evidence small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.receipt-evidence b { font-size: 8px; }.receipt-evidence small { margin-top: 4px; color: var(--dim); font-size: 7px; }

.setting-card { padding: 15px; }.setting-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.setting-card h3 { margin: 0; font-size: 11px; }.setting-card p { margin: 9px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }.setting-card .path { display: block; margin-top: 10px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #070a0f; color: #9ba1ab; font: 7px/1.55 ui-monospace, Consolas, monospace; word-break: break-all; }
.availability { padding: 4px 6px; border-radius: 5px; background: rgba(97,209,155,.08); color: var(--green); font-size: 7px; }.availability.missing { background: rgba(239,121,116,.08); color: var(--red); }

.bottom-nav { position: fixed; z-index: 15; right: 0; bottom: 0; left: 0; height: calc(67px + var(--safe-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 7px var(--safe-bottom); border-top: 1px solid var(--line-strong); background: rgba(9,12,17,.94); backdrop-filter: blur(24px); }
.bottom-nav button { display: grid; place-items: center; gap: 2px; border: 0; border-radius: 10px; background: transparent; color: var(--dim); font-size: 8px; }
.bottom-nav i { font-style: normal; font-size: 19px; }.bottom-nav button.is-active { background: var(--gold-bg); color: var(--gold-soft); }

.bulk-bar { position: fixed; z-index: 19; right: 10px; bottom: calc(72px + var(--safe-bottom)); left: 10px; min-height: 58px; display: grid; grid-template-columns: minmax(0,1fr) auto auto auto; align-items: center; gap: 7px; padding: 8px; border: 1px solid rgba(201,162,39,.25); border-radius: 16px; background: rgba(15,20,27,.97); box-shadow: 0 18px 55px rgba(0,0,0,.45); backdrop-filter: blur(20px); }
.bulk-bar > button { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.03); color: #d2d0c9; font-size: 9px; }
/* Reserve space above bulk actions for the assistant's shared floating dock.
   Inherit its existing offset API instead of changing the plugin or stacking
   one set of controls over the other. Clearing selection restores its offset. */
body:has(#bulkBar:not([hidden])) { --rui-fab-base: calc(148px + var(--safe-bottom)); }
.bulk-bar .gold { border-color: #d0ad39; background: linear-gradient(#d7b844, #ad871d); color: #171207; font-weight: 750; }
.bulk-count { display: flex !important; align-items: center; justify-content: flex-start; gap: 7px; min-width: 0; }.bulk-count b { color: var(--gold-soft); font-size: 15px; }.bulk-count span { color: var(--muted); }.bulk-count i { margin-left: auto; color: var(--dim); font-style: normal; font-size: 16px; }

.scrim, .sheet-scrim { position: fixed; z-index: 30; inset: 0; background: rgba(0,0,0,.62); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .24s; }
.scrim.is-open, .sheet-scrim.is-open { opacity: 1; pointer-events: auto; }
.inspector { position: fixed; z-index: 31; inset: 0; display: flex; flex-direction: column; visibility: hidden; pointer-events: none; background: var(--bg); transform: translateX(102%); transition: transform .28s cubic-bezier(.22,.8,.3,1), visibility 0s linear .28s; }
.inspector.is-open { visibility: visible; pointer-events: auto; transform: translateX(0); transition-delay: 0s; }
.sheet-head { flex: 0 0 auto; min-height: 62px; display: grid; grid-template-columns: 38px minmax(0,1fr) 38px; align-items: center; gap: 10px; padding: 8px 13px; border-bottom: 1px solid var(--line); background: rgba(8,11,16,.94); backdrop-filter: blur(20px); }
.sheet-head > div { min-width: 0; }.sheet-head span { margin-bottom: 3px; font-size: 7px; }.sheet-head h2 { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 10px; }
.inspector-scroll { flex: 1; overflow: auto; padding: 13px 13px calc(32px + var(--safe-bottom)); }
.hero-preview { position: relative; aspect-ratio: 4/5; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #05070a; }
.hero-preview img, .hero-preview video { width: 100%; height: 100%; object-fit: contain; background: #05070a; }.hero-preview audio { width: calc(100% - 40px); }
.loader { width: 28px; height: 28px; border: 2px solid rgba(255,255,255,.1); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.quick-actions button { min-height: 52px; display: grid; place-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: #cac8c1; font-size: 8px; }.quick-actions button:last-child { border-color: rgba(201,162,39,.25); background: var(--gold-bg); color: var(--gold-soft); }.quick-actions button:disabled { opacity: .35; }.quick-actions i { font-style: normal; font-size: 16px; }

.organize-card { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }.section-head span { margin-bottom: 4px; font-size: 7px; }.section-head h3 { margin: 0; font-size: 11px; }.section-head small { color: var(--dim); font-size: 7px; }
.star-rating { display: flex; gap: 6px; margin: 13px 0; }.star-rating button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #0a0e14; color: #4b5059; font-size: 19px; }.star-rating button.is-active { border-color: rgba(201,162,39,.34); background: var(--gold-bg); color: var(--gold-soft); }
.field { display: grid; gap: 7px; margin-top: 12px; }.field input:not([type="range"]), .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 11px; resize: vertical; font-size: 10px; }.field textarea { line-height: 1.5; }.field small { color: var(--dim); font-size: 8px; line-height: 1.45; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; align-items: end; }.two-fields .field { min-width: 0; }
.save-button { min-height: 42px; border: 1px solid rgba(201,162,39,.28); border-radius: 10px; background: var(--gold-bg); color: var(--gold-soft); font-size: 9px; }

.detail-tabs { position: sticky; z-index: 3; top: -13px; display: grid; grid-template-columns: repeat(4,1fr); gap: 3px; margin-top: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); background: var(--bg); }
.detail-tabs button { height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--dim); font-size: 8px; }.detail-tabs button.is-active { background: var(--gold-bg); color: var(--gold-soft); }
.tab-panel { padding-top: 14px; }.metric-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }.metric { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }.metric span, .metric strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.metric span { color: var(--dim); font-size: 7px; }.metric strong { margin-top: 5px; color: #d8d5cd; font-size: 9px; }
.detail-section { margin-top: 14px; }.detail-section h3 { display: flex; justify-content: space-between; margin: 0 0 8px; color: var(--muted); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }.detail-section h3 button { border: 0; background: transparent; color: var(--gold); font-size: 8px; }.detail-section p { margin: 0; color: #acb0b8; font-size: 9px; line-height: 1.65; white-space: pre-wrap; }
.path-box, .json-block { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #06080c; color: #9ca2ac; font: 8px/1.62 ui-monospace, Consolas, monospace; word-break: break-word; white-space: pre-wrap; }.json-block { max-height: 450px; overflow: auto; margin: 0; }
.seed-list { display: flex; flex-wrap: wrap; gap: 5px; }.seed-list span, .detail-tag { padding: 5px 7px; border-radius: 6px; background: var(--gold-bg); color: #d5c477; font: 7px ui-monospace, monospace; }
.prompt-section { margin-bottom: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }.prompt-section strong { display: block; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--gold-bg); color: #d2c071; font-size: 7px; }.prompt-section p { max-height: 270px; overflow: auto; padding: 10px; margin: 0; color: #b5b9c0; font: 8px/1.7 ui-monospace, Consolas, monospace; white-space: pre-wrap; }
.definition-list { margin: 0; }.definition-list div { display: grid; grid-template-columns: 105px minmax(0,1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.05); }.definition-list dt { color: var(--dim); font-size: 8px; }.definition-list dd { margin: 0; color: #b7bbc2; font-size: 8px; word-break: break-all; }

/* Modal controls sit above background FABs (42), below assistant sheets (45). */
.sheet-scrim { z-index: 43; }
.action-sheet { position: fixed; z-index: 44; right: 0; bottom: 0; left: 0; max-height: 94vh; display: flex; flex-direction: column; visibility: hidden; pointer-events: none; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 22px 22px 0 0; background: #0b0f15; box-shadow: 0 -20px 60px rgba(0,0,0,.5); transform: translateY(103%); transition: transform .3s cubic-bezier(.22,.8,.3,1), visibility 0s linear .3s; }
.action-sheet.is-open { visibility: visible; pointer-events: auto; transform: translateY(0); transition-delay: 0s; }
.action-sheet > header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 16px 12px; border-bottom: 1px solid var(--line); }.action-sheet header span { margin-bottom: 4px; font-size: 7px; }.action-sheet h2 { margin: 0; font: 400 24px Georgia, serif; }
.sheet-scroll { flex: 1; overflow: auto; padding: 2px 16px 22px; }
.action-sheet footer { flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1.5fr; gap: 9px; padding: 10px 16px var(--safe-bottom); border-top: 1px solid var(--line); background: #0b0f15; }.action-sheet footer button { min-height: 45px; border-radius: 11px; font-size: 10px; }.action-sheet .ghost { border: 1px solid var(--line); background: transparent; color: var(--muted); }.action-sheet .primary { border: 1px solid #dbbd4e; background: linear-gradient(#d9ba47,#ab851c); color: #171207; font-weight: 800; }
.selection-summary { display: grid; gap: 4px; margin: 14px 0 4px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }.selection-summary b { color: var(--gold-soft); font-size: 11px; }.selection-summary span { color: var(--muted); font-size: 8px; line-height: 1.45; }
.notice-card { margin-top: 12px; padding: 11px; border: 1px solid rgba(201,162,39,.2); border-radius: 11px; background: var(--gold-bg); }.notice-card b { color: var(--gold-soft); font-size: 9px; }.notice-card p { margin: 5px 0 0; color: #bdb58f; font-size: 8px; line-height: 1.5; }
.access-status-card { display: grid; grid-template-columns: 13px minmax(0,1fr); gap: 12px; margin-top: 14px; padding: 15px; border: 1px solid var(--line-strong); border-radius: 14px; background: linear-gradient(145deg, rgba(255,255,255,.04), rgba(255,255,255,.012)); }
.access-status-card > i { width: 10px; height: 10px; margin-top: 3px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 6px rgba(100,107,119,.09); }
.access-status-card span, .access-tool > span { display: block; color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.access-status-card b { display: block; margin-top: 5px; color: var(--text); font-size: 12px; line-height: 1.35; }
.access-status-card p, .access-tool p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.access-status-card[data-tone="ready"] { border-color: rgba(97,209,155,.24); background: rgba(97,209,155,.045); }.access-status-card[data-tone="ready"] > i { background: var(--green); box-shadow: 0 0 0 6px rgba(97,209,155,.1); }
.access-status-card[data-tone="limited"] { border-color: rgba(227,200,100,.26); }.access-status-card[data-tone="limited"] > i { background: var(--gold-soft); box-shadow: 0 0 0 6px rgba(227,200,100,.09); }
.access-status-card[data-tone="error"] { border-color: rgba(239,121,116,.3); }.access-status-card[data-tone="error"] > i { background: var(--red); box-shadow: 0 0 0 6px rgba(239,121,116,.09); }
.access-tool { margin-top: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.access-tool h3 { margin: 6px 0 0; font-size: 12px; }
.access-action { width: 100%; min-height: 46px; margin-top: 13px; border: 1px solid rgba(201,162,39,.3); border-radius: 11px; background: var(--gold-bg); color: var(--gold-soft); font-size: 10px; font-weight: 750; }
.access-action.primary { border-color: #dbbd4e; background: linear-gradient(#d9ba47,#ab851c); color: #171207; }
.access-action:disabled { opacity: .55; }
.switch-row { position: relative; min-height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }.switch-row span { display: grid; gap: 4px; }.switch-row b { font-size: 9px; }.switch-row small { color: var(--dim); font-size: 7px; }.switch-row input { position: absolute; opacity: 0; }.switch-row > i { position: relative; width: 42px; height: 24px; flex: 0 0 auto; border-radius: 20px; background: #252b34; }.switch-row > i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #7b818a; transition: .2s; }.switch-row input:checked + i { background: #7f6718; }.switch-row input:checked + i::after { left: 21px; background: var(--gold-soft); }
.field input[type="range"] { width: 100%; accent-color: var(--gold); }
.recipe-proof { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 14px; }.recipe-proof span { padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); font-size: 7px; }

.camera-lab { margin-top: 14px; overflow: hidden; border: 1px solid rgba(201,162,39,.2); border-radius: 15px; background: radial-gradient(circle at 100% 0,rgba(201,162,39,.08),transparent 42%),#080c12; }
.camera-lab.is-disabled { border-color: var(--line); opacity: .72; }.camera-lab.is-active { border-color: rgba(97,209,155,.26); }
.camera-lab-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); }.camera-lab-head > div { min-width: 0; }.camera-lab-head span { display: block; margin-bottom: 4px; color: var(--gold); font-size: 7px; font-weight: 800; letter-spacing: .15em; }.camera-lab-head h3 { margin: 0; font-size: 12px; }.camera-lab-head p { margin: 5px 0 0; color: var(--dim); font-size: 8px; line-height: 1.45; }
.mini-switch { position: relative; flex: 0 0 auto; width: 48px; height: 28px; cursor: pointer; }.mini-switch input { position: absolute; opacity: 0; pointer-events: none; }.mini-switch i { position: absolute; inset: 0; border: 1px solid var(--line-strong); border-radius: 18px; background: #111720; transition: .2s; }.mini-switch i::after { content: ""; position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: #737984; transition: .2s; }.mini-switch input:checked + i { border-color: rgba(97,209,155,.45); background: rgba(97,209,155,.13); }.mini-switch input:checked + i::after { background: var(--green); transform: translateX(20px); }.mini-switch input:focus-visible + i { outline: 2px solid var(--gold); outline-offset: 3px; }.mini-switch input:disabled + i { cursor: not-allowed; opacity: .45; }
.camera-lab-controls { padding: 0 14px 14px; }.camera-profile { margin-top: 13px; }
.camera-preview-options { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.camera-preview-options .field, .camera-preview-options .two-fields { min-width: 0; }
.camera-preview-options select, .camera-preview-options input { width: 100%; min-width: 0; min-height: 44px; font-size: 12px; }
.camera-preview-options > small { display: block; margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.camera-lab .camera-sliders input { min-height: 44px; }
.camera-lab .field select, .camera-lab .field input { min-height: 44px; }
.camera-lab .camera-sliders b, .camera-lab .camera-sliders output { font-size: 12px; }
.camera-lab .mini-switch { height: 44px; }
.camera-lab .mini-switch i { inset: 8px 0; }
.camera-lab .realism-preview-tabs button { min-height: 44px; font-size: 12px; }
.camera-lab .realism-preview-tabs button:disabled { opacity: .5; cursor: not-allowed; }
.camera-lab .realism-preview-status { min-height: 44px; font-size: 11px; overflow-wrap: anywhere; }
.camera-lab .camera-lab-actions button { font-size: 11px; }
.camera-lab .camera-provenance { font-size: 11px; }
.camera-lab .camera-lab-head h3 { font-size: 16px; }
.camera-lab .camera-lab-head p, .camera-lab .camera-profile small { font-size: 12px; line-height: 1.5; }
.camera-lab .field > span { font-size: 11px; }
.camera-lab .realism-preview-empty b { font-size: 13px; }
.camera-lab .realism-preview-empty span { font-size: 11px; }
.camera-lab .realism-preview-stage video[hidden] { display: none; }
.camera-lab .realism-preview-empty[hidden] { display: none; }
.camera-sliders { display: grid; gap: 11px; margin-top: 13px; }.camera-sliders label { display: grid; gap: 7px; }.camera-sliders label > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.camera-sliders b { color: var(--muted); font-size: 8px; }.camera-sliders output { min-width: 27px; padding: 3px 5px; border-radius: 5px; background: rgba(255,255,255,.05); color: var(--gold-soft); font: 700 7px ui-monospace,Consolas,monospace; text-align: center; }.camera-sliders input { width: 100%; min-height: 24px; accent-color: var(--gold); }
.realism-preview { margin: 0 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #05070a; }.realism-preview-tabs { min-height: 42px; display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 4px; padding: 5px; border-bottom: 1px solid var(--line); }.realism-preview-tabs button { min-height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--dim); font-size: 8px; }.realism-preview-tabs button.is-active { background: rgba(255,255,255,.06); color: #dedbd2; }.realism-preview-tabs > span { padding: 0 5px; color: var(--green); font-size: 6px; font-weight: 800; letter-spacing: .09em; }
.realism-preview-stage { position: relative; min-height: 190px; display: grid; place-items: center; background: radial-gradient(circle at center,rgba(201,162,39,.06),transparent 58%),#040609; }.realism-preview-stage video { width: 100%; max-height: 360px; display: block; background: #000; object-fit: contain; }.realism-preview-empty { display: grid; justify-items: center; gap: 5px; padding: 20px; text-align: center; }.realism-preview-empty b { color: var(--muted); font-size: 9px; }.realism-preview-empty span { color: var(--dim); font-size: 7px; line-height: 1.45; }.realism-preview-status { min-height: 34px; display: flex; align-items: center; padding: 7px 10px; border-top: 1px solid var(--line); color: var(--dim); font-size: 7px; line-height: 1.4; }
.camera-lab-actions { display: grid; grid-template-columns: 1.15fr 1fr; gap: 8px; padding: 12px 14px 0; }.camera-lab-actions button { min-height: 44px; padding: 0 8px; border: 1px solid rgba(201,162,39,.24); border-radius: 9px; background: var(--gold-bg); color: var(--gold-soft); font-size: 8px; }.camera-lab-actions button:last-child { border-color: var(--line); background: transparent; color: var(--muted); }.camera-lab-actions button:disabled { opacity: .42; cursor: not-allowed; }.camera-provenance { margin: 10px 14px 14px; color: var(--dim); font-size: 7px; line-height: 1.5; }

.toast-stack { position: fixed; z-index: 60; right: 12px; bottom: calc(78px + var(--safe-bottom)); left: 12px; display: grid; gap: 7px; pointer-events: none; }.toast { padding: 12px 13px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(19,25,34,.97); box-shadow: 0 16px 45px rgba(0,0,0,.4); animation: toast-in .22s ease; }.toast strong { display: block; font-size: 9px; }.toast span { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.45; }.toast.is-success { border-color: rgba(97,209,155,.3); }.toast.is-error { border-color: rgba(239,121,116,.34); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } }

@media (pointer: coarse) {
  button, select, input:not([type="range"]), a { min-height: 44px; }
  .type-tabs button, .filters select, .pagination button { min-height: 44px; }
  .select-check { width: 34px; height: 34px; }
  .card-title { font-size: 11px; }
  .card-path, .card-meta { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (min-width: 700px) {
  .camera-sliders { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
  .content { padding: 32px 24px 110px; }
  .metric-scroller, .type-tabs, .filters { margin-right: 0; margin-left: 0; padding-right: 0; padding-left: 0; }
  .media-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
  .media-preview { aspect-ratio: 4/4.35; }
  .card-body { padding: 12px; }.card-title { font-size: 10px; }
  .inspector { left: auto; width: min(620px, 86vw); border-left: 1px solid var(--line-strong); box-shadow: -20px 0 60px rgba(0,0,0,.44); }
  .hero-preview { aspect-ratio: 16/11; }
  .action-sheet { right: 20px; bottom: 20px; left: auto; width: 520px; max-height: calc(100vh - 40px); border-radius: 22px; }
  .compact-sheet { width: 440px; }
  .action-sheet footer { padding-bottom: 14px; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .request-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
  .request-editor-sheet, .request-detail-sheet { width: min(680px, calc(100vw - 40px)); }
  .request-detail-facts { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .request-linked-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .toast-stack { right: 22px; bottom: 22px; left: auto; width: 360px; }
  .prep-hero { flex-direction: row; align-items: center; }
  .prep-hero-seal { justify-items: end; }
  .prep-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .receipt-facts { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .job-actions { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .job-actions .primary-job-action { grid-column: auto; }
}

@media (min-width: 1024px) {
  body { overflow: hidden; }
  .studio-shell { display: grid; grid-template-columns: 244px minmax(0,1fr); height: 100vh; }
  .desktop-sidebar { display: flex; flex-direction: column; min-height: 0; padding: 22px 13px 15px; border-right: 1px solid var(--line); background: #090c11; }
  .desktop-sidebar .brand { padding: 0 9px 24px; }.desktop-sidebar .brand-mark { width: 42px; height: 42px; }.desktop-sidebar .brand b { font-size: 13px; }
  .side-nav { display: grid; gap: 5px; }.side-nav button { min-height: 44px; display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--muted); text-align: left; font-size: 10px; }.side-nav button i { color: var(--dim); font-style: normal; font-size: 17px; }.side-nav button b { padding: 3px 6px; border-radius: 5px; background: rgba(255,255,255,.04); color: var(--dim); font-size: 7px; }.side-nav button.is-active { border-color: rgba(201,162,39,.16); background: var(--gold-bg); color: #e8dfbf; }.side-nav button.is-active i { color: var(--gold-soft); }
  .side-sources { flex: 1; min-height: 0; margin-top: 28px; }.side-sources header { display: flex; justify-content: space-between; padding: 0 9px 9px; color: var(--dim); font-size: 7px; letter-spacing: .13em; }.side-sources header button { border: 0; background: transparent; color: var(--dim); font-size: 7px; }.source-item { width: 100%; min-height: 36px; display: grid; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); text-align: left; font-size: 8px; }.source-item i { width: 6px; height: 6px; border: 1px solid var(--gold); border-radius: 2px; }.source-item span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.source-item b { color: var(--dim); font-size: 7px; }.source-item.is-active { background: rgba(255,255,255,.035); color: var(--text); }
  .side-safety { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 12px 9px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(97,209,155,.08); }.side-safety b, .side-safety small { display: block; }.side-safety b { font-size: 8px; }.side-safety small { margin-top: 3px; color: var(--dim); font-size: 6px; }.side-safety strong { color: var(--muted); font-size: 7px; }
  .workspace { min-width: 0; height: 100vh; display: flex; flex-direction: column; }
  .mobile-header, .bottom-nav { display: none; }
  .desktop-topbar { flex: 0 0 62px; display: grid; grid-template-columns: 1fr minmax(360px,620px) 1fr; align-items: center; gap: 20px; padding: 0 27px; border-bottom: 1px solid var(--line); background: #090c11; }.topbar-label { color: var(--dim); font-size: 7px; letter-spacing: .18em; }.desktop-search { height: 36px; display: flex; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--dim); }.desktop-search kbd { padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--dim); font: 7px ui-monospace, monospace; }.operator-access-chip { justify-self: end; display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 10px; border: 1px solid rgba(97,209,155,.13); border-radius: 8px; background: rgba(97,209,155,.04); color: var(--green); cursor: pointer; font-size: 8px; font-weight: 750; letter-spacing: .05em; }
  .content { flex: 1; min-height: 0; max-width: none; margin: 0; padding: 43px 4vw 60px; overflow: auto; }
  .mobile-search { display: none; }
  .view-hero h1 { font-size: clamp(37px, 3vw, 50px); }
  .metric-scroller { display: grid; grid-template-columns: repeat(5,1fr); gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.015); }.metric-scroller article { min-width: 0; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; }.metric-scroller article:last-child { border-right: 0; }
  .filters { justify-content: flex-end; }.filters label > span { font-size: 7px; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 15px; }
  .media-preview { aspect-ratio: 4/3.35; }
  .media-card:hover { transform: translateY(-2px); border-color: rgba(201,162,39,.25); box-shadow: 0 15px 35px rgba(0,0,0,.22); }
  .bulk-bar { right: 25px; bottom: 25px; left: auto; width: 620px; }
  body:has(#bulkBar:not([hidden])) { --rui-fab-base: 96px; }
  .request-grid { grid-template-columns: repeat(auto-fill,minmax(330px,1fr)); gap: 15px; }
  .request-card:hover { transform: translateY(-2px); border-color: rgba(201,162,39,.24); box-shadow: 0 15px 35px rgba(0,0,0,.2); }
  .workflow-row { grid-template-columns: minmax(0,1fr) auto; padding: 15px 17px; }
  .jobs-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (min-width: 1360px) {
  .studio-shell { grid-template-columns: 260px minmax(0,1fr); }
  .content { padding-right: 5vw; padding-left: 5vw; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(235px,1fr)); }
  .prep-toolbar { grid-template-columns: minmax(270px,.7fr) minmax(0,1.3fr); align-items: end; }
  .prep-filter-row label { min-width: 96px; flex: 1 1 110px; }
}

/* Export controls and guide stay within the actual padded 9:16 delivery canvas. */
.hero-preview.is-delivery-video { aspect-ratio: 9/16; width: min(100%, 330px); margin-inline: auto; }
.safe-area-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; background: transparent; }
.delivery-controls { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.delivery-controls[hidden], .delivery-panel[hidden] { display: none; }
.delivery-controls > * { flex: 1; min-width: 0; }
.delivery-controls button, .delivery-panel button { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #151c23; color: #eef2f5; font: inherit; cursor: pointer; }
.delivery-controls button[aria-pressed="true"] { border-color: #c7a64e; color: #ffdc78; }
.delivery-panel button.primary { background: #d4b455; border-color: #d4b455; color: #14171b; font-weight: 650; }
.delivery-panel button:disabled { opacity: .5; cursor: wait; }
.delivery-controls button, .delivery-controls select, .delivery-panel button, .delivery-panel select, .delivery-panel input { min-height: 44px; max-width: 100%; }
.delivery-panel { min-width: 0; overflow-wrap: anywhere; }
.delivery-panel summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.delivery-panel p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.delivery-panel button { width: 100%; margin-block: 6px; }
.delivery-panel details { border-top: 1px solid var(--line); margin-top: 12px; }
.delivery-panel select, .delivery-panel input { width: 100%; min-width: 0; }
.delivery-downloads { display: grid; gap: 6px; }
.delivery-downloads a { display: block; min-height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.render-progress { margin-block: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
/* Delivery history and device sharing remain usable in the mobile inspector. */
.delivery-actions { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0; }
.delivery-actions button { min-height:44px; flex:1 1 135px; }
#deliveryProgress { width:100%; accent-color:#d4b455; margin:10px 0; }
#deliveryCopyPreview { width:100%; min-height:180px; box-sizing:border-box; }
#deliveryHistory { width:100%; min-width:0; text-overflow:ellipsis; }
.delivery-panel audio { width:100%; margin-block:8px; }
.delivery-hub { padding:20px; margin-bottom:24px; border:1px solid var(--line); border-radius:18px; background:var(--surface, #11171e); min-width:0; }
.delivery-hub[hidden] { display:none; }
.delivery-hub h2 { font-size:22px; margin:4px 0; }
.delivery-hub .section-head { align-items:flex-start; gap:12px; }
.delivery-hub .section-head > button { flex-shrink:0; white-space:nowrap; }
.delivery-hub p, .delivery-hub small { color:var(--muted); font-size:13px; line-height:1.6; }
.delivery-hub button, .delivery-hub a { min-height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:#151c23; color:#eef2f5; font:inherit; cursor:pointer; overflow-wrap:anywhere; }
.delivery-hub-filters { display:flex; flex-wrap:wrap; gap:12px; margin:16px 0; }
.delivery-hub-filters label { flex:1 1 180px; min-width:0; font-size:13px; color:var(--muted); }
.delivery-hub-filters input, .delivery-hub-filters select { display:block; width:100%; min-width:0; min-height:44px; margin-top:6px; }
.delivery-hub-job { display:grid; gap:8px; padding:16px 0; border-top:1px solid var(--line); min-width:0; overflow-wrap:anywhere; }
.delivery-hub-job strong, .delivery-hub-job small { display:block; }
.delivery-hub-job .delivery-actions { margin:0; }
.delivery-hub-job .delivery-actions a { flex:1 1 180px; font-size:12px; }
#jobsView #jobLaneTabs { margin-inline:0; }
.authority-dialog { width:min(560px, calc(100vw - 28px)); max-height:calc(100dvh - 32px); overflow-y:auto; box-sizing:border-box; padding:22px; border:1px solid var(--line); border-radius:18px; background:#11171e; color:#eef2f5; }
.authority-dialog::backdrop { background:rgba(0,0,0,.72); }
.authority-dialog h2 { margin-top:0; font-size:22px; }
.authority-dialog p { line-height:1.6; color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
.authority-dialog textarea { width:100%; box-sizing:border-box; font-family:monospace; font-size:12px; }
.authority-dialog button, .authority-dialog input, .authority-dialog summary { min-height:44px; max-width:100%; }
.authority-dialog button { padding:10px 12px; color:inherit; background:#202832; border:1px solid var(--line); border-radius:9px; cursor:pointer; }
.authority-dialog button:disabled { opacity:.5; cursor:wait; }
.authority-dialog .path { font-size:11px; }
#deliveryReviewPanel[hidden] { display:none; }
#deliveryFinalPreview, #deliveryCoverPreview { display:block; width:min(100%, 260px); margin:12px auto; aspect-ratio:9/16; object-fit:contain; background:#06090d; }
#deliveryFinalPreview[hidden], #deliveryCoverPreview[hidden] { display:none; }
#deliveryReviewPanel .checkbox-label { display:flex; gap:10px; align-items:flex-start; padding:7px 0; line-height:1.5; font-size:13px; }
#deliveryReviewPanel input[type="checkbox"] { width:20px; min-width:20px; min-height:20px; margin-top:2px; }
#downloadDeliveryReview { display:block; padding:12px; min-height:44px; }
#downloadDeliveryReview[hidden] { display:none; }
#deliverySfxControls[hidden], #deliverySfxSummary[hidden], #deliverySfxPreview[hidden] { display:none; }
#deliverySfxPreview { width:100%; max-width:100%; margin:8px 0; }
#deliverySfxSummary { overflow-wrap:anywhere; }
#deliveryMetricsPanel[hidden] { display: none !important; }
#hookAnalysisPanel[hidden] { display: none !important; }
#hookAnalysisResult { overflow-wrap: anywhere; }
#hookAnalysisResult svg { width: 100%; height: auto; display: block; }
#hookAnalysisResult dl { margin: 0; }
#hookAnalysisResult dt { margin-top: 8px; opacity: .75; }
#hookAnalysisResult dd { margin: 3px 0 12px; }
#analyzeHook { min-height: 44px; }
#deliveryMetricsPanel input, #deliveryMetricsPanel select, #deliveryMetricsPanel textarea { min-width: 0; max-width: 100%; width: 100%; }
#deliveryMetricsPanel input, #deliveryMetricsPanel select, #saveDeliveryMetrics { min-height: 44px; }
#deliveryMetricsHistory, #deliveryMetricsStatus { overflow-wrap: anywhere; }
#deliveryMetricsHistory { max-height: 320px; overflow-y: auto; }
@media (max-width: 500px) { #deliveryMetricsPanel .metrics-dates { grid-template-columns: 1fr; } }
/* Team portal: isolated public review UI, also usable at 375px. */
body[data-team-portal] { margin:0; background:#0b1019; color:#e9eef7; overflow:auto; height:auto; min-height:100vh; }
.team-portal { max-width:1400px; margin:auto; padding:24px; font:15px/1.55 system-ui,sans-serif; }
.team-portal * { box-sizing:border-box; min-width:0; }
.team-portal [hidden] { display:none !important; }
.team-portal h1 { font-size:clamp(22px,4vw,32px); margin:0; }
.team-portal h2 { font-size:20px; }
.team-portal small { color:#a8b5c9; }
.team-header { display:flex; align-items:center; gap:20px; flex-wrap:wrap; border-bottom:1px solid #293449; padding-bottom:18px; }
.team-header>div:first-child { margin-right:auto; }
.team-portal button,.team-download,.team-header a { min-height:44px; border:1px solid #3a4a63; border-radius:10px; padding:10px 16px; color:#eef3fa; background:#1a263a; cursor:pointer; font:inherit; text-decoration:none; }
.team-header a { display:inline-flex; align-items:center; }
.team-portal button:disabled { opacity:.45; cursor:default; }
.team-portal button[aria-pressed=true],.team-portal button.primary { background:#ddb649; color:#101722; border-color:#f1d174; }
.team-portal :focus-visible { outline:3px solid #6dcbff; outline-offset:3px; }
.team-portal label { display:flex; flex-direction:column; gap:6px; margin:12px 0; }
.team-portal input:not([type=checkbox]),.team-portal select,.team-portal textarea { width:100%; min-height:44px; border:1px solid #41516a; border-radius:8px; padding:10px; background:#101a2a; color:#edf3ff; font:inherit; }
.team-portal input[type=checkbox] { width:22px; height:22px; accent-color:#ddb649; }
.team-auth { max-width:460px; margin:50px auto; padding:26px; border:1px solid #293c59; border-radius:18px; background:#111c2c; }
.team-auth button { width:100%; }
.team-status { min-height:24px; color:#f4cf74; overflow-wrap:anywhere; }
.team-tabs { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:18px; }
.team-filters { display:flex; align-items:end; gap:14px; flex-wrap:wrap; }
.team-filters label:first-child { flex:1; min-width:200px; }
.team-filters button { margin-bottom:12px; }
.team-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:18px; }
.team-portal .team-card { display:flex; flex-direction:column; text-align:left; gap:8px; padding:0 0 14px; overflow:hidden; background:#111e30; }
.team-card img { width:100%; height:190px; object-fit:cover; background:#060b12; }
.team-card strong,.team-card small,.team-card>span { padding:0 14px; overflow-wrap:anywhere; }
.team-audio-icon { display:grid; place-content:center; height:190px; width:100%; font-size:56px; }
.team-pager { display:flex; justify-content:center; align-items:center; gap:20px; margin:24px; }
.team-admin { display:grid; grid-template-columns:260px 1fr; gap:28px; }
.team-admin aside button { display:block; width:100%; text-align:left; margin-bottom:10px; overflow-wrap:anywhere; }
.team-admin form { max-width:750px; }
.team-admin fieldset { border:1px solid #3a4a63; padding:16px; border-radius:12px; }
.team-portal .team-check,.team-permissions label { flex-direction:row; align-items:center; min-height:44px; }
.team-permissions { display:flex; gap:10px 20px; flex-wrap:wrap; }
.team-grant { display:flex; align-items:center; gap:12px; margin:12px 0; padding:10px; background:#182438; border-radius:8px; overflow-wrap:anywhere; }
.team-grant span { flex:1; }
.team-review { border-bottom:1px solid #33415b; padding:18px 0; overflow-wrap:anywhere; }
.team-rating-summary { display:block; color:#f0d47a; font-weight:700; font-variant-numeric:tabular-nums; }
.team-summary-pagination { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:12px; margin:18px 0 28px; }
.team-summary-pagination button { min-height:44px; }
.team-inspector { width:min(900px,calc(100vw - 24px)); max-height:92dvh; background:#101b2b; color:#eef4ff; border:1px solid #536786; border-radius:18px; padding:20px; overflow:auto; }
.team-inspector::backdrop { background:#000b; }
.team-inspector header { display:flex; align-items:start; gap:10px; }
.team-inspector h2 { overflow-wrap:anywhere; flex:1; }
.team-inspector video,.team-inspector img { width:100%; max-height:55dvh; object-fit:contain; background:#000; }
.team-inspector audio { width:100%; }
#teamFeedback { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-top:14px; }
#teamFeedback label:has(textarea) { flex-basis:100%; }
#teamFeedbackStatus { color:#f4cf74; }
@media(max-width:650px) {
  .team-portal { padding:14px; }
  .team-admin { grid-template-columns:1fr; }
  .team-auth { padding:18px; margin:20px auto; }
  .team-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .team-card img,.team-audio-icon { height:150px; }
  .team-portal .team-card { font-size:13px; }
  .team-filters label { flex:1; }
  .team-grant { flex-wrap:wrap; }
}

/* Shared account navigation in the actual Studio. */
.team-studio-nav { display:flex; align-items:center; gap:12px; padding:8px 20px; flex-wrap:wrap; background:#101925; border-bottom:1px solid #334155; font-size:13px; }
.team-studio-nav[hidden] { display:none; }
.team-studio-nav span { margin-right:auto; color:#cbd5e1; }
.team-studio-nav a, .team-studio-nav button { min-height:44px; display:inline-flex; align-items:center; padding:8px 12px; color:#f8fafc; border:1px solid #475569; border-radius:10px; text-decoration:none; background:#1e293b; }
@media(max-width:600px) { .team-studio-nav { padding:6px 12px; gap:6px; } .team-studio-nav span { width:100%; } }
/* Catalog navigation: owned core UI; assistant production controls stay intact. */
body:has(#catalogSidebar:not([hidden])):has(#libraryView.is-active) .proj-switch { display: none !important; }
body:has(#catalogSidebar:not([hidden])):has(#libraryView.is-active) .side-sources { display: none; }
body:has(#catalogSidebar:not([hidden])):has(#libraryView.is-active) .rui-sugg { display: none !important; }
#typePills button[hidden], .catalog-pending[hidden] { display: none !important; }
.catalog-pending { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; color: var(--muted); }
body:not(:has(#libraryView.is-active)) #catalogSidebar { display: none; }
.catalog-scope { margin: 14px 12px; padding: 14px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.catalog-eyebrow { font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.catalog-scope label, .catalog-mobile-scope label, .catalog-view-controls label { display: grid; gap: 5px; min-width: 0; font-size: 11px; color: var(--muted); }
.catalog-scope label { margin-top: 12px; }
.catalog-scope select, .catalog-mobile-scope select, .catalog-view-controls select { width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 12px; text-overflow: ellipsis; }
.catalog-scope select:focus-visible, .catalog-mobile-scope select:focus-visible, .catalog-view-controls select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.catalog-scope > button { width: 100%; margin-top: 10px; min-height: 44px; border: 0; background: transparent; color: var(--gold); text-align: left; font-size: 11px; }
.catalog-scope > small { display: block; color: var(--muted); line-height: 1.5; font-size: 10px; }
.catalog-scope-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 20px; margin: 8px 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.catalog-scope-bar[hidden], .catalog-scope[hidden], .catalog-classification[hidden] { display: none; }
.catalog-context { flex: 1 1 240px; min-width: 0; display: grid; gap: 5px; padding: 4px 0; }
.catalog-context strong { font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.catalog-context span { font-size: 11px; line-height: 1.5; color: var(--muted); }
.catalog-view-controls { display: flex; gap: 10px; flex: 0 1 370px; min-width: 0; }
.catalog-view-controls label { flex: 1; }
.catalog-view-details { flex: 0 1 370px; }
.catalog-view-details > summary { min-height: 44px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 12px; cursor: pointer; }
.catalog-view-details[open] > summary { margin-bottom: 10px; }
.catalog-view-controls .catalog-mobile-source { display: none; }
.catalog-mobile-scope { display: none; }
.catalog-active-filters { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.catalog-active-filters:empty { display: none; }
.catalog-active-filters button { max-width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--gold); overflow-wrap: anywhere; font-size: 11px; }
.catalog-card-context { display: grid; gap: 4px; margin-bottom: 7px; min-width: 0; font-size: 10px; line-height: 1.4; }
.catalog-card-context span:first-child { color: var(--gold); }
.catalog-card-context span:last-child { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-versions-link { width: 100%; min-height: 44px; margin-top: 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--gold); text-align: left; padding: 8px 10px; font-size: 12px; }
.catalog-classification { min-width: 0; margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.catalog-classification legend { padding: 0 5px; color: var(--gold); font-size: 12px; }
.catalog-classification p, .catalog-classification small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.catalog-classification > button { width: 100%; min-height: 44px; margin-top: 10px; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; }
.catalog-conflict { font-size: 11px; color: var(--gold); }
#libraryView #typePills { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; scrollbar-width: thin; }
#libraryView #typePills button { flex-shrink: 0; min-height: 44px; }
#libraryView #typePills button:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
@media (max-width: 1023px) {
  .catalog-scope-bar { padding: 12px; gap: 10px; }
  .catalog-mobile-scope { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
  .catalog-view-controls { flex-wrap: wrap; }
  .catalog-view-controls .catalog-mobile-source { display: grid; flex-basis: 100%; }
  .catalog-context { flex-basis: 100%; }
  .catalog-view-controls { flex-basis: 100%; }
  .catalog-view-details { flex-basis: 100%; }
  .catalog-active-filters button { min-height: 44px; }
}

/* Scoped creative director; original assistant plugin remains independently owned. */
.director-dialog { width:min(980px,96vw); height:min(900px,94svh); max-height:94svh; padding:0; border:1px solid var(--line); border-radius:18px; color:var(--text); background:var(--surface); }
.director-dialog[open] { display:flex; flex-direction:column; }
.director-dialog::backdrop { background:#000b; backdrop-filter:blur(4px); }
.director-dialog > header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid var(--line); }
.director-dialog h2 { margin:4px 0 0; font-size:23px; }
.director-dialog small { color:var(--gold); }
.director-dialog button,.director-dialog select,.director-dialog input:not([type=checkbox]) { min-height:44px; }
.director-dialog button { border:1px solid var(--line); border-radius:8px; background:var(--surface-2); color:var(--text); padding:8px 12px; cursor:pointer; }
.director-dialog button:disabled { opacity:.5; cursor:wait; }
.director-scope { display:grid; grid-template-columns:1fr 1fr 1fr 1.3fr auto; gap:10px; padding:12px 20px; }
.director-dialog label { display:grid; gap:4px; min-width:0; font-size:11px; color:var(--muted); }
.director-dialog input,.director-dialog select,.director-dialog textarea { width:100%; min-width:0; background:var(--surface-2); color:var(--text); border:1px solid var(--line); border-radius:8px; padding:10px; font:inherit; font-size:13px; }
#directorStatus { margin:0; padding:4px 20px 10px; color:var(--muted); font-size:12px; }
.director-scroll { flex:1; min-height:0; overflow-y:auto; padding:12px 20px; }
.director-starters { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.director-messages article { border:1px solid var(--line); border-radius:12px; margin:12px 0; padding:14px; overflow-wrap:anywhere; }
.director-messages .director-user { color:var(--gold); white-space:pre-wrap; border-bottom:1px solid var(--line); padding-bottom:10px; }
.director-answer { white-space:pre-wrap; line-height:1.65; font-size:14px; }
.director-evidence { font-size:11px; line-height:1.5; color:var(--muted); }
.director-evidence a { color:var(--gold); display:block; overflow-wrap:anywhere; }
.director-memory { border-top:1px solid var(--line); margin-top:18px; padding:14px 0; font-size:12px; }
.director-memory summary { min-height:44px; cursor:pointer; }
.director-memory label { margin:10px 0; }
.director-memory article { padding:10px 0; border-bottom:1px solid var(--line); white-space:pre-wrap; }
.director-batches article { padding:14px; border:1px solid var(--gold); border-radius:12px; margin:12px 0; }
.director-batches pre { max-height:220px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; font-size:11px; }
#directorComposer { padding:12px 20px max(12px,env(safe-area-inset-bottom)); border-top:1px solid var(--line); }
#directorComposer > div { display:flex; gap:10px; margin-top:8px; }
#directorComposer textarea { resize:vertical; min-height:60px; max-height:160px; }
#directorComposer .director-research { display:inline-flex; align-items:center; gap:5px; margin-right:10px; }
.director-research input[type=checkbox] { width:18px; height:18px; }
@media (max-width:650px) { .director-dialog { width:100vw; max-width:100vw; height:100svh; max-height:100svh; border-radius:0; border:0; } .director-scope { grid-template-columns:1fr 1fr; padding:10px 12px; } .director-scope > button { grid-column:1/-1; } .director-scroll { padding:8px 12px; } .director-dialog > header,#directorComposer { padding:10px 12px; } .director-dialog > header h2 { font-size:20px; } }

/* SWIPE: thumb-sized actions, a single playable card, safe-area aware. */
.swipe-deck { width:min(100%,420px); margin:0 auto; padding:0 0 12px; display:flex; flex-direction:column; }
.swipe-controls { display:contents; }
.swipe-heading { order:0; }
.swipe-toolbar { order:1; }
.swipe-stage { order:2; }
.swipe-actions { order:3; }
.swipe-status { order:4; }
.swipe-footnote { order:5; }
.swipe-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:14px; }
.swipe-eyebrow { display:block; color:#a8a59b; font:700 9px/1.4 system-ui; letter-spacing:.18em; }
.swipe-heading h1 { margin:3px 0 0; color:#f1eee6; font:800 30px/1.1 system-ui; letter-spacing:-.05em; }
.swipe-heading h1 span { color:#e3c864; margin-left:6px; }
.swipe-counter { font:600 11px system-ui; color:#e3c864; border:1px solid #504626; border-radius:30px; padding:9px 12px; }
.swipe-toolbar { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:14px; }
.swipe-toolbar label { display:flex; align-items:center; gap:7px; margin:0; }
.swipe-toolbar label>span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.swipe-toolbar select { min-height:44px; max-width:165px; padding:0 10px; font-size:13px; }
.swipe-toolbar>span { color:#a8a59b; font-size:11px; }
.swipe-stage { position:relative; height:clamp(300px,calc(100svh - 350px),590px); isolation:isolate; margin:0 5px; }
.swipe-back { position:absolute; inset:12px 8px -6px; border:1px solid #4b432a; border-radius:24px; background:#1c1c18; transform:rotate(2deg); }
.swipe-card { position:absolute; inset:0; overflow:hidden; border:1px solid #3a3c3d; border-radius:23px; background:#07090d; touch-action:pan-y; user-select:none; transform:translateX(var(--swipe-x,0px)) rotate(var(--swipe-rotate,0deg)); transition:transform .2s ease,opacity .2s ease; box-shadow:0 18px 36px #0005; }
.swipe-card.is-dragging { transition:none; cursor:grabbing; }
.swipe-card.is-leaving-right { transform:translateX(70%) rotate(15deg); opacity:0; }
.swipe-card.is-leaving-left { transform:translateX(-70%) rotate(-15deg); opacity:0; }
.swipe-media { position:absolute; inset:0 0 112px; display:grid; place-items:center; background:radial-gradient(ellipse at center,#24272a,#080b10); }
.swipe-media img,.swipe-media video { width:100%; height:100%; object-fit:contain; display:block; pointer-events:none; }
.swipe-badges { position:absolute; top:13px; left:13px; right:13px; display:flex; justify-content:space-between; gap:8px; pointer-events:none; }
.swipe-badges span { padding:6px 8px; border:1px solid #ffffff29; border-radius:7px; background:#080b10bf; color:#f2eee5; font-size:10px; backdrop-filter:blur(12px); }
.swipe-playback { position:absolute; right:12px; bottom:124px; display:flex; gap:8px; }
.swipe-playback button { min-height:44px; min-width:44px; padding:0 12px; border:1px solid #ffffff30; border-radius:24px; background:#080b10cc; color:#f5f0e6; font-size:12px; }
.swipe-caption { position:absolute; bottom:0; width:100%; min-height:112px; padding:9px 12px 10px; background:linear-gradient(#121720,#0b1017); border-top:1px solid #ffffff15; text-align:center; }
.swipe-source { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:9px; color:#bbb5a3; letter-spacing:.03em; }
.swipe-caption h2 { margin:4px 0 2px; font:600 12px/1.3 system-ui; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#f1eee6; }
.swipe-stars { display:flex; justify-content:center; gap:3px; }
.swipe-stars button { width:44px; height:44px; min-height:44px; padding:8px; border:0; background:transparent; color:#c5c3bd; cursor:pointer; }
.swipe-stars svg { width:27px; height:27px; fill:transparent; stroke:currentColor; stroke-width:1.4; }
.swipe-stars .is-filled { color:#f3cb61; }
.swipe-stars .is-filled svg { fill:#f3cb61; }
.swipe-deck .swipe-stars button[aria-pressed] { background:transparent; border:0; border-radius:9px; }
.swipe-rating-hint { display:block; font-size:10px; color:#a8a59b; min-height:13px; }
.swipe-stamp { position:absolute; top:75px; left:20px; z-index:2; padding:9px 14px; border:3px solid currentColor; border-radius:9px; font:900 23px system-ui; opacity:0; transform:rotate(-12deg); pointer-events:none; }
.swipe-card[data-direction="up"] .swipe-stamp { color:#72e8ae; background:#071c15ba; opacity:1; }
.swipe-card[data-direction="down"] .swipe-stamp { left:auto; right:14px; color:#ff8e98; background:#240b13ba; opacity:1; transform:rotate(12deg); }
.swipe-actions { display:flex; justify-content:center; align-items:center; gap:26px; margin-top:22px; }
.swipe-actions button { display:flex; align-items:center; flex-direction:column; justify-content:center; border:1px solid; border-radius:50%; width:70px; height:70px; padding:10px 2px; cursor:pointer; }
.swipe-actions svg { width:29px; height:29px; }
.swipe-actions span { font-size:9px; margin-top:3px; }
.swipe-actions .swipe-no { color:#ff8e98; border-color:#65313a; background:#25141b; }
.swipe-actions .swipe-yes { color:#79e3ae; border-color:#2c6149; background:#10281f; }
.swipe-actions .swipe-undo { width:52px; height:52px; color:#e3c864; border-color:#4e452d; background:#1a1914; font-size:25px; line-height:1; }
.swipe-deck button:disabled { opacity:.35; cursor:default; }
.swipe-status { min-height:18px; margin:12px 0 3px; text-align:center; color:#e2d9c1; font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.swipe-footnote { margin:4px 0; text-align:center; color:#898e97; font-size:10px; line-height:1.5; }
.swipe-placeholder { position:absolute; inset:0; display:flex; justify-content:center; align-items:center; flex-direction:column; padding:28px; text-align:center; border:1px solid #3c3a2a; border-radius:23px; background:radial-gradient(ellipse at top,#27251b,#0c1118 70%); }
.swipe-placeholder>span { color:#e3c864; font-size:48px; }
.swipe-placeholder h2 { font:600 23px system-ui; margin:18px 0 8px; }
.swipe-placeholder p { color:#b2b1ac; font-size:13px; line-height:1.6; }
.swipe-placeholder button { min-height:44px; padding:10px 20px; border:1px solid #665b35; border-radius:12px; background:#292518; color:#e8d492; }
body:has(.swipe-view:not([hidden])) .content { padding-top:16px; }
body:has(.swipe-view:not([hidden])) [class*="fab"] { visibility:hidden; pointer-events:none; }
.team-tabs:has(#teamSwipeTab) { flex-wrap:wrap; }
body[data-team-portal]:has(#teamSwipePanel:not([hidden])) #teamWorkspace>details { display:none; }
body[data-team-portal]:has(#teamSwipePanel:not([hidden])) .team-status:empty { display:none; }
body[data-team-portal]:has(#teamSwipePanel:not([hidden])) .team-header { flex-wrap:nowrap; gap:10px; padding-bottom:8px; }
body[data-team-portal]:has(#teamSwipePanel:not([hidden])) #teamIdentity { display:none; }
body[data-team-portal]:has(#teamSwipePanel:not([hidden])) .team-header h1 { font-size:16px; }
body[data-team-portal]:has(#teamSwipePanel:not([hidden])) .team-header small { font-size:9px; }
body[data-team-portal]:has(#teamSwipePanel:not([hidden])) .team-tabs { margin:10px 0; }
body[data-team-portal] .swipe-stage { height:clamp(240px,calc(100svh - 405px),590px); }
@media (min-width:1024px) { .swipe-stage { height:clamp(360px,calc(100svh - 330px),640px); } .swipe-deck { max-width:440px; } }
@media (max-width:1023px) {
  body:has(.bottom-nav [data-view="swipe"]) .bottom-nav { display:flex; overflow-x:auto; }
  body:has(.bottom-nav [data-view="swipe"]) .bottom-nav button { flex:1 0 44px; min-width:44px; }
  body:has(.swipe-view:not([hidden])) #teamStudioNav { display:none; }
  .swipe-view .swipe-stage { height:clamp(220px,calc(100svh - 425px),590px); }
}
@media (max-width:420px) { .team-portal:has(#teamSwipePanel:not([hidden])) { padding:12px; } .swipe-actions { gap:24px; } }
@media (prefers-reduced-motion:reduce) { .swipe-card { transition:none; } }


/* Native mobile SWIPE: content 70%, controls 20%, navigation 10%. */
@media (max-width: 1023px) {
  body:has(.swipe-view:not([hidden])),
  body[data-team-portal]:has(#teamSwipePanel:not([hidden])) { height:100svh; min-height:0; overflow:hidden; }
  body:has(.swipe-view:not([hidden])) .studio-shell,
  body:has(.swipe-view:not([hidden])) .workspace { height:100svh; min-height:0; overflow:hidden; }
  body:has(.swipe-view:not([hidden])) .content { width:100%; max-width:none; height:90svh; padding:0; margin:0; }
  body:has(.swipe-view:not([hidden])) .mobile-header,
  body:has(.swipe-view:not([hidden])) .desktop-topbar,
  body:has(.swipe-view:not([hidden])) #teamStudioNav,
  body:has(.swipe-view:not([hidden])) .proj-switch.is-mobile,
  body:has(.swipe-view:not([hidden])) .metric-scroller,
  body:has(.swipe-view:not([hidden])) .sysmon-strip { display:none !important; }
  body[data-team-portal]:has(#teamSwipePanel:not([hidden])) .team-portal { height:100svh; width:100%; max-width:none; margin:0; padding:0; }
  body[data-team-portal]:has(#teamSwipePanel:not([hidden])) .team-header,
  body[data-team-portal]:has(#teamSwipePanel:not([hidden])) #teamStatus,
  body[data-team-portal]:has(#teamSwipePanel:not([hidden])) #teamWorkspace>details { display:none; }
  .swipe-view, #teamSwipePanel { height:90svh; margin:0; padding:0; animation:none; }
  .swipe-view .swipe-deck, #teamSwipePanel .swipe-deck { width:100%; max-width:none; height:90svh; margin:0; padding:0; display:grid; grid-template-rows:70svh 20svh; }
  .swipe-deck .swipe-heading, .swipe-deck .swipe-back, .swipe-deck .swipe-footnote { display:none; }
  .swipe-view .swipe-stage, #teamSwipePanel .swipe-stage { grid-row:1; order:0; width:100%; height:70svh; min-height:0; margin:0; }
  .swipe-card, .swipe-placeholder { border:0; border-radius:0; box-shadow:none; }
  .swipe-media { inset:0; background:#040609; }
  .swipe-media video, .swipe-media img { object-fit:contain; }
  .swipe-badges { top:max(12px,env(safe-area-inset-top)); left:14px; right:14px; }
  .swipe-caption { min-height:88px; padding:15px 14px 8px; border:0; background:linear-gradient(transparent,#070b12e8 28%,#080c12); }
  .swipe-caption .swipe-source { display:none; }
  .swipe-caption h2 { font-size:11px; margin:0 25px 1px; }
  .swipe-stars { gap:7px; }
  .swipe-stars button { width:44px; height:44px; }
  .swipe-playback { bottom:105px; right:14px; }
  .swipe-controls { grid-row:2; order:1; display:grid; height:20svh; min-height:0; padding:4px 18px; grid-template-rows:44px minmax(52px,1fr) 24px; align-items:center; background:linear-gradient(#101721,#080c12); border-top:1px solid #ffffff0c; }
  .swipe-controls .swipe-toolbar { grid-row:1; order:0; margin:0; }
  .swipe-toolbar select { min-height:44px; height:44px; max-width:160px; border:0; background:transparent; font-size:12px; padding:0 8px; }
  .swipe-toolbar>span { font-size:10px; color:#9d9e9e; }
  .swipe-controls .swipe-actions { grid-row:2; order:1; margin:0; gap:clamp(24px,9vw,54px); }
  .swipe-actions button { width:58px; height:58px; min-height:44px; padding:6px 0; }
  .swipe-actions svg { width:25px; height:25px; }
  .swipe-actions .swipe-undo { width:46px; height:46px; font-size:23px; }
  .swipe-controls .swipe-status { grid-row:3; order:2; margin:0; min-height:0; max-height:24px; overflow-y:auto; font-size:10px; line-height:12px; }
  body:has(.swipe-view:not([hidden])) .bottom-nav,
  body[data-team-portal]:has(#teamSwipePanel:not([hidden])) .team-tabs { position:fixed; top:90svh; bottom:auto; left:0; right:0; width:100%; height:10svh; min-height:0; margin:0; padding:3px 7px max(3px,env(safe-area-inset-bottom)); display:flex; flex-wrap:nowrap; align-items:stretch; gap:2px; overflow-x:auto; border:0; border-top:1px solid #ffffff14; border-radius:0; background:#090e15; z-index:20; }
  body:has(.swipe-view:not([hidden])) .bottom-nav button,
  body[data-team-portal]:has(#teamSwipePanel:not([hidden])) .team-tabs button { flex:1 0 44px; min-width:44px; min-height:44px; border:0; border-radius:12px; padding:4px 3px; background:transparent; color:#9199a6; font-size:10px; }
  body[data-team-portal]:has(#teamSwipePanel:not([hidden])) .team-tabs button[aria-pressed=true],
  body:has(.swipe-view:not([hidden])) .bottom-nav button.is-active { background:#e0bf6512; color:#ebcf83; }
  body[data-team-portal]:has(#teamSwipePanel:not([hidden])) .swipe-toolbar select { background:transparent; border:0; font-size:12px; padding:0 8px; }
}
@media (max-width:1023px) and (max-height:650px) {
  .swipe-controls { padding:2px 10px; grid-template-columns:minmax(80px,1fr) auto; grid-template-rows:minmax(44px,1fr) 18px; column-gap:6px; }
  .swipe-controls .swipe-toolbar { grid-column:1; grid-row:1; }
  .swipe-toolbar>span { display:none; }
  .swipe-toolbar select { max-width:120px; font-size:11px; }
  .swipe-controls .swipe-actions { grid-column:2; grid-row:1; gap:12px; }
  .swipe-actions button,.swipe-actions .swipe-undo { width:44px; height:44px; padding:3px 0; }
  .swipe-actions span { display:none; }
  .swipe-controls .swipe-status { grid-column:1 / -1; grid-row:2; max-height:18px; font-size:9px; }
}
