:root {
  color-scheme: light;
  --ink: #243238;
  --muted: #566663;
  --subtle: #64736f;
  --bg: #f7f5ef;
  --surface: #fffefa;
  --surface-2: #f0f3ef;
  --line: #e2e7e2;
  --accent: #34776d;
  --accent-strong: #34776d;
  --accent-soft: #ddebe6;
  --gold: #e7b952;
  --gold-soft: #fbf1d8;
  --danger: #b76464;
  --radius: 16px;
  font-family: "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: #eceee9; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}
button, textarea, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; cursor: pointer; }
button:focus-visible, textarea:focus-visible, input:focus-visible {
  outline: 3px solid rgba(79,145,133,.24);
  outline-offset: 2px;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-shell {
  width: min(100%, 460px);
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  padding: env(safe-area-inset-top) 18px calc(94px + env(safe-area-inset-bottom));
}
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 2px 18px; }
.eyebrow { margin: 0 0 5px; color: var(--accent-strong); font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
h1 { margin: 0; max-width: 280px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(1.5rem, 7vw, 1.9rem); line-height: 1.42; letter-spacing: .02em; }
.title-line { display: block; white-space: nowrap; }
.top-actions { display: flex; gap: 7px; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: rgba(255,254,250,.82); }
.icon-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-button[aria-pressed="true"] { color: var(--accent-strong); border-color: #a8c9c2; background: var(--accent-soft); }

.view { display: none; }
.view.active { display: block; animation: rise .24s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }
.micro-copy { display: flex; align-items: center; gap: 8px; margin: 0 3px 12px; color: var(--muted); font-size: .8rem; font-weight: 700; }
.sprout-mark { position: relative; width: 16px; height: 16px; border: 1.8px solid var(--accent); border-radius: 50% 50% 47% 47%; }
.sprout-mark::before, .sprout-mark::after { content: ""; position: absolute; top: -5px; width: 7px; height: 5px; border: 1.8px solid var(--accent); }
.sprout-mark::before { left: 0; border-radius: 7px 2px; transform: rotate(22deg); }
.sprout-mark::after { right: 0; border-radius: 2px 7px; transform: rotate(-22deg); }

.reminder-banner { position: relative; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; margin: 0 0 14px; padding: 12px 38px 12px 12px; border: 1px solid #c8ddd6; border-radius: 16px; background: #edf5f1; box-shadow: 0 4px 14px rgba(61,77,70,.04); }
.reminder-banner[hidden] { display: none; }
.reminder-sprout { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #fff; }
.reminder-sprout svg { width: 36px; height: 36px; }
.reminder-sprout .seed { fill: #f4e6b9; stroke: #7e765f; }
.reminder-sprout .leaf { fill: #b9d9c4; stroke: #557a68; }
.reminder-sprout .face { fill: none; stroke: #4e5149; }
.reminder-sprout path { stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.reminder-copy strong, .reminder-copy span { display: block; }
.reminder-copy strong { color: #315f57; font-size: .86rem; line-height: 1.45; }
.reminder-copy span { margin-top: 2px; color: var(--muted); font-size: .74rem; }
.reminder-open { min-height: 38px; padding: 0 12px; border: 1px solid #9fc6bd; border-radius: 999px; color: var(--accent-strong); background: #fff; font-size: .78rem; font-weight: 800; }
.reminder-dismiss { position: absolute; top: 4px; right: 6px; width: 30px; height: 30px; border: 0; color: var(--muted); background: transparent; font-size: 1rem; }

.entry-card { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,254,250,.92); overflow: hidden; box-shadow: 0 4px 18px rgba(61,77,70,.045); }
.step-block { padding: 21px 18px; }
.step-heading { margin-bottom: 15px; }
.step-heading p { margin: 0 0 3px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-weight: 700; font-size: 1.08rem; }
.step-heading div > span { color: var(--muted); font-size: .82rem; }
.divider { height: 1px; background: var(--line); margin: 0 18px; }

.choice-grid { display: grid; gap: 7px; }
.horizon-grid { grid-template-columns: repeat(4, 1fr); }
.choice, .category, .filter {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 750;
}
.choice.selected, .category.selected { color: #21554d; background: var(--accent-soft); border-color: #9fc6bd; }
.date-link, .prompt-button, .small-step-toggle { display: inline-flex; align-items: center; min-height: 42px; margin-top: 6px; padding: 0; border: 0; color: var(--accent-strong); background: transparent; font-size: .84rem; font-weight: 750; }
.date-input { width: 100%; min-height: 46px; margin-top: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #fff; }

.feeling-row, .category-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 1px 3px; }
.feeling-row::-webkit-scrollbar, .category-row::-webkit-scrollbar { display: none; }
.feeling {
  position: relative;
  flex: 0 0 84px;
  min-height: 92px;
  padding: 8px 5px 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 750;
}
.feeling > span { display: block; margin-top: 1px; }
.feeling.selected { border-color: #8ebbb1; color: #255c53; background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(79,145,133,.14); }
.feeling.selected::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: .65rem;
  font-weight: 900;
}
.mood-sprout { display: block; width: 49px; height: 49px; margin: 0 auto 1px; overflow: visible; }
.mood-sprout .seed { fill: #f4e6b9; stroke: #7e765f; stroke-width: 1.5; }
.mood-sprout .leaf { fill: #b9d9c4; stroke: #557a68; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mood-sprout .face, .mood-sprout .accent-line { fill: none; stroke: #4e5149; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mood-sprout .accent-fill, .mood-sprout .eye-fill { fill: var(--gold); }
.feeling.selected .mood-sprout .seed { fill: #fff8df; stroke: #466e62; }
.feeling.selected .mood-sprout .leaf { fill: #76ad91; stroke: #356b5c; }
.category { flex: 0 0 auto; min-height: 39px; padding: 0 14px; border-radius: 999px; }

.text-field { display: block; position: relative; margin-top: 13px; }
textarea { display: block; width: 100%; min-height: 104px; resize: vertical; padding: 14px 14px 29px; border: 1px solid var(--line); border-radius: 13px; outline: none; color: var(--ink); background: #fff; font-size: 1rem; line-height: 1.65; }
textarea::placeholder { color: #9aa5a3; }
textarea:focus { border-color: #8ebbb1; box-shadow: 0 0 0 3px rgba(79,145,133,.10); }
.counter { position: absolute; right: 12px; bottom: 8px; color: var(--subtle); font-size: .72rem; }
.counter b { font-weight: 500; }
.prompt-button { margin-top: 3px; }
.prompt-button span { margin-right: 5px; color: var(--gold); }
.prompt-text { margin: 2px 0 0; padding: 11px 13px; border-left: 2px solid var(--gold); color: #5e6662; background: var(--gold-soft); font-size: .84rem; line-height: 1.6; }
.small-step-toggle { width: 100%; margin-top: 1px; color: var(--muted); }
.small-step-toggle span { display: grid; place-items: center; width: 20px; height: 20px; margin-right: 5px; border: 1px solid #b8c7c2; border-radius: 50%; color: var(--accent-strong); font-size: .9rem; transition: transform .18s ease; }
.small-step-toggle[aria-expanded="true"] span { transform: rotate(45deg); }
.small-step-field { display: block; margin: 4px 0 7px; padding: 12px; border-radius: 12px; background: #f3f6f2; }
.small-step-field > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.small-step-field input { width: 100%; min-height: 43px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; font-size: .9rem; }

.save-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  margin-top: 14px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 5px 14px rgba(56,105,96,.12);
  font-weight: 850;
  font-size: 1rem;
}
.save-button:active { transform: translateY(1px); background: var(--accent-strong); }
.save-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.local-note { margin: 11px 0 0; text-align: center; color: var(--subtle); font-size: .75rem; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(100%, 460px);
  padding: 8px 22px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255,254,250,.94);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 54px; border: 0; color: var(--subtle); background: transparent; font-size: .74rem; font-weight: 750; }
.nav-item svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.nav-item.active { color: var(--accent-strong); }

.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; margin: 7px 2px 18px; }
.section-title-row h2 { margin: 0; font-family: "Yu Mincho", serif; font-size: 1.75rem; }
.count-badge { padding: 6px 10px; border-radius: 999px; color: var(--accent-strong); background: var(--accent-soft); font-size: .78rem; font-weight: 750; }
.filter-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 4px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; background: #eff2ee; }
.filter { border: 0; min-height: 39px; background: transparent; }
.filter.active { color: var(--ink); background: #fff; box-shadow: 0 1px 4px rgba(61,77,70,.08); }
.entry-list { display: grid; gap: 11px; }
.saved-entry { padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.entry-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .76rem; }
.entry-meta .tag { color: var(--accent-strong); font-weight: 750; }
.saved-entry h3 { margin: 10px 0 8px; font-size: 1rem; line-height: 1.65; }
.entry-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.entry-feeling { color: #8a6e2d; font-size: .8rem; }
.entry-step { display: flex; gap: 7px; margin: 10px 0 0; padding: 10px 11px; border-radius: 11px; color: #53635e; background: #f1f5f1; font-size: .8rem; line-height: 1.5; }
.entry-step span { color: var(--accent-strong); }
.entry-footer-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; margin-left: auto; }
.review-date { color: var(--muted); font-size: .72rem; }
.review-date.due { color: #8a6e2d; font-weight: 750; }
.reflect-button, .reschedule-button { min-height: 39px; padding: 0 13px; border: 1px solid #a8c9c2; border-radius: 999px; color: var(--accent-strong); background: #fff; font-size: .76rem; font-weight: 750; }
.reschedule-button { padding: 0 10px; border-color: var(--line); color: var(--muted); }
.reflection-label { padding: 6px 10px; border-radius: 999px; color: #255c53; background: var(--accent-soft); font-size: .76rem; }
.empty-state { padding: 62px 24px; text-align: center; color: var(--muted); }
.empty-sprout { display: block; width: 66px; height: 66px; margin: 0 auto 12px; }
.empty-sprout path:nth-child(1) { fill: #b9d9c4; stroke: #557a68; }
.empty-sprout path:nth-child(2) { fill: #f4e6b9; stroke: #7e765f; }
.empty-sprout path:nth-child(3) { fill: none; stroke: #4e5149; }
.empty-sprout path { stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty-state h3 { margin: 0 0 7px; color: var(--ink); font-size: 1.05rem; }
.empty-state p { margin: 0 0 20px; font-size: .88rem; }
.empty-state button { min-height: 44px; padding: 0 20px; border: 0; border-radius: 12px; color: #fff; background: var(--accent); font-weight: 800; }

.tips-title-row { align-items: center; }
.tips-leaf { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid #c8ddd6; border-radius: 18px; background: #edf5f1; }
.tips-leaf svg { width: 47px; height: 47px; }
.tips-leaf .seed { fill: #f4e6b9; stroke: #7e765f; }
.tips-leaf .leaf { fill: #b9d9c4; stroke: #557a68; }
.tips-leaf .face { fill: none; stroke: #4e5149; }
.tips-leaf path { stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tips-intro { margin-bottom: 14px; padding: 17px; border: 1px solid #e1d7b4; border-radius: 16px; background: var(--gold-soft); }
.tips-intro strong { display: block; color: #665a34; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 1rem; }
.tips-intro p { margin: 7px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.65; }
.tips-list { display: grid; gap: 9px; }
.tip-card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.tip-card summary { display: grid; grid-template-columns: 35px 1fr 18px; align-items: center; gap: 10px; min-height: 72px; padding: 12px 14px; cursor: pointer; list-style: none; }
.tip-card summary::-webkit-details-marker { display: none; }
.tip-card summary > span:nth-child(2) { color: var(--ink); font-size: .91rem; font-weight: 800; line-height: 1.5; }
.tip-card summary small { display: block; margin-bottom: 1px; color: var(--muted); font-size: .7rem; font-weight: 700; }
.tip-number { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; color: var(--accent-strong); background: var(--accent-soft); font-size: .7rem; font-weight: 850; }
.tip-chevron { width: 9px; height: 9px; border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: rotate(45deg); transition: transform .18s ease; }
.tip-card[open] .tip-chevron { transform: rotate(225deg); }
.tip-body { padding: 0 15px 16px 59px; }
.tip-body > p { margin: 0 0 10px; color: var(--muted); font-size: .82rem; line-height: 1.7; }
.tip-body blockquote { margin: 0 0 13px; padding: 10px 12px; border-left: 2px solid var(--gold); border-radius: 0 10px 10px 0; color: #5d625d; background: var(--gold-soft); font-size: .8rem; line-height: 1.6; }
.tip-use-button, .tip-review-button { min-height: 40px; padding: 0 14px; border: 1px solid #9fc6bd; border-radius: 999px; color: var(--accent-strong); background: #fff; font-size: .76rem; font-weight: 800; }
.tips-source-note { margin: 16px 5px 0; color: var(--subtle); font-size: .7rem; line-height: 1.65; }

@media (max-width: 350px) {
  .tip-body { padding-left: 15px; }
}

.toast { position: fixed; left: 50%; bottom: 94px; z-index: 30; padding: 12px 17px; border: 1px solid #a8c9c2; border-radius: 999px; color: #fff; background: #315f57; box-shadow: 0 10px 28px rgba(41,67,61,.2); font-size: .82rem; font-weight: 750; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .24s ease; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

dialog { width: min(calc(100% - 28px), 420px); max-height: calc(100dvh - 28px); padding: 0; border: 1px solid var(--line); border-radius: 22px; color: var(--ink); background: var(--surface); box-shadow: 0 24px 80px rgba(45,60,53,.2); }
dialog::backdrop { background: rgba(38,48,43,.45); backdrop-filter: blur(3px); }
.dialog-card { padding: 25px 20px 20px; }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--muted); background: var(--surface-2); font-size: 1.3rem; }
.dialog-card > h2 { max-width: 90%; margin: 8px 0 20px; font-family: "Yu Mincho", serif; font-size: 1.25rem; line-height: 1.55; }
.dialog-question { color: var(--muted); font-size: .84rem; }
.reflection-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reflection-options button { min-height: 52px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; font-size: .8rem; font-weight: 750; }
.reflection-options button:last-child { grid-column: 1 / -1; }
.reflection-options span { margin-right: 5px; color: var(--accent); }

.settings-dialog { overflow: auto; }
.settings-card { min-height: 100%; }
.settings-section { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.settings-section + .settings-section { margin-top: 12px; }
.settings-heading { display: flex; align-items: flex-start; gap: 11px; }
.settings-icon { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 12px; color: var(--accent-strong); background: var(--accent-soft); }
.settings-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-heading h3 { margin: 1px 0 3px; font-size: .96rem; }
.settings-heading p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.data-count { margin: 17px 0 9px; color: var(--ink); font-size: .88rem; font-weight: 750; }
.data-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.data-actions button { min-height: 46px; border: 1px solid #9fc6bd; border-radius: 11px; color: var(--accent-strong); background: #fff; font-size: .88rem; font-weight: 800; }
.data-actions button:first-child { color: #fff; background: var(--accent); border-color: var(--accent); }
.usage-open-button { width: 100%; min-height: 44px; margin-top: 14px; border: 1px solid #9fc6bd; border-radius: 11px; color: var(--accent-strong); background: #fff; font-size: .82rem; font-weight: 800; }
.reminder-heading { align-items: center; }
.reminder-heading > div { flex: 1; }
.switch { position: relative; flex: 0 0 46px; width: 46px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: #cbd3d0; transition: background .18s ease; }
.switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(40,55,49,.18); transition: transform .18s ease; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"] span { transform: translateX(18px); }
.reminder-setting-copy { margin: 14px 0 7px; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.setting-state { margin: 0; color: var(--accent-strong); font-size: .78rem; font-weight: 800; }
.feedback-types { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 15px; padding: 0; border: 0; }
.feedback-types legend, .feedback-field > span { width: 100%; margin-bottom: 8px; color: var(--ink); font-size: .82rem; font-weight: 750; }
.feedback-types label { position: relative; }
.feedback-types input { position: absolute; opacity: 0; }
.feedback-types label span { display: grid; place-items: center; min-height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: .76rem; font-weight: 700; }
.feedback-types input:checked + span { color: #255c53; border-color: #9fc6bd; background: var(--accent-soft); }
.feedback-field { display: block; }
.feedback-field textarea { margin-top: 8px; min-height: 112px; }
.privacy-note { margin: 10px 0; color: var(--muted); font-size: .74rem; line-height: 1.55; }
.feedback-submit { width: 100%; min-height: 48px; border: 0; border-radius: 12px; color: #fff; background: var(--accent); font-weight: 800; }
.feedback-submit:disabled { cursor: wait; opacity: .65; }
.prototype-note { margin: 9px 0 0; text-align: center; color: var(--subtle); font-size: .7rem; }
.usage-report-intro { margin: -9px 0 15px; color: var(--muted); font-size: .8rem; line-height: 1.6; }
.usage-summary { margin: 0 0 17px; padding: 4px 14px; border: 1px solid var(--line); border-radius: 14px; background: #f8faf7; }
.usage-summary div { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 12px; }
.usage-summary div + div { border-top: 1px solid var(--line); }
.usage-summary dt { color: var(--muted); font-size: .79rem; }
.usage-summary dd { margin: 0; color: var(--accent-strong); font-size: .88rem; font-weight: 850; }
.about-dialog { overflow: auto; }
.about-card > h2 { margin-bottom: 8px; }
.test-version-badge { display: inline-flex; align-items: center; min-height: 27px; padding: 0 9px; border-radius: 999px; color: #765f25; background: var(--gold-soft); font-size: .7rem; font-weight: 800; }
.about-lead { margin: 13px 0 17px; color: var(--muted); font-size: .82rem; line-height: 1.7; }
.legal-section { border: 1px solid var(--line); border-radius: 13px; background: #fff; overflow: hidden; }
.legal-section + .legal-section { margin-top: 8px; }
.legal-section summary { position: relative; padding: 14px 39px 14px 14px; cursor: pointer; list-style: none; color: var(--ink); font-size: .86rem; font-weight: 800; }
.legal-section summary::-webkit-details-marker { display: none; }
.legal-section summary::after { content: "＋"; position: absolute; top: 50%; right: 15px; color: var(--accent-strong); font-size: 1rem; transform: translateY(-50%); }
.legal-section[open] summary::after { content: "−"; }
.legal-body { padding: 0 14px 15px; border-top: 1px solid var(--line); }
.legal-body h3 { margin: 15px 0 5px; font-size: .8rem; }
.legal-body p { margin: 0; color: var(--muted); font-size: .74rem; line-height: 1.72; }
.legal-body .legal-updated { margin-top: 11px; color: var(--subtle); font-size: .68rem; }
.erase-data-button { width: 100%; min-height: 43px; margin: 14px 0 9px; border: 1px solid #d6b3ac; border-radius: 11px; color: var(--danger); background: #fff; font-size: .78rem; font-weight: 800; }
.erase-copy { margin: -9px 0 18px; color: var(--muted); font-size: .82rem; line-height: 1.7; }
.erase-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.erase-actions button { min-height: 46px; border-radius: 11px; font-weight: 800; }
.erase-actions button:first-child { border: 1px solid var(--line); color: var(--muted); background: #fff; }
.erase-actions button:last-child { border: 0; color: #fff; background: var(--danger); }

.quick-feedback-card { padding-top: 28px; text-align: center; }
.quick-feedback-card .feedback-sprout { display: block; margin: 0 auto 12px; transform: scale(1.35); }
.quick-feedback-card .eyebrow { margin-top: 4px; }
.quick-feedback-card > h2 { max-width: none; margin: 5px 0 7px; }
.quick-feedback-card > p:not(.eyebrow) { margin: 0 auto 19px; color: var(--muted); font-size: .82rem; }
.quick-feedback-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-feedback-actions button { min-height: 48px; border: 1px solid #9fc6bd; border-radius: 12px; color: #255c53; background: var(--accent-soft); font-size: .82rem; font-weight: 800; }
.quiet-skip { min-height: 40px; margin-top: 7px; border: 0; color: var(--muted); background: transparent; font-size: .76rem; }
.reschedule-entry { margin: -10px 0 18px; padding: 11px 12px; border-left: 2px solid var(--accent); color: #55625e; background: #f3f6f2; font-size: .82rem; line-height: 1.6; }
.reschedule-field { display: block; margin-bottom: 14px; }
.reschedule-field span { display: block; margin-bottom: 7px; font-size: .82rem; font-weight: 750; }
.reschedule-field input { width: 100%; min-height: 46px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #fff; }
.import-summary { margin: -9px 0 18px; padding: 12px 13px; border-radius: 12px; color: #315f57; background: var(--accent-soft); font-size: .88rem; font-weight: 750; line-height: 1.55; }
.import-modes { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; border: 0; }
.import-modes legend { margin-bottom: 9px; font-size: .88rem; font-weight: 750; }
.import-modes label { position: relative; display: block; }
.import-modes input { position: absolute; top: 18px; left: 13px; accent-color: var(--accent); }
.import-modes label > span { display: block; padding: 12px 12px 12px 39px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.import-modes input:checked + span { border-color: #8ebbb1; background: var(--accent-soft); }
.import-modes b, .import-modes small { display: block; }
.import-modes b { margin-bottom: 2px; font-size: .88rem; }
.import-modes small { color: var(--muted); font-size: .76rem; line-height: 1.45; }
.feedback-submit.danger-button { background: var(--danger); }

body.privacy .entry-card, body.privacy .entry-list { filter: blur(12px); user-select: none; pointer-events: none; }
body.privacy #privacyButton svg { opacity: .4; }

@media (min-width: 700px) {
  body { padding: 24px 0; }
  .app-shell { min-height: calc(100dvh - 48px); border: 1px solid var(--line); border-radius: 30px; background: rgba(247,245,239,.93); box-shadow: 0 22px 70px rgba(55,69,63,.12); overflow: hidden; }
  .bottom-nav { bottom: 24px; border-radius: 0 0 30px 30px; }
}

.insight-actions, .calendar-modes { display: flex; gap: 8px; margin-bottom: 16px; }
.insight-actions button, .calendar-modes button { flex: 1; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: .875rem; }
.calendar-modes button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.calendar-month { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 12px; }
.calendar-month h3 { margin: 0; font-size: 1rem; }
#monthlyDialog .calendar-month { margin-top: 40px; }
.calendar-month button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 1.5rem; }
.calendar-grid, .calendar-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.calendar-week { margin-bottom: 6px; text-align: center; color: var(--muted); font-size: .75rem; }
.calendar-grid button { min-height: 48px; padding: 3px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1px solid transparent; border-radius: 6px; background: var(--surface-2); color: var(--ink); }
.calendar-grid button small { min-height: 12px; font-size: .625rem; color: var(--accent-strong); }
.calendar-grid button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.insight-record { border-top: 1px solid var(--line); padding: 12px 0; break-inside: avoid; }
.insight-meta, .insight-step { color: var(--muted); font-size: .8125rem; line-height: 1.7; overflow-wrap: anywhere; }
.insight-text { margin: 8px 0; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
#calendarDayTitle, #monthlyReport h3 { margin-top: 24px; font-size: 1rem; }
#monthlyReport h2 { font-family: "Yu Mincho", serif; margin-top: 8px; }
.month-overview { font-size: 1rem; }
.insight-counts { margin: 12px 0; }
.insight-counts > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
.insight-counts dd { margin: 0; white-space: nowrap; }
.report-footer { margin-top: 24px; font-size: .75rem; color: var(--muted); line-height: 1.7; }
.plus-feature { padding: 16px 0; border-top: 1px solid var(--line); }
.plus-feature h3 { margin: 0 0 8px; font-size: 1rem; }
.plus-feature p { font-size: .875rem; line-height: 1.8; }
.plus-feature > button, .theme-choices button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--accent-strong); }
.theme-choices { display: flex; gap: 8px; }
.theme-choices button { flex: 1; }
.theme-choices button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.plus-price { font-size: 1.125rem; }
.plus-price small { display: block; margin-top: 6px; color: var(--muted); font-size: .75rem; }
body[data-theme="clay"] { --accent: #8c5544; --accent-strong: #8c5544; --accent-soft: #f3e5dc; }
body[data-theme="stone"] { --accent: #526166; --accent-strong: #526166; --accent-soft: #e4e9e9; }
body[data-theme="clay"] .choice.selected, body[data-theme="clay"] .category.selected, body[data-theme="stone"] .choice.selected, body[data-theme="stone"] .category.selected { color: var(--accent-strong); border-color: var(--accent); }
body[data-theme="clay"] .feeling.selected, body[data-theme="stone"] .feeling.selected { color: var(--accent-strong); border-color: var(--accent); }
body.privacy #calendarDialog, body.privacy #monthlyDialog { filter: blur(12px); pointer-events: none; }
@media print {
  @page { size: A4; margin: 18mm; }
  html, body { background: white; }
  .app-shell, .toast, dialog { display: none !important; }
  #monthlyDialog[open] { display: block !important; position: static; width: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; overflow: visible; background: white; }
  #monthlyDialog::backdrop { display: none; }
  #monthlyDialog .dialog-card { padding: 0; }
  #monthlyDialog .dialog-close, #monthlyDialog .report-controls { display: none !important; }
  #monthlyReport h3 { break-after: avoid; }
}

@media (max-width: 370px) {
  .app-shell { padding-left: 14px; padding-right: 14px; }
  .top-actions { gap: 4px; }
  .icon-button { width: 39px; height: 39px; }
  .horizon-grid { grid-template-columns: 1fr 1fr; }
  .reminder-banner { grid-template-columns: 38px 1fr; }
  .reminder-open { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* A quiet selection surface with optional writing. */
[hidden] { display: none !important; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid #34776d; outline-offset: 3px; }
input, textarea, button, summary { scroll-margin-block: 80px; }
.app-shell { width: min(100%, 480px); padding-inline: 22px; }
.topbar { align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.brand-name { font-size: 1.45rem; letter-spacing: .1em; display: flex; gap: 8px; align-items: center; }
.brand-leaf { width: 9px; height: 16px; border: 1.5px solid var(--accent); border-radius: 9px 0 9px 0; transform: rotate(24deg); }
.topbar .eyebrow { margin: 6px 0 0; font-size: .75rem; color: var(--muted); font-weight: 500; letter-spacing: .02em; }
.icon-button { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; }
.write-heading { margin-bottom: 16px; }
.write-heading .eyebrow { font-size: .875rem; font-weight: 500; letter-spacing: .06em; }
.write-heading h2 { margin: 6px 0 8px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 1.55rem; font-weight: 600; line-height: 1.5; }
.write-heading > p:last-child { margin: 0; color: var(--muted); font-size: .875rem; }
.entry-card { background: var(--surface); box-shadow: none; }
.reminder-banner { grid-template-columns: 1fr auto; padding: 8px 44px 8px 12px; gap: 8px; border-radius: 10px; box-shadow: none; }
.reminder-sprout, .reminder-copy span { display: none; }
.reminder-copy strong { font-size: .875rem; font-weight: 500; }
.reminder-open { min-height: 44px; border: 0; padding-inline: 8px; background: transparent; font-size: .875rem; font-weight: 500; }
.reminder-dismiss { width: 36px; height: 44px; top: 8px; right: 4px; }
.composer-card > .step-block { padding: 14px 18px; }
.composer-card .text-field { margin-top: 0; }
.composer-card textarea { min-height: 140px; border: 0; border-radius: 0; background: transparent; padding: 4px 0 30px; font-size: 1rem; line-height: 1.9; }
.composer-card textarea::placeholder { color: #64736f; }
.composer-card textarea:focus { box-shadow: none; }
.counter { right: 0; color: var(--subtle); font-size: .75rem; }
.draft-status { color: var(--subtle); font-size: .75rem; margin: 8px 0 6px; line-height: 1.6; }
.prompt-button, .small-step-toggle, .date-link { font-size: .875rem; min-height: 44px; font-weight: 500; }
.prompt-button { border-bottom: 1px solid var(--line); margin: 0 0 6px; }
.small-step-toggle { margin-top: 0; }
.entry-options { border-top: 1px solid var(--line); }
.entry-options > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; }
.entry-options > summary::-webkit-details-marker { display: none; }
.options-label { display: block; margin-bottom: 5px; font-size: .75rem; color: var(--muted); }
.entry-options summary strong { font-size: .875rem; font-weight: 500; line-height: 1.6; overflow-wrap: anywhere; }
#entryOptions > summary > span:first-child { display: flex; align-items: center; gap: 12px; }
#entryOptions .options-label { margin: 0; }
.optional-label { margin-left: 10px; color: var(--muted); font-size: .75rem; }
.optional-writing > summary { min-height: 56px; }
.options-chevron { flex: 0 0 8px; width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); }
.entry-options[open] .options-chevron { transform: rotate(225deg); }
.entry-options[open] > summary { border-bottom: 1px solid var(--line); }
.step-block { padding: 18px; }
.step-heading { margin-bottom: 12px; }
.step-heading p { font-family: inherit; font-size: .9375rem; font-weight: 600; }
.step-heading div > span { font-size: .875rem; }
.feeling-row, .category-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; overflow: visible; }
.feeling { min-width: 0; min-height: 92px; padding-inline: 2px; font-size: .875rem; border-radius: 10px; font-weight: 500; }
.mood-sprout { width: 42px; height: 42px; }
.feeling.selected { box-shadow: none; }
.feeling.selected::after { top: 4px; right: 4px; width: 14px; height: 14px; }
.choice, .category, .filter { min-height: 44px; font-size: .875rem; font-weight: 500; border-radius: 8px; }
.category { padding-inline: 2px; font-size: .75rem; white-space: nowrap; }
.horizon-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.save-button { border-radius: 10px; min-height: 52px; box-shadow: none; font-weight: 600; margin-top: 16px; }
.save-button:disabled { opacity: .65; cursor: wait; }
.local-note { color: var(--muted); font-size: .75rem; line-height: 1.6; margin-top: 14px; }
.bottom-nav { width: min(100%, 480px); background: var(--surface); backdrop-filter: none; padding-inline: 22px; }
.nav-item { color: var(--muted); font-size: .875rem; }
.nav-item.active { color: var(--accent-strong); }
.saved-entry { border-radius: 12px; padding: 18px; }
.saved-entry h3 { font-weight: 500; font-size: 1rem; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.entry-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; }
.entry-meta { font-size: .875rem; }
.record-tools { display: flex; gap: 4px; margin-left: auto; }
.record-tools button { min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--muted); font-size: .875rem; }
.record-tools button:first-child { color: var(--accent-strong); }
.reflect-button, .reschedule-button { min-height: 44px; font-size: .875rem; border-radius: 8px; }
.entry-feeling, .review-date, .reflection-label, .entry-step { font-size: .875rem; }
.entry-step { overflow-wrap: anywhere; }
.section-title-row h2 { font-weight: 600; }
.tips-intro, .tip-card, .settings-section { border-radius: 12px; }
.tip-body > p, .tip-body blockquote, .tip-card summary small, .tip-use-button, .tip-review-button, .settings-heading p, .privacy-note, .legal-body p, .about-lead, .reminder-setting-copy, .setting-state { font-size: .875rem; }
.tip-use-button, .tip-review-button { min-height: 44px; border-radius: 8px; }
.feedback-types input:focus-visible + span { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
.feedback-types label span { min-height: 44px; font-size: .875rem; }
.dialog-close { width: 44px; height: 44px; }
.edit-field { display: block; margin-bottom: 18px; }
.edit-field > span { display: block; margin-bottom: 8px; font-size: .875rem; }
.edit-field small { color: var(--muted); font-size: .875rem; margin-left: 6px; }
.edit-field input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 1rem; }
.reschedule-entry { overflow-wrap: anywhere; }
.toast { border-radius: 12px; max-width: calc(100% - 32px); white-space: normal; text-align: center; font-size: .875rem; line-height: 1.6; }
.first-launch .erase-data-button { display: none; }
body.privacy .write-heading, body.privacy .local-note, body.privacy dialog .reschedule-entry, body.privacy dialog textarea, body.privacy dialog input, body.privacy #dialogEntryText { filter: blur(12px); pointer-events: none; }
@media (max-width: 370px) {
  .app-shell { padding-inline: 16px; }
  .horizon-grid, .category-row, .feeling-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feeling { min-height: 84px; }
  .top-actions { gap: 2px; }
  .icon-button { width: 44px; height: 44px; }
}
@media (min-width: 700px) {
  .app-shell { border-radius: 18px; box-shadow: none; background: var(--bg); }
  .bottom-nav { border-radius: 0 0 18px 18px; }
}
