/* Nagi — Overview Canvas
   Design language: mainstream / Apple SwiftUI-flavored.
   System fonts, frosted glass, rounded cards, soft depth, spring motion,
   native light/dark. No studio-specific aesthetic — globally legible. */

:root {
  --accent: #007aff;            /* iOS system blue */
  --bg: #f2f2f7;                /* iOS grouped background */
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --text: #1c1c1e;
  --text-2: #6e6e73;
  --hair: rgba(60, 60, 67, 0.12);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --radius: 14px;
  --radius-sm: 10px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #0a84ff;
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --text: #f5f5f7;
    --text-2: #98989d;
    --hair: rgba(120, 120, 128, 0.24);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { overflow-x: clip; max-width: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
    "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
}

/* ── Header (frosted, sticky) ─────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.25rem;
  padding: 0.85rem 1.5rem;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hair);
}
.brand { display: flex; align-items: center; gap: 0.5rem; }
.brand__mark { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 1.15rem; font-weight: 700; letter-spacing: 0.02em; }
.brand__logo { height: 17px; width: auto; display: block; }
.brand__tag { font-size: 0.72rem; color: var(--text-2); }

.search {
  flex: 1; max-width: 520px;
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: 980px; padding: 0.45rem 0.9rem;
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.search__icon { color: var(--text-2); font-size: 0.9rem; }
.search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  color: var(--text); font-size: 0.92rem; font-family: inherit;
}
.search kbd {
  font: 0.66rem/1 ui-monospace, monospace; color: var(--text-2);
  border: 1px solid var(--hair); border-radius: 5px; padding: 0.15rem 0.35rem;
}

.controls { display: flex; gap: 0.35rem; }
.iconbtn {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--hair);
  color: var(--text-2); font-size: 0.95rem; line-height: 1;
  transition: color .15s, background .15s, border-color .15s, transform .15s var(--spring);
}
.iconbtn:hover { color: var(--text); transform: translateY(-1px); }
.iconbtn.is-on { color: #fff; background: var(--accent); border-color: var(--accent); }
.iconbtn--text {
  width: auto; padding: 0 0.7rem; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.01em; gap: 0.3rem; color: var(--accent);
}
.iconbtn--text:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }

.stats { display: flex; gap: 1.1rem; }
.stat { text-align: right; }
.stat b { display: block; font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; }
.stat span { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); }
.stat--stale b { color: var(--accent); }
.hidden { display: none !important; }

/* ── Window block ─────────────────────────────────────────────── */
main { padding: 1.5rem; display: flex; flex-direction: column; gap: 2rem; }
.winblock { display: flex; flex-direction: column; gap: 0.75rem; }
.winblock__head { display: flex; align-items: baseline; gap: 0.6rem; padding: 0 0.25rem; }
.winblock__name { font-size: 0.95rem; font-weight: 650; letter-spacing: -0.01em; }
.winblock--focused .winblock__name::after {
  content: "●"; color: var(--accent); font-size: 0.5rem;
  vertical-align: middle; margin-left: 0.5rem;
}
.winblock__count { font-size: 0.72rem; color: var(--text-2); }
.winblock__pull {
  margin-left: auto; cursor: pointer;
  font-family: inherit; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.01em;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 980px; padding: 0.3rem 0.75rem;
  transition: background .15s, transform .15s var(--spring);
}
.winblock__pull:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); transform: translateY(-1px); }

/* ── Island (= a Chrome tab group, or the ungrouped bucket) ────── */
.island {
  --island-color: var(--hair);
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: visible;
  transition: border-color .15s, box-shadow .15s;
}
.island--grouped { border-left: 3px solid var(--island-color); }
.island__head {
  position: relative;
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--hair);
  background: var(--surface-2);
  border-radius: var(--radius) var(--radius) 0 0;
}
.island__handle {
  cursor: grab; flex: none; color: var(--text-2); opacity: 0;
  font-size: 0.85rem; line-height: 1; padding: 0 0.1rem; user-select: none;
  transition: opacity .15s, color .15s;
}
.island__head:hover .island__handle { opacity: 0.6; }
.island__handle:hover { opacity: 1; color: var(--text); }
.island__handle:active { cursor: grabbing; }
.island__chev {
  border: 0; background: none; cursor: pointer; flex: none;
  color: var(--text-2); font-size: 0.95rem; line-height: 1; padding: 0 0.1rem;
  transition: transform .2s var(--spring), color .15s;
}
.island__chev:hover { color: var(--text); }
.island.collapsed .island__chev { transform: rotate(-90deg); }
.island.collapsed .island__grid,
.island.collapsed .launcher-grid { display: none; }
.island__name-input {
  font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--text);
  background: var(--bg); border: 1px solid var(--accent); border-radius: 6px;
  padding: 0.1rem 0.35rem; outline: none; min-width: 8rem; max-width: 60%;
}
.island.collapsed .island__head { border-bottom: 0; border-radius: var(--radius); }
.island__dot {
  width: 14px; height: 14px; border-radius: 50%; border: 0; flex: none;
  cursor: pointer; transition: transform .15s var(--spring);
}
.island__dot:hover { transform: scale(1.18); }
.island__name {
  font-size: 0.9rem; font-weight: 600; letter-spacing: -0.01em;
  background: none; border: 0; color: var(--text); cursor: pointer;
  padding: 0.1rem 0.2rem; border-radius: 6px; font-family: inherit;
}
.island__name:hover { background: var(--bg); }
.island__name--muted { color: var(--text-2); font-weight: 500; }
.island__count {
  margin-left: auto; font-size: 0.72rem; color: var(--text-2);
  background: var(--bg); border-radius: 980px; padding: 0.1rem 0.55rem;
}
.island__grid {
  display: grid; gap: 0.6rem; padding: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  min-height: 2.5rem;
}

