:root {
  --bg: #fbfbf9; --text: #1b1d22; --muted: #6c7079; --hair: #e4e5e1;
  --card: #ffffff; --accent: #2457b8; --amber: #9a5b00; --tile: #eef0ec;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: Play, "Segoe UI", system-ui, -apple-system, sans-serif;  /* clock, Spotlight titles, page titles */
  --display-color: var(--text);
  --clock-size: 44px;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121418; --text: #d9dce1; --muted: #8c94a0; --hair: #2b3139;
    --card: #1b1f25; --accent: #8fc2ff; --amber: #ffb454; --tile: #232830; --display-color: #f1f3f6;
  }
}
:root[data-theme="dark"] {
  --bg: #121418; --text: #d9dce1; --muted: #8c94a0; --hair: #2b3139;
  --card: #1b1f25; --accent: #8fc2ff; --amber: #ffb454; --tile: #232830; --display-color: #f1f3f6;
}
/* native controls (selects, checkboxes, scrollbars, dialogs) follow the theme too */
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 400 14px/1.4 var(--sans); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); } .small { font-size: 12px; } .amber { color: var(--amber); }
.h1 { font: 700 28px var(--display); letter-spacing: 0; color: var(--display-color); margin: 0 0 8px; }
.h2 { font: 600 11.5px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 32px 0 10px; }

/* buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 0 18px; border: 1px solid var(--hair); border-radius: 22px; background: var(--card);
  cursor: pointer; font-weight: 500; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn.big { min-height: 52px; padding: 0 28px; font-size: 15px; }
.btn.small-btn { min-height: 44px; padding: 0 14px; border-radius: 8px; font-size: 13px; }
.btn.danger { color: var(--amber); }
.field { width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--hair);
  border-radius: 22px; background: var(--bg); }
.field.slim { border-radius: 8px; width: auto; min-width: 0; }
.field.num { width: 90px; }
.sel { min-height: 44px; padding: 0 10px; border: 1px solid var(--hair); border-radius: 8px; background: var(--bg); }
.linkbtn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 10px 0; min-height: 44px; }
.center-card { max-width: 440px; width: calc(100% - 36px); margin: 16vh auto 0; padding: 32px 28px;
  background: var(--card); border: 1px solid var(--hair); border-radius: 10px; }
.center-card h1 { font: 700 28px var(--display); letter-spacing: 0; color: var(--display-color); margin: 0 0 8px; }
.center-card p { margin: 0 0 20px; color: var(--muted); }
.center-card .btn { width: 100%; }
.page-narrow { max-width: 980px; margin: 0 auto; padding: 32px 18px; }

/* header */
.top { display: flex; align-items: center; gap: 20px; padding: 22px 28px 14px; max-width: 1480px; margin: 0 auto; }
.top-left { display: flex; align-items: baseline; gap: 16px; flex: 1; min-width: 0; }
.clock { font: 700 var(--clock-size)/1 var(--display); letter-spacing: 0; color: var(--display-color); }
.meta { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { display: flex; align-items: center; gap: 8px; width: 300px; height: 40px; padding: 0 14px;
  border: 1px solid var(--hair); border-radius: 20px; background: var(--card); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; height: 100%; color: var(--text); }
.search kbd { font-size: 11px; border: 1px solid var(--hair); border-radius: 4px; padding: 0 5px; }
.top-actions { display: flex; gap: 8px; }
.round { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid var(--hair); background: var(--card); cursor: pointer; color: var(--text); }
.round.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* rows and columns */
.start { max-width: 1480px; margin: 0 auto; padding: 4px 28px 60px; }
.row-wrap { margin-top: 18px; }
.row-title { font: 500 10.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
/* A row is a wrapping flex line. Every column asks for its weight as a share of the free space
   (flex: <w> 1 0) but never less than 320px; when a line cannot hold all its columns at that
   minimum the rest wrap to the next line in order, and each line shares its own width by the
   same weights. Works before any JS runs. */
.row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.fold { border: 0; border-top: 1px solid var(--hair); margin: 36px 0 0; }
.col { flex: var(--w, 1) 1 0; min-width: 320px; }
.col-h { display: flex; align-items: baseline; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--hair);
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.col-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-count { font-size: 11px; letter-spacing: 0; }
.unhealthy { color: var(--amber); font-size: 10.5px; letter-spacing: 0; text-transform: none; }
.col-scroll { max-height: 640px; overflow-y: auto; overscroll-behavior: contain; padding-left: 12px; margin-left: -12px; }
.col-scroll:focus-visible { outline-offset: -2px; }
ul.items { list-style: none; margin: 0; padding: 0; }
.col-foot { padding: 12px 0; color: var(--muted); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; text-align: center; }
.empty-col { padding: 14px 0; margin: 0; list-style: none; }
.sentinel { height: 1px; list-style: none; }

/* new marker and seen divider */
.item { position: relative; }
.item.new::before { content: ""; position: absolute; left: -10px; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.item.tk.new::before { top: 11px; }
.seen-divider { list-style: none; display: flex; align-items: center; margin: 6px 0; border-top: 1px dashed var(--hair); height: 0; justify-content: center; }
.seen-divider span { background: var(--bg); padding: 0 10px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); transform: translateY(0); }

/* thumbnails and tiles */
.thumb { object-fit: cover; background: var(--tile); flex: none; display: block; }
.thumb-40 { width: 40px; height: 40px; border-radius: 5px; }
.thumb-56 { width: 56px; height: 56px; border-radius: 6px; }
.tile { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--tile); overflow: hidden; }
.tile-40 { width: 40px; height: 40px; border-radius: 5px; }
.tile-56 { width: 56px; height: 56px; border-radius: 6px; }
.tile .letter { font: 700 15px var(--display); color: color-mix(in srgb, var(--muted) 55%, var(--text)); }
.tile .fav { position: absolute; width: 20px; height: 20px; left: 50%; top: 50%; margin: -10px 0 0 -10px; background: var(--tile); border-radius: 3px; }
.tile .fav.broken { display: none; }
.tile-56 .fav { width: 24px; height: 24px; margin: -12px 0 0 -12px; }

/* spotlight */
/* cards are at least 260px wide, and never more than five to a line */
.spot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(260px, calc((100% - 48px) / 5)), 1fr)); gap: 12px; padding-top: 12px; }
.card { background: var(--card); border: 1px solid var(--hair); border-radius: 10px; }
.spot { display: flex; gap: 12px; padding: 12px; min-width: 0; }
.spot.new::before { left: 4px; top: 4px; }
.spot-thumb { flex: none; }
.spot-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.src { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-title { font: 700 14.5px/1.3 var(--display); letter-spacing: 0; color: var(--display-color); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spot-title:hover { color: var(--accent); }
.spot-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; }
.mini { min-height: 26px; padding: 0 10px; border: 1px solid var(--hair); border-radius: 6px; background: none; font-size: 11.5px; cursor: pointer; color: var(--muted); }
.mini:hover, .mini.on { color: var(--accent); border-color: var(--accent); }
.spot.kept { border-color: var(--accent); }
.spot.gone { display: none; }
.more-btn { margin-top: 12px; background: none; border: 1px solid var(--hair); border-radius: 8px; min-height: 36px; padding: 0 14px; color: var(--muted); cursor: pointer; }

/* ticker */
.tk { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; font-size: 12.5px; border-bottom: 1px solid var(--hair); }
.tk-time { flex: none; width: 40px; color: var(--muted); font-size: 11.5px; }
.tk-src { flex: none; width: 58px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-title:hover { color: var(--accent); }

/* list */
.ls { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hair); align-items: flex-start; }
.ls-body { min-width: 0; flex: 1; }
.ls-title { font-size: 13px; }
.ls-title:hover { color: var(--accent); }
.tag { font-size: 11.5px; color: var(--accent); margin-left: 4px; }
.tag.change { color: var(--amber); }
.sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

/* stories */
.st { padding: 10px 0; border-bottom: 1px solid var(--hair); }
.st-title { font: 600 13.5px/1.35 var(--sans); }
.st-title:hover { color: var(--accent); }
.st-ex { margin: 3px 0 2px; color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* keyboard focus on items */
.item.cur { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.spot.cur { border-color: var(--accent); }
.col.cur-col .col-h { color: var(--text); }

/* empty state */
.empty { max-width: 560px; margin: 12vh auto 0; text-align: left; padding: 0 4px; }
.empty p { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0 0 24px; }
.empty strong { color: var(--text); font-weight: 600; }

/* health, confirm, settings */
table.health { width: 100%; border-collapse: collapse; margin-top: 16px; }
table.health th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--hair); }
table.health td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.candidate { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; min-height: 44px; border-top: 1px solid var(--hair); cursor: pointer; }
.candidate input { margin-top: 4px; accent-color: var(--accent); }
.candidate > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.cand-title { font-weight: 600; }
.card-block { background: var(--card); border: 1px solid var(--hair); border-radius: 10px; padding: 14px 16px; margin: 10px 0; }
.card-block summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; }
.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.inline form { margin: 0; }
.members { border: 1px solid var(--hair); border-radius: 8px; padding: 8px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.col-edit { border-top: 1px solid var(--hair); margin-top: 10px; padding-top: 6px; }
.col-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 8px 0; }
.col-form label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); }
.new-form { border-top: 1px dashed var(--hair); padding-top: 12px; margin-top: 12px; }

