:root {
  color-scheme: dark;
  --ink: #edf4ef;
  --muted: #93a69c;
  --line: rgba(218, 236, 226, 0.13);
  --panel: rgba(15, 37, 29, 0.9);
  --green: #337c60;
  --green-light: #9fd8b8;
  --gold: #edbd63;
  --cream: #f3f0e8;
  font-family: Inter, Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 320px; margin: 0; color: var(--ink); background: radial-gradient(circle at 86% 0%, rgba(133, 105, 43, .28), transparent 30rem), radial-gradient(circle at 0 55%, rgba(34, 109, 78, .25), transparent 34rem), #0b1c16; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.topbar { display: flex; min-height: 78px; align-items: center; gap: 16px; padding: 0 4vw; border-bottom: 1px solid var(--line); background: rgba(9, 24, 18, .82); backdrop-filter: blur(16px); }
.back-link { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); text-decoration: none; font-size: 20px; }
.brand-copy { flex: 1; }
.brand-copy p { margin: 0 0 2px; color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.brand-copy strong { font-size: 17px; }
.view-switch { display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; border: 1px solid rgba(237, 189, 99, .34); border-radius: 999px; color: #13251d; background: var(--gold); cursor: pointer; font-size: 12px; font-weight: 900; box-shadow: 0 10px 28px rgba(0, 0, 0, .18); transition: transform 180ms ease, box-shadow 180ms ease; }
.view-switch:hover, .view-switch:focus-visible { outline: none; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, .28); }
.view-switch b { font-size: 14px; }
.local-badge { padding: 8px 12px; border: 1px solid rgba(237, 189, 99, .28); border-radius: 999px; color: #e8c988; background: rgba(237, 189, 99, .08); font-size: 11px; font-weight: 800; letter-spacing: .08em; }

main { width: min(1500px, 94vw); margin: 0 auto; padding: 60px 0 80px; }
.overview-view { width: min(1280px, 92vw); padding-top: 76px; }
.overview-hero { display: flex; min-height: 290px; align-items: end; justify-content: space-between; gap: 70px; padding: 0 10px 54px; border-bottom: 1px solid var(--line); }
.overview-kicker { margin: 0 0 18px; color: var(--gold); font-size: 10px; font-weight: 900; letter-spacing: .22em; }
.overview-hero h1 { margin: 0; font-size: clamp(44px, 6vw, 76px); line-height: 1.02; letter-spacing: -.06em; }
.overview-hero h1 em { color: var(--green-light); font-family: Georgia, serif; font-weight: 500; }
.overview-hero > p { max-width: 440px; margin: 0 0 8px; color: #9fb0a7; font-size: 16px; line-height: 1.8; }
.category-overview { padding: 54px 0 82px; }
.overview-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 26px; padding: 0 10px; }
.overview-heading span { display: block; margin-bottom: 7px; color: var(--gold); font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.overview-heading h2 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.overview-heading > p { margin: 0; color: #768b80; font-size: 12px; }
.overview-heading > p strong { color: var(--green-light); font-size: 22px; }
.overview-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.overview-category-card { position: relative; display: grid; min-height: 320px; grid-template-columns: minmax(190px, .8fr) minmax(230px, 1.2fr); grid-template-rows: 1fr auto; gap: 16px 30px; overflow: hidden; padding: 30px; border: 1px solid rgba(218, 236, 226, .16); border-radius: 28px; background: linear-gradient(145deg, rgba(30, 72, 55, .88), rgba(11, 34, 25, .94)); box-shadow: 0 28px 65px rgba(0, 0, 0, .2); }
.overview-category-card--gold { background: linear-gradient(145deg, rgba(74, 66, 37, .82), rgba(22, 39, 29, .96)); }
.overview-category-art { position: relative; display: grid; min-height: 205px; grid-row: 1 / 3; place-items: center; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); border-radius: 22px; background: radial-gradient(circle, rgba(159, 216, 184, .12), transparent 62%), rgba(3, 17, 11, .25); }
.overview-category-card--gold .overview-category-art { background: radial-gradient(circle, rgba(237, 189, 99, .16), transparent 62%), rgba(3, 17, 11, .25); }
.overview-category-art > span { position: relative; z-index: 2; display: grid; width: 68px; height: 68px; place-items: center; border: 1px solid rgba(237, 189, 99, .38); border-radius: 50%; color: #183328; background: var(--gold); font-size: 15px; font-weight: 900; box-shadow: 0 0 0 13px rgba(237, 189, 99, .06); }
.overview-category-art i { position: absolute; width: 175px; height: 82px; border: 1px solid rgba(159, 216, 184, .22); border-radius: 50%; transform: rotate(30deg); }
.overview-category-art i:nth-of-type(2) { width: 112px; height: 210px; transform: rotate(58deg); }
.overview-category-art i:nth-of-type(3) { width: 210px; height: 112px; transform: rotate(-23deg); }
.overview-category-art b { position: absolute; top: 19%; right: 18%; color: var(--green-light); font-size: 20px; }
.overview-category-copy { align-self: end; }
.overview-category-copy p { margin: 0 0 9px; color: var(--gold); font-size: 11px; font-weight: 900; }
.overview-category-copy h3 { margin: 0; font-size: clamp(25px, 2.5vw, 37px); line-height: 1.06; letter-spacing: -.045em; }
.overview-category-copy > span { display: block; margin-top: 14px; color: #91a69b; font-size: 12px; line-height: 1.65; }
.overview-category-card dl { display: grid; grid-template-columns: repeat(3, 1fr); align-self: end; margin: 0; padding-top: 17px; border-top: 1px solid rgba(255, 255, 255, .1); }
.overview-category-card dl div { padding: 0 12px; border-left: 1px solid rgba(255, 255, 255, .08); }
.overview-category-card dl div:first-child { padding-left: 0; border-left: 0; }
.overview-category-card dt { color: #71877c; font-size: 9px; }
.overview-category-card dd { margin: 5px 0 0; color: #d9e8df; font-size: 14px; font-weight: 900; }
.structure-guide { padding: 78px 0 30px; border-top: 1px solid var(--line); }
.overview-heading--compact { align-items: center; margin-bottom: 36px; }
.structure-pyramid { position: relative; display: grid; justify-items: center; padding: 12px 0 28px; }
.pyramid-category { position: relative; z-index: 2; display: grid; width: min(620px, 72%); grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 25px 28px; border: 1px solid rgba(237, 189, 99, .32); border-radius: 24px; background: linear-gradient(135deg, rgba(35, 79, 60, .94), rgba(16, 43, 32, .94)); box-shadow: 0 24px 55px rgba(0, 0, 0, .22); }
.pyramid-step { position: absolute; top: -10px; left: 25px; padding: 5px 10px; border-radius: 999px; color: #173025; background: var(--gold); font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.pyramid-category .structure-symbol { margin: 0; }
.pyramid-category p { margin: 0 0 6px; color: var(--gold); font-size: 9px; font-weight: 900; }
.pyramid-category h3 { margin: 0; font-size: 27px; letter-spacing: -.035em; }
.pyramid-category div > span { display: block; margin-top: 7px; color: #93a89d; font-size: 11px; }
.pyramid-category dl { display: flex; margin: 0; }
.pyramid-category dl div { min-width: 62px; padding-left: 18px; border-left: 1px solid var(--line); }
.pyramid-category dt { color: #72877c; font-size: 8px; }
.pyramid-category dd { margin: 5px 0 0; color: var(--green-light); font-size: 16px; font-weight: 900; }
.pyramid-connector { position: relative; z-index: 1; width: 100%; height: 92px; }
.pyramid-connector::before { position: absolute; top: 0; bottom: 24px; left: 50%; width: 1px; content: ""; background: linear-gradient(var(--gold), rgba(237, 189, 99, .28)); }
.pyramid-connector::after { position: absolute; right: calc(16.666% - 1px); bottom: 23px; left: calc(16.666% - 1px); height: 1px; content: ""; background: rgba(237, 189, 99, .28); }
.pyramid-connector span { position: absolute; top: 28px; left: calc(50% + 14px); color: #6e8378; font-size: 8px; font-weight: 800; }
.pyramid-books { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pyramid-book { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: 22px; background: rgba(13, 37, 28, .82); }
.pyramid-book::before { position: absolute; bottom: 100%; left: 50%; width: 1px; height: 25px; content: ""; background: rgba(237, 189, 99, .28); }
.pyramid-book header { display: flex; min-width: 0; align-items: center; gap: 15px; padding: 22px; border-bottom: 1px solid var(--line); }
.pyramid-book-cover { display: grid; width: 54px; height: 70px; flex: 0 0 auto; place-items: center; border-radius: 3px 10px 10px 3px; color: #173025; background: linear-gradient(145deg, #6da789, #acd2bd); box-shadow: inset 6px 0 rgba(15, 45, 32, .16), 7px 9px 18px rgba(0, 0, 0, .22); font: 900 12px Georgia, serif; }
.pyramid-book--gold .pyramid-book-cover { background: linear-gradient(145deg, #d3a54f, #efd18b); }
.pyramid-book--sage .pyramid-book-cover { background: linear-gradient(145deg, #879c8e, #c4d1c8); }
.pyramid-book header > div { min-width: 0; }
.pyramid-book header small { color: var(--gold); font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.pyramid-book h3 { overflow: hidden; margin: 7px 0 6px; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.pyramid-book header p { margin: 0; color: #778d82; font-size: 9px; }
.pyramid-lessons { padding: 17px 20px 20px; }
.pyramid-lessons > p { margin: 0 0 8px; color: #72877c; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.pyramid-lessons ol { margin: 0; padding: 0; list-style: none; }
.pyramid-lessons li { display: grid; min-width: 0; grid-template-columns: 27px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 44px; border-top: 1px solid rgba(218, 236, 226, .08); }
.pyramid-lessons li > span { color: #687d72; font: 8px ui-monospace, monospace; }
.pyramid-lessons strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.pyramid-lessons small { color: var(--green-light); font-size: 8px; font-weight: 800; white-space: nowrap; }
.pyramid-word-connector { position: relative; width: 100%; height: 86px; }
.pyramid-word-connector::before { position: absolute; top: 0; bottom: 19px; left: 50%; width: 1px; content: ""; background: linear-gradient(rgba(237, 189, 99, .3), var(--gold)); }
.pyramid-word-connector::after { position: absolute; bottom: 14px; left: calc(50% - 4px); width: 7px; height: 7px; content: ""; border-right: 1px solid var(--gold); border-bottom: 1px solid var(--gold); transform: rotate(45deg); }
.pyramid-word-connector span { position: absolute; top: 26px; left: calc(50% + 14px); color: #74897e; font-size: 8px; font-weight: 800; }
.pyramid-wordcards { display: grid; width: min(1080px, 92%); grid-template-columns: 230px minmax(0, 1fr); align-items: center; gap: 25px; padding: 25px; border: 1px solid rgba(159, 216, 184, .24); border-radius: 25px; background: linear-gradient(135deg, rgba(25, 65, 49, .85), rgba(8, 29, 21, .92)); box-shadow: 0 25px 60px rgba(0, 0, 0, .18); }
.pyramid-wordcards > header { padding: 5px 7px; }
.pyramid-wordcards > header > span { color: var(--gold); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.pyramid-wordcards > header h3 { margin: 8px 0 7px; font-size: 23px; letter-spacing: -.035em; }
.pyramid-wordcards > header p { margin: 0; color: #82978c; font-size: 10px; line-height: 1.65; }
.pyramid-wordcard-list { display: grid; min-width: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.pyramid-wordcard-list article { display: flex; min-width: 0; min-height: 126px; padding: 15px; flex-direction: column; border: 1px solid rgba(255, 255, 255, .09); border-radius: 15px; background: rgba(4, 18, 12, .36); }
.pyramid-wordcard-list small { color: #778d81; font-size: 7px; font-weight: 900; }
.pyramid-wordcard-list strong { overflow: hidden; margin-top: 15px; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.pyramid-wordcard-list article > span { overflow: hidden; margin-top: 5px; color: var(--green-light); text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.pyramid-wordcard-list p { margin: auto 0 0; color: #64796e; font-size: 7px; }
.pyramid-wordcard-list .pyramid-wordcard-more { align-items: center; justify-content: center; text-align: center; }
.pyramid-wordcard-more strong { margin: 0; color: var(--gold); font-size: 24px; }
.pyramid-wordcard-more span { white-space: normal !important; }
.structure-symbol { display: flex; width: 82px; height: 82px; align-items: center; justify-content: center; gap: 6px; margin-bottom: 30px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 22px; background: rgba(255, 255, 255, .035); }
.structure-symbol--category { position: relative; }
.structure-symbol--category i { position: absolute; width: 55px; height: 25px; border: 1px solid rgba(237, 189, 99, .35); border-radius: 50%; transform: rotate(33deg); }
.structure-symbol--category i:nth-child(2) { transform: rotate(-33deg); }
.structure-symbol--category i:nth-child(3) { width: 28px; height: 65px; transform: rotate(70deg); }
.structure-symbol--category b { position: relative; display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; color: #183328; background: var(--gold); font-size: 10px; }
.structure-symbol--book { align-items: end; padding-bottom: 16px; }
.structure-symbol--book i { width: 12px; height: 42px; border-radius: 3px; background: #76ab90; }
.structure-symbol--book i:nth-child(2) { height: 54px; background: var(--gold); }
.structure-symbol--book i:nth-child(3) { height: 35px; background: #d7e7de; }
.structure-symbol--lesson { display: grid; grid-template-columns: repeat(2, 19px); grid-template-rows: repeat(2, 19px); gap: 6px; }
.structure-symbol--lesson i { border-radius: 5px; background: var(--green-light); }
.structure-symbol--lesson i:last-child { background: rgba(159, 216, 184, .18); }
.implementation-guide { padding: 78px 0 34px; border-top: 1px solid var(--line); }
.implementation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.code-panel { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: rgba(12, 34, 25, .78); }
.code-panel--schema { background: linear-gradient(145deg, rgba(28, 64, 49, .8), rgba(10, 29, 21, .9)); }
.code-panel > header { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 11px; margin-bottom: 22px; }
.code-panel > header > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; color: #173025; background: var(--gold); font-size: 9px; font-weight: 900; }
.code-panel header p { margin: 0 0 3px; color: #748a7f; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.code-panel h3 { margin: 0; font-size: 17px; }
.code-panel header code { color: #758b80; font-size: 9px; }
.code-panel pre { margin: 0 0 20px; padding: 20px; overflow-x: auto; border: 1px solid rgba(159, 216, 184, .12); border-radius: 14px; color: #b7d8c5; background: rgba(3, 14, 9, .5); font: 11px/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-panel .compact-code { min-height: 154px; color: #d2c18f; }
.code-panel > p { margin: 0; color: #8ea299; font-size: 11px; line-height: 1.75; }
.code-panel > p code { color: var(--green-light); }
.code-rules { display: grid; gap: 10px; }
.code-rules p { display: grid; grid-template-columns: 150px 1fr; gap: 14px; margin: 0; padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.code-rules p:first-child { padding-top: 0; border-top: 0; }
.code-rules strong { color: var(--green-light); font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-rules span { color: #8ea299; font-size: 10px; line-height: 1.6; }
.field-mapping { display: grid; gap: 0; }
.field-mapping p { display: grid; min-width: 0; grid-template-columns: minmax(130px, .8fr) 22px minmax(180px, 1.2fr); align-items: center; gap: 8px; margin: 0; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.field-mapping p:first-child { padding-top: 0; border-top: 0; }
.field-mapping code { color: #b8d7c6; font: 9px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.field-mapping b { color: rgba(237, 189, 99, .55); text-align: center; }
.field-mapping span code { color: var(--gold); }
.state-pipeline { display: flex; min-height: 88px; align-items: center; justify-content: center; gap: 9px; margin-bottom: 20px; padding: 14px; border-radius: 14px; background: rgba(3, 14, 9, .42); }
.state-pipeline span { padding: 8px 10px; border: 1px solid rgba(159, 216, 184, .16); border-radius: 9px; color: #b8d3c4; font-size: 9px; font-weight: 800; }
.state-pipeline b { color: rgba(237, 189, 99, .5); font-size: 10px; }
.file-map { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 18px; padding: 18px 22px; border: 1px dashed rgba(237, 189, 99, .2); border-radius: 17px; }
.file-map p { margin: 0; }
.file-map code, .file-map span { display: block; }
.file-map code { color: var(--gold); font-size: 10px; }
.file-map span { margin-top: 5px; color: #748a7f; font-size: 9px; }
.file-map b { color: #53685d; }
.applied-model, .deferred-model { margin-top: 22px; padding: 29px; border: 1px solid var(--line); border-radius: 22px; background: rgba(11, 33, 24, .66); }
.applied-model > header, .deferred-model > header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 440px); align-items: end; margin-bottom: 22px; }
.applied-model > header > span, .deferred-model > header > span { grid-column: 1; margin-bottom: 6px; color: var(--gold); font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.applied-model > header h3, .deferred-model > header h3 { grid-column: 1; margin: 0; font-size: 22px; letter-spacing: -.035em; }
.applied-model > header p, .deferred-model > header p { grid-column: 2; grid-row: 1 / 3; margin: 0; color: #7c9186; font-size: 10px; line-height: 1.65; }
.attribute-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.attribute-grid article { min-width: 0; padding: 18px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 15px; background: rgba(3, 16, 10, .3); }
.attribute-grid small { color: var(--gold); font-size: 8px; font-weight: 900; }
.attribute-grid h4 { margin: 6px 0 13px; font-size: 14px; }
.attribute-grid p { margin: 5px 0 0; color: #73887d; font-size: 9px; line-height: 1.8; }
.attribute-grid code, .deferred-model code { color: var(--green-light); font: 8px ui-monospace, monospace; }
.deferred-model { margin-top: 48px; border-color: rgba(237, 189, 99, .18); background: linear-gradient(145deg, rgba(51, 47, 28, .35), rgba(11, 31, 23, .68)); }
.deferred-model > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.deferred-model article { min-width: 0; padding: 16px; border-top: 1px solid rgba(237, 189, 99, .18); background: rgba(3, 16, 10, .16); }
.deferred-model article strong { font-size: 11px; }
.deferred-model article p { margin: 7px 0 0; color: #778b80; font-size: 9px; line-height: 1.6; }

.workspace-view { width: min(1280px, 92vw); padding-top: 38px; }
.tester { min-height: 760px; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: rgba(9, 28, 20, .8); box-shadow: 0 34px 85px rgba(0, 0, 0, .24); }
.tester-topbar { display: flex; min-height: 76px; align-items: center; gap: 24px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(7, 23, 16, .7); }
.tester-back { min-width: 95px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 999px; color: #b6c7be; background: rgba(255, 255, 255, .03); cursor: pointer; font-size: 10px; font-weight: 800; }
.tester-progress { display: flex; flex: 1; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tester-progress li { display: flex; min-width: 122px; align-items: center; gap: 8px; color: #61766b; font-size: 10px; font-weight: 800; }
.tester-progress li::after { width: 38px; height: 1px; margin-left: 7px; content: ""; background: rgba(255, 255, 255, .08); }
.tester-progress li:last-child::after { display: none; }
.tester-progress li span { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 9px; }
.tester-progress li.is-active { color: var(--ink); }
.tester-progress li.is-active span { border-color: var(--gold); color: #173025; background: var(--gold); box-shadow: 0 0 0 5px rgba(237, 189, 99, .07); }
.tester-progress li.is-complete { color: var(--green-light); }
.tester-progress li.is-complete span { border-color: var(--green); background: rgba(51, 124, 96, .22); }
.tester-stage { padding: 48px; }
.tester-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 430px); align-items: end; gap: 40px; margin-bottom: 38px; }
.tester-heading p { grid-column: 1; margin: 0 0 10px; color: var(--gold); font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.tester-heading h1 { grid-column: 1; margin: 0; font-size: clamp(40px, 5vw, 64px); line-height: 1.03; letter-spacing: -.055em; }
.tester-heading h1 em { color: var(--green-light); font-family: Georgia, serif; font-weight: 500; }
.tester-heading > span { grid-column: 2; grid-row: 1 / 3; align-self: end; padding-bottom: 7px; color: #8fa399; font-size: 13px; line-height: 1.7; }
.test-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.test-category-card { position: relative; display: grid; min-height: 360px; grid-template-columns: minmax(210px, .85fr) minmax(240px, 1.15fr); grid-template-rows: 1fr auto; gap: 20px 28px; overflow: hidden; padding: 28px; border: 1px solid rgba(218, 236, 226, .16); border-radius: 26px; color: inherit; background: linear-gradient(145deg, rgba(31, 73, 56, .88), rgba(11, 34, 25, .94)); cursor: pointer; text-align: left; box-shadow: 0 25px 60px rgba(0, 0, 0, .18); transition: transform 190ms ease, border-color 190ms ease; }
.test-category-card--gold { background: linear-gradient(145deg, rgba(76, 67, 37, .84), rgba(22, 39, 29, .96)); }
.test-category-card:hover, .test-category-card:focus-visible { outline: none; transform: translateY(-6px); border-color: rgba(237, 189, 99, .52); }
.test-category-art { position: relative; display: grid; min-height: 250px; grid-row: 1 / 3; place-items: center; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); border-radius: 21px; background: rgba(3, 17, 11, .24); }
.test-category-art > span { position: relative; z-index: 2; display: grid; width: 68px; height: 68px; place-items: center; border-radius: 50%; color: #173025; background: var(--gold); font-size: 14px; font-weight: 900; box-shadow: 0 0 0 12px rgba(237, 189, 99, .06); }
.test-category-art i { position: absolute; width: 180px; height: 82px; border: 1px solid rgba(159, 216, 184, .22); border-radius: 50%; transform: rotate(30deg); }
.test-category-art i:nth-of-type(2) { width: 110px; height: 210px; transform: rotate(58deg); }
.test-category-art i:nth-of-type(3) { width: 210px; height: 110px; transform: rotate(-23deg); }
.test-category-art > b { position: absolute; top: 19%; right: 18%; color: var(--green-light); }
.test-category-copy { align-self: end; }
.test-category-copy small, .test-category-copy strong, .test-category-copy > span { display: block; }
.test-category-copy small { margin-bottom: 8px; color: var(--gold); font-size: 10px; font-weight: 900; }
.test-category-copy strong { font-size: clamp(25px, 2.5vw, 36px); line-height: 1.06; letter-spacing: -.045em; }
.test-category-copy > span { margin-top: 13px; color: #8ea299; font-size: 11px; }
.test-category-stats { display: flex; align-self: end; gap: 16px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .09); color: #73887d; font-size: 9px; }
.test-category-stats span { white-space: nowrap; }
.test-category-stats b { margin-right: 3px; color: #dbe7e0; font-size: 12px; }
.test-category-arrow { position: absolute; right: 25px; bottom: 23px; color: var(--gold); font-size: 10px; }
.tester-stage--book .bookshelf { min-height: 540px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.tester-stage--lesson { padding-right: 90px; padding-left: 90px; }
.tester-stage--lesson .chapter-drawer { max-width: 900px; min-height: 520px; margin: 0 auto; border-radius: 24px; animation: chapters-unfold 300ms ease both; }
.tester-stage--lesson .chapter-list { padding: 18px 30px 30px; }
.hero { margin-bottom: 42px; }
.eyebrow { margin: 0 0 15px; color: var(--gold); font-size: 11px; font-weight: 900; letter-spacing: .22em; }
.hero-row { display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.hero h1 { margin: 0; font-size: clamp(34px, 4vw, 58px); line-height: 1.08; letter-spacing: -.045em; }
.hero h1 em { color: var(--green-light); font-family: Georgia, serif; font-weight: 500; }
.hero-row > p { max-width: 500px; margin: 0 0 5px; color: var(--muted); line-height: 1.7; }

.library { display: grid; min-height: 760px; grid-template-columns: 310px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: rgba(10, 27, 21, .82); box-shadow: 0 32px 80px rgba(0, 0, 0, .24); }
.navigator { padding: 28px 24px; border-right: 1px solid var(--line); background: var(--panel); }
.nav-heading { display: flex; align-items: center; gap: 13px; }
.nav-heading > span { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; color: #102219; background: var(--gold); font-size: 12px; font-weight: 900; }
.nav-heading p, .section-label { margin: 0; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .2em; }
.nav-heading h2 { margin: 3px 0 0; font-size: 19px; }
.library-search, .word-toolbar label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(5, 14, 11, .4); }
.library-search { margin: 27px 0 18px; padding: 0 13px; }
.library-search span, .word-toolbar label span { color: var(--muted); font-size: 20px; }
input[type="search"] { width: 100%; min-width: 0; padding: 12px 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
input::placeholder { color: #61766b; }
.category-list, .book-list { display: grid; gap: 10px; }
.category-button, .book-button, .lesson-button { border: 0; color: inherit; text-align: left; background: transparent; cursor: pointer; }
.category-button { display: grid; min-height: 88px; grid-template-columns: 58px 1fr; grid-template-rows: auto auto auto; align-items: center; column-gap: 13px; padding: 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(5, 16, 12, .25); transition: transform 180ms ease, border-color 180ms ease, background 180ms ease; }
.category-button:hover { transform: translateY(-2px); }
.category-art { position: relative; display: grid; width: 54px; height: 54px; grid-column: 1; grid-row: 1 / 4; place-items: center; overflow: hidden; border-radius: 15px; background: linear-gradient(145deg, rgba(237, 189, 99, .28), rgba(55, 126, 96, .28)); }
.category-art i { position: absolute; width: 32px; height: 32px; border: 1px solid rgba(237, 189, 99, .34); border-radius: 50%; }
.category-art i:nth-child(2) { width: 19px; height: 45px; transform: rotate(55deg); }
.category-art i:nth-child(3) { width: 5px; height: 5px; border: 0; background: var(--gold); box-shadow: 18px 12px 0 var(--green-light), -13px 16px 0 rgba(237, 189, 99, .65); }
.category-art b { position: relative; z-index: 1; color: var(--cream); font-size: 10px; }
.category-caption { align-self: end; color: var(--muted); font-size: 9px; }
.category-button > strong { align-self: center; font-size: 13px; }
.category-button > small { align-self: start; color: #60766b; font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.category-button.is-active { border-color: rgba(159, 216, 184, .34); background: linear-gradient(110deg, rgba(63, 132, 99, .24), rgba(237, 189, 99, .06)); }
.category-button.is-active strong { color: var(--green-light); }
.category-button.is-active .category-art { box-shadow: 0 8px 24px rgba(23, 90, 64, .25); }
.book-section { margin-top: 27px; padding-top: 22px; border-top: 1px solid var(--line); }
.section-label { margin: 0 0 12px 13px; }
.book-button { display: grid; width: 100%; min-height: 66px; grid-template-columns: 40px 1fr auto; align-items: center; gap: 11px; padding: 9px 12px 9px 9px; border: 1px solid transparent; border-radius: 13px; color: #9eb0a7; }
.book-cover { position: relative; display: grid; width: 37px; height: 48px; place-items: center; overflow: hidden; border-radius: 4px 9px 9px 4px; color: #173126; background: linear-gradient(145deg, #d4a94f, #e7c77d); box-shadow: inset 4px 0 rgba(63, 54, 28, .18), 0 6px 14px rgba(0, 0, 0, .18); }
.book-cover i { position: absolute; top: 8px; right: 5px; width: 19px; height: 1px; background: rgba(24, 54, 42, .28); box-shadow: 0 4px rgba(24, 54, 42, .18); }
.book-cover b { position: relative; opacity: 1; color: #173126; font-size: 9px; }
.book-copy { min-width: 0; }
.book-copy strong, .book-copy small { display: block; }
.book-copy strong { overflow: hidden; color: inherit; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.book-copy small { margin-top: 5px; color: #60766b; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.book-arrow { opacity: 0; color: var(--gold); }
.book-button:hover, .book-button.is-active { border-color: rgba(255, 255, 255, .05); color: var(--ink); background: rgba(255, 255, 255, .04); }
.book-button.is-active .book-arrow { opacity: 1; }
.book-button.is-active .book-cover { background: linear-gradient(145deg, #75b292, #b0dfc5); }

.content { min-width: 0; padding: 29px 32px 34px; }
.breadcrumbs { display: flex; align-items: center; gap: 9px; min-height: 24px; color: #72877c; font-size: 11px; }
.breadcrumbs b { color: #46594f; }
.breadcrumbs strong { color: #b8c7bf; }
.journey-map { display: grid; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr); align-items: center; margin-top: 20px; padding: 12px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(110deg, rgba(22, 57, 43, .72), rgba(9, 29, 21, .55)); }
.journey-stage { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 12px; border-radius: 15px; background: rgba(3, 15, 10, .26); animation: stage-arrive 280ms ease both; }
.journey-stage--book { animation-delay: 50ms; }
.journey-stage--lesson { animation-delay: 100ms; }
.journey-art { position: relative; display: grid; width: 52px; height: 52px; flex: 0 0 auto; place-items: center; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); border-radius: 15px; background: rgba(255, 255, 255, .04); }
.journey-art--category > span { position: relative; z-index: 2; display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: #183428; background: var(--gold); font-size: 9px; font-weight: 900; }
.journey-art--category i { position: absolute; width: 38px; height: 18px; border: 1px solid rgba(237, 189, 99, .36); border-radius: 50%; transform: rotate(30deg); }
.journey-art--category i:nth-child(2) { transform: rotate(-30deg); }
.journey-art--category i:nth-child(3) { width: 4px; height: 4px; border: 0; background: var(--green-light); box-shadow: 25px 8px 0 var(--gold), -19px -7px 0 rgba(159, 216, 184, .65); }
.journey-art--book { align-items: end; padding: 9px; }
.journey-art--book i { width: 8px; height: 31px; border-radius: 3px 3px 1px 1px; background: #78ac91; box-shadow: inset 0 -5px rgba(0, 0, 0, .14); transform: rotate(-5deg); }
.journey-art--book i:nth-child(2) { height: 38px; background: var(--gold); transform: none; }
.journey-art--book i:nth-child(3) { height: 27px; background: #d9eee4; transform: rotate(5deg); }
.journey-art--lesson { grid-template-columns: repeat(2, 12px); grid-template-rows: repeat(2, 12px); gap: 4px; }
.journey-art--lesson i { width: 12px; height: 12px; border-radius: 3px; background: rgba(159, 216, 184, .28); }
.journey-art--lesson i:nth-child(-n+3) { background: var(--green-light); }
.journey-art--lesson span { position: absolute; right: 5px; bottom: 5px; display: grid; width: 16px; height: 16px; place-items: center; border-radius: 50%; color: #173126; background: var(--gold); font-size: 8px; font-weight: 900; }
.journey-copy { min-width: 0; }
.journey-copy p { margin: 0 0 5px; color: #6f867a; font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.journey-copy p b { margin-right: 5px; color: var(--gold); }
.journey-copy strong, .journey-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.journey-copy strong { font-size: 12px; }
.journey-copy span { margin-top: 4px; color: #789084; font-size: 8px; }
.journey-bridge { display: flex; align-items: center; color: rgba(237, 189, 99, .6); }
.journey-bridge i { width: 100%; height: 1px; background: repeating-linear-gradient(90deg, rgba(237, 189, 99, .32) 0 4px, transparent 4px 8px); }
.journey-bridge b { font-size: 15px; }
@keyframes stage-arrive { from { opacity: .35; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.book-header { display: flex; align-items: end; justify-content: space-between; padding: 26px 0 22px; }
.book-header p, .lesson-header p { margin: 0 0 8px; color: var(--gold); font-size: 10px; font-weight: 900; letter-spacing: .18em; }
.book-header h2 { margin: 0 0 7px; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.04em; }
.book-header > div > span, .lesson-header > div > span { color: var(--muted); font-size: 13px; }
.book-stat { display: grid; min-width: 82px; place-items: center; padding-left: 24px; border-left: 1px solid var(--line); }
.book-stat strong { color: var(--green-light); font-size: 31px; }
.book-stat span { margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.lesson-strip { position: relative; display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 18px; }
.lesson-button { display: flex; min-width: 190px; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 15px; background: rgba(5, 16, 12, .25); }
.lesson-node { position: relative; display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .05); }
.lesson-node b { position: relative; z-index: 2; color: #81978c; font-size: 9px; }
.lesson-node i { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--green-light) 0 var(--lesson-progress), rgba(255, 255, 255, .08) var(--lesson-progress) 100%); mask: radial-gradient(circle, transparent 58%, #000 60%); }
.lesson-copy { min-width: 0; }
.lesson-copy strong, .lesson-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-copy strong { font-size: 12px; }
.lesson-copy small { margin-top: 6px; color: #687e73; font-size: 7px; font-weight: 900; letter-spacing: .06em; }
.lesson-button.is-active { border-color: rgba(237, 189, 99, .45); background: linear-gradient(110deg, rgba(237, 189, 99, .12), rgba(63, 132, 99, .12)); }
.lesson-button.is-active .lesson-node { background: rgba(237, 189, 99, .13); box-shadow: 0 0 0 4px rgba(237, 189, 99, .05); }
.lesson-button.is-active .lesson-node b { color: var(--gold); }

.lesson-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: rgba(17, 42, 32, .76); }
.lesson-header { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 26px 28px; }
.lesson-header h3 { margin: 0 0 6px; font-size: 25px; letter-spacing: -.03em; }
.lesson-actions { display: flex; align-items: center; gap: 12px; }
.word-count { color: var(--green-light); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.start-study-button { padding: 11px 14px; border: 1px solid var(--gold); border-radius: 10px; color: #102219; background: var(--gold); cursor: pointer; font-size: 11px; font-weight: 900; }
.start-study-button:hover, .start-study-button:focus-visible { border-color: #ffe0a0; background: #ffe0a0; outline: none; }
.export-button { padding: 11px 14px; border: 0; border-radius: 10px; color: #102219; background: var(--gold); cursor: pointer; font-size: 11px; font-weight: 900; }
.export-button b { margin-left: 6px; }
.progress-row { padding: 16px 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(5, 16, 12, .25); }
.progress-row > div:first-child { display: flex; justify-content: space-between; margin-bottom: 9px; font-size: 11px; }
.progress-row span { color: var(--green-light); font-weight: 800; }
.progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green-light); transition: width 180ms ease; }
.word-toolbar { display: flex; justify-content: space-between; gap: 12px; padding: 15px 28px; }
.word-toolbar label { width: min(360px, 70%); padding: 0 12px; }
.word-toolbar button { border: 0; color: #81978b; background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th { padding: 11px 13px; color: #71867b; background: rgba(3, 13, 9, .28); text-align: left; font-size: 8px; letter-spacing: .14em; }
th:first-child, td:first-child { width: 55px; text-align: center; }
td { padding: 13px; border-top: 1px solid rgba(218, 236, 226, .07); color: #a9b8b0; font-size: 11px; }
td:nth-child(2) { min-width: 150px; }
td:nth-child(3) { min-width: 120px; color: #dce7e0; font-weight: 700; }
td:nth-child(4) { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tr.is-learned { opacity: .56; }
tr.is-learned strong { text-decoration: line-through; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green); cursor: pointer; }
.word-number { display: inline-block; width: 28px; color: #597066; font: 9px ui-monospace, monospace; }
td strong { color: var(--ink); font-size: 13px; }
.source-chip { padding: 5px 7px; border: 1px solid rgba(159, 216, 184, .18); border-radius: 99px; color: #8fc3a7; font-size: 8px; font-weight: 900; }
.empty-result { margin: 0; padding: 40px; color: var(--muted); text-align: center; }
.source-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 28px; border-top: 1px solid var(--line); background: rgba(3, 13, 9, .24); }
.source-footer > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.source-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--gold); background: rgba(237, 189, 99, .1); }
.source-footer p { margin: 0 0 3px; color: #6f857a; font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.source-footer strong { display: block; font-size: 11px; }
.source-footer div div > span { display: block; overflow: hidden; margin-top: 3px; color: #768b80; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.source-footer a { flex: 0 0 auto; color: var(--gold); font-size: 10px; font-weight: 800; text-decoration: none; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; padding: 13px 17px; border: 1px solid rgba(237, 189, 99, .35); border-radius: 11px; color: #16241d; background: var(--gold); box-shadow: 0 14px 40px rgba(0, 0, 0, .32); font-size: 12px; font-weight: 800; }

/* Central bookshelf */
.shelf-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: stretch; }
.shelf-stage:has(.chapter-drawer:not([hidden])) { grid-template-columns: minmax(390px, .9fr) minmax(390px, 1.1fr); }
.shelf-header { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: 8px 4px 28px; }
.shelf-header p { margin: 0 0 9px; color: var(--gold); font-size: 9px; font-weight: 900; letter-spacing: .18em; }
.shelf-header h2 { margin: 0 0 8px; font-size: clamp(30px, 3vw, 44px); letter-spacing: -.045em; }
.shelf-header > div > span { color: var(--muted); font-size: 13px; }
.shelf-count { display: grid; min-width: 82px; place-items: center; padding-left: 24px; border-left: 1px solid var(--line); }
.shelf-count strong { color: var(--green-light); font-size: 32px; }
.shelf-count span { margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.bookshelf { position: relative; display: grid; min-height: 410px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); align-items: end; gap: 32px 22px; padding: 40px 34px 48px; border: 1px solid var(--line); border-radius: 24px 24px 8px 8px; background: radial-gradient(circle at 50% 110%, rgba(237, 189, 99, .12), transparent 48%), linear-gradient(180deg, rgba(8, 25, 18, .42), rgba(18, 43, 33, .72)); }
.bookshelf::after { position: absolute; right: -6px; bottom: -11px; left: -6px; height: 16px; content: ""; border-radius: 3px 3px 8px 8px; background: linear-gradient(180deg, #8e6a39, #4d361f); box-shadow: 0 14px 25px rgba(0, 0, 0, .36), inset 0 2px rgba(255, 255, 255, .14); }
.shelf-book-button { min-width: 0; padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; text-align: left; perspective: 900px; }
.shelf-book { position: relative; display: flex; width: 150px; height: 220px; margin: 0 auto; padding: 27px 18px 22px 27px; flex-direction: column; overflow: hidden; border-radius: 4px 14px 14px 4px; color: #10241b; background: linear-gradient(145deg, #6eaa8c, #a7d1ba); box-shadow: inset 8px 0 rgba(25, 53, 41, .16), inset -2px 0 rgba(255, 255, 255, .2), 10px 16px 25px rgba(0, 0, 0, .32); transform-origin: left bottom; transition: transform 220ms ease, box-shadow 220ms ease; }
.shelf-book-button:hover .shelf-book, .shelf-book-button:focus-visible .shelf-book { transform: translateY(-12px) rotateY(-7deg); box-shadow: inset 8px 0 rgba(25, 53, 41, .16), inset -2px 0 rgba(255, 255, 255, .2), 18px 25px 34px rgba(0, 0, 0, .4); }
.shelf-book-button.is-active .shelf-book { transform: translateY(-14px) rotateY(-9deg); outline: 2px solid rgba(237, 189, 99, .72); outline-offset: 5px; }
.shelf-book-button.is-active .shelf-book-info > strong { color: var(--gold); }
.shelf-book-button:focus-visible { outline: 2px solid var(--gold); outline-offset: 8px; border-radius: 10px; }
.shelf-book--gold { background: linear-gradient(145deg, #d2a34c, #efd18b); }
.shelf-book--sage { background: linear-gradient(145deg, #849b8c, #c3d0c7); }
.shelf-book__spine { position: absolute; top: 0; bottom: 0; left: 10px; width: 1px; background: rgba(20, 48, 36, .18); box-shadow: 3px 0 rgba(255, 255, 255, .15); }
.shelf-book__mark { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid rgba(16, 36, 27, .28); border-radius: 50%; font-family: Georgia, serif; font-weight: 900; }
.shelf-book > small { margin-top: auto; font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.shelf-book > strong { margin: 9px 0 12px; font-size: 19px; line-height: 1.08; letter-spacing: -.045em; }
.shelf-book > em { position: absolute; top: 24px; right: 17px; font: normal 9px ui-monospace, monospace; }
.shelf-book__lines { width: 42px; height: 1px; background: rgba(16, 36, 27, .3); box-shadow: 0 5px rgba(16, 36, 27, .18); }
.shelf-book-info { display: block; margin-top: 23px; text-align: center; }
.shelf-book-info > strong, .shelf-book-info > span, .shelf-book-info > small { display: block; }
.shelf-book-info > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.shelf-book-info > span { margin-top: 6px; color: #748a7f; font-size: 8px; font-weight: 900; letter-spacing: .07em; }
.shelf-book-info > i { display: block; height: 3px; margin: 12px auto 7px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.shelf-book-info > i b { display: block; height: 100%; background: var(--green-light); }
.shelf-book-info > small { color: #698075; font-size: 7px; font-weight: 900; letter-spacing: .1em; }
.shelf-board { display: flex; align-items: center; gap: 12px; margin-top: 29px; padding: 18px 21px; border: 1px dashed rgba(159, 216, 184, .2); border-radius: 15px; color: #758b80; }
.shelf-board > span { color: var(--gold); }
.shelf-board p { margin: 0; color: #b4c3bb; font-size: 12px; font-weight: 800; }
.shelf-board small { margin-left: auto; font-size: 9px; }
.chapter-drawer { position: relative; min-width: 0; overflow: hidden; border: 1px solid rgba(237, 189, 99, .24); border-radius: 8px 24px 24px 8px; background: linear-gradient(110deg, rgba(28, 59, 46, .94), rgba(12, 34, 25, .94)); box-shadow: -18px 18px 45px rgba(0, 0, 0, .22); animation: chapters-unfold 300ms cubic-bezier(.2, .75, .25, 1) both; }
.chapter-drawer::before { position: absolute; top: 18px; bottom: 18px; left: 0; width: 4px; content: ""; border-radius: 0 5px 5px 0; background: var(--gold); opacity: .65; }
.chapter-drawer__header { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 27px 27px 21px 30px; border-bottom: 1px solid var(--line); }
.chapter-drawer__header p { margin: 0 0 7px; color: var(--gold); font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.chapter-drawer__header h2 { margin: 0 0 6px; font-size: 25px; letter-spacing: -.04em; }
.chapter-drawer__header > div > span { display: block; max-width: 390px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.chapter-list { display: grid; gap: 0; padding: 8px 18px 18px 21px; }
.chapter-button { display: grid; width: 100%; min-width: 0; grid-template-columns: 37px minmax(0, 1fr) 42px 20px; align-items: center; gap: 13px; padding: 15px 10px; border: 0; border-bottom: 1px solid rgba(218, 236, 226, .08); color: inherit; background: transparent; cursor: pointer; text-align: left; transition: padding 180ms ease, background 180ms ease; }
.chapter-button:last-child { border-bottom: 0; }
.chapter-button:hover, .chapter-button:focus-visible { padding-left: 16px; outline: none; border-radius: 12px; background: rgba(237, 189, 99, .07); }
.chapter-number { color: #6e8378; font: 10px ui-monospace, monospace; }
.chapter-copy { min-width: 0; }
.chapter-copy small, .chapter-copy strong, .chapter-copy > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter-copy small { color: var(--gold); font-size: 7px; font-weight: 900; letter-spacing: .13em; }
.chapter-copy strong { margin: 5px 0; font-size: 13px; }
.chapter-copy > span { color: #768c81; font-size: 9px; }
.chapter-progress { display: flex; align-items: center; gap: 7px; }
.chapter-progress > i { display: flex; width: 4px; height: 33px; align-items: end; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.chapter-progress > i b { width: 100%; min-height: 2px; background: var(--green-light); }
.chapter-progress small { color: #71877c; font-size: 7px; font-weight: 900; line-height: 1.35; }
.chapter-arrow { color: var(--gold); transition: transform 180ms ease; }
.chapter-button:hover .chapter-arrow { transform: translateX(4px); }
@keyframes chapters-unfold { from { opacity: 0; transform: translateX(-28px) scaleX(.94); transform-origin: left; } to { opacity: 1; transform: translateX(0) scaleX(1); transform-origin: left; } }

/* Book detail modal */
.book-modal { width: min(1080px, calc(100vw - 40px)); max-width: none; height: min(780px, calc(100vh - 40px)); max-height: none; padding: 0; overflow: hidden; border: 1px solid rgba(218, 236, 226, .2); border-radius: 26px; color: var(--ink); background: #0d2119; box-shadow: 0 40px 110px rgba(0, 0, 0, .65); }
.book-modal::backdrop { background: rgba(3, 12, 8, .76); backdrop-filter: blur(9px); }
.modal-shell { display: flex; height: 100%; flex-direction: column; }
.modal-topbar { display: flex; min-height: 64px; align-items: center; padding: 0 20px 0 28px; border-bottom: 1px solid var(--line); background: rgba(8, 24, 17, .92); }
.modal-topbar .breadcrumbs { flex: 1; }
.modal-close { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: rgba(255, 255, 255, .03); cursor: pointer; font-size: 24px; line-height: 1; }
.modal-close:hover { border-color: rgba(237, 189, 99, .45); color: var(--gold); }
.modal-scroll { overflow-y: auto; padding: 22px 28px 30px; }
.book-modal .table-wrap { max-height: 350px; overflow: auto; }

@media (max-width: 1180px) and (min-width: 901px) {
  .shelf-stage:has(.chapter-drawer:not([hidden])) { grid-template-columns: minmax(330px, .8fr) minmax(370px, 1.2fr); }
  .bookshelf { padding-right: 18px; padding-left: 18px; }
  .shelf-book { width: 130px; height: 195px; }
  .journey-stage { gap: 8px; padding: 10px; }
  .journey-art { width: 42px; height: 42px; }
  .journey-copy span { display: none; }
}

@media (max-width: 900px) {
  .overview-hero { min-height: 0; align-items: flex-start; flex-direction: column; gap: 28px; padding-bottom: 42px; }
  .overview-hero > p { max-width: 620px; }
  .overview-category-grid { grid-template-columns: 1fr; }
  .overview-category-card { min-height: 290px; }
  .pyramid-category { width: min(680px, 88%); }
  .pyramid-books { gap: 12px; }
  .pyramid-book header { align-items: flex-start; flex-direction: column; padding: 18px; }
  .pyramid-lessons { padding: 14px 16px 18px; }
  .pyramid-wordcards { width: 96%; grid-template-columns: 1fr; }
  .pyramid-wordcard-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .implementation-grid { grid-template-columns: 1fr; }
  .deferred-model > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .file-map { grid-template-columns: 1fr 1fr; }
  .file-map > b { display: none; }
  .tester-stage { padding: 36px 28px; }
  .tester-heading { grid-template-columns: 1fr; }
  .tester-heading > span { grid-column: 1; grid-row: auto; max-width: 520px; }
  .test-category-grid { grid-template-columns: 1fr; }
  .test-category-card { min-height: 320px; }
  .tester-stage--lesson { padding-right: 28px; padding-left: 28px; }
  .hero-row { display: block; }
  .hero-row > p { margin-top: 22px; }
  .library { grid-template-columns: 1fr; }
  .navigator { border-right: 0; border-bottom: 1px solid var(--line); }
  .category-list { display: flex; overflow-x: auto; }
  .category-button { min-width: 190px; }
  .shelf-stage:has(.chapter-drawer:not([hidden])) { grid-template-columns: 1fr; }
  .bookshelf { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .chapter-drawer { border-radius: 8px 8px 22px 22px; }
}

@media (max-width: 620px) {
  .local-badge { display: none; }
  .topbar { gap: 10px; padding: 0 14px; }
  .brand-copy p { display: none; }
  .brand-copy strong { font-size: 15px; }
  .view-switch { padding: 10px 12px; font-size: 10px; }
  .overview-view { width: calc(100% - 24px); padding-top: 42px; }
  .overview-hero { padding-right: 5px; padding-left: 5px; }
  .overview-hero h1 { font-size: 43px; }
  .overview-hero > p { font-size: 14px; }
  .overview-heading { align-items: flex-start; flex-direction: column; gap: 10px; padding: 0 5px; }
  .overview-heading > p { line-height: 1.6; }
  .category-overview { padding-top: 42px; padding-bottom: 64px; }
  .overview-category-card { min-height: 0; grid-template-columns: 1fr; padding: 19px; border-radius: 22px; }
  .overview-category-art { min-height: 185px; grid-row: auto; }
  .overview-category-copy { padding: 5px 4px 0; }
  .overview-category-copy h3 { font-size: 30px; }
  .overview-category-card dl { margin-top: 8px; }
  .structure-guide { padding-top: 58px; }
  .pyramid-category { width: 100%; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 24px 20px 20px; }
  .pyramid-category .structure-symbol { width: 70px; height: 70px; }
  .pyramid-category h3 { font-size: 22px; }
  .pyramid-category div > span { line-height: 1.5; }
  .pyramid-category dl { grid-column: 1 / 3; justify-content: flex-end; }
  .pyramid-connector { height: 68px; }
  .pyramid-connector::before { bottom: 0; }
  .pyramid-connector::after, .pyramid-connector span { display: none; }
  .pyramid-books { grid-template-columns: 1fr; gap: 14px; }
  .pyramid-book::before { height: 15px; }
  .pyramid-book header { align-items: center; flex-direction: row; }
  .pyramid-word-connector { height: 68px; }
  .pyramid-word-connector span { display: none; }
  .pyramid-wordcards { width: 100%; padding: 18px; }
  .pyramid-wordcard-list { grid-template-columns: 1fr 1fr; }
  .pyramid-wordcard-list article { min-height: 114px; }
  .implementation-guide { padding-top: 56px; }
  .code-panel { padding: 19px; }
  .code-panel > header { grid-template-columns: 32px 1fr; }
  .code-panel header > code { display: none; }
  .code-panel pre { padding: 15px; font-size: 9px; }
  .code-rules p { grid-template-columns: 1fr; gap: 6px; }
  .state-pipeline { flex-wrap: wrap; }
  .applied-model, .deferred-model { padding: 20px; }
  .applied-model > header, .deferred-model > header { grid-template-columns: 1fr; gap: 9px; }
  .applied-model > header p, .deferred-model > header p { grid-column: 1; grid-row: auto; }
  .attribute-grid, .deferred-model > div { grid-template-columns: 1fr; }
  .file-map { grid-template-columns: 1fr; }
  .workspace-view { width: calc(100% - 18px); padding-top: 18px; }
  .tester { border-radius: 20px; }
  .tester-topbar { min-height: 67px; padding: 0 14px; }
  .tester-back { min-width: 82px; padding: 8px; font-size: 9px; }
  .tester-progress { justify-content: flex-end; gap: 5px; }
  .tester-progress li { min-width: auto; font-size: 0; }
  .tester-progress li::after { width: 15px; margin-left: 3px; }
  .tester-progress li span { width: 23px; height: 23px; font-size: 8px; }
  .tester-stage { padding: 30px 14px; }
  .tester-heading { gap: 18px; margin-bottom: 27px; }
  .tester-heading h1 { font-size: 39px; }
  .tester-heading > span { font-size: 11px; }
  .test-category-card { min-height: 0; grid-template-columns: 1fr; padding: 17px; }
  .test-category-art { min-height: 190px; grid-row: auto; }
  .test-category-copy { padding: 5px 4px 0; }
  .test-category-copy strong { font-size: 28px; }
  .test-category-stats { padding: 14px 4px 0; }
  .test-category-arrow { right: 20px; bottom: 19px; }
  .tester-stage--book .shelf-header { padding-right: 4px; padding-left: 4px; }
  .tester-stage--book .bookshelf { min-height: 380px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tester-stage--lesson { padding-right: 10px; padding-left: 10px; }
  .tester-stage--lesson .chapter-list { padding: 8px 10px 14px; }
  main { width: calc(100% - 24px); padding-top: 38px; }
  .hero { margin-left: 7px; }
  .hero h1 { font-size: 36px; }
  .library { border-radius: 20px; }
  .navigator { padding: 23px 18px; }
  .content { padding: 22px 14px; }
  .shelf-header { align-items: center; padding: 5px 4px 23px; }
  .shelf-header > div > span { display: none; }
  .bookshelf { min-height: 350px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 10px; padding: 30px 12px 42px; }
  .shelf-book { width: 125px; height: 184px; padding: 23px 14px 18px 24px; }
  .shelf-book > strong { font-size: 16px; }
  .shelf-book-info > span { font-size: 7px; }
  .shelf-board { align-items: flex-start; }
  .shelf-board small { display: none; }
  .chapter-drawer__header { padding: 23px 18px 18px 22px; }
  .chapter-drawer__header > div > span { display: none; }
  .chapter-list { padding: 7px 10px 13px 13px; }
  .chapter-button { grid-template-columns: 27px minmax(0, 1fr) 38px 16px; gap: 8px; padding: 14px 7px; }
  .chapter-copy > span { display: none; }
  .book-modal { width: 100vw; height: 100vh; border: 0; border-radius: 0; }
  .modal-scroll { padding: 14px 12px 24px; }
  .breadcrumbs { overflow: hidden; white-space: nowrap; }
  .journey-map { grid-template-columns: 1fr; gap: 0; padding: 9px; }
  .journey-stage { padding: 10px 12px; }
  .journey-stage + .journey-bridge + .journey-stage { margin-top: 0; }
  .journey-bridge { width: 1px; height: 18px; margin-left: 37px; flex-direction: column; }
  .journey-bridge i { width: 1px; height: 100%; background: repeating-linear-gradient(180deg, rgba(237, 189, 99, .32) 0 4px, transparent 4px 8px); }
  .journey-bridge b { display: none; }
  .book-header { align-items: center; }
  .book-header > div > span { display: none; }
  .lesson-header { align-items: flex-start; flex-direction: column; padding: 22px 20px; }
  .lesson-actions { width: 100%; justify-content: space-between; }
  .progress-row, .word-toolbar, .source-footer { padding-left: 20px; padding-right: 20px; }
  .word-toolbar { align-items: stretch; flex-direction: column; }
  .word-toolbar label { width: 100%; }
  .source-footer { align-items: flex-start; flex-direction: column; }
}
