/* RealStage for V website. Colors follow the app (Mirage/Assets/Mirage/UI/Mirage.uss) and the logo. */

:root {
  --bg: #eef1f6;
  --panel: #ffffff;
  --panel-soft: #f7f8fb;
  --border: #d9dee8;
  --text: #14204a;          /* banner navy */
  --text-dim: #5e6886;
  --heading: #6b4dff;       /* banner violet */
  --accent: #1f5cff;        /* banner "Stage" blue */
  --accent-soft: #e4ebff;
  --cyan: #5ee0ff;          /* logo panel highlight */
  --ok: #1e9a52;
  --warn: #c47a00;
  --err: #d93636;
  --hero-from: #0d1a52;
  --hero-mid: #1f5cff;
  --hero-to: #6b4dff;
  --shadow: 0 1px 2px rgba(20, 32, 74, 0.06), 0 8px 24px rgba(20, 32, 74, 0.08);
  --radius: 14px;
  --max: 1080px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16171b;
    --panel: #1f2127;
    --panel-soft: #272a31;
    --border: #353841;
    --text: #e6e7ea;
    --text-dim: #9a9ea8;
    --heading: #a996ff;
    --accent: #4aa8ff;
    --accent-soft: #23304a;
    --ok: #46d17a;
    --warn: #f2b84b;
    --err: #ff5c5c;
    --hero-from: #0a1033;
    --hero-mid: #1a3fb0;
    --hero-to: #4a2fc0;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #16171b;
  --panel: #1f2127;
  --panel-soft: #272a31;
  --border: #353841;
  --text: #e6e7ea;
  --text-dim: #9a9ea8;
  --heading: #a996ff;
  --accent: #4aa8ff;
  --accent-soft: #23304a;
  --ok: #46d17a;
  --warn: #f2b84b;
  --err: #ff5c5c;
  --hero-from: #0a1033;
  --hero-mid: #1a3fb0;
  --hero-to: #4a2fc0;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

code, kbd {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.05em 0.4em;
}
kbd { border-bottom-width: 2px; white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand img { width: 36px; height: 36px; }
.wordmark .stage { color: var(--accent); }

.nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; }
.nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}
.nav a:hover { background: var(--accent-soft); color: var(--accent); }
.nav a[aria-current="page"] { background: var(--accent); color: #fff; }

@media (max-width: 760px) {
  .site-header { position: static; }
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; gap: 8px; }
  .nav { margin-left: 0; width: 100%; }
  .nav a { padding: 4px 10px; font-size: 0.85rem; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1200px 500px at 85% 120%, rgba(94, 224, 255, 0.35), transparent 60%),
    linear-gradient(120deg, var(--hero-from) 0%, var(--hero-mid) 55%, var(--hero-to) 100%);
}
/* Slanted translucent panels, after the logo's stage walls */
.hero::before, .hero::after {
  content: "";
  position: absolute;
  top: -10%;
  bottom: -10%;
  width: 34%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  pointer-events: none;
}
.hero::before { left: -8%; transform: skewY(-14deg); }
.hero::after { right: -8%; transform: skewY(14deg); }

.hero .wrap { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 72px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.9rem);
  line-height: 1.3;
  margin: 0 0 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.hero .lead { font-size: 1.12rem; opacity: 0.95; margin: 0 0 24px; }
.hero .eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 16px;
}
.hero-shot {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(5, 10, 40, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #000;
}
.hero-shot figcaption {
  font-size: 0.75rem;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #e6e7ea;
  line-height: 1.5;
}
.hero-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.hero-logo img { width: 64px; height: 64px; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3)); }
.hero-logo span { font-size: 1.5rem; font-weight: 800; }
.hero-logo .stage { color: var(--cyan); }

.page-hero .wrap { padding-top: 48px; padding-bottom: 44px; }
.page-hero h1 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); margin: 0 0 8px; }
.page-hero p { margin: 0; opacity: 0.95; max-width: 46em; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero .wrap { padding-top: 48px; padding-bottom: 48px; }
}

/* ---------- buttons / badges ---------- */

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.4;
}
.btn-primary { background: #fff; color: #14204a; }
.btn-primary:hover { background: #e4ebff; }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(1.08); }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  vertical-align: middle;
  white-space: nowrap;
}
.badge-ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.badge-warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.badge-err { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }

/* ---------- sections ---------- */

main { display: block; }
.section { padding: 56px 0; }
.section + .section { padding-top: 8px; }
.section h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  line-height: 1.4;
  margin: 0 0 12px;
  font-weight: 800;
}
.section h2 .kicker {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--heading);
  font-weight: 700;
  margin-bottom: 4px;
}
.section h3 { font-size: 1.12rem; margin: 28px 0 8px; color: var(--text); }
.section h4 { font-size: 1rem; margin: 20px 0 4px; color: var(--heading); }
.section p { margin: 0 0 14px; }
.section ul, .section ol { padding-left: 1.4em; margin: 0 0 14px; }
.section li + li { margin-top: 4px; }
.section .intro { color: var(--text-dim); max-width: 46em; margin-bottom: 24px; }