/* under 1000px the search box takes the whole second line of the header */
@media (max-width: 1000px) {
  .top { flex-wrap: wrap; row-gap: 12px; }
  .top-left { order: 1; }
  .top-actions { order: 2; }
  .search { order: 3; flex: 1 1 100%; width: 100%; }
}
@media (max-width: 600px) {
  table.health, table.health tbody, table.health tr, table.health td { display: block; }
  table.health thead { display: none; }
  table.health tr { padding: 10px 0; border-bottom: 1px solid var(--hair); }
  table.health td { border: 0; padding: 2px 0; }
  table.health td:nth-child(n+2):not(:last-child) { display: inline-block; margin-right: 14px; }
}
.tag-only { margin-left: 0; font-size: 13px; font-weight: 500; }

/* phone */
.tabs { display: none; }
@media (max-width: 600px) {
  .top { flex-wrap: wrap; gap: 10px; padding: 16px 18px 8px; }
  .top-left { flex: 1 1 100%; order: 1; }
  .clock { font-size: 22px; }
  .meta { display: block; font-size: 12px; white-space: normal; }
  .search { order: 2; flex: 1; width: auto; min-width: 0; height: 46px; border-radius: 23px; }
  .search input { height: 44px; }
  .search kbd { display: none; }
  .top-actions { order: 3; }
  .round { width: 44px; height: 44px; }
  .start { padding: 0 18px 48px; }
  .row-wrap { margin-top: 0; padding-top: 18px; }
  .row-wrap + .row-wrap { margin-top: 18px; border-top: 1px solid var(--hair); }
  .row-title { margin-bottom: 8px; }
  .row { display: block; }
  .col { min-width: 0; }
  .fold { margin-top: 24px; }
  .fold + .row-wrap { border-top: 0; }

  /* weights are ignored; the non-Spotlight columns of a row become tabs */
  .tabs { display: flex; gap: 18px; overflow-x: auto; border-bottom: 1px solid var(--hair); scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; min-height: 44px; padding: 0 2px; background: none; border: 0; border-bottom: 2px solid transparent;
    margin-bottom: -1px; color: var(--muted); font-weight: 500; font-size: 13px; cursor: pointer; white-space: nowrap; }
  .tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
  .tab-n { font-size: 11px; color: var(--muted); margin-left: 2px; }
  .col:not(.col-spotlight) { display: none; }
  .col:not(.col-spotlight).tab-on { display: block; }
  /* a tabbed column's name is on its tab; its header keeps only the gear (always visible on touch) */
  .col:not(.col-spotlight) > .col-h { justify-content: flex-end; border-bottom: 0; padding: 0; min-height: 0; }
  .col:not(.col-spotlight) > .col-h .col-name, .col:not(.col-spotlight) > .col-h .col-count, .col:not(.col-spotlight) > .col-h .unhealthy { display: none; }
  .col-scroll { max-height: none; overflow: visible; margin-left: 0; padding-left: 0; }
  .item.new::before { left: -11px; }

  /* Spotlight: a horizontal swipe strip of 250px cards */
  .col-spotlight { margin-bottom: 18px; }
  .spot-grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 18px; margin: 0 -18px; padding: 12px 18px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .spot-grid::-webkit-scrollbar { display: none; }
  .spot { flex: 0 0 250px; scroll-snap-align: start; }
  .spot.new::before { left: 6px; top: 6px; }
  .more-btn { min-height: 44px; }

  /* every control at least 44px: Done/Keep buttons, and whole rows are the tap target */
  .mini { min-height: 44px; min-width: 64px; font-size: 13px; position: relative; z-index: 1; }
  .spot-actions { gap: 8px; }
  .tk { min-height: 44px; align-items: center; }
  .ls, .st { min-height: 44px; }
  .tk-title::after, .ls-title::after, .st-title::after, .tag-only::after, .spot-title::after { content: ""; position: absolute; inset: 0; }
  .spot-title::after { inset: 0 0 56px 0; }
  .spot-thumb { position: relative; z-index: 1; }
  .kbd-hint { display: none; }
}

