@layer reset, tokens, layout, components, states;
@layer reset {
 * { box-sizing: border-box; }
 html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: 100px; }
 body { margin: 0; }
 button, input, select, textarea { font: inherit; }
 button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
 button { cursor: pointer; }
 button:disabled { cursor: default; }
 a { color: inherit; text-decoration: none; }
 button, input, select { max-width: 100%; }
 button { color: inherit; }
 h1, h2, h3, p { margin: 0; }
 ul { margin: 0; padding: 0; list-style: none; }
 svg { display: block; }
}
@layer tokens {
 :root {
  color-scheme: light;
  --surface: #fff; --canvas: #f4f5f7; --text: #202124; --muted: #62666d; --soft: #f1f2f4; --line: #e6e7eb;
  --purple: #7933d9; --blue: #2754e9; --accent: #5437d4; --accent-soft: #f0edfc;
  --brand: linear-gradient(115deg, #7c37dc, #365ce9); --warning: #996000; --warning-soft: #fff5df;
  --error: #b42318; --error-soft: #fff0ed; --success: #168354; --focus: #204ac7;
  --fast: 120ms; --medium: 220ms;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 16px; color: var(--text); background: var(--canvas); font-weight: 400; line-height: 1.4;
 }
}
@layer layout {
 .app-shell { background: var(--surface); width: min(100%, 680px); min-height: 100svh; margin-inline: auto; padding-top: env(safe-area-inset-top); }
 .main { padding: 0 16px calc(94px + env(safe-area-inset-bottom)); min-height: 60svh; }
 .home-main { padding-top: 4px; }
 .preview-notice { display: flex; justify-content: center; gap: 8px; align-items: center; padding: 5px 12px; min-height: 30px; background: #fff6d9; color: #755100; font-size: 12px; }
 .preview-notice a { text-decoration: underline; text-underline-offset: 3px; }
 .topbar { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 12px; padding: 14px 16px 3px; }
 .search-trigger { min-height: 48px; border: 0; background: #f0f0f2; color: #73757a; border-radius: 13px; text-align: left; display: flex; align-items: center; gap: 12px; padding: 0 14px; font-size: 17px; }
 .ai-trigger { background: transparent; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1.1; min-height: 48px; font-size: 12px; }
 .ai-trigger .icon { width: 31px; height: 31px; }
 .context-row { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 11px 0 16px; gap: 8px; }
 .workspace-switch { border: 0; padding: 8px 0; background: transparent; min-height: 44px; display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); min-width: 0; }
 .workspace-switch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 .workspace-switch .icon { width: 16px; height: 16px; }
 .pagebar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; padding: 10px 8px; min-height: 64px; gap: 4px; }
 .pagebar h1 { font-size: 21px; font-weight: 600; line-height: 1.2; }
 .section { padding: 19px 0; border-top: 1px solid var(--line); }
 .section-heading { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 12px; }
 .section-heading h2 { font-size: 20px; letter-spacing: -.3px; font-weight: 650; }
 .section-heading .text-link { min-height: 44px; display: inline-flex; align-items: center; gap: 2px; margin-block: -10px; }
 .section-heading .icon { width: 18px; height: 18px; }
 .bottom-nav { position: fixed; z-index: 10; left: 50%; transform: translateX(-50%); bottom: 0; width: min(100%, 680px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: rgba(255,255,255,.97); border-top: 1px solid #dedfe3; padding: 9px 5px calc(8px + env(safe-area-inset-bottom)); }
 .nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 48px; padding: 2px; color: #626468; font-size: 12px; }
 .nav-item .icon { width: 26px; height: 26px; }
 .nav-item[aria-current='page'] { color: var(--accent); }
 .initial-state { min-height: 100svh; display: flex; flex-direction: column; gap: 16px; justify-content: center; align-items: center; color: var(--muted); background: #fff; }
 .login { padding: max(36px, env(safe-area-inset-top)) 24px 32px; max-width: 460px; margin-inline: auto; }
 .login-intro { padding: 24px 0 28px; }
 .login-intro > .icon { width: 48px; height: 48px; margin-bottom: 28px; }
 .login h1 { font-size: 28px; line-height: 1.15; font-weight: 650; letter-spacing: -.7px; margin-bottom: 10px; }
 .login-intro p { color: var(--muted); }
 .login-footer { color: var(--muted); font-size: 13px; line-height: 1.5; margin-top: 28px; }
}
@layer components {
 .crm-search { display: grid; gap: 6px; margin: 16px 0; }
 .crm-search label { font-size: 14px; color: var(--muted); }
 .crm-search > div { display: flex; gap: 8px; }
 .crm-search input { min-width: 0; width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
 .crm-stages { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 24px; }
 .crm-stages button { min-height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 12px; overflow-wrap: anywhere; }
 .crm-stages button[aria-pressed='true'] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
 .crm-stages button span { font-size: 13px; margin-inline-start: 4px; }
 .crm-deal-row { flex-wrap: wrap; text-align: left; }
 .crm-deal-row .thumbnail { width: 44px; height: 44px; flex: 0 0 44px; }
 .crm-deal-row .row-body { min-width: 120px; flex: 1; }
 .crm-deal-value { max-width: 100%; overflow-wrap: anywhere; font-weight: 600; margin-inline-start: auto; }
 .crm-detail-heading { display: grid; gap: 8px; margin: 16px 0; overflow-wrap: anywhere; }
 .crm-detail-heading > strong { font-size: 24px; }
 .crm-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
 .crm-back .icon { width: 20px; height: 20px; transform: rotate(180deg); }
 .crm-note { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 12px; }
 .link-intro { padding: 8px 0 18px; }
 .link-account { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
 .link-account .thumbnail { width: 44px; height: 44px; flex: 0 0 44px; }
 .link-account .link-open { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; font-size: 13px; padding: 10px; }
 .link-connected { color: var(--success); }
 .link-flow { padding: 20px 0; margin-top: 16px; border-top: 1px solid var(--line); }
 .link-flow h2 { font-size: 21px; line-height: 1.25; margin-bottom: 14px; font-weight: 650; }
 .link-flow h3, .link-old h2 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
 .link-progress { font-size: 12px; color: var(--accent); margin-bottom: 8px; }
 .link-copy { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
 .link-flow fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
 .link-flow summary { min-height: 44px; padding: 10px 0; color: var(--muted); font-size: 14px; cursor: pointer; }
 .link-selection { margin: 0 0 16px; padding: 0; }
 .link-selection > div { padding: 10px 0; }
 .link-selection dt { color: var(--muted); font-size: 12px; }
 .link-selection dd { margin: 3px 0 0; font-size: 16px; overflow-wrap: anywhere; }
 .link-details { margin-bottom: 16px; }
 .link-resource-id { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
 .link-capabilities { display: grid; gap: 10px; margin: 12px 0 20px; }
 .link-capabilities li { display: flex; gap: 10px; font-size: 14px; align-items: center; }
 .link-capabilities .icon { width: 20px; height: 20px; color: var(--success); }
 .link-cancel { margin-top: 16px; }
 .link-actions { display: flex; gap: 10px; flex-wrap: wrap; }
 .link-old { margin-top: 20px; }
 .icon { width: 24px; height: 24px; aspect-ratio: 1; flex: 0 0 auto; }
 .icon-button { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 11px; background: transparent; color: var(--muted); flex: 0 0 auto; }
 .text-link { color: var(--blue); border: 0; background: none; font-weight: 500; padding: 0; }
 .button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 12px 18px; min-height: 48px; border: 0; border-radius: 12px; font-weight: 600; background: var(--brand); color: #fff; }
 .button.secondary { background: var(--accent-soft); color: var(--accent); }
 .button.danger { background: var(--error-soft); color: var(--error); }
 .button.full { width: 100%; }
 .button:disabled { background: #ededf0; color: #777b82; }
 .summary-carousel { display: flex; overflow-x: auto; gap: 12px; border-radius: 16px; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-inline: contain; }
 .summary-carousel::-webkit-scrollbar { display: none; }
 .summary-card { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; background: var(--brand); color: #fff; border-radius: 16px; padding: 16px 16px 12px; min-height: 186px; display: flex; flex-direction: column; justify-content: space-between; }
 .summary-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
 .summary-top h2 { font-size: 15px; font-weight: 600; }
 .summary-top small { font-size: 11px; color: #f4f0ff; display: block; margin-top: 2px; }
 .summary-top a { display: grid; place-items: center; width: 44px; height: 44px; margin: -8px -10px -8px 0; }
 .metrics { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 12px; padding: 9px 0; }
 .metric { min-width: 0; }
 .metric small { display: block; font-size: 11px; color: #f5edff; line-height: 1.25; margin-bottom: 2px; }
 .metric strong { display: block; font-size: 23px; font-weight: 550; letter-spacing: -.5px; overflow-wrap: anywhere; line-height: 1.15; font-variant-numeric: tabular-nums; }
 .metric.positive strong { color: #a3ffd2; }
 .metric.highlight strong { color: #fff15c; }
 .summary-divider { border: 0; border-top: 1px solid rgba(255,255,255,.25); margin: 2px 0; }
 .summary-subtitle { font-size: 12px; color: #fff; margin-bottom: 1px; }
 .summary-note { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: #f4f0ff; margin-top: 7px; }
 .summary-value { font-size: 26px; font-weight: 550; letter-spacing: -.5px; line-height: 1.2; overflow-wrap: anywhere; }
 .summary-empty { padding-block: 12px; }
 .summary-empty strong { font-size: 19px; font-weight: 500; display: block; max-width: 22ch; }
 .summary-empty p { font-size: 13px; color: #f3efff; margin-top: 6px; max-width: 38ch; }
 .carousel-pages { display: flex; align-items: center; justify-content: center; gap: 0; height: 28px; margin-top: -3px; }
 .carousel-dot { border: 0; background: transparent; min-height: 44px; width: 44px; display: grid; place-items: center; }
 .carousel-dot::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #d9d9df; }
 .carousel-dot[aria-current='true']::after { background: var(--accent); }
 .modules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 12px 0 23px; }
 .module-link { min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 5px 0; min-height: 81px; font-size: clamp(12px, 3.5vw, 16px); line-height: 1.2; white-space: nowrap; }
 .module-link .icon { width: 42px; height: 42px; }
 .action-notice { background: var(--warning-soft); border-radius: 13px; display: flex; align-items: center; gap: 11px; padding: 12px; margin-bottom: 16px; }
 .action-notice > .icon { color: var(--warning); width: 28px; height: 28px; }
 .action-notice .notice-copy { flex: 1; min-width: 0; }
 .action-notice strong { font-size: 15px; font-weight: 600; display: block; line-height: 1.3; }
 .action-notice small { font-size: 12px; display: block; margin-top: 2px; color: #82571b; }
 .action-notice a { min-height: 44px; display: flex; align-items: center; font-size: 14px; color: var(--blue); font-weight: 600; }
 .current-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
 .current-item { display: flex; gap: 11px; align-items: center; min-width: 0; padding: 11px 9px; border: 1px solid var(--line); border-radius: 13px; min-height: 77px; }
 .current-item > .icon { width: 32px; height: 32px; }
 .current-item strong { font-size: 15px; font-weight: 600; display: block; }
 .current-item small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
 .status-line { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; margin-top: 4px; }
 .status-line::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex: none; }
 .list-row { width: 100%; display: flex; align-items: center; gap: 13px; padding: 12px 0; background: transparent; border: 0; text-align: left; min-height: 70px; }
 .list-row + .list-row { border-top: 1px solid var(--line); }
 .list-row .row-body { min-width: 0; flex: 1; }
 .list-row strong { display: block; font-size: 16px; font-weight: 550; line-height: 1.3; }
 .list-row small { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
 .list-row > .icon:last-child { width: 18px; height: 18px; color: var(--muted); }
 .list-row time { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
 .thumbnail { width: 48px; height: 48px; aspect-ratio: 1; flex: 0 0 48px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); overflow: hidden; }
 .thumbnail img { width: 100%; height: 100%; object-fit: cover; }
 .thumbnail .icon { width: 27px; height: 27px; }
 .date-square { font-size: 24px; font-weight: 600; color: var(--blue); }
 .empty-state { padding: 18px 0 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }
 .empty-state.hero { padding: 28px 8px; text-align: center; }
 .empty-state.hero > .icon { width: 56px; height: 56px; margin: 0 auto 18px; }
 .empty-state h2, .empty-state h3 { color: var(--text); font-size: 20px; font-weight: 600; margin-bottom: 8px; }
 .empty-state p { max-width: 42ch; margin-inline: auto; }
 .empty-state .button { margin-top: 18px; }
 .error-panel { padding: 14px; background: var(--error-soft); color: var(--error); border-radius: 12px; font-size: 14px; }
 .error-panel button { margin-top: 10px; }
 .error-panel p + p { margin-top: 5px; }
 .help-note { font-size: 13px; color: var(--muted); line-height: 1.5; padding: 12px 0; }
 .data-note { padding: 12px; border: 1px solid var(--line); border-radius: 12px; display: flex; gap: 9px; align-items: flex-start; font-size: 12px; color: var(--muted); margin-bottom: 18px; }
 .data-note .icon { width: 18px; height: 18px; margin-top: 1px; }
 .detail-metrics { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 12px 0 22px; }
 .detail-metrics > div { border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
 .detail-metrics small { display: block; color: var(--muted); font-size: 13px; }
 .detail-metrics strong { display: block; font-size: 29px; font-weight: 550; margin-top: 7px; font-variant-numeric: tabular-nums; }
 .subheading { font-size: 17px; font-weight: 600; margin: 20px 0 8px; }
 .form-field { display: flex; flex-direction: column; gap: 6px; margin: 18px 0; }
 .form-field label { font-size: 14px; font-weight: 500; }
 .form-field input, .form-field select { min-height: 48px; border: 1px solid #b9bdc5; border-radius: 10px; background: #fff; padding: 11px 12px; width: 100%; color: var(--text); }
 .form-field input[aria-invalid='true'] { border-color: var(--error); }
 .form-field small { font-size: 12px; color: var(--muted); }
 .field-error { color: var(--error); font-size: 13px; margin-bottom: 12px; }
 .method-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0 0 24px; }
 .method-option { border: 1px solid var(--line); border-radius: 10px; min-height: 46px; padding: 10px 8px; background: #fff; font-size: 14px; }
 .method-option[aria-pressed='true'] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
 .login details { margin: 8px 0 18px; color: var(--muted); font-size: 14px; }
 .login summary { cursor: pointer; min-height: 44px; padding-top: 10px; }
 .login details .form-field { margin-top: 6px; color: var(--text); }
 .pill-tabs { display: flex; overflow-x: auto; gap: 8px; margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; }
 .pill-tabs button { min-height: 44px; padding: 10px 15px; border: 0; border-radius: 10px; background: var(--soft); color: var(--muted); white-space: nowrap; }
 .pill-tabs button[aria-pressed='true'] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
 .plan-price { font-size: 25px; font-weight: 600; margin: 5px 0; }
 .plan-card { border-top: 1px solid var(--line); padding: 18px 0; }
 .plan-card h2 { font-size: 20px; font-weight: 600; }
 .plan-card p { color: var(--muted); font-size: 14px; }
 dialog { border: 0; padding: 0; border-radius: 20px; width: min(440px, calc(100% - 24px)); max-height: min(85svh, 760px); background: #fff; color: var(--text); box-shadow: 0 18px 80px #0003; }
 dialog::backdrop { background: #11182766; }
 .dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 8px 20px; gap: 12px; }
 .dialog-header h2 { font-size: 20px; font-weight: 600; }
 .dialog-body { padding: 0 20px 22px; overflow-wrap: anywhere; }
 .dialog-body .list-row { min-height: 64px; }
 .dialog-body > p { color: var(--muted); font-size: 15px; line-height: 1.5; }
 .search-dialog { width: min(680px, 100%); max-height: 100dvh; height: 100dvh; margin: 0 auto; border-radius: 0; }
 .search-dialog .dialog-header { padding-top: calc(12px + env(safe-area-inset-top)); }
 .search-input { min-width: 0; flex: 1; min-height: 48px; border: 0; border-radius: 12px; background: var(--soft); padding: 10px 14px; font-size: 17px; }
 .search-scope { color: var(--muted); font-size: 12px; padding: 0 20px 8px; }
 .search-results { padding: 0 20px calc(24px + env(safe-area-inset-bottom)); }
 .search-results .list-row .icon:first-child { color: var(--accent); }
 .loader { width: 26px; height: 26px; border: 2px solid #e1dcf2; border-top-color: var(--accent); border-radius: 50%; animation: spin 800ms linear infinite; }
 .loading-line { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 16px 0; font-size: 14px; min-height: 64px; }
 .loading-line .loader { width: 20px; height: 20px; }
 .summary-card .loading-line { color: #fff; }
 .summary-card .loader { border-color: #ffffff55; border-top-color: #fff; }
 .skeleton { height: 18px; background: var(--soft); border-radius: 5px; width: 70%; margin: 8px 0; }
 .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
 .skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px; background: #fff; color: var(--accent); }
 .skip-link:focus { top: 8px; }
}
@layer states {
 :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
 button, a { transition: background-color var(--fast), opacity var(--fast); touch-action: manipulation; }
 button:active:not(:disabled), a:active { opacity: .68; }
 .overdue { color: var(--error) !important; }
 .muted { color: var(--muted); }
 .nowrap { white-space: nowrap; }
 .list-row[aria-current='true'] { color: var(--accent); }
 @keyframes spin { to { transform: rotate(360deg); } }
 @media (hover: hover) { .icon-button:hover, .list-row:hover { background: #f7f7f9; } .module-link:hover { color: var(--accent); } }
 @media (max-width: 370px) { .main { padding-inline: 12px; } .topbar { padding-inline: 12px; } .module-link { font-size: 12px; } .metric strong { font-size: 21px; } .current-grid { gap: 8px; } .current-item { gap: 7px; padding-inline: 7px; } .current-item strong { font-size: 14px; } }
 @media (min-width: 600px) { .main { padding-inline: 28px; } .topbar { padding: 24px 28px 3px; } .context-row { padding-inline: 28px; } .summary-card { min-height: 210px; padding: 20px 24px; } .metric strong { font-size: 29px; } .modules { gap: 16px; padding-block: 20px 28px; } .module-link { font-size: 16px; } .module-link .icon { width: 48px; height: 48px; } .nav-item { font-size: 13px; } }
 @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } .loader { animation: none; border-right-color: var(--accent); } }
 @media (prefers-contrast: more) { :root { --muted: #444; --line: #a5a5a5; } .preview-notice { color: #533600; } }
}

@layer states { .status-line.snapshot::before { background: #92979f; } }
@layer components {
 .channel-health { display: flex; align-items: flex-start; gap: 12px; padding: 14px; margin-bottom: 12px; border-radius: 13px; background: var(--warning-soft); }
 .channel-health .thumbnail { width: 44px; height: 44px; flex-basis: 44px; background: transparent; color: inherit; }
 .channel-health .notice-copy { min-width: 0; flex: 1; overflow-wrap: anywhere; }
 .channel-health p { font-size: 14px; line-height: 1.45; margin: 4px 0; }
 .channel-health strong { display: block; font-size: 16px; line-height: 1.35; }
 .channel-health .button { margin-top: 10px; min-height: 44px; }
 .channel-health--error { background: var(--error-soft); color: var(--error); }
 .channel-health--warning { color: var(--warning); }
 .channel-health--muted { background: var(--surface); color: var(--muted); }
 .channel-health--success { background: var(--surface); color: var(--text); }
}
@layer components {
 .report-row { border-bottom: 1px solid var(--line); padding: 18px 0; }
 .report-row h3 { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
 .report-row .detail-metrics { margin-top: 12px; }
 .dialog-body > .pill-tabs { margin-bottom: 16px; }
 .calendar-picker { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 12px; flex-wrap: wrap; }
 .calendar-picker .form-field { flex: 1 1 180px; min-width: 0; margin: 12px 0 0; }
 .calendar-picker .button { flex: 0 0 auto; }
 .calendar-picker .field-error { flex: 1 0 100%; margin: 0; }
 .publication-row { width: 100%; text-align: left; }
 .publication-row .row-body strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
 .publication-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
 .publication-meta > span:last-child { min-width: 0; }
 .publication-meta small { display: block; font-size: 13px; color: var(--muted); }
 .publication-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
 .publication-fields textarea { min-height: 120px; border: 1px solid #b9bdc5; border-radius: 10px; padding: 12px; background: var(--surface); color: var(--text); width: 100%; resize: vertical; }
 .publication-fields textarea[aria-invalid='true'] { border-color: var(--error); }
 .publication-toggle { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 48px; margin: 8px 0 16px; }
 .publication-toggle input { width: 24px; height: 24px; accent-color: var(--accent); margin: 12px; }
 .publication-actions { display: grid; gap: 8px; margin-top: 16px; }
 .publication-caption { white-space: pre-wrap; margin-block: 16px; max-height: 160px; overflow-y: auto; }
 .publication-result { display: flex; align-items: flex-start; gap: 12px; margin: 12px 0; }
 .publication-pending { width: 100%; text-align: left; color: var(--warning); }
 .reel-controls { display: flex; align-items: flex-end; gap: 12px; }
 .reel-controls .form-field { flex: 1; min-width: 0; margin-bottom: 0; }
 .reel-controls .icon-button { margin-bottom: 2px; }
 .reel-row strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
 .reel-more { margin-top: 8px; }
 .detail-back { min-height: 44px; text-align: left; }
 .detail-caption { white-space: pre-wrap; overflow-wrap: anywhere; margin-block: 16px; }
 .media-section { min-width: 0; }
 .media-square { aspect-ratio: 1; width: 100%; min-width: 0; position: relative; overflow: hidden; border-radius: 12px; background: var(--soft); }
 .media-square video, .media-square img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
 .media-square video:focus-visible { outline-offset: -4px; }
 .media-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; text-align: center; color: var(--muted); font-size: 14px; }
 .media-empty .icon { width: 36px; height: 36px; color: var(--accent); }
 .source-preview-disclosure { margin-block: 12px; }
 .source-preview-disclosure summary { min-height: 44px; padding-block: 12px; color: var(--accent); cursor: pointer; }
 .reel-facts { margin: 12px 0; }
 .reel-facts > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 12px; padding-block: 10px; border-bottom: 1px solid var(--line); }
 .reel-facts dt { color: var(--muted); font-size: 13px; }
 .reel-facts dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
}
