:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --surface-2: #efece3;
  --text: #17161c;
  --text-muted: #5f5d68;
  --border: #e2ded2;
  --accent: #5b4bff;
  --accent-ink: #ffffff;
  --accent-soft: #ecebff;
  --lime: #d9ff5b;
  --hl: #d9ff5b;
  --done: #1f9d55;
  --must: #d6336c;
  --should: #c77700;
  --nice: #3b82c4;
  --shadow: 0 1px 2px rgb(23 22 28 / 6%), 0 8px 24px -12px rgb(23 22 28 / 18%);
  --radius: 16px;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111016; --surface: #1a1921; --surface-2: #23222c; --text: #f2f1f6; --text-muted: #a3a1af;
    --border: #2e2d39; --accent: #8a7dff; --accent-ink: #0d0c12; --accent-soft: #252244; --hl: rgb(138 125 255 / 55%); --done: #3ccf7a;
    --must: #ff6b9a; --should: #ffb547; --nice: #6fb4ff; --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 10px 30px -12px rgb(0 0 0 / 60%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111016; --surface: #1a1921; --surface-2: #23222c; --text: #f2f1f6; --text-muted: #a3a1af;
  --border: #2e2d39; --accent: #8a7dff; --accent-ink: #0d0c12; --accent-soft: #252244; --hl: rgb(138 125 255 / 55%); --done: #3ccf7a;
  --must: #ff6b9a; --should: #ffb547; --nice: #6fb4ff; --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 10px 30px -12px rgb(0 0 0 / 60%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font-body); }
a { color: inherit; }
code, kbd, pre { font-family: var(--font-mono); font-size: .875em; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--text-muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.brand svg { width: 28px; height: 28px; }
.brand-bg { fill: var(--accent); }
.brand-tick { fill: none; stroke: var(--lime); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 10px; color: var(--text-muted); font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.search-btn { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px 0 12px; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; color: var(--text-muted); }
.search-btn svg, .icon-btn svg, .palette-input svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
kbd { border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; font-size: 12px; background: var(--surface-2); color: var(--text-muted); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-weight: 600; text-decoration: none; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.danger { color: var(--must); }

/* Hero */
.hero { padding: 72px 0 48px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto; height: 520px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), radial-gradient(closest-side at 70% 40%, color-mix(in srgb, var(--lime) 35%, transparent), transparent 70%); filter: blur(30px); z-index: -1; animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(4%, 6%, 0) scale(1.08); } }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; color: var(--text-muted); }
.eyebrow b { color: var(--accent); }
.hero h1 { font-size: clamp(44px, 8vw, 92px); font-weight: 800; margin: 20px 0 16px; max-width: 12ch; letter-spacing: -0.035em; }
.reveal .w { display: inline-block; opacity: 0; transform: translateY(0.45em) rotate(2deg); filter: blur(6px); animation: word-in .7s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i) * 70ms + 80ms); }
.reveal .hl { background: linear-gradient(transparent 66%, var(--hl) 66%); padding: 0 .06em; }
@keyframes word-in { to { opacity: 1; transform: none; filter: none; } }
.hero-sub { font-size: clamp(18px, 2.2vw, 21px); color: var(--text-muted); max-width: 58ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 40px; }
.hero-stats div { font-size: 14px; color: var(--text-muted); }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 30px; color: var(--text); }

/* Sections */
.section { padding: 40px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3.5vw, 36px); }
.section-head p { color: var(--text-muted); max-width: 60ch; margin-top: 6px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card .emoji { font-size: 26px; line-height: 1; }
.card h3 { font-size: 19px; }
.card p { color: var(--text-muted); font-size: 14px; }
.card .meta { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--text); color: var(--bg); border-color: transparent; }
.kit-card { background: linear-gradient(160deg, var(--surface), var(--surface-2)); }