/* color palette popover */
.island__palette {
  position: absolute; top: 2.4rem; left: 0.6rem; z-index: 20;
  display: none; gap: 0.3rem; padding: 0.5rem;
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: 12px; box-shadow: var(--shadow);
}
.island__palette.open { display: flex; }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 0; cursor: pointer; transition: transform .12s var(--spring); }
.swatch:hover { transform: scale(1.2); }

/* new-island dropzone */
.island--new {
  border: 1.5px dashed var(--hair); background: transparent; box-shadow: none;
}
.island--new__inner {
  padding: 1.1rem; text-align: center; color: var(--text-2);
  font-size: 0.82rem; pointer-events: none;
}
body.is-dragging .island--new { border-color: color-mix(in srgb, var(--accent) 50%, var(--hair)); }

/* drag + drop feedback */
.tab.dragging { opacity: 0.4; }
.island.drop-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.island--new.drop-active .island--new__inner { color: var(--accent); }

/* island reorder: grabbing cursor + insertion line + lifted source */
body.is-dragging, body.is-dragging * { cursor: grabbing !important; }
.island--dragging { opacity: 0.45; }
.island.drop-before::before,
.island.drop-after::after {
  content: ""; position: absolute; left: 0; right: 0; height: 3px; z-index: 6;
  background: var(--accent); border-radius: 2px;
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 55%, transparent);
}
.island.drop-before::before { top: -7px; }
.island.drop-after::after { bottom: -7px; }

/* tab reorder: vertical insertion line left/right of the target tab */
.tab.tab-drop-before::after,
.tab.tab-drop-after::after {
  content: ""; position: absolute; top: 8%; bottom: 8%; width: 3px; z-index: 6;
  background: var(--accent); border-radius: 2px;
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 55%, transparent);
}
.tab.tab-drop-before::after { left: -5px; }
.tab.tab-drop-after::after { right: -5px; }

/* ── Tab card ─────────────────────────────────────────────────── */
.tab {
  position: relative;
  display: flex; align-items: center; gap: 0.65rem;
  text-align: left; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--hair);
  border-radius: var(--radius-sm); padding: 0.6rem 0.7rem;
  font-family: inherit; color: var(--text); min-width: 0; max-width: 100%;
  transition: transform .22s var(--spring), box-shadow .22s, opacity .3s, background .2s;
}
.tab:hover { transform: translateY(-2px) scale(1.012); box-shadow: var(--shadow); background: var(--surface); }
.tab:active { transform: scale(.99); }
.tab--active { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.tab--selected {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  background: var(--surface);
}
.tab--active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 56%; background: var(--accent); border-radius: 0 3px 3px 0;
}
.tab__fav { width: 18px; height: 18px; border-radius: 4px; flex: none; }
.tab__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tab__title {
  font-size: 0.85rem; font-weight: 500; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.tab__meta {
  font-size: 0.7rem; color: var(--text-2); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.tab__close {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1rem; line-height: 1;
  color: var(--text-2); opacity: 0; transition: opacity .18s, background .18s, color .18s;
}
.tab:hover .tab__close { opacity: 1; }
.tab__close:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.tab__pull {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.85rem; line-height: 1;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  opacity: 0; transition: opacity .18s, background .18s;
}
.tab:hover .tab__pull { opacity: 1; }
.tab__pull:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); }

