/* CamLog site — self-contained. No external fonts, no analytics, no remote assets. */

:root {
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --accent: #1ba9a0;
  --accent-soft: rgba(27, 169, 160, 0.10);
  --walk: #34c759;
  --run: #ff9f0a;
  --cycle: #0a84ff;
  --auto: #8e8e93;
  --stay: #af52de;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .05);
  --maxw: 760px;        /* readable measure for prose */
  --maxw-wide: 1120px;  /* wide container for cards / showcases */
  --measure: 760px;     /* max line length inside a wide container */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-2: #101012;
    --card: #1c1c1e;
    --text: #f5f5f7;
    --muted: #98989d;
    --line: #38383a;
    --accent: #2fc6bc;
    --accent-soft: rgba(47, 198, 188, 0.14);
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}

/* ---------- language switching ---------- */
/* Six languages: ja (default) / en / zh-Hans / es / fr / de.
   Markup uses the block classes .ja .en .zh .es .fr .de; <html> carries
   js + lang-<code>, where the code for Chinese is zh-Hans.
   Without JS only the JA blocks are shown (see the rules near the end). */
.langbar { display: none; }
html.js .langbar { display: flex; }
html.js.lang-ja :where(.en, .zh, .es, .fr, .de) { display: none; }
html.js:not(.lang-ja) .ja { display: none; }

/* ---------- layout ---------- */
/* One container width for the whole site: header, every section, footer. */
.wrap {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* Kept as an alias so existing markup stays valid. */
.wrap--wide { max-width: var(--maxw-wide); }

/* Prose keeps a readable measure but stays flush with the container's
   left edge, so headings line up down the whole page.
   Non-text children (.cardgrid, .table-scroll, .shot-row, .grid12,
   .showcase) stay full width. */
.prose > :where(h1, h2, h3, p, ul, ol, .note, details, .card) {
  max-width: var(--measure);
}

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

@media (prefers-color-scheme: dark) {
  header.site { background: rgba(0, 0, 0, .72); }
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
}

.brand {
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand svg { display: block; }

nav.site {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
}

nav.site a {
  color: var(--muted);
  text-decoration: none;
}

nav.site a:hover { color: var(--text); }

.langbar {
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.langbar button {
  font: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.langbar button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

main { display: block; }

section {
  padding: 44px 0;
  border-top: 1px solid var(--line);
}

section:first-of-type { border-top: 0; }

/* ---------- type ---------- */
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.3; }

h1 {
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 700;
  margin: 0 0 16px;
}

h2 {
  font-size: clamp(24px, 3.4vw, 31px);
  font-weight: 600;
  margin: 0 0 6px;
}

h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 22px 0 4px;
}

p { margin: 0 0 16px; }

.lead {
  font-size: clamp(19px, 2.4vw, 22px);
  color: var(--muted);
  margin: 0 0 20px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

.small { font-size: 15px; color: var(--muted); }

a { color: var(--accent); }

ul, ol { margin: 0 0 16px; padding-left: 1.3em; }
li { margin: 0 0 6px; }

/* ---------- hero ---------- */
.hero {
  padding: 44px 0 40px;
  text-align: center;
}

.hero .lead { margin-left: auto; margin-right: auto; max-width: 34em; }

/* hero call to action */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;   /* バッジ(60px)の隣でボタンを伸ばさない */
  gap: 12px;
  margin: 0;
}

.btn {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color:#0b2a28;font-weight:600;
}

.btn:hover { opacity: .88; }

/* Apple 公式の App Store バッジ(site/img/appstore-badge-*.svg、改変不可)。
   高さは隣のボタンと揃えず、ガイドライン最小(40px)より大きい 60px にする */
.badge { display: inline-block; line-height: 0; }
.badge img { height: 60px; width: auto; display: block; }
.badge:hover { opacity: .88; }

.btn--ghost {
  background: transparent;
  color: var(--accent);
}

/* illustration, now used inside a prose section */
.hero-art {
  margin: 32px 0 0;
  max-width: 560px;
}

.hero-art svg { width: 100%; height: auto; display: block; }

/* ---------- features ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.feature + .feature { margin-top: 64px; }

.feature .art {
  background: var(--bg-2);
  border-radius: 28px;
  padding: 24px;
}

.feature .art svg { width: 100%; height: auto; display: block; }

.feature:nth-child(even) .art { order: 2; }

@media (max-width: 720px) {
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature:nth-child(even) .art { order: 0; }
  section { padding: 34px 0; }
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  nav.site { gap: 12px; font-size: 14px; }
}

/* ---------- cards & tables ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
  margin: 0 0 16px;
}

.card h3 { margin-top: 0; }

.card p:last-child { margin-bottom: 0; }

.cardgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: stretch;
}

/* Cards in a row are the same height: the illustration band is fixed,
   the text grows, and a trailing note is pushed to the bottom. */
.cardgrid > .card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* only the one visible language block grows; without JS both are shown
   and are left as plain blocks */
html.js .cardgrid > .card > :where(.ja, .en, .zh, .es, .fr, .de) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.cardgrid .card p.small:last-child { margin-top: auto; }

@media (min-width: 720px) {
  .cardgrid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .cardgrid { grid-template-columns: repeat(3, 1fr); }
}

/* Text-heavy cards (privacy notes, settings reference): two columns at most,
   so a paragraph never drops below a readable line length. */
@media (min-width: 900px) {
  .cardgrid--wide { grid-template-columns: repeat(2, 1fr); }
}

.cardgrid > .card { margin: 0; }

/* illustration at the top of a card — a fixed band, so every card in a
   row starts its text at the same height */
.card-art {
  background: var(--bg-2);
  border-radius: 16px;
  padding: 14px;
  margin: 0 0 16px;
  height: 200px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-art svg { display: block; width: 100%; height: 100%; }

@media (max-width: 480px) {
  .card-art { padding: 10px; height: 180px; }
}


.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 20px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  min-width: 600px;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
}

thead th {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-2);
}

tbody tr:last-child td { border-bottom: 0; }

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

.note {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  margin: 0 0 16px;
}

.note p:last-child { margin-bottom: 0; }

/* ---------- FAQ ---------- */
details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}

details summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 0;
  list-style: none;
}

details summary::-webkit-details-marker { display: none; }

details summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 400;
}

details[open] summary::after { content: "\2212"; }

details .body { padding: 0 0 12px; }

details .body p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
footer.site {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 40px 0 56px;
  font-size: 14px;
  color: var(--muted);
}

footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--text); }

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 16px;
}

footer.site p { max-width: var(--measure); }

/* ---------- inline SVG palette ---------- */
.s-bg { fill: var(--bg-2); }
.s-card { fill: var(--card); }
.s-line { stroke: var(--line); fill: none; }
.s-muted { fill: var(--muted); }
.s-text { fill: var(--text); }
.s-accent { fill: var(--accent); }
.s-accent-s { stroke: var(--accent); fill: none; }
.s-walk { stroke: var(--walk); fill: none; }
.s-run { stroke: var(--run); fill: none; }
.s-cycle { stroke: var(--cycle); fill: none; }
.s-auto { stroke: var(--auto); fill: none; }
.s-stay-f { fill: var(--stay); }
.s-walk-f { fill: var(--walk); }
.s-cycle-f { fill: var(--cycle); }
.s-round { stroke-linecap: round; stroke-linejoin: round; }
.s-w5 { stroke-width: 5; }
.s-w3 { stroke-width: 3; }
.s-w2 { stroke-width: 2; }
.s-dash { stroke-dasharray: 2 6; }
.s-white { fill: #ffffff; }

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  position: static;
  display: inline-block;
  padding: 8px 12px;
}

/* anchor targets clear the sticky header */
section[id], .card[id] { scroll-margin-top: 64px; }

/* ---------- app icon (hero) ---------- */
.hero-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: left;
}

.hero-head > div { flex: 0 1 620px; }

.hero-head .lead { margin-left: 0; margin-right: 0; max-width: none; }

.app-icon {
  width: 112px;
  height: 112px;
  flex: none;
  display: block;
  border-radius: 22%;
  box-shadow: var(--shadow);
}

/* ---------- screenshots beside their section ---------- */
.showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  margin: 0 0 32px;
}

@media (min-width: 720px) {
  .showcase {
    grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
    gap: 40px;
  }
  /* mirrored rows keep the text column at 55% */
  .showcase.rev { grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); }
  .showcase.rev .showcase-text { order: 2; }
}

.showcase-text > div > :last-child { margin-bottom: 0; }
.showcase-text h3 { margin-top: 0; }

/* the showcase copy carries the section, so it reads a notch larger */
.showcase-text {
  font-size: 1.125rem;
  line-height: 1.7;
}

.showcase-lead {
  font-weight: 600;
  color: var(--text);
}

.shot {
  margin: 0;
  max-width: 260px;
  width: 100%;
  justify-self: center;
}

