/* 手相帳（d027）— 夜の占い館。藍×金の星図。
 *
 * 地は深い藍、線と数字は金。写真の上の金の線が主役なので、UI の色はこの2つ＋薄い白だけ。
 * 書体は明朝（占い館の看板の文字）。数字だけ細い明朝で大きく。
 */
:root {
  --navy: #0b1631;
  --navy-2: #101f45;
  --navy-3: #16295a;
  --ink: #eef0f6;
  --ink-2: #b9c0d6;
  --ink-3: #7f88a8;
  --gold: #e2c16a;
  --gold-2: #b8973f;
  --gold-soft: rgba(226, 193, 106, .18);
  --line: rgba(226, 193, 106, .28);
  --danger: #ff9a9a;
  --serif: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --max: 860px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--navy); color: var(--ink);
  font-family: var(--serif); font-size: 16px; line-height: 1.75; letter-spacing: .01em;
  min-height: 100dvh; position: relative;
}
a { color: var(--gold); }
b { font-weight: 600; }
[hidden] { display: none !important; }

/* 星空（画像なし。radial-gradient の点だけ） */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.9) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 8%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 60% 30%, rgba(226,193,106,.9) 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 55%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 45% 85%, rgba(226,193,106,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 90%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 72%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(ellipse at 50% -20%, var(--navy-3), var(--navy) 60%);
}

/* ---- ヘッダ ---- */
.head { max-width: var(--max); margin: 0 auto; padding: 18px 20px 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--gold); }
.brand .mark { width: 26px; height: 26px; align-self: center; }
.brand-ja { font-size: 20px; font-weight: 600; letter-spacing: .08em; }
.brand-en { font-size: 11px; letter-spacing: .3em; color: var(--ink-3); }
.headnav a { font-size: 13px; color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line); margin-left: 14px; }

main { max-width: var(--max); margin: 0 auto; padding: 8px 20px 48px; }
.view { animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

h1, h2, h3 { font-weight: 600; letter-spacing: .04em; margin: 0; }
.vt { font-size: 24px; margin: 18px 0 10px; }
.eyebrow { color: var(--gold); font-size: 12px; letter-spacing: .3em; margin: 20px 0 6px; }
h2 { font-size: 17px; margin-bottom: 8px; }
h2 small { font-size: 12px; color: var(--ink-3); font-weight: 400; margin-left: 8px; letter-spacing: 0; }
h3 { font-size: 15px; color: var(--gold); margin-bottom: 6px; }
h3 small { font-size: 11px; color: var(--ink-3); font-weight: 400; margin-left: 6px; }

/* ---- トップ ---- */
.hero h1 { font-size: clamp(26px, 5.6vw, 40px); line-height: 1.45; margin: 4px 0 14px; }
.hero em { font-style: normal; color: var(--gold); border-bottom: 2px solid var(--gold-2); }
.lede { color: var(--ink-2); max-width: 620px; margin: 0 0 22px; }

.steps { list-style: none; padding: 0; margin: 0 0 26px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.steps li { border: 1px solid var(--line); border-radius: 10px; padding: 14px 12px; display: grid; gap: 2px; background: rgba(255,255,255,.02); }
.steps .no { color: var(--gold); font-size: 22px; line-height: 1; }
.steps b { font-size: 16px; }
.steps span:not(.no) { font-size: 12.5px; color: var(--ink-2); }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .steps li { grid-template-columns: 34px 1fr; grid-template-areas: "no b" "no s"; align-items: center; } .steps .no { grid-area: no; } .steps b { grid-area: b; } .steps span:not(.no) { grid-area: s; } }

.card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)); }
.cta { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; margin-bottom: 30px; }
@media (max-width: 640px) { .cta { grid-template-columns: 1fr; } }
.cta .sub { color: var(--ink-2); font-size: 13.5px; margin: 0 0 12px; }
.lbl { display: block; font-size: 12px; color: var(--ink-3); letter-spacing: .1em; margin: 8px 0 4px; }
.row { display: flex; gap: 8px; }
input[type=text], select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: rgba(0,0,0,.25);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; outline: none; min-width: 0;
}
input[type=text]:focus, select:focus { border-color: var(--gold); }
select { appearance: none; -webkit-appearance: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 15px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--gold); cursor: pointer; text-decoration: none;
  white-space: nowrap; letter-spacing: .06em; transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn.gold { background: var(--gold); color: var(--navy); font-weight: 600; }