/* tab action cluster (pull / archive / close) */
.tab__actions { display: flex; align-items: center; gap: 2px; margin-left: auto; flex: none; }
.tab__act {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 0.9rem; line-height: 1;
  color: var(--text-2); cursor: pointer; opacity: 0;
  transition: opacity .18s, background .18s, color .18s;
}
.tab:hover .tab__act { opacity: 1; }
.tab__act--pull { color: var(--accent); opacity: 1; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tab__act--pull:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.tab__act--archive:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.tab__act--close:hover { color: #d93025; background: color-mix(in srgb, #d93025 16%, transparent); }

/* stale nudge → clickable archive */
.tab__nudge { font-family: inherit; cursor: pointer; }
.tab__nudge:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* island color dot inside archive meta */
.tab__isledot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; vertical-align: middle; }

/* Archive section */
.island--archive { opacity: 0.96; }
.tab--archived { background: var(--bg); }
.archive__clear {
  margin-left: auto; margin-right: 0.6rem; cursor: pointer;
  font-family: inherit; font-size: 0.68rem; color: var(--text-2);
  background: none; border: 1px solid var(--hair); border-radius: 980px; padding: 0.15rem 0.6rem;
  transition: color .15s, border-color .15s;
}
.archive__clear:hover { color: #d93025; border-color: color-mix(in srgb, #d93025 40%, var(--hair)); }
.archive__empty { color: var(--text-2); font-size: 0.8rem; padding: 0.6rem 0.3rem; }
.archive__restore {
  flex: none; cursor: pointer; font-family: inherit; font-size: 0.68rem; font-weight: 600;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 0; border-radius: 980px; padding: 0.22rem 0.62rem;
  transition: background .15s, transform .15s var(--spring);
}
.archive__restore:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); transform: translateY(-1px); }
.archive__note { font-size: 0.62rem; color: var(--text-2); margin-left: 0.5rem; opacity: 0.8; }

/* Auto-grouping suggestions */
.suggest-row { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 0.9rem 0.9rem; }
.suggest-chip {
  display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer;
  font-family: inherit; font-size: 0.7rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--hair); border-radius: 980px; padding: 0.3rem 0.7rem;
  transition: background .15s, border-color .15s, transform .15s var(--spring);
}
.suggest-chip:hover { background: var(--surface); border-color: color-mix(in srgb, var(--accent) 40%, var(--hair)); transform: translateY(-1px); }
.suggest-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* Launcher (pinned tools) */
.launcher-grid {
  display: grid; gap: 0.5rem; padding: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr));
}
.ltile {
  position: relative; display: flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 0.65rem; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--hair); border-radius: var(--radius-sm);
  cursor: pointer; font-family: inherit; color: var(--text);
  transition: transform .18s var(--spring), background .15s, box-shadow .18s;
}
.ltile:hover { transform: translateY(-2px); background: var(--surface); box-shadow: var(--shadow); }
.ltile__fav { width: 18px; height: 18px; border-radius: 4px; flex: none; }
.ltile__name { font-size: 0.82rem; font-weight: 500; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ltile__key { flex: none; font: 0.6rem/1 ui-monospace, monospace; color: var(--text-2); border: 1px solid var(--hair); border-radius: 5px; padding: 0.12rem 0.32rem; }
.ltile__rm {
  position: absolute; top: -7px; right: -7px; width: 19px; height: 19px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.72rem; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--hair); opacity: 0; transition: opacity .15s, color .15s;
}
.ltile:hover .ltile__rm { opacity: 1; }
.ltile__rm:hover { color: #d93025; }
.ltile--add { justify-content: center; color: var(--text-2); border-style: dashed; font-size: 0.78rem; }
.ltile--add:hover { color: var(--accent); }

/* island intent note */
.island__note { padding: 0 1rem 0.7rem; font-size: 0.74rem; color: var(--text); cursor: text; }
.island__note--empty { color: var(--text-2); opacity: 0; transition: opacity .15s; }
.island:hover .island__note--empty { opacity: 0.55; }
.island__note-input {
  display: block; width: calc(100% - 2rem); margin: 0 1rem 0.7rem;
  font: inherit; font-size: 0.74rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--accent); border-radius: 6px;
  padding: 0.25rem 0.45rem; outline: none;
}

/* per-island "closed" tray */
.island__closedchip {
  display: inline-flex; align-items: center; gap: 0.3rem; margin: 0 0.9rem 0.7rem;
  cursor: pointer; font-family: inherit; font-size: 0.68rem; color: var(--text-2);
  background: none; border: 1px dashed var(--hair); border-radius: 980px; padding: 0.2rem 0.6rem;
  transition: color .15s, border-color .15s;
}
.island__closedchip:hover { color: var(--text); border-color: color-mix(in srgb, var(--text-2) 40%, var(--hair)); }
.island__closed { padding-top: 0; opacity: 0.85; }
.island__closed .tab { background: transparent; border-style: dashed; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 1.2rem; transform: translate(-50%, 200%);
  display: flex; align-items: center; gap: 1rem; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--hair); border-radius: 12px; box-shadow: var(--shadow);
  padding: 0.6rem 0.9rem; font-size: 0.82rem; color: var(--text);
  opacity: 0; transition: transform .28s var(--spring), opacity .2s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast__undo {
  cursor: pointer; font-family: inherit; font-size: 0.8rem; font-weight: 600;
  color: var(--accent); background: none; border: 0; padding: 0.1rem 0.3rem;
}
.toast__undo:hover { text-decoration: underline; }

