/* Asagiri — the website (asagiri.top). Morning mist at dawn: indigo night above, rose and gold at the
   horizon, frosted-glass cards like the app. Light and dark follow the visitor's system setting.
   No web fonts, no third-party requests: system font stacks only. */

:root {
  --bg: #f5f4fc;
  --bg-2: #ebe9f8;
  --surface: rgba(255, 255, 255, 0.66);
  --surface-strong: rgba(255, 255, 255, 0.86);
  --border: rgba(47, 42, 150, 0.12);
  --ink: #15193f;
  --ink-soft: #2d3263;
  --muted: #5a5f86;
  --indigo: #2f2a96;
  --indigo-deep: #121a5a;
  --rose: #ff5f8a;
  --peach: #ff9150;
  --gold: #ffd75e;
  --link: #3b34b8;
  --dawn: linear-gradient(100deg, #ff5f8a 0%, #ff9150 55%, #ffc65e 100%);
  --sky: linear-gradient(180deg, #121a5a 0%, #2f2a96 55%, #6d4fb8 80%, #ff8f8a 100%);
  --shadow: 0 18px 50px rgba(30, 28, 110, 0.12);
  --shadow-soft: 0 8px 24px rgba(30, 28, 110, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
  --max: 1160px;
  --read: 68ch;
  --hero-fade: linear-gradient(90deg, rgba(14, 18, 66, 0.72) 0%, rgba(14, 18, 66, 0.42) 42%, rgba(14, 18, 66, 0) 70%);
  --sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Noto Sans",
    "Helvetica Neue", Arial, "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", "Noto Serif JP",
    "Yu Mincho", serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0e2e;
    --bg-2: #10164a;
    --surface: rgba(28, 33, 92, 0.52);
    --surface-strong: rgba(28, 33, 92, 0.82);
    --border: rgba(226, 228, 255, 0.12);
    --ink: #eef0ff;
    --ink-soft: #d6d9ff;
    --muted: #a6aad6;
    --link: #b7b3ff;
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6.2vw, 4.6rem); margin: 0 0 0.35em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin: 0 0 0.5em; }
h3 { font-size: 1.28rem; margin: 0 0 0.4em; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface-strong); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: 20px; }
.read { max-width: var(--read); }

/* ---- header ------------------------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 1.12rem; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-soft); }
.brand small { font-weight: 450; color: var(--muted); font-size: 0.85rem; margin-left: 2px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-soft); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface); color: var(--ink); }
.nav .btn { margin-left: 6px; }
.nav-toggle { display: none; margin-left: auto; background: var(--surface); border: 1px solid var(--border); color: var(--ink);
  border-radius: 12px; padding: 8px 12px; font: inherit; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 12px; right: 12px; top: 64px; flex-direction: column; align-items: stretch;
    background: var(--surface-strong); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px;
    box-shadow: var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .nav.open { display: flex; }
  .nav .btn { margin: 6px 0 0; justify-content: center; }
}

/* ---- buttons ------------------------------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; padding: 13px 22px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; font: 600 1rem/1.2 var(--sans); transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-dawn { background: var(--dawn); color: #2a0d1c; box-shadow: 0 10px 30px rgba(255, 105, 120, 0.35); }
.btn-glass { background: rgba(255, 255, 255, 0.16); color: #fff; border-color: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-small { padding: 9px 16px; font-size: 0.92rem; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

/* ---- hero ------------------------------------------------------------------------------------------ */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--sky); }
.hero-art, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.hero::after { content: ""; position: absolute; inset: 0; background: var(--hero-fade); }
.hero .wrap { position: relative; z-index: 1; min-height: min(86vh, 780px); display: flex; flex-direction: column; justify-content: center; padding-block: 96px 120px; }
.hero h1 { color: #fff; max-width: 19ch; text-shadow: 0 2px 30px rgba(10, 12, 50, 0.35); }
.hero .lede { font-size: clamp(1.08rem, 2vw, 1.3rem); max-width: 34rem; color: rgba(255, 255, 255, 0.92); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 0.95rem; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.86);
  margin-bottom: 18px; }
