/* Enfour PDA and PDA Notes web pages: shared styles. */
:root {
  --bg: #f4f1ea;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --muted: #5d5d63;
  --line: #e2ddd2;
  --accent: #4d7a46;
  --accent-ink: #ffffff;
  --sage: #c2d4b6;
  --shadow: 0 1px 2px rgba(40, 35, 25, .06), 0 8px 24px rgba(40, 35, 25, .08);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151614;
    --surface: #1f201d;
    --ink: #ecebe6;
    --muted: #a5a49d;
    --line: #34352f;
    --accent: #9cc590;
    --accent-ink: #13200f;
    --sage: #2f3a2a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}
:lang(ja) { line-height: 1.8; }
a { color: var(--accent); text-underline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }

/* Language switching: the head script sets html[data-lang]. Without
   JavaScript both languages show, English first. */
html[data-lang="en"] .ja,
html[data-lang="ja"] .en { display: none !important; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* Header */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; margin-right: auto; }
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.site-head nav { display: flex; gap: 18px; align-items: center; font-size: 15px; }
.site-head nav a { color: var(--muted); text-decoration: none; }
.site-head nav a:hover, .site-head nav a[aria-current="page"] { color: var(--ink); }
.lang-btn {
  font: inherit; font-size: 14px; color: var(--ink); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; cursor: pointer;
}
.lang-btn:hover { border-color: var(--muted); }

/* Hero */
.hero { padding: 64px 0 40px; text-align: center; }
.hero .icon { width: 128px; height: 128px; margin: 0 auto 20px; border-radius: 28px; box-shadow: var(--shadow); }
.eyebrow { color: var(--accent); font-weight: 650; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; margin: 0 0 6px; }
h1 { font-size: clamp(34px, 6vw, 52px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 14px; }
:lang(ja) h1, h1:lang(ja) { letter-spacing: 0; line-height: 1.3; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) .lede { word-break: auto-phrase; }
.lede { font-size: 20px; color: var(--muted); max-width: 640px; margin: 0 auto 26px; }
.cta { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; padding: 12px 24px; border-radius: 999px; }
.cta:hover { filter: brightness(1.06); }
.req { font-size: 14px; color: var(--muted); margin: 14px auto 0; max-width: 560px; }

/* Screenshot strip */
.gallery {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 20px 24px; margin: 0 auto; max-width: 1200px;
  -webkit-overflow-scrolling: touch;
}
.gallery img { scroll-snap-align: center; flex: 0 0 auto; border-radius: 12px; box-shadow: var(--shadow); }
.gallery.mac img { width: min(720px, 86vw); }
.gallery.phone img { width: min(260px, 62vw); border-radius: 22px; }

/* Content sections */
section { padding: 36px 0; }
section.wrap { padding-top: 28px; padding-bottom: 28px; }
h2 { font-size: 26px; line-height: 1.25; margin: 0 0 14px; letter-spacing: -.01em; }
h3 { font-size: 18px; margin: 0 0 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.card ul { margin: 0; padding-left: 1.1em; }
.card li { margin: 6px 0; }
.card p:last-child { margin-bottom: 0; }
.note { background: var(--sage); border-radius: 14px; padding: 18px 22px; }
.note p { margin: 0; }

/* Documents (privacy, support) */
main.doc.wrap { padding-top: 48px; padding-bottom: 24px; }
.doc h1 { font-size: clamp(30px, 5vw, 40px); }
.doc h2 { margin-top: 36px; font-size: 22px; }
.doc .updated { color: var(--muted); margin-top: -6px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.contact { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; margin: 24px 0; }
.contact p { margin: 0 0 8px; }
.contact p:last-child { margin: 0; }
details { border-top: 1px solid var(--line); padding: 12px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style-position: inside; }
details > div { padding: 8px 0 4px; color: var(--ink); }
details > div p { margin: 0 0 10px; }
kbd { font: 14px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.menu { font-weight: 600; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-foot a { color: var(--muted); }
.site-foot .legal { flex-basis: 100%; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 28px; }
  :lang(ja) .hero h1 { font-size: 26px; }
  main.doc.wrap { padding-top: 32px; }
  .hero .icon { width: 96px; height: 96px; border-radius: 22px; }
  .lede { font-size: 18px; }
  .site-head nav { gap: 14px; }
  .gallery { padding: 8px 16px 20px; }
  section.wrap { padding-top: 22px; padding-bottom: 22px; }
}
.lede.left { text-align: left; margin-left: 0; }