/* Gentle Decay */
.tab--aging { opacity: 0.74; }
.tab--stale { opacity: 0.5; border-style: dashed; }
.tab--stale:hover { opacity: 1; }
.tab__nudge {
  position: absolute; right: 0.7rem; bottom: -0.55rem;
  font-size: 0.62rem; color: var(--accent);
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: 980px; padding: 0.05rem 0.5rem; box-shadow: var(--shadow);
  opacity: 0; transition: opacity .2s;
}
.tab--stale:hover .tab__nudge { opacity: 1; }
.tab--leaving { opacity: 0 !important; transform: scale(.9); }

.empty { color: var(--text-2); text-align: center; padding: 4rem 0; }

/* mock banner */
.is-mock .brand__tag::after {
  content: " · demo data"; color: var(--accent);
}

/* ── Compact density (denser, single-line tabs) ───────────────── */
body.compact .island__grid { gap: 0.3rem; padding: 0.5rem; grid-template-columns: 1fr; }
body.compact .tab { padding: 0.35rem 0.5rem; gap: 0.5rem; }
body.compact .tab__meta { display: none; }
body.compact .tab__fav { width: 15px; height: 15px; }
body.compact .island__head { padding: 0.5rem 0.8rem; }
body.compact main { gap: 1rem; }

/* ── Card view (large favicon tiles) ──────────────────────────── */
body.view-card .island__grid { grid-template-columns: repeat(auto-fill, minmax(min(118px, 100%), 1fr)); gap: 0.6rem; }
body.view-card .tab { flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: 0.8rem; }
body.view-card .tab__fav { width: 30px; height: 30px; border-radius: 7px; }
body.view-card .tab__body { width: 100%; }
body.view-card .tab__title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
body.view-card .tab__actions { position: absolute; top: 0.4rem; right: 0.4rem; margin: 0; }
body.view-card .tab--active::before { height: 30%; }

/* ── Background image (Settings) ──────────────────────────────── */
body.has-bg { background-size: cover; background-position: center; background-attachment: fixed; }

/* ── Settings overlay ─────────────────────────────────────────── */
.settings-ov {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: rgba(0,0,0,.4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.settings {
  width: min(440px, 92vw); background: var(--surface); color: var(--text);
  border: 1px solid var(--hair); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
}
.settings__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--hair); font-size: 1rem; }
.settings__close { cursor: pointer; background: none; border: 0; color: var(--text-2); font-size: 1.2rem; line-height: 1; }
.settings__close:hover { color: var(--text); }
.settings__sec { padding: 1.1rem 1.2rem; }
.settings__label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin-bottom: 0.6rem; }
.settings__swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.settings__sw {
  height: 52px; border-radius: 10px; cursor: pointer; background-size: cover; background-position: center;
  border: 1px solid var(--hair); color: #fff; font-family: inherit; font-size: 0.68rem; font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,.6); transition: transform .15s var(--spring);
}
.settings__sw:hover { transform: translateY(-2px); }
.settings__sw.active { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.settings__row { display: flex; gap: 0.5rem; margin-top: 0.7rem; }
.settings__input { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--hair); border-radius: 9px; padding: 0.5rem 0.7rem; color: var(--text); font-family: inherit; font-size: 0.82rem; outline: none; }
.settings__input:focus { border-color: var(--accent); }
.settings__apply { cursor: pointer; background: var(--accent); color: #fff; border: 0; border-radius: 9px; padding: 0.5rem 0.9rem; font-family: inherit; font-size: 0.78rem; font-weight: 600; }
.settings__note { padding: 0 1.2rem 1.2rem; color: var(--text-2); font-size: 0.72rem; }
.settings__langs { display: flex; gap: 0.5rem; }
.settings__lang {
  cursor: pointer; font-family: inherit; font-size: 0.82rem; font-weight: 600; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--hair); border-radius: 9px; padding: 0.45rem 0.95rem;
  transition: background .15s, color .15s, border-color .15s;
}
.settings__lang.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Mobile (cosmetic — the extension is desktop-only) ─────────── */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 0.6rem 0.9rem; padding: 0.7rem 1rem; }
  .brand { flex: 1; min-width: 0; }
  .brand__tag { display: none; }
  .stats { gap: 1rem; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search kbd { display: none; }
  main { padding: 1rem; gap: 1.5rem; }
  .island__grid { grid-template-columns: minmax(0, 1fr); }
  .island__head, .winblock__head { max-width: 100%; }
  .tab { padding: 0.7rem; }
}