.btn.gold:hover { background: #efd27f; }
.btn.gold:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--gold); }
.btn.ghost:hover { background: var(--gold-soft); }
.btn.danger { border-color: rgba(255,154,154,.5); color: var(--danger); background: transparent; font-size: 13px; }
.btn.small { font-size: 13px; padding: 6px 12px; }
.btn.wide { width: 100%; margin-top: 14px; }

.how { margin: 8px 0 26px; }
.tips { padding-left: 1.2em; margin: 0 0 8px; color: var(--ink-2); }
.tips b { color: var(--ink); }
.note, .policy p { font-size: 13.5px; color: var(--ink-2); }
.policy { border-top: 1px solid var(--line); padding-top: 18px; }

/* ---- 読む ---- */
.room-in { color: var(--ink-2); font-size: 14px; margin: -4px 0 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 9px 6px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.seg input:checked + span { background: var(--gold-soft); color: var(--gold); }
.solo-hand { max-width: 220px; margin: 0 0 12px; }

.drop {
  margin-top: 14px; position: relative; border: 1px dashed var(--gold-2); border-radius: 14px; min-height: 220px;
  display: grid; place-items: center; cursor: pointer; overflow: hidden; background: rgba(0,0,0,.25); outline: none;
}
.drop:focus-visible { border-style: solid; }
.drop img { width: 100%; max-height: 62vh; object-fit: contain; display: block; }
.dropinner { text-align: center; padding: 30px 12px; }
.dropicon { font-size: 40px; line-height: 1; margin-bottom: 8px; }
.droptext b { display: block; font-size: 16px; }
.droptext span { font-size: 12.5px; color: var(--ink-3); }
.drop.has img + .dropinner { position: absolute; bottom: 8px; right: 8px; padding: 6px 10px; background: rgba(11,22,49,.8); border-radius: 8px; font-size: 12px; }
.drop.has .dropicon { display: none; }
.tips-inline { font-size: 12.5px; color: var(--ink-3); margin: 8px 0 0; text-align: center; }
.progress { text-align: center; color: var(--gold); font-size: 14px; margin: 12px 0 0; }
.twinkle { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: 8px; animation: tw 1.1s infinite ease-in-out; }
@keyframes tw { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.2); } }
.err { color: var(--danger); font-size: 14px; margin: 10px 0 0; }
.err.global { margin-top: 20px; }

/* ---- 結果 ---- */
.result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.result-meta { color: var(--ink-3); font-size: 13px; margin: 0; }
.retake { border-color: rgba(255,154,154,.5); margin: 10px 0 18px; }
.retake ul { margin: 6px 0 12px; padding-left: 1.2em; color: var(--ink-2); }

.chart { margin: 8px 0 22px; }
.chart { text-align: center; }
.chartbox { position: relative; display: inline-block; max-width: 100%; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.chartbox img { display: block; max-width: 100%; max-height: 78vh; width: auto; height: auto; }
.chartbox svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.chart figcaption { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; text-align: left; }

.obs { margin-bottom: 24px; }
.obs-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.obs-list li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; border-top: 1px solid var(--line); padding: 8px 0; }
.obs-list .n { width: 26px; height: 26px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-size: 13px; display: grid; place-items: center; }
.obs-list .n.none { border-color: var(--ink-3); color: var(--ink-3); }
.obs-list .lname { font-weight: 600; margin-right: 6px; }
.obs-list .what { font-size: 12px; color: var(--ink-3); }
.obs-list .feat { font-size: 14px; color: var(--ink-2); }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-3); margin-left: 6px; vertical-align: middle; }
.tag.inf { border-color: var(--gold-2); color: var(--gold); }

