/* aka-keishin.com と、アプリごとのサイトで共通に使う。
   主役は各アプリの実際の画面。色はアプリごとに --bg / --fg / --bezel で渡す。
   外部の読み込みは無い。 */

:root {
  --page: #ffffff;
  --ink: #111111;
  --soft: #5e6369;
  --rule: #e4e6e9;

  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Noto Sans JP", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --pad: clamp(12px, 2.2vw, 28px);
  --gap: clamp(10px, 1.1vw, 14px);
  --radius: clamp(20px, 2.4vw, 32px);
  --inset: clamp(22px, 2.8vw, 38px);
  --measure: 38em;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 4px; }

/* ---------- 頭と足 ---------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px calc(var(--pad) + 6px);
}
.mark { font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; text-decoration: none; }
.lang { display: flex; gap: 16px; font-size: 0.875rem; }
.lang a { text-decoration: none; color: var(--soft); }
.lang a[aria-current="true"] { color: var(--ink); font-weight: 700; }

.site-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  padding: 44px calc(var(--pad) + 6px) 52px;
  font-size: 0.875rem;
  color: var(--soft);
}
.site-foot p { margin: 0; }

/* ---------- トップ: アプリの棚 ---------- */

.shelf {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  margin: 0;
  padding: 0 var(--pad);
  list-style: none;
}

.tile {
  grid-column: span 6;
  min-height: clamp(470px, 45vw, 640px);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg, #f1f2f4);
  color: var(--fg, var(--ink));
}
.tile.wide { grid-column: span 7; }
.tile.narrow { grid-column: span 5; }

.tile-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--inset) var(--inset) 0;
  color: inherit;
  text-decoration: none;
}
.tile-link:focus-visible { outline-offset: -8px; border-radius: var(--radius); }

.tile h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.3vw, 2.0625rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.tile .what { margin: 6px 0 0; max-width: 24em; font-size: 1rem; line-height: 1.55; }
.tile .state { margin: 10px 0 0; font-size: 0.8125rem; line-height: 1.4; opacity: 0.72; }

/* 実際の画面。下端は区画の縁で切れる */
.art {
  display: flex;
  flex: 1 1 auto;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(12px, 2vw, 30px);
  height: clamp(250px, 27vw, 380px);
  margin-top: clamp(24px, 3vw, 40px);
  overflow: hidden;
}
.art > * { transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tile-link:hover .art > * { transform: translateY(-8px); }

.phone {
  flex: 0 1 44%;
  max-width: 270px;
  padding: 1.8%;
  background: var(--bezel, #0c0c0d);
  border-radius: 15.5% / 7.2%;
}
.tile.narrow .phone { flex-basis: 62%; }
.phone img { display: block; width: 100%; height: auto; border-radius: 13.6% / 6.3%; }

.window {
  flex: 0 1 94%;
  align-self: flex-start;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14);
  overflow: hidden;
}
.window img { display: block; width: 100%; height: auto; }

.badge {
  flex: 0 1 46%;
  max-width: 250px;
  align-self: center;
}
.badge img { display: block; width: 100%; height: auto; border-radius: 22.5%; }

@media (max-width: 860px) {
  .tile, .tile.wide, .tile.narrow { grid-column: 1 / -1; min-height: 0; }
  .art { height: clamp(240px, 64vw, 380px); }
  .phone, .tile.narrow .phone { flex-basis: 46%; }
  .badge { flex-basis: 42%; padding-bottom: 28px; }
}

/* ---------- アプリのページ ---------- */

.app-hero {
  margin: 0 var(--pad);
  padding: clamp(28px, 4.4vw, 60px) clamp(22px, 4.4vw, 60px) 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg, #f1f2f4);
  color: var(--fg, var(--ink));
}
.app-hero .id { display: flex; align-items: center; gap: clamp(14px, 2vw, 22px); }
.app-hero .icon { flex: none; width: clamp(60px, 8vw, 92px); height: auto; border-radius: 22.5%; }
.app-hero h1 {
  margin: 0;
  font-size: clamp(1.875rem, 4.6vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.app-hero .what { margin: 6px 0 0; font-size: clamp(1rem, 1.6vw, 1.25rem); line-height: 1.5; }
.app-hero .state { margin: 16px 0 0; font-size: 0.875rem; opacity: 0.75; }
.app-hero .store {
  display: inline-block;
  margin-top: 18px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--fg, var(--ink));
  color: var(--bg, #fff);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
}
.app-hero .art {
  height: clamp(280px, 36vw, 500px);
  justify-content: flex-start;
  margin-top: clamp(28px, 4vw, 52px);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.app-hero .art::-webkit-scrollbar { display: none; }
.app-hero .phone { flex: 0 0 clamp(170px, 21vw, 262px); max-width: none; }

.app-body {
  max-width: calc(var(--measure) + var(--pad) * 2 + 12px);
  padding: clamp(32px, 5vw, 60px) calc(var(--pad) + 6px) 0;
}
.app-body > :first-child { margin-top: 0; }
.app-body p { margin: 0 0 1.1em; }

.pages { margin: clamp(28px, 4vw, 44px) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.pages li { border-bottom: 1px solid var(--rule); }
.pages a { display: block; padding: 16px 0; text-decoration: none; font-weight: 700; }
.pages a:hover { text-decoration: underline; }
.pages small { display: block; font-weight: 400; font-size: 0.875rem; color: var(--soft); }

/* ---------- 文書（サポート、プライバシー） ---------- */

.crumb { padding: clamp(28px, 5vw, 56px) calc(var(--pad) + 6px) 0; font-size: 0.9375rem; }
.crumb a { text-decoration: none; color: var(--soft); }
.crumb a:hover { color: var(--ink); text-decoration: underline; }

.doc {
  max-width: calc(var(--measure) + var(--pad) * 2 + 12px);
  padding: 10px calc(var(--pad) + 6px) 0;
  overflow-wrap: anywhere;
}
.doc h1 { margin: 0 0 0.5em; font-size: clamp(1.75rem, 4.4vw, 2.5rem); font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
.doc h2 { margin: 2.3em 0 0.5em; font-size: 1.1875rem; font-weight: 700; line-height: 1.5; }
.doc h3 { margin: 1.8em 0 0.4em; font-size: 1rem; font-weight: 700; }
.doc p, .doc ul, .doc ol { margin: 0 0 1.1em; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li + li { margin-top: 0.35em; }
.doc .meta { color: var(--soft); font-size: 0.9375rem; }
.doc code { font-family: var(--mono); font-size: 0.9em; }
:lang(en) .doc, :lang(en) .app-body { line-height: 1.65; }

.tile h2, .tile .what, .app-hero h1, .app-hero .what, .doc h1 { text-wrap: balance; }

@media (prefers-reduced-motion: reduce) {
  .art > * { transition: none; }
  .tile-link:hover .art > * { transform: none; }
}

@media print {
  .lang, .art { display: none; }
}
