
:root{
  --bg:#1e2933; --paper:#fffdf8; --ink:#26323b; --muted:#66717b; --accent:#24607a; --accent2:#8a6b3a;
  --line:#d9d2c5; --cream:#f4efe4; --blue:#eaf3f7; --shadow:0 18px 50px rgba(0,0,0,.35);
}
*{box-sizing:border-box}
body{margin:0;background:radial-gradient(circle at top,#3c5160 0,#1e2933 45%,#111820 100%);color:var(--ink);font-family:Georgia,'Times New Roman',serif;}
.app-shell{min-height:100vh;display:flex;flex-direction:column;gap:10px;padding:14px 18px;}
.topbar,.bottombar{color:#f7f1e7;display:flex;align-items:center;justify-content:space-between;gap:14px;font-family:system-ui,-apple-system,Segoe UI,sans-serif;}
.topbar strong{font-size:17px;letter-spacing:.02em}.topbar span{margin-left:10px;color:#c9d7df;font-size:13px}
.topbar nav{display:flex;align-items:center;gap:8px}button{border:0;border-radius:8px;background:#f8f2e8;color:#20313b;font-weight:700;padding:8px 12px;cursor:pointer;box-shadow:0 2px 4px rgba(0,0,0,.18)}button:hover{background:#fff}button:disabled{opacity:.45;cursor:not-allowed}
#pageCounter{min-width:130px;text-align:center;color:#e6edf1;font-size:13px}
.book-stage{flex:1;display:flex;align-items:center;justify-content:center;gap:14px;min-height:700px;}
.book{position:relative;display:grid;grid-template-columns:minmax(430px,520px) minmax(430px,520px);gap:0;filter:drop-shadow(0 20px 40px rgba(0,0,0,.45));perspective:1800px;}
.crease{position:absolute;left:50%;top:0;bottom:0;width:22px;transform:translateX(-50%);z-index:20;background:linear-gradient(90deg,rgba(0,0,0,.12),rgba(255,255,255,.35),rgba(0,0,0,.14));pointer-events:none;border-radius:50%;}
.page{width:100%;height:680px;background:var(--paper);display:none;overflow:hidden;position:relative;border:1px solid #cbbfabc0;}
.page.visible{display:block;animation:pageIn .28s ease-out}.page.left{border-radius:12px 0 0 12px;box-shadow:inset -18px 0 26px rgba(0,0,0,.055)}.page.right{border-radius:0 12px 12px 0;box-shadow:inset 18px 0 26px rgba(0,0,0,.055)}
@keyframes pageIn{from{opacity:.55;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
.page-inner{height:100%;display:flex;flex-direction:column;padding:22px 28px 18px;}
.page-title{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid var(--accent);padding-bottom:6px;margin-bottom:10px;color:var(--accent);font-family:system-ui,-apple-system,Segoe UI,sans-serif;font-weight:800;letter-spacing:.01em;}
.page-title em{font-style:normal;color:#9b8a74;font-size:12px;font-weight:700}.page main{flex:1;overflow:hidden}.page footer{font-size:9.5px;color:#9b8a74;border-top:1px solid #e6ddcd;padding-top:5px;text-align:center;font-family:system-ui,-apple-system,Segoe UI,sans-serif;}
p{font-size:12.1px;line-height:1.38;margin:0 0 8px}.small{font-size:10.1px;line-height:1.31;color:#48545d}.endmark{text-align:center;color:var(--accent2);font-weight:700;margin-top:12px}
h1,h2,h3{margin:0}.cover .page-title{display:none}.cover .page-inner{padding:30px}.cover-block{text-align:center}.kicker{text-transform:uppercase;letter-spacing:.18em;font-size:11px;color:#7d6c56;font-family:system-ui,-apple-system,Segoe UI,sans-serif}.cover h1{font-size:55px;letter-spacing:.09em;color:#1f5b74;margin-top:10px;text-transform:uppercase}.cover h2{font-size:21px;color:#8a6b3a;margin-bottom:18px;font-weight:400}.cover-note{font-size:12.5px;line-height:1.4;margin:8px 12px 0;color:#44515a}.photo{margin:0;background:#fff;border:1px solid #ded3c0;border-radius:8px;padding:5px;box-shadow:0 2px 10px rgba(70,55,30,.08)}.photo img{width:100%;height:116px;object-fit:cover;border-radius:5px;display:block;background:#eee}.photo figcaption{font-size:8.6px;line-height:1.2;color:#5d6367;margin-top:4px;font-family:system-ui,-apple-system,Segoe UI,sans-serif}.photo.hero img{height:360px}.photo.hero figcaption{font-size:10px}.photo.wide img{height:315px}.photo.tall img{height:365px;object-fit:contain;background:#f5f4ee}.photo-grid{display:grid;gap:7px;margin:7px 0 8px}.photo-grid.two{grid-template-columns:1fr 1fr}.photo-grid.three{grid-template-columns:1fr 1fr 1fr}.photo-grid.four{grid-template-columns:1fr 1fr}.photo-grid.four .photo img{height:122px}.photo-grid.two .photo img{height:210px}.photo-grid.three .photo img{height:160px}.photo-grid.mini .photo img{height:126px}.twocol{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}.callout{background:linear-gradient(135deg,#e9f3f7,#f7f1e4);border-left:4px solid var(--accent);padding:8px 10px;border-radius:8px;margin:8px 0;font-size:11px;line-height:1.35;color:#2f414a;font-family:system-ui,-apple-system,Segoe UI,sans-serif}.note-row{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:8px 0}.note-row span{background:#eaf3f7;color:#26536a;border:1px solid #c7dce7;text-align:center;border-radius:999px;padding:6px 4px;font-size:9.5px;font-family:system-ui,-apple-system,Segoe UI,sans-serif;font-weight:700}.toc-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:10px 0}.toc-grid div{background:#f1eadc;border:1px solid #ded3c0;border-radius:8px;padding:7px;font-size:11px;font-family:system-ui,-apple-system,Segoe UI,sans-serif}.toc-grid b{display:inline-block;background:#24607a;color:white;border-radius:999px;min-width:22px;text-align:center;margin-right:5px;font-size:10px;padding:2px}
ul.tight{margin:7px 0 0 16px;padding:0}ul.tight li{font-size:11.2px;line-height:1.35;margin-bottom:5px}
table.data{width:100%;border-collapse:collapse;margin:6px 0 8px;font-family:system-ui,-apple-system,Segoe UI,sans-serif;table-layout:fixed}table.data th{background:#dcebf2;color:#1e5269;border:1px solid #aabcca;text-align:left;padding:5px 6px;font-size:9.2px;line-height:1.12}table.data td{border:1px solid #d1cabd;padding:4.5px 5.5px;vertical-align:top;font-size:8.9px;line-height:1.18}table.data tr:nth-child(even) td{background:#fbf8f0}table.data.compact th{font-size:9.8px}table.data.compact td{font-size:9.6px}table.data.mid td{font-size:10px}.smalltable td{font-size:8.1px}.smalltable th{font-size:8.4px}
.edge{font-size:48px;line-height:1;border-radius:50%;width:58px;height:58px;padding:0;background:rgba(255,253,248,.85)}.edge:hover{background:#fff}.bottombar{font-size:12px;color:#cbd7dd}.bottombar input{width:min(680px,55vw);accent-color:#c7a764}
@media (max-width: 1050px){.book{grid-template-columns:minmax(360px,1fr);max-width:560px}.page{height:710px}.page.right{display:none!important}.page.left{border-radius:12px}.crease{display:none}.edge{font-size:38px;width:48px;height:48px}.book-stage{min-height:720px}.topbar,.bottombar{flex-direction:column;align-items:center}.photo.hero img{height:340px}}
@media (max-width: 620px){.app-shell{padding:8px}.page{height:725px}.page-inner{padding:18px 20px}.twocol{grid-template-columns:1fr}.photo-grid.three,.photo-grid.two,.photo-grid.four{grid-template-columns:1fr 1fr}.photo-grid.two .photo img,.photo-grid.three .photo img{height:120px}.photo.wide img,.photo.tall img{height:220px}.photo.hero img{height:260px}.cover h1{font-size:40px}.topbar span{display:none}.edge{display:none}.book-stage{min-height:740px}.bottombar input{width:86vw}p{font-size:11.2px}table.data td{font-size:7.8px}}
@media print{body{background:white}.topbar,.bottombar,.edge{display:none}.app-shell{padding:0}.book{display:block;filter:none}.page{display:block!important;page-break-after:always;width:100%;height:auto;min-height:9.5in;border:0;border-radius:0}.page-inner{height:auto}.page main{overflow:visible}.crease{display:none}}

/* Expanded edition: compact professional chapter cards and quiz styling */
.shape-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}.shape-list div{background:#fff;border:1px solid #ded3c0;border-radius:9px;padding:8px 9px;font-family:system-ui,-apple-system,Segoe UI,sans-serif}.shape-list b{display:block;color:#1f5b74;font-size:11px;margin-bottom:3px}.shape-list span{display:block;color:#45545d;font-size:9.6px;line-height:1.25}.quiz-instructions{display:grid;grid-template-columns:1fr;gap:8px;margin:10px 0}.quiz-instructions div{background:linear-gradient(135deg,#f8f2e8,#eaf3f7);border:1px solid #d6cbb9;border-radius:10px;padding:9px 10px;font-family:system-ui,-apple-system,Segoe UI,sans-serif}.quiz-instructions b{display:block;color:#1f5b74;font-size:12px;margin-bottom:3px}.quiz-instructions span{display:block;color:#344750;font-size:10.8px;line-height:1.3}.quiz-page{display:grid;grid-template-columns:1fr;gap:7px}.quiz-question{border:1px solid #d5cab9;border-radius:10px;background:#fffaf1;margin:0;padding:8px 9px 7px;font-family:system-ui,-apple-system,Segoe UI,sans-serif}.quiz-question legend{font-size:10.4px;line-height:1.2;font-weight:800;color:#1f5b74;padding:0 4px}.quiz-question label{display:grid;grid-template-columns:16px 1fr;align-items:center;gap:4px;font-size:9.8px;line-height:1.2;margin-top:4px;color:#2f414a}.quiz-question input{margin:0}.quiz-question.correct{border-color:#3e8f66;background:#f1fbf2}.quiz-question.incorrect{border-color:#aa5c50;background:#fff1ee}.quiz-question.unanswered{border-color:#c49b42;background:#fff8df}.quiz-actions{display:flex;gap:8px;margin:8px 0}.quiz-result{background:#eaf3f7;border:1px solid #bdd4df;border-left:4px solid #24607a;border-radius:10px;padding:9px 10px;margin:8px 0;font-family:system-ui,-apple-system,Segoe UI,sans-serif;font-size:11px;font-weight:700;color:#20313b}.answerkey th{font-size:7.7px}.answerkey td{font-size:7.1px;line-height:1.08;padding:2.4px 3px}.answerkey td:first-child{width:24px;text-align:center;font-weight:700;color:#1f5b74}.answerkey td:nth-child(2){font-weight:700;color:#26323b}.photo.wide img[src*="shapes_diagram"],.photo.wide img[src*="mining_flow_diagram"]{height:330px;object-fit:contain;background:#fbf7ef}.photo.tall img[src*="underground_pocket_diagram"]{height:370px;object-fit:contain;background:#f7f0e4}
@media (max-width: 620px){.shape-list{grid-template-columns:1fr}.quiz-question legend{font-size:9.8px}.quiz-question label{font-size:9.2px}.answerkey td{font-size:6.8px}.quiz-actions{flex-wrap:wrap}}


/* Dense professional edition overrides: reduces blank areas and adds compact visual information. */
.book-stage{min-height:635px;}
.book{grid-template-columns:minmax(420px,500px) minmax(420px,500px);}
.page{height:610px;}
.page-inner{padding:16px 22px 13px;}
.page-title{padding-bottom:5px;margin-bottom:7px;font-size:13px;}
.page main{display:flex;flex-direction:column;overflow:hidden;}
.page footer{font-size:8.6px;padding-top:4px;}
p{font-size:11.25px;line-height:1.30;margin:0 0 6px;}
.small{font-size:9.15px;line-height:1.22;}
.cover .page-inner{padding:24px;}
.cover h1{font-size:48px;margin-top:8px;}
.cover h2{font-size:18px;margin-bottom:11px;}
.cover-note{font-size:11.2px;line-height:1.32;}
.photo{padding:4px;border-radius:7px;}
.photo figcaption{font-size:7.45px;line-height:1.1;margin-top:3px;}
.photo.hero img{height:305px;}
.photo.wide img{height:230px;}
.photo.tall img{height:260px;}
.photo-grid{gap:5px;margin:5px 0 6px;}
.photo-grid.four .photo img{height:91px;}
.photo-grid.two .photo img{height:142px;}
.photo-grid.three .photo img{height:105px;}
.photo-grid.mini .photo img{height:74px;}
.photo-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-top:6px;}
.photo-strip .photo img{height:62px;object-fit:cover;}
.fill-panel{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:auto;}
.fill-panel div{background:#fbf8f0;border:1px solid #ded3c0;border-left:3px solid var(--accent2);border-radius:8px;padding:6px 7px;font-family:system-ui,-apple-system,Segoe UI,sans-serif;}
.fill-panel b{display:block;color:#1f5b74;font-size:9.4px;margin-bottom:2px;}
.fill-panel span{display:block;color:#3d4a52;font-size:8.3px;line-height:1.18;}
.fill-panel + .photo-strip{margin-top:5px;}
.callout{padding:6px 8px;border-radius:7px;margin:6px 0;font-size:10.1px;line-height:1.25;}
.note-row{gap:4px;margin:6px 0;}
.note-row span{padding:5px 3px;font-size:8.4px;}
.toc-grid{gap:5px;margin:7px 0;}
.toc-grid div{padding:5px 6px;font-size:9.6px;}
ul.tight{margin:5px 0 0 14px;}
ul.tight li{font-size:10.2px;line-height:1.26;margin-bottom:3.5px;}
table.data{margin:4px 0 6px;}
table.data th{font-size:8.15px;line-height:1.05;padding:4px 5px;}
table.data td{font-size:7.8px;line-height:1.09;padding:3.5px 4px;}
table.data.compact th{font-size:8.65px}table.data.compact td{font-size:8.35px}.smalltable td{font-size:7.05px}.smalltable th{font-size:7.45px}
.shape-list{gap:5px;margin:6px 0;}.shape-list div{padding:6px 7px}.shape-list b{font-size:9.6px}.shape-list span{font-size:8.15px;line-height:1.15;}
.quiz-instructions{gap:5px;margin:6px 0;}.quiz-instructions div{padding:7px 8px}.quiz-instructions b{font-size:10.4px}.quiz-instructions span{font-size:9.25px;line-height:1.2;}
.quiz-page{gap:4px;}.quiz-question{border-radius:8px;padding:5px 7px 4px;}.quiz-question legend{font-size:9.15px;line-height:1.12;}.quiz-question label{grid-template-columns:14px 1fr;gap:3px;font-size:8.35px;line-height:1.1;margin-top:2.5px;}.dense-quiz + .fill-panel{margin-top:6px;}
.quiz-actions{margin:5px 0}.quiz-result{padding:7px 8px;margin:6px 0;font-size:10px;}.answerkey th{font-size:7.1px}.answerkey td{font-size:6.45px;line-height:1.0;padding:2px 2.5px}.endmark{margin-top:8px;}
.photo.wide img[src*="shapes_diagram"],.photo.wide img[src*="mining_flow_diagram"]{height:235px;}.photo.tall img[src*="underground_pocket_diagram"]{height:268px;}.back-cover h2{font-size:21px;color:#1f5b74;margin:0 0 6px;}
@media (max-width:1050px){.page{height:640px}.book-stage{min-height:660px}.photo.hero img{height:290px}}
@media (max-width:620px){.page{height:690px}.page-inner{padding:15px 17px}.photo-strip{grid-template-columns:1fr 1fr}.photo-strip .photo img{height:78px}.fill-panel{grid-template-columns:1fr}.photo.wide img,.photo.tall img{height:205px}.photo-grid.two .photo img,.photo-grid.three .photo img{height:104px}}

.small-fill div{padding:5px 6px}.small-fill b{font-size:8.9px}.small-fill span{font-size:7.85px}.tiny-strip .photo img{height:55px}.tiny-strip .photo figcaption{font-size:6.8px}.page{height:595px}.book-stage{min-height:620px}@media (max-width:1050px){.page{height:630px}.book-stage{min-height:650px}}

/* Zoom controls */
:root{--book-zoom:1;}
.nav-divider{width:1px;height:26px;background:rgba(255,255,255,.28);display:inline-block;margin:0 2px;}
#zoomCounter{min-width:48px;text-align:center;color:#e6edf1;font-size:13px;font-family:system-ui,-apple-system,Segoe UI,sans-serif;}
.book-stage{overflow:auto;overscroll-behavior:contain;padding:8px;}
.book{transform:scale(var(--book-zoom));transform-origin:center center;transition:transform .18s ease;}
@media (max-width:620px){#zoomCounter{min-width:42px;font-size:12px}.nav-divider{display:none}.topbar nav{flex-wrap:wrap;justify-content:center}}


/* Jason Souza collector photo plates */
.collector-page p{font-size:10.95px;line-height:1.27;}
.collector-grid{display:grid;gap:5px;margin:5px 0 6px;}
.collector-grid.six{grid-template-columns:repeat(3,1fr);}
.collector-grid.vertical{grid-template-columns:1fr;gap:6px;}
.collector-grid.vertical .user-photo img{height:118px;}
.collector-grid.mixed .user-photo img{height:104px;}
.collector-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:6px 0;}
.user-photo{background:#070707;border-color:#302f2e;padding:3px;}
.user-photo img{height:112px;object-fit:contain;background:#000;border-radius:4px;}
.user-photo figcaption{color:#ece7db;font-size:6.65px;line-height:1.08;}
.collector-strip .user-photo img{height:82px;}
.collector-table th{font-size:7.45px!important;}
.collector-table td{font-size:6.95px!important;line-height:1.05!important;}
.compact-twocol{grid-template-columns:1.05fr .95fr;gap:8px;}
@media (max-width:620px){.collector-grid.six{grid-template-columns:1fr 1fr}.collector-strip{grid-template-columns:1fr 1fr}.user-photo img{height:100px}.collector-grid.vertical .user-photo img{height:95px}}

/* Second collector photo batch */
.collector-grid.seven{grid-template-columns:repeat(3,1fr);}
.collector-grid.seven .user-photo img{height:96px;}
@media (max-width:620px){.collector-grid.seven{grid-template-columns:1fr 1fr}.collector-grid.seven .user-photo img{height:98px}}
