/* Gratitude — design tokens */
:root {
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);

  --ink: #2b2622;
  --ink-soft: #6e645c;
  --ink-faint: #a0958b;
  --card: rgba(255, 255, 255, .62);
  --card-solid: #fffaf5;
  --line: rgba(70, 45, 30, .11);
  --field: rgba(255, 255, 255, .55);
  --shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 20px 50px -24px rgba(90, 55, 30, .28);

  --sky-top: #fde2cf;
  --sky-bottom: #fff5ec;
  --hill-back: #d9dfcc;
  --hill-front: #c3cfb6;
  --sun: #ffd9a8;
  --accent: #b8623a;
  --accent-soft: rgba(184, 98, 58, .12);
  --on-accent: #fffaf5;

  --m1: #8fa0b8; --m2: #a9a3c9; --m3: #c9b58a; --m4: #e0a565; --m5: #e38a6a;
}

[data-ambience="forest"] {
  --sky-top: #dce9db; --sky-bottom: #f6f8f0;
  --hill-back: #bfd3b8; --hill-front: #9db993; --sun: #f6ecb8;
  --accent: #46765a; --accent-soft: rgba(70, 118, 90, .12);
  --ink: #232a25; --ink-soft: #626d64;
}
[data-ambience="ocean"] {
  --sky-top: #d6e6ef; --sky-bottom: #f4f9fb;
  --hill-back: #bcd1de; --hill-front: #9ab7c9; --sun: #fbe7c4;
  --accent: #33698a; --accent-soft: rgba(51, 105, 138, .12);
  --ink: #202a31; --ink-soft: #5f6e79;
}

[data-mode="dark"] {
  --ink: #f2ebe4; --ink-soft: #b3a89e; --ink-faint: #7d736a;
  --card: rgba(255, 255, 255, .06);
  --card-solid: #241e1f;
  --line: rgba(255, 255, 255, .1);
  --field: rgba(255, 255, 255, .05);
  --shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 24px 60px -28px rgba(0, 0, 0, .7);
  --sky-top: #2b1f22; --sky-bottom: #161215;
  --hill-back: #241c1f; --hill-front: #1b1517; --sun: #7a4d3a;
  --accent: #eaa37a; --accent-soft: rgba(234, 163, 122, .14);
  --on-accent: #21160f;
}
[data-mode="dark"][data-ambience="forest"] {
  --sky-top: #17251d; --sky-bottom: #0e1511;
  --hill-back: #16221a; --hill-front: #101913; --sun: #4b5a3a;
  --accent: #8fc8a0; --on-accent: #0f1a13; --accent-soft: rgba(143, 200, 160, .14);
}
[data-mode="dark"][data-ambience="ocean"] {
  --sky-top: #14222f; --sky-bottom: #0b141d;
  --hill-back: #131f2a; --hill-front: #0e1822; --sun: #4a5a66;
  --accent: #8fbcd8; --on-accent: #0c1620; --accent-soft: rgba(143, 188, 216, .14);
}

:root { color-scheme: light; }
[data-mode="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font: 400 16px/1.6 var(--sans);
  color: var(--ink);
  background: var(--sky-bottom);
  -webkit-font-smoothing: antialiased;
  transition: background .8s var(--ease), color .4s;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--accent-soft); }

/* Sky */
.sky {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 62%);
  transition: background .8s var(--ease);
}
.sun {
  position: absolute; left: 50%; top: 24vh; width: 46vmin; height: 46vmin; translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(circle, var(--sun) 0%, transparent 68%);
  opacity: .8; filter: blur(6px);
  animation: breathe 12s ease-in-out infinite;
}
.hills { position: absolute; bottom: 0; left: 0; width: 100%; height: 34vh; min-height: 200px; }
.hill-back { fill: var(--hill-back); transition: fill .8s; }
.hill-front { fill: var(--hill-front); transition: fill .8s; }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .95; } }

