/* Somari: the reading pages (privacy, support).
   The intro page's night, held still: one column of text on the dark
   ground, a big English word for the page, the asanoha mark faint behind,
   and the pink light low in one corner, the way the store screenshots
   carry it. One look on purpose, so no light theme. */
:root {
  color-scheme: dark;
  --night:     #060507;
  --surface:   #141416;
  --ink:       #F5F2F4;
  --ink-soft:  #ABA0A7;
  --line:      rgb(245 242 244 / 0.12);
  --accent:    #FF2D9B;
  --on-accent: #16060F;

  --display: "Inter", "Zen Kaku Gothic New", system-ui, sans-serif;
  --text:    "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;

  --t-xs:  0.75rem;
  --t-sm:  0.875rem;
  --t-md:  1rem;
  --t-lg:  clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  --t-xl:  clamp(1.35rem, 1.15rem + 0.9vw, 1.8rem);
  --t-big: clamp(3.4rem, 2rem + 7vw, 7rem);

  --measure: 40rem;
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--t-md);
  line-height: 1.95;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.25em; text-decoration-color: rgb(255 45 155 / 0.7); }
a:hover { text-decoration-color: var(--accent); }

/* Latin text reads tighter than the Japanese settings above */
html[lang="en"] body { line-height: 1.7; letter-spacing: 0.005em; }
html[lang="en"] .doc h2 { letter-spacing: 0.01em; }
html[lang="en"] .head__ja { letter-spacing: 0.01em; }
html[lang="en"] .faq dt { letter-spacing: 0.005em; }
.todo { background: #FFD60A; color: #16060F; padding: 0 0.3em; }

/* ----------------------------------------------------------- the ground -- */
.ground { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: clip; }
.ground__light {
  position: absolute; left: -30vmax; top: -34vmax; width: 90vmax; height: 90vmax;
  background: radial-gradient(closest-side, rgb(194 24 122 / 0.42), rgb(194 24 122 / 0.12) 55%, transparent);
}
.ground__mark {
  position: absolute; right: -10vmin; top: 6vh; width: min(92vmin, 52rem); height: auto;
  color: rgb(245 242 244 / 0.06);
}
.ground__mark .leaf { fill: rgb(255 45 155 / 0.1); stroke: rgb(255 45 155 / 0.45); }
.ground__grain {
  position: absolute; inset: -50%; opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>");
}

/* --------------------------------------------------------------- frame -- */
.page {
  position: relative; z-index: 1;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: max(1.4rem, env(safe-area-inset-top, 0px)) 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none;
  font-family: var(--display); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.24em;
}
.brand svg { width: 1.35rem; height: 1.35rem; flex: none; }
.bar nav { display: flex; gap: 1.4rem; font-size: var(--t-sm); }
.bar nav a { text-decoration: none; color: var(--ink-soft); }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--ink); }
.bar nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); }

