/* 手引き：各章は標準の details/summary で開閉できる */
.guide { padding-block: clamp(2.4rem, 4vw, 4rem); }
.section-heading { margin-bottom: 1.45rem; display: grid; justify-items: center; text-align: center; gap: .15rem; }
.section-heading .eyebrow { display: flex; align-items: center; gap: .9rem; }
.section-heading .eyebrow::before, .section-heading .eyebrow::after { content: ""; width: 35px; height: 1px; background: var(--line); }
.chapter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.8rem, 2vw, 1.8rem); align-items: start; }
.chapter { border: 1px solid var(--line); background: #faf8f2; box-shadow: 0 3px 0 #d0c39f48; }
.chapter summary { position: relative; display: flex; flex-direction: column; cursor: pointer; list-style: none; }
.chapter summary::-webkit-details-marker { display: none; }
.chapter img { display: block; width: 100%; height: clamp(135px, 12vw, 185px); object-fit: contain; mix-blend-mode: multiply; }
.chapter-heading { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: .9rem 1.1rem 1.05rem; background: #fff; border-top: 1px solid #d6cbb0; }
.chapter-heading small { color: var(--brass); font-weight: 700; font-size: .72rem; }
.chapter-heading strong { grid-column: 1; font-size: clamp(1.02rem,1.55vw,1.4rem); margin-top: .22rem; }
.toggle { grid-row: 1 / span 2; grid-column: 2; position: relative; border: 1px solid #a79565; border-radius: 50%; width: 27px; height: 27px; }
.toggle::before, .toggle::after { content: ""; width: 10px; height: 1px; background: var(--ink); position: absolute; top: 12px; left: 8px; }
.toggle::after { transform: rotate(90deg); }
.chapter[open] .toggle::after { transform: rotate(0); }
.chapter summary:hover .chapter-heading { background: #f7f3e9; }
.chapter-copy { background: var(--paper-light); border-top: 1px dashed var(--line); padding: 1.15rem; line-height: 1.95; }
.chapter-copy p + p { margin-top: .7rem; }

/* 錬金手帳：元素の札と、周囲の観測円 */
.notebook { background: #faf8f2; color: var(--ink); border-block: 4px double #c3b178; }
.note-layout { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 2rem; padding-block: 3rem; }
.note-copy .eyebrow { color: var(--brass); }
.note-copy h2, .rulebook h2 { margin: .5rem 0 .8rem; }
.note-copy p:not(.eyebrow), .rulebook p:not(.eyebrow) { line-height: 1.9; }
.suits { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.3rem 0 .7rem; border: 0; }
.suits legend { margin-bottom: .55rem; font-size: .9rem; }
.suits label { position: relative; cursor: pointer; }
.suits input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.suits span { display: block; width: 62px; text-align: center; border: 1px solid #ab945f; color: #6b592f; font: 1.65rem/1.4 Georgia,serif; }
.suits b { display: block; text-align: center; font: .78rem/1.7 var(--sans); }
.suits input:checked + span { background: #e6d7b2; color: var(--ink); border: 1px solid #f8d37e; }
.suits input:focus-visible + span { outline: 3px solid #f6cd79; outline-offset: 2px; }
.note-foot { font-size: .88rem; color: #695f4e; }
.specimen { display: grid; place-items: center; position: relative; min-height: 305px; isolation: isolate; }
.specimen::before, .specimen::after { content: ""; position: absolute; width: 260px; aspect-ratio: 1; border: 1px solid #b4a16a66; border-radius: 50%; z-index: -1; }
.specimen::after { width: 202px; border: 1px dashed #b4a16aaa; }
.card-stage { width: 180px; height: 252px; position: relative; transform: rotate(5deg); }
.element-card { box-sizing: border-box; position: relative; width: 180px; height: 252px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 5px double #a58b54; border-radius: 6px; color: #51442e; background: #fffdf7; font-family: var(--serif); }
.element-card::after { content: "✧"; position: absolute; bottom: 7px; right: 9px; color: #927641; }
.card-corner { position: absolute; top: 6px; left: 10px; font: 1.45rem Georgia,serif; }
.card-suit { font: 4.6rem/.98 Georgia,serif; }
.card-name { font-size: 1.4rem; letter-spacing: .12em; margin: .55rem 0 .2rem; }
.card-en, .card-caption { font-size: .8rem; }
.card-caption { margin-top: .9rem; }
.element-card[data-color="red"] { color: #903f38; }
.card-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.card-stage[data-painted] canvas { opacity: 1; }
.card-stage[data-painted] > .element-card { opacity: 0; }
.rulebook { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 3.5rem; }
@media (max-width: 760px) {
  .chapter-grid { grid-template-columns: 1fr; }
  .chapter summary { flex-direction: row; }
  .chapter img { width: 30%; height: 108px; }
  .chapter-heading { flex: 1; border: 0; border-left: 1px solid var(--line); align-content: center; }
  .note-layout { grid-template-columns: 1fr; gap: .2rem; }
  .rulebook { flex-direction: column; align-items: start; }
}
@media (max-width: 620px) {
  .note-layout { padding-block: 2.4rem 1rem; }
}
@media print {
  .masthead, .hero .button, .suits, footer { display: none; }
  .hero-inner { min-height: auto; }
  .chapter-grid, .note-layout { display: block; }
  .chapter::details-content { content-visibility: visible; }
  .notebook { background: white; color: black; }
}