/* Layout */
.app { width: min(640px, 100% - 32px); margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 0 150px; }
.top { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 500 1.15rem/1 var(--serif); letter-spacing: .01em; }
.brand-mark {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8, transparent 45%), var(--accent);
  box-shadow: 0 0 18px var(--accent-soft), 0 0 0 5px var(--accent-soft);
}
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid transparent; background: transparent; color: var(--ink-soft);
  transition: background .25s, color .25s, border-color .25s;
}
.icon-btn:hover { background: var(--card); color: var(--ink); border-color: var(--line); }
.icon-btn svg, .tabs svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.view { animation: rise .7s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.01em; }
.eyebrow { font: 500 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.hello { padding: 22px 0 6px; }
.hello h1 { font-size: clamp(2rem, 6.4vw, 2.7rem); line-height: 1.1; margin-top: 10px; }
.hello h1 em { font-style: italic; color: var(--accent); }
.rhythm { margin: 10px 0 0; color: var(--ink-soft); font-size: .95rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--accent); box-shadow: 0 0 10px var(--accent-soft); }

/* Cards */
.card {
  position: relative; margin-top: 22px; padding: 26px;
  background: var(--card); border: 1px solid var(--line); border-radius: 28px;
  -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: var(--shadow);
}
.card.quiet { padding: 20px 22px; border-radius: 22px; }
.prompt { font: 400 clamp(1.35rem, 4.6vw, 1.7rem)/1.3 var(--serif); margin: 12px 0 18px; }
textarea.write {
  width: 100%; min-height: 150px; resize: none; padding: 16px 18px;
  font: 400 1.05rem/1.65 var(--serif);
  background: var(--field); border: 1px solid var(--line); border-radius: 18px;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
textarea.write::placeholder { color: var(--ink-faint); font-style: italic; }
textarea.write:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.moods { display: flex; align-items: center; gap: 2px; }
.moods .lbl { margin-right: 10px; min-width: 112px; font-size: .82rem; color: var(--ink-faint); }
.mood { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; }

/* Hand-drawn faces: a soft mood-coloured head with quiet line features */
.face { display: inline-grid; width: 30px; height: 30px; color: var(--ink-soft); }
.face svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.face .head { fill: color-mix(in srgb, var(--c) 16%, transparent); stroke: var(--c); stroke-width: 1.6; transition: fill .3s var(--ease); }
.face .dot { fill: currentColor; stroke: none; }
.face .open { fill: currentColor; }
.mood .face { opacity: .82; transition: transform .3s var(--ease), opacity .25s, filter .3s; }
.mood:hover .face { opacity: 1; transform: scale(1.14); }
.mood:hover .head { fill: color-mix(in srgb, var(--c) 42%, transparent); }
.mood[aria-pressed="true"] .face { opacity: 1; transform: scale(1.14); color: #2b2622; filter: drop-shadow(0 5px 10px color-mix(in srgb, var(--c) 60%, transparent)); }
.mood[aria-pressed="true"] .head { fill: var(--c); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.link.quiet { font-size: .82rem; font-weight: 400; color: var(--ink-faint); }
.link.quiet:hover { color: var(--accent); }
.q { margin-top: 8px; font: italic 300 .95rem/1.4 var(--serif); color: var(--ink-soft); }
.entry .q + p { margin-top: 6px; }
.entry .meta .face { width: 18px; height: 18px; }
.bar .bl { display: inline-flex; align-items: center; gap: 8px; }
.bar .bl .face { width: 20px; height: 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 26px;
  border-radius: 999px; border: 1px solid transparent; background: var(--accent); color: var(--on-accent);
  font-weight: 500; letter-spacing: .01em;
  box-shadow: 0 10px 24px -12px var(--accent);
  transition: transform .25s var(--ease), box-shadow .25s, opacity .25s, background .25s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 14px 28px -12px var(--accent); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover:not(:disabled) { background: var(--card); box-shadow: none; }
.btn.danger { background: transparent; color: #b3402f; border-color: rgba(179, 64, 47, .35); box-shadow: none; }
[data-mode="dark"] .btn.danger { color: #ee8f7d; border-color: rgba(238, 143, 125, .4); }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: transparent; transition: text-decoration-color .2s; }
.link:hover { text-decoration-color: currentColor; }
.hint { font-size: .8rem; color: var(--ink-faint); }

/* Bloom after saving */
.bloom {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; text-align: center; gap: 14px; padding: 28px;
  border-radius: inherit; background: var(--card-solid); animation: fade .5s var(--ease) both;
}
[data-mode="dark"] .bloom { background: #2a2224; }
.bloom .ring { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; position: relative; }
.bloom .ring::before, .bloom .ring::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--accent);
  animation: ripple 2.2s var(--ease) infinite;
}
.bloom .ring::after { animation-delay: 1.1s; }
.bloom .ring b { position: absolute; inset: 26px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 40px var(--accent); animation: breathe 3s ease-in-out infinite; }
.bloom p { margin: 0; font: italic 300 1.35rem/1.4 var(--serif); }
@keyframes ripple { from { transform: scale(.4); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* Today's list & nudge */
.today-list { list-style: none; margin: 0; padding: 0; }
.today-list li + li { border-top: 1px solid var(--line); }
.chip-entry { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 12px 0; background: none; border: 0; }
.chip-entry .m { flex: none; width: 9px; height: 9px; margin-top: 10px; border-radius: 50%; background: var(--c, var(--accent)); }
.chip-entry span.t { font: 400 1rem/1.55 var(--serif); }
.nudge { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.nudge p { margin: 6px 0 0; font: 400 1.05rem/1.45 var(--serif); }
.nudge.done p { text-decoration: line-through; text-decoration-color: var(--ink-faint); color: var(--ink-soft); }
.stack { display: grid; gap: 8px; justify-items: end; flex: none; }

/* Journal */
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 34px 0 0; }
.section-title h2 { font-size: 1.5rem; }
.jar-card { display: grid; justify-items: center; text-align: center; padding-top: 30px; }
.jar { width: min(250px, 66vw); height: auto; overflow: visible; }
.jar .glass { fill: rgba(255,255,255,.14); stroke: var(--ink-faint); stroke-width: 1.6; }
[data-mode="dark"] .jar .glass { fill: rgba(255,255,255,.04); }
.jar .lid { fill: var(--accent-soft); stroke: var(--ink-faint); stroke-width: 1.6; }
.jar .shine { fill: none; stroke: #fff; stroke-opacity: .55; stroke-width: 3; stroke-linecap: round; }
.marble { cursor: pointer; transform-box: fill-box; transform-origin: center; animation: drop .9s var(--ease) backwards; animation-delay: calc(var(--i) * 22ms); }
.marble:hover, .marble:focus-visible { transform: scale(1.22); transition: transform .2s var(--ease); outline: none; }
.marble .core { stroke: rgba(0,0,0,.08); stroke-width: .8; }
.marble .hl { fill: #fff; opacity: .55; }
@keyframes drop { from { transform: translateY(-190px); opacity: 0; } 55% { opacity: 1; } }
.jar.shake .marble { animation: jostle .7s var(--ease); animation-delay: calc(var(--i) * 6ms); }
@keyframes jostle { 20% { transform: translate(-3px, -8px) rotate(-8deg); } 45% { transform: translate(3px, -3px) rotate(6deg); } 70% { transform: translate(-1px, -5px); } }
.jar-count { font: 400 1.2rem var(--serif); margin: 14px 0 2px; }
.jar-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.btn.small { min-height: 38px; padding: 0 18px; font-size: .9rem; }

.memory { display: grid; gap: 4px; }
.memory .yr { color: var(--accent); font-weight: 500; font-size: .85rem; }
.memory blockquote { margin: 4px 0 0; font: italic 300 1.15rem/1.5 var(--serif); }

.search { position: relative; display: block; margin-top: 18px; }
.search input {
  width: 100%; height: 48px; padding: 0 18px 0 46px; background: var(--field); border: 1px solid var(--line); border-radius: 999px;
  transition: border-color .25s, box-shadow .25s;
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search svg { position: absolute; left: 16px; top: 14px; width: 20px; height: 20px; fill: none; stroke: var(--ink-faint); stroke-width: 1.6; stroke-linecap: round; }
.month { margin: 30px 0 4px; }
.entry {
  display: block; width: 100%; text-align: left; margin-top: 10px; padding: 18px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.entry:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent-soft); }
.entry .meta { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--ink-faint); }
.entry .meta i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); }
.entry p { margin: 8px 0 0; font: 400 1.05rem/1.55 var(--serif); white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { text-align: center; padding: 34px 10px; color: var(--ink-soft); }
.empty h3 { font-size: 1.3rem; color: var(--ink); margin-bottom: 6px; }

/* Insights */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
.stat { text-align: center; padding: 18px 8px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat b { display: block; font: 300 2.3rem/1 var(--serif); }
.stat span { display: block; margin-top: 8px; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 17px); grid-template-columns: repeat(12, 1fr); gap: 5px; margin-top: 18px; }
.heat i { border-radius: 5px; background: var(--line); }
.heat i.l1 { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.heat i.l2 { background: color-mix(in srgb, var(--accent) 65%, transparent); }
.heat i.l3 { background: var(--accent); }
.heat i.today { outline: 1.5px solid var(--ink-soft); outline-offset: 1px; }
.heat i.pad { background: transparent; }
.miles { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.mile { flex: 1; text-align: center; opacity: .45; transition: opacity .4s; }
.mile.on { opacity: 1; }
.mile .orb { width: 54px; height: 54px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; font: 400 1.2rem var(--serif); border: 1.5px dashed var(--ink-faint); }
.mile.on .orb { border: 0; color: var(--on-accent); background: radial-gradient(circle at 35% 30%, #fff6, transparent 50%), var(--accent); box-shadow: 0 8px 22px -8px var(--accent); }
.mile small { font-size: .78rem; color: var(--ink-soft); }
.themes { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 16px; align-items: baseline; }
.themes span { padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-family: var(--serif); }
.bars { display: grid; gap: 12px; margin-top: 16px; }
.bar { display: grid; grid-template-columns: 104px 1fr 28px; gap: 12px; align-items: center; font-size: .88rem; color: var(--ink-soft); }
.bar div { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.bar div i { display: block; height: 100%; width: var(--w); border-radius: 8px; background: var(--accent); transform-origin: left; animation: grow 1s var(--ease) backwards; }
.bar em { font-style: normal; text-align: right; }
@keyframes grow { from { transform: scaleX(0); } }
.card h3 { font-size: 1.25rem; }
.card .sub { margin: 4px 0 0; color: var(--ink-soft); font-size: .9rem; }

/* Tabs */
.tabs {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); translate: -50% 0; z-index: 10;
  display: flex; gap: 4px; padding: 6px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3);
  box-shadow: 0 18px 40px -18px rgba(60, 35, 20, .35);
}
.tabs a {
  display: flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; color: var(--ink-soft); text-decoration: none;
  font-size: .9rem; font-weight: 500; transition: color .25s, background .25s;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--accent); color: var(--on-accent); }

/* Dialogs */
dialog {
  width: min(520px, calc(100% - 24px)); max-height: min(86vh, 760px); padding: 0; border: 1px solid var(--line); border-radius: 28px;
  color: var(--ink); background: var(--card-solid); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .5);
}
dialog::backdrop { background: rgba(30, 20, 15, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog[open] { animation: rise .45s var(--ease); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 0 26px; }
.sheet-head h2 { font-size: 1.4rem; }
#entry-body, #settings-body, #share-body, #ask-body { padding: 8px 26px 26px; }
.group { margin-top: 22px; }
.group > .eyebrow { display: block; margin-bottom: 10px; }
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); }
.seg button { flex: 1; min-height: 38px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); font-size: .9rem; transition: background .25s, color .25s; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.foot { margin: 26px 0 0; text-align: center; color: var(--ink-faint); font-size: .82rem; }
.detail-text { width: 100%; min-height: 130px; margin-top: 14px; }
.detail-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; bottom: 96px; translate: -50% 20px; z-index: 30; padding: 12px 22px; border-radius: 999px;
  background: var(--ink); color: var(--card-solid); font-size: .9rem; opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease), translate .35s var(--ease);
}
.toast.show { opacity: 1; translate: -50% 0; }

@media (max-width: 480px) {
  .card { padding: 22px 20px; border-radius: 24px; }
  .tabs a { padding: 11px 16px; }
  .moods { flex-wrap: wrap; justify-content: center; }
  .moods .lbl { flex-basis: 100%; text-align: center; margin: 0 0 2px; }
  .card > .row { justify-content: center; }
  .card > .row .btn { width: 100%; }
  .nudge { flex-direction: column; align-items: flex-start; }
  .stack { justify-items: start; grid-auto-flow: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
dialog:focus { outline: none; }
.remrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--ink-soft); }
.time { height: 42px; padding: 0 14px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); color: var(--ink); color-scheme: light dark; }
[data-mode="dark"] .time { color-scheme: dark; }
[data-mode="light"] .time { color-scheme: light; }
.time:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* Share as card */
.card-preview { display: grid; place-items: center; margin-top: 6px; padding: 14px; border-radius: 20px; background: var(--field); border: 1px solid var(--line); }
.card-canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: min(44vh, 420px); border-radius: 12px; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .45); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); font-size: .88rem; transition: background .25s, border-color .25s, color .25s; }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.chip:disabled { opacity: .4; cursor: not-allowed; }
#share-body .seg button { font-size: .85rem; padding: 0 6px; }

/* Accounts & sync */
.input { width: 100%; height: 46px; padding: 0 18px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); transition: border-color .25s, box-shadow .25s; }
.input::placeholder { color: var(--ink-faint); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.gbtn { width: 100%; gap: 12px; background: #fff; color: #2b2622; border-color: rgba(0, 0, 0, .14); box-shadow: 0 6px 18px -12px rgba(0, 0, 0, .4); }
.gbtn:hover:not(:disabled) { box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .45); }
.gmark { display: inline-grid; width: 20px; height: 20px; }
.gmark svg { width: 100%; height: 100%; }
.or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--ink-faint); font-size: .8rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ask-title { font-size: 1.4rem; margin-top: 8px; }
.ask-text { margin: 10px 0 18px; color: var(--ink-soft); }
.ask-choices { display: grid; gap: 10px; justify-items: stretch; }
.ask-choices .link { justify-self: center; margin-top: 6px; }

/* Privacy & terms pages */
.doc { padding-bottom: 80px; }
.doc main { margin-top: 10px; padding: 8px 30px 34px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.doc h1 { font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1.1; margin: 22px 0 6px; }
.doc h2 { font-size: 1.3rem; margin: 34px 0 8px; }
.doc p, .doc li { color: var(--ink-soft); line-height: 1.7; }
.doc li { margin: 6px 0; }
.doc li strong, .doc p strong { color: var(--ink); font-weight: 600; }
.doc ul { padding-left: 1.2rem; margin: 8px 0; }
.doc a { color: var(--accent); text-underline-offset: 3px; }
.doc .meta { color: var(--ink-faint); font-size: .9rem; }
.doc .panel { margin-top: 22px; padding: 20px 24px; border-radius: 20px; background: var(--field); border: 1px solid var(--line); }
@media (max-width: 480px) { .doc main { padding: 4px 20px 28px; } }
.doc .top .link.quiet { text-decoration: none; }
.legal { margin-top: 6px; }
.legal a { color: inherit; text-underline-offset: 3px; }
.link.quiet.danger { color: #b3402f; }
[data-mode="dark"] .link.quiet.danger { color: #ee8f7d; }