/* ---------------------------------------------------------------- head -- */
.head { padding-block: clamp(4.5rem, 14vh, 9rem) clamp(2.5rem, 6vh, 4rem); max-width: var(--measure); }
.head h1 { margin: 0; font-weight: 400; }
.head__en {
  display: block;
  font-family: var(--display); font-weight: 600; font-size: var(--t-big);
  line-height: 0.92; letter-spacing: -0.05em;
}
.head__ja { display: block; margin-top: 1.4rem; font-size: var(--t-xl); line-height: 1.5; letter-spacing: 0.06em; }
.head__lead { margin: 1.4rem 0 0; color: var(--ink-soft); font-size: var(--t-md); }
.meta { margin: 1.2rem 0 0; color: var(--ink-soft); font-size: var(--t-sm); line-height: 1.8; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- text -- */
.doc { max-width: var(--measure); padding-bottom: clamp(4rem, 10vh, 7rem); }
.doc p, .doc li { text-wrap: pretty; word-break: normal; overflow-wrap: anywhere; }
.doc > p:first-child { margin-top: 0; }
.doc h2 {
  display: flex; align-items: baseline; gap: 0.9rem;
  margin: 4rem 0 1.1rem; padding-top: 1.6rem; border-top: 1px solid var(--line);
  font-size: var(--t-lg); font-weight: 700; line-height: 1.5; letter-spacing: 0.06em;
  text-wrap: balance;
}
.doc h2 .no {
  flex: none; min-width: 1.6rem;
  font-family: var(--display); font-weight: 600; font-size: var(--t-sm); letter-spacing: 0.04em;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.doc ul { margin: 0; padding-left: 1.2em; }
.doc li + li { margin-top: 0.6rem; }
.doc li::marker { color: var(--accent); }
.doc strong { font-weight: 700; }

/* where each kind of information lives: a real table on a wide screen,
   a short labelled list per row on a phone */
.store { width: 100%; border-collapse: collapse; margin-top: 1.2rem; font-size: var(--t-sm); line-height: 1.8; }
.store th, .store td { text-align: left; vertical-align: top; padding: 0.9rem 1rem 0.9rem 0; border-bottom: 1px solid var(--line); }
.store thead th { font-family: var(--display); font-weight: 600; font-size: 0.68rem; letter-spacing: 0.18em; color: var(--ink-soft); padding-bottom: 0.6rem; }
.store tbody th { font-weight: 700; white-space: nowrap; }
.store td:last-child { white-space: nowrap; color: var(--accent); }
@media (max-width: 640px) {
  .store thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .store, .store tbody, .store tr, .store th, .store td { display: block; }
  .store tr { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .store th, .store td { padding: 0; border: 0; white-space: normal; }
  .store td { margin-top: 0.3rem; }
  .store td:last-child { margin-top: 0.4rem; font-size: var(--t-xs); letter-spacing: 0.08em; }
}

/* ------------------------------------------------------------- contact -- */
.contact {
  padding: 1.6rem 1.6rem 1.5rem;
  border-radius: 20px;
  background: rgb(20 20 22 / 0.86);
  box-shadow: inset 0 1px 0 rgb(245 242 244 / 0.08), 0 18px 40px -20px rgb(0 0 0 / 0.7);
}
.contact__label { margin: 0; font-family: var(--display); font-weight: 600; font-size: 0.68rem; letter-spacing: 0.2em; color: var(--ink-soft); }
.contact__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-top: 0.5rem; }
.contact__mail { font-family: var(--display); font-weight: 600; font-size: var(--t-lg); letter-spacing: 0.01em; overflow-wrap: anywhere; }
.copy {
  min-height: 2.25rem; padding: 0 1rem; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font: inherit; font-size: var(--t-xs); letter-spacing: 0.08em; cursor: pointer;
  transition: background-color 160ms var(--ease), transform 120ms var(--ease);
}
.copy:hover { background: rgb(245 242 244 / 0.08); }
.copy:active { transform: scale(0.97); }
.contact p:not(.contact__label) { margin: 1rem 0 0; font-size: var(--t-sm); color: var(--ink-soft); }
.contact strong { color: var(--ink); }

/* ----------------------------------------------------------------- faq -- */
.faq { margin: 0; }
.faq__item { padding-block: 1.6rem; border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq dt { display: flex; gap: 0.9rem; font-weight: 700; line-height: 1.7; letter-spacing: 0.05em; }
.faq dd { display: flex; gap: 0.9rem; margin: 0.7rem 0 0; color: var(--ink-soft); }
.faq .qa { flex: none; width: 1.1rem; font-family: var(--display); font-weight: 600; font-size: var(--t-sm); line-height: 1.95; }
.faq dt .qa { color: var(--accent); }
.faq dd > span:last-child, .faq dt > span:last-child { min-width: 0; }

/* -------------------------------------------------------------- footer -- */
.foot {
  display: grid; gap: 0.6rem;
  padding-block: 2rem max(2.4rem, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  font-size: var(--t-xs); color: var(--ink-soft); line-height: 1.8;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-size: var(--t-sm); color: var(--ink); }
.foot p { margin: 0; }

@media (max-width: 640px) {
  .bar nav { gap: 1rem; font-size: var(--t-xs); }
  .head { padding-top: 3.6rem; }
  .doc h2 { margin-top: 3rem; }
  .contact { padding: 1.3rem 1.2rem; }
}
/* Up to tablet width the column reaches the mark, so the mark leaves the
   fixed ground: it sits small at the top right, the lit leaf beside the big
   English word, and scrolls away with the head instead of passing under the
   text. The pink light goes with it. */
@media (max-width: 1100px) {
  .ground { position: absolute; bottom: auto; height: 100svh; }
  .ground__mark { width: 300px; right: -10px; top: 19px; }
  .ground__mark[data-leaf="1"] { top: -55px; }
}
@media (prefers-reduced-motion: reduce) {
  .copy { transition: none; }
}
