@font-face {
  font-family: 'Suisse Title';
  src: url('../fonts/SuisseIntl-Book.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Suisse Body';
  src: url('../fonts/SuisseIntlTrial-Book.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --sidebar-w: 380px;

  --bg-page: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-placeholder: #ffffff;

  --text: #000000;
  --text-muted: #000000;
  --line: #dbd6c9;
  --line-strong: #221f1a;

  --font-title: 'Suisse Title', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Suisse Body', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.layout { display: flex; min-height: 100vh; }

/* ===================== SIDEBAR ===================== */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  overflow-y: auto;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--line);
  padding: 44px 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
}

.back-link {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 40px;
  transition: color 0.15s ease;
}
.back-link:hover { color: var(--text); }

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.3;
  margin: 0 0 18px;
  letter-spacing: 0.005em;
}
.brand-no {
  font-size: 14px;
  color: var(--text-muted);
}

.sidebar-rule {
  display: block;
  height: 1px;
  background: var(--line);
  margin: 0 0 28px;
}

.sidebar-meta dl { margin: 0; }
.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  font-family: var(--font-body);
  font-size: 12px;
}
.meta-row dt {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.meta-row dd {
  margin: 0;
  text-align: right;
  max-width: 190px;
}

.sidebar-index { flex: 1; }
.index-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  padding: 0 0 10px;
}
.sidebar-index ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-index a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  font-family: var(--font-body);
  font-size: 12.5px;
  transition: color 0.15s ease, opacity 0.15s ease;
  opacity: 0.72;
}
.sidebar-index a:hover,
.sidebar-index a.active {
  opacity: 1;
  color: var(--text);
}
.sidebar-index a.active .no { color: var(--text); }
.sidebar-index .no {
  font-family: var(--font-title);
  color: var(--text-muted);
  width: 16px;
  flex-shrink: 0;
}
.sidebar-index .label { flex: 1; }
.sidebar-index .page {
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.sidebar-footer {
  font-family: var(--font-body);
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.7;
}
.sidebar-footer p { margin: 0; }

/* ===================== SCROLL PANEL ===================== */

.scroll-panel {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 1), 1fr);
  align-items: stretch;
}

.chapter {
  padding: 48px 64px 64px;
  border-bottom: 1px solid var(--line);
}
.chapter--last { border-bottom: none; }
.chapter--text { grid-column: 1 / -1; }

/* -- multi-column photo grid mode (builder: gridColumns > 1) -- */
.scroll-panel--grid .chapter {
  padding: 20px;
}
.scroll-panel--grid .chapter-head { margin-bottom: 10px; }
.scroll-panel--grid .caption { margin-top: 10px; font-size: 11px; }

/* -- slide number only, no rules, no title -- */
.chapter-head {
  margin-bottom: 28px;
}
.chapter-no {
  font-family: var(--font-title);
  font-size: 13px;
  color: var(--text-muted);
}

/* --- text chapter (01 statement) --- */

.statement-body { max-width: 640px; margin: 0 auto; text-align: center; padding: 24px 0 8px; }
.statement-text {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.9;
  margin: 0 0 32px;
}

/* --- image chapters (02–06, appendix) --- */

.image-placeholder {
  background: var(--bg-placeholder);
  border: 1px dashed var(--line-strong);
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.7;
}
.image-placeholder em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chapter-figure { margin: 0 0 22px; }
.chapter-figure img {
  width: 100%;
  border: 1px solid var(--line);
}
.chapter-figure:last-of-type { margin-bottom: 0; }

.caption {
  margin: 18px 0 0;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 720px;
}
.end-mark {
  text-align: center;
  margin-top: 48px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .scroll-panel {
    margin-left: 0;
    width: 100%;
    grid-template-columns: 1fr;
  }
  .chapter { padding: 40px 24px 48px; }
  .scroll-panel--grid .chapter { padding: 24px 20px; }
}
