/* Snugnote · "Soft Studio" design system
 * Warm ivory surfaces, ink typography, a lavender accent and muted candy colors.
 * Light is the default; dark follows the system unless the user picks a theme (html[data-theme]).
 */
:root {
  color-scheme: light;
  /* surfaces */
  --bg: #f8f7f4; --side: #f3f1ec; --surface: #ffffff; --surface-raised: #ffffff;
  --hover: rgba(60, 52, 40, .055); --active: rgba(60, 52, 40, .09);
  /* text */
  --text: #2b2a27; --text-2: #5f5e58; --muted: #8a8880; --faint: #b3b1a9;
  /* lines */
  --line: #e9e6df; --line-strong: #dad6cd;
  /* brand */
  --accent: #8b6fd6; --accent-hover: #7a5cc9; --accent-soft: #f0ebfa; --accent-text: #6d50b5; --ring: rgba(139, 111, 214, .28);
  --mark: #fbefc4; --code: rgba(120, 100, 70, .09); --code-text: #c2577a;
  /* Notion-compatible palette, softened */
  --gray: #8a8880; --brown: #9a6b52; --orange: #c9773a; --yellow: #b08a2c; --green: #5f8f6a;
  --blue: #5b84ad; --purple: #8865b5; --pink: #bf5f8a; --red: #cc5b55;
  --gray_bg: #f0eee9; --brown_bg: #f4ece6; --orange_bg: #fbeadb; --yellow_bg: #f8f0d6; --green_bg: #e5f0e6;
  --blue_bg: #e4edf6; --purple_bg: #efe8f8; --pink_bg: #f8e6ee; --red_bg: #fbe6e4;
  /* elevation */
  --shadow-xs: 0 1px 2px rgba(40, 35, 25, .05);
  --shadow-sm: 0 2px 8px rgba(40, 35, 25, .06), 0 1px 2px rgba(40, 35, 25, .04);
  --shadow-md: 0 8px 24px rgba(40, 35, 25, .09), 0 2px 6px rgba(40, 35, 25, .04);
  --shadow-lg: 0 18px 50px rgba(40, 35, 25, .14), 0 4px 12px rgba(40, 35, 25, .05);
  --shadow-float: 0 6px 24px rgba(35, 30, 25, .09), 0 1px 4px rgba(35, 30, 25, .06);
  /* shape & motion */
  --r-xs: 5px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --fast: 120ms; --normal: 200ms; --slow: 320ms;
  /* type */
  --font-ui: "DM Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Fraunces", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Lora", Georgia, "Songti SC", "Noto Serif SC", serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --side-w: 264px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1c1c1f; --side: #18181b; --surface: #252529; --surface-raised: #2c2c32;
  --hover: rgba(255, 255, 255, .06); --active: rgba(255, 255, 255, .1);
  --text: #ecebe6; --text-2: #c3c1ba; --muted: #9a988f; --faint: #6c6b66;
  --line: #35353b; --line-strong: #484850;
  --accent: #ad96e8; --accent-hover: #bea9f0; --accent-soft: #352d49; --accent-text: #c5b1f2; --ring: rgba(173, 150, 232, .3);
  --mark: #5a4a1f; --code: rgba(255, 255, 255, .07); --code-text: #f0a0bd;
  --gray: #a3a19a; --brown: #c39a82; --orange: #e0a06c; --yellow: #d8bd6a; --green: #8cc09a;
  --blue: #8fb3d9; --purple: #bfa3ea; --pink: #e3a0bf; --red: #e8918a;
  --gray_bg: #2e2e33; --brown_bg: #3d3029; --orange_bg: #45332a; --yellow_bg: #423b27; --green_bg: #263b2e;
  --blue_bg: #253546; --purple_bg: #372d4a; --pink_bg: #45293a; --red_bg: #472b2b;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .32);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .45);
  --shadow-float: 0 5px 20px rgba(0, 0, 0, .3), 0 1px 3px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .04);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1c1c1f; --side: #18181b; --surface: #252529; --surface-raised: #2c2c32;
    --hover: rgba(255, 255, 255, .06); --active: rgba(255, 255, 255, .1);
    --text: #ecebe6; --text-2: #c3c1ba; --muted: #9a988f; --faint: #6c6b66;
    --line: #35353b; --line-strong: #484850;
    --accent: #ad96e8; --accent-hover: #bea9f0; --accent-soft: #352d49; --accent-text: #c5b1f2; --ring: rgba(173, 150, 232, .3);
    --mark: #5a4a1f; --code: rgba(255, 255, 255, .07); --code-text: #f0a0bd;
    --gray: #a3a19a; --brown: #c39a82; --orange: #e0a06c; --yellow: #d8bd6a; --green: #8cc09a;
    --blue: #8fb3d9; --purple: #bfa3ea; --pink: #e3a0bf; --red: #e8918a;
    --gray_bg: #2e2e33; --brown_bg: #3d3029; --orange_bg: #45332a; --yellow_bg: #423b27; --green_bg: #263b2e;
    --blue_bg: #253546; --purple_bg: #372d4a; --pink_bg: #45293a; --red_bg: #472b2b;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .32);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .45);
    --shadow-float: 0 5px 20px rgba(0, 0, 0, .3), 0 1px 3px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .04);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  display: flex; background: var(--bg); color: var(--text);
  font: 15px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
