/* 星詠みの書 — 生成りの紙・墨の線・ポップな差し色 */
:root {
  --paper: #f4ecdd;
  --paper-2: #ebe0cc;
  --card: #fbf6ec;
  --ink: #1e1b17;
  --ink-soft: #5c554b;
  --ink-faint: rgba(30, 27, 23, .14);
  --mustard: #e3a62f;
  --mustard-soft: #f4d48c;
  --pink: #f0b3a3;
  --pink-deep: #d8705c;
  --cobalt: #1f8f78;       /* 2026-11-16 青→エメラルド寄りに（名前は据え置き） */
  --cobalt-soft: #a3d9c6;
  --cobalt-text: #3b64ae;  /* 文字の青はそのまま */
  --radius: 22px;
  --serif-jp: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif; /* 本文 */
  --heading: "Kiwi Maru", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", serif;       /* 見出し */
  --script: "Caveat", "Kiwi Maru", cursive;                                             /* 英字の小見出し */
  --display: "Fraunces", "Kiwi Maru", serif;                                            /* 数字・価格 */
  --glyph: "Noto Sans Symbols", "Segoe UI Symbol", "Apple Symbols", sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .18 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --speck: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .96 0 0 0 0 .93 0 0 0 0 .87 0 0 0 26 -16.4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --sparkle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 4C53 37 63 47 96 50C63 53 53 63 50 96C47 63 37 53 4 50C37 47 47 37 50 4Z'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--ink);
  font-family: var(--serif-jp);
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: .04em;
  overflow-x: hidden;
}
a { color: var(--cobalt-text); }
img, svg { max-width: 100%; }
.glyph { font-family: var(--glyph); font-variant-emoji: text; }
::selection { background: var(--mustard-soft); }