/* keyboard */
.kept-mark { display: none; } .kept .kept-mark { display: inline; }
.kbd-hint { max-width: 1480px; margin: 0 auto; padding: 0 28px 32px; }
kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--hair); border-radius: 4px; padding: 1px 6px; background: var(--card); }
dialog#keys { border: 1px solid var(--hair); border-radius: 10px; background: var(--card); color: var(--text); padding: 24px 28px; max-width: 460px; width: calc(100% - 36px); }
dialog#keys::backdrop { background: rgba(0, 0, 0, .35); }
table.keys { border-collapse: collapse; width: 100%; margin-bottom: 16px; }
table.keys td { padding: 6px 0; border-bottom: 1px solid var(--hair); font-size: 13px; }
table.keys td:first-child { width: 42%; white-space: nowrap; }
@media (max-width: 600px) { .kbd-hint { display: none; } }

.rule { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.rule .rule-text { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.preview { flex: 1 1 100%; min-height: 18px; }
code.mono { background: var(--tile); padding: 1px 6px; border-radius: 4px; font-size: 12.5px; }

/* search */
.search.wide { width: 100%; max-width: 560px; height: 46px; margin-bottom: 4px; }
.search-page .items { margin-top: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--hair);
  border-radius: 18px; background: var(--card); font-size: 12.5px; }
.chip.on { border-color: var(--accent); color: var(--accent); }
.chip-sep { width: 1px; height: 20px; background: var(--hair); }
.result-count { margin: 14px 0 8px; font-size: 13px; }
.hist { margin: 4px 0 8px; }
.hist-bars { display: flex; align-items: flex-end; gap: 2px; height: 72px; border-bottom: 1px solid var(--hair); }
.hist .bar { flex: 1; min-width: 0; background: color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 2px 2px 0 0; display: block; }
.hist a.bar:hover { background: var(--accent); }
.hist .bar.on { background: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
.hist .bar.zero { height: 2px; background: var(--hair); border-radius: 0; }
.hist-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); padding-top: 4px; }
@media (max-width: 600px) {
  .hist-bars { height: 64px; }
  .hist a.bar { min-height: 8px; }
  .chip { min-height: 44px; }
  .results .ls { min-height: 44px; }
}
.col-form .check { flex-direction: row; align-items: center; color: var(--text); font-size: 13px; }

.field-label { display: block; margin: 14px 0 4px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sel.wide { width: 100%; }
.new-group { display: flex; gap: 8px; margin-top: 8px; }
.new-group[hidden] { display: none; }

/* ===== settings: tabs, miniature layout editor, groups, feeds ===== */
.settings-back { margin: 0 0 4px; }
.tabs-nav { display: flex; gap: 22px; border-bottom: 1px solid var(--hair); margin: 10px 0 18px; }
.tabs-nav a { padding: 12px 2px; min-height: 44px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font-weight: 500; }
.tabs-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--card); color: var(--amber); border: 1px solid var(--amber);
  border-radius: 10px; padding: 10px 16px; max-width: calc(100% - 36px); z-index: 60; margin: 0; }
