:root {
  color-scheme: light;
  --bg: #f4f5f8;
  --surface: #fff;
  --surface-soft: #f8f8fb;
  --surface-raised: #fff;
  --text: #181922;
  --muted: #717584;
  --faint: #9da2af;
  --line: #e2e4ea;
  --line-strong: #d1d4de;
  --accent: #7164e8;
  --accent-hover: #6255d6;
  --accent-soft: #eeecff;
  --danger: #c94d58;
  --success: #3ca876;
  --shadow: 0 18px 48px rgba(24, 25, 34, .1);
  --site-icon-size: 52px;
  --site-title-size: 12px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1015;
  --surface: #141820;
  --surface-soft: #191e27;
  --surface-raised: #1c212b;
  --text: #f3f4f7;
  --muted: #a4a9b5;
  --faint: #747b89;
  --line: #2a303a;
  --line-strong: #3a424f;
  --accent: #8a7cf2;
  --accent-hover: #9b8ff8;
  --accent-soft: #27233f;
  --danger: #ff7a84;
  --success: #54c58f;
  --shadow: 0 24px 64px rgba(0, 0, 0, .38);
}
* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; height: 100%; margin: 0; }
body { overflow: hidden; color: var(--text); background: var(--bg); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
button, a, [draggable="true"] { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.newtab-dock-search-host { position: fixed; z-index: 1000; inset: 0; display: block; }

.site-space { display: grid; grid-template-rows: 72px minmax(0, 1fr); height: 100%; }
.topbar {
  display: grid; grid-template-columns: minmax(170px, .55fr) minmax(260px, 610px) minmax(440px, .95fr);
  align-items: center; gap: 22px; padding: 0 clamp(20px, 3vw, 52px);
  border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; color: inherit; text-decoration: none; }
.brand > span:last-child { display: grid; gap: 1px; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand small { color: var(--muted); font-size: 11px; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 4px); align-items: end; gap: 3px; width: 36px; height: 36px; padding: 9px; border-radius: 10px; color: #fff; background: var(--accent); box-shadow: 0 7px 18px color-mix(in srgb, var(--accent) 25%, transparent); }
.brand-mark i { display: block; border-radius: 3px; background: currentColor; }
.brand-mark i:nth-child(1) { height: 10px; opacity: .72; }
.brand-mark i:nth-child(2) { height: 18px; }
.brand-mark i:nth-child(3) { height: 13px; opacity: .86; }

.search-shell, .dialog-search { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); transition: border-color .18s ease, box-shadow .18s ease; }
.search-shell:focus-within, .dialog-search:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent); }
.search-shell input, .dialog-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; }
.search-shell input::placeholder, .dialog-search input::placeholder { color: var(--faint); }
.search-shell kbd { padding: 2px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--faint); background: var(--surface-soft); font: 10px/1.6 var(--font); }
.search-icon { position: relative; width: 16px; height: 16px; flex: 0 0 auto; border: 1.8px solid var(--muted); border-radius: 50%; opacity: .8; }
.search-icon::after { position: absolute; right: -4px; bottom: -2px; width: 6px; height: 2px; border-radius: 2px; background: var(--muted); content: ""; transform: rotate(45deg); transform-origin: left center; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.icon-button, .quiet-button, .primary-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px;
  border: 1px solid transparent; border-radius: 9px; cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.icon-button:active, .quiet-button:active, .primary-button:active { transform: scale(.97); }
.icon-button { width: 36px; padding: 0; color: var(--muted); background: transparent; }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover { color: var(--text); background: var(--surface); }
.quiet-button { padding: 0 12px; border-color: var(--line); color: var(--text); background: var(--surface); }
.quiet-button:hover { border-color: var(--line-strong); background: var(--surface-raised); }
.primary-button { padding: 0 14px; color: #fff; background: var(--accent); box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 16%, transparent); }
.primary-button:hover { background: var(--accent-hover); }

.main-content {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr); min-height: 0;
  max-width: 1880px; width: 100%; margin: 0 auto; padding: clamp(22px, 3vh, 38px) clamp(20px, 3vw, 52px) 42px; gap: 18px;
}
.sites-pane, .tasks-pane { min-width: 0; min-height: 0; }
.sites-pane { overflow: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.tasks-pane { display: flex; flex-direction: column; overflow: hidden; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.pane-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 2px 16px; }
.pane-heading h1, .pane-heading h2 { margin: 0; font-size: 20px; line-height: 1.15; letter-spacing: -.025em; }
.task-heading { align-items: center; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 4px; color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.sync-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.sync-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 12%, transparent); }
.sites-heading-tools { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.display-controls { display: flex; align-items: center; gap: 10px; }
.display-controls label { display: grid; grid-template-columns: auto 78px; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.display-controls input[type="range"] { width: 78px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }

.category-board { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 12px; }
.category-card { position: relative; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); transition: border-color .18s ease, box-shadow .18s ease, opacity .18s ease, transform .18s cubic-bezier(.16,1,.3,1); will-change: transform; }
.category-card.is-drag-over { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 9%, transparent); }
.category-card.is-drag-over[data-drop-side="before"]::before, .category-card.is-drag-over[data-drop-side="after"]::after { position: absolute; z-index: 5; top: -7px; bottom: -7px; width: 3px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); content: ""; pointer-events: none; }
.category-card.is-drag-over[data-drop-side="before"]::before { left: -7px; }
.category-card.is-drag-over[data-drop-side="after"]::after { right: -7px; }
.category-card.is-dragging { opacity: .42; transform: scale(.985) rotate(-.25deg); box-shadow: 0 16px 38px rgba(20,22,30,.16); }
.drag-placeholder { position: relative; z-index: 1; min-width: 0; border: 1px dashed color-mix(in srgb, var(--accent) 65%, var(--line)); border-radius: 11px; background: color-mix(in srgb, var(--accent-soft) 62%, transparent); pointer-events: auto; animation: placeholder-in .16s cubic-bezier(.16,1,.3,1); }
.drag-placeholder.is-category { min-height: 128px; }
.drag-placeholder.is-site, .drag-placeholder.is-task-page { min-height: calc(var(--site-icon-size) + var(--site-title-size) + 24px); }
@keyframes placeholder-in { from { opacity: .25; transform: scale(.92); } to { opacity: 1; transform: none; } }
.category-header { position: relative; display: flex; align-items: center; min-height: 32px; margin-bottom: 8px; cursor: grab; }
.category-header:active { cursor: grabbing; }
.category-title-button { min-width: 0; padding: 4px 6px; border: 0; border-radius: 7px; color: inherit; background: transparent; text-align: left; cursor: text; }
.category-title-button h2 { margin: 0; overflow: hidden; font-size: 13px; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.category-title-button::after { position: absolute; left: 6px; top: 29px; z-index: 3; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: var(--surface-raised); box-shadow: 0 4px 12px rgba(20,22,30,.08); content: attr(data-edit-hint); font-size: 9px; opacity: 0; pointer-events: none; transform: translateY(-2px); transition: opacity .15s ease, transform .15s ease; white-space: nowrap; }
.category-title-button:hover::after, .category-title-button:focus-visible::after { opacity: 1; transform: none; }
.category-count { margin-left: 5px; color: var(--faint); font-size: 10px; }
.category-actions { display: flex; align-items: center; gap: 1px; margin-left: auto; opacity: 0; transition: opacity .15s ease; }
.category-actions { pointer-events: none; }
.category-card:hover .category-actions, .category-card:focus-within .category-actions { opacity: 1; pointer-events: auto; }
.category-actions button, .site-action { display: grid; place-items: center; width: 27px; height: 27px; padding: 0; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; }
.category-actions button:hover, .site-action:hover { color: var(--text); background: var(--surface-soft); }
.category-actions .danger:hover, .site-action.danger:hover { color: var(--danger); }
.site-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(max(68px, calc(var(--site-icon-size) + 26px)), 1fr)); align-content: start; gap: 5px; min-height: calc(var(--site-icon-size) + var(--site-title-size) + 22px); }
.site-item { position: relative; display: flex; min-width: 0; min-height: calc(var(--site-icon-size) + var(--site-title-size) + 24px); flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 7px 3px 6px; border: 1px solid transparent; border-radius: 11px; color: inherit; background: transparent; text-align: center; cursor: grab; transition: transform .2s cubic-bezier(.16,1,.3,1), border-color .17s ease, background .17s ease, opacity .17s ease; will-change: transform; }
.site-item:hover { border-color: var(--line); background: var(--surface-soft); transform: translateY(-2px); }
.site-item.is-dragging { z-index: 4; opacity: .38; transform: translateY(-3px) scale(.92) rotate(-1deg); box-shadow: 0 14px 28px rgba(20,22,30,.16); }
.site-item.is-drop-target { border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); background: var(--accent-soft); }
.site-item.is-drop-target[data-drop-side="before"]::before, .site-item.is-drop-target[data-drop-side="after"]::after { position: absolute; z-index: 5; top: 8px; bottom: 8px; width: 3px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); content: ""; pointer-events: none; }
.site-item.is-drop-target[data-drop-side="before"]::before { left: -3px; }
.site-item.is-drop-target[data-drop-side="after"]::after { right: -3px; }
.site-item .site-title { width: 100%; overflow: hidden; color: var(--muted); font-size: var(--site-title-size); line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.site-icon { display: grid; place-items: center; width: var(--site-icon-size); height: var(--site-icon-size); overflow: hidden; border: 1px solid color-mix(in srgb, var(--line) 82%, transparent); border-radius: calc(var(--site-icon-size) * .25); color: #fff; background: var(--surface-raised); box-shadow: none; font-size: calc(var(--site-icon-size) * .4); font-weight: 760; }
.site-icon img { width: 100%; height: 100%; padding: 7px; object-fit: contain; }
.site-actions { position: absolute; z-index: 2; left: 50%; top: 50%; display: flex; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; opacity: 0; background: color-mix(in srgb, var(--surface-raised) 94%, transparent); pointer-events: none; transform: translate(-50%, calc(-50% + 3px)); transition: opacity .15s ease, transform .15s ease; }
.site-item:hover .site-actions { opacity: 1; transform: translate(-50%, -50%); animation: site-actions-enable 1ms .16s forwards; }
.site-item:focus-within .site-actions { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
@keyframes site-actions-enable { to { pointer-events: auto; } }
.site-actions .site-action { width: 26px; height: 26px; border: 0; background: transparent; }
.site-action svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.site-action.is-fixed { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--accent); background: var(--accent-soft); }
.empty-category { grid-column: 1 / -1; display: none; align-items: center; justify-content: center; min-height: 74px; border: 1px dashed var(--line); border-radius: 10px; color: var(--faint); font-size: 11px; }
.site-grid:empty + .empty-category { display: flex; }

.task-list { min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.task-card { position: relative; margin-bottom: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.task-card::before { position: absolute; inset: 9px auto 9px 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--task-color, var(--accent)); content: ""; }
.task-card-header { display: grid; grid-template-columns:minmax(0,1fr) auto auto; align-items: center; gap: 6px; }
.task-title { min-width: 0; display:grid; gap:2px; margin: 0; padding:3px 4px; overflow: hidden; border:0; border-radius:6px; color:inherit; background:transparent; text-align:left; cursor:pointer; }
.task-title strong { overflow:hidden; font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.task-title small { color:var(--faint); font-size:8px; }
.task-title:hover, .task-title:focus-visible { outline:0; background:var(--surface); }
.task-domain, .task-status { min-width: 0; min-height: 24px; padding: 0 20px 0 7px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface); cursor:pointer; font-size: 9px; }
.task-card.is-done { opacity:.78; }
.task-card.is-done::before { background:var(--faint); }
.task-card.is-task-drop-target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); }
.task-page-list { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 6px; margin-top: 10px; }
.task-page-list .drag-placeholder.is-task-page { min-height: 68px; }
.task-page-card { position: relative; display: flex; min-width: 0; min-height: 68px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); transition: border-color .15s ease, background .15s ease, opacity .15s ease, transform .18s cubic-bezier(.16,1,.3,1); }
.task-page-card:hover { border-color: var(--line-strong); background: var(--surface-raised); }
.task-page-card.is-dragging { opacity: .38; }
.task-page-card.is-page-drop-before::before, .task-page-card.is-page-drop-after::after { position: absolute; z-index: 3; left: 7px; right: 7px; height: 3px; border-radius: 3px; background: var(--accent); content: ""; }
.task-page-card.is-page-drop-before::before { top: -5px; }
.task-page-card.is-page-drop-after::after { bottom: -5px; }
.task-page-main { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; padding: 9px 70px 9px 10px; border: 0; color: inherit; background: transparent; text-align: left; cursor: grab; }
.task-page-main .site-icon { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 9px; font-size: 13px; }
.task-page-copy { display: grid; min-width: 0; gap: 2px; }
.task-page-copy strong, .task-page-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-page-copy strong { font-size: 11px; line-height: 1.25; }
.task-page-copy small { color: var(--muted); font-size: 9px; line-height: 1.2; }
.task-page-semantics { display: flex; min-width: 0; align-items: center; gap: 4px; overflow: hidden; }
.task-page-semantics > span { min-width: 0; padding: 1px 5px; overflow: hidden; border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: 8px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.task-page-semantics .task-page-open-state { position: absolute; right: 8px; bottom: 7px; width: 6px; height: 6px; min-width: 6px; padding: 0; overflow: hidden; border-radius: 50%; color: transparent; background: var(--faint); font-size: 0; }
.task-page-semantics .task-page-open-state::before { display: none; }
.task-page-semantics .task-page-open-state.is-open { color: transparent; background: var(--success); }
.task-page-semantics .task-page-source.is-smart { color: var(--accent); background: var(--accent-soft); }
.task-page-semantics .task-page-primary { color: var(--task-color, var(--accent)); }
.task-page-actions { position: absolute; right: 5px; top: 50%; display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; opacity: 0; background: var(--surface-raised); pointer-events: none; transform: translateY(-50%); transition: opacity .15s ease; }
.task-page-card:hover .task-page-actions, .task-page-card:focus-within .task-page-actions { opacity: 1; }
.task-page-card:hover .task-page-actions, .task-page-card:focus-within .task-page-actions { pointer-events: auto; }
.task-page-actions .site-action { width: 27px; height: 27px; }
.task-drop-hint { display: grid; place-items: center; min-height: 48px; border: 1px dashed var(--line); border-radius: 9px; color: var(--faint); font-size: 10px; }
.task-actions { display: flex; align-items:center; gap: 4px; margin-top: 10px; opacity: 1; }
.task-actions button { min-height: 29px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface); cursor: pointer; font-size: 10px; }
.task-actions button:hover { color: var(--text); border-color: var(--line-strong); }
.task-actions button:disabled { opacity:.45; cursor:not-allowed; }
.task-more-wrap { position:relative; display:inline-flex; }
.task-more-menu { position:absolute; z-index:20; right:0; bottom:calc(100% + 5px); min-width:112px; padding:4px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface-raised); box-shadow:0 12px 28px rgba(20,22,30,.16); }
.task-more-menu[hidden] { display:none; }
.task-more-menu button { width:100%; border:0; text-align:left; }
.task-more-menu button.is-danger { color:var(--danger); }
.task-empty, .empty-state { display: grid; place-items: center; align-content: center; min-height: 220px; color: var(--muted); text-align: center; }
.task-empty p { margin: 0 0 12px; }
.empty-mark { display: grid; place-items: center; width: 48px; height: 48px; border: 1px dashed var(--accent); border-radius: 14px; color: var(--accent); background: var(--accent-soft); font-size: 22px; }
.empty-state h2 { margin: 15px 0 4px; font-size: 17px; color: var(--text); }
.empty-state p { margin: 0 0 16px; }

