/* ---------------------------------------------
 * index.css     2026/09/08
 *   Copyright (c) 2026 Jun Mizutani,
 *   released under the MIT open source license.
 * --------------------------------------------- */

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #101a2a;
}

body {
  display: grid;
  place-items: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e6efff;
}

.hero,
.doc {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(16, 26, 42, 0.88);
}

.hero { margin-top: 28px; }
.doc { margin-top: 18px; }
.hero h1 { margin: 0 0 8px; }
.hero p { margin: 6px 0; color: #c7d6ec; }
.doc h2 { margin: 0 0 8px; }
.doc h2:not(:first-child) { margin-top: 24px; }
.doc p { color: #c7d6ec; }
.doc li + li { margin-top: 7px; }
.doc a { color: #9cc9ff; }

#canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* 実行ページはcanvasと操作UIを同じ表示領域へまとめます */
.project-stage {
  position: relative;
  width: min(960px, 100vw, 150vh);
  aspect-ratio: 3 / 2;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
  background: #101a2a;
}

.project-stage #canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* canvasの上にあるページ内リンクと操作ボタンをクリック可能にします */
.page a,
.page button {
  pointer-events: auto;
}

.toolbar {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  pointer-events: auto;
  z-index: 2;
}

button {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 7px;
  background: rgba(18, 28, 44, 0.78);
  color: #f3f7ff;
  cursor: pointer;
}

button:hover {
  background: rgba(54, 81, 116, 0.9);
}

.button {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 7px;
  background: rgba(18, 28, 44, 0.78);
  color: #f3f7ff;
  text-decoration: none;
}

.button:hover {
  background: rgba(54, 81, 116, 0.9);
}

#status {
  position: absolute;
  left: 16px;
  bottom: 16px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(16, 26, 42, 0.78);
  color: #e6efff;
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  pointer-events: none;
  z-index: 2;
}
