/* personal — Appearance choices on top of the looks and themes:
   data-font, data-textsize, data-density, data-corners, data-motion, data-contrast, data-hub, data-icons on <html>
   (set by themeSet() in js/app/theme.js and, before first paint, by js/theme-boot.js).
   No attribute = the default, so nothing here changes the app until someone picks something.

   Self-hosted fonts (SIL Open Font License 1.1, licences in /static/fonts/OFL-*.txt):
   Atkinson Hyperlegible (Braille Institute), Lexend (The Lexend Project Authors), Fredoka (The Fredoka Project Authors).
   A font file only downloads once some text on screen uses it. */
/* Atkinson Hyperlegible, latin-ext */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/atkinson-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Atkinson Hyperlegible, latin */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/atkinson-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Atkinson Hyperlegible, latin-ext */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/static/fonts/atkinson-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Atkinson Hyperlegible, latin */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/static/fonts/atkinson-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Lexend, latin-ext */
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/static/fonts/lexend-300-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Lexend, latin */
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/static/fonts/lexend-300-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Fredoka, latin-ext */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/static/fonts/fredoka-300-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Fredoka, latin */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/static/fonts/fredoka-300-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* ── fonts ─────────────────────────────────────────────────────────────────────
   "auto" keeps each look's own rounded faces (calm: Kiwi Maru + Zen Maru Gothic,
   café: Mochiy Pop One + M PLUS Rounded). :root[…] outranks [data-look] in calm.css. */
