.modal.chem-modal{max-width:1020px;scroll-behavior:smooth}
.chem-modal .modalinner{padding:0}
.chem-head{padding:32px 38px 22px}
.chem-head h2{font-size:38px}
.chem-cover{margin:0;background:#eee8e0}
.chem-cover img{display:block;width:100%;height:auto;max-height:min(62vh,560px);object-fit:contain;object-position:center;background:#eee8e0}
.chem-cover figcaption{font-size:11px;color:#687078;padding:10px 38px;background:#f5f2ed}
.chem-body{padding:26px 38px 36px}
.chem-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 28px}
.chem-stats:empty{display:none}
.chem-stat{padding:17px 16px;background:#f7f4ef;border:1px solid #e9e2d9;border-radius:8px}
.chem-stat strong{display:block;font:800 23px/1.3 Manrope,sans-serif;letter-spacing:-.045em;color:#a33c30}
.chem-stat span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:#72777b;margin-top:8px}
.chem-overview p,.chem-section p{font-size:14px;margin:0 0 14px;white-space:pre-line}
.chem-section{border-top:1px solid var(--line);padding-top:27px;margin-top:27px;scroll-margin-top:20px}
.chem-section-title{display:flex;align-items:start;justify-content:space-between;gap:15px}
.chem-section h3{font:800 22px/1.3 Manrope,sans-serif;letter-spacing:-.04em;margin:7px 0 7px}
.chem-section .meta{margin-bottom:17px;line-height:1.6}
.chem-section .eyebrow{font-size:10px}
.chem-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}
.chem-gallery figure{margin:0;min-width:0}
.chem-photo-button{display:block;width:100%;padding:0;border:0;border-radius:8px;overflow:hidden;background:#ece6de}
.chem-photo-button img{display:block;width:100%;aspect-ratio:3/2;object-fit:contain;object-position:center}
.chem-photo-button:hover{box-shadow:0 0 0 2px var(--red)}
.chem-gallery figcaption{font-size:12px;line-height:1.5;color:#69727a;margin-top:8px}
.chem-photo-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:7px}
.chem-text-button{border:0;padding:0;background:transparent;font-size:11px;color:var(--red);font-weight:700}
.chem-tools{display:flex;gap:9px;flex-wrap:wrap;align-items:center;margin:16px 0}
.chem-tools a{text-decoration:none}
.chem-index{display:flex;gap:8px;flex-wrap:wrap;padding:0 0 24px;margin-top:24px;border-bottom:1px solid var(--line)}
.chem-index button{font-size:11px;border:1px solid #e3ded7;background:white;border-radius:20px;padding:7px 11px;color:#6e6761}
.chem-upload{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;background:#faf8f5;border:1px dashed #d8cfc4;border-radius:8px;padding:13px 16px;color:#81766b;font-size:12px}
.chem-upload input{max-width:100%;font-size:12px}
.chem-editor{padding:32px 38px}
.chem-editor fieldset{border:1px solid var(--line);border-radius:8px;padding:10px 18px 18px;margin:22px 0}
.chem-editor legend{font-size:12px;font-weight:700;color:#8f5145;padding:0 8px}
.chem-editor .field textarea{min-height:160px}
.chem-editor .chem-stat-fields{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
.chem-viewer{width:min(1200px,96vw);max-width:none;max-height:96vh;border:0;border-radius:10px;background:#192027;color:#fff;padding:14px;box-shadow:0 20px 80px #0008}
.chem-viewer::backdrop{background:#000b}
.chem-viewer img{display:block;width:100%;height:min(72vh,900px);object-fit:contain}
.chem-viewer p{color:#ddd;margin:14px 8px;line-height:1.5;font-size:13px}
.chem-viewer-bar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:4px 0 12px}
.chem-viewer .btn{background:#29333d;border-color:#48515a;color:#fff}
.chem-viewer .btn:focus-visible,.chem-index button:focus-visible,.chem-photo-button:focus-visible{outline:3px solid #bc4839;outline-offset:3px}
@media(max-width:650px){.chem-head,.chem-body,.chem-editor{padding:23px 20px}.chem-head h2{font-size:29px}.chem-stats{grid-template-columns:1fr 1fr}.chem-stat{padding:13px 10px}.chem-stat strong{font-size:19px}.chem-cover figcaption{padding:10px 20px}.chem-gallery{gap:12px}.chem-section h3{font-size:20px}.chem-editor .chem-stat-fields{grid-template-columns:1fr}.chem-viewer img{height:65vh}.navinner{height:auto;min-height:75px;flex-wrap:wrap;padding-top:10px;padding-bottom:10px}.nav-actions{flex-wrap:wrap}.nav-actions .btn{padding:9px 11px}}
