/* /tarot/ explainer pages. Builds on cards/library.css; only adds what long prose needs. */

.article { padding-bottom: 2.4rem; }

.article h1 { font-size: 1.7rem; }

.article p,
.article li {
  font-size: 1.02rem;
  line-height: 2;
}

.article p { margin: 1rem 0 0; }

.article .lede {
  margin-top: 1.8rem;
  padding: 1.1rem 1.2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 1.06rem;
}

.article h2 {
  margin-top: 2.8rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.article h3 {
  margin: 1.9rem 0 0.4rem;
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.article ul,
.article ol { margin: 0.8rem 0 0; padding-left: 1.4em; }

.article li + li { margin-top: 0.4rem; }

.article strong { font-weight: 600; }

.article a { text-decoration-color: var(--gold); text-underline-offset: 0.2em; }

.article em { font-style: italic; }

/* Tables scroll sideways on phones instead of widening the page. */
.scroll {
  margin: 1.1rem 0 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.scroll table {
  width: 100%;
  min-width: 20rem;
  border-collapse: collapse;
  font-size: 0.93rem;
  line-height: 1.7;
}

.scroll th,
.scroll td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.scroll thead th {
  font-weight: 600;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--gold);
}

.scroll tbody th,
.scroll tbody td:first-child { white-space: nowrap; color: var(--muted); }

/* 年表 */
.article .timeline {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0 0 0 1.3rem;
  border-left: 1px solid var(--gold);
}

.timeline li {
  position: relative;
  margin: 0;
  padding: 0 0 1rem;
  line-height: 1.75;
}

.timeline li + li { margin-top: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  left: calc(-1.3rem - 4px);
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.timeline .when {
  display: block;
  font-family: Cinzel, Palatino, serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.timeline .what { display: block; font-size: 0.97rem; }

/* カードを引く */
.article .draw { margin-top: 1.4rem; text-align: center; }

.article .draw a {
  display: inline-block;
  padding: 0.6rem 1.8rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.12em;
}

.article .draw a:hover { background: rgba(166, 132, 61, 0.12); }

.soon { color: var(--muted); }
.soon small { font-size: 0.82em; }

/* 挿絵 */
.plate { display: block; margin: 1.6rem 0 0; }

.plate img {
  width: 100%;
  border-radius: 0.4rem;
  box-shadow: 0 14px 32px rgba(62, 44, 22, 0.16);
}

/* 歴史のカード */
.cards {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.6rem 0 0.4rem;
}

.cards figure { flex: 0 1 15rem; margin: 0; }
.cards.single figure { flex-basis: 13rem; }

.cards img {
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 10px 24px rgba(62, 44, 22, 0.18);
}

.cards figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.plate-video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.4rem;
  box-shadow: 0 14px 32px rgba(62, 44, 22, 0.16);
  background: #e7dcc8;
}

/* カードのページ */
.cards.deck figure { flex-basis: 17rem; }
.cards.deck figcaption { text-align: center; }

.scroll table.facts { min-width: 0; }
.scroll table.facts th { width: 11em; white-space: normal; color: var(--muted); font-weight: 500; }

/* 大アルカナの一覧 */
.article .arcana {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.arcana li { margin: 0; border-bottom: 1px solid var(--line); }
.arcana li + li { margin-top: 0; }

.arcana a,
.arcana .later {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 0;
  text-decoration: none;
}

.arcana a:hover { background: rgba(166, 132, 61, 0.08); }

.arcana picture { flex: 0 0 4.2rem; }
.arcana img { width: 100%; border-radius: 0.3rem; box-shadow: 0 6px 14px rgba(62, 44, 22, 0.14); }
.arcana .later img { opacity: 0.55; }

.arcana .text { display: block; line-height: 1.6; }
.arcana .num {
  display: inline-block;
  min-width: 1.8em;
  font-family: Cinzel, Palatino, serif;
  color: var(--gold);
}
.arcana .name { font-weight: 600; letter-spacing: 0.08em; }
.arcana .en {
  margin-left: 0.6em;
  font-family: Cinzel, Palatino, serif;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.arcana .line { display: block; font-size: 0.9rem; color: var(--ink); }
.arcana .later .line { color: var(--muted); font-size: 0.84rem; }
.arcana .line b {
  display: inline-block;
  margin-right: 0.5em;
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--muted);
}

/* カードのページの最後：そのカードのラッキーカラーへ */
.article .lucky { margin-top: 1.8rem; text-align: center; }

.article .lucky a {
  display: inline-block;
  padding: 0.6rem 1.8rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.1em;
}

.article .lucky a:hover { background: rgba(166, 132, 61, 0.12); }

/* スプレッドの図 */
.spread {
  display: grid;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.2rem 0 0.4rem;
}

.spread .c {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 4rem;
  border: 1px solid var(--gold);
  border-radius: 0.3rem;
  background: rgba(251, 246, 236, 0.75);
  font-family: Cinzel, Palatino, serif;
  color: var(--gold);
  box-shadow: 0 4px 10px rgba(62, 44, 22, 0.1);
}

.spread.three { grid-template-columns: repeat(3, 2.6rem); gap: 1rem; }

.spread.celtic {
  grid-template-columns: repeat(3, 3rem) 1.4rem 3rem;
  grid-template-rows: repeat(4, 4.3rem);
  gap: 0.35rem;
  justify-items: center;
  align-items: center;
}

.spread.celtic .p1 { grid-column: 2; grid-row: 2 / 4; }
.spread.celtic .p2 {
  grid-column: 2; grid-row: 2 / 4;
  transform: rotate(90deg);
  background: rgba(239, 230, 214, 0.92);
  position: relative;
  z-index: 1;
}
.spread.celtic .p2 { line-height: 1; }
.spread.celtic .p3 { grid-column: 2; grid-row: 1; }
.spread.celtic .p4 { grid-column: 2; grid-row: 4; }
.spread.celtic .p5 { grid-column: 1; grid-row: 2 / 4; }
.spread.celtic .p6 { grid-column: 3; grid-row: 2 / 4; }
.spread.celtic .p7 { grid-column: 5; grid-row: 4; }
.spread.celtic .p8 { grid-column: 5; grid-row: 3; }
.spread.celtic .p9 { grid-column: 5; grid-row: 2; }
.spread.celtic .p10 { grid-column: 5; grid-row: 1; }
.spread.celtic .p2 b { display: inline-block; font-weight: inherit; transform: rotate(-90deg); }
.spread.celtic .p1 { align-items: flex-start; padding-top: 0.12rem; font-size: 0.8rem; }
.scroll td { min-width: 3.6em; }

/* Right-to-left pages (Arabic). Only html[dir="rtl"] is touched, so ja/en stay as they are. */
html[lang="ar"] body { font-family: "Noto Naskh Arabic", "Shippori Mincho", serif; }

/* Joined scripts break apart with letter spacing. */
html[dir="rtl"] .article :is(h3, .draw a, .lucky a, .arcana .name, .scroll thead th, .timeline .when) {
  letter-spacing: 0;
}

html[dir="rtl"] .article :is(ul, ol):not(.arcana, .timeline) { padding-left: 0; padding-right: 1.4em; }

html[dir="rtl"] .scroll :is(th, td) { text-align: right; }

html[dir="rtl"] .article .timeline {
  padding: 0 1.3rem 0 0;
  border-left: 0;
  border-right: 1px solid var(--gold);
}

html[dir="rtl"] .timeline li::before { left: auto; right: calc(-1.3rem - 4px); }

/* Arabic years are words, not numerals in Cinzel. */
html[dir="rtl"] .timeline .when { font-family: inherit; font-size: 0.92rem; }

html[dir="rtl"] .arcana .en { margin-left: 0; margin-right: 0.6em; }
html[dir="rtl"] .arcana .line b { margin-right: 0; margin-left: 0.5em; }

/* The spread diagrams show cards on a table, laid out left to right as the text describes. */
html[dir="rtl"] .spread { direction: ltr; }

/* Chinese pages: use the Noto Serif SC/TC glyphs loaded for these languages (as public/lang.css does on the top pages). */
html[lang="zh-Hans"] body { font-family: "Noto Serif SC", "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif; }
html[lang="zh-Hant"] body { font-family: "Noto Serif TC", "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif; }