.reading .topic { margin-bottom: 16px; }
.reading .topic h3 { border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.reading .none { color: var(--ink-3); font-size: 13.5px; }
.rd { margin: 8px 0 0; padding-left: 12px; border-left: 2px solid var(--gold-2); }
.rd p { margin: 0; }
.rd .ev { font-size: 12.5px; color: var(--ink-3); }
.headline-line { margin-top: 18px; color: var(--ink-2); }
.headline-line b { color: var(--gold); font-size: 18px; }
.after { margin-top: 20px; display: grid; gap: 10px; justify-items: start; }
.after p { margin: 0; color: var(--ink-2); }

/* ---- 帳 ---- */
.room-head { margin-bottom: 14px; }
.room-lede { color: var(--ink-2); margin: 4px 0 14px; max-width: 560px; }
.room-actions { display: grid; gap: 10px; margin-top: 10px; max-width: 420px; }
.room-actions .btn.huge { width: 100%; }
.room-owner { font-size: 12.5px; color: var(--ink-3); margin: 8px 0 0; }
.empty { color: var(--ink-2); font-size: 14px; }
.compat-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0; font-size: 13.5px; color: var(--ink-2); }
.entries { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.entry { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.03); cursor: pointer; transition: border-color .15s; }
.entry:hover { border-color: var(--gold-2); }
.entry.picked { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }
.entry .ph { aspect-ratio: 1; background: #000; display: block; width: 100%; object-fit: cover; }
.entry .meta { padding: 8px 10px 10px; }
.entry .nm { font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.entry .mb { font-size: 11px; color: var(--gold); letter-spacing: .1em; }
.entry .hl { font-size: 12px; color: var(--ink-2); }
.entry .hd { font-size: 11px; color: var(--ink-3); }
.entry .pick { position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--gold); background: rgba(11,22,49,.85); color: var(--gold); font-size: 13px; display: grid; place-items: center; }
.entry .star { position: absolute; top: 8px; right: 8px; color: var(--gold); font-size: 14px; }

.compat { margin: 10px 0 6px; }
.compat-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .compat-cols { grid-template-columns: 1fr; } }
.compat ul { margin: 4px 0 0; padding-left: 1.1em; font-size: 14px; color: var(--ink-2); }
.compat .axes { font-size: 13px; color: var(--ink-3); margin: 0; }
.compat .stars { color: var(--gold); letter-spacing: .15em; margin: 0; font-size: 18px; }
.compat .overall { border-top: 1px solid var(--line); margin: 14px 0 0; padding-top: 10px; color: var(--ink); }

