/* Shared stylesheet for the text pages (privacy, cookies, credits).
   Palette derived from the app's Material theme
   (assets/japanese_theme_light.json) — keep in sync with site/index.html. */
:root {
  color-scheme: light;
  --paper: #fff8f7;
  --paper-soft: #fffbfa;
  --ink: #231918;
  --muted: #534341;
  --edge: #d8c2bf;
  --accent: #904a43;
  --accent-soft: #ffdad6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Trebuchet MS", "Hiragino Sans", "Noto Sans JP",
    sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 15% -10%, #fddfa6 0%, transparent 62%),
    radial-gradient(900px 500px at 90% 0%, #fbd2cb 0%, transparent 57%),
    repeating-linear-gradient(
      0deg,
      rgba(35, 25, 24, 0.02),
      rgba(35, 25, 24, 0.02) 1px,
      transparent 1px,
      transparent 20px
    ),
    linear-gradient(165deg, var(--paper), #f8e7e3);
  min-height: 100vh;
}

main {
  max-width: 820px;
  margin: 42px auto;
  padding: 0 20px 48px;
}

.sheet {
  background: linear-gradient(180deg, var(--paper-soft), #fdf1ef);
  border: 1px solid var(--edge);
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 16px 38px rgba(35, 25, 24, 0.14);
}

.back {
  color: var(--accent);
}

h1 {
  margin: 0 0 6px;
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  letter-spacing: 0.02em;
}

.title-rule {
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
  margin: 12px 0 16px;
}

p {
  margin: 10px 0;
}

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

.updated {
  display: inline-block;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.9rem;
  padding: 5px 12px;
}

section {
  margin-top: 18px;
  animation: rise 460ms ease-out both;
}

section:nth-of-type(2) {
  animation-delay: 80ms;
}

section:nth-of-type(3) {
  animation-delay: 140ms;
}

section:nth-of-type(4) {
  animation-delay: 200ms;
}

h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

h3 {
  margin: 16px 0 4px;
  font-size: 1.1rem;
}

ul {
  margin: 8px 0;
  padding-left: 22px;
}

li {
  margin: 4px 0;
}

.muted {
  color: var(--muted);
}

.updated,
.muted {
  font-size: 0.95rem;
}

/* Wide tables scroll inside their own box so the page never scrolls
   sideways on a phone. */
.table-wrap {
  overflow-x: auto;
  margin: 10px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.93rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--edge);
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9em;
  background: rgba(35, 25, 24, 0.06);
  border-radius: 4px;
  padding: 1px 5px;
  word-break: break-all;
}

blockquote {
  margin: 12px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 0 12px 12px 0;
}

.notice {
  margin: 12px 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
}

.footer-links {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px dashed var(--edge);
  color: var(--muted);
  font-size: 0.93rem;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  section {
    animation: none;
  }
}

@media (max-width: 640px) {
  main {
    margin: 20px auto;
  }

  .sheet {
    padding: 22px 16px;
    border-radius: 14px;
  }
}