.dialog-card { width: min(570px, calc(100vw - 34px)); max-height: min(86vh, 760px); padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.dialog-card::backdrop { background: color-mix(in srgb, var(--bg) 68%, transparent); backdrop-filter: blur(7px); }
.dialog-card form { margin: 0; }
.dialog-card > form > header, .dialog-card > form > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 20px; }
.dialog-card > form > header { border-bottom: 1px solid var(--line); }
.dialog-card > form > footer { justify-content: flex-end; border-top: 1px solid var(--line); }
.dialog-card h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.dialog-card header .eyebrow { margin-bottom: 2px; }
.dialog-description { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.form-grid { display: grid; gap: 15px; max-height: min(50vh, 470px); padding: 19px 20px; overflow: auto; }
.dialog-card label:not(.site-editor-field) { display: grid; gap: 7px; padding: 0 20px; }
.dialog-card label > span, .dialog-card legend { color: var(--muted); font-size: 11px; font-weight: 650; }
.dialog-card input:not([type="radio"]), .dialog-card select { width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; outline: 0; color: var(--text); background: var(--surface-soft); }
.dialog-card input:focus, .dialog-card select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); }
.dialog-card .dialog-search input { min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.dialog-card fieldset { padding: 0; border: 0; }
.dialog-card legend { margin-bottom: 7px; }
.dialog-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 12px 20px 0; }
.dialog-tabs button { min-height: 35px; padding: 0 7px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface-soft); cursor: pointer; font-size: 11px; }
.dialog-tabs button[aria-selected="true"] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent); background: var(--accent-soft); }
.catalog-panel { min-height: 320px; }
.catalog-panel .dialog-search { margin: 15px 20px 10px; }
.pick-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: min(46vh, 400px); padding: 0 20px 18px; overflow: auto; }
.pick-site { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 51px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; color: inherit; background: var(--surface-soft); text-align: left; cursor: pointer; }
.pick-site:hover { border-color: var(--line-strong); background: var(--surface); }
.pick-site.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.pick-site .site-icon { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 8px; }
.pick-site-copy { min-width: 0; flex: 1; }
.pick-site-copy strong, .pick-site-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-site-copy strong { font-size: 11px; }
.pick-site-copy small { color: var(--muted); font-size: 9px; }
.bookmark-state { padding: 54px 20px; color: var(--muted); text-align: center; }
.bookmark-permission { display: block; margin: -42px auto 20px; }
.bookmark-permission[hidden] { display: none; }
.form-error { margin: -4px 20px 13px; color: var(--danger); font-size: 11px; }
.dialog-compact { width: min(420px, calc(100vw - 34px)); }
.dialog-compact form > label { margin: 20px 0; }
.site-editor-field { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 650; }
.site-editor-control { width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; outline: 0; color: var(--text); background: var(--surface-soft); }
.site-editor-icon-picker { margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.site-editor-icon-tabs, .dock-add-icon-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.site-editor-icon-tabs button, .dock-add-icon-tabs button { min-height: 34px; padding: 0 7px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); cursor: pointer; font-size: 11px; }
.site-editor-icon-tabs button[aria-pressed="true"], .dock-add-icon-tabs button[aria-pressed="true"], .site-editor-icon-tabs button.active, .dock-add-icon-tabs button.active { border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); color: var(--accent); background: var(--accent-soft); }
.dock-add-text-icon-field, .site-editor-text-field { margin-top: 10px; }
.dock-add-text-icon-field label, .site-editor-text-field label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.dock-add-text-colors.color-picker, .color-picker { display: grid; grid-template-columns: repeat(10, 23px); gap: 7px; margin-top: 10px; }
.dock-add-text-color, .color-swatch { width: 23px; height: 23px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--dock-add-text-color, currentColor); box-shadow: inset 0 0 0 1px rgba(255,255,255,.24); cursor: pointer; }
.dock-add-text-color[aria-pressed="true"], .dock-add-text-color.active, .color-swatch.is-selected, .color-swatch.active { border-color: var(--text); outline: 2px solid var(--surface); }