.doc { max-width: 820px; }
.doc > h2 { margin-top: 48px; padding-top: 8px; border-top: 1px solid var(--border); }
.doc > h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--heading));
}
.card .icon svg { width: 24px; height: 24px; }
a.card { display: block; color: inherit; text-decoration: none; transition: transform 0.15s, border-color 0.15s; }
a.card:hover { transform: translateY(-2px); border-color: var(--accent); }
a.card .more { color: var(--accent); font-weight: 700; font-size: 0.92rem; }

/* Feature row: text + picture */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; margin: 40px 0; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; gap: 18px; }
  .split.reverse > :first-child { order: 0; }
}

figure { margin: 0; }
.shot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.shot img { width: 100%; }
.shot figcaption { font-size: 0.78rem; color: var(--text-dim); padding: 8px 12px; line-height: 1.5; }
.doc .shot { margin: 18px 0 22px; }

/* Flow: 追加する → 置く → 馴染ませる → 送る */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: flow; }
.flow li {
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px 14px;
  position: relative;
  box-shadow: var(--shadow);
}
.flow li::before {
  counter-increment: flow;
  content: counter(flow);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  margin-bottom: 8px;
}
.flow li strong { display: block; font-size: 1.05rem; }
.flow li span { color: var(--text-dim); font-size: 0.9rem; }
.section .flow { padding: 0; }
@media (max-width: 760px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Numbered steps for the guide */
.steps { counter-reset: step; padding: 0; margin: 0; }
.steps > li {
  list-style: none;
  position: relative;
  padding: 0 0 8px 60px;
  margin: 0 0 28px;
}
.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--heading));
}
.steps > li > h3 { margin: 6px 0 8px; }
@media (max-width: 600px) {
  .steps > li { padding-left: 0; padding-top: 52px; }
}

/* Notes */
.note {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: var(--panel);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 16px 0;
}
.note > :last-child { margin-bottom: 0; }
.note-title { font-weight: 800; display: block; margin-bottom: 4px; }
.note.warn { border-left-color: var(--warn); }
.note.ok { border-left-color: var(--ok); }
.note.violet { border-left-color: var(--heading); }

blockquote {
  margin: 16px 0;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--text);
  border: 0;
}
blockquote > :last-child { margin-bottom: 0; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 12px 0 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; line-height: 1.6; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--panel-soft); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Feature list blocks */
.feature-group { margin: 0 0 18px; }
.feature-group h3 { display: flex; align-items: center; gap: 10px; margin-top: 0; }
.feature-group ul { margin-bottom: 0; }

/* Table of contents */
.toc {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin: 0 0 32px;
}
.toc strong { display: block; margin-bottom: 4px; }
.toc ol { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 28px; }
@media (max-width: 600px) { .toc ol { columns: 1; } }

/* FAQ */
details {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 16px;
  margin: 10px 0;
}
details[open] { padding-bottom: 12px; }
summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style-position: outside; margin-left: 1em; }
details > :last-child { margin-bottom: 0; }

/* Checklist */
.checklist { padding: 0; }
.checklist li { list-style: none; padding-left: 30px; position: relative; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent);
  border-radius: 5px;
}

/* Status box for the download area */
.status-box {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}
.status-box img { width: 56px; height: 56px; }
.status-box div { flex: 1 1 260px; }
.status-box p { margin: 0; }
.status-box h3 { margin: 0 0 4px; }

pre.credit {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.6;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  white-space: pre-wrap;
  margin: 10px 0 18px;
}

/* The diagram uses fixed light colors, so it stays on white in the dark theme too */
.diagram { background: #ffffff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 16px 0 22px; }
.diagram svg { width: 100%; }
.diagram text { font-family: "Noto Sans JP", sans-serif; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-dim);
  font-size: 0.86rem;
}
.site-footer .wrap { padding-top: 28px; padding-bottom: 32px; display: grid; gap: 14px; grid-template-columns: 1fr auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer a { color: var(--text-dim); }
.site-footer p { margin: 0; }
@media (max-width: 600px) { .site-footer .wrap { grid-template-columns: 1fr; } }

.muted { color: var(--text-dim); }
.small { font-size: 0.86rem; }
.nobr { display: inline-block; }
code { white-space: nowrap; overflow-wrap: normal; }
