:root {
  --ink: #183744;
  --ink-soft: #526d77;
  --muted: #82969a;
  --paper: #fffdf8;
  --paper-warm: #f8f4eb;
  --line: #e8e2d7;
  --teal: #2e7d7c;
  --teal-dark: #1d5d63;
  --coral: #d9686c;
  --gold: #c89a54;
  --blue: #5799b5;
  --shadow: 0 24px 70px rgba(3, 22, 31, .23);
  --radius: 24px;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(ellipse at 50% -10%, #315969 0, #183947 42%, #102b39 100%);
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  overflow-x: hidden;
}
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #e4b66f; outline-offset: 3px; }
.ambient { position: fixed; pointer-events: none; border-radius: 50%; filter: blur(1px); opacity: .18; }
.ambient-one { width: 360px; height: 360px; background: #4d8f94; top: 18%; right: -220px; }
.ambient-two { width: 260px; height: 260px; background: #bc7772; bottom: -150px; left: -130px; }
.app-shell { width: min(1440px, 100%); margin: 0 auto; padding: 0 42px 24px; position: relative; z-index: 1; }
.topbar { height: 84px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(226, 241, 238, .13); }
.brand { display: inline-flex; align-items: center; gap: 13px; color: #f5f6ef; text-decoration: none; }
.brand-mark { width: 39px; height: 39px; border: 1px solid rgba(232, 206, 157, .52); border-radius: 13px; display: flex; align-items: center; justify-content: center; gap: 3px; transform: rotate(-7deg); }
.brand-mark span { display: block; width: 4px; border-radius: 10px; background: #d9bd8d; }
.brand-mark span:nth-child(1) { height: 12px; opacity: .7; }.brand-mark span:nth-child(2) { height: 21px; }.brand-mark span:nth-child(3) { height: 15px; opacity: .8; }
.brand-copy { display: grid; gap: 1px; }.brand-copy strong { font-size: 15px; font-weight: 800; letter-spacing: -.2px; }.brand-copy small { font-size: 10px; color: #a9c2c2; }
.top-meta { display: flex; align-items: center; gap: 16px; }.chapter-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid rgba(219, 236, 229, .16); background: rgba(255,255,255,.045); border-radius: 100px; color: #c7d8d2; font-size: 11px; }.chapter-chip i { width: 6px; height: 6px; background: #d6b37a; border-radius: 50%; box-shadow: 0 0 0 4px rgba(214,179,122,.12); }
.icon-button { width: 39px; height: 39px; display: inline-grid; place-items: center; border: 1px solid rgba(230,242,238,.2); background: rgba(255,255,255,.06); border-radius: 12px; color: #e6eeea; cursor: pointer; transition: .2s; font-size: 24px; line-height: 1; }.icon-button:hover { background: rgba(255,255,255,.14); }.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.workspace { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 34px; padding-top: 28px; align-items: start; }
.side-panel { color: #d5e0d9; padding: 20px 4px 0 0; position: sticky; top: 16px; }
.eyebrow { display: block; color: #a77f4c; font-size: 10px; font-weight: 800; letter-spacing: .4px; margin-bottom: 9px; }
.side-panel .eyebrow { color: #a9c2bd; }.progress-line { height: 5px; background: rgba(230,239,231,.14); border-radius: 10px; overflow: hidden; margin-top: 13px; }.progress-line span { display: block; height: 100%; width: 0; border-radius: 10px; background: linear-gradient(90deg,#d3b17b,#7db9a7); transition: width .35s; }.progress-caption { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; color: #b8cbc5; font-size: 10px; }.progress-caption strong { color: #e9d2a9; font-size: 11px; }
.chapter-nav { display: grid; gap: 5px; margin-top: 27px; }.chapter-nav button { width: 100%; border: 0; background: transparent; display: flex; align-items: center; gap: 10px; padding: 10px 11px; text-align: right; border-radius: 12px; color: #a9bfbb; cursor: pointer; transition: .2s; font-size: 11px; }.chapter-nav button:hover { background: rgba(255,255,255,.06); color: white; }.chapter-nav button.active { background: rgba(255,255,255,.105); color: #fff9ed; box-shadow: inset -2px 0 #d5b27b; }.chapter-nav .nav-num { font-size: 9px; color: #819c99; width: 21px; height: 21px; display: inline-grid; place-items: center; border: 1px solid rgba(217,235,226,.17); border-radius: 7px; flex: 0 0 auto; }.chapter-nav button.active .nav-num { color: #f0d4a2; border-color: rgba(224,188,127,.48); background: rgba(210,172,111,.1); }
.side-note { display: flex; gap: 10px; margin-top: 34px; border-top: 1px solid rgba(224,238,228,.13); padding-top: 19px; }.note-icon { width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center; color: #edc98e; background: rgba(219,176,112,.12); flex: 0 0 auto; }.side-note strong { font-size: 10px; color: #dbe6dc; }.side-note p { font-size: 9px; color: #91aaa5; margin: 4px 0 0; line-height: 1.8; }.side-footer { display: flex; align-items: center; gap: 7px; color: #819e99; font-size: 9px; margin-top: 27px; }.status-dot { width: 6px; height: 6px; background: #85bca1; border-radius: 50%; box-shadow: 0 0 0 4px rgba(133,188,161,.1); }
.reader-area { min-width: 0; }.reader-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; color: #f6f4ea; }.reader-heading .eyebrow { color: #c7a978; margin-bottom: 4px; }.reader-heading h1 { font-size: clamp(19px,2.1vw,27px); margin: 0; font-weight: 800; letter-spacing: -.7px; color: #f3f2e9; }.reader-actions { display: flex; gap: 8px; }.soft-button { display: inline-flex; align-items: center; gap: 7px; height: 35px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(227,240,231,.17); color: #c5d8d1; background: rgba(255,255,255,.05); font-size: 10px; cursor: pointer; transition: .2s; }.soft-button:hover,.soft-button.active { background: rgba(255,255,255,.13); color: #fff; }.sound-glyph,.fullscreen-glyph { color: #e0bd83; font-size: 16px; line-height: 1; }
.book-stage { position: relative; padding: 0 0 15px; }.book-spread { min-height: 590px; display: grid; direction: ltr; grid-template-columns: minmax(210px,.67fr) minmax(0,1.55fr); align-items: stretch; filter: drop-shadow(0 18px 36px rgba(0,0,0,.12)); }.companion-page { direction: rtl; min-height: 590px; position: relative; overflow: hidden; padding: 45px 29px 28px; background: linear-gradient(145deg,#efe9dc,#e5dfd2); border-radius: 8px 0 0 8px; border-right: 1px solid rgba(64,72,65,.1); color: #35525a; display: flex; flex-direction: column; }.companion-page:after { content:""; position:absolute; top:0; bottom:0; left:15px; width:1px; background:rgba(94,106,94,.1); box-shadow:4px 0 9px rgba(0,0,0,.04); }.companion-kicker { font-size: 9px; color: #9a815e; font-weight: 800; }.companion-orbit { width: 145px; height: 145px; border: 1px solid rgba(62,121,124,.25); border-radius: 50%; margin: 38px auto 25px; display:grid; place-items:center; position:relative; }.companion-orbit:before,.companion-orbit:after { content:""; position:absolute; inset:14px; border:1px dashed rgba(62,121,124,.28); border-radius:50%; }.companion-orbit:after { inset:-11px; border-color:rgba(201,156,97,.28); transform:rotate(28deg) scaleY(.65); }.companion-orbit i,.companion-orbit b { position:absolute; width:6px;height:6px;background:#bd9660;border-radius:50%;top:23px;right:25px; }.companion-orbit b { width:5px;height:5px;top:auto;right:auto;left:22px;bottom:39px;background:#5a9aa0; }.orbit-core { width:70px;height:70px;border-radius:50%;background:linear-gradient(145deg,#e9918d,#bb4c61);display:grid;place-items:center;color:#fff;font-size:38px;box-shadow:0 9px 22px rgba(164,69,85,.25); }.companion-page h2 { font-size:18px; margin:0 0 9px; font-weight:800; }.companion-page>p { color:#6f8485; font-size:10px; line-height:2.1; margin:0; }.companion-divider { width:100%; height:1px;background:rgba(73,107,105,.17);margin:22px 0 14px; }.mini-fact { display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid rgba(73,107,105,.1);font-size:9px; }.mini-fact span { color:#879895; }.mini-fact strong { color:#42656a;font-weight:700; }.companion-bottom { margin-top:auto; display:flex;justify-content:space-between;color:#9b8b72;font-size:9px;padding-top:24px; }
.paper { direction: rtl; touch-action: pan-y; background:var(--paper); border-radius:0 8px 8px 0; min-height:590px; position:relative; overflow:hidden; padding:43px clamp(26px,4.2vw,58px) 35px; box-shadow: inset 10px 0 18px rgba(30,45,40,.045), inset 0 0 0 1px rgba(157,143,120,.12); }.paper:before { content:""; position:absolute; top:0; bottom:0; right:18px; width:1px; background:rgba(170,156,130,.12); }.paper:after { content:""; position:absolute; right:0; top:0; bottom:0; width:11px; background:linear-gradient(90deg,rgba(42,57,52,.05),transparent); pointer-events:none; }.paper-loading { display:flex;align-items:center;justify-content:center;gap:12px;min-height:500px;color:#87979a;font-size:12px; }.loader { width:18px;height:18px;border:2px solid #e3e8e1;border-top-color:var(--teal);border-radius:50%;animation:spin .8s linear infinite; }@keyframes spin{to{transform:rotate(360deg)}}
.reader-shadow { height:13px; width:94%; margin:0 auto; border-radius:50%; background:rgba(0,0,0,.25); filter:blur(13px); }.reader-controls { display:flex; justify-content:space-between; align-items:center; margin-top:17px; }.nav-button { height:42px; min-width:116px; padding:0 14px; display:inline-flex; justify-content:center; align-items:center; gap:10px; border-radius:12px; color:#d4e1d9; background:rgba(255,255,255,.06); border:1px solid rgba(230,239,230,.17); cursor:pointer; font-size:11px; transition:.2s; }.nav-button:hover:not(:disabled) { background:rgba(255,255,255,.13); color:white; }.nav-button.primary { background:#dfbb81; color:#293f43; border-color:#dfbb81; font-weight:800; box-shadow:0 7px 18px rgba(10,23,26,.12); }.nav-button.primary:hover { background:#ebc990; }.nav-button:disabled { opacity:.35; cursor:not-allowed; }.nav-button .arrow { font-size:17px; line-height:1; }.page-indicator { display:flex;align-items:center;gap:9px;color:#93aba5;font-size:11px; }.page-indicator strong { font-size:16px;color:#f4ddae; }.gesture-hint { text-align:center; margin-top:12px; color:#88a39d; font-size:9px; }.gesture-hint span { font-size:14px; margin-left:5px; color:#c8a875; }.app-footer { display:flex;justify-content:space-between;gap:15px;border-top:1px solid rgba(227,239,230,.12);padding-top:15px;margin-top:27px;color:#78938e;font-size:9px; }

/* Shared page content */
.page-content { position:relative; z-index:1; }.paper-topline { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:26px; }.page-kicker { display:flex;align-items:center;gap:8px;color:#9a805b;font-size:10px;font-weight:800; }.page-kicker:before { content:"";width:19px;height:1px;background:#c79e65; }.page-stamp { color:#91a09a;font-size:9px;border:1px solid #e4e7df;border-radius:100px;padding:5px 9px; }.page-title { font-size:clamp(23px,3vw,34px);line-height:1.55;letter-spacing:-.8px;color:#1c3d49;margin:0 0 11px;font-weight:900; }.page-lead { color:#52717a;font-size:13px;line-height:2.15;margin:0 0 20px;font-weight:600; }.body-copy { color:#627a7d;font-size:11px;line-height:2.35;margin:0 0 14px; }.audio-row { display:flex;align-items:center;gap:10px;margin:18px 0 22px; }.audio-button { display:inline-flex;align-items:center;gap:8px;border:1px solid #d8e6df;background:#f2f7f2;color:#356b6a;border-radius:100px;padding:8px 13px;font-size:10px;cursor:pointer;transition:.2s; }.audio-button:hover,.audio-button.playing { background:#e3f0e9;border-color:#a9cdbd; }.audio-button .play-icon { display:grid;place-items:center;width:21px;height:21px;border-radius:50%;background:#d7e9df;font-size:10px; }.audio-note { color:#9aa9a3;font-size:9px; }.image-figure { margin:0; padding:9px; border:1px solid #ebe5d9; border-radius:17px; background:#fbf8f1; }.image-figure img { width:100%;height:auto;display:block;border-radius:10px;max-height:300px;object-fit:contain; }.image-figure figcaption { color:#8c9995;font-size:9px;padding:8px 7px 3px;line-height:1.8; }.lesson-grid { display:grid;grid-template-columns:1.05fr .95fr;gap:22px;align-items:start; }.fact-card { margin-top:17px;display:flex;gap:11px;padding:13px 14px;border-radius:13px;background:#f3f5ef;border:1px solid #e6e9dd; }.fact-symbol { color:#b58d55;font-size:19px; }.fact-card strong { display:block;font-size:10px;color:#496a69;margin-bottom:4px; }.fact-card p { margin:0;color:#718681;font-size:9px;line-height:1.9; }.callout-grid { display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:15px; }.callout { background:#f7f5ee;border:1px solid #ece5d8;border-radius:12px;padding:11px 12px; }.callout strong { display:block;color:#42656a;font-size:10px;margin-bottom:4px; }.callout p { margin:0;color:#82918d;font-size:9px;line-height:1.9; }

.cover-page { min-height:500px;display:grid;grid-template-columns:1.05fr .95fr;align-items:center;gap:10px; }.cover-copy { position:relative;z-index:1; }.cover-label { display:inline-flex;gap:7px;align-items:center;padding:7px 11px;border-radius:100px;background:#f3eee3;color:#95764d;font-size:9px;font-weight:800;margin-bottom:20px; }.cover-label:before { content:"✦";font-size:12px;color:#c69d63; }.cover-title { margin:0;color:#1d3d49;font-size:clamp(37px,5vw,57px);font-weight:900;line-height:1.4;letter-spacing:-2px;white-space:pre-line; }.cover-subtitle { color:#627c80;font-size:12px;line-height:2.3;max-width:340px;margin:13px 0 20px; }.cover-tagline { color:#a1845d;font-size:10px;font-weight:800;letter-spacing:1px;margin-bottom:27px; }.cover-start { border:0;border-radius:12px;background:#255f66;color:#fff9ed;padding:12px 19px;cursor:pointer;font-size:11px;font-weight:800;box-shadow:0 9px 20px rgba(37,95,102,.19);transition:.2s; }.cover-start:hover { transform:translateY(-2px);background:#1b5159; }.cover-art { width:100%;max-width:360px;justify-self:center;filter:drop-shadow(0 16px 24px rgba(74,49,44,.1)); }.cover-bottomline { margin-top:30px;display:flex;gap:15px;align-items:center;color:#9aa6a0;font-size:9px; }.cover-bottomline span:first-child { width:28px;height:1px;background:#c6a16c; }

/* 3D explorer */
.anatomy-intro { max-width:680px; }.model-card { margin-top:18px;border:1px solid #e8e4d9;background:linear-gradient(145deg,#f5f3ec,#ecefe8);border-radius:18px;overflow:hidden; }.model-toolbar { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid rgba(91,121,116,.14); }.model-toolbar strong { color:#48686c;font-size:10px; }.model-toolbar span { color:#8b9c96;font-size:9px; }.model-actions { display:flex;gap:6px; }.tiny-control { border:1px solid #d9e0d7;background:#fcfbf6;color:#5b7777;border-radius:8px;padding:6px 9px;font-size:9px;cursor:pointer; }.tiny-control.active { background:#dcece5;border-color:#afcdbd;color:#2e6665; }.model-viewport { min-height:280px;height:clamp(270px,34vw,380px);position:relative;display:grid;place-items:center;overflow:hidden;background:radial-gradient(ellipse at 50% 48%,#fffdf7 0,#edf0e8 66%,#e6ece5 100%); }.model-viewport:after { content:"";position:absolute;width:210px;height:35px;border-radius:50%;background:rgba(50,66,61,.12);filter:blur(14px);bottom:31px; }.model-viewport canvas { position:absolute;inset:0;width:100%;height:100%;z-index:2;touch-action:none;cursor:grab; }.model-viewport canvas:active { cursor:grabbing; }.model-fallback { width:min(53%,250px);position:relative;z-index:1;filter:drop-shadow(0 12px 16px rgba(74,48,48,.12)); }.model-fallback img { width:100%;display:block; }.model-message { position:absolute;z-index:4;bottom:12px;left:14px;right:14px;text-align:center;color:#82938e;font-size:9px;pointer-events:none; }.model-footer { display:grid;grid-template-columns:1fr auto;gap:12px;padding:12px 14px;align-items:center; }.part-selector { display:flex;flex-wrap:wrap;gap:6px; }.part-chip { border:1px solid #dbe4db;background:#fafbf6;color:#66807d;border-radius:100px;padding:7px 10px;font-size:9px;cursor:pointer; }.part-chip.active { border-color:#b7cfc3;background:#e3efe8;color:#2f6866; }.part-info { min-width:125px;text-align:left;border-right:1px solid #dfe5dc;padding-right:12px; }.part-info strong { display:block;color:#496b6b;font-size:10px; }.part-info p { margin:3px 0 0;color:#8b9992;font-size:8px;line-height:1.7; }.model-disclaimer { color:#9a9d91;font-size:8px;margin:9px 3px 0; }

/* circulation */
.flow-layout { display:grid;grid-template-columns:.95fr 1.05fr;gap:18px;align-items:center;margin-top:18px; }.flow-figure img { width:100%;display:block; }.flow-steps { display:grid;gap:8px; }.flow-step { width:100%;text-align:right;display:flex;gap:10px;align-items:flex-start;padding:11px;border-radius:12px;border:1px solid #e9e8de;background:#fcfbf6;cursor:pointer;transition:.2s; }.flow-step.active { background:#f0f5ef;border-color:#b8d1c2;box-shadow:inset -3px 0 #68a092; }.flow-step .step-num { width:23px;height:23px;display:grid;place-items:center;flex:0 0 auto;border-radius:8px;background:#e8eee8;color:#668981;font-size:9px;font-weight:800; }.flow-step[data-tone="blue"] .step-num { background:#e4eff3;color:#538ca4; }.flow-step[data-tone="red"] .step-num { background:#f8e9e5;color:#be6268; }.flow-step strong { display:block;color:#4b696d;font-size:10px;margin-bottom:3px; }.flow-step p { margin:0;color:#82948f;font-size:9px;line-height:1.8; }.flow-selected { border-radius:12px;background:#f6f1e7;padding:12px 14px;margin-top:12px;color:#6d7770;font-size:9px;line-height:1.9; }.flow-selected strong { color:#94734b;display:block;margin-bottom:3px; }

/* quiz */
.quiz-list { display:grid;gap:13px;margin-top:20px; }.question-card { border:1px solid #eae5da;border-radius:15px;padding:15px;background:#fffefa; }.question-title { display:flex;gap:9px;align-items:flex-start;margin-bottom:12px; }.question-title span { flex:0 0 auto;width:23px;height:23px;border-radius:8px;background:#f1eadc;color:#a07d4f;display:grid;place-items:center;font-size:9px;font-weight:800; }.question-title strong { font-size:11px;line-height:1.9;color:#45636a; }.options { display:grid;grid-template-columns:1fr 1fr;gap:7px; }.option { display:flex;align-items:center;gap:8px;border:1px solid #e7e8df;background:#fafaf6;border-radius:9px;padding:9px 10px;color:#738782;font-size:9px;cursor:pointer;text-align:right;transition:.15s; }.option:before { content:"";width:12px;height:12px;flex:0 0 auto;border:1px solid #c6d1c9;border-radius:50%;background:#fff; }.option.selected { border-color:#9dc2b0;background:#eff6f0;color:#426d61; }.option.selected:before { border:4px solid #5d9b88; }.option.correct { border-color:#8dbca3;background:#edf7ef;color:#397258; }.option.wrong { border-color:#e5b2aa;background:#fff1ee;color:#a85457; }.feedback { display:none;margin-top:10px;padding:9px 11px;border-radius:9px;background:#f1f5ef;color:#5d7d6e;font-size:9px;line-height:1.8; }.feedback.show { display:block; }.feedback.bad { background:#fff2ee;color:#a75c5d; }.quiz-score { margin-top:14px;padding:13px 15px;background:#f3f0e6;border-radius:12px;display:flex;align-items:center;justify-content:space-between;color:#697e78;font-size:10px; }.quiz-score strong { color:#3f7068;font-size:14px; }

/* lab and summary */
.lab-grid { display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:17px 0; }.lab-card { border:1px solid #e8e4d9;border-radius:13px;padding:13px;background:#fbfaf5; }.lab-card .lab-icon { width:27px;height:27px;display:grid;place-items:center;border-radius:9px;background:#e7f0e9;color:#52867a;margin-bottom:9px;font-size:15px; }.lab-card strong { display:block;color:#4d6c6b;font-size:10px;margin-bottom:4px; }.lab-card p { margin:0;color:#82918a;font-size:9px;line-height:1.8; }.lab-launch { width:100%;display:flex;justify-content:center;align-items:center;gap:9px;border:0;border-radius:11px;padding:12px;background:#265f66;color:white;font-weight:800;font-size:10px;cursor:pointer; }.lab-launch:hover { background:#1d5059; }.video-placeholder { border:1px dashed #c8d4c8;border-radius:15px;background:linear-gradient(135deg,#eef3eb,#f5eee4);min-height:145px;display:grid;place-items:center;text-align:center;padding:17px;margin-top:14px; }.video-placeholder .play-circle { width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#57877e;box-shadow:0 5px 14px rgba(43,84,71,.1);font-size:17px;margin:0 auto 8px; }.video-placeholder strong { display:block;color:#648079;font-size:10px; }.video-placeholder p { color:#91a09a;font-size:8px;line-height:1.8;margin:5px 0 0; }.summary-list { display:grid;gap:9px;margin:22px 0; }.summary-item { display:flex;align-items:flex-start;gap:10px;padding:11px 12px;border-radius:11px;background:#f5f5ee;border:1px solid #e9e8dd;color:#637d78;font-size:10px;line-height:1.8; }.summary-item:before { content:"✓";width:20px;height:20px;display:grid;place-items:center;border-radius:7px;background:#e2eee4;color:#53856f;flex:0 0 auto;font-weight:900; }.closing-card { padding:16px;border-radius:14px;background:linear-gradient(115deg,#e8f0e8,#f3ead9);color:#56716d;font-size:10px;line-height:2; }.restart-button { margin-top:18px;border:1px solid #d5e2d8;background:#f4f8f1;color:#48786b;padding:10px 14px;border-radius:10px;font-size:10px;cursor:pointer; }

/* page transitions */
.paper.turn-next { animation: turnNext .34s cubic-bezier(.2,.7,.2,1); }.paper.turn-prev { animation: turnPrev .34s cubic-bezier(.2,.7,.2,1); }
@keyframes turnNext { 0%{opacity:.45;transform:perspective(900px) rotateY(-5deg) translateX(-14px);filter:brightness(.93)} 100%{opacity:1;transform:perspective(900px) rotateY(0) translateX(0);filter:none} }
@keyframes turnPrev { 0%{opacity:.45;transform:perspective(900px) rotateY(5deg) translateX(14px);filter:brightness(.93)} 100%{opacity:1;transform:perspective(900px) rotateY(0) translateX(0);filter:none} }

/* drawer, toast, responsive */
.overlay { position:fixed;inset:0;z-index:20;background:rgba(7,24,32,.62);backdrop-filter:blur(5px);display:flex;justify-content:flex-start; }.overlay[hidden] { display:none; }.toc-drawer { width:min(360px,90vw);height:100%;background:#fdfbf5;padding:25px 22px;box-shadow:15px 0 55px rgba(0,0,0,.2);overflow:auto; }.drawer-header { display:flex;justify-content:space-between;align-items:center;margin-bottom:18px; }.drawer-header h2 { margin:0;font-size:21px;color:#244653; }.drawer-header .eyebrow { color:#9d8055; }.drawer-header .icon-button { background:#eff1e9;color:#49676a;border-color:#e5e7de;font-size:22px; }.drawer-nav { display:grid;gap:6px; }.drawer-nav button { display:flex;align-items:center;gap:10px;padding:12px;border:1px solid #ebe8de;border-radius:11px;background:#fffefa;text-align:right;color:#637d79;cursor:pointer;font-size:10px; }.drawer-nav button.active { border-color:#b4d0c0;background:#eff6ef;color:#376a60; }.drawer-nav span { font-size:9px;color:#b08d5c; }.drawer-hint { font-size:9px;color:#9aaba2;margin-top:18px; }.toast { position:fixed;z-index:30;bottom:24px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;max-width:min(90vw,560px);padding:11px 16px;border-radius:12px;background:#173b45;color:#f6f2e8;box-shadow:0 12px 30px rgba(0,0,0,.22);font-size:10px;text-align:center;transition:.25s; }.toast.show { opacity:1;transform:translate(-50%,0); }

@media (max-width: 1050px) {
  .app-shell { padding:0 25px 20px; }.workspace { grid-template-columns:190px minmax(0,1fr);gap:22px; }.book-spread { grid-template-columns:minmax(170px,.55fr) minmax(0,1.45fr); }.companion-page { padding:38px 22px 24px; }.paper { padding:35px 30px 30px; }.companion-orbit { width:120px;height:120px;margin:30px auto 20px; }.orbit-core { width:60px;height:60px; }
}
@media (max-width: 760px) {
  .app-shell { padding:0 15px 20px; }.topbar { height:67px; }.brand-mark { width:34px;height:34px;border-radius:11px; }.brand-copy strong { font-size:13px; }.brand-copy small { font-size:9px; }.chapter-chip { display:none; }.workspace { display:block;padding-top:19px; }.side-panel { display:none; }.reader-heading { margin-bottom:13px; }.reader-heading h1 { font-size:19px; }.reader-actions { gap:5px; }.soft-button { height:32px;padding:0 9px;font-size:9px; }.book-stage { padding-bottom:8px; }.book-spread { display:block;min-height:0; }.companion-page { display:none; }.paper { min-height:590px;border-radius:13px;padding:28px 22px 26px;box-shadow:0 12px 36px rgba(14,32,31,.1),inset 0 0 0 1px rgba(157,143,120,.12); }.paper:before { right:11px; }.paper:after { display:none; }.reader-shadow { width:88%;height:9px;filter:blur(9px); }.reader-controls { margin-top:12px; }.nav-button { min-width:100px;height:40px;padding:0 10px;font-size:10px; }.page-indicator { gap:7px; }.gesture-hint { margin-top:9px; }.app-footer { flex-direction:column;gap:5px;margin-top:20px;font-size:8px; }.cover-page { min-height:535px;grid-template-columns:1fr;gap:0;align-content:center;text-align:center; }.cover-art { grid-row:1;max-width:225px;width:70%;margin:0 auto 3px; }.cover-copy { grid-row:2; }.cover-label { margin-bottom:12px; }.cover-title { font-size:39px; }.cover-subtitle { margin:8px auto 12px;font-size:11px; }.cover-tagline { margin-bottom:17px; }.cover-bottomline { justify-content:center;margin-top:17px; }.lesson-grid,.flow-layout { grid-template-columns:1fr; }.lesson-grid .image-figure { grid-row:1; }.image-figure img { max-height:210px; }.page-title { font-size:25px; }.page-lead { font-size:11px;margin-bottom:14px; }.body-copy { font-size:10px;line-height:2.25; }.paper-topline { margin-bottom:18px; }.model-viewport { height:290px;min-height:260px; }.model-footer { grid-template-columns:1fr; }.part-info { border-right:0;border-top:1px solid #dfe5dc;padding:9px 0 0;text-align:right; }.part-selector { justify-content:center; }.flow-figure { max-width:430px;margin:auto; }.flow-steps { grid-row:1; }.flow-layout { gap:9px; }.flow-selected { margin-top:8px; }.options { grid-template-columns:1fr 1fr; }.question-card { padding:12px; }.lab-grid { grid-template-columns:1fr 1fr; }.paper-loading { min-height:530px; }
}
@media (max-width: 390px) {
  .app-shell { padding:0 11px 17px; }.reader-heading { align-items:flex-end; }.reader-heading h1 { font-size:17px; }.soft-button span:last-child { display:none; }.paper { padding:25px 17px 23px;min-height:570px; }.cover-title { font-size:34px; }.cover-art { max-width:195px; }.nav-button { min-width:90px; }.nav-button span:not(.arrow) { font-size:9px; }.options { grid-template-columns:1fr; }.lab-grid { grid-template-columns:1fr; }.callout-grid { gap:7px; }.callout { padding:9px; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important; } }