a { color: inherit; }
::selection { background: var(--ring); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
button { font-family: inherit; }
.ico { width: 16px; height: 16px; flex-shrink: 0; display: inline-block; vertical-align: -3px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- sidebar */
#sidebar {
  width: var(--side-w); flex-shrink: 0; background: var(--side); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; height: 100vh; height: 100dvh; position: sticky; top: 0; font-size: 14px;
}
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 10px 14px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 600 18px/1 var(--font-display); letter-spacing: -.01em; text-decoration: none; color: var(--text); padding: 4px 6px 4px 2px; border-radius: 10px; }
.brand-logo { width: 26px; height: 26px; border-radius: 8px; box-shadow: var(--shadow-xs); transition: transform var(--normal) var(--spring); }
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.06); }
#toggle-side, #show-side {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; background: none; color: var(--muted);
  cursor: pointer; border-radius: 8px; transition: background var(--fast), color var(--fast);
}
#toggle-side:hover, #show-side:hover { background: var(--hover); color: var(--text); }
#show-side { position: fixed; top: 10px; left: 10px; z-index: 5; background: var(--surface); box-shadow: var(--shadow-sm); }
body.side-hidden #sidebar { display: none; }
.search-wrap { position: relative; margin: 2px 12px 10px; }
.search-wrap .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-wrap kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: none; }
#search {
  width: 100%; height: 34px; padding: 0 44px 0 32px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; box-shadow: var(--shadow-xs);
  transition: border-color var(--fast), box-shadow var(--fast);
}
#search::placeholder { color: var(--muted); }
#search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
#search::-webkit-search-cancel-button { display: none; }
kbd {
  font: 500 11px/1 var(--font-ui); color: var(--muted); background: var(--bg); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px;
}
.side-label {
  display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 4px;
  font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--faint);
}
#tree, #results { overflow-y: auto; flex: 1; padding: 0 8px 12px; }
.node > .row {
  display: flex; align-items: center; gap: 5px; height: 32px; padding: 0 6px 0 4px; border-radius: 8px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-decoration: none; color: var(--text-2); margin: 1px 0; font-size: 13.5px; font-weight: 450;
  transition: background var(--fast), color var(--fast);
}
.node > .row:hover { background: var(--hover); color: var(--text); }
.node > .row.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.node > .row .ic { width: 20px; text-align: center; flex-shrink: 0; font-size: 15px; line-height: 1; }
.node > .row .ic img { width: 17px; height: 17px; object-fit: cover; border-radius: 4px; vertical-align: -3px; }
.caret {
  width: 20px; height: 20px; flex-shrink: 0; display: inline-grid; place-items: center; color: var(--faint);
  border-radius: 6px; font-size: 0; transition: background var(--fast), color var(--fast);
}
.caret::before {
  content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg); transition: transform var(--normal) var(--ease); margin-left: -2px;
}
.node:not(.closed) > .row .caret::before { transform: rotate(45deg); margin: -3px 0 0; }
.caret:hover { background: var(--active); color: var(--text); }
.label { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.kids { padding-left: 14px; position: relative; }
.kids::before { content: ""; position: absolute; left: 13px; top: 2px; bottom: 2px; width: 1px; background: var(--line); }
.node.closed > .kids { display: none; }
.node:not(.closed) > .kids { animation: sn-fade var(--normal) var(--ease); }
.result { display: block; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--text); margin: 1px 0; }
.result:hover { background: var(--hover); }
.result .snip { color: var(--muted); font-size: 12.5px; white-space: normal; margin-top: 2px; line-height: 1.45; }
.result mark, .pal-item mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
.side-foot {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px 10px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line);
}
.side-foot #meta { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .drive-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green_bg); flex-shrink: 0; }
.icon-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); cursor: pointer; transition: background var(--fast), color var(--fast), transform var(--fast);
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:active { transform: scale(.94); }

/* ---------------------------------------------------------------- page */
#main { flex: 1; min-width: 0; height: 100vh; height: 100dvh; overflow-y: auto; scroll-behavior: auto; }
#crumbs {
  height: 48px; padding: 0 16px 0 20px; font-size: 13.5px; color: var(--muted); position: sticky; top: 0; z-index: 4;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
