/* みみとめ — 帳面 (ruled notebook). Tokens = the app's NoteColors (lib/theme/note_colors.dart).
   Grammar carried from the app: near-achromatic paper, lines instead of boxes, section heads with a thick rule,
   二重罫 under titles, a 欄外 margin column, 一二三 numerals, Mincho only for names/titles, 400/500/700 weights. */
@font-face {
  font-family: "Zen Old Mincho Sub";
  src: url("/fonts/mincho.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --paper: #FCFDFE; --ink: #1D1F22; --ink-soft: #5E6167; --blue-black: #2B3F66;
  --shu: #C8302A; --shu-text: #B02A25; --highlight: #F2E68E;
  --rule: #A9C2D6; --rule-dot: #7FA3BF; --rule-strong: #1D1F22; --ink-fill: #1D1F22; --on-ink-fill: #FCFDFE;
  --grid: 32px; --wrap: 1040px; --margin-col: 6.5rem;
  --mincho: "Zen Old Mincho Sub", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --gothic: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16181B; --ink: #E9EBEE; --ink-soft: #A2A6AD; --blue-black: #9DB4DD;
    --shu: #F06464; --shu-text: #F06464; --highlight: #454018;
    --rule: #3E5468; --rule-dot: #5A7690; --rule-strong: #8C929A; --ink-fill: #BEC3CA; --on-ink-fill: #16181B;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--gothic); font-weight: 400; font-size: 1rem; line-height: 1.85;
  word-break: auto-phrase; overflow-wrap: anywhere; line-break: strict;
}
html[lang="en"] body { word-break: normal; overflow-wrap: break-word; line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-black); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.4; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.small { font-size: .875rem; color: var(--ink-soft); }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 8px; background: var(--paper); padding: 4px 8px; z-index: 2; }