/* ---- フッタ ---- */
.foot { border-top: 1px solid var(--line); margin-top: 20px; }
.foot-in { max-width: var(--max); margin: 0 auto; padding: 16px 20px 28px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
#portal-badge { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; text-decoration: none; color: var(--gold); }

/* ==== トップ（再設計 2026-09-08 午後）: 左に「何が出るか」を実物で、右に「今やること」を1つ ==== */
.hero2 { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; align-items: center; margin: 10px 0 34px; }
@media (max-width: 760px) { .hero2 { grid-template-columns: 1fr; gap: 14px; } .hero2 .demo { order: 2; } }
.demo { position: relative; padding: 8px 0 0; }
.demo .palm { width: 100%; max-width: 320px; display: block; margin: 0 auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,.35)); }
.demo .ln { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.4s ease-out forwards; }
.demo .l1 { animation-delay: .3s; } .demo .l2 { animation-delay: .8s; } .demo .l3 { animation-delay: 1.3s; } .demo .l4 { animation-delay: 1.8s; }
.demo .n { opacity: 0; animation: pop .4s ease-out forwards; }
.demo .n1 { animation-delay: 1.3s; } .demo .n2 { animation-delay: 1.8s; } .demo .n3 { animation-delay: 2.3s; } .demo .n4 { animation-delay: 2.8s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.demo-card {
  position: absolute; max-width: 230px; background: rgba(11,22,49,.9); backdrop-filter: blur(4px); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px 9px 40px; font-size: 13px; line-height: 1.5; box-shadow: 0 10px 30px rgba(0,0,0,.35);
  opacity: 0; animation: pop .5s ease-out forwards;
}
.demo-card p { margin: 0; color: var(--ink); }
.demo-card small { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 2px; }
.demo-card .dc-n { position: absolute; left: 10px; top: 10px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); font-size: 12px; display: grid; place-items: center; }
.demo-card.c1 { left: 0; top: 74%; animation-delay: 2.2s; }
.demo-card.c2 { right: 0; top: 6%; animation-delay: 2.7s; }
@media (max-width: 760px) { .demo-card { position: static; max-width: none; margin: 8px 0 0; } .demo-card.c1, .demo-card.c2 { animation-delay: 2.2s; } }
.demo-tag { position: static; margin: 4px 0 0; text-align: center; font-size: 12px; color: var(--ink-3); opacity: 0; animation: pop .5s 3.2s ease-out forwards; }
@media (max-width: 760px) { .demo-tag { position: static; margin-top: 6px; } }
@media (prefers-reduced-motion: reduce) { .demo .ln, .demo .n, .demo-card, .demo-tag { animation: none; opacity: 1; stroke-dashoffset: 0; } }