#crumbs a { text-decoration: none; padding: 4px 6px; border-radius: 7px; color: var(--text-2); transition: background var(--fast); }
#crumbs a:hover { background: var(--hover); color: var(--text); }
#crumbs .sep { color: var(--faint); margin: 0 1px; }
#cover-wrap { margin-top: -48px; }
.cover { width: 100%; height: 30vh; max-height: 280px; object-fit: cover; display: block; }
#content { max-width: 872px; margin: 0 auto; padding: 28px 56px 30vh; font-size: 16px; line-height: 1.75; }
#content.wide { max-width: none; padding-left: 48px; padding-right: 48px; }
.page-icon { font-size: 52px; line-height: 1; margin-top: 28px; }
.page-icon img { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; }
h1.title {
  font: 600 38px/1.2 var(--font-display); letter-spacing: -.015em; margin: 10px 0 22px; color: var(--text);
  font-variation-settings: "SOFT" 60, "WONK" 0; overflow-wrap: anywhere;
}
.props { border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 18px; font-size: 14px; }
.prop { display: flex; gap: 8px; padding: 5px 0; align-items: baseline; }
.prop .k { width: 160px; flex-shrink: 0; color: var(--muted); }
.muted { color: var(--muted); }

.static .blk { margin: 2px 0; }
.static p { margin: 4px 0; min-height: 1.6em; }
.static h2 { font-size: 28px; line-height: 1.3; margin: 34px 0 8px; letter-spacing: -.01em; }
.static h3 { font-size: 22px; line-height: 1.35; margin: 26px 0 6px; } .static h4 { font-size: 18px; margin: 20px 0 4px; }
.static ul, .static ol { margin: 2px 0; padding-left: 26px; }
.static li { margin: 3px 0; } .static li::marker { color: var(--accent); }
.static .todo { display: flex; gap: 10px; align-items: flex-start; }
.static .todo input { margin-top: 6px; accent-color: var(--accent); }
.static .todo.done > span { text-decoration: line-through; text-decoration-color: var(--faint); color: var(--muted); }
.static details { margin: 2px 0; } .static details > summary { cursor: pointer; } .static details > .inner { padding-left: 22px; }
.static blockquote { border-left: 3px solid var(--accent); margin: 10px 0; padding: 2px 16px; color: var(--text-2); }
.static .callout { display: flex; gap: 12px; padding: 14px 18px; border-radius: var(--r-md); background: var(--gray_bg); margin: 8px 0; }
.static .callout > .ic { font-size: 20px; line-height: 1.5; } .static .callout > .ic img { width: 22px; }
.static .callout > .body { flex: 1; min-width: 0; }
.static pre { background: var(--code); padding: 16px 20px; border-radius: var(--r-md); overflow-x: auto; font: 13.5px/1.6 var(--font-mono); position: relative; }
.static pre .lang { position: absolute; top: 6px; right: 12px; font-size: 11px; color: var(--muted); font-family: var(--font-ui); }
.static code.inline { background: var(--code); color: var(--code-text); padding: 1px 6px; border-radius: 5px; font: 85% var(--font-mono); }
.static hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.static figure { margin: 12px 0; } .static figure img, .static figure video { max-width: 100%; border-radius: var(--r-md); }
.static figcaption { color: var(--muted); font-size: 14px; margin-top: 6px; }
.static .cols { display: flex; gap: 32px; } .static .cols > .col { flex: 1; min-width: 0; }
.static .bookmark { display: block; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; margin: 8px 0; text-decoration: none; word-break: break-all; background: var(--surface); transition: box-shadow var(--fast), border-color var(--fast); }
.static .bookmark:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.static .fileblk { display: inline-flex; gap: 6px; padding: 4px 10px; border-radius: 8px; text-decoration: none; background: var(--hover); }
.static .fileblk:hover { background: var(--active); }
.static .subpage { display: flex; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 8px; text-decoration: none; font-weight: 500; transition: background var(--fast); }
.static .subpage:hover { background: var(--hover); }
.static .subpage .label { flex: initial; border-bottom: 1px solid var(--line-strong); }
.static .mention { text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.static .eq { font-family: "Times New Roman", serif; font-style: italic; text-align: center; margin: 10px 0; }
.static .unsupported { color: var(--muted); font-size: 13px; font-style: italic; }

/* tables / databases */
.static .tablewrap { overflow-x: auto; margin: 10px 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.static table { border-collapse: collapse; font-size: 14px; width: 100%; }
.static td, .static th { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 8px 12px; vertical-align: top; text-align: left; min-width: 120px; }
.static tr > :last-child { border-right: 0; } .static tbody tr:last-child > * { border-bottom: 0; }
.static table.simple tr:last-child > * { border-bottom: 0; }
.static th { font-weight: 500; font-size: 13px; color: var(--muted); background: var(--side); white-space: nowrap; }
.static table.simple th { color: var(--text); }
.db-toolbar { display: flex; gap: 10px; margin: 0 0 12px; align-items: center; flex-wrap: wrap; }
.db-toolbar input {
  height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; min-width: 220px; transition: border-color var(--fast), box-shadow var(--fast);
}
.db-toolbar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
th.sortable { cursor: pointer; user-select: none; } th.sortable:hover { background: var(--hover); color: var(--text); }
tr.dbrow td:first-child a { font-weight: 500; text-decoration: none; }
tr.dbrow td:first-child a:hover { color: var(--accent-text); }
tr.dbrow { transition: background var(--fast); }
tr.dbrow:hover { background: var(--hover); }
.tag { display: inline-block; padding: 1px 9px; border-radius: 999px; margin: 1px 4px 1px 0; font-size: 12.5px; font-weight: 500; line-height: 1.6; background: var(--gray_bg); color: var(--text-2); white-space: nowrap; }
.c-gray{color:var(--gray)} .c-brown{color:var(--brown)} .c-orange{color:var(--orange)} .c-yellow{color:var(--yellow)} .c-green{color:var(--green)}
.c-blue{color:var(--blue)} .c-purple{color:var(--purple)} .c-pink{color:var(--pink)} .c-red{color:var(--red)}
.bg-gray{background:var(--gray_bg)} .bg-brown{background:var(--brown_bg)} .bg-orange{background:var(--orange_bg)} .bg-yellow{background:var(--yellow_bg)} .bg-green{background:var(--green_bg)}
.bg-blue{background:var(--blue_bg)} .bg-purple{background:var(--purple_bg)} .bg-pink{background:var(--pink_bg)} .bg-red{background:var(--red_bg)} .bg-default{background:var(--gray_bg)}
.tag.bg-gray{color:var(--gray)} .tag.bg-brown{color:var(--brown)} .tag.bg-orange{color:var(--orange)} .tag.bg-yellow{color:var(--yellow)} .tag.bg-green{color:var(--green)}
.tag.bg-blue{color:var(--blue)} .tag.bg-purple{color:var(--purple)} .tag.bg-pink{color:var(--pink)} .tag.bg-red{color:var(--red)}

@media (max-width: 760px) {
  #sidebar { position: fixed; z-index: 10; width: 86vw; box-shadow: var(--shadow-lg); }
  #content { padding: 16px 20px 30vh; }
  .cols { flex-direction: column; gap: 0; }
  .prop .k { width: 110px; }
  h1.title { font-size: 32px; }
}

/* ---------------------------------------------------------------- editing */
#crumbs { display: flex; align-items: center; gap: 10px; }
#crumb-path { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; transition: opacity var(--normal); }
.status:empty { opacity: 0; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.status:empty::before { display: none; }
.status.busy::before { background: var(--accent); animation: sn-pulse 1s var(--ease) infinite; }
.status.err { color: var(--red); } .status.err::before { background: var(--red); }
button.ghost, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer;
  padding: 4px 10px; border-radius: 9px; transition: background var(--fast), color var(--fast), transform var(--fast), box-shadow var(--fast), border-color var(--fast);
}
button.ghost:hover, .btn:hover { background: var(--hover); color: var(--text); }
.btn { height: 34px; padding: 0 14px; border: 1px solid var(--line); color: var(--text); background: var(--surface); box-shadow: var(--shadow-xs); font-weight: 500; }
.btn:hover { border-color: var(--line-strong); background: var(--surface); box-shadow: var(--shadow-sm); }
.btn:active, button.ghost:active { transform: scale(.98); }
#menu-btn { width: 32px; height: 32px; padding: 0; letter-spacing: 1px; }

.page-head { position: relative; padding-top: 16px; }
.page-head .head-tools { height: 30px; opacity: 0; transition: opacity var(--normal); }
.page-head:hover .head-tools, .page-head:focus-within .head-tools { opacity: 1; }
.page-head .head-tools:empty { height: 0; }
button.page-icon {
  border: 0; background: none; padding: 6px; border-radius: 16px; cursor: pointer; margin: 0 0 2px -6px; color: inherit;
  transition: background var(--fast), transform var(--normal) var(--spring);
}
button.page-icon:hover { background: var(--hover); transform: translateY(-2px) rotate(-4deg); }
button.page-icon:active { transform: scale(.94); }
.icon-slot .page-icon { animation: sn-pop var(--slow) var(--spring); }
h1.title[contenteditable] { outline: none; margin-top: 4px; cursor: text; }
h1.title[contenteditable]:empty::before { content: attr(data-ph); color: var(--faint); }

/* page font / width options (like Notion's ••• menu) */
#content.font-serif { font-family: var(--font-serif); }
#content.font-mono { font-family: var(--font-mono); font-size: 14.5px; }
#content.small-text { font-size: 14px; }
#content.full-width { max-width: none; padding-left: 96px; padding-right: 96px; }

/* BlockNote editor: follow the page's font, colors and width */
#editor { margin: 0 -54px; }
#editor .bn-container {
  --bn-font-family: inherit;
  --bn-colors-editor-background: transparent;
  --bn-colors-editor-text: var(--text);
  --bn-colors-menu-background: var(--surface-raised);
  --bn-colors-menu-text: var(--text);
  --bn-colors-tooltip-background: var(--text);
  --bn-colors-tooltip-text: var(--bg);
  --bn-colors-hovered-background: var(--hover);
  --bn-colors-hovered-text: var(--text);
  --bn-colors-selected-background: var(--accent-soft);
  --bn-colors-selected-text: var(--accent-text);
  --bn-colors-disabled-background: var(--hover);
  --bn-colors-disabled-text: var(--faint);
  --bn-colors-shadow: rgba(40, 35, 25, .12);
  --bn-colors-border: var(--line);
  --bn-colors-side-menu: var(--faint);
  --bn-border-radius: 10px;
}
#editor .bn-default-styles { font-family: inherit; font-size: inherit; }
/* Calmer in-document headings: the page title carries the personality */
#editor [data-content-type="heading"] { font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }
#editor [data-content-type="heading"] > .bn-inline-content { font-weight: inherit; font-size: inherit; letter-spacing: inherit; }
#editor [data-content-type="heading"][data-level="1"] { font-size: 1.75em; }
#editor [data-content-type="heading"][data-level="2"] { font-size: 1.4em; }
#editor [data-content-type="heading"][data-level="3"] { font-size: 1.2em; }
#editor .bn-block-outer:has(> .bn-block > [data-content-type="heading"]) { margin-top: .9em; }
#content:lang(zh), #editor .bn-inline-content:lang(zh) { line-height: 1.85; }
#editor .bn-editor { padding-inline: 54px; }
#editor .bn-inline-content code, #editor .bn-editor code { font-family: var(--font-mono); }
#editor [data-content-type="codeBlock"] > div { border-radius: var(--r-md); }
#editor [data-content-type="quote"] blockquote, #editor .bn-block-content[data-content-type="quote"] { border-left-color: var(--accent); }
#editor .bn-editor [data-content-type="checkListItem"] input { accent-color: var(--accent); }
#editor .bn-editor [data-content-type="checkListItem"][data-checked="true"] .bn-inline-content { color: var(--muted); }
#editor .bn-editor ::selection { background: var(--ring); }
#editor .ProseMirror-selectednode { outline: 2px solid var(--ring) !important; outline-offset: 1px; border-radius: 8px; }
::highlight(search-hit) { background: var(--mark); color: inherit; }
.mantine-Menu-dropdown, .bn-menu-dropdown, .bn-suggestion-menu, .bn-toolbar {
  border-radius: var(--r-md) !important; box-shadow: var(--shadow-md) !important; border: 1px solid var(--line) !important;
}

.nl-callout { display: flex; gap: 12px; padding: 14px 18px; border-radius: var(--r-md); width: 100%; }
.nl-callout:not([class*="bg-"]) { background: var(--gray_bg); }
.nl-callout-emoji { font-size: 20px; line-height: 1.4; cursor: pointer; user-select: none; border-radius: 6px; transition: transform var(--normal) var(--spring); }
.nl-callout-emoji:hover { background: var(--hover); transform: scale(1.12); }
.nl-callout-text { flex: 1; min-width: 0; }
a.nl-subpage { display: flex; gap: 8px; align-items: center; padding: 3px 6px; border-radius: 8px; text-decoration: none; font-weight: 500; color: var(--text); width: 100%; transition: background var(--fast); }
a.nl-subpage:hover { background: var(--hover); }
a.nl-subpage .label { flex: initial; border-bottom: 1px solid var(--line-strong); }
.nl-raw { width: 100%; }

/* sidebar add buttons */
.node > .row .row-tools { margin-left: auto; display: flex; gap: 1px; opacity: 0; transition: opacity var(--fast); }
.node > .row:hover .row-tools, .node > .row:focus-within .row-tools { opacity: 1; }
.node > .row .add, .node > .row .more {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--muted); font-size: 15px; line-height: 1;
}
.node > .row .more { font-size: 10px; letter-spacing: 1px; }
.node > .row .add:hover, .node > .row .more:hover { background: var(--active); color: var(--text); }
.row.new-page {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; margin-top: 6px; color: var(--muted);
  text-decoration: none; border-radius: 8px; transition: background var(--fast), color var(--fast);
}
.row.new-page:hover { background: var(--hover); color: var(--accent-text); }

