*{box-sizing:border-box}html,body{margin:0;height:100%;overscroll-behavior:none}body{height:100dvh;color:#263029;background:#e8e8df;font:16px system-ui,Arial,sans-serif;display:flex;flex-direction:column}header,footer{background:#22271f;color:#f6f6ef;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(18px,4vw,54px)}header{height:68px;flex-shrink:0;border-bottom:2px solid #d09b75}header strong{font:700 28px Georgia,serif;display:flex;gap:12px;align-items:center}header strong span,.edition,small,footer span:first-child{font:650 11px system-ui;letter-spacing:.13em}.edition{color:#e5bc9c}main{position:relative;flex:1;min-height:0;overflow:hidden}canvas{display:block;width:100%;height:100%;touch-action:none;overscroll-behavior:contain;user-select:none;-webkit-touch-callout:none}canvas:focus-visible,button:focus-visible{outline:3px solid #99582b;outline-offset:-3px}.title{position:absolute;z-index:1;pointer-events:none;left:clamp(19px,4vw,52px);top:clamp(22px,4vh,45px)}small{color:#586251}h1{font:normal clamp(29px,5vw,51px)/1.02 Georgia,serif;margin:9px 0}.title p{font-size:14px;margin:0}.bar{position:absolute;bottom:max(17px,env(safe-area-inset-bottom));display:flex;left:50%;transform:translateX(-50%);background:#22271f;border-radius:7px;padding:4px;gap:2px;white-space:nowrap}button{border:0;background:transparent;color:white;border-radius:4px;cursor:pointer;font:550 14px system-ui;padding:12px 16px;min-height:44px}button:hover,button[aria-expanded=true]{background:#454b40}aside{position:absolute;bottom:80px;left:50%;transform:translateX(-50%);width:min(330px,90vw);background:#fffef6;padding:19px;border-radius:7px;box-shadow:0 5px 24px #2223;font-size:14px}aside p{margin:7px 0 0}footer{min-height:34px;gap:8px;font-size:11px}#status{position:absolute;top:54%;left:50%;transform:translateX(-50%);text-align:center;background:#fffefa;padding:10px 15px;border-radius:5px}#status[hidden]{display:none}@media(max-width:500px){header{height:56px}footer span:first-child{display:none}footer{justify-content:center}.edition{font-size:10px}}
#sections{bottom:79px;max-height:65%;overflow:auto;padding:14px 17px;scrollbar-width:thin;overscroll-behavior:contain}#sections .panelhead{display:flex;justify-content:space-between;align-items:center}#sections button{color:#263029;background:#eaece4;padding:8px 11px}#sections .presets{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin:10px 0 14px}#sections button[aria-pressed=true]{background:#22271f;color:#fff}#sections label{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:8px 0;font-size:14px}#sections select{width:100%;margin:4px 0;padding:7px;font:inherit}#sections label:has(select){display:block}#offset{width:84px;font:inherit;padding:7px;border:1px solid #a4ab9e;border-radius:4px}input[type=range]{width:100%;accent-color:#955e37;min-height:28px}#rl{font-size:14px;color:#70462c;margin:0 0 10px}#sections .checks label{justify-content:flex-start;font-size:13px}#sections details{border-top:1px solid #d4d8ce;margin-top:12px;padding-top:12px}#sections summary{cursor:pointer;min-height:30px}#boxSliders label{display:block}#boxSliders output{float:right;font-size:12px}.panelactions{display:flex;gap:6px;margin-top:10px}#capStatus{font-size:11px;color:#61695c}.bar button{padding:11px 12px}@media(min-width:850px){#sections{left:auto;right:24px;transform:none;bottom:24px;max-height:85%;width:315px}}

#sections{max-height:min(40dvh,350px);width:min(280px,calc(100vw - 28px));padding:8px 13px 4px;bottom:77px}#sections .presets{margin:3px 0 5px}#sections #advanced{margin:0;padding:0}#advanced>summary{padding:12px 2px;min-height:44px;font-weight:600}#sections #closeSection{background:none;font-size:19px}#depthRail:not([hidden]){position:absolute;right:max(7px,env(safe-area-inset-right));bottom:80px;display:flex;align-items:center;flex-direction:column;width:55px;padding:9px 2px;border:1px solid #d9dacf;border-radius:12px;background:#fffef6f5;box-shadow:0 2px 9px #2221;color:#263029}#railPreset{font-size:12px}#railSlider{writing-mode:vertical-lr;direction:rtl;width:44px;height:clamp(80px,14dvh,175px);margin:6px 0;touch-action:none}#railValue{font:600 12px system-ui;font-variant-numeric:tabular-nums}#depthRail small{font-size:10px;letter-spacing:0}#advanced[open]{padding-bottom:10px}@media(max-height:500px){#sections{max-height:calc(100% - 70px);bottom:60px}#depthRail:not([hidden]){bottom:18px}}
button,summary{touch-action:manipulation}
#sections{left:12px;right:auto;transform:none;width:min(280px,calc(100vw - 88px));z-index:3}
#sections .panelhead{position:sticky;top:-8px;background:#fffef6;z-index:5;margin-top:0;box-shadow:0 1px 0 #e0e2d7}
#depthRail:not([hidden]){z-index:4}
@media(min-width:850px){#sections{left:auto;right:78px}}
header{position:relative;z-index:6;touch-action:none;user-select:none;-webkit-user-select:none}

#dims,#pinLayer{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}#dims{display:none;stroke:#994900;stroke-width:2.5;fill:white}#pinLayer button{position:absolute;pointer-events:auto;transform:translate(-50%,-100%);min-height:30px;min-width:30px;background:#754320;color:white;border:2px solid white;border-radius:15px 15px 15px 0;padding:3px 7px;box-shadow:0 1px 4px #0006}
#dimValue{position:absolute;transform:translate(-50%,-120%);padding:4px 8px;border-radius:4px;background:#492f20;color:white;font-size:14px;pointer-events:none}
#modeHint{position:absolute;left:12px;right:12px;bottom:72px;text-align:center;pointer-events:none;font-size:13px;background:#fffef6eb;border-radius:5px;padding:5px;margin:auto;width:fit-content;max-width:86%}
#noteCard{z-index:7;bottom:106px;max-height:48%;overflow:auto;padding:12px 16px}#noteCard label{display:block;margin:6px 0}#noteCard input,#noteCard textarea{width:100%;padding:7px;font:16px system-ui}#noteCard button,.bar button[aria-pressed=true]{background:#85583b;color:white}.noteHead{display:flex;justify-content:space-between;align-items:center}#noteText{white-space:pre-wrap;overflow-wrap:anywhere}.bar{z-index:5;max-width:calc(100% - 8px)}.bar button{padding:8px;font-size:13px}.bar #sectionButton{max-width:92px;overflow:hidden;text-overflow:ellipsis}@media(max-width:360px){.bar button{font-size:12px;padding:6px}}
#firstMark{position:absolute;width:10px;height:10px;background:white;border:2px solid #994900;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}main:has(#depthRail:not([hidden])) #modeHint{right:70px;left:8px;max-width:calc(100% - 78px)}

.brandMark{position:relative;display:inline-block;width:146px;line-height:0;vertical-align:middle}.brandMark svg{display:block;width:100%;height:auto}.brandInk{position:absolute;inset:0;color:#d09b75;clip-path:inset(0 100% 0 0)}

body{overflow:hidden;background:#22271f;--drop:0px;--stretch:1}
#reviewPage{display:flex;flex-direction:column;height:100%;min-height:0;background:#e8e8df;transform:translateY(var(--drop))}
#pullReveal{position:absolute;inset:0 0 auto;height:72px;display:flex;align-items:center;justify-content:center;gap:14px;color:#e3b99a;pointer-events:none}
.pullMark{width:50px;line-height:0;overflow:hidden;transform:scaleY(var(--stretch));transform-origin:center}
.pullMark svg{width:100%;display:block}
#refreshHint{font:500 13px/1.2 system-ui;color:#fffefa}
body.charged .pullMark,body.committing .pullMark{transform:none}
body.charged .pullMark{animation:popMark .42s ease-out}
body.returning #reviewPage{transition:transform .25s cubic-bezier(.22,.83,.35,1)}
@keyframes popMark{0%{transform:scale(.84,1.5)}50%{transform:scale(1.12,.88)}75%{transform:scale(.97,1.06)}100%{transform:none}}
@media(prefers-reduced-motion:reduce){.pullMark,body.charged .pullMark,body.returning #reviewPage{animation:none;transform:none;transition:none}body.returning #reviewPage{transform:translateY(var(--drop))}}