.pitch h1 { font-size: clamp(26px, 3.9vw, 34px); line-height: 1.42; margin: 4px 0 12px; white-space: nowrap; }
@media (max-width: 400px) { .pitch h1 { white-space: normal; } }
.pitch .lede { margin-bottom: 18px; }
.btn.huge { font-size: 19px; padding: 16px 30px; width: 100%; box-shadow: 0 12px 34px rgba(226,193,106,.25); }
.pitch .under { font-size: 12.5px; color: var(--ink-3); margin: 10px 0 0; }
.team { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.team-txt { display: grid; gap: 2px; margin-bottom: 10px; }
.team-txt span { font-size: 13px; color: var(--ink-2); }
.team .row .btn { padding: 10px 16px; }

.flow { list-style: none; padding: 0; margin: 0 0 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .flow { grid-template-columns: 1fr; } }
.flow li { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: rgba(255,255,255,.025); display: grid; gap: 4px; }
.flow .pic { margin: -4px 0 6px; }
.flow .pic svg { width: 100%; height: 96px; display: block; }
.flow b { font-size: 16px; }
.flow span { font-size: 13px; color: var(--ink-2); }

.empty { padding: 14px 16px; }
.empty-grid { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.empty-grid p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.mini-palm { width: 120px; height: 164px; display: block; }
@media (max-width: 480px) { .empty-grid { grid-template-columns: 1fr; } .mini-palm { margin: 0 auto; } }

/* ==== 演出（2026-09-08 午後）==== */
canvas.stars { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.sky { z-index: -2; }
canvas.scan { position: absolute; pointer-events: none; z-index: 2; }
@keyframes ov-draw { to { stroke-dashoffset: 0; } }
@keyframes ov-fade { to { opacity: 1; } }
.entries .entry { opacity: 0; animation: pop .45s ease-out forwards; transition: transform .18s ease, border-color .15s ease, box-shadow .18s ease; }
.entries .entry:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.entries .entry.picked { box-shadow: 0 0 0 2px var(--gold-soft), 0 0 28px rgba(226,193,106,.28); }
.entries .entry:nth-child(1) { animation-delay: .05s } .entries .entry:nth-child(2) { animation-delay: .12s } .entries .entry:nth-child(3) { animation-delay: .19s }
.entries .entry:nth-child(4) { animation-delay: .26s } .entries .entry:nth-child(5) { animation-delay: .33s } .entries .entry:nth-child(n+6) { animation-delay: .4s }
.btn.huge { position: relative; overflow: hidden; }
.btn.huge::after { content: ""; position: absolute; top: -40%; left: -60%; width: 40%; height: 180%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); animation: shine 3.6s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .entries .entry { animation: none; opacity: 1; } .btn.huge::after { animation: none; } }

/* ==== トップ再構成（2026-09-08 夕方）: 左に動かない舞台、右に流れる物語。中央寄せをやめる ==== */
body.is-top main { max-width: none; padding: 0; }
body.is-top .head { max-width: none; position: absolute; left: 0; right: 0; top: 0; z-index: 5; }
body.is-top .foot { display: none; }
.split { display: grid; grid-template-columns: 58% 42%; min-height: 100vh; }
.stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.handwrap { position: absolute; left: 20vw; top: 6vh; height: 88vh; aspect-ratio: 300 / 410; }
.bighand { position: absolute; inset: 0; width: 100%; height: 100%; }
.bighand .hand { transition: opacity .6s ease; }
.bighand .frame { opacity: 0; transition: opacity .4s ease; }
.bighand .scanline { animation: scan-y 2.6s ease-in-out infinite alternate; }
@keyframes scan-y { from { transform: translateY(0); } to { transform: translateY(330px); } }
.bighand .ln { stroke-dasharray: 400; stroke-dashoffset: 400; }
.bighand .n { opacity: 0; }
.pin { position: absolute; max-width: 260px; background: rgba(11,22,49,.9); backdrop-filter: blur(4px); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 10px 42px; font-size: 13.5px; line-height: 1.5; box-shadow: 0 10px 30px rgba(0,0,0,.35); opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; }
.pin p { margin: 0; } .pin small { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 2px; }
.pin .pn { position: absolute; left: 11px; top: 11px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); font-size: 12px; display: grid; place-items: center; }
.pin-a { left: -6%; top: 76%; } .pin-b { left: -4%; top: 30%; }
.ledger { position: absolute; left: 14%; width: 64%; bottom: 10%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.lcard { border: 1px solid var(--line); border-radius: 12px; background: rgba(11,22,49,.85); backdrop-filter: blur(4px); padding: 10px; display: grid; gap: 2px; }
.lcard svg { width: 100%; height: 110px; }
.lcard b { font-size: 15px; } .lcard span { font-size: 12px; color: var(--ink-2); }
.lmatch { grid-column: 1 / -1; font-size: 13px; color: var(--gold); border-top: 1px solid var(--line); padding-top: 8px; }
.titleblock { position: absolute; left: 1.5vw; top: 9vh; pointer-events: none; display: flex; gap: 10px; }
.tb-en { writing-mode: vertical-rl; font-size: 11px; letter-spacing: .5em; color: var(--ink-3); margin-top: 6px; }
.tb-ja { writing-mode: vertical-rl; font-size: clamp(56px, 6.2vw, 92px); line-height: 1; letter-spacing: .12em; color: var(--gold); font-weight: 600; text-shadow: 0 10px 40px rgba(0,0,0,.5); margin: 0; }

/* 段ごとの見え方 */
.stage[data-step="1"] .frame { opacity: 1; }
.stage[data-step="2"] .ln, .stage[data-step="3"] .ln { animation: draw 1.2s ease-out forwards; }
.stage[data-step="2"] .l2, .stage[data-step="3"] .l2 { animation-delay: .35s; } .stage[data-step="2"] .l3, .stage[data-step="3"] .l3 { animation-delay: .7s; } .stage[data-step="2"] .l4, .stage[data-step="3"] .l4 { animation-delay: 1.05s; }
.stage[data-step="2"] .n, .stage[data-step="3"] .n { animation: pop .4s ease-out forwards; }
.stage[data-step="2"] .n1 { animation-delay: 1s; } .stage[data-step="2"] .n2 { animation-delay: 1.3s; } .stage[data-step="2"] .n3 { animation-delay: 1.6s; } .stage[data-step="2"] .n4 { animation-delay: 1.9s; }
.stage[data-step="2"] .pin { opacity: 1; transform: none; } .stage[data-step="2"] .pin-b { transition-delay: .3s; }
.stage[data-step="3"] .hand { opacity: .25; } .stage[data-step="3"] .lines, .stage[data-step="3"] .nums { opacity: .35; }
.stage[data-step="3"] .ledger { opacity: 1; transform: none; }
.stage[data-step="3"] .titleblock { opacity: .25; }

.story { padding: 18vh 6vw 30vh 4vw; }
.chapter { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; border-top: 1px solid var(--line); padding: 8vh 0; }
.chapter.ch0 { border-top: 0; min-height: 82vh; }
.chapter.last { min-height: 30vh; }
.chno { color: var(--gold); font-size: 13px; letter-spacing: .4em; margin-bottom: 8px; }
.chapter h2 { font-size: 30px; margin-bottom: 10px; }
.chapter h2.big { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.35; margin: 4px 0 16px; }
.chapter h2.small { font-size: 18px; }
.chapter h2 em { font-style: normal; color: var(--gold); border-bottom: 2px solid var(--gold-2); }
.chapter p { margin: 0 0 8px; max-width: 460px; }
.chapter .sub { font-size: 13.5px; color: var(--ink-2); }
.chapter .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 14px; }
.chapter .row { max-width: 460px; margin: 6px 0 10px; }
.btn.float { position: fixed; right: 3vw; bottom: 4vh; z-index: 6; width: auto; padding: 16px 28px; }

@media (max-width: 820px) {
  /* ==== スマホ（2026-09-08 夕方、本人「スマホのデザインがダメ」）====
     最初の1画面は縦書き題字も舞台も使わず、手・約束・ボタンを1枚に。以降は短い章を詰めて流す。
     浮くボタンは最初の1画面を過ぎてから出す（本文を隠さない） */
  body.is-top .head { position: static; padding: 14px 20px 0; }
  .split { grid-template-columns: 1fr; }
  .stage { display: none; }
  .chapter.ch0 { display: none; }
  .m-hero { display: block; padding: 8px 22px 6px; text-align: left; }
  .m-hand { display: block; width: 62%; max-width: 250px; margin: 0 0 6px 30%; }
  .m-hero .eyebrow { margin: 0 0 4px; }
  .m-hero h1 { font-size: 26px; line-height: 1.42; margin: 0 0 10px; }
  .m-hero h1 em { font-style: normal; color: var(--gold); border-bottom: 2px solid var(--gold-2); }
  .m-hero .lede { font-size: 14px; margin: 0 0 14px; }
  .m-cta { width: 100%; }
  .m-sub { font-size: 12px; color: var(--ink-3); text-align: center; margin: 8px 0 0; }
  .story { padding: 10px 22px 40px; }
  .chapter { min-height: 0; padding: 20px 0; border-top: 1px solid var(--line); display: block; }
  .chapter.facts { padding-top: 22px; }
  .chno { display: inline-block; margin: 0 8px 0 0; font-size: 12px; }
  .chapter h2 { display: inline; font-size: 19px; }
  .chapter h2.small { display: block; font-size: 16px; margin-bottom: 6px; }
  .chapter p { margin: 8px 0 0; font-size: 14px; }
  .chapter .sub { font-size: 12.5px; }
  .chapter .hint { display: none; }
  .three { gap: 8px; margin-bottom: 16px; }
  .three b { font-size: 14.5px; } .three span { font-size: 12.5px; }
  .what { font-size: 12.5px; } .what th, .what td { padding: 6px 8px 6px 0; }
  .what td:nth-child(2) { display: none; }
  .chapter .row { margin: 10px 0 8px; }
  .chapter.last { padding-bottom: 8px; }
  .btn.float { left: auto; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: auto; padding: 12px 20px; font-size: 15px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease; }
  body.is-top.scrolled .btn.float { opacity: 1; pointer-events: auto; transform: none; }
}
@media (min-width: 821px) { .m-hero { display: none; } }
}
}

