/* ベース・タイポグラフィ・テーマ変数・レターボックス */

:root {
  /* デフォルト（Frontmatter で上書きされる） */
  --color-heading: #000000;
  --color-body: #000000;
  --color-background: #f8f8f6;

  --font-heading: "Georgia";
  --font-body: "Helvetica Neue";
  --font-ja-heading: "YuMincho", "Yu Mincho";
  --font-ja-body: "Hiragino Sans";

  --base-width: 1280px;
  --base-height: 720px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--color-background);
  color: var(--color-body);
  font-family: var(--font-body), var(--font-ja-body), sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#deck {
  position: relative;
  width: var(--base-width);
  height: var(--base-height);
  flex: 0 0 auto;
  transform-origin: center center;
  background: var(--color-background);
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  background: var(--color-background);
  padding: 64px 96px;
  overflow: hidden;
}

.slide.active {
  display: flex;
  flex-direction: column;
}

/* ---- タイポグラフィ ----------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading), var(--font-ja-heading), serif;
  color: var(--color-heading);
  font-weight: normal;
  margin: 0;
  letter-spacing: 0.005em;
  /* 日本語見出しはプロポーショナル詰め（明朝系で映える） */
  font-feature-settings: "palt";
}

h1 {
  font-size: 56px;
  line-height: 1.18;
  margin: 0 0 32px;
  text-align: center;
}

h2 {
  font-size: 44px;
  line-height: 1.2;
  margin: 0 0 28px;
  text-align: center;
}

h3 {
  font-size: 30px;
  line-height: 1.3;
  margin: 0 0 14px;
}

h4 {
  font-size: 24px;
  line-height: 1.3;
  margin: 0 0 10px;
}

.content {
  flex: 1;
  font-size: 24px;
  line-height: 1.65;
  font-family: var(--font-body), var(--font-ja-body), sans-serif;
  overflow: hidden;
}

.content p {
  margin: 0 0 14px;
}

.content ul,
.content ol {
  margin: 0 0 14px;
  padding-left: 1.4em;
}

.content li,
.two-col-col li {
  margin-bottom: 12px;
}

.content li > ul,
.content li > ol {
  margin: 6px 0 6px;
}

.content a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.content strong {
  font-weight: 700;
}

.content em {
  font-style: italic;
}

.content code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.08em 0.4em;
  border-radius: 4px;
}

.content pre {
  background: rgba(0, 0, 0, 0.045);
  padding: 16px 20px;
  border-radius: 8px;
  overflow: auto;
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 14px;
}

.content pre code {
  background: transparent;
  padding: 0;
  font-size: 1em;
}

.content blockquote {
  border-left: 4px solid rgba(0, 0, 0, 0.25);
  padding-left: 18px;
  margin: 0 0 14px;
  color: rgba(0, 0, 0, 0.7);
}

.slide table {
  border-collapse: collapse;
  margin: 8px 0 14px;
  font-size: 22px;
  border: 1px solid var(--color-body);
}

.slide th,
.slide td {
  border: 1px solid var(--color-body);
  padding: 10px 18px;
  text-align: left;
  vertical-align: middle;
}

.slide th {
  font-weight: 600;
}

.content img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

/* h2 でスライド分割した「サブセクション」スライド：左寄せの見出しを許容 */
.slide.layout-default[data-heading-level="2"] h2 {
  text-align: left;
  font-size: 40px;
}

/* ---- ローディング ------------------------------------------------------ */
#loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-background);
  font-family: var(--font-body), sans-serif;
  font-size: 22px;
  color: var(--color-body);
  opacity: 0.55;
  z-index: 100;
  letter-spacing: 0.04em;
}

body.ready #loading {
  display: none;
}
