/* Shared castle lesson theme. Opt in with shogi-study-page.
   Every semantic lesson is one direct child of study-course.
   Individual pages must not redefine the palette or the cue colours. */
.shogi-study-page {
 --study-highlight:#e0392b35;
 --study-tone-a:#1c2d47;
 --study-tone-b:#2b3c56;
}
.shogi-study-page .sb td:is(.hl,.study-focus,.study-location,.study-castle-cell),
.shogi-study-page .castle-area-board td:is([data-x="9"],[data-x="8"],[data-x="7"],[data-x="6"]) {
 background-color:var(--study-highlight)!important;
 box-shadow:none!important;
}
.shogi-study-page .study-course {margin:0 -16px;padding:0}
.shogi-study-page .study-course > .study-lesson {margin:0;padding:20px 16px;border:0;border-radius:0;box-shadow:none}
.shogi-study-page .study-course > .study-lesson:nth-child(odd) {background:var(--study-tone-a)}
.shogi-study-page .study-course > .study-lesson:nth-child(even) {background:var(--study-tone-b)}
.shogi-study-page .study-course > .study-lesson :is(.kcard,.kplayer,.study-topic) {background:transparent;border:0;box-shadow:none}
.shogi-study-page .study-course > .study-lesson > .kcard,
.shogi-study-page .study-course > .study-lesson > .kz > .kcard {max-width:none;margin:0 -16px;padding:0}
.shogi-study-page .study-course > .study-lesson .kplayer {max-width:430px;margin-left:auto;margin-right:auto}
.shogi-study-page .study-course > .study-lesson :is(h2,h3,h4) {margin-top:0;margin-bottom:12px}
.shogi-study-page .study-course > .study-lesson h3.ih {padding:0;border:0;box-shadow:none;background:transparent;font-size:17px;line-height:1.6}
.shogi-study-page .study-course > .study-lesson .type-condition {margin-top:0;margin-bottom:10px}
.shogi-study-page .study-anchor {display:block;scroll-margin-top:56px}
.shogi-study-page .study-course > .study-lesson > .tblwrap {margin-top:0}
.shogi-study-page .study-course > .study-lesson details.board-comparison .kcard {background:transparent;border:0;box-shadow:none}

/* Native disclosure button; opt in without changing other summaries. */
.shogi-study-page details > summary.study-disclosure-toggle {
 display:flex;align-items:center;justify-content:center;gap:10px;
 box-sizing:border-box;width:100%;min-height:44px;margin:0;padding:8px 16px;
 border:1px solid rgba(195,212,237,.32);border-radius:24px;background:none;
 color:inherit;font:inherit;font-size:14px;font-weight:700;line-height:1.4;cursor:pointer;
 list-style:none;
}
.shogi-study-page .study-disclosure-toggle::-webkit-details-marker {display:none}
.shogi-study-page .study-disclosure-toggle::after {
 content:"";display:block;width:8px;height:8px;border:solid currentColor;
 border-width:0 2px 2px 0;transform:translateY(-2px) rotate(45deg);flex:none;
}
.shogi-study-page details[open] > .study-disclosure-toggle::after {transform:translateY(2px) rotate(225deg)}
.shogi-study-page details:not([open]) > .study-disclosure-toggle .disclosure-open,
.shogi-study-page details[open] > .study-disclosure-toggle .disclosure-closed {display:none}
.shogi-study-page .study-disclosure-toggle:focus-visible {outline:2px solid #ffd23f;outline-offset:2px}
