.channel-tag-modes{display:flex;flex-wrap:nowrap;gap:4px;margin:0 0 20px;border-bottom:1px solid var(--line);overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
.custom-channel-tab-group{display:inline-flex;align-items:center;flex:0 0 auto;min-width:0;max-width:100%;border-radius:7px;background:var(--soft)}
.source-tabs .custom-channel-tab-group>.custom-channel-pill{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:transparent}
.source-tabs .custom-channel-tab-group>.custom-channel-tab-edit{display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;min-width:36px;min-height:36px;margin:0;padding:0;color:var(--muted)}
.custom-channel-tab-edit .lucide{width:15px;height:15px}
.source-tabs .custom-channel-tab-group>.custom-channel-tab-edit:hover{color:var(--ink);background:var(--raised)}
.custom-channel-tab-group>a:focus-visible{outline-offset:-3px}
@media(max-width:820px){.source-tabs .custom-channel-tab-group>.custom-channel-tab-edit{flex-basis:44px;min-width:44px;min-height:44px}}
.channel-tag-modes button{flex:0 0 auto;white-space:nowrap;padding:12px 14px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--secondary);font:inherit;font-size:12px;cursor:pointer}
.channel-tag-modes button[aria-selected=true]{border-bottom-color:var(--accent);color:var(--ink);font-weight:650}
.channel-tag-picker{padding:26px;border:1px solid var(--line);border-radius:12px;background:var(--paper)}
.channel-tag-picker h2{margin:0 0 10px;font-size:20px}
.channel-tag-picker>p{font-size:12px;line-height:1.8;color:var(--muted)}
.channel-tag-search{display:block;margin:22px 0 18px;font-size:12px}
.channel-tag-search input{display:block;width:100%;margin-top:8px;padding:12px;border:1px solid var(--control-border);border-radius:8px;background:var(--paper);color:var(--ink);font:inherit}
.channel-tag-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:10px}
.channel-person-tag{display:flex;align-items:center;justify-content:space-between;gap:14px;min-width:0;padding:16px;border:1px solid var(--line);border-radius:9px;background:var(--paper);color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.channel-person-tag:hover{background:var(--soft);border-color:var(--accent)}
.channel-person-name{display:grid;gap:5px;min-width:0;overflow-wrap:anywhere}
.channel-person-name strong{font-size:14px}.channel-person-name small{font-size:11px;color:var(--muted)}
.channel-person-action{flex-shrink:0;font-size:11px;color:var(--accent)}
.channel-person-tag:disabled{opacity:.55;cursor:progress}
.channel-tag-picker [hidden]{display:none}
.channel-tag-modes :focus-visible,.channel-tag-picker :focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.channel-tag-picker [data-person-tag-status]:not(:empty),.channel-tag-picker [data-tag-status]:not(:empty){margin-top:18px;color:var(--ink)}
@media(max-width:600px){.channel-tag-picker{padding:18px}.channel-tag-modes button{padding:10px 8px}.channel-person-tag{padding:14px}}

body.channel-dialog-open{overflow:hidden}
.channel-create-dialog{position:fixed;inset:0;box-sizing:border-box;width:min(860px,calc(100% - 48px));max-width:none;max-height:calc(100dvh - 64px);margin:auto;padding:0;border:1px solid var(--line);border-radius:14px;background:var(--paper);color:var(--ink);box-shadow:0 24px 80px #0003;overflow:visible}
.channel-create-dialog::backdrop{background:rgb(0 0 0 / .36)}
.channel-dialog-content{max-height:calc(100dvh - 66px);overflow-y:auto;overscroll-behavior:contain;border-radius:inherit;padding:30px}
.channel-dialog-close{position:absolute;z-index:2;top:13px;right:14px;display:grid;place-items:center;width:32px;height:32px;padding:0;border:0;border-radius:6px;background:var(--paper);color:var(--muted);font:26px/1 sans-serif;cursor:pointer}
.channel-dialog-close:hover{background:var(--soft);color:var(--ink)}
.channel-dialog-close:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.channel-dialog-status{margin:32px 0;color:var(--muted)}
.channel-create-dialog .channel-builder-page{max-width:none;margin:0;padding:0}
.channel-create-dialog .channel-builder-header{margin:0 36px 22px 0}
.channel-create-dialog .channel-builder-header .eyebrow{font-size:10px}
.channel-create-dialog .channel-builder-header h1{margin:7px 0 10px;font-size:25px;letter-spacing:-.025em}
.channel-create-dialog .channel-builder-header p{margin:0;font-size:12px;line-height:1.7}
.channel-create-dialog .channel-tag-modes{gap:6px;margin-bottom:20px}
.channel-create-dialog .channel-tag-modes button{padding:8px 12px}
.channel-create-dialog .channel-tag-picker{padding:0;border:0;border-radius:0}
.channel-create-dialog .channel-tag-picker h2{font-size:17px}
.channel-create-dialog .channel-tag-search{margin:16px 0}
.channel-create-dialog .channel-tag-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.channel-create-dialog .channel-person-tag{padding:13px}
.channel-create-dialog .channel-builder-grid{grid-template-columns:minmax(0,1fr)}
.channel-create-dialog .channel-builder-form{min-height:0;padding:0;border:0;border-radius:0}
.channel-create-dialog .channel-builder-guide{order:0;padding:16px}
.channel-create-dialog .channel-builder-guide h2{font-size:15px}
@media(max-width:600px){
  .channel-create-dialog{width:calc(100% - 28px);max-height:calc(100dvh - 48px);border-radius:12px}
  .channel-dialog-content{padding:22px 18px;max-height:calc(100dvh - 50px)}
  .channel-create-dialog .channel-builder-header h1{font-size:22px}
  .channel-create-dialog .channel-tag-grid{grid-template-columns:minmax(0,1fr)}
  .channel-create-dialog .channel-tag-modes button{font-size:11px}
}

.feed-filter-status { margin: 0 0 12px; font-size: .875rem; color: var(--muted); }
.feed-filter-status[hidden] { display: none; }
.feed-filter-status .button { margin-inline-start: 8px; }
.feed-page[aria-busy="true"] .feed-main { opacity: .55; }

.channel-builder-grid{grid-template-columns:minmax(0,1fr)}
/* The shared fieldset defaults to a wrapping row; channel fields form one column. */
.channel-builder-form [data-channel-form-pane]{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;min-width:0}
.channel-builder-form [data-channel-form-pane]>label,.channel-builder-form [data-channel-form-pane]>details{margin:0;min-width:0}
.channel-builder-form [data-channel-form-pane]>label:not(.check-label){display:grid;gap:7px}
.channel-builder-form label>input,.channel-builder-form label>textarea{margin-top:0}
.channel-builder-form label small{margin:0;font-size:12px;font-weight:400;overflow-wrap:anywhere}
.channel-builder-form .check-label{display:flex;align-items:flex-start;gap:10px;line-height:1.6;font-weight:400}
.channel-builder-form .check-label input{width:18px;height:18px;margin:1px 0 0;flex-shrink:0}
.channel-builder-form details summary{line-height:1.6;overflow-wrap:anywhere}
.channel-builder-form details label{display:grid;gap:7px;min-width:0;margin-top:8px}
.channel-builder-form [data-tracking-preview]{min-width:0;overflow-wrap:anywhere}
.channel-builder-form .reader-channel-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px;margin:0;padding-top:16px;border-top:1px solid var(--line)}
.channel-builder-form .reader-channel-actions .button{min-height:44px;max-width:100%;white-space:normal;line-height:1.5}
.channel-builder-form :focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:600px){
  .channel-builder-form input:not([type=checkbox]),.channel-builder-form textarea{font-size:16px}
  .channel-builder-form .reader-channel-actions{display:grid;grid-template-columns:minmax(0,1fr)}
  .channel-builder-form .reader-channel-actions .button{width:100%}
}
@media(max-height:500px){
  .channel-create-dialog{max-height:calc(100dvh - 24px)}
  .channel-dialog-content{max-height:calc(100dvh - 26px)}
}
.channel-builder-form .form-message[data-state=processing]{color:var(--muted)}
.channel-builder-form .form-message[data-state=success]{color:var(--accent)}
.channel-builder-form [data-resume-channel-request]{margin-top:12px}
.channel-analysis-state{min-height:140px;padding:18px;margin-top:16px;border:1px solid var(--line);border-radius:10px}
.channel-analysis-state ol{margin-top:12px}

.feed-page[aria-busy="true"] .feed-main { opacity: 1; }
.feed-page[aria-busy="true"] .feed-main>:not(.feed-filter-status) { opacity: .55; }
.feed-page[data-feed-filter-state="loading"] .feed-main .empty-state,
.feed-page[data-feed-filter-state="error"] .feed-main .empty-state { display: none; }
