
.scrap-hero-panel,.scrap-workspace { min-width:0; }
.scrap-mode-tabs,.scrap-channel-picker,.scrap-demo-actions,.scrap-url-row,.scrap-search-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.scrap-mode-tabs { margin-bottom:18px; }
.scrap-mode-button,.scrap-type-option,.scrap-channel-option { min-height:40px; padding:9px 14px; border:1px solid var(--line); border-radius:10px; background:var(--surface-1); color:var(--text-muted); }
.scrap-mode-button.is-active,.scrap-type-option.is-active { color:var(--on-accent-soft); border-color:var(--accent); background:var(--accent-soft); }
.scrap-form { display:grid; gap:18px; }
.scrap-url-form { grid-template-columns:minmax(0,1fr) auto; align-items:end; }
.scrap-form label { color:var(--text-muted); font-size:12px; font-weight:700; }
.scrap-query-field,.scrap-url-field { flex:1 1 360px; min-width:0; }
.scrap-result-block { margin-top:20px; }
.scrap-status { padding:12px 14px; border:1px solid var(--line); border-radius:10px; color:var(--text-muted); }
.scrap-status.error { color:var(--danger); border-color:var(--danger-line); }
[data-news-progress-host] .scrap-status + .scrap-status { margin-top:8px; }
.scrap-status.warning { color:var(--text-muted); border-color:var(--line); border-left:3px solid #b8860b; }
.scrap-td-date,.scrap-td-media,.scrap-td-views { overflow:hidden; color:var(--text-muted); text-overflow:ellipsis; white-space:nowrap; }
.scrap-table-news-comments td:nth-last-child(-n+2),.scrap-table-youtube-comments td:last-child { text-align:right; }
.scrap-table-comments td:nth-child(3) { line-height:1.55; overflow-wrap:anywhere; white-space:normal; }
.scrap-next-badge,.scrap-flag { display:inline-flex; padding:2px 7px; border-radius:999px; font-size:10px; font-weight:800; }
@media (max-width:768px) {
  .scrap-mode-tabs { flex-wrap:nowrap; overflow-x:auto; }
  .scrap-search-row,.scrap-url-row,.scrap-demo-actions { align-items:stretch; flex-direction:column; }
  .scrap-search-row > *,.scrap-url-row > *,.scrap-demo-actions > * { width:100%; }
  .scrap-url-form { grid-template-columns:1fr; }
}

.scrap-term-field { align-self:start; display:grid; gap:7px; }
.scrap-term-field small,.scrap-result-summary { color:var(--text-muted); font-size:12px; }
.scrap-term-input { display:flex; gap:8px; }
.scrap-term-input input { flex:1; min-width:0; }
.scrap-term-input button { flex:0 0 40px; min-height:40px; padding:6px; font-size:20px; }
.scrap-term-list { display:flex; flex-wrap:wrap; gap:6px; }
.scrap-term-chip { display:inline-flex; align-items:center; gap:6px; max-width:100%; overflow-wrap:anywhere; padding:5px 9px; border-radius:16px; background:var(--accent-soft); color:var(--on-accent-soft); font-size:12px; }
.scrap-term-chip button { border:0; background:transparent; color:inherit; min-width:24px; min-height:24px; cursor:pointer; }
.scrap-term-field [data-term-error]:not(:empty) { color:var(--danger); }

/* Static news-search help: shown only on request. */
.scrap-news-actions { justify-content:flex-end; }
.scrap-news-actions.scrap-demo-actions { flex-direction:row; align-items:center; flex-wrap:wrap; gap:8px; }
.scrap-news-actions.scrap-demo-actions > * { width:auto; }
.scrap-news-help-button { padding:5px 8px; min-height:32px; border:0; background:transparent; color:var(--danger); font-size:12px; font-weight:700; cursor:pointer; white-space:nowrap; }
.scrap-news-help-button:hover { color:var(--danger); text-decoration:underline; }
.scrap-news-help-button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; border-radius:4px; }
@media (pointer:coarse) { .scrap-news-help-button { min-height:44px; } }
.scrap-news-help-box { font-size:13px; line-height:1.7; }
.scrap-news-help-box h3 { margin:0 0 16px; }
.scrap-news-help-box ol { margin:0; padding-left:22px; }
.scrap-news-help-box li + li { margin-top:16px; }
.scrap-news-help-box p { margin:8px 0; }
.scrap-help-queries { display:grid; gap:4px; padding:10px 12px; border-radius:8px; background:var(--surface-1); }
.scrap-news-help-box code { font-family:inherit; overflow-wrap:anywhere; }
.scrap-help-note { color:var(--text-muted); font-size:12px; }

.scrap-news-heading { width:100%; min-width:0; }
.scrap-news-title-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.scrap-news-title-row h2 { margin:0; min-width:0; }
.scrap-news-title-row .scrap-news-help-button { flex-shrink:0; }

/* Actual server task progress, without an estimated percentage. */
.scrap-condition-error { margin:0; color:var(--danger); font-size:12px; }
.scrap-condition-error:empty { display:none; }
.scrap-progress { margin-bottom:12px; }
.scrap-progress-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.scrap-progress-heading strong { display:inline-flex; align-items:center; gap:8px; }
.scrap-progress-heading > span { font-size:12px; }
.scrap-progress p { margin:8px 0 0; font-size:13px; overflow-wrap:anywhere; }
.scrap-progress-spinner { width:14px; height:14px; flex-shrink:0; border:2px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:scrap-search-spin 1s linear infinite; }
@keyframes scrap-search-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .scrap-progress-spinner { animation:none; } }
@media (max-width:480px) { .scrap-progress-heading { align-items:flex-start; flex-direction:column; } }

/* Keep term inputs aligned even when only one label has a limit hint. */
.scrap-term-label { display:flex; align-items:baseline; gap:6px; }
.scrap-term-label small { font-weight:400; }
.scrap-term-field [data-term-error]:empty { display:none; }
@media (max-width:768px) {
  .scrap-search-row > .scrap-query-field { flex-basis:auto; }
}

.scrap-social-filter-row { align-items:flex-end; }
@media (max-width:768px) { .scrap-social-filter-row { align-items:stretch; } }

.scrap-table-social .table-sort-button { white-space:nowrap; }