.eyebrow .jp { font-family: var(--serif); font-size: 1.25rem; letter-spacing: 0.08em; }
.eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.trust { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dawn); }
.hero-mist { position: absolute; left: 0; right: 0; bottom: -2px; height: 120px; z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, var(--bg) 92%); }
@media (max-width: 640px) {
  .hero::after { background: linear-gradient(180deg, rgba(14, 18, 66, 0.55) 0%, rgba(14, 18, 66, 0.35) 55%, rgba(14, 18, 66, 0.15) 100%); }
  .hero .wrap { padding-block: 72px 110px; min-height: 0; }
  .hero-art img { object-position: 66% 50%; }
}

/* ---- sections ------------------------------------------------------------------------------------ */
section { padding-block: 84px; }
.section-head { max-width: 46rem; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.kicker { display: inline-block; font-size: 0.82rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--dawn); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 10px; }
.tint { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }

.name-card { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.name-card .jp-big { font-family: var(--serif); font-size: clamp(4rem, 12vw, 8.5rem); line-height: 1; letter-spacing: 0.06em;
  background: linear-gradient(180deg, var(--indigo) 0%, #7b58c8 55%, var(--rose) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-color-scheme: dark) { .name-card .jp-big { background: linear-gradient(180deg, #e9e7ff 0%, #b9a7ff 55%, var(--rose) 100%); -webkit-background-clip: text; background-clip: text; } }
.say { display: inline-flex; gap: 10px; align-items: baseline; margin-top: 8px; color: var(--muted); }
.say b { color: var(--ink); font-family: var(--mono); font-weight: 600; letter-spacing: 0.02em; }
@media (max-width: 800px) { .name-card { grid-template-columns: 1fr; gap: 18px; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.reverse .split-art { order: 2; }
.split-art img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 26px; } .split.reverse .split-art { order: 0; } }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow-soft); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.card p { color: var(--muted); margin: 0; }
.card .ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 14px;
  background: linear-gradient(140deg, rgba(255, 95, 138, 0.16), rgba(255, 145, 80, 0.16)); color: var(--rose); }
.card .ico svg { width: 24px; height: 24px; }
.card h3 { font-family: var(--sans); font-size: 1.08rem; font-weight: 650; }

.steps { counter-reset: step; display: grid; gap: 16px; }
.step { position: relative; padding: 20px 22px 20px 70px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 20px; top: 18px; width: 34px; height: 34px;
  border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #2a0d1c; background: var(--dawn); }
.step h3 { font-family: var(--sans); font-size: 1.04rem; font-weight: 650; margin-bottom: 4px; }
.step p { color: var(--muted); margin: 0; }

.sees { width: 100%; border-collapse: collapse; font-size: 0.97rem; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; }
.sees th, .sees td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.sees th { font-weight: 650; background: var(--surface-strong); }
.sees td:first-child { font-weight: 600; width: 24%; min-width: 9em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }

.band { position: relative; overflow: hidden; border-radius: 28px; color: #fff; background: var(--sky); box-shadow: var(--shadow); }
.band .band-art { position: absolute; top: 0; bottom: 0; right: 0; width: 64%; }
.band .band-art img { width: 100%; height: 100%; object-fit: cover; object-position: 42% 50%; }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #1a1c66 0%, #1a1c66 34%, rgba(26, 28, 102, 0.55) 46%, rgba(26, 28, 102, 0) 62%); }
.band .band-body { position: relative; z-index: 1; padding: 64px 48px; max-width: 34rem; }
.band h2 { color: #fff; }
.band p { color: rgba(255, 255, 255, 0.9); }
@media (max-width: 760px) { .band .band-art { top: auto; left: 0; width: 100%; height: 260px; } .band .band-body { padding: 40px 24px 280px; }
  .band::after { background: linear-gradient(180deg, #1a1c66 0%, #1a1c66 52%, rgba(26, 28, 102, 0.4) 68%, rgba(26, 28, 102, 0) 80%); } }

.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.4rem; line-height: 1; color: var(--rose); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); }

.note { border-left: 4px solid var(--peach); background: var(--surface); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-soft); }

/* ---- documents (privacy, terms, legal, security, support) ---------------------------------------- */
.doc-hero { position: relative; color: #fff; background: var(--sky); overflow: hidden; }
.doc-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.doc-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 18, 66, 0.45), rgba(14, 18, 66, 0.15)); }
.doc-hero .wrap { position: relative; z-index: 1; padding-block: 76px 70px; }
.doc-hero h1 { color: #fff; font-size: clamp(2.1rem, 5vw, 3.4rem); }
.doc-hero p { color: rgba(255, 255, 255, 0.9); max-width: 40rem; margin: 0; }
.doc { padding-block: 56px 84px; }
.doc .wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.doc .wrap > *, .split > *, .dl-grid > *, .name-card > * { min-width: 0; }
.toc { position: sticky; top: 88px; font-size: 0.93rem; }
.toc p { font-weight: 650; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 18px; color: var(--muted); }
.toc li { margin: 4px 0; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--link); text-decoration: underline; }
.prose { max-width: var(--read); }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--sans); font-size: 1.08rem; font-weight: 650; margin-top: 1.4em; }
.prose li { margin: 6px 0; }
.prose .meta { color: var(--muted); font-size: 0.95rem; }
.ph { background: rgba(255, 145, 80, 0.18); border-radius: 6px; padding: 0 5px; font-weight: 600; }
@media (max-width: 900px) { .doc .wrap { grid-template-columns: minmax(0, 1fr); gap: 20px; } .toc { position: static; } }

