:root {
  color-scheme: dark;
  --bg: #0b0d0c;
  --surface: #121512;
  --surface-2: #171b17;
  --line: #2b312b;
  --text: #f2f4ef;
  --muted: #a4ada3;
  --accent: #b9e34d;
  --accent-soft: rgba(185, 227, 77, .12);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 75% 18%, rgba(185, 227, 77, .06), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", "Noto Sans JP", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button, select { font: inherit; }
[hidden] { display: none !important; }

.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--accent);
  color: #111;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(11, 13, 12, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.header-inner {
  width: min(calc(100% - 40px), var(--max));
  min-height: 76px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -.06em;
}
.brand strong, .brand small { display: block; line-height: 1.15; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .24em; }
.primary-nav { display: flex; align-items: center; gap: 22px; }
.primary-nav a { color: var(--muted); font-size: 14px; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--text); }
.language-control select {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
}
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--line);
}
.menu-toggle span { display: block; height: 1px; margin: 5px 0; background: var(--text); }

.view { min-height: calc(100vh - 160px); }
.hero-shell {
  padding-block: clamp(72px, 10vw, 150px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .7fr);
  align-items: center;
  gap: clamp(40px, 8vw, 120px);
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(42px, 7vw, 88px);
  line-height: .98;
  letter-spacing: -.055em;
}
.hero-text {
  max-width: 720px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
}
.status-notice {
  max-width: 560px;
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(185, 227, 77, .35);
  background: var(--accent-soft);
}
.status-notice strong, .status-notice p { display: block; margin: 0; }
.status-notice p { color: var(--muted); }
.status-dot { width: 9px; height: 9px; background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }

.safe-placeholder {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #171a17, #0f110f);
  color: #626a61;
  font-size: clamp(20px, 4vw, 42px);
  font-weight: 800;
  line-height: .95;
  letter-spacing: .06em;
  text-align: center;
}
.placeholder-grid {
  position: absolute;
  inset: 0;
  opacity: .3;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  transform: rotate(-8deg) scale(1.15);
}
.safe-placeholder span { position: relative; z-index: 1; }
.safe-placeholder.compact {
  width: min(100%, 520px);
  aspect-ratio: 16 / 7;
  margin-top: 36px;
  font-size: clamp(18px, 4vw, 34px);
}
.privacy-strip {
  margin-bottom: 70px;
  padding: 20px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.privacy-strip p { margin: 0; color: var(--muted); }
.privacy-icon {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  color: var(--accent);
}

.showcase-section { padding-bottom: clamp(80px, 10vw, 140px); }
.showcase-section h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: -.04em;
}
.catalog-demo { padding-block: clamp(70px, 9vw, 120px); }
.catalog-demo h1 { font-size: clamp(42px, 6vw, 72px); }
.page-intro {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
}
.fictional-banner {
  margin: 32px 0 38px;
  padding: 16px 18px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  border: 1px solid rgba(185, 227, 77, .38);
  background: var(--accent-soft);
}
.fictional-banner strong, .fictional-tag {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .15em;
  white-space: nowrap;
}
.fictional-banner span { color: var(--muted); }