:root {
  --font-sys: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
:root[data-font="clean"] { --display: var(--font-sys); --text: var(--font-sys); }
:root[data-font="readable"] { --display: "Atkinson Hyperlegible", var(--font-sys); --text: "Atkinson Hyperlegible", var(--font-sys); }
:root[data-font="easy"] { --display: "Lexend", var(--font-sys); --text: "Lexend", var(--font-sys); }
:root[data-font="playful"] { --display: "Fredoka", "M PLUS Rounded 1c", var(--font-sys); --text: "Fredoka", "M PLUS Rounded 1c", var(--font-sys); }
/* headings in the café look are weight 400 by design; these faces read better a touch bolder */
:root[data-font="clean"] :is(h1, h2, .topbar .title), :root[data-font="readable"] :is(h1, h2, .topbar .title) { font-weight: 700; }
:root[data-font="easy"] :is(h1, h2, .topbar .title), :root[data-font="playful"] :is(h1, h2, .topbar .title) { font-weight: 600; }
:root[data-font="easy"] body { letter-spacing: 0; }
:root[data-font="readable"] body, :root[data-font="easy"] body { line-height: 1.65; }

/* ── text size: rem-based sizes follow the root, the px bases are set again here ── */
:root { --ts: 1; }
:root[data-textsize="s"] { --ts: .92; }
:root[data-textsize="l"] { --ts: 1.12; }
:root[data-textsize="xl"] { --ts: 1.26; }
:root[data-textsize] { font-size: calc(100% * var(--ts)); }
:root[data-textsize] body { font-size: calc(16px * var(--ts)); }
:root[data-textsize][data-look="calm"] body { font-size: calc(15px * var(--ts)); }
/* fields never go under 16px (phones zoom in on smaller ones) */
:root[data-textsize] :is(input, select, textarea) { font-size: max(16px, calc(16px * var(--ts))); }
:root[data-textsize="l"] .nav a, :root[data-textsize="xl"] .nav a { font-size: .66rem; }
:root[data-textsize="xl"] .tool-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* ── stronger contrast: softer greys and hairlines move toward the ink ──────────
   (set one level below <html>: a variable can't be mixed from itself on the same element) */
:root[data-contrast="more"] body {
  --hc-soft: color-mix(in oklab, var(--ink-soft) 45%, var(--ink));
  --hc-rule: color-mix(in oklab, var(--rule) 70%, var(--ink));
}
:root[data-contrast="more"] body > * { --ink-soft: var(--hc-soft); --muted: var(--hc-soft); --rule: var(--hc-rule); --line: var(--hc-rule); }
:root[data-contrast="more"] :focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
:root[data-contrast="more"] .chip.on { border-color: var(--ink); }

/* ── density ───────────────────────────────────────────────────────────────── */
:root[data-density="compact"] .card { padding: 11px 13px 10px; margin-bottom: 9px; }
:root[data-density="compact"] .list > li { padding-top: 7px; padding-bottom: 7px; }
:root[data-density="compact"] .section-title { margin: 14px 2px 8px; }
:root[data-density="compact"] .spacer { height: 6px; }
:root[data-density="compact"] .set-row { padding-top: 9px; padding-bottom: 9px; }
:root[data-density="compact"] .tool-grid { gap: 8px; }
:root[data-density="compact"] .tool-tile a { min-height: 92px; padding: 10px 11px; }
:root[data-density="compact"] .chips { gap: 6px; }
:root[data-density="compact"] main { padding-top: 4px; }

/* ── corners ───────────────────────────────────────────────────────────────── */
:root[data-corners="soft"] { --r: 10px; --r-ctl: 8px; --r-pill: 10px; --r-tile: 12px; }
:root[data-corners="sharp"] { --r: 4px; --r-ctl: 3px; --r-pill: 4px; --r-tile: 4px; }
:root[data-corners] :is(.btn, .chip, .tool-search, .sharing-pill) { border-radius: var(--r-pill); }
:root[data-corners] :is(.tool-tile, .tile, .theme-swatches button, .look-pick button, .ap-opt, .ap-preset, .nav a) { border-radius: var(--r-tile); }
:root[data-corners] .nav { border-radius: calc(var(--r-tile) + 6px); }
:root[data-corners] .sheet { border-radius: var(--r) var(--r) 0 0; }
:root[data-corners] .ticon-soft { border-radius: calc(var(--r-tile) * .6); }

/* ── reduce motion: the switch, plus the device setting when the switch is on "auto" ── */
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}

/* ── tool, game and place icons (toolIcon) ─────────────────────────────────── */
.ticon { display: inline-grid; place-items: center; width: 1em; height: 1em; line-height: 1; flex: none; vertical-align: middle; }
.ticon svg { width: 100%; height: 100%; display: block; }
.ticon-line { color: var(--me-strong); }
.ticon-emoji { width: auto; height: auto; }
/* soft colour: the line icon on a pastel tile, one pastel per group */
.ticon[data-cat="us"] { --cat: #e99ab0; }
.ticon[data-cat="together"] { --cat: #7fc39c; }
.ticon[data-cat="body"] { --cat: #f2a47c; }
.ticon[data-cat="words"] { --cat: #ae98e0; }
.ticon[data-cat="day"] { --cat: #7fb2e5; }
.ticon[data-cat="play"] { --cat: #e3bd4f; }
.ticon-soft {
  width: 1.4em; height: 1.4em; border-radius: .42em;
  background: color-mix(in oklab, var(--cat) 26%, var(--raised));
  color: color-mix(in oklab, var(--cat), #2b2320 52%);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--cat) 30%, transparent);
}
.ticon-soft svg { width: 64%; height: 64%; }
[data-mode="dark"] .ticon-soft { background: color-mix(in oklab, var(--cat) 26%, var(--raised)); color: color-mix(in oklab, var(--cat), #fff 30%); }
/* in a Life tile: the line icon as big as the old emoji, the soft tile a little smaller overall */
.tool-tile .ti:has(> .ticon) { display: block; line-height: 1; }
.tool-tile .ti:has(> .ticon-soft) { font-size: 1.5rem; }
/* outline when idle, soft-filled when active (the dock and sidebar switch by class, no re-render) */
:is(.nav a.active, .side-link.active) .i .f { fill: currentColor; fill-opacity: .22; }

/* ── Life hub as a list (Appearance → Layout) ───────────────────────────────── */
:root[data-hub="list"] .tool-grid { grid-template-columns: 1fr; gap: 0; background: var(--raised); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
:root[data-hub="list"] .tool-tile { border: 0; border-radius: 0; box-shadow: none; background: none; transform: none; }
:root[data-hub="list"] .tool-tile + .tool-tile { border-top: 1px solid var(--rule); }
:root[data-hub="list"] .tool-tile a {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 0; align-items: center;
  min-height: 0; padding: 10px 48px 10px 14px;
}
:root[data-hub="list"] .tool-tile .ti { grid-row: 1 / 3; margin: 0; font-size: 1.4rem; width: 1.6em; display: grid; place-items: center; }
:root[data-hub="list"] .tool-tile .sum { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-hub="list"] .tool-tile .pin { top: 50%; transform: translateY(-50%); }
:root[data-hub="list"] .tool-tile:hover { transform: none; box-shadow: none; background: color-mix(in srgb, var(--me) 4%, transparent); }

/* ── Appearance page ───────────────────────────────────────────────────────── */
.ap-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ap-preset, .ap-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 12px; border-radius: 16px;
  border: 1px solid var(--rule); background: var(--raised); color: var(--ink); cursor: pointer; font: inherit; min-height: 44px;
}
.ap-preset.on, .ap-opt.on { border-color: var(--me-strong); box-shadow: 0 0 0 2px var(--me-tint); }
.ap-preset b, .ap-opt b { font-size: .95rem; line-height: 1.25; }
.ap-preset small, .ap-opt small { color: var(--ink-soft); line-height: 1.35; font-size: .8rem; }
.ap-preset .ap-dots { display: flex; gap: 5px; font-size: 1.3rem; margin-bottom: 2px; }
.ap-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 40%), 1fr)); gap: 8px; }
.ap-opts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ap-opts.three .ap-opt { padding: 10px; }
.ap-opts.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ap-opt .ap-sample { display: flex; flex-wrap: wrap; gap: 5px; font-size: 1.1rem; align-items: center; min-height: 1.8rem; }
.ap-opt .ap-font { font-size: 1.35rem; line-height: 1.2; }
.ap-opts.four .ap-opt { align-items: center; text-align: center; padding: 10px 4px; }
.ap-opt .ap-a { font-weight: 700; line-height: 1; }
.ap-preview { border: 1px dashed var(--rule); border-radius: var(--r); padding: 12px; background: var(--paper); }
.ap-preview .ap-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ap-preview .ap-icons { display: flex; gap: 14px; font-size: 1.5rem; margin: 10px 0; flex-wrap: wrap; }
.ap-preview h3 { margin: 0; }
.ap-preview p { margin: 4px 0 10px; }
.ap-switches > li { gap: 12px; }

/* calm + dark: the chosen chip's deep "on accent" text sat on a dark tint; use the ink instead */
[data-look="calm"][data-mode="dark"] .chip.on { color: var(--ink); }

/* ── background pattern (Appearance → Background) ──────────────────────────────
   Independent of the look: "auto" (no attribute) keeps each look's own paper
   (dot paper for Calm, gingham for Café). A photo background always wins. */
:root[data-bg]:not(.has-wall) body {
  --wash-a: radial-gradient(900px 520px at 105% -8%, color-mix(in srgb, var(--me) 14%, transparent), transparent 62%);
  --wash-b: radial-gradient(800px 480px at -15% 108%, color-mix(in srgb, var(--you) 12%, transparent), transparent 62%);
  --pat: color-mix(in srgb, var(--ink) 9%, transparent);
  background-attachment: fixed;
}
:root[data-bg="plain"]:not(.has-wall) body { background-image: var(--wash-a), var(--wash-b); background-size: auto; }
:root[data-bg="dots"]:not(.has-wall) body {
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 13%, transparent) 1px, transparent 1.4px), var(--wash-a), var(--wash-b);
  background-size: 22px 22px, auto, auto;
}
:root[data-bg="grid"]:not(.has-wall) body {
  background-image: linear-gradient(var(--pat) 1px, transparent 1px), linear-gradient(90deg, var(--pat) 1px, transparent 1px), var(--wash-a), var(--wash-b);
  background-size: 24px 24px, 24px 24px, auto, auto;
}
:root[data-bg="lined"]:not(.has-wall) body {
  background-image: linear-gradient(transparent 27px, var(--pat) 27px, var(--pat) 28px), var(--wash-a), var(--wash-b);
  background-size: 100% 28px, auto, auto;
}
:root[data-bg="gingham"]:not(.has-wall) body {
  background-image:
    repeating-linear-gradient(0deg, color-mix(in srgb, var(--me) 7%, transparent) 0 22px, transparent 22px 44px),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--me) 7%, transparent) 0 22px, transparent 22px 44px), var(--wash-a), var(--wash-b);
  background-size: auto;
}
:root[data-bg="stripes"]:not(.has-wall) body {
  background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--me) 7%, transparent) 0 14px, transparent 14px 28px), var(--wash-a), var(--wash-b);
  background-size: auto;
}
:root[data-bg="hearts"]:not(.has-wall) body {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M12 17.5s-5-3-5-6.6A2.7 2.7 0 0 1 12 9.6a2.7 2.7 0 0 1 5 1.3c0 3.6-5 6.6-5 6.6zM36 41.5s-5-3-5-6.6a2.7 2.7 0 0 1 5-1.3 2.7 2.7 0 0 1 5 1.3c0 3.6-5 6.6-5 6.6z' fill='%23e99ab0' fill-opacity='.28'/%3E%3C/svg%3E"), var(--wash-a), var(--wash-b);
  background-size: 48px 48px, auto, auto;
}
:root[data-bg="stars"]:not(.has-wall) body {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='%23e3bd4f' fill-opacity='.32'%3E%3Cpath d='m14 8 1.6 3.4 3.7.5-2.7 2.6.7 3.7-3.3-1.8-3.3 1.8.7-3.7-2.7-2.6 3.7-.5z'/%3E%3Ccircle cx='42' cy='40' r='1.6'/%3E%3Ccircle cx='38' cy='16' r='1'/%3E%3Ccircle cx='18' cy='44' r='1'/%3E%3C/g%3E%3C/svg%3E"), var(--wash-a), var(--wash-b);
  background-size: 56px 56px, auto, auto;
}
:root[data-bg="waves"]:not(.has-wall) body {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='24' viewBox='0 0 80 24'%3E%3Cpath d='M0 12c10 0 10-8 20-8s10 8 20 8 10-8 20-8 10 8 20 8' fill='none' stroke='%237fb2e5' stroke-opacity='.3' stroke-width='1.6'/%3E%3C/svg%3E"), var(--wash-a), var(--wash-b);
  background-size: 80px 24px, auto, auto;
}
/* Café's own gingham is quieter at night */
:root[data-look="cafe"][data-mode="dark"]:not([data-bg]):not(.has-wall) body {
  background-image:
    radial-gradient(1200px 600px at 110% -10%, color-mix(in srgb, var(--me) 14%, transparent), transparent 60%),
    radial-gradient(900px 500px at -20% 110%, color-mix(in srgb, var(--you) 10%, transparent), transparent 60%),
    repeating-linear-gradient(0deg, color-mix(in srgb, var(--me) 3.5%, transparent) 0 22px, transparent 22px 44px),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--me) 3.5%, transparent) 0 22px, transparent 22px 44px);
}

