/* Shared by the legal / support pages. Tokens and header match index.html. */
:root {
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --ink: #18212F;
  --muted: #586477;
  --line: #DDE3EB;
  --accent: #2563EB;
  --accent-ink: #FFFFFF;
  --desk: #D9E3EF;
  --drawer: #EEF2F7;
  --card: #FFFFFF;
  --sticky: #FFF4C2;
  --sticky-card: #FFFCEB;
  --sticky-line: #EBD98C;
  --todo: #B45309;
  --app-blue: #3B82F6;
  --app-pink: #EC4899;
  --app-green: #16A34A;
  --app-orange: #F59E0B;
  --app-violet: #8B5CF6;
  --app-slate: #64748B;
  --shadow: 0 1px 2px rgba(24, 33, 47, .06), 0 12px 32px -12px rgba(24, 33, 47, .22);

  --font-display: "Dela Gothic One", "Zen Kaku Gothic New", "Yu Gothic", sans-serif;
  --font-body: "Zen Kaku Gothic New", "Yu Gothic UI", "Hiragino Sans", "Meiryo", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;

  --step--1: .8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.2rem + 2vw, 2.375rem);
  --step-4: clamp(2.25rem, 1.3rem + 4vw, 3.75rem);
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151A; --surface: #1A1E24; --ink: #E7EBF1; --muted: #9AA4B3; --line: #2A3039;
    --accent: #5B8DEF; --accent-ink: #0B1220; --desk: #0C0F13; --drawer: #1B1F25; --card: #262B33;
    --sticky: #3A3522; --sticky-card: #2B281C; --sticky-line: #4D4630; --todo: #F5B454;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12151A; --surface: #1A1E24; --ink: #E7EBF1; --muted: #9AA4B3; --line: #2A3039;
  --accent: #5B8DEF; --accent-ink: #0B1220; --desk: #0C0F13; --drawer: #1B1F25; --card: #262B33;
  --sticky: #3A3522; --sticky-card: #2B281C; --sticky-line: #4D4630; --todo: #F5B454;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.3; text-wrap: balance; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.eyebrow {
  font-size: var(--step--1); font-weight: 700; letter-spacing: .08em; color: var(--muted);
}
kbd {
  font-family: var(--font-mono); font-size: .8125em; font-weight: 500;
  padding: .1em .45em; border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 5px; background: var(--surface); color: var(--ink); white-space: nowrap;
}
.todo { color: var(--todo); border-bottom: 1px dashed currentColor; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  padding: .8em 1.4em; border-radius: 10px; border: 1px solid transparent; line-height: 1.2;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn small { font-weight: 500; opacity: .8; }

/* Header */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: var(--step-1); }
.brand svg { width: 26px; height: 26px; flex: none; }
.site-nav { display: flex; gap: 20px; margin-left: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .9375rem; font-weight: 500; }
.site-nav a:hover { color: var(--ink); }
.site-head .btn { padding: .55em 1em; font-size: .875rem; }
.lang {
  flex: none; padding: .35em .75em; border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); font-size: .8125rem; font-weight: 700; text-decoration: none;
}
.lang:hover { color: var(--ink); background: var(--surface); }
@media (max-width: 760px) { .site-nav { display: none; } .site-head .lang { margin-left: auto; } }

.site-foot { border-top: 1px solid var(--line); padding-block: 56px 32px; font-size: var(--step--1); color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot-brand { display: grid; gap: 6px; align-content: start; }
.foot-brand .brand { font-size: var(--step-0); margin-bottom: 4px; }
.site-foot nav { display: grid; gap: 8px; align-content: start; }
.site-foot h2 { font-family: var(--font-body); font-size: .75rem; font-weight: 700; letter-spacing: .08em; color: var(--ink); margin-bottom: 4px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot .brand, .site-foot .brand:hover { color: var(--ink); text-decoration: none; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .foot-grid { grid-template-columns: 1fr; } }
.lang-note {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px;
  padding: 8px 20px; font-size: .875rem; color: var(--ink);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg)); border-bottom: 1px solid var(--line);
}
.lang-note a { font-weight: 700; }
.lang-note button {
  cursor: pointer; font: inherit; font-size: 1.125rem; line-height: 1; padding: 2px 8px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted);
}
.lang-note button:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
/* Document pages */
.doc { max-width: 820px; padding-block: 44px 96px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: var(--step--1); color: var(--muted); }
.crumbs a { color: var(--muted); }
.doc h1 { margin-top: 14px; font-family: var(--font-display); font-weight: 400; font-size: var(--step-3); letter-spacing: .01em; }
.updated { margin-top: 10px; font-size: var(--step--1); color: var(--muted); }
.prose { margin-top: 32px; }
.prose > * + * { margin-top: 14px; }
.prose > h2 { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); font-size: var(--step-1); font-weight: 700; }
.prose h3 { font-size: var(--step-0); font-weight: 700; }
.prose ul, .prose ol { margin-bottom: 0; padding-left: 1.5em; display: grid; gap: 6px; }
.prose li::marker { color: var(--muted); }
.prose .path { font-family: var(--font-mono); font-size: .875em; background: var(--surface); border: 1px solid var(--line); padding: .05em .4em; border-radius: 5px; overflow-wrap: anywhere; }
.note { padding: 14px 18px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: .9375rem; color: var(--muted); }
.law { width: 100%; border-collapse: collapse; }
.law th, .law td { text-align: left; vertical-align: top; padding: 14px 0; border-bottom: 1px solid var(--line); }
.law tr:first-child th, .law tr:first-child td { border-top: 1px solid var(--line); }
.law th { width: 13em; padding-right: 20px; font-weight: 700; }
.law td { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .law, .law tbody, .law tr, .law th, .law td { display: block; width: auto; }
  .law tr { padding: 14px 0; border-top: 1px solid var(--line); }
  .law tr:last-child { border-bottom: 1px solid var(--line); }
  .law th, .law td, .law tr:first-child th, .law tr:first-child td { padding: 0; border: 0; }
  .law th { margin-bottom: 4px; }
}
.mail { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 22px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.mail-addr { flex: 1 1 260px; min-width: 0; font-family: var(--font-mono); font-size: var(--step-1); overflow-wrap: anywhere; user-select: all; }
.copied { font-size: var(--step--1); color: var(--muted); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