/* わかること（2026-09-08 夕方、本人の質問から） */
.chapter.facts { min-height: 0; }
.three { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; max-width: 520px; }
.three li { display: grid; gap: 2px; border-left: 2px solid var(--gold-2); padding-left: 12px; }
.three b { font-size: 16px; }
.three span { font-size: 13px; color: var(--ink-2); }
.what { border-collapse: collapse; width: 100%; max-width: 560px; font-size: 13px; margin: 6px 0 10px; }
.what th, .what td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-top: 1px solid var(--line); }
.what th { color: var(--gold); white-space: nowrap; font-weight: 600; width: 6.5em; }
.what td:nth-child(2) { color: var(--ink-3); width: 38%; }
@media (max-width: 820px) { .what td:nth-child(2) { display: none; } }

.obs-list .measured { font-size: 12px; color: var(--gold-2); margin-top: 2px; }
.obs-list .measured::before { content: "◆ "; }

.note-fine { font-size: 12.5px; color: var(--ink-3); margin: -2px 0 12px; }

/* ==== 詳細（結果）ページの組み直し（2026-09-08 夕方、本人「詳細ページもおしゃれに」）==== */
.rgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; align-items: start; }
.rleft { position: sticky; top: 16px; }
.rleft .chart { margin: 8px 0 12px; }
.plate { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: linear-gradient(180deg, rgba(226,193,106,.08), rgba(226,193,106,.02)); display: grid; gap: 2px; }
.plate-k { font-size: 11px; letter-spacing: .3em; color: var(--ink-3); }
.plate b { font-size: 20px; color: var(--gold); letter-spacing: .04em; line-height: 1.4; }
.rright { display: grid; gap: 16px; }
.gauges h2 { margin-bottom: 10px; }
.gauge { display: grid; grid-template-columns: 8.5em 4.5em 1fr 4.5em; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.gauge:first-child { border-top: 0; }
.g-name { color: var(--ink); font-weight: 600; }
.g-lo { color: var(--ink-3); text-align: right; font-size: 12px; }
.g-hi { color: var(--ink-3); font-size: 12px; }
.g-dots { display: flex; gap: 6px; align-items: center; justify-content: space-between; position: relative; padding: 0 2px; }
.g-dots::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 1px; background: var(--line); }
.g-dots i { position: relative; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--gold-2); background: var(--navy); }
.g-dots i.on { width: 15px; height: 15px; background: var(--gold); border-color: var(--gold); box-shadow: 0 0 14px rgba(226,193,106,.6); }
.g-val { grid-column: 1 / -1; font-size: 11.5px; color: var(--gold-2); margin-top: -4px; }
.topic.card { padding: 16px 18px; }
.topic-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.topic-head .roman { font-size: 26px; color: var(--gold); line-height: 1; letter-spacing: .05em; }
.topic-head h3 { margin: 0; color: var(--ink); font-size: 15px; letter-spacing: .12em; }
.reading .rd { border-left: 0; padding-left: 0; margin: 6px 0 0; }
.reading .rd.core p:first-child { font-size: 17px; line-height: 1.7; color: var(--ink); }
.reading .rd:not(.core) { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 10px; }
.reading .rd:not(.core) p:first-child { font-size: 14px; color: var(--ink-2); }
.reading .rd .ev { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
details.obs { border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; }
details.obs summary { cursor: pointer; padding: 10px 0; font-weight: 600; list-style: none; display: flex; align-items: baseline; gap: 8px; }
details.obs summary::-webkit-details-marker { display: none; }
details.obs summary::after { content: "＋"; margin-left: auto; color: var(--gold); }
details.obs[open] summary::after { content: "－"; }
details.obs summary small { font-size: 12px; color: var(--ink-3); font-weight: 400; }
details.obs .obs-list { padding-bottom: 8px; }
.rgrid .after { margin-top: 4px; }
@media (max-width: 820px) {
  .rgrid { grid-template-columns: 1fr; gap: 14px; }
  .rleft { position: static; }
  .gauge { grid-template-columns: 4.5em 1fr 4.5em; font-size: 12.5px; }
  .g-name { grid-column: 1 / -1; }
  .g-lo { text-align: left; }
  .g-dots { min-width: 0; }
  .topic-head .roman { font-size: 22px; }
  .reading .rd.core p:first-child { font-size: 16px; }
}

.chapter .hint { display: block; }
@media (max-width: 820px) { .chapter .hint { display: none; } }

/* ===================== d031: 棚・配る・人に聞く・広告枠 ===================== */

/* --- トップの棚（静的HTML。検索に載る実体はここだけ） --- */
.shelf-static { max-width: 980px; margin: 0 auto; padding: 72px 20px 96px; }
.shelf-static > h2 { font-size: 28px; margin: 0 0 8px; }
.shelf-static > .sub { margin: 0 0 28px; color: var(--ink-2); }
.shelf-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shelf-grid article { border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: rgba(255,255,255,.02); }
.shelf-grid h3 { margin: 0 0 10px; font-size: 18px; color: var(--gold); }
.shelf-grid p { margin: 0; font-size: 14px; line-height: 1.85; color: var(--ink-2); }
@media (max-width: 760px) { .shelf-grid { grid-template-columns: 1fr; } .shelf-static { padding: 48px 16px 72px; } }

/* --- 札の問いの下に置くリード --- */
.topic-lead { margin: -2px 0 16px; font-size: 13px; color: var(--ink-3); }

/* --- ここから先は人に聞く --- */
.ask { margin-top: 22px; padding: 18px; border: 1px dashed var(--line); border-radius: 12px; background: rgba(0,0,0,.18); }
.ask-h { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); font-weight: 600; }
.ask-list { margin: 0; padding-left: 18px; }
.ask-list li { font-size: 13px; line-height: 1.9; color: var(--ink-3); }
.ask-pr { margin: 14px 0 6px; font-size: 11px; letter-spacing: .18em; color: var(--ink-3); }
.ask-go { margin-top: 4px; }
.ask-note { margin: 6px 0 14px; font-size: 12px; color: var(--ink-3); }