.demo-grid, .guide-demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.compact-grid { margin-top: 36px; }
.memory-demo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.demo-card, .guide-demo-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
}
.demo-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
}
.demo-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.demo-card h3, .guide-demo-card h3 {
  margin: 16px 0 0;
  font-size: 23px;
  line-height: 1.1;
  letter-spacing: -.025em;
}
.version-name {
  min-height: 3em;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.memory-stats {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.card-action {
  width: 100%;
  margin-top: 20px;
  padding: 11px 14px;
  color: #111;
  background: var(--accent);
  border: 0;
  font-weight: 750;
  cursor: pointer;
}
.card-action:hover { filter: brightness(1.08); }
.card-action:focus-visible, .dialog-close:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

.mock-portrait {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
  color: rgba(255, 255, 255, .9);
  background: #252a26;
  border-bottom: 1px solid var(--line);
}
.mock-portrait::before, .mock-portrait::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid currentColor;
  opacity: .28;
  transform: rotate(35deg);
}
.mock-portrait::before { width: 58%; aspect-ratio: 1; }
.mock-portrait::after { width: 88%; aspect-ratio: 1; transform: rotate(65deg); }
.mock-portrait span {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 850;
  letter-spacing: -.08em;
}
.mock-portrait.small {
  width: 180px;
  flex: 0 0 180px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
}
.mock-portrait.ember { background: linear-gradient(140deg, #3c231d, #b3502b); }
.mock-portrait.tide { background: linear-gradient(140deg, #183044, #2c7b93); }
.mock-portrait.stone { background: linear-gradient(140deg, #292a2b, #6b6258); }
.mock-portrait.rain { background: linear-gradient(140deg, #24213b, #73598e); }

.guide-demo-card { padding: 24px; }
.guide-number {
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .14em;
}
.guide-demo-card p {
  margin: 14px 0 0;
  color: var(--muted);
}
.guide-demo-card .card-action { margin-top: auto; }

.entity-dialog {
  width: min(calc(100% - 32px), 960px);
  max-height: calc(100vh - 32px);
  padding: 0;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .65);
}
.entity-dialog::backdrop {
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(5px);
}
.dialog-close {
  position: sticky;
  z-index: 3;
  top: 14px;
  float: right;
  width: 42px;
  height: 42px;
  margin: 14px 14px -56px 0;
  color: var(--text);
  background: rgba(11, 13, 12, .88);
  border: 1px solid var(--line);
  cursor: pointer;
}
.dialog-article { padding: clamp(24px, 5vw, 54px); }
.dialog-warning {
  margin: 0 56px 28px 0;
  padding: 12px 14px;
  color: var(--accent);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  font-size: 13px;
}
.dialog-hero {
  display: flex;
  align-items: stretch;
  gap: 26px;
}
.dialog-hero > div:last-child { flex: 1; }
.dialog-hero h2 {
  margin: 8px 0 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1;
  letter-spacing: -.04em;
}
.dialog-hero .version-name { min-height: auto; font-size: 16px; }
.dialog-hero dl {
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}
.dialog-hero dt, .mock-stats dt, .memory-detail-grid dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.dialog-hero dd, .mock-stats dd, .memory-detail-grid dd { margin: 2px 0 0; }
.section-title {
  margin: 38px 0 16px;
  font-size: 20px;
  letter-spacing: -.02em;
}
.mock-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
}
.mock-stats div {
  min-width: 0;
  padding: 14px;
  background: var(--surface);
}
.mock-stats dd { font-size: 19px; font-weight: 700; }
.mock-skill-list { display: grid; gap: 12px; }
.mock-skill {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.mock-skill header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}
.mock-skill h3 { margin: 0; font-size: 19px; }
.mock-skill header span { color: var(--accent); font-size: 12px; }
.mock-skill p { margin: 12px 0 0; color: var(--muted); }
.skill-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.skill-facts span {
  padding: 5px 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 12px;
}
.memory-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0 0;
}
.memory-detail-grid div {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.awakening-list, .guide-steps {
  margin: 0;
  padding-left: 24px;
}
.awakening-list li, .guide-steps li { margin-top: 10px; color: var(--muted); }
.guide-dialog { max-width: 760px; margin: 0 auto; }
.guide-dialog h2 {
  margin: 10px 0 0;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1;
  letter-spacing: -.045em;
}
.guide-lead { color: var(--muted); font-size: 18px; }
.guide-example {
  margin-top: 28px;
  padding: 20px;
  background: var(--accent-soft);
  border: 1px solid rgba(185, 227, 77, .28);
}
.guide-example p { margin: 8px 0 0; color: var(--muted); }

.placeholder-view, .about-view { padding-block: clamp(70px, 10vw, 130px); }
.placeholder-view h1, .about-view h1 { font-size: clamp(40px, 6vw, 72px); }
.centered { width: min(100%, 520px); margin-top: 20px; }
.about-card {
  max-width: 780px;
  margin-top: 38px;
  padding: clamp(24px, 4vw, 42px);
  background: var(--surface);
  border: 1px solid var(--line);
}
.about-card p { margin: 0; color: var(--muted); font-size: 18px; }
.about-card p + p { margin-top: 20px; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-inner p { margin: 0; color: var(--muted); font-size: 13px; text-align: right; }

@media (max-width: 850px) {
  .menu-toggle { display: block; }
  .primary-nav {
    position: absolute;
    inset: 76px 0 auto;
    display: none;
    padding: 22px 20px;
    flex-direction: column;
    align-items: flex-start;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
  }
  .primary-nav.is-open { display: flex; }
  .hero-shell { grid-template-columns: 1fr; }
  .safe-placeholder { max-width: 480px; width: 100%; }
  .demo-grid, .guide-demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .memory-demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mock-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .container, .header-inner { width: min(calc(100% - 28px), var(--max)); }
  .brand strong { font-size: 14px; }
  .brand-mark { width: 36px; height: 36px; }
  .header-inner { gap: 10px; }
  .hero-shell { padding-block: 62px; }
  h1 { font-size: clamp(38px, 13vw, 60px); }
  .fictional-banner { align-items: flex-start; flex-direction: column; }
  .demo-grid, .guide-demo-grid, .memory-demo-grid { grid-template-columns: 1fr; }
  .dialog-hero { flex-direction: column; }
  .mock-portrait.small { width: 100%; flex-basis: auto; aspect-ratio: 16 / 8; }
  .dialog-hero dl, .memory-detail-grid { grid-template-columns: 1fr; }
  .mock-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mock-skill header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .footer-inner { padding-block: 28px; align-items: flex-start; flex-direction: column; }
  .footer-inner p { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