/* popovers */
.popover {
  position: fixed; z-index: 50; background: var(--surface-raised); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-md); padding: 6px; min-width: 228px; font-size: 14px;
  animation: sn-in var(--normal) var(--ease); transform-origin: top left;
}
.pop-label { color: var(--muted); font-size: 12px; padding: 4px 8px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fonts { display: flex; gap: 4px; margin-bottom: 6px; }
.fonts button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px;
  border: 1px solid transparent; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; font-size: 12px;
  transition: background var(--fast), border-color var(--fast);
}
.fonts button:hover { background: var(--hover); }
.fonts button.on { color: var(--accent-text); border-color: var(--accent); background: var(--accent-soft); }
.fonts .ag { font-size: 22px; color: var(--text); }
.ag.font-default { font-family: var(--font-ui); } .ag.font-serif { font-family: var(--font-serif); } .ag.font-mono { font-family: var(--font-mono); }
.pop-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 8px; border-radius: 8px;
  border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; transition: background var(--fast);
}
.pop-row:hover { background: var(--hover); }
.pop-row.danger { color: var(--red); } .pop-row.danger:hover { background: var(--red_bg); }
.pop-row input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; }
.popover hr { border: 0; border-top: 1px solid var(--line); margin: 6px 2px; }
.emoji-pop { width: 372px; padding: 10px; }
.emoji-top { display: flex; gap: 6px; margin-bottom: 8px; }
.emoji-q {
  flex: 1; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit;
}
.emoji-q:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.emoji-grid { display: grid; grid-template-columns: repeat(9, 1fr); max-height: 280px; overflow-y: auto; gap: 2px; }
.emoji-grid button { font-size: 22px; border: 0; background: none; padding: 4px; border-radius: 8px; cursor: pointer; transition: background var(--fast), transform var(--fast) var(--spring); }
.emoji-grid button:hover { background: var(--hover); transform: scale(1.15); }
.emoji-grid .muted { grid-column: 1 / -1; padding: 8px; }

