/* プレイヤーガイド（play.html と play-*.html）。書き出すのは play.py。
   黒い見出し（.ghero）と章のタブ（.gtabs）は作成ガイドのものを借りる（guide.css）。
   クラス名はどれも p で始める——サイトの .arrow・.facts・.steps・.open とぶつからないように */

.play { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); padding-block: clamp(40px, 6vw, 80px) 96px; align-items: start; }
@media (max-width: 900px) { .play { grid-template-columns: minmax(0, 1fr); } .ptoc { position: static !important; max-height: none !important; } }

/* 左: この章の機能の一覧 */
.ptoc { position: sticky; top: 168px; max-height: calc(100vh - 192px); overflow: auto; font-size: 14px; }
.ptoc h4 { margin: 0 0 10px; font-size: 13px; color: var(--grey); font-weight: 500; letter-spacing: .04em; }
.ptoc ol { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 2px; }
.ptoc a { display: block; padding: 6px 10px; border-radius: 4px; color: var(--grey); line-height: 1.5; }
.ptoc a:hover { background: var(--mist); color: var(--black); }

.pmain { max-width: 860px; min-width: 0; }

/* 1 機能ぶん */
.punit { border-top: 2px solid var(--black); padding: 28px 0 0; margin-bottom: clamp(56px, 7vw, 96px); scroll-margin-top: 150px; }
.punit h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.25; font-weight: 600; margin: 0 0 8px; }
.punit .pwhat { font-size: 17px; margin: 0 0 24px; }
.punit h3 { font-size: 13px; font-weight: 500; color: var(--grey); letter-spacing: .04em; margin: 32px 0 12px; }
.punit p.ptext { margin: 0 0 12px; }

/* 開き方: キーと画面の中の行き先を › でつなぐ */
.popen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--mist); border-radius: 12px; padding: 14px 18px; font-size: 15px; }
.popen .parrow { color: var(--grey); font-size: 20px; line-height: 1; }
.popen .pwhere { background: var(--white); border-radius: 4px; padding: 3px 10px; }
.popen .pcond { margin-left: auto; font-size: 13px; color: var(--grey); }
.pkey { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border: 1.5px solid var(--black); border-bottom-width: 3px; border-radius: 6px; background: var(--white); font-family: var(--f-latin); font-size: 14px; font-weight: 600; white-space: nowrap; }

/* 手順: 番号・文・画面写真 */
.phow { list-style: none; counter-reset: phow; margin: 0; padding: 0; display: grid; gap: 28px; }
.phow > li { counter-increment: phow; display: grid; grid-template-columns: 36px minmax(0, 5fr) minmax(0, 6fr); gap: 16px 20px; align-items: start; }
.phow > li.noshot { grid-template-columns: 36px minmax(0, 1fr); }
.phow > li::before { content: counter(phow); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--black); color: var(--white); font-family: var(--f-latin); font-weight: 600; }
.phow p { margin: 4px 0 0; }
.phow .psub { display: block; margin-top: 6px; font-size: 14px; color: var(--grey); }
@media (max-width: 700px) { .phow > li { grid-template-columns: 36px minmax(0, 1fr); } .phow .pshot { grid-column: 1 / -1; } }
.pshot { border-radius: 12px; overflow: hidden; background: var(--mist); aspect-ratio: 16 / 9; }
.pshot img { width: 100%; height: 100%; object-fit: cover; }
.pshot.todo { display: grid; place-items: center; text-align: center; border: 2px dashed #b9bec6; color: var(--grey); font-size: 13px; padding: 12px; }
.pshot.todo b { display: block; font: 600 13px/1.4 ui-monospace, monospace; margin-bottom: 4px; }
.pshot.wide { margin-top: 20px; }

/* 覚えておくこと: 短い事実を並べる */
.pfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.pfacts > div { background: var(--mist); border-radius: 12px; padding: 14px 16px; font-size: 14px; }
.pfacts b { display: block; font-size: 15px; margin-bottom: 2px; }

/* 表（部品の一覧・路面のグリップなど） */
.ptable-wrap { overflow-x: auto; }
table.ptable { width: 100%; border-collapse: collapse; font-size: 15px; }
table.ptable th, table.ptable td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.ptable thead th { font-size: 13px; font-weight: 500; color: var(--grey); border-bottom: 2px solid var(--black); white-space: nowrap; }
table.ptable tbody th { font-weight: 600; white-space: nowrap; }

.prelated { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.prelated a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.prelated a:hover { border-color: var(--black); }
.ppager { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; font-size: 15px; }
.ppager a { display: grid; gap: 2px; }
.ppager a:hover { text-decoration: underline; text-underline-offset: 4px; }
.ppager small { color: var(--grey); font-size: 13px; }

/* 入口のページ */
.phome { padding-block: clamp(40px, 6vw, 80px) 96px; display: grid; gap: clamp(56px, 7vw, 96px); }
/* サイトの section は上下に大きな余白を持つ。ここでは間隔を .phome の gap で決める */
.phome > section { padding: 0; }
.phome h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.25; font-weight: 600; margin: 0 0 6px; }
.phome .plead { color: var(--grey); margin: 0 0 24px; }
.pchapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pchapters > * { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 18px; align-content: start; }
.pchapters a:hover { border-color: var(--black); }
.pchapters .pnum { font-family: var(--f-latin); font-size: 13px; color: var(--grey); }
.pchapters b { font-size: 18px; }
.pchapters p { margin: 0; font-size: 14px; color: #3a3c40; }
.pchapters .soon { color: var(--grey); background: var(--mist); border-color: var(--mist); }
.pchapters .soon p { color: var(--grey); }
.pkeys { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 32px; }
.pkeys > div { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.pkeys .pkey + .pkey { margin-left: -6px; }

/* 章の冒頭: この章でできること */
.pintro { padding: 0; margin-bottom: clamp(40px, 5vw, 64px); }
.pintro .pshot.wide { margin: 0 0 20px; }
.pintro .plead { font-size: 18px; margin: 0 0 20px; }
.pcan { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pcan a { display: block; height: 100%; padding: 14px 16px; border-radius: 12px; background: var(--mist); color: var(--black); }
.pcan a:hover { background: #e3e6ea; }
.pcan b { display: block; font-weight: 600; margin-bottom: 4px; }
.pcan span { display: block; font-size: 14px; color: var(--grey); line-height: 1.6; }