/* モチーフ */
.motif { position: absolute; pointer-events: none; filter: url(#inky); }
[data-motifs] { position: relative; overflow: hidden; }

/* ---- 見出し・装飾 ---- */
.eyebrow { font-family: var(--script); font-weight: 700; font-size: 1.55rem; line-height: 1.2; letter-spacing: .01em; color: var(--pink-deep); }
.ornament { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 40px auto; max-width: 360px; }
.ornament::before, .ornament::after { content: ""; flex: 1; height: 1.5px; background: var(--ink); border-radius: 2px; }
.ornament span { font-size: 0; display: flex; gap: 8px; }
.ornament span::before, .ornament span::after { content: ""; width: 14px; height: 14px; background: var(--mustard); -webkit-mask: var(--sparkle) center/contain no-repeat; mask: var(--sparkle) center/contain no-repeat; }

/* ---- ヘッダー・フッター ---- */
.site-header { display: flex; align-items: center; justify-content: space-between; max-width: 1120px; margin: 0 auto; padding: 24px 24px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 40px; height: 40px; color: var(--ink); }
.brand-name { font-size: 1.2rem; letter-spacing: .22em; font-weight: 500; font-family: var(--heading);}
.brand-sub { display: block; font-family: var(--script); font-weight: 700; font-size: 1.05rem; letter-spacing: .02em; color: var(--ink-soft); line-height: 1.2; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: .9rem; margin-left: 24px; padding-bottom: 4px; background: linear-gradient(var(--mustard), var(--mustard)) 0 100% / 0 3px no-repeat; transition: background-size .2s; }
.site-header nav a:hover { background-size: 100% 3px; }
.site-header nav { margin-left: auto; }
/* 言語の切り替え（右上） */
.lang-switch { display: flex; align-items: center; gap: 4px; margin-left: 24px; padding: 4px; border: 1px solid var(--ink); border-radius: 999px; font-size: .76rem; white-space: nowrap; background: var(--card); }
.lang-switch svg { width: 15px; height: 15px; margin: 0 4px 0 8px; color: var(--ink); flex: none; }
.lang-switch a { padding: 4px 8px; border-radius: 999px; color: var(--ink); text-decoration: none; letter-spacing: .04em; line-height: 1.4; }
.lang-switch a:hover { background: var(--paper); }
.lang-switch a[aria-current] { background: var(--ink); color: var(--paper); pointer-events: none; }
html[lang=en] .brand-name { letter-spacing: .06em; white-space: nowrap; }
.brand-name, .brand-sub, .site-header nav a { white-space: nowrap; }
.site-header nav { display: flex; flex-wrap: nowrap; }
@media (max-width: 1000px) { .site-header nav a { margin-left: 16px; font-size: .82rem; } .lang-switch { margin-left: 16px; } }
@media (max-width: 760px) { .site-header nav { display: none; } .lang-switch { margin-left: auto; } }

.site-footer { margin-top: 88px; padding: 40px 24px 56px; text-align: center; color: var(--ink-soft); font-size: .8rem; border-top: 1px solid var(--ink); }
.site-footer a { color: var(--ink-soft); margin: 0 8px; }
.site-footer p { margin: 8px 0 0; }

/* ---- ボタン ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 32px;
  font-family: var(--heading); font-size: 1rem; font-weight: 500; letter-spacing: .14em;
  color: var(--paper); text-decoration: none; cursor: pointer;
  background: var(--ink); border: 2px solid var(--ink); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--mustard);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--mustard); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--mustard); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-ink { box-shadow: 4px 4px 0 var(--pink); }
.btn-ink:hover { box-shadow: 4px 4px 0 var(--pink); }
.btn-ghost-ink { min-height: 42px; padding: 0 24px; font-size: .88rem; background: transparent; color: var(--ink); border: 1px solid var(--ink); box-shadow: 3px 3px 0 var(--cobalt-soft); }

/* ---- トップ：ヒーロー ---- */
.hero { max-width: 1120px; margin: 0 auto; padding: 32px 24px 8px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 4.8vw, 3.5rem); font-weight: 500; line-height: 1.45; letter-spacing: .08em; margin: 8px 0 24px; font-family: var(--heading);}
.hero h1 em { font-style: normal; white-space: nowrap; background: linear-gradient(transparent 62%, var(--mustard-soft) 62%, var(--mustard-soft) 92%, transparent 92%); }
.hero .lead { color: var(--ink-soft); font-size: 1.02rem; margin: 0 0 32px; max-width: 32em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.hero-note { font-size: .84rem; color: var(--ink-soft); }
.hero-art { position: relative; width: 100%; max-width: 480px; justify-self: end; aspect-ratio: 1; }
.hero-art .medallion { position: absolute; inset: 11%; }
.hero { overflow: hidden; position: relative; }
.hero-art .art-layer { position: absolute; inset: 0; will-change: transform; }
.hero-art .motif { transform: translate(-50%, -50%); }
@keyframes spin { to { transform: rotate(360deg); } }

/* 模様の帯 */
.pattern-band { height: 220px; margin: 72px 0 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--card) var(--grain); }

/* ---- セクション ---- */
.section { max-width: 1120px; margin: 0 auto; padding: 80px 24px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 500; letter-spacing: .14em; margin: 4px 0 0; font-family: var(--heading);}
.section-head p { color: var(--ink-soft); margin: 16px auto 0; max-width: 40em; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
/* 鑑定の流れ：押せるボタンと間違えないよう、影や動きは付けない */
.step { position: relative; padding: 32px 24px 32px; text-align: center; background: var(--card); border: 1px solid var(--ink); border-radius: var(--radius); }
.step .num { display: block; width: 64px; height: 64px; margin: 0 auto 4px; }
.step h3 { font-size: 1.1rem; letter-spacing: .12em; margin: 8px 0 8px; font-weight: 500; font-family: var(--heading);}
.step p { color: var(--ink-soft); font-size: .9rem; margin: 0; }

.menu-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.menu-list li { display: grid; grid-template-columns: 54px 1fr auto; gap: 16px; align-items: center; padding: 24px 24px; background: var(--card); border: 1px solid var(--ink); border-radius: var(--radius); }
.menu-list .numeral { font-family: var(--display); font-weight: 600; font-size: 1.2rem; text-align: center; width: 50px; height: 50px; line-height: 47px; border-radius: 50%; background: var(--mustard-soft); border: 1px solid var(--ink); }
.menu-list li:nth-child(3n+2) .numeral { background: var(--pink); }
.menu-list li:nth-child(3n) .numeral { background: var(--cobalt-soft); }
.menu-list h3 { margin: 0; font-size: 1.05rem; letter-spacing: .1em; font-weight: 500; line-height: 1.6; font-family: var(--heading);}
.menu-list h3 small { display: block; font-weight: 400; color: var(--ink-soft); letter-spacing: .04em; font-size: .82rem; }
.menu-list p { margin: 4px 0 0; color: var(--ink-soft); font-size: .86rem; line-height: 1.75; }
.menu-list .price { font-family: var(--display); font-weight: 700; font-size: 1.2rem; white-space: nowrap; }

/* ---- カード（紙） ---- */
.folio { position: relative; background: var(--card) var(--grain); color: var(--ink); border: 1px solid var(--ink); border-radius: 28px; padding: 56px 64px; box-shadow: 5px 5px 0 var(--ink); }
.folio a { color: var(--cobalt-text); }
.corner { position: absolute; width: 58px; height: 58px; filter: url(#inky); }
.corner.tl { top: -24px; left: 24px; color: var(--mustard); }
.corner.br { bottom: -24px; right: 32px; color: var(--pink); }

/* ---- フォーム ---- */
.form-folio { max-width: 660px; margin: 0 auto; }
.form-folio h2 { text-align: center; font-size: 1.5rem; letter-spacing: .16em; margin: 4px 0 4px; font-weight: 500; font-family: var(--heading);}
.form-folio .eyebrow { display: block; text-align: center; }
.form-intro { text-align: center; color: var(--ink-soft); font-size: .92rem; margin: 0 0 32px; }
.field { margin-bottom: 24px; }
.field label, .field .label { display: block; font-size: .92rem; letter-spacing: .1em; margin-bottom: 8px; font-weight: 700; }
.field .hint { display: block; font-size: .8rem; color: var(--ink-soft); margin-top: 8px; letter-spacing: .02em; font-weight: 400; line-height: 1.75; }
.field input[type="text"], .field input[type="date"], .field input[type="time"], .field select {
  width: 100%; min-height: 52px; padding: 8px 16px; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fffdf8; border: 1px solid var(--ink); border-radius: 14px; appearance: none;
}
.field input:disabled { background: var(--paper-2); color: var(--ink-soft); }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px;
}
.field input:focus, .field select:focus { outline: none; box-shadow: 0 0 0 4px var(--mustard-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; margin-top: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.form-actions { text-align: center; margin-top: 32px; }
.form-error { color: var(--pink-deep); text-align: center; font-size: .9rem; min-height: 1.5em; margin: 16px 0 0; font-weight: 700; }
.privacy-note { text-align: center; font-size: .78rem; color: var(--ink-soft); margin: 16px 0 0; }

/* 出生地の検索 */
.place-picker .combo { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 5; list-style: none; margin: 0; padding: 8px 0; max-height: 320px; overflow-y: auto; background: #fffdf8; border: 1px solid var(--ink); border-radius: 14px; box-shadow: 5px 5px 0 var(--ink); }
.suggest li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 16px; cursor: pointer; font-size: .95rem; }
.suggest li small { color: var(--ink-soft); font-family: var(--display); white-space: nowrap; font-size: .8rem; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--mustard-soft); }
.suggest li.empty { cursor: default; color: var(--ink-soft); font-size: .85rem; }
.place-chosen { font-family: var(--display); font-size: .85rem; color: var(--cobalt-text); min-height: 1.4em; margin-top: 8px; }
.manual { margin-top: 8px; font-size: .88rem; }
.manual summary { cursor: pointer; color: var(--ink-soft); }
.manual[open] { border-top: 1px dashed var(--ink-faint); padding-top: 16px; }

/* ---- 鑑定ページ ---- */
.reading-head { text-align: center; max-width: 880px; margin: 0 auto; padding: 24px 24px 8px; }
.reading-head h1 { font-size: clamp(1.6rem, 4.2vw, 2.5rem); letter-spacing: .08em; font-weight: 500; margin: 8px 0 8px; line-height: 1.5; font-family: var(--heading);}
.reading-head .meta { color: var(--ink-soft); font-size: .88rem; }
.reading-head .keywords { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.reading-head .keywords li { border: 1px solid var(--ink); border-radius: 999px; padding: 4px 16px; font-size: .86rem; letter-spacing: .1em; }
.reading-head .keywords li:nth-child(3n+1) { background: var(--mustard-soft); }
.reading-head .keywords li:nth-child(3n+2) { background: var(--pink); }
.reading-head .keywords li:nth-child(3n) { background: var(--cobalt-soft); }

.chart-grid { max-width: 1120px; margin: 32px auto 0; padding: 0 24px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px; align-items: start; }
.wheel-wrap { background: var(--card) var(--grain); border: 1px solid var(--ink); border-radius: 28px; padding: 16px; box-shadow: 4px 4px 0 var(--ink); }
.wheel-wrap svg { display: block; width: 100%; height: auto; }
.wheel-legend { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; font-size: .78rem; color: var(--ink-soft); margin-top: 16px; }
.wheel-legend i { display: inline-block; width: 22px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 8px; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--ink); border-radius: 22px; padding: 16px 16px; }
.positions { width: 100%; border-collapse: collapse; font-size: .9rem; }
.positions caption { text-align: left; font-family: var(--script); font-weight: 700; color: var(--pink-deep); font-size: 1.45rem; padding: 0 0 8px 4px; }
.positions th, .positions td { padding: 8px; border-bottom: 1px dashed var(--ink-faint); text-align: left; white-space: nowrap; }
.positions tbody tr:last-child td { border-bottom: 0; }
.positions th { color: var(--ink-soft); font-weight: 400; font-size: .76rem; letter-spacing: .1em; }
.positions td.g { font-family: var(--glyph); width: 28px; text-align: center; font-size: 1.1rem; }
.positions td.r { color: var(--pink-deep); font-size: .78rem; font-weight: 700; }
.balance { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; font-size: .84rem; }
.bar { display: grid; grid-template-columns: 4.2em 1fr 3em; align-items: center; gap: 8px; color: var(--ink-soft); }
.bar span:nth-child(2) { height: 10px; background: var(--card); border: 1px solid var(--ink); border-radius: 999px; position: relative; overflow: hidden; }
.bar b { position: absolute; inset: 0 auto 0 0; background: var(--mustard); }
.bar:nth-child(1) b { background: var(--pink-deep); }
.bar:nth-child(2) b { background: var(--mustard); }
.bar:nth-child(3) b { background: var(--cobalt-soft); }
.bar:nth-child(4) b { background: var(--cobalt); }
.bar:nth-child(n+5) b { background: var(--ink); }

/* 鑑定書 */
.book { max-width: 880px; margin: 40px auto 0; padding: 0 16px; }
.chapter { margin-bottom: 64px; }
.chapter-head { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.chapter-head .numeral { font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1; width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; background: var(--mustard-soft); }
.chapter:nth-child(3n) .chapter-head .numeral { background: var(--pink); }
.chapter:nth-child(3n+1) .chapter-head .numeral { background: var(--cobalt-soft); }
.chapter-head h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.75rem); letter-spacing: .1em; font-weight: 500; font-family: var(--heading);}
.chapter-head .sub { width: 100%; color: var(--ink-soft); font-size: .95rem; margin-top: 4px; }
.chapter-head .tag { margin-left: auto; font-size: .8rem; letter-spacing: .06em; border: 1px solid var(--ink); border-radius: 999px; padding: 4px 16px; background: var(--paper); }

.prose { font-size: 1.03rem; line-height: 2.1; }
.prose h3 { font-size: 1.2rem; letter-spacing: .08em; margin: 2.4em 0 .9em; font-weight: 500; display: flex; align-items: center; gap: 16px; font-family: var(--heading);}
.prose h3::before { content: ""; width: 18px; height: 18px; flex: none; background: var(--mustard); -webkit-mask: var(--sparkle) center/contain no-repeat; mask: var(--sparkle) center/contain no-repeat; }
.prose h4 { font-size: 1.03rem; margin: 1.8em 0 .5em; color: var(--cobalt-text); letter-spacing: .06em; }
.prose p { margin: 0 0 1.2em; text-align: justify; }
.prose h3 + p::first-letter, .prologue p:first-of-type::first-letter {
  float: left; font-size: 2.8em; line-height: 1; margin: .1em .16em 0 0; font-family: var(--heading); font-weight: 500;
  background: var(--mustard-soft); border: 1px solid var(--ink); border-radius: 14px; padding: .08em .12em;
}
.prose strong { font-weight: 700; background: linear-gradient(transparent 64%, var(--pink) 64%); }
.prose .notice { font-size: .84rem; color: var(--ink-soft); border-left: 4px solid var(--mustard); padding: 4px 0 4px 16px; }
.prologue { margin-top: 16px; }
.prologue .prologue-label { display: inline-block; font-size: .8rem; letter-spacing: .12em; background: var(--mustard-soft); border: 1px solid var(--ink); border-radius: 999px; padding: 0 16px; margin-bottom: 1em; text-align: left; }

/* 読み込み中 */
.scrying { text-align: center; padding: 32px 0; color: var(--ink-soft); }
.scrying svg { width: 64px; height: 64px; display: block; margin: 0 auto 16px; color: var(--mustard); animation: spin 8s linear infinite; }
.scrying p { margin: 0; letter-spacing: .12em; font-size: .92rem; }
.cursor::after { content: "✦"; color: var(--mustard); margin-left: 4px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* 有料部分 */
.locked { position: relative; margin-top: 16px; }
.locked .veil { filter: blur(5px); user-select: none; pointer-events: none; opacity: .55; max-height: 240px; overflow: hidden; mask-image: linear-gradient(180deg, #000 30%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); }
.seal { margin: -72px auto 0; position: relative; max-width: 540px; text-align: center; background: #fffdf8; border: 1px solid var(--ink); border-radius: 26px; padding: 40px 24px 32px; box-shadow: 4px 4px 0 var(--pink); }
.seal .wax { width: 80px; height: 80px; margin: -80px auto 8px; position: relative; color: var(--mustard); display: grid; place-items: center; }
.seal .wax svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: url(#inky); }
.seal .wax span { position: relative; font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.seal h4 { margin: 0 0 8px; font-size: 1.12rem; letter-spacing: .1em; font-weight: 500; font-family: var(--heading);}
.seal p { margin: 0 0 8px; font-size: .88rem; color: var(--ink-soft); line-height: 1.8; }
.seal .volume { color: var(--ink); }
.seal .volume strong { background: linear-gradient(transparent 60%, var(--mustard-soft) 60%); }
.seal .price { font-family: var(--display); font-weight: 700; font-size: 2rem; margin: 8px 0 16px; }
.seal .price small { font-size: .8rem; font-family: var(--serif-jp); color: var(--ink-soft); font-weight: 400; }
.toc { list-style: none; padding: 0; margin: 16px auto 16px; text-align: left; max-width: 420px; font-size: .9rem; }
.toc li { padding: 8px 0; border-bottom: 1px dashed var(--ink-faint); display: flex; gap: 16px; }
.toc li span { font-family: var(--display); font-weight: 600; min-width: 1.4em; color: var(--pink-deep); }
.preview { border-left: 4px solid var(--mustard); padding-left: 16px; margin: 16px 0 0; color: var(--ink-soft); }
.preview p { margin: 0 0 .7em; }
.preview .label { font-size: .78rem; letter-spacing: .14em; color: var(--ink); font-weight: 700; }
.partner-form { text-align: left; margin: 16px 0 16px; }
.partner-form .field { margin-bottom: 16px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper); border-radius: 999px; padding: 16px 24px; font-size: .9rem; z-index: 10; max-width: calc(100% - 32px); box-shadow: 4px 4px 0 var(--mustard); }

.legal { max-width: 860px; margin: 32px auto 0; padding: 0 16px; }
.legal h1 { text-align: center; letter-spacing: .16em; font-weight: 500; font-size: 1.6rem; font-family: var(--heading);}
.legal h2 { font-size: 1.1rem; letter-spacing: .1em; margin-top: 2em; font-family: var(--heading);}
.legal table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.legal th, .legal td { border-bottom: 1px dashed var(--ink-faint); padding: 8px 8px; text-align: left; vertical-align: top; }
.legal th { width: 30%; font-weight: 700; }
.todo { background: var(--pink); padding: 0 8px; border-radius: 4px; }

/* ---- レスポンシブ ---- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 8px; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { max-width: 340px; grid-row: 1; justify-self: center; }
  .steps { grid-template-columns: 1fr; }
  .menu-list { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: minmax(0, 1fr); }
  .folio { padding: 48px 40px; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .site-header { padding: 16px 16px; }
  .site-header nav { display: none; }
  .lang-switch { margin-left: auto; }
  .lang-switch svg { display: none; }
  .site-header { gap: 16px; }
  .brand { gap: 8px; }
  html[lang=en] .brand-name { font-size: 1.05rem; }
  .lang-switch a { padding: 4px 8px; }
  .section { padding: 64px 16px 0; }
  .hero { padding-left: 16px; padding-right: 16px; }
  /* 絵のまわりのモチーフが画面の端で切れないよう、天球儀を少し小さく */
  .hero-art { max-width: 288px; }
  .reading-head { padding-left: 16px; padding-right: 16px; }
  .site-footer { padding-left: 16px; padding-right: 16px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .menu-list li { grid-template-columns: 46px 1fr; padding: 16px 16px; }
  .menu-list .numeral { width: 42px; height: 42px; line-height: 39px; font-size: 1.05rem; }
  .menu-list .price { grid-column: 2; justify-self: start; }
  .folio { padding: 40px 24px; box-shadow: 3px 3px 0 var(--ink); border-radius: 22px; }
  .chart-grid { padding: 0 16px; }
  .balance { grid-template-columns: 1fr; }
  .btn { width: 100%; padding: 0 24px; }
  .chapter-head .tag { margin-left: 0; }
  .pattern-band { height: 160px; }
}

/* =========================================================
   洗練レイヤー：線を細く、余白を広く、英字はイタリックのセリフに
   ========================================================= */
body { letter-spacing: .05em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-style: italic; font-weight: 400; font-size: 1rem;
  letter-spacing: .06em; color: var(--pink-deep); font-variation-settings: "opsz" 24;
}
.eyebrow::before { content: ""; width: 9px; height: 9px; flex: none; background: currentColor; -webkit-mask: var(--sparkle) center/contain no-repeat; mask: var(--sparkle) center/contain no-repeat; }
.section-head .eyebrow::after, .form-folio .eyebrow::after { content: ""; width: 9px; height: 9px; flex: none; background: currentColor; -webkit-mask: var(--sparkle) center/contain no-repeat; mask: var(--sparkle) center/contain no-repeat; }
.form-folio .eyebrow { display: flex; justify-content: center; }
.brand-sub { font-family: var(--display); font-style: italic; font-weight: 400; font-size: .8rem; letter-spacing: .12em; }
.positions caption { font-family: var(--display); font-style: italic; font-weight: 400; font-size: 1.05rem; letter-spacing: .04em; }
.menu-list .price, .seal .price, .seal .wax span { font-weight: 600; }
.menu-list .numeral, .chapter-head .numeral, .toc li span { font-weight: 500; }

.hero h1 { letter-spacing: .05em; line-height: 1.55; font-size: clamp(2rem, 4.2vw, 3.15rem); }
.hero h1 em { line-height: 1.3; background: linear-gradient(transparent 64%, var(--mustard-soft) 64%, var(--mustard-soft) 90%, transparent 90%) 0 0 / 100% 100% no-repeat; }
.hero .lead { line-height: 2.05; }
.section { padding-top: 112px; }
.section-head { margin-bottom: 56px; }
.section-head h2 { letter-spacing: .18em; margin-top: 8px; }
.section-head p { font-size: .95rem; line-height: 2.05; }
.step { padding: 40px 32px 32px; border-radius: 20px; }
.step .num { width: 84px; height: 84px; filter: url(#inky); }
.menu-list li { border-radius: 18px; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.menu-list li:hover { transform: translateY(-3px); box-shadow: 3px 5px 0 var(--ink); }
.btn { box-shadow: 3px 3px 0 var(--mustard); letter-spacing: .16em; }
.btn:hover { box-shadow: 5px 5px 0 var(--mustard); }
.btn-ink { box-shadow: 3px 3px 0 var(--pink); }
.btn-ink:hover { box-shadow: 5px 5px 0 var(--pink); }
.pattern-band { height: 300px; margin-top: 88px; }
.pattern-band.tall { height: 380px; margin-top: 112px; }
.ornament::before, .ornament::after { height: 1px; }
.site-footer { border-top-width: 1px; }

/* =========================================================
   トップのアニメーション
   ========================================================= */
/* 開いたときに、文字が下から順に浮かびあがる */
.intro { display: inline-block; animation: rise 1s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d, 0s); }
.hero-copy .lead, .hero-copy .hero-actions { display: block; }
.hero-copy .hero-actions { display: flex; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
/* 「読み解く。」のマーカーが左から引かれる */
.hero h1 em { animation: rise 1s cubic-bezier(.2,.7,.2,1) both, marker .9s cubic-bezier(.6,0,.2,1) both; animation-delay: .55s, 1.25s; }
@keyframes marker { from { background-size: 0 100%; } to { background-size: 100% 100%; } }

/* 天球儀：回りながら現れ、月が昇り、星がまたたく */
.hero-art .medallion { animation: orb-in 1.6s cubic-bezier(.2,.7,.2,1) .15s both; }
@keyframes orb-in { from { opacity: 0; transform: scale(.86) rotate(-24deg); } to { opacity: 1; transform: none; } }
.hero-art .medallion .spin { transform-origin: 250px 250px; animation: spin 140s linear infinite; }
.hero-art .medallion .dotring { transform-origin: 250px 250px; animation: spin 90s linear infinite reverse; }
.hero-art .medallion .orbit, .hero-art .medallion .satellite { transform-origin: 250px 250px; animation: spin 24s linear infinite; }
.hero-art .medallion .moon { animation: moon-rise 1.8s cubic-bezier(.2,.7,.2,1) .7s both, bob 8s ease-in-out 2.5s infinite; }
@keyframes moon-rise { from { opacity: 0; transform: translateY(46px); } to { opacity: 1; transform: none; } }
@keyframes bob { 50% { transform: translateY(-6px); } }
.hero-art .medallion .sunrise { transform-box: fill-box; transform-origin: 50% 100%; animation: sun-up 1.4s cubic-bezier(.2,.7,.2,1) .5s both; }
@keyframes sun-up { from { opacity: 0; transform: scaleY(.3); } to { opacity: 1; transform: none; } }
.hero-art .twinkle { transform-box: fill-box; transform-origin: center; animation: twinkle var(--t, 3s) ease-in-out var(--td, 0s) infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.55) rotate(25deg); opacity: .55; } }

/* 周りのモチーフ：順にぽんっと現れて、ふわふわ漂う */
.hero-art .motif { animation: pop .8s cubic-bezier(.3,1.6,.5,1) var(--pd, 1s) both, float var(--fl, 7s) ease-in-out var(--fd, 0s) infinite; }
@keyframes pop { from { scale: 0; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes float { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -9px; rotate: 6deg; } }

/* ときどき流れ星 */
.shooting { position: absolute; top: 14%; left: 58%; width: 120px; height: 1.5px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--ink)); transform: rotate(-28deg); opacity: 0; animation: shoot 11s ease-in 3.5s infinite; }
.shooting::after { content: ""; position: absolute; right: -5px; top: -4.5px; width: 10px; height: 10px; background: var(--mustard); -webkit-mask: var(--sparkle) center/contain no-repeat; mask: var(--sparkle) center/contain no-repeat; }
@keyframes shoot {
  0% { opacity: 0; translate: 0 0; }
  2% { opacity: 1; }
  9% { opacity: 0; translate: -340px 180px; }
  100% { opacity: 0; translate: -340px 180px; }
}

/* 模様の帯：ゆっくり横に流れる */
.pattern-band[data-drift] .band-track { position: absolute; inset: 0 auto 0 0; width: 200%; display: flex; animation: drift 80s linear infinite; }
.pattern-band[data-drift] .band-half { position: relative; width: 50%; height: 100%; }
@keyframes drift { to { transform: translateX(-50%); } }

/* スクロールで現れる */
.js [data-reveal], .js .reveal-item { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].is-in, .js .reveal-item.is-in { opacity: 1; transform: none; }
.menu-list li.reveal-item.is-in:hover { transform: translateY(-3px); transition-delay: 0s; }

@media (prefers-reduced-motion: reduce) {
  .intro, .hero h1 em, .hero-art .medallion, .hero-art .medallion *, .hero-art .motif, .hero-art .twinkle,
  .pattern-band[data-drift] .band-track, .scrying svg { animation: none !important; }
  .shooting { display: none; }
  .js [data-reveal], .js .reveal-item { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 560px) {
  .section { padding-top: 88px; }
  .pattern-band, .pattern-band.tall { height: 200px; }
  .step { padding: 32px 24px 32px; }
}

/* ---- 惑星の軌道（細い線） ---- */
.hero-copy { position: relative; z-index: 2; }
.hero-art .orbit-layer .orbits { position: absolute; left: -45%; top: -45%; width: 190%; height: 190%; max-width: none; overflow: visible; }
.hero-art .orbit-layer { animation: rise 2s ease .3s both; }
.orbit-arcs { position: absolute; inset: 0; width: 100%; height: 100%; }
.section-head { position: relative; }
.section-head::before {
  content: ""; position: absolute; left: 50%; top: -16px; width: 440px; max-width: 100%; height: 150px; transform: translateX(-50%); z-index: -1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 440 150'%3E%3Cg fill='none' stroke='%231e1b17' stroke-width='.8'%3E%3Cellipse cx='220' cy='75' rx='210' ry='48' transform='rotate(-6 220 75)' opacity='.3'/%3E%3Cellipse cx='220' cy='75' rx='160' ry='34' transform='rotate(-6 220 75)' stroke-dasharray='2 6' opacity='.5'/%3E%3C/g%3E%3Ccircle cx='54' cy='96' r='4' fill='%23e3a62f' stroke='%231e1b17'/%3E%3Ccircle cx='372' cy='48' r='2.6' fill='%231e1b17'/%3E%3C/svg%3E") center / contain no-repeat;
}
.section { position: relative; z-index: 0; }

/* サイト名は細めに */
.brand-name { font-weight: 300; letter-spacing: .2em; }

/* 流れの番号 */
.step-no { position: absolute; top: 16px; left: 24px; font-family: var(--display); font-style: italic; font-weight: 400; font-size: .95rem; color: var(--pink-deep); letter-spacing: .06em; }

/* 流れは2ステップ */
.steps.two { grid-template-columns: repeat(2, 1fr); max-width: 820px; margin: 0 auto; }
.menu-list li { grid-template-columns: 54px 1fr; }
@media (max-width: 900px) { .steps.two { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .menu-list li { grid-template-columns: 46px 1fr; } }

/* ---- イラストと同じ、かすれた刷りの質感 ---- */
.btn { background: var(--speck), linear-gradient(170deg, #2b2621, var(--ink) 60%, #24201b); background-size: 180px 180px, 100% 100%; }
.btn-ghost-ink { background: var(--grain); }
.toast { background: var(--speck), var(--ink); }
.menu-list .numeral, .chapter-head .numeral, .reading-head .keywords li, .prologue .prologue-label { background-image: var(--grain); }

/* 章番号の丸：イラストと同じ、少しかすれた刷りの色面 */
.menu-list .numeral, .chapter-head .numeral { --nc: var(--mustard); --nl: #f1c768; color: var(--ink); }
.menu-list li .numeral, .chapter .chapter-head .numeral, .menu-list li:nth-child(n) .numeral, .chapter:nth-child(n) .chapter-head .numeral {
  background: var(--speck), radial-gradient(circle at 34% 30%, var(--nl), var(--nc) 72%);
  background-size: 180px 180px, 100% 100%;
}
.menu-list li:nth-child(3n+2) .numeral, .chapter:nth-child(3n) .chapter-head .numeral { --nc: var(--pink-deep); --nl: #ec9a86; color: var(--card); }
.menu-list li:nth-child(3n) .numeral, .chapter:nth-child(3n+1) .chapter-head .numeral { --nc: var(--cobalt); --nl: #5cb8a0; color: var(--card); }
.nw{white-space:nowrap}

/* 章は番号ではなく、意味を表すイラストで */
.menu-list li:nth-child(n) .numeral.mark, .chapter:nth-child(n) .chapter-head .numeral.mark {
  position: relative; display: block; width: 84px; height: 84px; border: 0; border-radius: 0; background: none; color: var(--ink);
}
.numeral.mark::before { content: ""; position: absolute; width: 66%; height: 66%; right: 8%; top: 4%; border-radius: 50%;
  background: var(--speck), radial-gradient(circle at 34% 30%, var(--nl), var(--nc) 72%); background-size: 180px 180px, 100% 100%; opacity: .9; }
.numeral.mark { --nc: var(--mustard-soft); --nl: #f8e2ad; }
.menu-list li:nth-child(3n+2) .numeral.mark, .chapter:nth-child(3n) .chapter-head .numeral.mark { --nc: var(--pink); --nl: #f6cdc1; }
.menu-list li:nth-child(3n) .numeral.mark, .chapter:nth-child(3n+1) .chapter-head .numeral.mark { --nc: var(--cobalt-soft); --nl: #c9ebde; }
.numeral.mark svg { position: relative; width: 100%; height: 100%; filter: url(#inky); }
.menu-list li { grid-template-columns: 84px 1fr; gap: 24px; }
.seal .wax .wax-mark { position: relative; inset: auto; width: 40px; height: 40px; color: var(--ink); filter: none; }
@media (max-width: 560px) {
  .menu-list li { grid-template-columns: 64px 1fr; gap: 16px; }
  .menu-list li:nth-child(n) .numeral.mark, .chapter:nth-child(n) .chapter-head .numeral.mark { width: 64px; height: 64px; }
}

/* 星図ページの見出し：ひとことのタイトルを主役に、専門的な表記は小さく */
.reading-head .headline-pre { margin: 8px 0 0; font-family: var(--heading); color: var(--ink-soft); font-size: clamp(.95rem, 2.2vw, 1.1rem); letter-spacing: .12em; }
.reading-head h1 { font-size: clamp(1.7rem, 4.6vw, 2.7rem); margin: 4px 0 16px; }
.reading-head h1 em { font-style: normal; margin-left: .2em; white-space: nowrap; background: linear-gradient(transparent 64%, var(--mustard-soft) 64%, var(--mustard-soft) 90%, transparent 90%); }
.reading-head .chart-title { margin: 0; font-size: .82rem; color: var(--ink-soft); letter-spacing: .06em; }
.reading-head .chart-label { font-family: var(--display); font-style: italic; color: var(--pink-deep); margin-right: .8em; }
.reading-head .meta { font-size: .78rem; margin-top: 4px; }
.positions caption { font-size: .82rem; color: var(--ink-soft); }
.wheel-legend i.ln { height: 0; border-radius: 0; background: none; border-top: 1.5px solid var(--ink); }
.wheel-legend i.ln.dash { border-top-style: dashed; }

/* 星図のボックスだけ、紙の繊維とかすれのテクスチャ */
.wheel-wrap {
  background-color: var(--card);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.018' numOctaves='4' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .4 0 0 0 0 .26 0 0 0 .55 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .18 0 0 0 9 -7.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E"),
    var(--grain),
    radial-gradient(ellipse at 30% 20%, #fdf9f1, #efe4cf 95%);
}

/* 有料部分の区切り（noteのように「ここから先は有料」→「続きを読む」） */
.seal .paywall-line { display: flex; align-items: center; gap: 16px; margin: 0 0 8px; color: var(--ink); font-family: var(--heading); font-size: .95rem; letter-spacing: .12em; }
.seal .paywall-line::before, .seal .paywall-line::after { content: ""; flex: 1; border-top: 1px dashed var(--ink); opacity: .5; }
.seal .btn .btn-price { font-family: var(--display); margin-left: .6em; padding-left: .7em; border-left: 1px solid rgba(251,246,236,.45); }
.seal .tax-note { font-size: .74rem; margin-top: 8px; }
.seal .toc { margin-bottom: 24px; }

/* ===== ホロスコープでわかること（用語） ===== */
.glossary { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.glossary > div { background: var(--card); border: 1px solid var(--ink); border-radius: var(--radius); padding: 24px 24px 24px; }
.glossary dt { font-family: var(--heading); font-size: 1.05rem; letter-spacing: .1em; display: flex; align-items: center; gap: 8px; }
.glossary dt .gi { width: 38px; height: 38px; flex: none; margin: -8px 0; filter: url(#inky); }
.glossary dd { margin: 8px 0 0; color: var(--ink-soft); font-size: .88rem; line-height: 1.8; }
@media (max-width: 900px) { .glossary { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .glossary { grid-template-columns: 1fr; } }

/* ===== よくあるご質問 ===== */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 16px; }
.faq details { background: var(--card); border: 1px solid var(--ink); border-radius: 18px; }
.faq details[open] { box-shadow: 3px 3px 0 var(--ink); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 56px 16px 24px; font-family: var(--heading); letter-spacing: .06em; line-height: 1.6; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; line-height: 24px; text-align: center; border: 1px solid var(--ink); border-radius: 50%; background: var(--mustard-soft); font-family: var(--display); }
.faq details[open] summary::after { content: "−"; background: var(--pink); }
.faq details p { margin: 0; padding: 0 24px 24px; color: var(--ink-soft); font-size: .92rem; line-height: 1.9; }

/* 章ごとの「こんな占いをお探しの方に」タグ */
.menu-list p.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.menu-list p.tags span { font-size: .74rem; letter-spacing: .04em; color: var(--ink); background: var(--paper); border: 1px solid var(--ink); border-radius: 999px; padding: 4px 8px; line-height: 1.8; }

/* 料金（「料金を見る」を押したときだけ表示） */
#menu .price-tag, #menu .price-note { display: none; }
#menu.show-prices .price-tag, #menu.show-prices .price-note { display: block; }
.menu-list p.price-tag { margin: 4px 0 4px; font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--ink); }
.menu-list p.price-tag span { font-weight: 400; font-size: .72rem; color: var(--ink-soft); margin-left: 4px; }
.section-head p.price-note { font-size: .84rem; margin-top: 8px; }
.price-toggle { font: inherit; font-size: .84rem; letter-spacing: .1em; color: var(--ink); background: var(--card); border: 1px solid var(--ink); border-radius: 999px; padding: 4px 24px; margin-top: 16px; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.price-toggle:hover { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }

/* 鑑定文を待つあいだの表示 */
.scrying .scrying-step { animation: stepfade 4.5s ease-in-out infinite; }
.scrying .scrying-note { margin-top: 8px; font-size: .8rem; letter-spacing: .06em; opacity: .75; }
.scrying .scrying-warn { max-width: 30em; margin: 16px auto 0; padding: 16px 16px; border: 1px solid var(--ink); border-radius: 12px; background: var(--card); color: var(--ink); font-size: .82rem; letter-spacing: .04em; line-height: 1.8; text-align: left; }
.stream-cut { text-align: center; margin: 24px 0; }
.stream-cut p { margin: 0 0 16px; font-size: .9rem; }
@keyframes stepfade { 0%, 100% { opacity: .35; } 20%, 80% { opacity: 1; } }

/* PDFで保存 */
.save-pdf { text-align: center; margin: 40px 0 4px; }
.save-pdf .hint { font-size: .78rem; color: var(--ink-soft); margin: 8px 0 0; }

@media print {
  @page { size: A4; margin: 16mm 18mm; }
  body[data-print] { background: #fff !important; }
  body[data-print] > *:not(main), body[data-print] main > *:not(.book), body[data-print] .book > *:not(.print-target),
  body[data-print] .save-pdf, body[data-print] .form-actions, body[data-print] .pattern-band { display: none !important; }
  body[data-print] .print-target { box-shadow: none !important; border: none !important; background: #fff !important; padding: 0 !important; margin: 0 !important; }
  body[data-print] .print-target::before { content: "星詠みの書　鑑定書"; display: block; font-size: 9pt; letter-spacing: .2em; color: #777; margin-bottom: 10mm; }
  html[lang=en] body[data-print] .print-target::before { content: "Liber Astrorum — Your Reading"; letter-spacing: .08em; }
  body[data-print] .prose { font-size: 10.5pt; line-height: 1.95; }
  body[data-print] .prose h2, body[data-print] .prose h3 { break-after: avoid; }
  body[data-print] .prose p { orphans: 3; widows: 3; }
  body[data-print] * { animation: none !important; transition: none !important; }
  body[data-print] .intro, body[data-print] [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* シェア（PDF保存の下。押すと X / LINE を選べる） */
.save-pdf .share { margin-top: 24px; }
.share-toggle { font: inherit; font-size: .84rem; letter-spacing: .1em; color: var(--ink); background: none; border: none; cursor: pointer; padding: 4px 8px; border-bottom: 1px dashed var(--ink-soft); }
.share-toggle::before { content: "↗"; margin-right: 8px; }
.share-menu { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.share-menu[hidden] { display: none; }
.share-btn { font-size: .82rem; letter-spacing: .08em; color: var(--ink); text-decoration: none; background: var(--card); border: 1px solid var(--ink); border-radius: 999px; padding: 8px 24px; box-shadow: 2px 2px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.share-btn:hover { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.share-btn.line::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #06c755; border: 1px solid var(--ink); margin-right: 8px; vertical-align: 1px; }
@media print { .share { display: none !important; } }

/* 端末についての注意（購入前・読了後） */
.device-note { font-size: .78rem; line-height: 1.75; color: var(--ink-soft); text-align: left; background: var(--paper); border: 1px dashed var(--ink-soft); border-radius: 12px; padding: 8px 16px; margin: 16px auto 0; max-width: 34em; }
.device-note strong { color: var(--ink); font-weight: 600; }
.save-pdf .device-note { margin-bottom: 16px; }
@media print { .device-note { display: none !important; } }

/* 保存用リンク */
.restore-link { max-width: 34em; margin: 24px auto 0; text-align: left; }
.restore-link .label { font-size: .82rem; letter-spacing: .08em; margin: 0 0 8px; font-family: var(--heading); }
.restore-link .row { display: flex; gap: 8px; }
.restore-link input { flex: 1; min-width: 0; font-size: .78rem; padding: 8px 8px; border: 1px solid var(--ink); border-radius: 10px; background: var(--paper); color: var(--ink-soft); }
.restore-link .btn-copy { font: inherit; font-size: .8rem; padding: 8px 16px; border: 1px solid var(--ink); border-radius: 999px; background: var(--card); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); white-space: nowrap; }
.restore-link .hint { font-size: .76rem; color: var(--ink-soft); margin: 8px 0 0; line-height: 1.7; }
.restore-note { font-size: .86rem; line-height: 1.8; background: var(--mustard-soft); border: 1px solid var(--ink); border-radius: 14px; padding: 16px 16px; margin: 8px 0 16px; }
@media print { .restore-link { display: none !important; } }

/* 章の一覧（星図ページ） */
.chapter-index li, .menu-list.chapter-index li { display: block; padding: 0; }
.chapter-index li > a { height: 100%; display: grid; grid-template-columns: 84px 1fr; gap: 24px; align-items: center; padding: 24px 24px; color: inherit; text-decoration: none; border-radius: inherit; }
.chapter-index li:hover { box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); transition: transform .15s, box-shadow .15s; }
.chapter-index .status { margin-top: 8px; font-size: .8rem; letter-spacing: .06em; color: var(--ink); }
.chapter-index .status::after { content: " →"; }
.chapter-index .status.owned { color: var(--cobalt-text); font-weight: 600; }
@media (max-width: 640px) { .chapter-index li > a { grid-template-columns: 64px 1fr; gap: 16px; padding: 16px; } }

/* 章のページ */
body.chapter-mode #chart, body.chapter-mode .chart-grid, body.chapter-mode .pattern-band { display: none; }
.chapter-back { max-width: 880px; margin: 0 auto 16px; font-size: .88rem; }
.chapter-back a, .chapter-nav a { color: var(--ink); text-decoration: none; border-bottom: 1px dashed var(--ink-soft); }
.chapter-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin: 8px 0 40px; font-size: .86rem; }
.chapter-nav .next { justify-self: end; text-align: right; }
.chapter-nav .all { justify-self: center; }
@media (max-width: 640px) { .chapter-nav { grid-template-columns: 1fr 1fr; } .chapter-nav .all { grid-column: 1 / -1; grid-row: 2; } }
@media print { .chapter-back, .chapter-nav { display: none !important; } }

/* トップの章カード（リンク） */
#menuList li { display: block; padding: 0; }
#menuList a.ch-link { height: 100%; display: grid; grid-template-columns: 84px 1fr; gap: 24px; align-items: center; padding: 24px 24px; color: inherit; text-decoration: none; border-radius: inherit; }
#menuList li:hover { box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); transition: transform .15s, box-shadow .15s; }
#menuList .go { margin-top: 8px; font-size: .8rem; letter-spacing: .06em; color: var(--ink); }
@media (max-width: 640px) { #menuList a.ch-link { grid-template-columns: 64px 1fr; gap: 16px; padding: 16px; } }

/* 章のページの一番上：誕生の記録 */
.birth-top { max-width: 760px; margin: 0 auto 40px; }
.birth-top .form-intro strong { color: var(--ink); }
.chapter-peek { max-width: 760px; margin: 0 auto 64px; }
.chapter-peek .hint { font-size: .82rem; color: var(--ink-soft); margin-top: 16px; }
.birth-bar { max-width: 880px; margin: 0 auto 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; background: var(--card); border: 1px solid var(--ink); border-radius: 18px; padding: 16px 16px; }
.birth-bar p { margin: 0; font-size: .9rem; }
.birth-bar .label { display: block; font-size: .72rem; letter-spacing: .1em; color: var(--ink-soft); }
.birth-bar .btn-copy { font: inherit; font-size: .8rem; padding: 8px 16px; border: 1px solid var(--ink); border-radius: 999px; background: var(--paper); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.birth-bar-form { flex-basis: 100%; }
.birth-bar-form .birth-top { margin: 16px 0 4px; box-shadow: none; }
@media print { .birth-bar { display: none !important; } }
.partner-bar { margin-top: -16px; }
.partner-bar.open { display: block; background: none; border: none; padding: 0; }
.partner-bar.open .birth-top { margin: 0 auto 32px; box-shadow: 5px 5px 0 var(--ink); }
.birth-bar .bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 相性の章：ふたりの関係 */
.relation-choice { flex-basis: 100%; border: 0; margin: 0 0 8px; padding: 0; }
.relation-choice legend { font-size: .72rem; letter-spacing: .1em; color: var(--ink-soft); padding: 0; }
.relation-choice .hint { margin: 4px 0 8px; font-size: .78rem; color: var(--ink-soft); }
.relation-choice .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.relation-choice .chip { position: relative; cursor: pointer; }
.relation-choice .chip input { position: absolute; opacity: 0; pointer-events: none; }
.relation-choice .chip span { display: inline-flex; flex-direction: column; align-items: center; padding: 8px 16px; border: 1px solid var(--ink); border-radius: 999px; background: var(--paper); font-size: .85rem; line-height: 1.3; }
.relation-choice .chip small { font-size: .66rem; color: var(--ink-soft); }
.relation-choice .chip input:checked + span { background: var(--ink); color: var(--paper); box-shadow: 2px 2px 0 var(--mustard); }
.relation-choice .chip input:checked + span small { color: var(--paper); opacity: .8; }
.relation-choice .chip input:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 2px; }

/* よくある質問 */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 16px; }
.faq details { background: var(--card); border: 1px solid var(--ink); border-radius: 14px; padding: 0 24px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; position: relative; font-family: var(--heading); font-weight: 500; letter-spacing: .06em; line-height: 1.6; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-family: var(--display); font-size: 1.3rem; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 16px; color: var(--ink-soft); line-height: 1.9; }

/* 読み方ガイド */
.guide .crumbs { font-size: .85rem; color: var(--ink-soft); margin: 0 0 8px; }
.guide .updated { text-align: center; font-size: .85rem; color: var(--ink-soft); margin: 4px 0 16px; }
.guide .toc-box { border: 1px dashed var(--ink-faint); border-radius: 12px; padding: 16px 16px; margin: 16px 0; }
.guide .toc-box p { margin: 0 0 4px; font-weight: 700; }
.guide .toc-box ol { margin: 0; padding-left: 1.4em; line-height: 1.9; }
.guide p { line-height: 1.95; }
.guide table th { width: 34%; }
.guide .guide-cta { text-align: center; margin: 32px 0 8px; }

/* 枠の中のリンク色（青）がボタンの文字に移らないように */
.folio a.btn { color: var(--paper); }

/* X「今日の星便り」の案内 */
.x-cta { margin-top: 24px !important; }
.x-cta .btn { gap: 8px; }
.x-logo { width: 18px; height: 18px; }

/* 章のイラスト：絵ごとに見た目の重心がずれているので、左右・上下の余白が同じになるよう少しずつ動かす（実測値） */
.numeral.mark:has(use[href="#m-chBasic"]) { translate: -3.2% -2%; }
.numeral.mark:has(use[href="#m-chNature"]) { translate: -4.2% 0; }
.numeral.mark:has(use[href="#m-chLove"]) { translate: 0 3.2%; }
.numeral.mark:has(use[href="#m-chWork"]) { translate: 0 2.4%; }
.numeral.mark:has(use[href="#m-chFamily"]) { translate: -3% 1%; }
.numeral.mark:has(use[href="#m-chYear"]) { translate: -1.7% 1%; }
.numeral.mark:has(use[href="#m-chDay"]) { translate: -1.6% 1%; }
.numeral.mark:has(use[href="#m-chCompat"]) { translate: -1.3% 7%; }
