/* Kumikey: a cool pale page, near-black type, the icon's orange as the accent.
   --sand is the page color (the name is older than the palette; every page uses it). The device and key colors
   are for the small drawings of the keyboard (the feature pictures and the shared layout page). */
:root {
  --sand: #f4f6fd;
  --sand-deep: #e3e8f6;
  --surface: #ffffff;
  --ink: #222222;
  --muted: #5b6173;
  --accent: #f89742;
  --device: #2e3035;
  --device-edge: #1c1d21;
  --key: #50535b;
  --key-fn: #43464d;
  --press: #f89742;
  --rule: rgba(34, 34, 34, 0.12);
  /* #f89742 is too light for small text on the page (2:1); links use a deeper orange (4.8:1). */
  --link: #b0520a;
  --focus: var(--ink);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sand: #111318;
    --sand-deep: #0a0b0f;
    --surface: #1a1d24;
    --ink: #eceef4;
    --muted: #9da3b3;
    --device: #3a3d44;
    --device-edge: #26282d;
    --key: #6a6e77;
    --key-fn: #575a62;
    --rule: rgba(236, 238, 244, 0.12);
    --link: #ffb27a;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--sand);
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.8;
  letter-spacing: 0.02em;
  font-feature-settings: "palt" 1;
  line-break: strict;
  word-break: auto-phrase;
}

h1, h2 { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* A phrase that should not be split across lines. */
.nb { display: inline-block; white-space: nowrap; }

a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: from-font; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1040px, calc(100% - 32px)); margin: 0 auto; }

/* Header: the app's own icon and name, nothing else. */
.site-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.125rem; letter-spacing: 0; }
.brand img { width: 32px; height: 32px; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); margin-top: 96px; padding: 28px 0 40px; font-size: 0.875rem; color: var(--muted); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 10px; }
.site-foot a { color: var(--ink); text-decoration: none; }
@media (hover: hover) {
  .site-foot a:hover { text-decoration: underline; }
}

/* Document pages (privacy, support) */
.doc { width: min(680px, calc(100% - 32px)); margin: 24px auto 0; }
.doc h1 { font-size: clamp(1.875rem, 5vw, 2.5rem); line-height: 1.3; font-weight: 900; letter-spacing: -0.01em; margin: 24px 0 8px; }
.doc .updated { color: var(--muted); font-size: 0.875rem; margin: 0 0 40px; }
.doc h2 { font-size: 1.3125rem; line-height: 1.5; font-weight: 700; margin: 44px 0 8px; }
.doc p, .doc li { margin: 0 0 12px; }
.doc ul, .doc ol { padding-inline-start: 1.4em; margin: 0 0 12px; }
.doc li::marker { color: var(--muted); }
.doc .shot { display: block; width: 100%; max-width: 420px; height: auto; margin: 12px 0 20px; border-radius: 14px; border: 1px solid var(--rule); }
.doc details { border-top: 1px solid var(--rule); padding: 14px 0; }
.doc details:last-of-type { border-bottom: 1px solid var(--rule); }
.doc summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.doc summary::-webkit-details-marker { display: none; }
/* The sign is only a visual cue; details already announces whether it is open. */
.doc summary::after { content: "+"; content: "+" / ""; color: var(--muted); font-weight: 500; }
.doc details[open] summary::after { content: "−"; content: "−" / ""; }
.doc details p { margin: 10px 0 0; color: var(--ink); }
.doc .contact { font-size: 1.1875rem; font-weight: 700; }

/* Read by screen readers, not shown. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Skip link: off screen until a keyboard user tabs to it. */
.skip {
  position: absolute; z-index: 10; left: 16px; top: 12px;
  padding: 8px 18px; border-radius: 999px;
  background: var(--ink); color: var(--sand); font-weight: 700; text-decoration: none;
  transform: translateY(calc(-100% - 24px));
}
.skip:focus, .skip:focus-visible { transform: none; border-radius: 999px; }

/* Language switch in the header. */
.lang {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
  color: var(--ink); font-weight: 700; font-size: 0.9375rem; letter-spacing: 0.02em; text-decoration: none;
  transition: background-color .2s cubic-bezier(.23, 1, .32, 1), transform .15s cubic-bezier(.23, 1, .32, 1);
  touch-action: manipulation;
}
@media (hover: hover) {
  .lang:hover { background: var(--rule); }
}
.lang:active { transform: scale(.98); background: var(--rule); }
.lang:focus-visible { border-radius: 999px; }

/* Release switch: "soon" (no link), "testflight" or "appstore", set in release.js; all three are in the HTML.
   Without JavaScript the "soon" one shows. */
[data-release] { display: contents; }
[data-release="testflight"], [data-release="appstore"],
html[data-release-phase="testflight"] [data-release="soon"],
html[data-release-phase="appstore"] [data-release="soon"] { display: none; }
html[data-release-phase="testflight"] [data-release="testflight"],
html[data-release-phase="appstore"] [data-release="appstore"] { display: contents; }
.avail-soon { font-weight: 700; font-size: 1.0625rem; }

/* The main button (TestFlight). Same shape as the shared page's "open" button. Orange in both themes,
   with #222 on it (7:1); white on this orange would be too faint. */
.get-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px;
  border-radius: 999px; background: var(--accent); color: #222222;
  font-weight: 700; font-size: 1.0625rem; letter-spacing: 0.02em; text-decoration: none;
  transition: background-color .2s cubic-bezier(.23, 1, .32, 1), transform .15s cubic-bezier(.23, 1, .32, 1);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
@media (hover: hover) {
  .get-btn:hover { background: color-mix(in srgb, var(--accent) 88%, #000000); }
}
.get-btn:active { transform: scale(.98); }
.get-btn:focus-visible { border-radius: 999px; }

/* Apple's App Store badge. The artwork is used as is (Apple's rules): no hover effect on the badge itself,
   only the focus ring and the press. */
.store-badge { display: inline-block; line-height: 0; border-radius: 10px; transition: transform .15s cubic-bezier(.23, 1, .32, 1);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.store-badge img { display: block; height: 48px; width: auto; }
.store-badge:active { transform: scale(.98); }
.store-badge:focus-visible { border-radius: 10px; }

@media (prefers-reduced-motion: reduce) {
  .lang, .get-btn, .store-badge { transition: none; }
  .lang:active, .get-btn:active, .store-badge:active { transform: none; }
}

/* The skip link moves focus to <main>; no ring around the whole page. */
#main:focus { outline: none; }
