/* 見た目はサーフィン版（LUS）と同じ調子：紙の白・深い緑の墨・黄色 #ffd84a・ゴシック体。外部字体は使わない。 */
:root {
  --paper: #f8f7f2; --white: #fffefa; --ink: #293e3c; --muted: #596864; --border: #d1d9d5;
  --water: #e9f3f8; --deep: #365e59; --yellow: #ffd84a;
  --gothic: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--gothic); line-height: 1.6; -webkit-text-size-adjust: 100%; }
body { max-width: 640px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)) max(28px, env(safe-area-inset-bottom)); }
.top { padding: max(24px, env(safe-area-inset-top)) 0 16px; border-bottom: 1px solid var(--border); }
.kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 10px; letter-spacing: .18em; color: var(--muted); }
.line { display: block; width: 25px; height: 1px; background: #7c9b99; }
.title { margin: 0; font-family: Georgia, "Hiragino Mincho ProN", serif; font-size: clamp(44px, 14vw, 72px); font-weight: 400; line-height: .95; letter-spacing: -.04em; }
.dot { color: var(--yellow); -webkit-text-stroke: 1px #c9a400; }
.name { margin: 10px 0 0; font-size: 12px; letter-spacing: .24em; }
.lead, .summary, .meta { font-size: 14px; color: var(--muted); }
button { min-height: 44px; border: 1px solid var(--border); border-radius: 0; background: var(--white); color: var(--ink); font: inherit; font-size: 14px; padding: 8px 12px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; }
button[aria-pressed="true"], button[aria-current="true"] { background: var(--water); border-color: #6c8b87; box-shadow: inset 0 -3px 0 var(--yellow); }
button:disabled { opacity: .5; }

.tricks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tricks li button { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 14px; }
.tricks .tn { font-size: 17px; }
.tricks .lv { color: #b08d00; letter-spacing: .05em; font-size: 13px; white-space: nowrap; }
.tricks .pre { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.tricks .done { color: var(--deep); font-size: 12px; }

.back { margin: 14px 0 4px; }
h2 { margin: 6px 0 0; font-size: 24px; font-weight: 500; border-left: 6px solid var(--yellow); padding-left: 10px; }
.variants { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.variants button { flex: 1 1 140px; }

.videoBox { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 200px; background: #10201e; }
.videoBox iframe, #ytPlayer { position: absolute; inset: 0; width: 100%; height: 100%; }
.overlayFig { position: absolute; right: 4px; bottom: 4px; width: 46%; pointer-events: none; }
.videoCtl { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.videoCtl button { flex: 1 1 auto; }
.vinfo { font-size: 12px; color: var(--muted); margin: 6px 0; overflow-wrap: anywhere; }
.vinfo a, .alts a { color: var(--deep); }
.alts { display: flex; gap: 6px; flex-wrap: wrap; }
.alts button { font-size: 12px; min-height: 36px; }
.note { background: #fff4c4; border-left: 4px solid var(--yellow); padding: 6px 10px; font-size: 13px; }

.stepNav { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; margin: 16px 0 8px; }
.dots { list-style: none; display: flex; justify-content: center; gap: 4px; margin: 0; padding: 0; }
.dots button { min-width: 36px; min-height: 36px; padding: 0; border-radius: 50%; }
.stepCard { background: var(--white); border: 1px solid var(--border); padding: 12px 14px; }
.stepCard h3 { margin: 0 0 6px; font-size: 18px; font-weight: 500; }
.figure { background: #23312f; }
.forces { margin: 10px 0 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.forces li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: start; font-size: 15px; }
.forces .n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 13px; }
.forces .w { color: var(--muted); font-size: 12px; display: block; }
.tip { margin: 10px 0 0; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 8px; }
.chain { margin-top: 14px; font-size: 14px; }
.chain a { color: var(--deep); margin-right: 8px; }
.doneLbl { display: flex; gap: 8px; align-items: center; min-height: 44px; }
.foot { margin-top: 24px; font-size: 11px; color: var(--muted); }

/* 黄色い形 */
svg.fig { display: block; width: 100%; height: auto; }
svg.fig line, svg.fig path { stroke-linecap: round; stroke-linejoin: round; fill: none; }
svg.fig .snow { stroke: #e9f3f8; stroke-width: 2; opacity: .6; }
svg.fig .dir { fill: #c6d1ca; font-size: 11px; }
svg.fig .board { stroke: #e9f3f8; stroke-width: 7; fill: none; }
svg.fig .nose { fill: var(--yellow); }
svg.fig .body-shadow path { stroke: #10201e; stroke-width: 10; }
svg.fig .body path { stroke: var(--yellow); stroke-width: 5; }
svg.fig .headc { fill: none; stroke: var(--yellow); stroke-width: 4; }
svg.fig .f-line { stroke: var(--yellow); stroke-width: 4; }
svg.fig .f-eye { stroke: var(--yellow); stroke-width: 3; stroke-dasharray: 5 6; }
svg.fig .f-dot { fill: var(--yellow); stroke: #10201e; stroke-width: 2; }
svg.fig .f-num { fill: var(--ink); font-size: 12px; font-weight: 700; font-family: var(--gothic); }
svg.fig .tv-bg { fill: rgba(16, 32, 30, .82); stroke: #c6d1ca; stroke-width: 1; }
svg.fig .tv-board { stroke: #e9f3f8; stroke-width: 5; }
svg.fig .tv-nose { fill: var(--yellow); }
svg.fig .tv-sh { stroke: var(--yellow); stroke-width: 3; }
svg.fig .tv-chest { fill: var(--yellow); stroke: #10201e; stroke-width: 1; }
svg.fig .tv-arc { stroke: #fff4c4; stroke-width: 3; fill: none; }
svg.fig .tv-full { fill: none; stroke: #fff4c4; stroke-width: 1.5; stroke-dasharray: 3 3; }
svg.fig .tv-deg { fill: #fff4c4; font-size: 10px; font-family: var(--gothic); }
svg.fig .f-lead { stroke: var(--yellow); stroke-width: 1.5; }
svg.fig .f-ring { stroke: var(--yellow); stroke-width: 2.5; stroke-dasharray: 3 4; opacity: .8; }
svg.fig.overlay .body-shadow path { stroke: rgba(0, 0, 0, .55); }

/* スタンスの切り替え（レギュラー／グーフィー） */
.stance { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0 4px; }
.stance button { display: flex; flex-direction: column; align-items: center; line-height: 1.2; padding: 6px 4px; }
.stance button span { font-size: 11px; color: var(--muted); }
.treeBtn { width: 100%; margin: 4px 0 12px; border-color: #c9a400; background: #fff9de; font-weight: 600; }
.linkBtn { min-height: 40px; font-size: 13px; }
.tricks .ready { color: #8a6d00; font-size: 12px; border: 1px dashed #c9a400; padding: 0 4px; }

/* 技の道すじ */
.treeBox { background: #23312f; padding: 8px 0; margin: 8px 0; }
svg.tree { display: block; width: 100%; height: auto; font-family: var(--gothic); }
svg.tree .t-edge { fill: none; stroke: #6d8582; stroke-width: 2; }
svg.tree .t-edge.ok { stroke: var(--yellow); stroke-width: 3; }
svg.tree .t-node rect { fill: #10201e; stroke: #8fa6a2; stroke-width: 1.5; }
svg.tree .t-node.done rect { fill: var(--yellow); stroke: #c9a400; }
svg.tree .t-node.ready rect { stroke: var(--yellow); stroke-width: 2.5; stroke-dasharray: 5 4; }
svg.tree .t-name { fill: #f8f7f2; font-weight: 600; }
svg.tree .t-sub { fill: #c6d1ca; font-size: 10px; }
svg.tree .t-node.done .t-name, svg.tree .t-node.done .t-sub { fill: var(--ink); }
svg.tree .t-node.ready .t-sub { fill: var(--yellow); }

/* 確かめ済み／目安の印 */
.badge { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 3px; line-height: 1.5; }
.badge.ok { background: #e3f1e6; color: #1f5a33; border: 1px solid #9cc7a8; }
.badge.guess { background: #fff4c4; color: #6b5300; border: 1px dashed #c9a400; }
.pnote { font-size: 11px; color: var(--muted); }
.dots button[data-proof="1"] { border-color: #6c8b87; border-width: 2px; }
.stepMark { margin: 0 0 6px; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mini { min-height: 32px; font-size: 12px; padding: 2px 8px; }
.figNote { margin: 6px 0 0; font-size: 12px; color: var(--muted); }

/* 補足・よくある失敗・出どころ */
.infoBox { margin-top: 12px; background: var(--white); border: 1px solid var(--border); border-left: 6px solid var(--yellow); padding: 8px 12px; }
.infoBox h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.infoBox ul { margin: 0; padding-left: 18px; font-size: 13px; }
.infoBox li { margin: 4px 0; }
.sources { margin-top: 12px; font-size: 12px; color: var(--muted); }
.sources summary { cursor: pointer; min-height: 32px; }
.sources ul { padding-left: 18px; }
.sources a { color: var(--deep); overflow-wrap: anywhere; }

/* 自分の滑りを分析 */
.anRow { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.anRow select, .anNote { flex: 1; min-height: 44px; width: 100%; border: 1px solid var(--border); border-radius: 0; background: var(--white); color: var(--ink); font: inherit; font-size: 16px; padding: 6px 10px; }
.anFile { display: block; margin: 10px 0; padding: 12px 14px; background: var(--white); border: 1px dashed #6c8b87; font-size: 14px; }
.anFile input { display: block; margin-top: 8px; width: 100%; font: inherit; }
.anVideo { display: block; width: 100%; max-height: 60vh; background: #10201e; }
.anFrames { list-style: none; margin: 10px 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.anFrames li { background: #10201e; }
.anFrames img { display: block; width: 100%; height: auto; }
.anFrames span { display: flex; justify-content: space-between; padding: 2px 6px; font-size: 11px; color: #f8f7f2; }
.anFrames li:nth-child(4) { outline: 3px solid var(--yellow); }
.anReply { margin: 0; white-space: pre-line; font-size: 15px; }
.note.warn { background: #fde7e2; border-left-color: #c2553f; }
.anInbox { list-style: none; padding: 0; }
.anInbox li { border-top: 1px dashed var(--border); padding: 8px 0; }
#anSendBox label { display: block; margin-top: 10px; }
