:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef0f6;
  --border: #e1e4ee;
  --text: #1b1d29;
  --text-2: #5d6278;
  --btn: #5847da;
  --btn-text: #ffffff;
  --accent-soft: #ecebff;
  --grad: linear-gradient(135deg, #5b5bf0 0%, #8a4dff 55%, #c24dff 100%);
  --shadow: 0 8px 24px rgba(40, 40, 110, .10), 0 2px 6px rgba(40, 40, 110, .05);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111219; --surface: #1b1c27; --surface-2: #232433; --border: #2f3144;
    --text: #eceef7; --text-2: #aeb3c9; --accent-soft: #2a2950;
    --shadow: 0 8px 24px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111219; --surface: #1b1c27; --surface-2: #232433; --border: #2f3144;
  --text: #eceef7; --text-2: #aeb3c9; --accent-soft: #2a2950;
  --shadow: 0 8px 24px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", "Noto Sans", sans-serif;
  line-height: 1.7; font-size: 16px;
}
a { color: var(--btn); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a { color: #a9a0ff; } }
img { max-width: 100%; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* header */
.site-head { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.site-head .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; image-rendering: pixelated; }
.nav { display: flex; gap: 4px 16px; flex-wrap: wrap; margin-left: auto; font-size: 14px; }
.nav a { color: var(--text-2); text-decoration: none; }
.nav a:hover { color: var(--text); }
.lang { font: inherit; font-size: 14px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); min-height: 32px; }

/* hero */
.hero { background: var(--grad); color: #fff; padding: 56px 0 64px; }
.hero .wrap { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.hero-text { flex: 1 1 360px; }
.hero h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.25; margin: 0 0 12px; }
.hero .lead { font-size: 18px; margin: 0 0 24px; opacity: .95; }
.hero-icon { flex: 0 0 auto; width: 160px; height: 160px; border-radius: 32px; background: rgba(255, 255, 255, .15); display: grid; place-items: center; margin: 0 auto; }
.hero-icon img { width: 128px; height: 128px; image-rendering: pixelated; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 22px; border-radius: 10px; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.btn-primary { background: var(--btn); color: var(--btn-text) !important; }
.btn-light { background: #fff; color: #3c2fb0 !important; }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; pointer-events: none; }

/* sections */
section.block { padding: 56px 0; }
section.block:nth-of-type(even) { background: var(--surface); }
h2 { font-size: 26px; margin: 0 0 24px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
section.block:nth-of-type(even) .card { background: var(--bg); box-shadow: none; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--text-2); font-size: 15px; }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--btn); font-weight: 800; font-size: 14px; margin-bottom: 8px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .num { color: #c7c0ff; } }

.dl-list { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.dl-list .btn { min-width: 220px; }
.muted { color: var(--text-2); font-size: 14px; }

/* faq */
.faq { display: grid; gap: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 16px; }
section.block:nth-of-type(even) .faq details { background: var(--bg); }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; min-height: 44px; }
.faq details p { margin: 0 0 14px; color: var(--text-2); }

/* notice */
.notice { display: flex; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: var(--text-2); }
.notice p { margin: 0 0 4px; }

/* footer */
.site-foot { border-top: 1px solid var(--border); padding: 32px 0 40px; font-size: 14px; color: var(--text-2); }
.site-foot .links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 0; }

/* legal pages */
.legal { padding: 40px 0 56px; }
.legal h1 { font-size: 28px; margin: 0 0 4px; }
.legal h2 { font-size: 19px; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--text); }
.legal .note { background: var(--surface-2); border-radius: 10px; padding: 10px 14px; font-size: 14px; color: var(--text-2); }
.tbd { background: #fff4e0; color: #7a4a00; border-radius: 4px; padding: 0 4px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tbd { background: #3a2e17; color: #ffbf4d; } }

@media (max-width: 640px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
  .hero { padding: 40px 0 48px; }
  .dl-list .btn { width: 100%; }
}

/* contact form */
.cform { display: grid; gap: 14px; max-width: 560px; margin-top: 16px; }
.cform label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.cform input, .cform select, .cform textarea { font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); min-height: 44px; }
.cform textarea { resize: vertical; }
.cform input:focus-visible, .cform select:focus-visible, .cform textarea:focus-visible { outline: 2px solid var(--btn); outline-offset: 1px; }
.cform-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cform-row p { margin: 0; }
.cform button[disabled] { opacity: .55; cursor: default; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* contact: floating button (outline pill) + dialog */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 20; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 15px; color: var(--btn); background: var(--surface); border: 1.5px solid var(--btn); cursor: pointer; box-shadow: 0 10px 28px -8px rgba(60, 40, 160, .45); transition: background .15s, color .15s, transform .15s; }
.fab svg { width: 1.3em; height: 1.3em; }
.fab:hover { background: var(--btn); color: #fff; transform: translateY(-2px); }
.fab:focus-visible, .dlg-x:focus-visible { outline: 3px solid color-mix(in srgb, var(--btn) 50%, transparent); outline-offset: 3px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fab { color: #c7c0ff; border-color: #a9a0ff; } :root:not([data-theme="light"]) .fab:hover { background: var(--btn); color: #fff; border-color: var(--btn); } }
dialog#contact-dialog { border: 0; border-radius: 20px; padding: 28px; width: min(92vw, 520px); max-height: 92vh; overflow: auto; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(20, 20, 60, .35); }
dialog#contact-dialog::backdrop { background: rgba(15, 15, 30, .5); backdrop-filter: blur(3px); }
dialog#contact-dialog h2 { margin: 0 0 6px; font-size: 22px; padding-right: 40px; }
.dlg-x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 16px; cursor: pointer; }
.dlg-x:hover { background: var(--border); }
@media (max-width: 480px) { .fab { right: 12px; bottom: 12px; } .fab span { display: none; } .fab { width: 52px; padding: 0; justify-content: center; } }

.cform .consent-row label { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.cform .consent-row input[type=checkbox] { width:18px; height:18px; min-height:18px; padding:0; }
.cform .field-error { color:#b42318; font-weight:400; display:block; }
.cform .field-error[hidden] { display:none; }
.cform .field-limit { color:var(--muted); font-weight:400; font-size:12px; }
.cform .input-error { border:2px solid #b42318; outline-color:#b42318; }
.cform .consent-row label:has(.input-error) { border:2px solid #b42318; padding:8px; border-radius:8px; }
