/* IsaacPath — light editorial redesign. */

:root {
  --bg: #ffffff;
  --panel: #fafafa;
  --panel-2: #f4f4f4;
  --line: #ebebeb;
  --line-2: #d4d4d4;
  --text: #0a0a0a;
  --muted: #666;
  --dim: #999;
  --accent: #0a0a0a;
  --accent-soft: oklch(0.15 0 0 / 0.06);
  --accent-ink: #ffffff;
  --link: #0070f3;
  --ok: oklch(0.55 0.16 145);
  --warn: oklch(0.62 0.16 60);
  --danger: oklch(0.55 0.22 25);

  --q0: oklch(0.62 0.01 60);
  --q1: oklch(0.62 0.1 240);
  --q2: oklch(0.62 0.13 200);
  --q3: oklch(0.7 0.18 55);
  --q4: oklch(0.6 0.22 25);

  --radius: 10px;
  --radius-sm: 6px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-3: 0 16px 48px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Geist", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.hide-completed .row.is-done { display: none; }

.mono { font-family: "Geist Mono", ui-monospace, monospace; }
a { color: inherit; }
button { font-family: inherit; color: inherit; }

.skip-link {
  position: absolute;
  left: -1000px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 4px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Top bar ----------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px) saturate(160%);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 5px;
  font-weight: 600;
  font-family: "Fraunces", serif;
  font-size: 14px;
  line-height: 1;
}
.brand .muted { color: var(--muted); }

.top-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-family: "Geist Mono", ui-monospace, monospace;
  cursor: pointer;
  transition: all .15s ease;
}
.pill:hover { color: var(--text); border-color: var(--line-2); }
.pill.active { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.dot.local { background: var(--accent); }

.sync-pill { cursor: default; }
.sync-pill[data-status="ok"] .dot {
  background: var(--ok);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok) 25%, transparent);
}
.sync-pill[data-status="saving"] .dot { background: var(--warn); }
.sync-pill[data-status="error"] .dot,
.sync-pill[data-status="offline"] .dot { background: var(--dim); }

/* ---------- Compact intro / stats band --------------------------------- */

.intro {
  max-width: 1160px;
  margin: 0 auto;
  padding: 28px 24px 14px;
}
.intro-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.intro-text { max-width: 620px; }
.intro-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
.intro-eyebrow .live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 30%, transparent);
}
.intro-eyebrow .sep { color: var(--dim); }
h1 {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  text-wrap: balance;
}
h1 .accent { color: var(--accent); font-style: italic; }
.intro-tag {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 56ch;
  text-wrap: pretty;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 14px 22px;
  align-items: end;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 64px;
}
.stat .k {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat .v {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 22px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stat.primary .v { color: var(--accent); }

.meter {
  margin-top: 18px;
  height: 4px;
  background: var(--panel);
  border-radius: 999px;
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  background: linear-gradient(90deg,
    var(--accent),
    color-mix(in oklab, var(--accent) 70%, white));
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Toolbar (filters) ------------------------------------------ */

.toolbar {
  position: sticky;
  top: 47px;
  z-index: 20;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  margin-top: 22px;
}
.toolbar-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 11px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  transition: all 0.12s ease;
  white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip[aria-pressed="true"] {
  color: var(--text);
  background: var(--panel-2);
  border-color: var(--line-2);
}
.chip-count {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.chip[aria-pressed="true"] .chip-count { color: var(--muted); }

.toolbar-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 240px;
  min-width: 160px;
}
.toolbar-search-icon {
  position: absolute;
  left: 10px;
  color: var(--muted);
  pointer-events: none;
}
.toolbar-search input {
  width: 100%;
  height: 28px;
  padding: 0 12px 0 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-family: inherit;
  font-size: 12px;
  color: var(--text);
  transition: all 0.12s ease;
  -webkit-appearance: none;
  appearance: none;
}
.toolbar-search input::placeholder { color: var(--dim); }
.toolbar-search input:hover { border-color: var(--line-2); }
.toolbar-search input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}
.toolbar-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.pill-strong {
  color: var(--text);
  border-color: var(--line-2);
  font-family: inherit;
  font-weight: 500;
}
.pill-strong:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* ---------- Main / groups ---------------------------------------------- */

main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 24px 80px;
}
.section-label {
  margin: 36px 0 8px;
  padding-top: 8px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-top: 1px solid var(--line);
}
.section-label:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.section-label-eyebrow {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.section-label-title {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 20px;
  margin: 0;
  letter-spacing: -0.01em;
}

.group { margin: 18px 0 24px; }
.group-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.group-head-text { min-width: 0; }
.group-eyebrow {
  display: block;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}
.group-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.005em;
}
.group-blurb {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
  max-width: 70ch;
}
.group-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.gp-num {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.gp-num .dim { color: var(--dim); }
.gp-stash {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border: 1px dashed var(--line-2);
  border-radius: 999px;
}

/* ---------- Rows -------------------------------------------------------- */

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 8px 6px 6px;
  border-bottom: 1px solid var(--line);
  transition: background 0.12s ease;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: color-mix(in oklab, var(--panel) 60%, transparent); }
.row.is-done { opacity: 0.55; }
.row.is-done .row-title { text-decoration: line-through; text-decoration-color: var(--dim); }
.row.is-stashed {
  opacity: 0.55;
  background: repeating-linear-gradient(
    -45deg,
    transparent 0 6px,
    color-mix(in oklab, var(--panel-2) 85%, transparent) 6px 7px
  );
}
.row.is-stashed .row-title { color: var(--muted); }

.sprite {
  position: relative;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--placeholder-bg, var(--panel-2));
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid color-mix(in oklab, var(--line) 60%, transparent);
}
.sprite img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  padding: 2px;
}
.sprite-glyph {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  color: oklch(0.36 0.04 var(--placeholder-hue, 60));
  letter-spacing: 0.03em;
}

