:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  --bg: #f5f6f6; --surface: #fff; --surface-2: #e9f1f0; --text: #1f2933; --muted: #5f6b73; --border: #dfe5e5;
  --accent: #087f7b; --accent-strong: #06605d; --accent-soft: #e0f2f0; --on-accent: #fff;
  --overdue: #c5352b; --today: #b65a00; --soon: #1c62c4; --done: #087f7b;
  --shadow: 0 8px 24px #0b1f2414;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101918; --surface: #182725; --surface-2: #1f3330; --text: #eef5f3; --muted: #b2c3bf; --border: #2b423f;
    --accent: #5fd0c8; --accent-strong: #8be0d9; --accent-soft: #1d3936; --on-accent: #06211f;
    --overdue: #ff8f85; --today: #ffb866; --soon: #8fbcff; --done: #5fd0c8;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.75; -webkit-font-smoothing: antialiased; word-break: auto-phrase; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.35; margin: 0; text-wrap: balance; }
h1, h2 { color: var(--accent); }
p { margin: 0; }
a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
small, .muted { color: var(--muted); }
img { max-width: 100%; height: auto; }
.wrap { width: min(100% - 40px, 1000px); margin: 0 auto; }
.narrow { width: min(100% - 48px, 760px); margin: 0 auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -64px; z-index: 30; padding: 8px 14px; background: var(--surface); border-radius: 10px; }
.skip:focus { top: 12px; }

/* 上のバー */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.top-in { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 18px; margin-left: auto; font-size: .93rem; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 10px 0; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--text); }
.pill { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--accent); color: var(--on-accent); text-decoration: none; font-size: .92rem; }
.pill:hover { background: var(--accent-strong); }
@media (max-width: 780px) { .top nav { display: none; } .pill { margin-left: auto; } }

section { padding: 52px 0; }
.sec-head { max-width: 40em; margin: 0 auto 30px; text-align: center; }
.sec-head h2 { font-size: clamp(1.45rem, 3.6vw, 1.9rem); }
.sec-head p { margin-top: 10px; color: var(--muted); }

/* 最初の見出し */
.hero { padding: 52px 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: .9rem; margin-bottom: 10px; }
.hero h1 { font-size: clamp(2rem, 5.4vw, 3.1rem); font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { margin: 18px 0 24px; color: var(--muted); font-size: 1.08rem; max-width: 34em; }
.store { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.badge { display: inline-block; line-height: 0; border-radius: 10px; }
.badge img { height: 54px; width: auto; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; }
.chips li { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px 14px; font-size: .88rem; }
.shot { margin: 0; justify-self: center; width: min(300px, 78vw); border-radius: 30px; overflow: hidden; box-shadow: var(--shadow); line-height: 0; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } }

/* 記録の見本 */
.demo { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; align-items: start; }
.demo-main, .demo-side { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: clamp(16px, 3vw, 24px); box-shadow: var(--shadow); min-width: 0; }
.demo-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; }
.demo-title h3 { font-size: 1.3rem; }
.demo-title span { color: var(--muted); font-size: .9rem; }
.tiles { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 14px; padding: 0; }
.tiles li { background: var(--bg); border-radius: 14px; padding: 8px 6px; text-align: center; font-size: .78rem; color: var(--muted); }
.tiles b { display: block; font-size: 1.35rem; line-height: 1.3; color: var(--text); font-variant-numeric: tabular-nums; }
.tiles .t-overdue b { color: var(--overdue); } .tiles .t-today b { color: var(--today); } .tiles .t-soon b { color: var(--soon); }
.tasks { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.task { border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; background: var(--surface); transition: background-color .35s ease, border-color .35s ease; }
.task-head { display: flex; align-items: flex-start; gap: 12px; }
.task-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.task-icon svg { width: 22px; height: 22px; }
.task h4 { margin: 0; font-size: 1.02rem; line-height: 1.4; }
.task-meta { color: var(--muted); font-size: .86rem; }
.status { display: inline-block; margin-top: 8px; padding: 1px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--bg); }
.s-overdue { color: var(--overdue); } .s-today { color: var(--today); } .s-soon { color: var(--soon); } .s-done { color: var(--done); }
.task-next { margin-top: 6px; font-size: .92rem; font-variant-numeric: tabular-nums; }
.task-next b { font-size: 1.05rem; }
.task-controls { display: none; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.js .task-controls { display: flex; }
.task-controls label { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); font-weight: 600; }
.task-controls select { min-height: 44px; padding: 0 30px 0 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: .95rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; }
.btn:hover { background: var(--accent-strong); }
.btn svg { width: 18px; height: 18px; }
.btn-record { flex: 1 1 200px; }
.btn-quiet { background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; padding: 0 8px; }
.btn-quiet:hover { background: none; color: var(--text); }
.task.is-done { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.task.is-done .btn-record { background: none; color: var(--done); cursor: default; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.task.is-done .task-icon { background: var(--accent); color: var(--on-accent); animation: pop .4s ease-out; }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.task-preview { flex-basis: 100%; font-size: .86rem; color: var(--muted); }
.demo-side h3 { font-size: 1.1rem; margin-bottom: 10px; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.history li { border-radius: 14px; background: var(--bg); padding: 10px 14px; font-size: .88rem; animation: slide .35s ease-out; }
.history li b { display: block; font-size: .95rem; }
.history .empty { color: var(--muted); animation: none; }
@keyframes slide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.demo-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; font-size: .86rem; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 820px) { .demo { grid-template-columns: 1fr; } }

/* できること */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feature { display: grid; grid-template-columns: 1fr 150px; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); }
.feature > div { min-width: 0; }
.feature h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: .96rem; }
.feature figure { margin: 0; border-radius: 16px; overflow: hidden; line-height: 0; }
.plain-list { margin: 22px auto 0; max-width: 46em; padding-left: 1.3em; }
.plain-list li + li { margin-top: 4px; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .feature { grid-template-columns: 1fr 104px; padding: 18px; gap: 12px; } }