/* ── corners reach every surface, in both looks (Café sets fixed radii) ──────── */
:root[data-corners] :is(.card, .k-card, .kpi, .who-card, .tile, .sheet-body, .fab, .k-fab, .seg, .tool-tile a, .money-grid .mg, .pet-act, .pet-tabs a) { border-radius: var(--r-tile); }
:root[data-corners] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea, .seg button, .k-seg button, .toast) { border-radius: var(--r-ctl); }

/* ── Café: the big bubbly title must still fit beside the top-bar buttons ────── */
:root[data-look="cafe"] .topbar .title { font-size: clamp(1.1rem, 5.4vw, 1.55rem); }
/* long titles shrink to fit: see fitTitle() in app/router.js */

/* ── Appearance → Background picker: a small live sample of each pattern ────── */
.ap-bgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 4px 0 12px; }
.ap-bg { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px; border: 1.5px solid var(--rule); border-radius: var(--r-tile, 14px); background: var(--raised); color: var(--ink); font: inherit; cursor: pointer; }
.ap-bg.on { border-color: var(--me-strong); box-shadow: 0 0 0 2px color-mix(in srgb, var(--me) 30%, transparent); }
.ap-bg small { font-size: .74rem; font-weight: 600; text-align: center; line-height: 1.2; }
.ap-bg-sample { width: 100%; height: 44px; border-radius: calc(var(--r-tile, 14px) * .6); background-color: var(--paper); border: 1px solid var(--rule);
  --pat: color-mix(in srgb, var(--ink) 12%, transparent); }