/* the device frame only grows once the showcase is two columns, and it
   sits flush with the outer edge of the container: right for a normal
   showcase, left for a mirrored one */
@media (min-width: 720px) {
  .shot { max-width: 340px; }

  .showcase > .shot,
  .showcase > .shot-pair { justify-self: end; }

  .showcase.rev > .shot,
  .showcase.rev > .shot-pair { justify-self: start; }

  .showcase > .shot-pair { justify-content: flex-end; }
  .showcase.rev > .shot-pair { justify-content: flex-start; }
}

.shot-pair {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.shot-pair .shot { max-width: 190px; }

@media (min-width: 720px) {
  .shot-pair .shot { max-width: 210px; }
}

.shot-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin: 28px 0 0;
  justify-items: center;
}

.shot-row .shot { max-width: 240px; }

/* three settings screens side by side once there is room */
@media (min-width: 720px) {
  .shot-row { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

@media (min-width: 900px) {
  .shot-row .shot { max-width: 300px; }
}

.device {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: 8px;
  box-shadow: var(--shadow);
}

.device img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 27px;
  background: var(--bg-2);
}

.shot figcaption {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.shot figcaption > span { display: block; }
.shot figcaption > span + span { margin-top: 6px; }

@media (max-width: 720px) {
  .shot-pair { flex-wrap: wrap; }
}

/* ---------- compact feature list ---------- */
.grid12 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: stretch;
}

.grid12 > li {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.grid12 b {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.grid12 span {
  display: block;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

@media (min-width: 720px) {
  .grid12 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid12 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .hero-head { flex-direction: column; gap: 20px; text-align: center; }
  .hero-head > div { flex-basis: auto; }
  .hero-head .lead { margin-left: auto; margin-right: auto; }
  .app-icon { width: 88px; height: 88px; }
}

.brand-icon{width:22px;height:22px;border-radius:5px;display:inline-block;vertical-align:middle}

/* hero: text left, device shot right */
.hero-head { align-items: center; }
.hero-shot { margin: 0 0 0 auto; flex: 0 0 auto; }
.hero-shot .device { width: 280px; }
@media (max-width: 1023px) { .hero-shot .device { width: 220px; } }
@media (max-width: 719px) { .hero-shot { margin: 8px auto 0; } .hero-shot .device { width: 200px; } }
/* 4-card grids stay 2x2 on wide screens (no orphan card) */
@media (min-width: 1024px) { .cardgrid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* showcase bullet points */
.showcase-points { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.showcase-points li { position: relative; padding-left: 26px; font-size: 1rem; line-height: 1.55; }
.showcase-points li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 14px; border-radius: 50%; background: var(--accent, #1ba9a0); opacity: .9; }
/* mobile: keep the language pill and headings tidy */
.langbar, .langbar * { white-space: nowrap; }
@media (max-width: 480px) { h1 { font-size: 1.85rem; } .hero h1 br { display: none; } header .wrap { gap: 8px; } }
/* defensive: never let a measure-capped block exceed the viewport */

.hero-head > div { max-width: 100%; min-width: 0; }
img, svg { max-width: 100%; }
body { overflow-x: clip; }

/* Exactly one language visible, even without JS (JA is the default) */
.en, .zh, .es, .fr, .de { display: none; }

html.lang-en .en,
html.lang-zh-Hans .zh,
html.lang-es .es,
html.lang-fr .fr,
html.lang-de .de { display: block; }

html.lang-en span.en, html.lang-en li.en,
html.lang-zh-Hans span.zh, html.lang-zh-Hans li.zh,
html.lang-es span.es, html.lang-es li.es,
html.lang-fr span.fr, html.lang-fr li.fr,
html.lang-de span.de, html.lang-de li.de { display: inline; }

/* the feature list is a grid in every language, not a plain block */
html.lang-en ul.grid12.en,
html.lang-zh-Hans ul.grid12.zh,
html.lang-es ul.grid12.es,
html.lang-fr ul.grid12.fr,
html.lang-de ul.grid12.de { display: grid; }

html.lang-en .ja,
html.lang-zh-Hans .ja,
html.lang-es .ja,
html.lang-fr .ja,
html.lang-de .ja { display: none; }
/* prose sections share the full container width; slightly larger type keeps lines comfortable */
#why p, #rough p, #privacy-design .lead, #how p, #permissions p, #network p, #research p, #requirements p { max-width: none; font-size: 1.0625rem; line-height: 1.85; }
#rough .note { max-width: none; }

/* language visibility must beat the card flex rule (same specificity, later wins);
   `html:not(.lang-xx)` also covers the no-JS case, where <html> has no class */
html:not(.lang-en) .en,
html:not(.lang-zh-Hans) .zh,
html:not(.lang-es) .es,
html:not(.lang-fr) .fr,
html:not(.lang-de) .de { display: none !important; }

html.lang-en .ja,
html.lang-zh-Hans .ja,
html.lang-es .ja,
html.lang-fr .ja,
html.lang-de .ja { display: none !important; }

/* mobile headline: two lines */
@media (max-width: 480px) { h1 { font-size: 1.7rem; letter-spacing: -.03em; line-height: 1.25; } .hero h1 { word-break: keep-all; } }
/* hero: keep the text column readable on tablets; the device shot drops to its own row below 1024px */
.hero-head { flex-wrap: wrap; }
.hero-head > div { flex: 1 1 380px; min-width: 0; }
.hero h1 { font-size: clamp(1.7rem, 4.2vw, 3rem); }
@media (max-width: 1023px) {
  .hero-shot { flex: 1 1 100%; margin: 24px auto 0; display: flex; justify-content: center; }
  .hero-shot .device { width: 260px; }
}
/* the manual line break stays except on phones, where the headline rewraps by itself */
@media (min-width: 481px) { .hero h1 br { display: inline; } }
.hero h1 { text-wrap: balance; }
/* breathing room between stacked blocks */
.table-scroll + .note, .cardgrid + .note, p + .note { margin-top: 28px; }
.cardgrid + .showcase, .showcase + .cardgrid, .showcase + .showcase { margin-top: 48px; }
.note { margin-top: 24px; }
/* phones: the headline wraps at the manual break, never overflows */
@media (max-width: 480px) {
  .hero h1 { word-break: normal; overflow-wrap: anywhere; font-size: clamp(1.55rem, 7.2vw, 1.9rem); }
  .hero h1 br { display: inline; }
}
/* phones: tables become stacked cards instead of a 1-character-wide first column */
@media (max-width: 720px) {
  .table-scroll { overflow: visible; }
  .table-scroll table { min-width: 0; width: 100%; border-collapse: collapse; }
  .table-scroll thead { display: none; }
  .table-scroll tr { display: block; padding: 12px 0; border-top: 1px solid var(--line, #e5e5ea); }
  .table-scroll td, .table-scroll th { display: block; width: auto; min-width: 0; padding: 2px 0; border: 0; white-space: normal; }
  .table-scroll td:first-child, .table-scroll th:first-child { font-weight: 700; }
  .table-scroll td:last-child .tag { margin-top: 4px; }
}
/* phones (Safari-safe): flatten the whole table box model, not just rows/cells */
@media (max-width: 720px) {
  .table-scroll table, .table-scroll tbody { display: block; width: 100%; min-width: 0; }
  .table-scroll { border: 0; border-radius: 0; }
}

/* ---------- language bar with six languages ----------
   日本語 / EN / 中文 / ES / FR / DE no longer fit beside the nav links on a
   phone, so the header is allowed to wrap and the pills tighten up. */
@media (max-width: 900px) {
  header.site .wrap { flex-wrap: wrap; row-gap: 4px; padding-top: 6px; padding-bottom: 6px; }
  nav.site { flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
}

@media (max-width: 480px) {
  .langbar button { padding: 5px 8px; font-size: 12px; }
  nav.site { gap: 10px; }
}

/* ---------- prose pages (privacy / support) ----------
   The text column is limited to --measure, so a 1120px header put the nav and
   the six language pills far to the right of the text (looked like they stuck
   out). On these pages the header, the content and the footer share one
   narrow column. */
body.page-prose header.site .wrap,
body.page-prose main .wrap,
body.page-prose footer.site .wrap { max-width: calc(var(--measure) + 48px); }

/* ---------- Ko-fi (support the developer) ----------
   The button itself is Ko-fi's official widget (Widget_2.js, drawn by /kofi-button.js)
   and carries its own styles. Only placement is adjusted here. */
nav.site .btn-container { min-width: 0; line-height: 0; }
nav.site a.kofi-button { line-height: 30px !important; min-width: 0; }
footer.site .btn-container, .kofi-card .btn-container { line-height: 0; }
.kofi-card {
  margin-top: 28px;
  padding: 24px;
  border-radius: 18px;
  background: rgba(114, 164, 242, .10);
  border: 1px solid rgba(114, 164, 242, .45);
}
.kofi-card h3 { margin: 0 0 8px; }
.kofi-card p { margin: 0 0 16px; }