/* 頻度の目安 */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; min-width: 640px; }
th, td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); font-size: .95rem; }
thead th { font-size: .82rem; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
tbody th { font-weight: 700; white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.set { font-weight: 700; color: var(--accent); white-space: nowrap; }
.note { margin-top: 14px; font-size: .9rem; color: var(--muted); }

/* カード・よくある質問・サポート */
.card { background: var(--surface); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.card h2 { font-size: 1.3rem; margin-bottom: 8px; }
.card h2:not(:first-child) { margin-top: 22px; }
.card p + p { margin-top: 10px; }
.tint { background: var(--accent-soft); box-shadow: none; }
.faq details { border-top: 1px solid var(--border); padding: 10px 0; }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 700; padding: 8px 30px 8px 0; position: relative; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 6px; color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding: 2px 0 8px; }
.cta { text-align: center; }
.cta .store { justify-content: center; margin-top: 20px; }

/* プライバシーポリシー（文章のページ） */
.doc { padding: 40px 0 24px; }
.doc h1 { font-size: clamp(1.6rem, 5vw, 2.1rem); margin-bottom: 8px; }
.doc section { background: var(--surface); border-radius: 18px; padding: 24px; margin: 16px 0; box-shadow: var(--shadow); }
.doc section h2 { font-size: 1.25rem; margin-bottom: 8px; }
.doc > .narrow > p { margin-top: 14px; }

/* 下の部分 */
footer { border-top: 1px solid var(--border); padding: 28px 0 48px; font-size: .9rem; color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin-bottom: 6px; }
.foot-links a { color: var(--muted); font-weight: 500; display: inline-flex; align-items: center; min-height: 44px; }
p.ohm-publisher { margin: 6px 0 0; padding: 0; line-height: 0; }
.ohm-publisher a { display: inline-flex; align-items: center; min-height: 44px; margin: 0 -8px; padding: 0 8px; border: 0; border-radius: 10px; background: none; box-shadow: none; text-decoration: none; }
.ohm-publisher img { display: block; width: 179px; height: 24px; max-width: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.ohm-publisher a:hover { opacity: .8; }
.ohm-publisher a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .task { transition: none; }
  .task.is-done .task-icon, .history li { animation: none; }
}
