/* 手首文庫 — 縦に組んだ紹介ページ */

:root {
  --paper: #f7f1e6;
  --paper-2: #ece0ca;
  --paper-hi: #fcf8ef;
  --ink: #2f2925;
  --ink-soft: #675c53;
  --orange: #f6923d;
  --orange-deep: #e85a2a;
  --red: #b8331d;
  --line: #d9cbb3;
  --mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP", serif;
  --gothic: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Noto Sans JP", system-ui, sans-serif;
  --col: 24em;          /* 一行の長さ（字詰め） */
  --gutter: 40px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mincho);
  font-size: 17px;
  line-height: 1.9;
  line-break: strict;
  overflow-wrap: anywhere;
}

a { color: var(--red); text-underline-offset: .25em; }
a:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }

h1, h2, h3 { font-weight: 600; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
img { display: block; }

/* ---------- 縦組みの基本 ---------- */

.v {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.tcy {
  -webkit-text-combine: horizontal;
  text-combine-upright: all;
}

ruby { ruby-align: center; }
rt { font-size: .5em; letter-spacing: 0; }

figcaption, .rubi-note {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ---------- 表紙 ---------- */

.cover { overflow: hidden; position: relative; z-index: 0; }

.cover-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px var(--gutter) 72px;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 56px;
}

.cover-title {
  font-size: clamp(3.4rem, 7.4vw, 6rem);
  line-height: 1.38;
  letter-spacing: .1em;
  white-space: nowrap;
  margin-top: -.08em;
}

.cover-lead {
  height: 21em;
  font-size: 1.0625rem;
  line-height: 2.1;
  text-align: justify;
  padding-top: .4em;
}

.cover-watch {
  position: relative;
  z-index: 0;
  margin: 0 auto;
  padding: 44px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cover-watch::before {          /* バンド */
  content: "";
  position: absolute;
  top: -200px;
  bottom: -400px;
  left: 50%;
  z-index: -1;
  width: 9.8em;
  font-size: 14px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #e3d5bc, var(--paper-2) 30%, #f1e7d3 55%, var(--paper-2) 80%, #e0d1b6);
}
.cover-watch figcaption {
  position: relative;
  max-width: 17em;
  margin-top: 20px;
  padding: 6px 10px;
  background: var(--paper);
  text-align: center;
}

.daisen {                       /* 題簽 */
  flex: none;
  padding: 1.4em .7em;
  border: 1px solid var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 3px;
  background: var(--paper-hi);
  margin: 4px 4px 0;
  line-height: 1.4;
}
.daisen-name { display: block; font-size: 1.5rem; font-weight: 600; letter-spacing: .35em; }
.daisen-en { display: block; font-size: .7rem; letter-spacing: .3em; color: var(--ink-soft); margin-right: .4em; }

/* 時計 */

.watch {
  position: relative;
  font-size: 14px;
  width: 16.4em;
  height: 19.2em;
  padding: .85em;
  border-radius: 3.9em;
  background: linear-gradient(160deg, #4a423c, var(--ink) 40%, #1f1a17);
  box-shadow: 0 1.6em 2.6em -1.2em rgba(60, 35, 10, .55);
  flex: none;
}
.watch::after {                 /* 竜頭 */
  content: "";
  position: absolute;
  right: -.62em;
  top: 4.6em;
  width: .7em;
  height: 2.9em;
  border-radius: .25em;
  background: repeating-linear-gradient(180deg, #4a423c 0 2px, #2a2420 2px 4px);
}
.screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 3.1em;
  background: var(--paper-hi);
  overflow: hidden;
}
.leaf {
  position: absolute;
  inset: 1.2em 1.05em 1.2em;
  font-size: 1em;
  line-height: 1.75;
  color: var(--ink);
  text-align: justify;
}
.leaf p { text-indent: 1em; }
.clock {
  float: left;                  /* 縦組みでは行頭（上）側に寄る */
  writing-mode: horizontal-tb;
  width: 3.5em;
  height: 1.5em;
  margin-bottom: .35em;
  font-family: var(--gothic);
  font-size: .78em;
  font-weight: 600;
  line-height: 1.5;
  text-align: right;
  text-indent: 0;
  color: var(--orange-deep);
}

.leaf-2 { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .leaf-1 { animation: mekuri-a 16s infinite; }
  .leaf-2 { animation: mekuri-b 16s infinite; }
}
@keyframes mekuri-a {
  0%, 46% { opacity: 1; transform: none; }
  50%, 96% { opacity: 0; transform: translateX(.8em); }
  100% { opacity: 1; transform: none; }
}
@keyframes mekuri-b {
  0%, 46% { opacity: 0; transform: translateX(-.8em); }
  50%, 96% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateX(-.8em); }
}

.watch-dim .screen { background: #171311; }
.watch-dim .leaf { color: #9d9186; }
.watch-dim .clock { color: #8a5a3c; }

/* 帯 */

.obi {
  position: relative;
  background: linear-gradient(100deg, #fbb25a 0%, var(--orange) 45%, #ee7a34 100%);
  color: #2a1c12;
  box-shadow: 0 -1px 0 rgba(120, 60, 10, .25), 0 10px 24px -14px rgba(90, 40, 0, .5);
}
.obi::before, .obi::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: rgba(42, 28, 18, .35);
}
.obi::before { top: 7px; }
.obi::after { bottom: 7px; }
.obi-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px var(--gutter);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px 28px;
}
.obi-icon { border-radius: 22.5%; box-shadow: 0 6px 16px rgba(80, 30, 0, .3); }
.obi-copy { font-size: 1.45rem; font-weight: 600; line-height: 1.5; letter-spacing: .06em; margin-right: auto; }
.obi-copy br { display: none; }
.yotei {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: .55em 1.3em .55em 1.1em;
  background: var(--ink);
  color: var(--paper-hi);
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.4;
  border-radius: 2px;
}
.yotei-mark { width: .55em; height: .55em; border-radius: 50%; background: var(--orange); }
.obi-req { flex-basis: 100%; font-size: 13px; line-height: 1.6; }

/* ---------- 目次 ---------- */

.mokuji { padding: 104px var(--gutter) 96px; }
.mokuji-inner {
  height: 19em;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}
.mokuji h2 {
  font-size: 1.35rem;
  letter-spacing: 1.2em;
  margin-left: 2.2em;
  padding-top: .2em;
}
.mokuji li { margin-left: .75em; }
.mokuji a {
  display: flex;
  align-items: center;
  height: 100%;
  gap: .7em;
  padding: 0 .35em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.5;
}
.mokuji a:hover .m-title, .mokuji a:focus-visible .m-title { color: var(--red); }
.m-no { color: var(--red); font-size: .85em; }
.m-title { font-size: 1.3rem; font-weight: 600; letter-spacing: .12em; }
.m-dots { flex: 1; min-height: 1em; width: 0; border-left: 2px dotted var(--line); }
.m-sub { font-size: .82rem; color: var(--ink-soft); }

/* ---------- 章 ---------- */

.chapter {
  padding: 104px var(--gutter);
  border-top: 1px solid var(--line);
}
.chapter:nth-of-type(even) { background: var(--paper-hi); }

.spread {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  align-items: flex-start;
  row-gap: 3.5rem;
}

.chapter-head {
  height: var(--col);
  margin-left: 3.2rem;
  flex: none;
}
.chapter-no {
  font-size: .85rem;
  letter-spacing: .5em;
  color: var(--red);
  margin-left: .9rem;
  padding-top: .3em;
}
.chapter-head h2 {
  font-size: clamp(3rem, 6vw, 4.6rem);
  line-height: 1.25;
  letter-spacing: .12em;
  margin-top: -.06em;
}
.chapter-sub {
  font-size: 1.15rem;
  letter-spacing: .12em;
  margin-right: 1.1rem;
  padding-top: .3em;
}

.honbun {
  height: var(--col);
  line-height: 2.1;
  text-indent: 1em;
  text-align: justify;
  flex: none;
}

.spread > figure, .spread > .rubi-set {
  margin-right: auto;
  padding-right: 3rem;
}

/* 第一章：組見本 */

.mihon {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1.2rem 2rem;
  max-width: 30rem;
}
.mihon-text {
  height: 10.4em;
  font-size: 1.7rem;
  line-height: 2.05;
  padding: .7em 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  text-align: justify;
}
.mihon-text rt { color: var(--red); }
.ookisa { height: auto; padding-top: 1.2rem; line-height: 1; }
.ookisa li { display: flex; align-items: center; gap: .9rem; margin-left: .7rem; }
.o-glyph { line-height: 1.15; }
.o-label { font-size: 11px; color: var(--ink-soft); font-family: var(--gothic); }
.mihon figcaption { flex-basis: 100%; text-align: right; }

/* 第二章：箇条 */

.kajo {
  height: var(--col);
  counter-reset: kajo;
  line-height: 2.1;
  flex: none;
}
.kajo li { counter-increment: kajo; margin-left: .55em; }
.kajo li::before {
  content: counter(kajo, cjk-ideographic) "、";
  color: var(--red);
  font-weight: 600;
}
.kajo h3 { display: inline; font-size: 1.3em; letter-spacing: .1em; margin-bottom: .7em; }
.kajo p { display: inline; }
.kajo + .honbun { margin-right: 1.4em; }

.yoru { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.yoru figcaption { max-width: 17em; text-align: center; }

/* 第三章：ルビ */

.rubi-set {
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2.2rem 1.4rem;
  position: relative;
  padding-bottom: 2.6rem;
}
.spread > .rubi-set { padding-right: 1.6rem; }
.rubi { display: flex; flex-direction: row; align-items: flex-start; gap: .7rem; }
.rubi > p {
  height: 14.9em;
  padding: .9em .5em;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  text-align: justify;
}
.rubi rt { color: var(--red); }
.rubi-hyojun > p { line-height: 2.1; }
.rubi-hirogeru > p { line-height: 1.3; }
.rubi-nashi > p { line-height: 1.3; }
.rubi-nashi rt { display: none; }
.rubi figcaption { height: 15.8rem; line-height: 1.6; }
.rubi figcaption strong { display: block; font-size: 1rem; color: var(--ink); letter-spacing: .1em; margin-left: .2em; }
.rubi-note { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; }

/* 第四章：文字盤 */

.moji { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.moji-ring {
  width: 11.5rem;
  height: 11.5rem;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #1d1916 calc(100% - 13px), transparent calc(100% - 12px)),
    conic-gradient(var(--orange) 0 42%, #5a5048 42% 100%);
  box-shadow: 0 0 0 8px #1d1916, 0 1.4rem 2.2rem -1rem rgba(60, 35, 10, .5);
  color: var(--paper-hi);
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  gap: .9rem;
}
.moji-book { font-size: 1.15rem; letter-spacing: .14em; line-height: 1.2; }
.moji-pct { font-family: var(--gothic); font-size: 2.1rem; font-weight: 600; line-height: 1; color: var(--orange); }
.moji-pct small { font-size: .5em; margin-left: 2px; }
.moji figcaption { max-width: 16em; text-align: center; margin-top: 8px; }

/* 第五章：短冊 */

.tanzaku-list { display: flex; flex-direction: row-reverse; justify-content: center; gap: 1.1rem; }
.tanzaku {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.1em;
  flex: none;
  width: 3.7rem;
  height: 17em;
  justify-content: flex-start;
  white-space: nowrap;
  padding: 1.3em 0 1.1em;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 5px solid var(--orange);
  box-shadow: 0 .9rem 1.4rem -1rem rgba(60, 35, 10, .45);
  line-height: 1.5;
}
.chapter:nth-of-type(odd) .tanzaku { background: var(--paper-hi); }
.t-min { font-weight: 600; color: var(--red); letter-spacing: .1em; }
.t-title { font-size: 1.3rem; font-weight: 600; letter-spacing: .14em; }
.t-author { margin-top: auto; font-size: .82rem; color: var(--ink-soft); letter-spacing: .1em; }
.tanzaku-set figcaption { margin-top: 20px; max-width: 18em; text-align: center; }

/* 第六章：三歩 */

.sanpo { display: flex; flex-direction: row-reverse; flex-wrap: wrap; gap: 3rem 3.4rem; }
.sanpo li { height: 19em; line-height: 2.1; }
.s-no {
  display: block;
  font-size: 4.2rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--orange-deep);
  margin-left: .35rem;
}
.sanpo h3 { font-size: 1.45rem; letter-spacing: .1em; line-height: 1.6; margin-left: .6rem; padding-top: .2em; }
.sanpo p { padding-top: .3em; text-align: justify; }

/* 第七章：料金 */

.nedan { display: flex; flex-direction: row-reverse; flex-wrap: wrap; gap: 3rem 0; }
.nedan-item { height: 21em; line-height: 2.1; }
.nedan-item + .nedan-item { border-right: 1px solid var(--line); margin-right: 2.6rem; padding-right: 2.6rem; }
.nedan h3 { font-size: 2.5rem; letter-spacing: .2em; line-height: 1.3; }
.nedan-sub { color: var(--red); letter-spacing: .12em; margin: 0 .5rem 0 .9rem; padding-top: .2em; }
.nedan li { padding-top: 2em; text-indent: -2em; }
.nedan li::before { content: "一、"; color: var(--red); }
.chu { height: 21em; text-indent: -1em; padding-top: 2.3em; font-size: .86rem; color: var(--ink-soft); line-height: 1.9; margin-right: 2.6rem; flex: none; }

/* ---------- 裏表紙 ---------- */

.ura { border-top: 1px solid var(--line); overflow: hidden; }
.ura-inner {
  padding: 112px var(--gutter) 88px;
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  align-items: flex-start;
  gap: 2.4rem;
}
.ura-title { font-size: clamp(3.2rem, 7vw, 5rem); font-weight: 600; letter-spacing: .28em; line-height: 1.2; }
.ura-copy { font-size: 1.15rem; line-height: 2.1; letter-spacing: .1em; padding-top: .5em; }

/* ---------- 奥付 ---------- */

.okuzuke {
  max-width: 44rem;
  margin: 0 auto;
  padding: 72px var(--gutter) 64px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-soft);
}
.okuzuke-title {
  font-size: 15px;
  letter-spacing: 1em;
  color: var(--ink);
  text-align: center;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 3px double var(--ink);
}
.okuzuke p + p { margin-top: 10px; }
.okuzuke .copy { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; letter-spacing: .12em; }

/* ---------- 落丁（404） ---------- */

.rakucho-main {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 48px 24px;
}
.rakucho-inner { display: flex; flex-direction: row-reverse; align-items: flex-start; gap: 2rem; }
.rakucho-inner h1 { font-size: clamp(2.8rem, 9vw, 4.4rem); letter-spacing: .14em; line-height: 1.25; }
.rakucho-inner .honbun { height: 17em; }
.rakucho-back { height: 17em; text-align: end; letter-spacing: .12em; }
.rakucho-code { font-size: 12.5px; color: var(--ink-soft); letter-spacing: .1em; }

/* ---------- 中くらいの幅 ---------- */

@media (max-width: 1000px) {
  .cover-inner { gap: 36px; }
  .cover-lead { height: 19em; }
  .spread > figure, .spread > .rubi-set, .spread > .sanpo {
    margin-left: auto;
    padding-right: 0;
  }
}

/* ---------- 手のひらの幅 ---------- */

@media (max-width: 640px) {
  :root { --col: 19em; --gutter: 20px; }
  body { font-size: 16px; }

  .cover-inner {
    padding: 44px var(--gutter) 52px;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 44px 22px;
  }
  .cover-title { font-size: 2.75rem; letter-spacing: .08em; }
  .cover-watch { padding-top: 40px; margin: 0 auto; order: 1; }
  .cover-watch figcaption { max-width: 14.5em; }
  .cover-watch::before { bottom: auto; height: calc(240px + 22em); -webkit-mask-image: linear-gradient(to bottom, #000 90%, transparent); mask-image: linear-gradient(to bottom, #000 90%, transparent); }
  .cover-lead { order: 2; }
  .daisen { order: 3; }
  .cover-watch .watch, .cover-watch::before { font-size: 12px; }
  .cover-lead { height: 19em; font-size: 1rem; }
  .daisen { margin-right: auto; margin-left: 12px; align-self: center; }

  .obi-inner { padding: 30px var(--gutter); gap: 16px 18px; }
  .obi-icon { width: 52px; height: 52px; }
  .obi-copy { font-size: 1.15rem; flex: 1 1 60%; margin-right: 0; }
  .obi-copy br { display: inline; }
  .obi-req { font-size: 12px; }

  .mokuji { padding: 72px var(--gutter) 64px; }
  .mokuji-inner { height: 20em; }
  .mokuji h2 { margin-left: .7em; }
  .mokuji li { margin-left: 0; }
  .mokuji a { padding: 0 .12em; }
  .m-title { font-size: 1.15rem; }
  .m-sub { font-size: .76rem; }

  .chapter { padding: 72px var(--gutter); }
  .spread { row-gap: 2.75rem; }
  .chapter-head { margin-left: 1.5rem; height: auto; max-height: var(--col); }
  .chapter-head h2 { font-size: 3rem; }
  .chapter-no { margin-left: .5rem; }
  .chapter-sub { font-size: 1.05rem; margin-right: .7rem; }

  .mihon { justify-content: center; }
  .mihon-text { font-size: 1.4rem; height: 10.4em; }
  .mihon figcaption { text-align: center; }

  .rubi-set { justify-content: center; gap: 2rem 1.4rem; }

  .tanzaku { height: 17.5em; width: 3.4rem; gap: .9em; }
  .tanzaku-list { gap: .8rem; }

  .sanpo { gap: 2.5rem 1.1rem; justify-content: center; }
  .sanpo li { height: 17.5em; }
  .s-no { font-size: 3rem; }
  .sanpo h3 { font-size: 1.2rem; margin-left: .3rem; }

  .nedan { gap: 2.5rem 0; }
  .chu { height: auto; max-height: 19em; }
  .nedan { column-gap: 1.6rem; }
  .nedan-item { height: auto; max-height: 19em; }
  .nedan-item + .nedan-item { border-right: 0; margin-right: 0; padding-right: 0; }
  .nedan h3 { font-size: 2rem; }
  .chu { margin-right: 1.2rem; }

  .ura-inner { padding: 80px var(--gutter) 64px; gap: 1.6rem; }
  .okuzuke { padding: 56px var(--gutter) 48px; }
}

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