/* The atlas and monastery books keep the same parchment and timber vocabulary. */
.jasper-nav,.atlas-shortcuts,.atlas-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 14px}
.jasper-nav button,.atlas-shortcuts button,.atlas-tools button,.jasper-journal button{min-height:42px;white-space:normal}
.jasper-bird{display:grid;grid-template-columns:160px minmax(0,1fr);gap:22px;align-items:start}
.jasper-bird canvas{image-rendering:pixelated;max-width:100%;height:auto;background:#d5c098;border:3px solid #967044}
.jasper-bird section,.jasper-journal{min-width:0;overflow-wrap:anywhere}.jasper-bird p,.jasper-finds p{line-height:1.6}
.jasper-requirements{padding:12px 18px;background:#e0cba1;border:2px solid #ab8758}.jasper-requirements p{margin:3px 0 12px}
.jasper-plans,.jasper-finds{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0}
.jasper-plans>*{min-width:0}.jasper-journal progress{width:min(400px,100%);height:16px;accent-color:#66825a}
.atlas-overview{grid-template-columns:repeat(3,minmax(0,1fr))!important}.atlas-overview .atlas-region{display:flex;flex-direction:column;gap:10px;width:100%;padding:8px;color:#493725;background:#dcc899;white-space:normal;text-align:center;align-items:center;min-width:0}
.atlas-region canvas{width:100%;height:auto;image-rendering:pixelated;border:2px solid #967044}.atlas-region:hover,.atlas-region:focus-visible{outline:3px solid #8a5c38;outline-offset:2px}
.atlas-tools label{display:flex;align-items:center;gap:8px;min-width:0}.atlas-tools select{min-width:0;max-width:min(300px,100%);font-size:16px}.atlas-tools output{min-width:42px;text-align:center}
#peat-atlas{display:block;width:100%;height:auto;aspect-ratio:8/5;max-width:100%;max-height:65dvh;object-fit:fill!important;image-rendering:pixelated;touch-action:none;cursor:grab;border:3px solid #9a744b;background:#544634;box-sizing:border-box}
#peat-atlas:active{cursor:grabbing}#peat-atlas:focus-visible{outline:3px solid #896033;outline-offset:2px}
#atlas-selection{min-height:44px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}.atlas p{overflow-wrap:anywhere}
@media(max-width:800px),(max-height:500px){
 /* Do not let a stale visualViewport measurement outgrow the current CSS viewport. */
 .game-ui #panel[open],.game-ui #panel.is-dialogue,.game-ui #panel.is-dialogue:has(.topic-dialogue){max-height:calc(min(100dvh,var(--play-height,100dvh)) - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));height:auto;min-height:0}
 .game-ui #panel>header,.game-ui #panel>footer,.game-ui #panel-tabs,.game-ui #game-tabs{flex-shrink:0}
 .atlas-overview{grid-template-columns:repeat(2,minmax(0,1fr))!important}.atlas-tools{gap:6px}.atlas-tools label{flex:1 1 100%}.atlas-tools select{flex:1}
}
@media(max-width:520px){.atlas-overview,.jasper-plans,.jasper-finds{grid-template-columns:minmax(0,1fr)!important}.jasper-bird{grid-template-columns:72px minmax(0,1fr);gap:10px}.jasper-bird canvas{width:72px}.jasper-bird p{font-size:16px}.jasper-nav button,.atlas-shortcuts button{flex:1 1 130px}.atlas-tools button{min-width:44px;padding:6px 10px}#peat-atlas{min-height:220px}.jasper-requirements{padding:10px}.game-ui .atlas-tools select{width:100px}}