@media (max-width: 760px) {
  #editor { margin: 0 -20px; }
  #editor .bn-editor { padding-inline: 20px; }
  #content.full-width { padding-left: 20px; padding-right: 20px; }
}

/* ---------------------------------------------------------------- formatting toolbar */
.nl-toolbar {
  position: sticky; top: 56px; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 0;
  min-height: 42px; margin: 0 54px 16px; padding: 4px 6px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-float); font-size: 14px; transition: box-shadow var(--normal);
}
.tb-btn {
  min-width: 30px; height: 32px; padding: 0 6px; border: 0; border-radius: 7px; background: none; color: var(--text-2);
  cursor: pointer; font: inherit; font-size: 14.5px; display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  transition: background var(--fast), color var(--fast), transform var(--fast);
}
.tb-btn:hover { background: var(--hover); color: var(--text); }
.tb-btn:active { transform: scale(.94); }
.tb-btn.on { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.tb-btn:disabled { opacity: .35; cursor: default; background: none; transform: none; }
.tb-btn code { font-size: 12px; font-family: var(--font-mono); }
.tb-select {
  height: 32px; padding: 0 24px 0 10px; max-width: 132px; border: 0; border-radius: 7px; color: var(--text-2);
  font: inherit; font-size: 13px; cursor: pointer; appearance: none; -webkit-appearance: none;
  background: var(--hover) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238a8880' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 9px center / 9px 6px;
  transition: background-color var(--fast);
}
.tb-select:hover { background-color: var(--active); color: var(--text); }
.tb-select:focus { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.tb-select option { background: var(--surface-raised); color: var(--text); }
.tb-sep { width: 1px; height: 14px; background: var(--line); margin: 0 4px; opacity: .8; }
.tb-wrap { position: relative; }
.tb-color { font-weight: 600; padding: 0 3px; border-radius: 4px; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.tb-color.bg-none { background: none; }
.tb-menu {
  position: absolute; top: 38px; left: 0; z-index: 10; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-md); padding: 10px; width: 262px; animation: sn-in var(--normal) var(--ease); transform-origin: top left;
}
.tb-menu-label { font-size: 12px; color: var(--muted); margin: 2px 2px 6px; }
.tb-swatches { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin-bottom: 8px; }
.tb-swatch { height: 22px; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; font-weight: 600; font-size: 13px; padding: 0; color: var(--text); transition: transform var(--fast) var(--spring); }
.tb-swatch.c-default { color: var(--text); }
.tb-swatch.bg-default { background: var(--bg); }
.tb-swatch:hover { outline: 2px solid var(--accent); outline-offset: 1px; transform: scale(1.1); }
.tb-align { display: inline-flex; flex-direction: column; gap: 2px; width: 14px; }
.tb-align i { display: block; width: 100%; height: 2px; background: currentColor; border-radius: 1px; }
.tb-align i:nth-child(2) { width: 60%; }
.tb-align-center { align-items: center; }
.tb-align-right { align-items: flex-end; }
@media (max-width: 760px) { .nl-toolbar { margin: 0 20px 10px; } }

/* ---------------------------------------------------------------- import dialog & modals */
.side-import {
  display: flex; align-items: center; gap: 8px; margin: 0 12px 8px; height: 34px; padding: 0 10px; border: 1px dashed var(--line-strong);
  border-radius: 10px; background: none; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; text-align: left;
  transition: background var(--fast), border-color var(--fast), color var(--fast);
}
.side-import:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.modal-back {
  position: fixed; inset: 0; z-index: 100; background: rgba(28, 24, 20, .32); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px; overflow-y: auto; animation: sn-fade var(--normal) var(--ease);
}
.modal {
  position: relative; width: min(920px, 100%); background: var(--surface-raised); color: var(--text); border-radius: var(--r-xl);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 30px 32px 26px; font-size: 14.5px;
  animation: sn-rise var(--slow) var(--ease);
}
.modal h2 { margin: 0 0 6px; font: 600 24px/1.25 var(--font-display); letter-spacing: -.01em; }
.modal-x { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; padding: 0; font-size: 14px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.choice { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; display: flex; flex-direction: column; background: var(--bg); }
.choice-head { display: flex; gap: 12px; align-items: center; margin-bottom: 4px; }
.choice-icon { font-size: 26px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-xs); }
.badge { display: block; width: fit-content; font-size: 12px; font-weight: 500; color: var(--green); background: var(--green_bg); border-radius: 999px; padding: 0 8px; margin-top: 3px; }
.choice ol { padding-left: 20px; margin: 10px 0 14px; line-height: 1.6; }
.choice li { margin-bottom: 4px; }
.choice a { color: var(--accent-text); }
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 12px; border: 2px dashed var(--line-strong);
  border-radius: var(--r-md); cursor: pointer; text-align: center; color: var(--muted); background: var(--surface);
  transition: background var(--fast), border-color var(--fast), transform var(--fast);
}
.drop:hover, .drop.over, .drop:focus { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); outline: none; }
.drop:active { transform: scale(.99); }
.drop-big { font-size: 28px; }
.secret { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-family: var(--font-mono); font-size: 13px; }
.remember { display: flex; gap: 6px; align-items: center; margin: 8px 0; font-size: 13.5px; color: var(--muted); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; font-weight: 600; padding: 0 18px; box-shadow: 0 2px 8px var(--ring), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn.primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px var(--ring), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn.primary:active { transform: translateY(0) scale(.98); }
:root[data-theme="dark"] .btn.primary { color: #1c1630; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #1c1630; } }
.fine { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; line-height: 1.55; }
.import-progress { margin-top: 20px; text-align: center; }
.import-progress .bar { height: 8px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.import-progress .bar i { display: block; height: 100%; width: 8%; background: linear-gradient(90deg, var(--accent), #c7a6ee); border-radius: 999px; transition: width .4s var(--ease); }
.import-progress .msg { margin: 12px 0 6px; }
.import-progress .log { text-align: left; font-size: 12px; color: var(--muted); max-height: 140px; overflow: auto; background: var(--side); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
.done-big { font-size: 44px; animation: sn-pop var(--slow) var(--spring); }
.modal .err { color: var(--red); margin: 12px 0 0; }
@media (max-width: 760px) { .choices { grid-template-columns: 1fr; } .modal { padding: 24px 20px; } }
.star-ask { margin: 18px auto 0; max-width: 420px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.star-ask a { color: var(--accent-text); font-weight: 500; }

/* ---------------------------------------------------------------- command palette (⌘K) */
.palette-back { align-items: flex-start; padding-top: 14vh; }
.palette {
  width: min(600px, 100%); background: var(--surface-raised); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lg); overflow: hidden; animation: sn-in var(--normal) var(--ease); transform-origin: top center;
}
.pal-top { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.pal-top .ico { width: 19px; height: 19px; color: var(--accent); }
.pal-q { flex: 1; height: 58px; border: 0; background: none; color: var(--text); font: 400 17px var(--font-ui); outline: none; }
.pal-q::placeholder { color: var(--faint); }
.pal-list { max-height: min(52vh, 420px); overflow-y: auto; padding: 6px; }
.pal-group { padding: 10px 12px 4px; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.pal-item {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 12px; border-radius: 10px; color: var(--text);
  text-decoration: none; cursor: pointer;
}
.pal-item .pi { width: 26px; height: 26px; display: grid; place-items: center; font-size: 17px; border-radius: 8px; background: var(--hover); flex-shrink: 0; }
.pal-item .pi img { width: 18px; height: 18px; border-radius: 4px; object-fit: cover; }
.pal-item .pt { flex: 1; min-width: 0; }
.pal-item .pt b { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-item .ps { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-item .pk { font-size: 12px; color: var(--faint); white-space: nowrap; }
.pal-item.sel { background: var(--accent-soft); }
.pal-item.sel .pi { background: var(--surface); }
.pal-item.sel .pk { color: var(--accent-text); }
.pal-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); background: var(--bg); }
.pal-foot span { display: inline-flex; align-items: center; gap: 6px; }
.pal-empty { padding: 28px 16px 24px; text-align: center; color: var(--muted); }
.pal-empty .art { width: 96px; height: 96px; margin: 0 auto 6px; color: var(--text-2); }
.pal-empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }

/* ---------------------------------------------------------------- home & empty states */
.home { padding-top: 40px; }
.home-hero { display: flex; align-items: center; gap: 22px; margin-bottom: 28px; }
.home-hero .art { width: 108px; height: 108px; flex-shrink: 0; color: var(--text-2); animation: sn-float 6s ease-in-out infinite; }
.home-date { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.home h1.title { margin: 6px 0 6px; }
.home-sub { color: var(--muted); margin: 0; }
.home-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 34px; }
.home-actions .btn kbd { margin-left: 4px; }
.home h3 { font: 600 13px var(--font-ui); letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin: 0 0 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.card {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; min-height: 112px; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; color: var(--text); box-shadow: var(--shadow-xs);
  transition: transform var(--normal) var(--ease), box-shadow var(--normal) var(--ease), border-color var(--normal);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card .ci { font-size: 26px; line-height: 1; }
.card .ci img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.card .ct { font-weight: 600; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card .cd { margin-top: auto; font-size: 12px; color: var(--muted); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .art { width: 120px; height: 120px; margin: 0 auto 10px; color: var(--text-2); }
.empty b { display: block; font-size: 18px; color: var(--text); margin-bottom: 4px; }

/* loading skeleton */
.skel { padding-top: 36px; }
.skel i { display: block; height: 14px; border-radius: 8px; margin: 14px 0; background: linear-gradient(90deg, var(--hover) 25%, var(--active) 50%, var(--hover) 75%); background-size: 200% 100%; animation: sn-shimmer 1.2s linear infinite; }
.skel i.e { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 22px; }
.skel i.t { width: 55%; height: 34px; margin-bottom: 28px; }
.skel i:nth-child(4) { width: 92%; } .skel i:nth-child(5) { width: 78%; } .skel i:nth-child(6) { width: 85%; } .skel i:nth-child(7) { width: 40%; }

/* the [hidden] attribute must win over display rules like .choices { display: grid } */
[hidden] { display: none !important; }

@keyframes sn-fade { from { opacity: 0; } }
@keyframes sn-in { from { opacity: 0; transform: scale(.97) translateY(-4px); } }
@keyframes sn-rise { from { opacity: 0; transform: translateY(10px) scale(.99); } }
@keyframes sn-pop { 0% { transform: scale(.8); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes sn-pulse { 50% { opacity: .35; transform: scale(.8); } }
@keyframes sn-float { 50% { transform: translateY(-5px) rotate(-1.5deg); } }
@keyframes sn-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ---------------------------------------------------------------- premium */
.premium-pill {
  border: 0; border-radius: 999px; height: 24px; padding: 0 10px; font: 600 11.5px var(--font-ui); cursor: pointer; white-space: nowrap;
  background: linear-gradient(135deg, #f9e3a0, #f4cf62); color: #5b4313; box-shadow: 0 1px 2px rgba(120, 90, 20, .2);
  transition: transform var(--fast) var(--spring), box-shadow var(--fast);
}
.premium-pill:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(200, 150, 40, .3); }
.premium-pill.on { background: var(--accent-soft); color: var(--accent-text); box-shadow: none; }
.modal.upsell { width: min(560px, 100%); }
.upsell-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; padding-right: 30px; }
.upsell-head img { border-radius: 12px; box-shadow: 0 8px 20px rgba(226, 178, 64, .3); flex-shrink: 0; }
.upsell-head h2 { margin-bottom: 2px; }
.upsell-head p { margin: 0; }
.feat { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.feat li { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.45; }
.feat .fi { font-size: 18px; line-height: 1.2; }
.soon { font-size: 10.5px; font-weight: 600; color: var(--muted); background: var(--hover); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); }
.plan.best { border-color: var(--accent); background: var(--accent-soft); }
.plan .price { font: 600 28px/1.1 var(--font-display); margin: 4px 0 0; }
.plan .price span { font: 500 13px var(--font-ui); color: var(--muted); margin-left: 2px; }
.plan .small { font-size: 12.5px; margin-bottom: 10px; }
.plan .btn { margin-top: auto; }
.ribbon { position: absolute; top: -10px; right: 14px; font-size: 11px; font-weight: 600; color: #5b4313; background: #f6d77a; border-radius: 999px; padding: 2px 9px; }
.premium-badge { color: #8a6514 !important; background: #fbefc4 !important; }
.drop.disabled, .btn.disabled { pointer-events: none; opacity: .55; }
@media (max-width: 760px) { .feat, .plans { grid-template-columns: 1fr; } }
