/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
textarea { font: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Tokens ---------- */
:root {
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Onest', system-ui, sans-serif;
  --font-jp: 'Shippori Mincho', 'Hiragino Mincho ProN', serif;

  --paper: #F3EFE7; --paper-2: #EBE5DA; --card: #F8F5EF;
  --ink: #1E1C19; --ink-2: #57524A; --ink-3: #8A8377;
  --line: rgba(30, 28, 25, .11);
  --seal: #B23E2A; --seal-ink: #FFF7F0;
  --rain: #6F8797;

  --bark: #4D3D32; --bark-hi: #6E5848; --bark-lo: #2F251E;
  --pot: #6B4A3A; --pot2: #5A3C2F; --potline: rgba(255,255,255,.12);
  --wood: #9C8268; --wood2: #7D6550; --shadow: rgba(30, 28, 25, .10);
  --soil: #3A2F27; --moss: #6F8A4E; --moss2: #8FA563;
  --stone: #A49E93; --stone2: #8D877D; --lamp: #F2D79B; --gold: #C9A145;
  --enso: rgba(30, 28, 25, .075); --sun: #D9583F;
  --snow: #FBFBF7;

  /* season accents set via [data-sp] */
  --leaf1: #2F4B37; --leaf2: #4A6C48; --leaf3: #7A9A65; --bloom: #fff; --bloom2: #fff;
  --accent: #4A6C48;

  --r-sm: 10px; --r-md: 16px; --r-lg: 24px;
  --ease: cubic-bezier(.22, .7, .2, 1);
}
[data-sp] { --ground: #CFC4A8; --ground2: #BDB291; --grass: #7C8F55; --flower: #F4EFE3; --bloom-c: #F0C35A; }
[data-sp="juniper"] { --leaf1: #2C4634; --leaf2: #476A47; --leaf3: #789964; --accent: #476A47; --sun: #C9573E; }
[data-sp="pine"]    { --leaf1: #1F3A2C; --leaf2: #31543D; --leaf3: #4C7352; --accent: #31543D; --sun: #C24A35; --ground: #F4F3EE; --ground2: #E3E4DF; --grass: #8C9A86; --flower: #C24A35; }
[data-sp="sakura"]  { --leaf1: #C88792; --leaf2: #E9B3BC; --leaf3: #F6D6DB; --bloom: #FFF5F6; --accent: #BC6A79; --sun: #E3876F; --ground: #C9D3A4; --ground2: #B5C28A; --grass: #7D9A55; --flower: #F2B7C0; --bloom-c: #E58A9C; }
[data-sp="wisteria"]{ --leaf1: #3F5B3B; --leaf2: #5E7E50; --leaf3: #8DA674; --bloom: #A897D2; --bloom2: #7F6CB4; --accent: #7462A8; --sun: #E39A55; --ground: #A9BF86; --ground2: #94AC70; --grass: #5F7E45; --flower: #B3A3DD; }
[data-sp="momiji"]  { --leaf1: #7F2620; --leaf2: #B9402C; --leaf3: #DE7440; --bloom: #EBA24D; --accent: #B23E2A; --sun: #E6A04A; --ground: #D8B98A; --ground2: #C9A370; --grass: #9C7A44; --flower: #C2452F; }

[data-theme="dark"] {
  --paper: #121311; --paper-2: #1A1B18; --card: #1B1D1A;
  --ink: #ECE7DD; --ink-2: #B6B0A4; --ink-3: #807A70;
  --line: rgba(236, 231, 221, .1);
  --seal: #CF5A40; --seal-ink: #1B1210;
  --bark: #6E5A4B; --bark-hi: #8E7765; --bark-lo: #43362C;
  --pot: #5B4034; --pot2: #4C352B; --wood: #5F4F40; --wood2: #4B3E33; --shadow: rgba(0,0,0,.35);
  --soil: #2A221D; --stone: #6F6A62; --stone2: #5C5850; --lamp: #FFD889;
  --enso: rgba(236, 231, 221, .07); --sun: #E9E2CF;
  --snow: #E8EAE6;
}
[data-theme="dark"][data-sp="pine"] { --leaf1: #24412F; --leaf2: #375D43; --leaf3: #557B5B; }
[data-theme="dark"][data-sp] { --ground: #CFC4A8; --ground2: #BDB291; --grass: #7C8F55; --flower: #F4EFE3; --bloom-c: #F0C35A; }
[data-sp="juniper"] { --leaf2: #4F744E; --leaf3: #7FA06A; }

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.5;
  color: var(--ink);
  background: var(--paper-2);
  -webkit-font-smoothing: antialiased;
}
.app {
  position: relative;
  max-width: 460px; margin: 0 auto; min-height: 100dvh;
  background: var(--paper);
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
/* paper grain */
.app::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3  0 0 0 0 0.26  0 0 0 0 0.2  0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  max-width: 460px; margin: 0 auto;
}
@media (min-width: 520px) {
  body { padding: 24px 0; }
  .app { min-height: calc(100dvh - 48px); border-radius: 28px; box-shadow: 0 30px 80px -30px rgba(30,28,25,.35); }
  .tabbar { border-radius: 0 0 28px 28px; }
}
.app > * { position: relative; z-index: 1; }

.eyebrow { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.k { font-family: var(--font-jp); }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: calc(18px + env(safe-area-inset-top)) 22px 0;
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand__name { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: .01em; }
.brand__jp { font-family: var(--font-jp); font-size: 12px; color: var(--ink-3); letter-spacing: .1em; }
.topbar__date { font-size: 13px; color: var(--ink-2); text-transform: lowercase; }

/* ---------- Screens ---------- */
.screen { padding: 0 32px 24px; animation: fadeUp .5s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.screen__title { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 18px; font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1.1; }
.screen__title .k { font-size: 22px; color: var(--accent); }

/* ---------- Scene ---------- */
.scene { position: relative; margin: 0 -10px 0; height: min(37dvh, calc((min(100vw, 460px) - 44px) * 1.1)); }
.scene svg { margin: 0 auto; }
.scene svg { width: 100%; height: 100%; overflow: visible; }
.scene__season { position: absolute; right: 4px; top: 6px; width: 32px; display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 2; }
.scene__kanji { writing-mode: vertical-rl; font-family: var(--font-jp); font-size: 30px; line-height: 1; letter-spacing: .04em; color: var(--accent); font-weight: 700; }
.scene__vlabel { writing-mode: vertical-rl; font-size: 12px; letter-spacing: .22em; color: var(--ink-3); text-transform: lowercase; }

.tree { animation: sway 9s ease-in-out infinite; transition: filter .8s; }
.tree.is-drowsy { filter: saturate(.45) brightness(1.04); }
[data-theme="dark"] .tree.is-drowsy { filter: saturate(.45) brightness(.85); }
@keyframes sway { 0%, 100% { transform: rotate(-.5deg); } 50% { transform: rotate(.6deg); } }
.pad.is-new { animation: grow 1.6s var(--ease) both; transform-box: fill-box; transform-origin: center bottom; }
.branch.is-new { animation: fadeIn 1s var(--ease) both; }
@keyframes grow { from { opacity: 0; scale: .2; } to { opacity: 1; scale: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sprout { transform-origin: 200px 371px; animation: grow 1.4s var(--ease) both; transform-box: view-box; }
.enso { opacity: 1; }
.sun { opacity: .9; }
[data-theme="dark"] .sun { opacity: .85; filter: drop-shadow(0 0 18px rgba(233,226,207,.35)); }
.lamp { animation: flicker 4s ease-in-out infinite; }
[data-theme="light"] .lamp { opacity: .55; animation: none; }
@keyframes flicker { 0%, 100% { opacity: .9; } 50% { opacity: .65; } }
.kintsugi { filter: drop-shadow(0 0 2px rgba(201,161,69,.6)); }

/* particles */
.particles, .drops { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pt { position: absolute; top: -12px; will-change: transform; animation: fall linear infinite; }
.pt--snow { width: 5px; height: 5px; border-radius: 50%; background: var(--snow); box-shadow: 0 0 0 1px rgba(0,0,0,.04); }
[data-theme="light"] .pt--snow { background: #fff; box-shadow: 0 0 0 1px rgba(60,80,90,.12); }
.pt--petal { width: 8px; height: 6px; border-radius: 80% 10% 80% 10%; background: var(--leaf3); opacity: .9; }
.pt--leaf { width: 9px; height: 9px; background: var(--leaf3); clip-path: polygon(50% 0, 62% 35%, 100% 30%, 70% 58%, 82% 100%, 50% 75%, 18% 100%, 30% 58%, 0 30%, 38% 35%); }
.pt--fly { width: 4px; height: 4px; border-radius: 50%; background: #F4E59A; box-shadow: 0 0 10px 3px rgba(244,229,154,.55); animation: drift ease-in-out infinite alternate; top: auto; }
[data-theme="light"] .pt--fly { background: var(--bloom); box-shadow: none; opacity: .7; }
@keyframes fall {
  0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translate3d(var(--dx, 30px), 105cqh, 0) rotate(var(--rot, 360deg)); opacity: 0; }
}
.particles { container-type: size; }
@keyframes drift { from { transform: translate(0, 0); opacity: .2; } to { transform: translate(var(--dx, 20px), -40px); opacity: 1; } }

/* water drops */
.drop { position: absolute; top: -20px; width: 8px; height: 12px; background: #7FA7C2; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; opacity: 0; animation: dropFall 1.1s cubic-bezier(.5, 0, .9, .6) forwards; }
[data-theme="dark"] .drop { background: #9CC2DA; }
@keyframes dropFall { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: .9; } 85% { opacity: .9; } 100% { opacity: 0; transform: translateY(var(--to, 300px)); } }

.seal-pop { position: absolute; left: 50%; top: 42%; width: 82px; height: 82px; margin: -41px 0 0 -41px; display: grid; place-items: center; border-radius: 14px; background: var(--seal); color: var(--seal-ink); font-family: var(--font-jp); font-size: 44px; font-weight: 700; opacity: 0; pointer-events: none; z-index: 3; box-shadow: inset 0 0 0 3px var(--seal), inset 0 0 0 5px rgba(255,255,255,.35); }
.seal-pop.is-on { animation: stamp 1.9s var(--ease) forwards; }
@keyframes stamp {
  0% { opacity: 0; transform: scale(1.8) rotate(-14deg); }
  18% { opacity: .96; transform: scale(.94) rotate(-6deg); }
  26% { transform: scale(1) rotate(-6deg); }
  75% { opacity: .96; transform: scale(1) rotate(-6deg); }
  100% { opacity: 0; transform: scale(1.04) rotate(-6deg); }
}

/* ---------- Stage ---------- */
.stage { display: flex; justify-content: center; align-items: baseline; gap: 6px; margin-top: 0; font-size: 12px; letter-spacing: .02em; color: var(--ink-3); }
.stage__k { font-family: var(--font-jp); color: var(--accent); font-size: 13px; }
.stage__dot { color: var(--ink-3); }
.drowsy { margin: 10px auto 0; max-width: 320px; text-align: center; font-size: 13px; color: var(--ink-3); }

/* ---------- Quote ---------- */
.quote { margin: 28px 0 0; text-align: center; }
.quote__tag { margin: 0 0 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.quote__text { margin: 0 auto; max-width: 360px; font-family: var(--font-display); font-weight: 500; font-size: 25px; line-height: 1.18; letter-spacing: -.005em; max-width: 300px; text-wrap: balance; white-space: pre-line; }
.quote__author { margin: 12px 0 0; font-size: 12px; letter-spacing: .02em; color: var(--ink-3); }
.quote__author::before { content: '— '; }
.quote__meaning { margin: 20px auto 0; max-width: 280px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.quote__mlabel { display: block; margin-bottom: 3px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.sq__m { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.quote__actions { display: flex; justify-content: center; gap: 2px; margin-top: 10px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; min-height: 40px; padding: 8px; border-radius: 999px; font-size: 13px; color: var(--ink-3); transition: background .2s, color .2s; }
.icon-btn:hover { background: var(--line); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn[aria-pressed="true"] { color: var(--accent); }
.icon-btn[aria-pressed="true"] svg { fill: currentColor; }
.icon-btn--sq { padding: 8px; }

/* ---------- Ritual ---------- */
.ritual { display: flex; flex-direction: column; align-items: center; margin-top: 18px; user-select: none; -webkit-user-select: none; }
.water { position: relative; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; touch-action: none; -webkit-touch-callout: none; }
.water::before { content: ''; position: absolute; inset: 14px; border-radius: 50%; background: var(--ink); transition: transform .4s var(--ease), background .3s; }
.water.is-holding::before { background: var(--accent); }
.water:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.water__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.water__track { fill: none; stroke: var(--line); stroke-width: 3; }
.water__prog { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; transition: stroke-dashoffset .5s var(--ease); }
.water.is-holding .water__prog { transition: none; }
.water__icon { position: relative; width: 26px; height: 26px; fill: var(--paper); }
.ritual__label { margin: 8px 0 0; font-size: 13px; letter-spacing: .02em; color: var(--ink-2); min-height: 1.4em; }
.ritual__hint { margin: 2px 0 0; font-size: 12px; color: var(--ink-3); min-height: 1.4em; text-align: center; }

.done { display: flex; align-items: center; gap: 14px; margin: 16px auto 0; max-width: 360px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); animation: fadeUp .6s var(--ease); }
.done__seal { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 9px; background: var(--seal); color: var(--seal-ink); font-family: var(--font-jp); font-size: 24px; font-weight: 700; transform: rotate(-6deg); box-shadow: inset 0 0 0 2px var(--seal), inset 0 0 0 3.5px rgba(255,255,255,.35); }
.done__title { margin: 0; font-weight: 600; font-size: 15px; }
.done__sub { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }

.practice { margin: 14px auto 0; max-width: 360px; padding: 14px 16px; border-radius: var(--r-md); background: var(--paper-2); animation: fadeUp .7s var(--ease); }
.practice__text { margin: 6px 0 0; font-size: 15px; line-height: 1.45; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 500; font-size: 15px; transition: transform .15s, background .2s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--ghost { border: 1px solid var(--line); background: var(--card); min-height: 44px; font-size: 14px; padding: 0 16px; }
.btn--danger { background: var(--seal); color: #fff; }
.link-btn { font-size: 14px; color: var(--ink-2); padding: 10px 6px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.link-btn--danger { color: var(--seal); margin-top: 6px; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 460px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 8px 18px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
@media (min-width: 520px) { .tabbar { bottom: 24px; } }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 12px; color: var(--ink-3); transition: color .2s; }
.tab__k { font-family: var(--font-jp); font-size: 19px; line-height: 1.2; }
.tab.is-active { color: var(--ink); }
.tab.is-active .tab__k { color: var(--accent); }

/* ---------- Path ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 14px 12px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); }
.stat__n { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 600; line-height: 1; font-variant-numeric: lining-nums proportional-nums; }
.stat__l { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-3); line-height: 1.25; }
.card { margin-top: 14px; padding: 16px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.cal__head { display: flex; align-items: center; justify-content: space-between; }
.cal__month { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 600; text-transform: capitalize; }
.cal__dow, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal__dow { margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.cal__grid { margin-top: 6px; }
.cd { aspect-ratio: 1; display: grid; place-items: center; font-size: 13px; color: var(--ink-2); border-radius: 9px; font-variant-numeric: tabular-nums; position: relative; }
.cd--out { visibility: hidden; }
.cd--future { color: var(--ink-3); opacity: .45; }
.cd--seal { background: var(--seal); color: var(--seal-ink); font-weight: 600; transform: rotate(-4deg); box-shadow: inset 0 0 0 1.5px var(--seal), inset 0 0 0 2.5px rgba(255,255,255,.3); }
.cd--rain { color: var(--rain); }
.cd--rain::after { content: ''; position: absolute; bottom: 3px; width: 5px; height: 7px; background: var(--rain); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; }
.cd--today { outline: 1.5px solid var(--ink); outline-offset: -1.5px; }
.cal__legend { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 12px; color: var(--ink-3); }
.lg { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg--seal { background: var(--seal); }
.lg--rain { background: var(--rain); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; width: 9px; margin-left: 10px; }

.sub-title { margin: 28px 0 10px; font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.miles { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mile { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.mile__k { font-family: var(--font-jp); font-size: 20px; color: var(--ink-3); text-align: center; }
.mile__n { font-size: 15px; }
.mile__d { font-size: 12px; color: var(--ink-3); font-variant-numeric: lining-nums tabular-nums; }
.mile.is-done .mile__k { color: var(--accent); }
.mile:not(.is-done) .mile__n { color: var(--ink-3); }
.saved, .journal { display: grid; gap: 10px; }
.sq { padding: 16px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); }
.sq__t { margin: 0; font-family: var(--font-display); font-size: 20px; line-height: 1.25; white-space: pre-line; }
.sq__a { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); }
.jr { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.jr__m { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-jp); font-size: 17px; background: var(--paper-2); color: var(--accent); }
.jr__d { margin: 0; font-size: 12px; color: var(--ink-3); }
.jr__n { margin: 2px 0 0; font-size: 15px; }
.empty { margin: 0; padding: 14px 0; font-size: 14px; color: var(--ink-3); }

/* ---------- Settings ---------- */
.field { margin-top: 22px; }
.field__label { margin: 0 0 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.field__hint { margin: -4px 0 12px; font-size: 13px; color: var(--ink-3); }
.trees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tree-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card); transition: border-color .2s, transform .15s; text-align: center; }
.tree-opt:active { transform: scale(.98); }
.tree-opt[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tree-opt svg { width: 64px; height: 64px; }
.tree-opt__n { font-size: 13px; font-weight: 500; line-height: 1.2; }
.tree-opt__s { font-size: 12px; color: var(--ink-3); line-height: 1.2; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; background: var(--paper-2); }
.seg button { padding: 9px 8px; border-radius: 999px; font-size: 14px; color: var(--ink-2); transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card--demo { margin-top: 26px; }
.demo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-row .btn { flex: 1; }
.about { margin: 28px 0 0; font-size: 13px; color: var(--ink-3); text-align: center; line-height: 1.55; }

/* ---------- Sheet ---------- */
.sheet-wrap, .confirm-wrap { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: rgba(20, 18, 15, .35); animation: fadeIn .3s; }
.sheet { width: 100%; max-width: 460px; padding: 10px 22px calc(22px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--paper); animation: sheetUp .45s var(--ease); }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet__grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 14px; }
.sheet__title { margin: 4px 0 16px; font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 1.1; }
.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mood { display: flex; transition: background .15s, color .15s, border-color .15s; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px; border-radius: var(--r-md); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); transition: all .2s; }
.mood__k { font-family: var(--font-jp); font-size: 22px; color: var(--ink); }
.mood[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mood[aria-pressed="true"] .mood__k { color: var(--paper); }
.sheet__label { display: block; margin: 18px 0 8px; font-size: 14px; color: var(--ink-2); }
.sheet textarea { width: 100%; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card); color: var(--ink); resize: none; font-size: 16px; }
.sheet textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.sheet__actions { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.confirm-wrap { align-items: center; padding: 22px; }
.confirm { width: 100%; max-width: 380px; padding: 22px; border-radius: var(--r-lg); background: var(--paper); }
.confirm p { margin: 0; font-size: 16px; }

/* ---------- Onboarding ---------- */
.onboard { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: center; background: var(--paper); overflow-y: auto; }
.onboard__inner { width: 100%; max-width: 420px; padding: calc(48px + env(safe-area-inset-top)) 28px 40px; display: flex; flex-direction: column; align-items: flex-start; }
.onboard__kanji { font-family: var(--font-jp); font-size: 72px; line-height: 1; color: var(--seal); margin-bottom: 22px; font-weight: 700; }
.onboard__name { display: flex; align-items: baseline; gap: 10px; }
.onboard__jp { font-family: var(--font-jp); font-size: 20px; letter-spacing: .12em; color: var(--ink); }
.onboard__romaji { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--ink-2); }
.onboard__meaning { margin: 8px 0 26px; padding-left: 12px; border-left: 2px solid var(--seal); font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.onboard__title { margin: 10px 0 14px; font-family: var(--font-display); font-weight: 600; font-size: 44px; line-height: 1.02; letter-spacing: -.01em; }
.onboard__text { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.onboard__steps { list-style: none; padding: 0; margin: 26px 0 34px; display: grid; gap: 14px; width: 100%; }
.onboard__steps li { display: flex; align-items: center; gap: 14px; font-size: 15px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.onboard__steps .k { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--paper-2); font-size: 18px; color: var(--accent); flex: none; }
.onboard .btn { width: 100%; }
.onboard .link-btn { align-self: center; margin-top: 10px; }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); max-width: 340px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 14px; text-align: center; opacity: 0; pointer-events: none; transition: all .35s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .particles { display: none; }
}
@media (max-width: 360px) {
  .quote__text { font-size: 23px; }
  .moods { grid-template-columns: repeat(5, 1fr); }
}
@media (max-height: 720px) {
  .scene { height: 30dvh; }
  .quote { margin-top: 18px; }
  .quote__meaning { margin-top: 14px; }
  .quote__actions { margin-top: 4px; }
  .ritual { margin-top: 8px; }
}

/* ---------- Account ---------- */
.onboard__links { align-self: stretch; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0; margin-top: 10px; }
.onboard__links .link-btn { margin-top: 0; }
.account { margin-bottom: 8px; }
.acc-guest { padding: 22px 20px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); text-align: center; }
.acc-guest__t { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.15; }
.acc-guest__p { margin: 8px auto 16px; max-width: 280px; font-size: 14px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.acc-guest .btn { width: 100%; }
.acc { padding: 20px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
.acc__head { display: flex; align-items: center; gap: 14px; }
.acc__avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--accent); font-family: var(--font-display); font-weight: 600; font-size: 24px; }
.acc__who { min-width: 0; }
.acc__name { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc__since { margin: 2px 0 0; font-size: 12px; color: var(--ink-3); }
.acc__stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0 6px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.acc__stats b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.acc__stats span { display: block; margin-top: 4px; font-size: 11px; letter-spacing: .04em; color: var(--ink-3); }
.acc__list { list-style: none; margin: 0; padding: 0; }
.acc__list li + li { border-top: 1px solid var(--line); }
.acc__list button, .acc__row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0; font-size: 14px; color: var(--ink); text-align: left; }
.acc__list span { flex: none; }
.acc__list em { flex: 1; min-width: 0; font-style: normal; color: var(--ink-3); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc__list svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--ink-3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.acc__list button span { flex: 1; }
.acc__list button em + svg, .acc__list button em { flex: initial; }
.acc__list button:has(em) span { flex: none; }
.acc__list button:has(em) em { flex: 1; }
.acc__foot { display: flex; justify-content: space-between; margin-top: 8px; }
.acc__foot .link-btn { margin: 0; padding-left: 0; padding-right: 0; }

.sheet--acct { position: relative; max-height: 92dvh; overflow-y: auto; padding-top: 10px; }
.sheet__close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-3); }
.sheet__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.sheet__close:hover { background: var(--line); }
.sheet--acct .sheet__title { margin: 10px 0 6px; }
.acct__sub { margin: 0 0 20px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.social { display: grid; gap: 10px; }
.social__btn { width: 100%; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.social__btn svg { width: 18px; height: 18px; }
.social__btn--apple { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.social__g:empty { display: none; }
.or { display: flex; align-items: center; gap: 12px; margin: 20px 0 6px; font-size: 12px; color: var(--ink-3); }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.f { display: block; margin-top: 12px; }
.f__l { display: block; margin-bottom: 6px; font-size: 13px; color: var(--ink-2); }
.f__w { position: relative; display: block; }
.f input { width: 100%; height: 50px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 16px; }
.f input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.f input[type=password], .f input[data-pw] { padding-right: 48px; }
.f__eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; display: grid; place-items: center; color: var(--ink-3); }
.f__eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.f__eye.is-on { color: var(--accent); }
.f__err { min-height: 20px; margin: 10px 0 6px; font-size: 13px; line-height: 1.4; color: var(--seal); }
.f__err:empty { min-height: 0; margin: 14px 0 0; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .55; }
.acct__switch { display: block; margin: 10px auto 0; }
#acct { z-index: 80; }
.onboard__links .link-btn { align-self: center; }
.f__forgot { display: block; margin: 6px 0 0 auto; padding: 6px 0; font-size: 13px; text-decoration: none; color: var(--ink-3); }
.f__code { letter-spacing: .4em; font-variant-numeric: tabular-nums; font-size: 20px !important; }
.acct__sub b { display: block; margin: 2px 0; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }

/* Komorebi+ teaser */
.plus { display: block; width: 100%; margin-top: 14px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); text-align: left; color: var(--ink); }
.plus__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plus__t { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.15; }
.plus__pill { flex: none; padding: 4px 10px; border-radius: 999px; background: var(--paper-2); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.plus__p { display: block; margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.plus__cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 14px; font-weight: 500; color: var(--accent); }
.plus__cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.plus.is-on .plus__cta { color: var(--ink-3); font-weight: 400; gap: 6px; }
.plus__note { margin: 12px 0 0; font-size: 12px; text-align: center; color: var(--ink-3); }
.legal-links { display: flex; justify-content: center; gap: 10px; margin: 10px 0 0; font-size: 13px; color: var(--ink-3); }
.legal-links a, .f__agree a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.f__agree { margin: 12px 0 0; font-size: 12px; line-height: 1.5; text-align: center; color: var(--ink-3); }
