/* Finishing: existing objects gain clear reading, touch and inspection affordances. */
.finishing-button{min-width:44px;min-height:44px;padding:8px 13px;border:1px solid #947749;background:#2c2419;color:#eddbb3;font:16px/1.2 EB,Georgia,serif;cursor:pointer}
.finishing-button[aria-pressed=true]{background:#ddc28a;color:#2d2113;box-shadow:inset 0 -3px #8b6937}
.finishing-button:disabled{opacity:.45;cursor:default}
.finishing-button:focus-visible,.finishing-previews a:focus-visible,.finishing-study>summary:focus-visible,.finishing-provenance summary:focus-visible{outline:3px solid #f7cf79;outline-offset:3px}
/* F01 — separate geometric reading line from the existing selected-chapter border. */
.chapter-rail a{position:relative}
.finishing-progress{position:absolute;inset:auto 8px 5px;height:2px;background:#e7c374;transform:scaleX(var(--read,0));transform-origin:left;pointer-events:none;transition:transform .12s linear}
/* Native scroll padding already offsets anchors; do not add it twice. */
html.finishing-ready{scroll-padding-top:var(--finishing-rail,66px)}
.finishing-ready #departure,.finishing-ready #creek,.finishing-ready #trading,.finishing-ready #underground,.finishing-ready #fieldbooks{scroll-margin-top:0}
/* F02 — one quiet local-preview index, not four more destination cards. */
.finishing-previews{display:flex;align-items:center;flex-wrap:wrap;gap:0 12px;margin-top:14px;padding-top:7px;border-top:1px solid #8a724344;font:15px/1.25 EB,Georgia,serif}
.finishing-previews>span{width:100%;font:10px/1.4 Arial,sans-serif;text-transform:uppercase;letter-spacing:.12em;color:#c2ac82}
.finishing-previews a{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;color:#ead5a5;text-underline-offset:5px;text-decoration:underline;text-decoration-color:#8d7143}
.finishing-previews a:hover{color:#ffebbe;text-decoration-color:currentColor}
/* F03 — a real lamp-position control strip at the physical threshold. */
.finishing-lamp{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px;margin:12px 0 0;color:#dfc799}
.finishing-lamp>span{position:static;inset:auto;display:block;padding:0;background:none;letter-spacing:normal;font:italic 15px EB,Georgia,serif;margin-right:auto}
.finishing-lamp+.mine-lantern-footer{margin-top:16px}
/* F04/F05 — compact inspection controls remain outside the scrollable print. */
.finishing-pan{display:flex;justify-content:center;flex-wrap:wrap;align-items:center;gap:5px;margin:10px 0}
.finishing-pan-note{width:100%;text-align:center;font:italic 14px EB,Georgia,serif;color:#4d3c24}
.finishing-matte{display:flex;align-items:center;gap:5px;margin:6px 0 10px}
.finishing-matte>span{font:italic 15px EB,Georgia,serif;margin-right:auto;color:#4d3c24}
.print-viewer .print-viewport{box-sizing:border-box;padding:12px;background:#ded0af}
.print-viewer[data-matte=charcoal] .print-viewport{background:#1d1e1a;border-color:#1d1e1a}
.print-viewer .print-viewport img{box-shadow:0 2px 8px #0005}
.finishing-print{display:block;margin:12px 0 0 auto}
/* F07 — provenance is at the object, closed until requested. */
.finishing-provenance{margin:0 -20px;background:#e1d2b0;color:#392d1d;border-top:1px solid #aa9061;text-align:left}
.finishing-provenance summary{min-height:44px;padding:11px 16px;cursor:pointer;font:16px/1.4 EB,Georgia,serif}
.finishing-provenance p{padding:0 16px 16px;margin:0;font:16px/1.5 EB,Georgia,serif;color:inherit;max-width:none}
.finishing-provenance a{display:inline-block;text-decoration:underline;text-underline-offset:3px;color:#4d3d23}
.finishing-provenance summary:focus-visible{outline-color:#4d3d23;outline-offset:-4px}
/* F08 — fold the optional studies, never the real entry links. */
.finishing-study{min-width:0;max-width:100%;border-top:1px solid #977b47;padding-top:0;color:#ddc89b}
.finishing-study>summary{cursor:pointer;min-height:48px;padding:13px 6px;font:18px/1.3 EB,Georgia,serif;letter-spacing:.01em}
.finishing-study[open]>summary{border-bottom:1px solid #8b73443b;margin-bottom:14px}
.finishing-study>.survey-plate,.finishing-study>.trade-diorama,.finishing-study>.open-notebook{margin-top:0;width:100%;max-width:none}
.finishing-study>.survey-plate{border-top:0;padding-top:0}
.finishing-study>.survey-plate>h3{display:none}
.trading-studies>.finishing-study[data-study=token-study]{align-self:start}
.research-studies>.finishing-study{color:#46351e}
.research-studies>.finishing-study>summary:focus-visible{outline-color:#5d431f}
.chapter-copy>.finishing-study{margin-top:24px}
/* F09 — explicit visibility ledger, scoped to the already-expanded map. */
.survey-map-key{flex-wrap:wrap}
.finishing-map-ledger{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-basis:100%;border-top:1px solid #a68b5a;padding-top:5px}
.finishing-map-status{font:14px/1.3 EB,Georgia,serif;color:#392b17}
.survey-map-key .finishing-map-restore{min-width:76px;flex:0 0 auto;font-size:14px;background:#3a2b18;color:#f0dfb9;padding:6px 9px}
/* F10 — use existing seam and timbers as the annotation, not another toy. */
.finishing-cutaway{display:flex;flex-wrap:wrap;gap:5px;margin-top:14px}
.finishing-cutaway button{flex:1}
.mine-cutaway[data-inspect=seam] svg>path:not(.finishing-seam),.mine-cutaway[data-inspect=timber] svg>path:not(.finishing-timber){opacity:.28}
.mine-cutaway[data-inspect=seam] .finishing-seam{stroke:#f4d47d;stroke-width:7;filter:drop-shadow(0 0 3px #c89b43)}
.mine-cutaway[data-inspect=timber] .finishing-timber{filter:drop-shadow(0 0 3px #e3bd72)}
@media(max-width:1000px) and (min-width:761px){.trading-studies>.finishing-study[data-study=token-study]{grid-column:1/-1;width:100%;max-width:320px;justify-self:center}}
@media(max-width:760px){
 .finishing-previews{gap:0 13px;margin-top:10px}.finishing-previews a{font-size:16px}
 .finishing-lamp>span{flex-basis:100%;text-align:center;margin:0 0 3px}.finishing-lamp button{flex:1}
 .finishing-provenance{margin-inline:-12px}
 .finishing-study[open]{padding-bottom:16px}.trading-studies:has(.finishing-study),.research-studies:has(.finishing-study){gap:12px}
 .finishing-cutaway button{font-size:14px;padding-inline:8px}
 .print-viewer .print-viewport{max-height:42dvh;padding:8px}
 .finishing-matte,.finishing-pan{gap:4px}.finishing-matte .finishing-button{padding-inline:10px}
 .finishing-pan{display:grid;grid-template-columns:44px 44px minmax(44px,1fr) 44px 44px}.finishing-pan .finishing-button{padding-inline:0;font-size:14px}.finishing-pan-note{grid-column:1/-1}
 .print-viewer .print-zoom-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.print-viewer .print-zoom-controls .fieldcraft-label{grid-column:1/-1;margin:0}.print-viewer .print-zoom-controls button{padding-inline:4px}
 .finishing-map-status{font-size:13px}
}
/* F11 — five tiny faceted nuggets, clipped to each native entry. */
.routes>a{position:relative}
.routes a>.finishing-nugget-pool{position:absolute;inset:0;display:block!important;margin:0!important;overflow:hidden;pointer-events:none;opacity:0;z-index:3}
.finishing-nugget-pool i{position:absolute;left:12px;top:10px;width:7px;height:6px;background:linear-gradient(135deg,#fff0af 0 25%,#c69431 26% 60%,#f0cd68 61%);clip-path:polygon(20% 0,76% 9%,100% 60%,60% 100%,0 70%);box-shadow:0 1px 2px #100a04}
.finishing-nugget-pool i:nth-child(2){left:23px;top:14px}.finishing-nugget-pool i:nth-child(3){left:34px;top:9px}.finishing-nugget-pool i:nth-child(4){left:45px;top:15px}.finishing-nugget-pool i:nth-child(5){left:56px;top:10px}
.routes a[data-nugget-active=true]>.finishing-nugget-pool,.routes a:focus-visible>.finishing-nugget-pool{opacity:1}
/* F12 — original specimen and four real entrances share the phone opening. */
@media(max-width:700px){
 .finishing-ready .opening{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:10px;padding-top:14px}
 .finishing-ready .opening-copy{display:contents}
 .finishing-ready .opening h1{grid-column:1;grid-row:1;align-self:center;font-size:clamp(30px,8.3vw,40px);padding:10px 0;margin:0;line-height:1.12}
 .finishing-ready .opening h1::before{font-size:7px;letter-spacing:.08em}
 .finishing-ready .opening .tableau{grid-column:2;grid-row:1;height:170px;margin:0;align-self:center}
 .finishing-ready .opening .gold-piece{inset:0 -5% 0 -5%}
 .finishing-ready .opening #stage{inset:0;height:170px}
 .finishing-ready .opening .claim-map{inset:35px 0 12px;transform:rotate(-7deg)}
 .finishing-ready .opening>.compass{grid-column:1/-1;grid-row:6;position:relative;inset:auto;transform:none;margin:8px 0 8px 6px;justify-self:start}
 .finishing-ready .opening>.compass .compass-select{min-width:44px;min-height:44px}
 .finishing-ready .opening>.compass .compass-readout{left:calc(100% + 18px);top:50%;transform:translateY(-50%);width:150px;font-size:16px;line-height:1.3;padding:6px 8px}
 .finishing-ready .opening .field-tag{display:none}
 .finishing-ready .opening .intro{grid-column:1/-1;grid-row:2;margin:0;font-size:19px}
 .finishing-ready .opening .routes{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:1fr;gap:8px;width:100%;max-width:none}
 .finishing-ready .routes a.frontier-control{grid-template-columns:84px minmax(0,1fr) 22px;gap:8px;padding:0 8px 0 0;min-height:70px}
 .finishing-ready .routes a.frontier-control>.destination-plate{grid-column:1;grid-row:1;height:70px;width:84px;border-bottom:0;border-right:1px solid #8f7145}
 .finishing-ready .routes a.frontier-control>span:not(.destination-plate):not(.route-landscape){margin-left:0}
 .finishing-ready .routes strong{font-size:20px;line-height:1.1}.finishing-ready .routes small{font-size:14px;line-height:1.2}
 .finishing-ready .finishing-previews{grid-column:1/-1;grid-row:4;margin:0}
 .finishing-ready .opening>.desk-controls{grid-column:1/-1;grid-row:5;position:static;width:100%}
 .finishing-ready .opening .frontier-explorer{grid-column:1/-1;grid-row:7}
 .finishing-ready .opening:has(.map-open) .tableau{grid-column:1/-1;height:360px;grid-row:2}
 .finishing-ready .opening:has(.map-open) h1{grid-column:1/-1}
 .finishing-ready .opening:has(.map-open) .intro{grid-row:3}
 .finishing-ready .opening:has(.map-open) .routes{grid-row:4}
 .finishing-ready .opening:has(.map-open) .finishing-previews{grid-row:5}
 .finishing-ready .opening:has(.map-open)>.desk-controls{grid-row:6}
 .finishing-ready .opening:has(.map-open)>.desk-controls .assay-open,.finishing-ready .opening:has(.map-open)>.desk-controls .specimen-tools{display:none}
 .finishing-ready .opening:has(.map-open)>.desk-controls{justify-content:center}
 .finishing-ready .opening:has(.map-open)>.compass{grid-row:7;visibility:hidden}
 .finishing-ready .opening:has(.map-open) .frontier-explorer{grid-row:8}
}
@media(prefers-reduced-motion:reduce){.finishing-progress{transition:none}}
.scene-still .finishing-progress{transition:none}
/* F06 — a normal-flow sheet avoids top-layer dialog clipping in print engines. */
.finishing-print-sheet{display:none}
@media print{
 html:has(.print-viewer[open]){background:white!important}
 body:has(.print-viewer[open]){background:white!important;color:#111!important}
 body:has(.print-viewer[open])>*:not(.finishing-print-sheet){display:none!important}
 body:has(.print-viewer[open])>.finishing-print-sheet{display:block!important;width:100%;margin:0;padding:0;background:white;color:#111}
 .print-viewer[open]::backdrop{display:none}
 .finishing-print-sheet img{display:block;width:100%;height:auto;max-height:80vh;object-fit:contain}
 .finishing-print-sheet p{font:12pt/1.5 Georgia,serif!important;color:#111!important;break-inside:avoid}
 .finishing-previews,.finishing-progress,.finishing-lamp,.finishing-cutaway{display:none}
}
