/* ONE ENGINE, EVERY SCHOOL — engine rail, full cycle, Market MindCanvas,
   Personal Expression, Living Story World, Sketchbook shelf.
   Obsidian + refined gold, matching canon screen 03 (Living Learning Engine).
   Kept in its own file so school modules can change styles.css freely. */

/* ── engine rail ── */
.er-rail { margin: 22px 0; padding: clamp(16px, 2.4vw, 26px); border-radius: 22px; border: 1px solid rgba(227,183,74,.32); background: radial-gradient(120% 140% at 0% 0%, rgba(227,183,74,.12), transparent 50%), linear-gradient(160deg, #110e09, #060606 70%); box-shadow: inset 0 1px 0 rgba(246,215,126,.1), 0 30px 70px -40px rgba(227,183,74,.45); min-width: 0; }
.er-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.er-head h2 { margin: 4px 0 4px; font-family: var(--display); font-size: clamp(19px, 2.4vw, 26px); color: #f6d77e; letter-spacing: .02em; text-wrap: balance; }
.er-head p { margin: 0; max-width: 64ch; }
.er-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.er-tile { position: relative; display: grid; grid-template-rows: auto 1fr auto; min-width: 0; border-radius: 16px; overflow: hidden; border: 1px solid rgba(227,183,74,.3); background: #0a0907; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.er-tile:not(.is-soon):hover, .er-tile:focus-within { border-color: #e3b74a; box-shadow: 0 0 0 1px rgba(227,183,74,.45), 0 22px 44px -26px rgba(227,183,74,.7); transform: translateY(-2px); }
.er-main { display: grid; grid-template-rows: auto 1fr; color: inherit; text-decoration: none; min-width: 0; }
.er-main:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.er-art { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.er-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.er-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(6,6,6,.85) 100%); }
.er-tile:not(.is-soon):hover .er-art img { transform: scale(1.05); }
.er-body { display: grid; gap: 6px; align-content: start; padding: 10px 12px 12px; margin-top: -26px; position: relative; z-index: 1; }
.er-body b { font-family: var(--display); font-size: 14.5px; color: #f3e2b0; letter-spacing: .03em; line-height: 1.2; }
.er-body small { color: #c9bfa8; font-size: 12.5px; line-height: 1.42; }
.er-pill { justify-self: start; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.er-live { background: var(--gold-grad); color: #1a1205; }
.er-part { border: 1px solid rgba(227,183,74,.6); color: #f6d77e; }
.er-soon { border: 1px dashed rgba(200,190,170,.45); color: #b9b3a6; }
.er-tile.is-soon { border-style: dashed; border-color: rgba(200,190,170,.25); }
.er-tile.is-soon .er-art img { filter: grayscale(.85) brightness(.5); }
.er-tile.is-soon .er-body b { color: #a8a294; }
.er-mores { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 0 12px 12px; }
.er-more { font-size: 12.5px; color: #f6d77e; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.er-more:hover { text-decoration: underline; }
.er-credit { margin: 12px 0 0; font-size: 11.5px; }

/* ── full cycle ── */
.er-cycle { margin: 22px 0; padding: clamp(16px, 2.4vw, 26px); border-radius: 22px; border: 1px solid rgba(227,183,74,.45); background: radial-gradient(90% 140% at 100% 0%, rgba(227,183,74,.2), transparent 55%), linear-gradient(120deg, #17130b, #090807); min-width: 0; }
.er-cycle-h { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.er-cycle-h h2 { margin: 4px 0; font-family: var(--display); font-size: clamp(19px, 2.4vw, 26px); color: #f6d77e; text-wrap: balance; }
.er-cycle-h p { margin: 0; }
.er-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; }
.er-steps li { position: relative; min-width: 0; }
.er-steps li + li::before { content: "→"; position: absolute; left: -10px; top: 50%; transform: translate(-50%, -50%); color: #e3b74a; font-size: 14px; }
.er-steps a { display: grid; gap: 3px; height: 100%; padding: 12px; border-radius: 14px; border: 1px solid rgba(227,183,74,.3); background: rgba(5,5,5,.55); color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.er-steps a:hover, .er-steps a:focus-visible { border-color: #e3b74a; background: rgba(227,183,74,.08); }
.er-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid #e3b74a; color: #f6d77e; font-weight: 800; font-size: 12.5px; }
.er-steps b { font-family: var(--display); color: #f6d77e; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; }
.er-steps i { font-style: normal; color: #f3e2b0; font-size: 13px; font-weight: 600; }
.er-steps small { color: #b9b3a6; font-size: 12px; line-height: 1.35; }
.le-cycle { color: #f6d77e !important; }

@media (max-width: 1100px) { .er-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .er-steps { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .er-steps li + li::before { display: none; }
}
@media (max-width: 640px) {
  .er-tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .er-tile { scroll-snap-align: start; }
  .er-steps { grid-template-columns: minmax(0, 1fr); }
  .er-cycle-h .btn, .er-head .btn { width: 100%; justify-content: center; }
}

/* ── shared cinematic hero for the new screens ── */
.xw-back { margin: 0 0 10px; color: var(--text-2); }
.xw-back a { color: #f6d77e; }
.xw-hero { position: relative; overflow: hidden; border-radius: 24px; border: 1px solid rgba(227,183,74,.35); min-height: 420px; display: grid; align-items: end; background: #050505 var(--xw-img) center / cover no-repeat; box-shadow: 0 30px 80px -40px rgba(227,183,74,.5); }
.xw-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,5,5,.92) 0%, rgba(5,5,5,.7) 42%, rgba(5,5,5,.1) 75%), linear-gradient(180deg, rgba(5,5,5,0) 50%, rgba(5,5,5,.75) 100%); }
.xw-hero-body { position: relative; z-index: 1; display: grid; gap: 10px; padding: clamp(20px, 4vw, 44px); max-width: 660px; }
.xw-hero-body h1 { margin: 0; font-size: clamp(2.1rem, 5.4vw, 3.6rem); text-wrap: balance; }
.xw-hero-body .lead { margin: 0; color: #f3ecda; }
.xw-hero-body p { margin: 0; color: #d9d1bf; }
.xw-steps { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: x; }
.xw-steps li { counter-increment: x; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #f6d77e; padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(227,183,74,.5); background: rgba(5,5,5,.6); }
.xw-steps li::before { content: counter(x) " · "; color: #a97c1f; }
@media (max-width: 640px) {
  .xw-hero { min-height: 520px; border-radius: 18px; background-position: 62% center; }
  .xw-hero::before { background: linear-gradient(180deg, rgba(5,5,5,.15) 0%, rgba(5,5,5,.78) 45%, rgba(5,5,5,.96) 100%); }
  .xw-hero .art-credit { top: 10px; bottom: auto; }
  .xw-hero-body { padding-top: 68px; }
}

/* ── Market MindCanvas ── */
.mmc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; margin-top: 18px; align-items: start; }
.mmc-stage { padding: clamp(12px, 2vw, 20px); border-radius: 20px; min-width: 0; }
.mmc-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; justify-content: space-between; }
.mmc-bar h2 { margin: 2px 0 0; font-family: var(--display); color: #f6d77e; font-size: 20px; }
.mmc-btns { gap: 8px; flex-wrap: wrap; }
.mmc-side { display: grid; gap: 14px; min-width: 0; }
.mmc-side h3 { margin: 0 0 6px; color: #f6d77e; }
.mmc-side a { color: #f6d77e; text-decoration: underline; }
.mmc-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--text-2); }
.mmc-list b { color: #f3e2b0; display: block; }
.mmc-result { margin-top: 14px; }
.mmc-rows { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.mmc-rows li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(227,183,74,.2); background: rgba(5,5,5,.5); }
.mmc-rows li > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 800; }
.mmc-rows li.is-ok > span { background: rgba(63,197,138,.18); color: #3fc58a; }
.mmc-rows li.is-miss > span { background: rgba(224,96,90,.16); color: #e0605a; }
.mmc-rows p { margin: 2px 0 0; color: var(--text-2); font-size: 13.5px; }
@media (max-width: 900px) { .mmc-grid { grid-template-columns: minmax(0, 1fr); } }

/* ── Personal Expression ── */
.xp-review { padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(227,183,74,.55); background: rgba(5,5,5,.6); font-size: 13px; }
.xp-review b { color: #f6d77e; }
.xp-see, .xp-voice, .xp-practice, .xp-prove { margin-top: 22px; }
.xp-voice, .xp-practice, .xp-prove { padding: clamp(16px, 2.4vw, 24px); border-radius: 20px; }
.xp-voice h2, .xp-practice h2, .xp-prove h2 { margin: 4px 0 6px; font-family: var(--display); color: #f6d77e; }
.xp-regions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.xp-region { position: relative; display: grid; padding: 0; border-radius: 14px; overflow: hidden; border: 1px solid rgba(227,183,74,.28); background: #000; text-align: left; min-width: 0; }
.xp-region img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: .62; transition: opacity .2s; }
.xp-region span { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 10px; display: grid; background: linear-gradient(180deg, transparent, rgba(0,0,0,.85)); }
.xp-region b { font-family: var(--display); color: #f3e2b0; font-size: 15px; }
.xp-region small { color: #c9bfa8; font-size: 11.5px; }
.xp-region.on { border-color: #e3b74a; box-shadow: 0 0 0 1px #e3b74a, 0 14px 30px -18px rgba(227,183,74,.8); }
.xp-region.on img, .xp-region:hover img { opacity: 1; }
.xp-scene { position: relative; margin: 0 0 14px; border-radius: 18px; overflow: hidden; border: 1px solid rgba(227,183,74,.3); }
.xp-scene img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.xp-scene figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.85)); color: #f3ecda; font-size: 14px; }
.xp-scene figcaption small { display: block; color: #b9b3a6; font-size: 11px; }
.xp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.xp-card { display: grid; gap: 8px; align-content: start; padding: 14px; border-radius: 16px; min-width: 0; }
.xp-card-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.xp-card-h b { font-family: var(--display); font-size: 21px; color: #f6d77e; }
.xp-say { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid rgba(227,183,74,.6); background: rgba(227,183,74,.1); color: #f6d77e; font-size: 13px; }
.xp-say:hover { background: rgba(227,183,74,.25); }
.xp-say-sm { width: 28px; height: 28px; font-size: 11px; vertical-align: middle; }
.xp-means { margin: 0; color: #f3ecda; font-weight: 600; }
.xp-means small { color: #a8a294; font-weight: 400; }
.xp-reg { justify-self: start; display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.xp-reg-neutral { background: rgba(63,198,184,.16); color: #6fe0d2; border: 1px solid rgba(63,198,184,.45); }
.xp-reg-informal { background: rgba(227,183,74,.14); color: #f6d77e; border: 1px solid rgba(227,183,74,.5); }
.xp-reg-close { background: rgba(240,150,70,.14); color: #f5b27a; border: 1px solid rgba(240,150,70,.5); }
.xp-reg-caution { background: rgba(224,96,90,.16); color: #f0948f; border: 1px solid rgba(224,96,90,.55); }
.xp-ex { margin: 0; color: #e7dfcc; font-size: 14px; }
.xp-ex small { color: #a8a294; }
.xp-note { margin: 0; color: #b9b3a6; font-size: 12.5px; border-left: 2px solid rgba(227,183,74,.45); padding-left: 8px; }
.xp-keep { justify-self: start; }
.xp-keep[aria-pressed="true"] { border-color: #e3b74a; color: #f6d77e; background: rgba(227,183,74,.12); }
.xp-mine { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.xp-mine li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: rgba(5,5,5,.5); border: 1px solid rgba(227,183,74,.2); }
.xp-mine b { color: #f6d77e; font-family: var(--display); }
.xp-mine small { color: #a8a294; }
.xp-sit { display: grid; gap: 4px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(227,183,74,.35); background: rgba(227,183,74,.06); margin: 10px 0; }
.xp-sit b { font-size: 17px; color: #f3ecda; }
.xp-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.xp-opt { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(227,183,74,.3); background: rgba(5,5,5,.55); min-height: 56px; }
.xp-opt b { color: #f6d77e; font-size: 16px; }
.xp-opt small { color: #b9b3a6; }
.xp-opt:hover:not(:disabled) { border-color: #e3b74a; }
.xp-opt.is-ok, .xp-wopt.is-ok { border-color: #3fc58a; box-shadow: 0 0 0 1px #3fc58a; }
.xp-opt.is-miss, .xp-wopt.is-miss { border-color: #e0605a; box-shadow: 0 0 0 1px #e0605a; }
.xp-fb { margin: 10px 0 0; color: var(--text-2); }
.xp-fb b { color: #f6d77e; }
.xp-q { font-size: 17px; margin: 6px 0 12px; }
.xp-q b { display: block; margin-top: 6px; font-family: var(--display); font-size: 26px; color: #f6d77e; }
.xp-where { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.xp-wopt { position: relative; padding: 0; border-radius: 14px; overflow: hidden; border: 1px solid rgba(227,183,74,.3); background: #000; min-width: 0; }
.xp-wopt img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; opacity: .8; }
.xp-wopt span { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.9)); font-family: var(--display); color: #f3e2b0; }
.xp-score { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: 10px 0; }
.xp-score b { font-family: var(--display); font-size: 40px; color: #f6d77e; }
.xp-score span { color: var(--text-2); }
.xp-prove > [data-xp-start][hidden] { display: none; }
@media (max-width: 760px) { .xp-regions, .xp-where { grid-template-columns: repeat(2, minmax(0, 1fr)); } .xp-scene img { aspect-ratio: 16 / 10; } }

/* ── Living Story World ── */
.sw-quote { margin: 4px 0; padding: 0 0 0 14px; border-left: 3px solid #e3b74a; font-family: var(--display); font-size: clamp(16px, 2vw, 20px); color: #f6d77e; }
.sw-world, .sw-room-sec { margin-top: 22px; }
.sw-stage { position: relative; margin: 0; border-radius: 20px; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.sw-stage img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.sw-stage figcaption { display: grid; gap: 8px; align-content: center; padding: clamp(16px, 2.4vw, 26px); }
.sw-stage figcaption b { font-family: var(--display); font-size: clamp(20px, 2.4vw, 28px); color: #f6d77e; }
.sw-stage q { color: #f3ecda; font-size: 15.5px; line-height: 1.5; font-style: italic; }
.sw-stage p { margin: 0; color: var(--text-2); }
.sw-nav { gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.sw-path { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--sw-n, 6), minmax(0, 1fr)); gap: 8px; }
.sw-stop { position: relative; display: grid; width: 100%; padding: 0; border-radius: 12px; overflow: hidden; border: 1px solid rgba(227,183,74,.25); background: #000; text-align: left; }
.sw-stop img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; opacity: .6; }
.sw-stop span { position: absolute; inset: auto 0 0 0; padding: 6px 8px; display: grid; background: linear-gradient(180deg, transparent, rgba(0,0,0,.9)); }
.sw-stop i { font-style: normal; font-size: 11px; font-weight: 800; color: #e3b74a; }
.sw-stop b { font-size: 12.5px; color: #f3e2b0; line-height: 1.2; }
.sw-stop small { font-size: 10.5px; color: #a8a294; }
.sw-stop.on { border-color: #e3b74a; box-shadow: 0 0 0 1px #e3b74a; }
.sw-stop.on img, .sw-stop:hover img { opacity: 1; }
.sw-room { position: relative; padding: 0; border-radius: 20px; overflow: hidden; }
.sw-scene { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.sw-obj { cursor: pointer; outline: none; }
.sw-obj:hover .ph-hit, .sw-obj:focus-visible .ph-hit { stroke: rgba(246,215,126,.85); fill: rgba(246,215,126,.08); }
.sw-obj.on .ph-hit { stroke: #f6d77e; stroke-width: 3.5; fill: rgba(246,215,126,.14); }
.sw-cap { padding: 14px 16px 4px; color: #f3ecda; }
.sw-cap b { color: #f6d77e; font-family: var(--display); margin-right: 6px; }
.sw-cap .sw-line { font-style: italic; color: #e7dfcc; }
.sw-found { padding: 0 16px 14px; margin: 0; }
.sw-read { margin-top: 22px; padding: clamp(16px, 2.4vw, 24px); border-radius: 20px; }
#sw-order, #sw-map, #sw-prove { margin-top: 22px; padding: clamp(16px, 2.4vw, 24px); border-radius: 20px; scroll-margin-top: 80px; }
#sw-room, #sw-path { scroll-margin-top: 80px; }
.sw-read h2, #sw-order h2, #sw-map h2, #sw-prove h2 { margin: 4px 0 6px; font-family: var(--display); color: #f6d77e; }
.sw-order { display: grid; grid-template-columns: repeat(var(--sw-n, 6), minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.sw-ocard { display: grid; gap: 6px; padding: 0 0 8px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(227,183,74,.3); background: rgba(5,5,5,.6); text-align: center; }
.sw-ocard img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.sw-ocard b { font-size: 12.5px; color: #f3e2b0; padding: 0 6px; }
.sw-ocard:disabled { opacity: .3; }
.sw-built { margin: 8px 0; padding-left: 22px; color: #f3ecda; display: grid; gap: 4px; }
.sw-q { border: 1px solid rgba(227,183,74,.22); border-radius: 14px; padding: 12px 14px; margin: 0 0 10px; background: rgba(5,5,5,.45); }
.sw-q legend { padding: 0 6px; font-weight: 600; color: #f3ecda; }
.sw-q legend span { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; border: 1px solid #e3b74a; color: #f6d77e; font-size: 12px; }
.sw-q input[type="number"] { width: 110px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(227,183,74,.4); background: #0b0a08; color: #f3ecda; font-size: 16px; }
.sw-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.sw-choices label { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(227,183,74,.25); cursor: pointer; }
.sw-choices label:has(input:checked) { border-color: #e3b74a; background: rgba(227,183,74,.1); }
.sw-door { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); margin: 18px 0; border-radius: 20px; overflow: hidden; border: 1px solid rgba(227,183,74,.45); background: linear-gradient(120deg, #17130b, #0b0a08); color: inherit; text-decoration: none; box-shadow: 0 24px 60px -36px rgba(227,183,74,.6); }
.sw-door-art img { width: 100%; height: 100%; min-height: 200px; object-fit: cover; }
.sw-door-body { display: grid; gap: 8px; align-content: center; padding: 20px 24px; }
.sw-door-body b { font-family: var(--display); font-size: clamp(20px, 2.4vw, 28px); color: #f6d77e; }
.sw-door-body > span:not(.eyebrow):not(.ap-feature-cta) { color: var(--text-2); line-height: 1.5; }
.sw-door:hover { border-color: #e3b74a; }
.sw-chapters { margin: 6px 0 14px; }
.sw-chapters > .eyebrow { display: block; margin-bottom: 8px; }
.sw-chapters ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.sw-chap { position: relative; display: block; border-radius: 12px; overflow: hidden; border: 1px solid rgba(227,183,74,.25); background: #000; text-decoration: none; }
.sw-chap img { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; opacity: .55; }
.sw-chap span { position: absolute; inset: auto 0 0 0; padding: 6px 10px; display: grid; background: linear-gradient(180deg, transparent, rgba(0,0,0,.92)); }
.sw-chap i { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #e3b74a; text-transform: uppercase; }
.sw-chap b { font-size: 13px; color: #f3e2b0; line-height: 1.2; }
.sw-chap.on { border-color: #e3b74a; box-shadow: 0 0 0 1px #e3b74a; }
.sw-chap.on img, .sw-chap:hover img, .sw-chap:focus-visible img { opacity: 1; }
.sw-chap:focus-visible { outline: 2px solid #f6d77e; outline-offset: 2px; }
.bc-mc-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 6px; }
@media (max-width: 900px) {
  .sw-stage { grid-template-columns: minmax(0, 1fr); }
  .sw-path, .sw-order { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sw-chapters ol { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .sw-chapters li { flex: 0 0 62%; scroll-snap-align: start; }
  .sw-door { grid-template-columns: minmax(0, 1fr); }
  .sw-door-art img { min-height: 160px; aspect-ratio: 16 / 9; }
  .sw-path, .sw-order { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Sketchbook shelf ── */
.sk-shelf { margin-top: 18px; }
.sk-shelf h2 { margin: 4px 0 6px; font-family: var(--display); color: #f6d77e; }
.sk-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.sk-tabs a { padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(227,183,74,.3); color: #e7dfcc; font-size: 13px; }
.sk-tabs a[aria-current="page"] { background: var(--gold-grad); color: #1a1205; font-weight: 700; border-color: transparent; }
.sk-group h3 { margin: 12px 0 8px; color: #f3e2b0; }
.sk-group h3 small { color: #a8a294; font-weight: 400; }
.sk-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sk-card a { display: grid; gap: 4px; padding: 8px 8px 12px; border-radius: 14px; color: inherit; text-decoration: none; }
.sk-card svg { width: 100%; height: auto; border-radius: 10px; border: 1px solid rgba(227,183,74,.25); }
.sk-card b { color: #f6d77e; font-size: 14px; padding: 0 4px; }
.sk-card small { color: #a8a294; font-size: 12px; padding: 0 4px; }

/* ── A+ engines (aplus-engines.js): scene, market day, mentor, recall, wave ── */
.ax-page { display: grid; gap: 16px; }
.ax-hero h1 { margin: 4px 0 8px; }
.ax-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; }
.ax-rung { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(10,10,10,.6); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }
.ax-rung small { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #1b160c; color: var(--gold-hi); font-size: 12px; }
.ax-rung.on { background: var(--gold-grad); color: #1a1205; border-color: transparent; }
.ax-split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ax-stage { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-strong); background: #050505; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.ax-svg { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.ax-obj { cursor: pointer; outline: none; }
.ax-obj:hover .ph-hit, .ax-obj:focus-visible .ph-hit { stroke: rgba(246,215,126,.85); fill: rgba(246,215,126,.08); }
.ax-obj.on .ph-hit { stroke: #f6d77e; stroke-width: 3; fill: rgba(246,215,126,.1); }
.ax-obj.hint .ph-hit { stroke: #3fc6b8; stroke-width: 3; fill: rgba(63,198,184,.14); }
.ax-dot { fill: #f6d77e; stroke: rgba(0,0,0,.55); stroke-width: 2; pointer-events: none; animation: lc-dot 2.6s ease-in-out infinite; }
.ax-hint { margin: 0; padding: 10px 14px; color: #e7dfcc; background: rgba(0,0,0,.55); font-size: 14px; }
.ax-credit { margin: 0; padding: 0 14px 10px; background: rgba(0,0,0,.55); font-size: 12px; color: rgba(255,255,255,.62); }
.ax-card { padding: 18px; min-height: 220px; position: sticky; top: calc(var(--top-h, 64px) + 12px); }
.ax-card h2 { margin: 4px 0 10px; font-family: var(--display); font-size: 22px; color: var(--gold-hi); }
.ax-real, .ax-ladder, .ax-teach, .ax-recap { margin-top: 12px; padding: 12px; border-radius: 14px; border: 1px solid rgba(227,183,74,.25); background: rgba(0,0,0,.35); }
.ax-real p, .ax-teach p { margin: 6px 0; }
.ax-lad { display: grid; gap: 4px; margin-top: 8px; font-variant-numeric: tabular-nums; font-size: 14px; }
.ax-lad span { padding: 6px 10px; border-radius: 8px; }
.ax-lask { background: rgba(224,96,90,.16); color: #f2b3ae; } .ax-lbid { background: rgba(63,197,138,.16); color: #a7e7c9; }
.ax-spr { text-align: center; color: var(--gold-hi); font-size: 12px; letter-spacing: .06em; }
.ax-box { padding: 16px; } .ax-box h3 { margin: 0 0 8px; color: #f0d690; } .ax-box ul { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 6px; }
.ax-rec { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.ax-rec li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ax-quiz { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 10px; }
.ax-q { padding: 12px; display: grid; gap: 8px; }
.ax-q.ok { box-shadow: inset 0 0 0 2px rgba(70,167,88,.7); } .ax-q.no { box-shadow: inset 0 0 0 2px rgba(224,87,74,.6); }
.ax-ask { margin: 0; font-weight: 600; color: #f6efdc; }
.ax-opts { display: grid; gap: 6px; }
.ax-opt { text-align: left; padding: 10px 12px; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.4); color: var(--text); cursor: pointer; font: inherit; font-size: 14px; }
.ax-opt.on { border-color: var(--gold-hi); background: rgba(227,183,74,.16); }
.ax-opt.right { border-color: #46a758; background: rgba(70,167,88,.16); } .ax-opt.wrong { border-color: #e0574a; background: rgba(224,87,74,.14); }
.ax-opt:disabled { cursor: default; opacity: .9; }
.ax-score b, .ax-out b { color: var(--gold-hi); }
.ax-banner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); border-radius: 22px; overflow: hidden; border: 1px solid rgba(227,183,74,.35); }
.ax-banner-art .ax-svg { height: 100%; aspect-ratio: auto; min-height: 220px; }
.ax-banner-copy { padding: 22px clamp(16px, 3vw, 30px); display: grid; gap: 8px; align-content: center; }
.ax-banner-copy h1 { margin: 0; }
.ax-stops { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 8px; }
.ax-stop { display: grid; gap: 2px; text-align: left; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.45); color: var(--text); font: inherit; cursor: pointer; min-height: 64px; }
.ax-stop small { color: #a99f88; font-size: 11px; } .ax-stop b { color: #f3e2b0; font-size: 14px; } .ax-stop i { color: var(--gold); font-style: normal; font-size: 12px; }
.ax-stop.on { border-color: var(--gold-hi); box-shadow: 0 0 0 1px var(--gold-hi); }
.ax-stop:disabled { opacity: .4; cursor: default; }
.ax-stopbody { padding: 16px; display: grid; gap: 12px; }
.ax-stop-h h2 { margin: 2px 0 0; font-family: var(--display); color: var(--gold-hi); }
.ax-chartbox { display: grid; gap: 6px; }
.ax-chart { display: block; width: 100%; height: auto; max-height: 440px; border-radius: 14px; border: 1px solid rgba(227,183,74,.25); }
.ax-stopq { display: grid; gap: 10px; }
.ax-stopq .ax-opts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ax-recap ul { margin: 6px 0; padding-left: 18px; display: grid; gap: 6px; }
.ax-journal { display: grid; gap: 10px; }
.ax-journal label { display: grid; gap: 4px; } .ax-journal small { color: #a99f88; }
.ax-journal textarea { width: 100%; box-sizing: border-box; background: #0d0a06; color: #f6efdc; border: 1px solid rgba(227,183,74,.4); border-radius: 12px; padding: 10px; font: inherit; font-size: 16px; }
.ax-chip { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(227,183,74,.16); color: var(--gold-hi); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.ax-chip-no { background: rgba(224,87,74,.16); color: #f2b3ae; }
.ax-modes { display: flex; flex-wrap: wrap; gap: 6px; }
.ax-modes a { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 13px; min-height: 44px; display: inline-flex; align-items: center; }
.ax-modes a[aria-pressed="true"] { background: var(--gold-grad); color: #1a1205; border-color: transparent; font-weight: 700; }
.ax-recall { padding: 18px; display: grid; gap: 10px; }
.ax-recall h2 { margin: 0; font-family: var(--display); color: var(--gold-hi); }
.ax-up ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; } .ax-up small { color: #a99f88; }
.ax-wstage { min-height: 200px; } .ax-wstage .ax-chart { border: 0; border-radius: 0; }
.ax-wave-page .wv-opt { min-height: 44px; }
.ax-wave-page .wv-opt:disabled { cursor: default; }
.ax-wave-page .wv-card textarea { width: 100%; box-sizing: border-box; background: #0d0a06; color: #f6efdc; border: 1px solid rgba(227,183,74,.4); border-radius: 12px; padding: 10px; font: inherit; font-size: 16px; }
.lc-lesson { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; border-left: 3px solid var(--gold); background: rgba(227,183,74,.07); color: #f3e2b0; display: grid; gap: 4px; }
@media (max-width: 900px) {
  .ax-split, .ax-banner { grid-template-columns: minmax(0, 1fr); }
  .ax-card { position: static; min-height: 0; }
  .ax-stops { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .ax-stops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.cv-seg.ax-modes { width: fit-content; max-width: 100%; }
.cv-seg.ax-modes { border-radius: 18px; }