/* header / footer */
.top { border-bottom: 1px solid var(--rule); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { border-radius: 6px; }
.brand span { font-family: var(--mincho); font-weight: 700; font-size: 1.375rem; letter-spacing: .04em; }
.nav { display: flex; gap: 18px; font-size: .9375rem; font-weight: 500; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"], .nav a:hover { border-bottom-color: var(--ink); }
.site-foot { margin-top: calc(var(--grid) * 3); border-top: 3px double var(--rule-strong); padding: 24px 0 40px; font-size: .9375rem; }
.foot-in p { margin: 8px 0; color: var(--ink-soft); }
.foot, .langs { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 8px; }
.foot a, .langs a { color: var(--ink); }
.langs a[aria-current="true"] { font-weight: 700; text-decoration: none; }

/* hero */
.hero { padding-top: calc(var(--grid) * 1.5); }
.hero-grid { display: grid; gap: 8px 32px; grid-template-columns: 1fr; align-items: end; }
@media (min-width: 720px) { .hero-grid { grid-template-columns: 1fr auto; } }
.eyebrow { margin: 0 0 8px; font-size: .9375rem; font-weight: 500; color: var(--blue-black); }
.hero h1 { font-family: var(--mincho); font-size: clamp(2.25rem, 7vw, 3.75rem); line-height: 1.3; letter-spacing: .02em; }
html[lang="en"] .hero h1 { letter-spacing: 0; }
/* 行罫: lead text written on the notebook's ruled lines */
.lead { font-size: 1.0625rem; max-width: 40em; }
.ruled {
  --lh: 2.25rem; line-height: var(--lh); margin: 20px 0 24px;
  background-image: linear-gradient(to bottom, transparent calc(var(--lh) - 1px), var(--rule) calc(var(--lh) - 1px));
  background-size: 100% var(--lh); background-position: 0 0;
}
.facts { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: .9375rem; color: var(--ink-soft); }
.facts li::before { content: "✓"; color: var(--blue-black); margin-right: 6px; }
/* 二重罫 */
hr.double { border: 0; height: 6px; margin: calc(var(--grid) * 1) 0 0; border-top: 2px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); }

/* store slots */
.stores { list-style: none; margin: 0; padding: 0; max-width: 420px; }
.stores.soon li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.stores.soon li:first-child { border-top: 2px solid var(--rule-strong); }
.stores .store { font-weight: 500; }
.stores .when { font-size: .875rem; color: var(--ink-soft); }
.stores.live { display: flex; flex-wrap: wrap; gap: 12px; max-width: none; }
.ink-btn { display: inline-flex; flex-direction: column; min-width: 180px; padding: 10px 18px; background: var(--ink-fill); color: var(--on-ink-fill); text-decoration: none; font-weight: 700; border-radius: 2px; }
.ink-btn small { font-weight: 400; font-size: .8125rem; }

/* sections: heading + thick rule, no cards */
.sec { margin-top: calc(var(--grid) * 2.5); }
.sec-h { font-family: var(--mincho); font-size: clamp(1.5rem, 4.2vw, 2rem); padding-bottom: 10px; border-bottom: 2px solid var(--rule-strong); }
.sec-lead { max-width: 42em; margin: 20px 0 0; }
.sec-note { margin: 12px 0 0; font-size: .875rem; color: var(--ink-soft); }

/* 一二三 numbered rows in the 欄外 margin column */
.numbered, .ledger { list-style: none; margin: 0; padding: 0; }
.numbered li, .ledger li { display: grid; grid-template-columns: 2.75rem 1fr; gap: 0 16px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 720px) { .numbered li, .ledger li { grid-template-columns: var(--margin-col) 1fr; gap: 0 24px; } }
.numbered .kan, .ledger .margin { border-right: 1px solid var(--rule); color: var(--ink-soft); font-size: 1.0625rem; line-height: 1.6; }
.numbered .kan { font-family: var(--mincho); font-weight: 700; }
.ledger .margin { font-size: .9375rem; font-weight: 500; color: var(--blue-black); padding-right: 8px; }
.numbered h3 { font-size: 1.0625rem; line-height: 1.6; }
.numbered p, .ledger p { margin: 4px 0 0; color: var(--ink); max-width: 44em; }
.ledger p { margin: 0; }

/* real screens */
.shots { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
@media (min-width: 900px) { .shots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }
.shots figure { margin: 0; }
.shots img { width: 100%; border: 1px solid var(--rule); }
.shots figcaption { margin-top: 8px; font-size: .8125rem; line-height: 1.6; color: var(--ink-soft); padding-top: 6px; border-top: 2px solid var(--rule-strong); }

/* free / pro */
.plans { display: grid; gap: 24px 40px; margin-top: 24px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .plans { grid-template-columns: 1fr 1.4fr; } }
.plans h3 { font-size: 1.0625rem; padding-bottom: 8px; border-bottom: 2px solid var(--rule-strong); }
.ruled-list { list-style: none; margin: 0; padding: 0; }
.ruled-list li { padding: 10px 0 10px 1.25em; border-bottom: 1px solid var(--rule); position: relative; }
.ruled-list li::before { content: "・"; position: absolute; left: 0; color: var(--ink-soft); }
html[lang="en"] .ruled-list li::before { content: "–"; }
.plans .small { margin: 10px 0 0; }

/* ※ notes */
.notes { list-style: none; margin: 24px 0 0; padding: 0; font-size: .875rem; color: var(--ink-soft); max-width: 46em; }
.notes li { padding-left: 1.5em; text-indent: -1.5em; margin: 6px 0; }
.notes li::before { content: "※"; display: inline-block; width: 1.5em; text-indent: 0; }

/* documents */
.doc { max-width: 760px; padding-top: calc(var(--grid) * 1.5); }
.doc-head h1 { font-family: var(--mincho); font-size: clamp(1.875rem, 6vw, 2.5rem); }
.doc-head hr.double { margin-top: 12px; }
.dateline { margin: 0 0 12px; font-size: .875rem; color: var(--ink-soft); text-align: right; }
.dateline time { color: var(--ink); border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.prose { margin-top: 24px; }
.prose .lead { margin-top: 0; }
.prose h2 { font-size: 1.1875rem; margin: calc(var(--grid) * 1.25) 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--rule-strong); }
.prose p { margin: 10px 0; }
.prose ul { margin: 10px 0; padding-left: 1.4em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--ink-soft); }
.prose strong { font-weight: 700; }
.faq { margin-top: 24px; border-top: 2px solid var(--rule-strong); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 14px 2rem 14px 0; position: relative; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; position: absolute; right: 0; top: 14px; color: var(--ink-soft); }
.faq details[open] summary::after { content: "－"; }
.faq .a { padding: 0 0 12px; border-left: 1px solid var(--rule); padding-left: 14px; margin-bottom: 14px; }
.faq .a p { margin: 0; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print { .top .nav, .site-foot .langs { display: none; } }

/* hero screen + closing mascot */
.hero-shot { width: 200px; justify-self: start; }
.hero-shot img { border: 1px solid var(--rule); }
@media (min-width: 720px) { .hero-shot { width: 260px; justify-self: end; } }
.get-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 20px; }
.get-row .stores { flex: 1; }
.sloth { width: 96px; flex: none; }
@media (min-width: 720px) { .sloth { width: 144px; } }
@media (max-width: 719px) {
  .ledger li { grid-template-columns: 1fr; gap: 2px; }
  .ledger .margin { border-right: 0; padding: 0; }
}