.toast[hidden] { display: none; }
.saved { color: var(--accent); font-size: 12px; font-family: var(--mono); min-width: 5.5em; }
.tiny { min-height: 28px; min-width: 28px; padding: 0 8px; border: 1px solid var(--hair); border-radius: 6px; background: var(--card); color: var(--muted); cursor: pointer; font-size: 12px; }
.tiny:hover { color: var(--text); border-color: var(--muted); }
.tiny.danger:hover { color: var(--amber); border-color: var(--amber); }
.grip { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; color: var(--muted); cursor: grab; touch-action: none; flex: none; border-radius: 6px; }
.grip:hover { color: var(--text); background: var(--tile); }
.grip:active { cursor: grabbing; }
.nudge { display: inline-flex; gap: 4px; margin-left: auto; opacity: .55; }
.nudge .tiny { min-height: 24px; min-width: 24px; padding: 0 5px; }
.lcol:hover .nudge, .lrow-head:hover .nudge, .nudge:focus-within { opacity: 1; }

.lay { display: flex; flex-direction: column; gap: 12px; }
.lrow { border: 1px solid var(--hair); border-radius: 10px; background: var(--card); padding: 8px 10px 10px; }
.lrow.add, .lcol.add { border: 1.5px dashed var(--hair); background: transparent; color: var(--muted); cursor: pointer; font: inherit; }
.lrow.add { min-height: 44px; border-radius: 10px; }
.lrow.add:hover, .lcol.add:hover { color: var(--accent); border-color: var(--accent); }
.lrow-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.row-title { flex: 1; min-width: 0; min-height: 32px; border: 1px solid transparent; border-radius: 6px; background: transparent; padding: 0 8px; font: 500 10.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.row-title:hover, .row-title:focus { border-color: var(--hair); background: var(--bg); color: var(--text); }
.lcols { display: flex; gap: 10px; align-items: stretch; }
.lcol { min-width: 0; min-height: 76px; display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--hair); border-radius: 8px; background: var(--bg); cursor: pointer; }
.lcol:hover { border-color: var(--muted); }
.lcol.open { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.lcol.add { flex: 0 0 110px; justify-content: center; min-height: 76px; }
.lcol-icon { color: var(--accent); flex: none; }
.lcol-text { display: flex; flex-direction: column; min-width: 0; }
.lcol-header { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcol-group { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph { border: 1.5px dashed var(--accent); border-radius: 8px; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.lrow-ph { min-height: 44px; }
.dragging { opacity: .92; box-shadow: 0 0 0 1px var(--accent); background: var(--card); }
.fold-rule { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; min-height: 32px; }
.fold-line { flex: 1; border-top: 1.5px dashed var(--muted); }
.lpanel { margin-top: 10px; padding: 12px; border: 1px solid var(--accent); border-radius: 8px; background: var(--bg); }
.lpanel[hidden] { display: none; }
.lp-grid { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end; }
.lp-f { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); }
.lp-end { flex-direction: row; align-items: center; gap: 10px; margin-left: auto; }
.lp-error { color: var(--amber); margin: 10px 0 0; }
.seg { display: inline-flex; border: 1px solid var(--hair); border-radius: 8px; overflow: hidden; background: var(--card); }
.seg-b { min-height: 38px; min-width: 38px; padding: 0 10px; border: 0; border-right: 1px solid var(--hair); background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
.seg-b:last-child { border-right: 0; }
.seg-b:hover { color: var(--text); }
.seg-b[aria-pressed="true"] { background: var(--accent); color: var(--bg); }
.vicon { display: block; }

.gcards { display: flex; flex-direction: column; gap: 12px; }
.gcard { border: 1px solid var(--hair); border-radius: 10px; background: var(--card); padding: 12px 14px; }
.gcard.new { border-style: dashed; background: transparent; }
.gcard-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.g-name { flex: 1 1 180px; min-width: 0; min-height: 36px; border: 1px solid transparent; border-radius: 6px; background: transparent; padding: 0 8px; font: 600 15px var(--sans); }
.g-name:hover, .g-name:focus { border-color: var(--hair); background: var(--bg); }
.gfeeds { list-style: none; margin: 8px 0; padding: 0; }
.gfeeds li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--hair); min-height: 40px; }
.gf-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gf-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gadd { margin-top: 6px; }
.tile-24 { width: 24px; height: 24px; border-radius: 5px; } .tile-24 .letter { font-size: 12px; } .tile-24 .fav { width: 14px; height: 14px; margin: -7px 0 0 -7px; }
.tile-32 { width: 32px; height: 32px; border-radius: 6px; } .tile-32 .fav { width: 18px; height: 18px; margin: -9px 0 0 -9px; }

.feeds-bar { display: flex; gap: 10px; margin-bottom: 8px; }
.feedlist { list-style: none; margin: 0; padding: 0; }
.feedrow { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--hair); }
.feedrow[hidden] { display: none; }
.fr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fr-name { min-height: 32px; border: 1px solid transparent; border-radius: 6px; background: transparent; padding: 0 8px; margin-left: -8px; font: 600 14px var(--sans); }
.fr-name:hover, .fr-name:focus { border-color: var(--hair); background: var(--bg); }
.fr-name.flash { border-color: var(--accent); }
.fr-site { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-groups { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.fr-groups .chip { min-height: 24px; padding: 0 9px; font-size: 11.5px; }
.fr-side { display: flex; align-items: center; gap: 12px; }
.small-link { color: var(--accent); font-size: 13px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.ok { background: #2f9e5f; } .dot.warn { background: var(--amber); } .dot.bad { background: #c0392b; }
.account { margin-top: 28px; }

/* gear on start page column headers */
.gear { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; color: var(--muted); opacity: 0; transition: opacity .12s; border-radius: 6px; }
.col-h:hover .gear, .gear:focus-visible { opacity: 1; }
.gear:hover { color: var(--accent); }
@media (hover: none) { .gear { opacity: 1; } }

@media (max-width: 600px) {
  .lcols { flex-direction: column; }
  .lcol { flex: none !important; }
  .lcol.add { flex: none; min-height: 52px; }
  .lcol { min-height: 64px; }
  .nudge { opacity: 1; }
  .tiny { min-height: 36px; min-width: 36px; }
  .grip { width: 36px; height: 36px; }
  .feedrow { flex-wrap: wrap; }
  .fr-side { width: 100%; justify-content: flex-end; }
  .lp-end { margin-left: 0; width: 100%; }
}

/* the gear is a 44px touch target on a phone (kept last so it wins over the base .gear rule) */
@media (max-width: 600px) { .gear { width: 44px; height: 44px; margin: -10px 0; opacity: 1; } }

.cap-note { margin: 0 0 8px; padding: 8px 12px; border: 1px solid var(--amber); border-radius: 8px; color: var(--amber); font-size: 13px; }

.app-footer { max-width: 1480px; margin: 0 auto; padding: 0 28px 28px; color: var(--muted); opacity: .8; }
@media (max-width: 600px) { .app-footer { padding: 0 18px 28px; } }

/* ===== installable app: safe areas (notches, home bar), update toast, pull to refresh ===== */
.top { padding-top: max(22px, env(safe-area-inset-top)); padding-left: max(28px, env(safe-area-inset-left)); padding-right: max(28px, env(safe-area-inset-right)); }
.start { padding-left: max(28px, env(safe-area-inset-left)); padding-right: max(28px, env(safe-area-inset-right)); }
.app-footer { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
@media (max-width: 600px) {
  .top { padding-top: max(16px, env(safe-area-inset-top)); padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
  .start { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
  .app-footer { padding-left: max(18px, env(safe-area-inset-left)); }
}
@media (pointer: coarse) { html { overscroll-behavior-y: contain; } }
.update-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 70;
  display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; background: var(--card); color: var(--text);
  border: 1px solid var(--accent); border-radius: 12px; font-size: 13px; max-width: calc(100% - 36px); }
.update-toast .mini { min-height: 36px; min-width: 44px; }
.ptr { position: fixed; top: max(0px, env(safe-area-inset-top)); left: 50%; z-index: 65; width: 36px; height: 36px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--hair); color: var(--muted); display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translate(-50%, -36px); transition: opacity .12s; }
.ptr.show { opacity: 1; }
.ptr.ready { color: var(--accent); border-color: var(--accent); }
.ptr.ready svg { transform: rotate(180deg); }

.env-badge { align-self: center; margin-left: -6px; padding: 1px 7px; border: 1px solid var(--hair); border-radius: 999px; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: lowercase; }
