:root {
  --paper: #1c1b18;
  --ink: #f2ede0;
  --accent: #e3a95e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10;

  writing-mode: vertical-rl;
  text-orientation: mixed;

  padding: 0.75rem 0.5rem;
  background: var(--paper);
  border-left: 1px solid #45433c;
  border-bottom: 1px solid #45433c;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.05em;
  padding-left: 0.6rem;
  border-left: 1px solid #45433c;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li {
  padding: 0 0.5rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-nav li.active a {
  color: var(--accent);
  font-weight: 700;
}

main {
  padding-top: 1rem;
}

.page-list {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-list ul {
  list-style: none;
  padding: 0;
}

.page-list li {
  padding: 0.5rem 0;
  border-bottom: 1px dotted #55524a;
}

.page-list a {
  color: var(--accent);
  text-decoration: none;
}

.page-list a:hover {
  text-decoration: underline;
}

/* 縦書きレイアウト */
.vertical-text {
  writing-mode: vertical-rl;
  -webkit-writing-mode: vertical-rl;
  text-orientation: mixed;
  -webkit-text-orientation: mixed;

  height: 85vh;
  max-height: 85vh;
  min-height: 20rem;

  margin: 2rem auto;
  padding: 2rem 1.5rem;
  max-width: 90rem;
  margin-right: 3.5rem;

  background: #24231f;
  border: 1px solid #45433c;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);

  overflow-x: auto;
  overflow-y: hidden;

  font-size: 1.15rem;
  line-height: 2.1;
  letter-spacing: 0.05em;
}

.vertical-text h1 {
  font-size: 1.6rem;
  margin: 0 0 1rem 1.5rem;
  font-weight: 700;
}

.vertical-text p {
  margin: 0 0 1em;
}

/* 半角英数字・URLなどは横向きのまま読めるように */
.vertical-text :is(code, pre, kbd, samp) {
  text-orientation: sideways;
  -webkit-text-orientation: sideways;
}

@media (max-width: 640px) {
  .vertical-text {
    height: 75vh;
    max-height: 75vh;
    padding: 1rem;
    font-size: 1rem;
  }
}