.load-error { position: fixed; z-index: 999999; inset: 0; display: grid; place-content: center; gap: 12px; color: var(--text); background: var(--bg); text-align: center; }
.load-error button { justify-self: center; min-height: 36px; padding: 0 13px; border: 0; border-radius: 9px; color: #fff; background: var(--accent); cursor: pointer; }
.toast { position: fixed; z-index: 1000000; left: 50%; bottom: 24px; max-width: min(450px, calc(100vw - 30px)); padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface-raised); box-shadow: var(--shadow); transform: translateX(-50%); }

@media (max-width: 1180px) {
  .topbar { grid-template-columns: 170px minmax(250px, 1fr) auto; gap: 14px; }
  .top-actions .workspace-button span:last-child, .top-actions .quiet-button span:last-child { display: none; }
  .top-actions .workspace-button, .top-actions > .quiet-button { width: 36px; padding: 0; }
  .main-content { grid-template-columns: minmax(0, 1.7fr) minmax(270px, 1fr); }
  .display-controls label { grid-template-columns: auto 58px; }
  .display-controls input[type="range"] { width: 58px; }
}
@media (max-width: 860px) {
  body { overflow: auto; }
  .site-space { height: auto; min-height: 100%; grid-template-rows: auto 1fr; }
  .topbar { position: sticky; z-index: 10; top: 0; grid-template-columns: 1fr auto; padding: 12px 16px; }
  .search-shell { grid-column: 1 / -1; grid-row: 2; }
  .main-content { display: block; padding: 22px 16px 38px; }
  .sites-pane { overflow: visible; }
  .tasks-pane { min-height: 300px; margin-top: 16px; overflow: visible; }
  .task-list { overflow: visible; }
}
@media (max-width: 620px) {
  .brand small { display: none; }
  .category-board { grid-template-columns: 1fr; }
  .sites-heading-tools { align-items: flex-end; flex-direction: column-reverse; gap: 7px; }
  .pick-list { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .display-controls { display: none; }
  .dialog-tabs button { font-size: 10px; }
}
@media (hover: none) {
  .category-actions, .task-actions { opacity: 1; pointer-events: auto; }
  .site-actions { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
