@font-face { font-family: "Plateau Courier"; src: url("courier.ttf") format("truetype"); }
:root { color-scheme: light; --paper: floralwhite; --ink: #344d3f; --muted: #718377; --line: #91a991; --accent: orangered; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { display: flex; flex-direction: column; overflow: hidden; background: var(--paper); color: var(--ink); font: 12px/1.5 "Plateau Courier", "Courier New", Courier, monospace; }
button, a { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 1px dashed var(--accent); outline-offset: 3px; }
.forest-header, .forest-footer { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 16px; }
.forest-header { min-height: 46px; border-bottom: 1px solid var(--accent); }
.forest-footer { min-height: 40px; border-top: 1px solid var(--accent); font-size: 10px; }
.forest-header a, .forest-header button, .forest-footer button, .panel-head button { border: 0; padding: 0; background: none; color: var(--accent); text-decoration: none; }
.forest-header a:hover, .forest-header button:hover, .forest-footer button:hover, .panel-head button:hover { text-decoration: underline; text-underline-offset: 3px; }
.forest-title { color: var(--accent); font: 18px/1.1 "Courier New", Courier, monospace; text-align: center; }
.forest-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; flex: 1; min-height: 0; }
.forest-layout.book-hidden { grid-template-columns: minmax(0, 1fr); }
.field-panel[hidden] { display: none; }
.forest-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #193629; }
#forest-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
#forest-canvas:focus-visible { outline: 1px dashed #e4cea0; outline-offset: -4px; }
.map-tools { position: absolute; top: 10px; left: 12px; display: flex; gap: 3px; padding: 3px; border: 1px solid #77916f; background: #233c2eeb; }
.map-tools button { min-height: 29px; min-width: 30px; border: 0; background: none; padding: 3px 8px; color: #dce1bc; font-size: 10px; }
.map-tools button:hover, .map-tools button[aria-pressed="true"] { background: #496448; color: floralwhite; }
button:disabled { opacity: .35; cursor: default; }
.map-corner { position: absolute; top: 12px; right: 14px; display: grid; justify-items: end; color: #d5e7b8; font-size: 9px; line-height: 1.6; pointer-events: none; text-shadow: 0 1px 2px #13291e; }
.map-corner span:first-child { font-size: 13px; }
.forest-message { position: absolute; bottom: 15px; left: 16px; max-width: min(440px, calc(100% - 32px)); padding: 8px 11px; border: 1px solid #a3b991; background: rgba(20, 44, 31, .92); color: #e7e9cb; box-shadow: 3px 3px 0 #162d22; pointer-events: none; font-size: 11px; }
.field-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border-left: 1px solid var(--accent); background: var(--paper); }
.panel-head { flex: none; display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px dotted var(--line); color: var(--muted); font-size: 9px; letter-spacing: .10em; }
.panel-body { overflow: auto; padding: 17px 18px 25px; scrollbar-color: #aabca6 transparent; }
.eyebrow { margin: 0 0 8px; color: #6e9773; font-size: 9px; letter-spacing: .11em; text-transform: uppercase; }
.inspection-label { margin: 15px 0 6px; color: #87907a; font-size: 8px; letter-spacing: .14em; }
.field-panel h1 { margin: 0 0 11px; color: var(--accent); font: 23px/1.16 "Courier New", Courier, monospace; }
.place-description { min-height: 50px; margin: 0 0 15px; }
.readings { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px dotted var(--line); border-left: 1px dotted var(--line); }
.readings div { min-height: 48px; padding: 5px 7px; border-right: 1px dotted var(--line); border-bottom: 1px dotted var(--line); }
.readings span, .readings strong { display: block; }
.readings span { color: var(--muted); font-size: 9px; }
.readings strong { color: #466b50; font: normal 12px "Courier New", Courier, monospace; }
.watershed-readout { margin: 9px 0 0; color: #718377; font-size: 9px; letter-spacing: .01em; }
.field-sketch { min-height: 130px; display: grid; place-items: center; margin: 15px 0; padding: 12px 8px; border: 1px dashed #a7b99d; background: #283e30; color: #b8c5a2; text-align: left; white-space: pre; font: 14px/1.16 "Courier New", Courier, monospace; }
.field-note { color: #536e5c; font-size: 11px; }
.field-divider { height: 1px; margin: 19px 0; background: var(--accent); }
.ledger { display: grid; gap: 5px; }
.ledger p { margin: 0; color: var(--muted); font-size: 10px; }
.ledger-entry { padding: 5px 7px; border-left: 2px solid #91ad81; background: #f2f4e8; color: #526e56; font-size: 10px; }
.ledger-entry strong { color: var(--ink); }
.footer-controls { display: flex; align-items: center; gap: 17px; }
.footer-controls button { white-space: nowrap; min-height: 28px; }
.control-hint { color: var(--muted); }
.footer-date { white-space: nowrap; color: #5a8062; }
dialog { width: min(450px, calc(100% - 28px)); max-height: min(80vh, 700px); padding: 0; border: 1px solid #a3b991; background: var(--paper); color: var(--ink); box-shadow: 9px 9px 0 #1d3d2b; }
dialog::backdrop { background: rgba(16, 37, 26, .78); }
.dialog-inner { overflow: auto; max-height: 80vh; padding: 22px 26px; }
dialog h2 { margin: 0 0 16px; color: var(--accent); font: 25px/1.15 "Courier New", Courier, monospace; }
dialog p { margin: 0 0 13px; }
dialog button { border: 0; padding: 5px 0; background: none; color: var(--accent); }
@media (max-width: 1150px) { .control-hint { display: none; } }
@media (max-width: 800px) { .forest-layout { grid-template-columns: minmax(0, 1fr) 245px; } }
@media (max-width: 620px) {
    .forest-header, .forest-footer { padding-left: 10px; padding-right: 10px; }
    .forest-header { gap: 6px; }
    .forest-title { font-size: 13px; }
    .forest-layout { display: flex; flex-direction: column; }
    .forest-stage { flex: 1; min-height: 0; }
    .field-panel { max-height: 35vh; min-height: 38px; border-left: 0; border-top: 1px solid var(--accent); }
    .field-panel.is-collapsed { height: 38px; min-height: 38px; }
    .field-panel.is-collapsed .panel-body { display: none; }
    .panel-body { padding: 12px 15px; }
    .field-sketch { min-height: 100px; font-size: 12px; }
    .footer-controls { gap: 10px; flex-wrap: wrap; }
    .forest-footer { flex-wrap: wrap; gap: 0 12px; min-height: 42px; }
    .footer-date { margin-left: auto; font-size: 9px; }
    .forest-header a, .forest-header button { font-size: 10px; }
}
@media (pointer: coarse) {
    .map-tools button, .footer-controls button { min-height: 40px; }
    .map-tools button { min-width: 40px; }
}