.ap-bg-sample[data-sample="plain"] { background-image: radial-gradient(60px 40px at 100% 0, color-mix(in srgb, var(--me) 22%, transparent), transparent 70%); }
.ap-bg-sample[data-sample="dots"] { background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 22%, transparent) 1px, transparent 1.4px); background-size: 9px 9px; }
.ap-bg-sample[data-sample="grid"] { background-image: linear-gradient(var(--pat) 1px, transparent 1px), linear-gradient(90deg, var(--pat) 1px, transparent 1px); background-size: 10px 10px; }
.ap-bg-sample[data-sample="lined"] { background-image: linear-gradient(transparent 10px, var(--pat) 10px, var(--pat) 11px); background-size: 100% 11px; }
.ap-bg-sample[data-sample="gingham"] { background-image: repeating-linear-gradient(0deg, color-mix(in srgb, var(--me) 14%, transparent) 0 8px, transparent 8px 16px), repeating-linear-gradient(90deg, color-mix(in srgb, var(--me) 14%, transparent) 0 8px, transparent 8px 16px); }
.ap-bg-sample[data-sample="stripes"] { background-image: repeating-linear-gradient(135deg, color-mix(in srgb, var(--me) 14%, transparent) 0 6px, transparent 6px 12px); }
.ap-bg-sample[data-sample="hearts"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 48 48'%3E%3Cpath d='M12 17.5s-5-3-5-6.6A2.7 2.7 0 0 1 12 9.6a2.7 2.7 0 0 1 5 1.3c0 3.6-5 6.6-5 6.6zM36 41.5s-5-3-5-6.6a2.7 2.7 0 0 1 5-1.3 2.7 2.7 0 0 1 5 1.3c0 3.6-5 6.6-5 6.6z' fill='%23e99ab0' fill-opacity='.6'/%3E%3C/svg%3E"); background-size: 22px 22px; }
.ap-bg-sample[data-sample="stars"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 56 56'%3E%3Cg fill='%23e3bd4f' fill-opacity='.7'%3E%3Cpath d='m14 8 1.6 3.4 3.7.5-2.7 2.6.7 3.7-3.3-1.8-3.3 1.8.7-3.7-2.7-2.6 3.7-.5z'/%3E%3Ccircle cx='42' cy='40' r='2.4'/%3E%3Ccircle cx='38' cy='16' r='1.6'/%3E%3C/g%3E%3C/svg%3E"); background-size: 26px 26px; }
.ap-bg-sample[data-sample="waves"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='12' viewBox='0 0 80 24'%3E%3Cpath d='M0 12c10 0 10-8 20-8s10 8 20 8 10-8 20-8 10 8 20 8' fill='none' stroke='%237fb2e5' stroke-opacity='.7' stroke-width='2.4'/%3E%3C/svg%3E"); background-size: 40px 12px; }

/* ── Life hub: search with a Cards / List switch beside it ─────────────────── */
.hub-bar { display: flex; align-items: center; gap: 8px; }
.hub-bar .tool-search { flex: 1; min-width: 0; margin-bottom: 0; }
.hub-views { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-pill, 99px); background: var(--paper-2); flex: none; }
.hub-views .hub-view { width: 38px; height: 38px; box-shadow: none; background: transparent; color: var(--ink-soft); }
.hub-views .hub-view.on { background: var(--raised); color: var(--me-strong); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.hub-bar + section, .hub-bar + * { margin-top: 12px; }

/* Linen: a fine woven crosshatch. The Muji palette uses it as its own paper (Calm look). */
:root[data-bg="linen"]:not(.has-wall) body,
:root[data-theme="muji"][data-look="calm"]:not([data-bg]):not(.has-wall) body {
  background-image:
    repeating-linear-gradient(0deg, color-mix(in srgb, var(--ink) 2.6%, transparent) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 2.6%, transparent) 0 1px, transparent 1px 3px);
  background-size: auto;
}
/* Oak grain: long, uneven vertical streaks in two tones, like a light oak tabletop. */
:root[data-bg="wood"]:not(.has-wall) body {
  background-image:
    repeating-linear-gradient(90deg, color-mix(in srgb, #8a6a4a 5%, transparent) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(90deg, transparent 0 17px, color-mix(in srgb, #8a6a4a 4.5%, transparent) 17px 19px, transparent 19px 41px),
    repeating-linear-gradient(91deg, transparent 0 53px, color-mix(in srgb, #b8946b 7%, transparent) 53px 56px, transparent 56px 97px),
    linear-gradient(180deg, color-mix(in srgb, #d8c3a5 12%, transparent), transparent 40%);
  background-size: auto;
}
.ap-bg-sample[data-sample="linen"] { background-image: repeating-linear-gradient(0deg, color-mix(in srgb, var(--ink) 8%, transparent) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink) 8%, transparent) 0 1px, transparent 1px 3px); }
.ap-bg-sample[data-sample="wood"] { background-image: repeating-linear-gradient(90deg, color-mix(in srgb, #8a6a4a 16%, transparent) 0 1px, transparent 1px 6px), repeating-linear-gradient(90deg, transparent 0 11px, color-mix(in srgb, #8a6a4a 14%, transparent) 11px 13px, transparent 13px 29px); background-color: color-mix(in srgb, #d8c3a5 22%, var(--paper)); }
/* tab bar and side menu in the "Soft colour" and "Classic emoji" icon styles */
.nav a > .ticon { font-size: 17px; margin-bottom: 2px; }
.nav a > .ticon-emoji { font-size: 21px; }
.side-link .i > .ticon { width: 100%; height: 100%; font-size: 15px; }
.side-link .i > .ticon-emoji { font-size: 19px; width: auto; height: auto; }
.ap-bg-sample.photo { background-size: cover; background-position: center; }