/* ---- download -------------------------------------------------------------------------------------- */
.dl-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
@media (max-width: 860px) { .dl-grid { grid-template-columns: 1fr; } }
.dl-main { padding: 30px; }
.dl-main .ver { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 0.95rem; margin: 6px 0 20px; }
.dl-main .ver b { color: var(--ink); }
.hash { display: flex; gap: 8px; align-items: stretch; margin-top: 18px; }
.hash code { flex: 1; min-width: 0; overflow-wrap: anywhere; background: var(--surface-strong); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 0.85rem; }
.soon { display: inline-block; font-size: 0.8rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }
.other { display: grid; gap: 14px; }
.other .card { display: flex; flex-direction: column; gap: 6px; }
.notes { margin: 10px 0 0; padding-left: 20px; color: var(--muted); }

/* ---- footer ---------------------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 44px 56px; color: var(--muted); font-size: 0.94rem; background: var(--bg-2); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.site-footer h4 { color: var(--ink); font-size: 0.95rem; margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer .fine { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 18px; font-size: 0.86rem; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

/* ---- 404 ------------------------------------------------------------------------------------------- */
.lost { min-height: 72vh; display: grid; place-items: center; text-align: center; color: #fff; position: relative; background: var(--sky); overflow: hidden; }
.lost img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lost::after { content: ""; position: absolute; inset: 0; background: rgba(14, 18, 66, 0.45); }
.lost .wrap { position: relative; z-index: 1; padding-block: 80px; }
.lost h1 { color: #fff; }
.lost p { color: rgba(255, 255, 255, 0.9); }

.center { text-align: center; }
.mt { margin-top: 28px; }

@media (max-width: 640px) { .hide-sm { display: none; } section { padding-block: 60px; } body { font-size: 16.5px; } }
.cta-center { justify-content: center; }
[hidden] { display: none !important; }
.dl-main h2 { display: flex; align-items: center; gap: 14px; }
.dl-main h2 .ico { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, rgba(255, 95, 138, 0.16), rgba(255, 145, 80, 0.16)); color: var(--rose); }
.dl-main h2 .ico svg { width: 30px; height: 30px; }
.other .card .soon, .other .card .btn { align-self: flex-start; }
.other .card h3 { margin-bottom: 0; }
.dl-grid { align-items: start; }
.hash .btn { border-radius: 12px; }
@media (max-width: 640px) { .sees { min-width: 560px; font-size: 0.9rem; } .sees th, .sees td { padding: 10px 12px; } }