/* Progress ring */
.ring { --p: 0; --size: 44px; position: relative; width: var(--size); height: var(--size); flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4; }
.ring .track { stroke: var(--surface-2); }
.ring .bar { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p) * 100); transition: stroke-dashoffset .6s cubic-bezier(.2,.8,.2,1), stroke .3s; }
.ring[data-complete="true"] .bar { stroke: var(--done); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ring.lg { --size: 76px; }
.ring.lg circle { stroke-width: 3.2; }
.ring.lg span { font-size: 17px; font-family: var(--font-display); }

/* Checklist page */
.page-head { padding: 48px 0 24px; display: grid; gap: 12px; }
.crumbs { font-size: 14px; color: var(--text-muted); display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-title { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.page-title .emoji { font-size: 44px; }
.page-title h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 800; letter-spacing: -0.03em; }
.page-title h1 small { color: var(--text-muted); opacity: .45; font-weight: 700; }
.lead { font-size: 18px; color: var(--text-muted); max-width: 65ch; }
.toolbar { position: sticky; top: 64px; z-index: 3; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.toolbar .count { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.toolbar .count small { display: block; font-family: var(--font-body); font-size: 13px; color: var(--text-muted); font-weight: 400; }
.toolbar .spacer { flex: 1; }
.toolbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }

.items { list-style: none; margin: 0 0 24px; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.items[data-filter="must"] .item:not([data-priority="must"]),
.items[data-filter="should"] .item:not([data-priority="should"]),
.items[data-filter="nice"] .item:not([data-priority="nice"]),
.items[data-hide-done="true"] .item[data-state="done"],
.items[data-hide-done="true"] .item[data-state="na"] { display: none; }
.item { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 18px 20px; border-top: 1px solid var(--border); transition: background .25s ease; scroll-margin-top: 160px; }
.item:first-child { border-top: 0; }
.item:focus-within, .item.focus { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.item.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { background: var(--accent-soft); } }
.item[data-state="na"] .item-body { opacity: .5; }
.item[data-state="na"] h3 { text-decoration: line-through; }
.item-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.item h3 { font-family: var(--font-body); font-size: 17px; font-weight: 600; letter-spacing: 0; }
.item-body > p { color: var(--text-muted); margin-top: 4px; }
.tip { margin-top: 8px !important; font-size: 14px; color: var(--should) !important; }
.badge { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; }
.badge.must { color: var(--must); } .badge.should { color: var(--should); } .badge.nice { color: var(--nice); }
.tag { font-size: 12px; color: var(--text-muted); background: var(--surface-2); padding: 2px 8px; border-radius: 999px; }
.wcag { font-size: 12px; color: var(--accent); text-decoration: none; font-weight: 600; }
.wcag:hover { text-decoration: underline; }
.item-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; padding: 6px 8px; margin-left: -8px; border-radius: 8px; font-size: 13px; color: var(--text-muted); min-height: 32px; }
.link-btn:hover { color: var(--text); background: var(--surface-2); }
.link-btn[aria-pressed="true"] { color: var(--text); font-weight: 600; }
.note { width: 100%; margin-top: 8px; min-height: 72px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: 14px/1.5 var(--font-body); resize: vertical; }
.note[hidden] { display: none; }

/* Animated checkbox */
.check { position: relative; width: 28px; height: 28px; margin-top: 1px; border-radius: 9px; border: 2px solid color-mix(in srgb, var(--text-muted) 55%, transparent); background: var(--surface); display: grid; place-items: center; padding: 0; transition: background .2s ease, border-color .2s ease, transform .15s ease; }
.check::after { content: ""; position: absolute; inset: -8px; } /* 44px hit area */
.check:hover { border-color: var(--accent); }
.check:active { transform: scale(.9); }
.check svg { width: 18px; height: 18px; fill: none; stroke: var(--accent-ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .35s cubic-bezier(.6,0,.2,1) .05s; }
.check[aria-checked="true"] { background: var(--done); border-color: var(--done); animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
.check[aria-checked="true"] svg { stroke-dashoffset: 0; stroke: #fff; }
.check[aria-checked="mixed"] { background: var(--surface-2); }
.check[aria-checked="mixed"]::before { content: ""; width: 12px; height: 3px; border-radius: 2px; background: var(--text-muted); }
@keyframes pop { 50% { transform: scale(1.18); } }

/* Project view */
.project-section { margin-bottom: 28px; }
.project-section > header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.project-section > header h2 { font-size: 24px; }
.project-section > header a { text-decoration: none; }
.empty { padding: 48px 24px; text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); display: grid; gap: 12px; justify-items: center; }

/* MCP page */
.code { position: relative; background: #15141b; color: #e8e6f2; padding: 18px 20px; border-radius: 14px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.code .copy { position: absolute; top: 10px; right: 10px; background: #2a2935; color: #e8e6f2; border: 0; border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.tools { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tools .card code { color: var(--accent); font-weight: 600; }
.split { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; align-items: start; }
.prose h2 { font-size: 26px; margin: 28px 0 10px; }
.prose p, .prose li { color: var(--text-muted); }
.prose ol, .prose ul { padding-left: 20px; }

/* Palette */
.palette { width: min(640px, 100% - 32px); max-height: min(560px, 80vh); padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgb(0 0 0 / 45%); margin-top: 12vh; }
.palette::backdrop, .sheet::backdrop { background: rgb(10 10 20 / 45%); backdrop-filter: blur(3px); }
.palette[open] { animation: rise .22s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.palette-input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--text); min-height: 32px; }
.palette-results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; max-height: 440px; }
.palette-results li a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.palette-results li[aria-selected="true"] a { background: var(--accent-soft); }
.palette-results .r-title { font-weight: 600; }
.palette-results .r-sub { font-size: 13px; color: var(--text-muted); }
.palette-results .r-kind { margin-left: auto; font-size: 12px; color: var(--text-muted); }

/* Sheet dialog */
.sheet { width: min(640px, 100% - 32px); max-height: 88vh; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); padding: 24px; }
.sheet h2 { font-size: 26px; margin-bottom: 16px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; font-weight: 500; font-size: 14px; }
.field input, .field select { min-height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); padding: 0 12px; font: 16px var(--font-body); }
.pick { border: 1px solid var(--border); border-radius: 12px; padding: 12px; max-height: 300px; overflow: auto; }
.pick legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.pick h4 { margin: 10px 0 4px; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.pick label { display: flex; gap: 10px; align-items: center; padding: 6px 4px; font-size: 15px; }
.pick input { width: 18px; height: 18px; accent-color: var(--accent); }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* Toast + confetti */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 500; pointer-events: none; transition: .25s ease; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; pointer-events: none; z-index: 30; width: 8px; height: 12px; border-radius: 2px; animation: confetti 1.1s cubic-bezier(.2,.7,.4,1) forwards; }
@keyframes confetti { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

.footer { border-top: 1px solid var(--border); margin-top: 48px; padding: 28px 0 40px; font-size: 14px; }
.footer-inner { display: grid; gap: 6px; }

@media (max-width: 760px) {
  .nav { display: none; }
  .search-label { display: none; }
  .split { grid-template-columns: 1fr; }
  .toolbar { position: static; gap: 10px; }
  .item { padding: 16px; }
}
@media (max-width: 760px) { .nav.mobile-on { display: flex; } }
.mobile-nav { display: none; }
@media (max-width: 760px) {
  .mobile-nav { display: flex; position: fixed; inset: auto 0 0 0; z-index: 6; justify-content: space-around; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
  .mobile-nav a { display: grid; place-items: center; min-height: 44px; min-width: 64px; text-decoration: none; font-size: 13px; color: var(--text-muted); font-weight: 500; }
  .mobile-nav a[aria-current="page"] { color: var(--accent); }
  body { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal .w { opacity: 1; transform: none; filter: none; }
}

/* Live preview */
:root { --oc-stage: #e7e3d8; }
:root[data-theme="dark"] { --oc-stage: #0b0a10; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --oc-stage: #0b0a10; } }
.wrap.wide { width: min(1380px, 100% - 32px); }
.cl-layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.cl-preview { order: -1; scroll-margin-top: 76px; }
@media (min-width: 1100px) {
  .cl-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; }
  .cl-preview { order: 0; position: sticky; top: 80px; }
  .cl-preview .pp-host { --oc-max-h: calc(100vh - 210px); }
}
.preview-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; display: grid; gap: 10px; }
.pp-bar { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding: 2px 4px; }
.pp-hint { font-size: 13px; }
.pp-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-controls .chip, .pd-controls .chip { min-height: 32px; font-size: 13px; padding: 0 10px; }
.chip.static { cursor: default; color: var(--text-muted); }
.pp-host { --oc-max-h: 460px; display: block; }
.item.previewing { box-shadow: inset 3px 0 0 #ff2d7a; }
.link-btn.pv-link[aria-pressed="true"] { color: #ff2d7a; }

.pv-dialog { width: min(1400px, 100% - 24px); height: min(92vh, 1000px); max-height: none; padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text); }
.pv-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); animation: rise .22s cubic-bezier(.2,.8,.2,1); }
.pv-dialog::backdrop { background: rgb(10 10 20 / 55%); backdrop-filter: blur(3px); }
.pd-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.pd-head h2 { font-size: 20px; margin-right: auto; }
.pd-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.pd-body { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 0; }
.pd-items { overflow-y: auto; border-right: 1px solid var(--border); padding: 8px; display: grid; align-content: start; gap: 2px; }
.pd-item { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px; min-height: 44px; border: 0; border-radius: 10px; background: none; font-size: 14px; }
.pd-item span:first-child { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.pd-item .badge { margin-left: auto; }
.pd-item:hover { background: var(--surface-2); }
.pd-item[aria-pressed="true"] { background: var(--accent-soft); font-weight: 600; }
.pd-item[aria-pressed="true"] span:first-child { background: #ff2d7a; color: #fff; }
.pd-host { --oc-max-h: calc(min(92vh, 1000px) - 90px); padding: 12px; min-width: 0; }
@media (max-width: 760px) {
  .pd-body { grid-template-columns: 1fr; grid-template-rows: 150px minmax(0, 1fr); }
  .pd-items { border-right: 0; border-bottom: 1px solid var(--border); }
  .pd-host { --oc-max-h: calc(92vh - 260px); }
}

.thumb-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.thumb-card { padding: 10px 10px 14px; }
.thumb-card .card-top, .thumb-card p { padding: 0 6px; }
.thumb { --oc-max-h: 210px; --oc-overflow: hidden; height: 210px; border-radius: 12px; overflow: hidden; background: var(--oc-stage); }

/* Interaction refinements */
.toast.has-action { pointer-events: auto; display: flex; align-items: center; gap: 14px; padding-right: 8px; }
.toast-action { background: color-mix(in srgb, var(--bg) 16%, transparent); border: 0; color: var(--bg); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; padding: 6px 12px; min-height: 36px; border-radius: 8px; }
.toast-action:hover { background: color-mix(in srgb, var(--bg) 28%, transparent); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.note-status { display: block; min-height: 18px; font-size: 12px; color: var(--done); margin-top: 4px; }
.filter-empty { margin: -12px 0 24px; padding: 20px; text-align: center; color: var(--text-muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.filter-empty .link-btn { margin-left: 4px; color: var(--accent); font-weight: 600; }
.items[data-hide-done="true"] .item.just-changed { display: grid; }
.item.fading { opacity: 0; transition: opacity .3s ease; }
.done-card { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; padding: 18px 20px; border-radius: var(--radius); background: linear-gradient(120deg, color-mix(in srgb, var(--done) 14%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--done) 40%, var(--border)); animation: rise .4s cubic-bezier(.2,.8,.2,1); }
.done-card h3 { font-size: 20px; }
.done-card .grow { flex: 1; min-width: 200px; }
.done-emoji { font-size: 34px; }
.done-actions { display: flex; gap: 8px; flex-wrap: wrap; }