/* --- 1枚にして配る --- */
.share { margin-top: 24px; }
.share-h { margin: 0 0 4px; font-weight: 600; }
.share-photo { display: flex; align-items: center; gap: 8px; margin: 14px 0; font-size: 13px; color: var(--ink-2); }
.share-photo input { width: 16px; height: 16px; }

/* --- 広告枠。★高さを先に取る（入った瞬間に本文が飛ぶのを防ぐ） --- */
.ad { margin: 32px auto; max-width: 720px; }
.ad--rect { min-height: 280px; }
.ad--lb { min-height: 90px; }
/* ★タグを入れるまでは枠ごと消す。空の箱が5つ並ぶほうが、ずれるより悪い。
   <ins> を入れた瞬間に :empty でなくなり、上の min-height が効いて場所を先に取る */
.ad:empty { display: none; }
/* ★ボタンと広告を離す。誤タップを構造で防ぐ（Google のポリシー） */
.btn + .ad, .ad + .btn, .ad + .card, .card + .ad { margin-block: 40px; }
/* 読み取りを待っている間は広告を出さない（一番集中している場面） */
body.reading-busy .ad { display: none; }

/* --- 独立ページ（この画面と写真の扱い） --- */
.doc-page { background: var(--navy); }
.doc { max-width: 760px; margin: 0 auto; padding: 64px 20px 96px; }
.doc h1 { font-size: 30px; margin: 6px 0 4px; }
.doc h2 { font-size: 18px; margin: 40px 0 12px; color: var(--gold); }
.doc p, .doc li { font-size: 14px; line-height: 1.95; color: var(--ink-2); }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 8px; }
.doc-back { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }

/* d031: 左右の手の但し書き。geometry.js は hand を受け取るが使っていないので、
   「読み分ける」と書けない。実装がそう変わるまでこの1行を消さないこと */
.hand-note { margin: 8px 0 0; font-size: 12px; line-height: 1.7; color: var(--ink-3); }
.solo-hand-note { text-align: center; }
