/* すくってアイス — support and legal pages. Pastel colors from the flavor tiers (docs/GDD.md A1).
   System fonts only (Hiragino Maru Gothic on Apple devices), no external assets. */

:root {
  color-scheme: light dark;
  --bg: #fff9f1;
  --card: #ffffff;
  --text: #4a3b3f;
  --muted: #76646a;
  --link: #a8325f;
  --line: #f0dfd2;
  --vanilla: #fff4dc;
  --sakura: #ffc6d3;
  --soda: #bde4ff;
  --lemon: #ffefa0;
  --mint: #bfefd9;
  --lavender: #d7cbf8;
  --radius: 18px;
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #2a2226;
    --card: #362c31;
    --text: #f6edef;
    --muted: #cdbcc2;
    --link: #ffb3cf;
    --line: #4d3f45;
    --vanilla: #4a4236;
    --sakura: #5c3843;
    --soda: #2f4a5c;
    --lemon: #5a5230;
    --mint: #2f5446;
    --lavender: #463e63;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, var(--sakura) 0 120px, transparent 121px),
    radial-gradient(circle at 96% 6%, var(--soda) 0 90px, transparent 91px),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font-size: 16px;
}

a { color: var(--link); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--card); padding: 8px 12px; border-radius: 10px; z-index: 1; }

.site-header {
  max-width: 880px;
  margin: 0 auto;
  padding: 18px 20px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.05rem;
}

.lang {
  border: 2px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 2px 14px;
  font-size: 0.9rem;
  text-decoration: none;
}

main { max-width: 880px; margin: 0 auto; padding: 8px 20px 24px; }

article {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px clamp(18px, 4vw, 44px) 36px;
  box-shadow: 0 2px 0 var(--line), 0 10px 30px rgba(168, 50, 95, 0.06);
}

h1 {
  font-size: clamp(1.45rem, 3.6vw, 1.9rem);
  line-height: 1.35;
  margin: 0 0 4px;
  padding-left: 46px;
  position: relative;
}

/* Three stacked scoops before the page title. */
h1::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  background:
    radial-gradient(circle at 50% 30%, var(--vanilla) 0 8px, transparent 9px),
    radial-gradient(circle at 28% 66%, var(--sakura) 0 8px, transparent 9px),
    radial-gradient(circle at 72% 66%, var(--mint) 0 8px, transparent 9px);
}

h2 {
  font-size: 1.2rem;
  margin: 2.2em 0 0.6em;
  padding: 4px 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--vanilla), transparent);
}

h3 { font-size: 1.05rem; margin: 1.6em 0 0.4em; }

p, li { margin: 0.5em 0; }
ol, ul { padding-left: 1.5em; }

.meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.6em; }
.lead { font-size: 1.05rem; }
.note { color: var(--muted); font-size: 0.92rem; }

.callout {
  border-radius: 14px;
  padding: 14px 18px;
  margin: 1.2em 0;
  background: var(--mint);
  font-weight: 700;
}

.callout.soft { background: var(--soda); font-weight: 400; }

.fill {
  background: var(--lemon);
  border: 2px dashed #c9a300;
  border-radius: 8px;
  padding: 0 6px;
  font-weight: 700;
}

.table-wrap { overflow-x: auto; margin: 1em 0; -webkit-overflow-scrolling: touch; }

table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.95rem; }
caption { text-align: left; font-weight: 700; padding: 0 0 6px; }

th, td { padding: 9px 12px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--line); }
thead th { background: var(--sakura); border-bottom: 0; }
thead th:first-child { border-top-left-radius: 12px; }
thead th:last-child { border-top-right-radius: 12px; }
tbody th { font-weight: 700; }

table.notice th { width: 32%; background: var(--vanilla); }

.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody th[scope="row"] { word-break: keep-all; }

/* Phones: notices and long-text tables become cards; numeric tables get tighter cells. */
@media (max-width: 600px) {
  th, td { padding: 8px 7px; }
  table { font-size: 0.92rem; }

  table.notice, table.notice tbody, table.notice tr, table.notice th, table.notice td { display: block; width: auto; }
  table.notice tr { margin-bottom: 10px; }
  table.notice th { border-bottom: 0; border-radius: 10px 10px 0 0; padding: 6px 10px; }
  table.notice td { padding: 6px 10px 10px; }

  table.stack thead { position: absolute; left: -9999px; }
  table.stack, table.stack caption, table.stack tbody, table.stack tr, table.stack th, table.stack td {
    display: block;
    width: auto;
  }
  table.stack tr { border: 2px solid var(--line); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
  table.stack tbody th[scope="row"] { background: var(--sakura); padding: 6px 12px; border-bottom: 0; }
  table.stack td { border-bottom: 0; padding: 6px 12px; }
  table.stack td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
  }
}

.pages { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.pages li { margin: 0; }
.pages a {
  display: block;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--vanilla);
  text-decoration: none;
  font-weight: 700;
  color: var(--text);
}
.pages li:nth-child(6n+2) a { background: var(--sakura); }
.pages li:nth-child(6n+3) a { background: var(--soda); }
.pages li:nth-child(6n+4) a { background: var(--lemon); }
.pages li:nth-child(6n+5) a { background: var(--mint); }
.pages li:nth-child(6n+6) a { background: var(--lavender); }
.pages a span { display: block; font-weight: 400; font-size: 0.85rem; color: var(--muted); }

.site-footer { max-width: 880px; margin: 0 auto; padding: 10px 20px 40px; font-size: 0.88rem; color: var(--muted); }
.site-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-footer a[aria-current="page"] { font-weight: 700; text-decoration: none; color: var(--text); }
.copyright { margin-top: 12px; }

@media print {
  body { background: #fff; }
  article { box-shadow: none; padding: 0; }
  .site-header .lang, .site-footer nav, .skip { display: none; }
}