.row-main { min-width: 0; cursor: pointer; }
.row-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.row-title {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text);
}
.row-sub {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
}
.row-desc {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
  max-width: 72ch;
  text-wrap: pretty;
}

.row-tools {
  display: flex;
  gap: 4px;
  align-items: center;
}
.tool {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.12s ease;
}
.tool:hover {
  color: var(--text);
  background: var(--panel-2);
  border-color: var(--line);
}
.tool-stash:hover { color: var(--danger); }
.row.is-stashed .tool-stash { color: var(--ok); }
.row.is-stashed .tool-stash:hover { color: var(--ok); }

.tool-done .checkbox {
  width: 18px; height: 18px;
  border: 1.5px solid var(--line-2);
  border-radius: 4px;
  display: grid; place-items: center;
  color: transparent;
  transition: all 0.12s ease;
}
.tool-done:hover .checkbox { border-color: var(--accent); }
.tool-done.is-done .checkbox {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ---------- Q badge ----------------------------------------------------- */

.q-badge {
  display: inline-block;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1;
  letter-spacing: 0.04em;
  vertical-align: middle;
  color: #fff;
}
.q-0 { background: var(--q0); }
.q-1 { background: var(--q1); }
.q-2 { background: var(--q2); }
.q-3 { background: var(--q3); }
.q-4 { background: var(--q4); }

.warn-flag {
  color: var(--warn);
  font-size: 12px;
  line-height: 1;
}

/* ---------- Drawer ----------------------------------------------------- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.18);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 60;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 460px;
  max-width: 92vw;
  background: var(--bg);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  z-index: 70;
  transform: translateX(101%);
  transition: transform 0.22s cubic-bezier(.2, .7, .2, 1);
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  gap: 8px;
}
.drawer-head-meta {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.drawer-nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.drawer-iconbtn {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  transition: all .12s ease;
}
.drawer-iconbtn:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel);
}
.drawer-iconbtn:disabled { opacity: 0.4; cursor: default; }
.drawer-iconbtn:disabled:hover { background: transparent; border-color: transparent; color: var(--muted); }

.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 22px 24px 100px;
}
.drawer-hero {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.drawer-hero .sprite {
  width: 72px; height: 72px;
  border-radius: 8px;
}
.drawer-hero .sprite-glyph { font-size: 22px; }
.drawer-hero-text { min-width: 0; flex: 1; }
.drawer-title {
  font-family: "Geist", system-ui, sans-serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
  text-wrap: balance;
}
.drawer-sub {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.drawer-sub .dot { background: var(--line-2); }

.drawer-section { margin: 18px 0; }
.drawer-section-label {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.drawer-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.drawer-section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  text-wrap: pretty;
}
.drawer-section p + p { margin-top: 6px; }
.drawer-empty {
  font-size: 13px;
  color: var(--dim);
  font-style: italic;
  padding: 14px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.drawer-note,
.drawer-warn {
  margin: 14px 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.5;
}
.drawer-note {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
}
.drawer-warn {
  background: color-mix(in oklab, var(--warn) 15%, white);
  border: 1px solid color-mix(in oklab, var(--warn) 40%, var(--line));
  color: color-mix(in oklab, var(--warn) 60%, black);
}

.drawer-footer {
  position: sticky;
  bottom: 0;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 12px 24px;
  display: flex;
  gap: 8px;
  margin: 0 -24px -100px;
}
.drawer-footer .btn {
  flex: 1;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .12s ease;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--text);
}
.drawer-footer .btn:hover { border-color: var(--text); }
.drawer-footer .btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.drawer-footer .btn-primary:hover { opacity: 0.88; }
.drawer-footer .btn-primary.is-done {
  background: var(--bg);
  color: var(--text);
  border-color: var(--line-2);
}
.drawer-footer .btn-ghost {
  flex: 0 0 auto;
  width: 36px;
  color: var(--muted);
}
.drawer-footer .btn-ghost:hover { color: var(--danger); border-color: var(--line-2); }
.drawer-footer .btn-ghost.is-stashed {
  color: var(--ok);
  border-color: color-mix(in oklab, var(--ok) 40%, var(--line));
  background: color-mix(in oklab, var(--ok) 8%, var(--bg));
}

/* ---------- Footer ----------------------------------------------------- */

.foot {
  max-width: 1160px;
  margin: 60px auto 24px;
  padding: 18px 24px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  font-family: "Geist Mono", ui-monospace, monospace;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.foot a { color: var(--text); text-decoration: none; border-bottom: 1px dotted var(--line-2); }

/* ---------- Add-item picker -------------------------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.28);
  backdrop-filter: blur(2px);
  z-index: 80;
}
.modal-backdrop[hidden] { display: none; }

.picker {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, 94vw);
  max-height: 86vh;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-3);
  z-index: 90;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.picker[hidden] { display: none; }

.picker-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.picker-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.picker-title {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.picker-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.picker-controls .toolbar-search { flex: 1 1 240px; min-width: 200px; }
.picker-controls .toolbar-search input { height: 32px; font-size: 13px; }
.picker-kinds { flex: 0 1 auto; }
.picker-body {
  flex: 1;
  overflow: auto;
  padding: 6px 6px;
}
.picker-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.picker-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.1s ease;
}
.picker-row:hover {
  background: var(--panel);
  border-color: var(--line);
}
.picker-row.is-added {
  opacity: 0.45;
  pointer-events: none;
}
.picker-row .sprite {
  width: 32px; height: 32px;
}
.picker-row-body { min-width: 0; }
.picker-row-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.picker-row-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}
.picker-row-meta {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
}
.picker-row-desc {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}
.picker-row-tag {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.picker-empty {
  padding: 32px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Confirm-add target dialog --------------------------------- */

.confirm {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 92vw);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-3);
  z-index: 95;
  display: flex;
  flex-direction: column;
}
.confirm[hidden] { display: none; }
.confirm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.confirm-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.confirm-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.confirm-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
}
.confirm-item .sprite { width: 40px; height: 40px; }
.confirm-item-text { min-width: 0; }
.confirm-item-name {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
}
.confirm-item-meta {
  margin-top: 2px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
}
.confirm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.confirm-label {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.confirm-select {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 0 10px;
  background: var(--bg);
  font: inherit;
  color: var(--text);
}
.confirm-select:focus { outline: none; border-color: var(--accent); }
.confirm-hint {
  font-size: 12px;
  color: var(--muted);
}
.confirm-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}
.confirm-foot .btn {
  height: 34px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.confirm-foot .btn:hover { border-color: var(--text); }
.confirm-foot .btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.confirm-foot .btn-primary:hover { opacity: 0.88; }

/* ---------- Show-stashed mode ------------------------------------------ */

body[data-show-stashed="true"] .row.is-stashed { opacity: 0.85; }
body[data-show-stashed="true"] .row:not(.is-stashed) {
  opacity: 0.32;
  filter: grayscale(0.5);
}

@media (max-width: 700px) {
  .intro-row { gap: 16px; }
  .stats { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .toolbar { top: 0; }
}
