
/* overflow:hidden because #tree-panel is parked at translateX(100%),
   i.e. 380px beyond the right edge. Without this the document is wider
   than the screen and you can swipe sideways to an empty panel. */
html, body { margin: 0; height: 100%; overflow: hidden; }
/* dvh tracks the mobile browser chrome as it hides and shows; vh does
   not, which leaves the map taller than the visible area. */
#map { height: 100%; height: 100dvh; }
#locate-btn {
    position: absolute; bottom: 24px; right: 12px; z-index: 1000;
    width: 48px; height: 48px; border: none; border-radius: 50%;
    background: #2a7d2e; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; padding: 0;
}
#locate-btn svg { width: 26px; height: 26px; }
#locate-btn.denied { width: 34px; height: 34px; opacity: 0.55; }
#locate-btn.denied svg { width: 18px; height: 18px; }
#locate-msg {
    position: absolute; bottom: 80px; right: 12px; z-index: 1000;
    background: rgba(0,0,0,0.8); color: white; padding: 8px 12px; border-radius: 6px;
    font-family: sans-serif; font-size: 13px; line-height: 1.4; max-width: 230px; display: none;
}
#legal-footer {
    position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
    z-index: 1000; font-family: sans-serif; font-size: 11px;
    background: rgba(255,255,255,0.85); padding: 3px 10px; border-radius: 10px;
    white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
#legal-footer a { color: #2d6a4f; text-decoration: none; }
#legal-footer a:hover { text-decoration: underline; }
#legal-footer span { color: #aaa; margin: 0 5px; }
#lang-switch { color: #aaa; margin: 0 !important; }
#lang-switch a.on { font-weight: 700; text-decoration: none; color: #1b4332; }
/* The licence credit is an obligation, not decoration: keep it legible and
   never let it wrap across half the map. Leaflet's own "Leaflet" prefix is
   dropped (BSD needs no UI credit) to buy the width back. */
.leaflet-control-attribution {
    font-size: 10px; max-width: 60vw; line-height: 1.35;
    background: rgba(255,255,255,0.85);
}
.leaflet-control-attribution a { color: #2d6a4f; }
/* ---- Add / edit spot wizard ---- */
/* The pin picker dims nothing and hides nothing: the whole point is that
   you move the MAP under a fixed crosshair, so the map must stay live. */
#pin-picker { position: absolute; inset: 0; z-index: 1400; display: none; pointer-events: none; }
#pin-picker.on { display: block; }
#pin-cross {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%);
    width: 34px; height: 44px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45));
}
#pin-hint {
    position: absolute; left: 50%; top: 18px; transform: translateX(-50%);
    background: rgba(27,67,50,.94); color: #f6f4ec; padding: 9px 16px;
    border-radius: 18px; font: 14px -apple-system,"Segoe UI",sans-serif;
    max-width: 86vw; text-align: center; pointer-events: none;
}
#pin-bar {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    display: flex; gap: 10px; justify-content: center; pointer-events: auto;
    background: linear-gradient(to top, rgba(246,244,236,.97), rgba(246,244,236,0));
}
#pin-bar button {
    border: none; border-radius: 22px; padding: 12px 22px; cursor: pointer;
    font: 600 15px -apple-system,"Segoe UI",sans-serif;
}
#pin-quit { background: #a4271b; color: #fff; }
#pin-ok { background: #9aa39c; color: #fff; }
#pin-ok.ready { background: #2d6a4f; }

#wiz { position: fixed; inset: 0; z-index: 1600; background: rgba(20,30,24,.55);
       display: none; align-items: flex-end; justify-content: center; }
#wiz.on { display: flex; }
#wiz-card {
    background: #fff; width: 100%; max-width: 520px; border-radius: 18px 18px 0 0;
    max-height: 92vh; display: flex; flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (min-width: 601px) { #wiz { align-items: center; } #wiz-card { border-radius: 18px; } }
#wiz-head { padding: 16px 18px 8px; border-bottom: 1px solid #eee; }
#wiz-step { font: 600 12px -apple-system,"Segoe UI",sans-serif; letter-spacing: .06em;
            text-transform: uppercase; color: #2d6a4f; }
#wiz-title { font: 600 20px -apple-system,"Segoe UI",sans-serif; margin: 4px 0 0; color: #1b4332; }
#wiz-body { padding: 16px 18px; overflow-y: auto; flex: 1 1 auto; }
#wiz-foot { padding: 12px 18px 16px; border-top: 1px solid #eee; display: flex; gap: 10px; }
#wiz-foot button { border: none; border-radius: 22px; padding: 12px 20px; cursor: pointer;
                   font: 600 15px -apple-system,"Segoe UI",sans-serif; }
#wiz-quit { background: none; color: #a4271b; padding-left: 0 !important; }
#wiz-back { background: #eee; color: #1b4332; }
#wiz-next { background: #2d6a4f; color: #fff; margin-left: auto; }
#wiz-next:disabled { background: #9aa39c; cursor: default; }
.wiz-opt {
    display: flex; align-items: center; gap: 12px; padding: 13px 14px; margin-bottom: 9px;
    border: 2px solid #e4e4dd; border-radius: 12px; cursor: pointer;
    font: 15px -apple-system,"Segoe UI",sans-serif; color: #1b4332;
}
.wiz-opt.sel { border-color: #1b4332; background: #f3f7f3; }
.wiz-opt .glyph { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
                  display: flex; align-items: center; justify-content: center; }
.wiz-opt small { display: block; color: #6b6b6b; font-size: 13px; margin-top: 2px; }
.wiz-tag { display: inline-flex; align-items: center; gap: 6px; border: 2px solid #e4e4dd;
           border-radius: 18px; padding: 8px 13px; margin: 0 7px 8px 0; cursor: pointer;
           font: 14px -apple-system,"Segoe UI",sans-serif; color: #1b4332; }
.wiz-tag.sel { border-color: #1b4332; background: #1b4332; color: #fff; }
#wiz input[type=text], #wiz textarea {
    width: 100%; box-sizing: border-box; padding: 11px 12px; border: 1px solid #ccc;
    border-radius: 9px; font-size: 16px; font-family: inherit;
}
#wiz textarea { min-height: 110px; resize: vertical; }
.wiz-note { font: 13px/1.5 -apple-system,"Segoe UI",sans-serif; color: #6b6b6b; margin-top: 8px; }
.wiz-err { font: 14px/1.5 -apple-system,"Segoe UI",sans-serif; color: #a4271b; margin-top: 10px; }
.wiz-locked { background: #f6f4ec; border-left: 3px solid #9aa39c; padding: 10px 12px;
              font: 13px/1.5 -apple-system,"Segoe UI",sans-serif; color: #5b5b55; margin-top: 10px; }

/* Favourite button: sits top-right of a sheet, next to the close button,
   so it is reachable with a thumb without covering the heading. */
.fav-btn {
    position: absolute; top: 10px; right: 52px; z-index: 3;
    border: none; background: rgba(255,255,255,0.9); cursor: pointer;
    border-radius: 18px; padding: 5px 11px 5px 8px; display: flex;
    align-items: center; gap: 5px; font: 600 13px -apple-system,"Segoe UI",sans-serif;
    color: #666; box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.fav-btn svg { width: 17px; height: 17px; }
.fav-btn.on { color: #a4271b; }
.fav-btn:disabled { opacity: .5; cursor: default; }
#legend {
    position: absolute; bottom: 24px; left: 12px; z-index: 1000;
    background: white; padding: 8px 12px; border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3); font-family: sans-serif; font-size: 12px;
}
#legend div { display: flex; align-items: center; margin: 2px 0; }
#legend span { width: 22px; height: 0; border-top-width: 4px; border-top-style: solid; margin-right: 6px; }
#legend .dot { width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; }

/* ---- Auth + rings ---- */
#topbar { position: absolute; top: 12px; left: 12px; z-index: 1200; display: flex; gap: 8px; align-items: center; }
#auth-btn {
    background: #2d6a4f; color: #fff; border: none; border-radius: 8px;
    padding: 9px 16px; font-family: sans-serif; font-size: 14px; font-weight: 600;
    cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
#topbar { flex: 0 0 auto; }
#auth-btn { box-sizing: border-box; flex: 0 0 auto; height: 44px; white-space: nowrap;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
#auth-btn svg { display: none; width: 22px; height: 22px; flex: 0 0 22px; }
#rings-badge { white-space: nowrap; }
@media (max-width: 700px) {
    #auth-btn { width: 44px; min-width: 44px; padding: 0; border-radius: 50%; }
    #auth-btn svg { display: block; }
    #auth-btn .auth-label { display: none; }
    #topbar #rings-badge { display: none; }
}
@media (max-width: 480px) {
    #landing-reopen { box-sizing: border-box; width: 44px; height: 44px; padding: 7px !important; }
    #landing-reopen > span:last-child { display: none; }
}
#rings-badge {
    background: #fff; border: 1.5px solid #40916c; border-radius: 8px;
    padding: 8px 13px; font-family: sans-serif; font-size: 13px; color: #1b4332;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15); display: none; align-items: center; gap: 7px;
}
#rings-badge.show { display: flex; }
#rings-badge b { font-size: 15px; color: #2d6a4f; }
#rings-badge .ranger { font-size: 15px; }
#auth-overlay, #acct-overlay {
    position: fixed; inset: 0; z-index: 3000; background: rgba(27,67,50,0.35);
    display: none; align-items: flex-start; justify-content: center; padding-top: 8vh;
}
#auth-overlay.open, #acct-overlay.open { display: flex; }
#auth-modal, #acct-modal {
    background: #fff; width: 400px; max-width: 92vw; border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); padding: 28px 26px 24px;
    font-family: sans-serif; border-top: 5px solid #40916c; position: relative;
    max-height: 80vh; overflow-y: auto;
}
#auth-modal .x, #acct-modal .x { position: absolute; top: 12px; right: 14px; border: none;
    background: none; font-size: 22px; color: #888; cursor: pointer; }
#auth-modal h2, #acct-modal h2 { font-family: Georgia, serif; color: #1b4332; text-align: center; margin: 4px 0 2px; }
#auth-modal .sub { font-family: Georgia, serif; font-style: italic; color: #40916c;
    text-align: center; font-size: 14px; margin: 0 0 18px; }
#auth-modal label { display: block; font-size: 13px; font-weight: 600; color: #1b4332; margin: 12px 0 4px; }
#auth-modal input { width: 100%; box-sizing: border-box; padding: 10px; border: 1.5px solid #dfe8df;
    border-radius: 9px; font-size: 15px; }
#auth-modal input:focus { outline: none; border-color: #40916c; }
#auth-modal .consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px;
    font-weight: 400; color: #555; margin: 12px 0; }
#auth-modal button.go { width: 100%; margin-top: 18px; padding: 12px; border: none; border-radius: 10px;
    background: linear-gradient(180deg,#35785a,#2d6a4f); color: #fff; font-size: 15px; font-weight: 700;
    cursor: pointer; box-shadow: 0 4px 12px rgba(45,106,79,0.3); }
#auth-modal .swap { text-align: center; font-size: 13px; margin-top: 16px; color: #666; }
#auth-modal .swap a { color: #2d6a4f; cursor: pointer; }
#auth-msg { margin-top: 12px; font-size: 13px; padding: 9px; border-radius: 8px; display: none; }
#auth-msg.err { background: #fdecea; color: #a4271b; display: block; }
#auth-msg.ok { background: #e6f4ea; color: #1b4332; display: block; }
.auth-pane { display: none; } .auth-pane.active { display: block; }

/* ---- Account panel ---- */
#acct-modal h2 { margin-bottom: 14px; }
#acct-modal .row { font-size: 14px; color: #444; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
#acct-modal .row b { color: #1b4332; }
#acct-logout {
    width: 100%; margin-top: 16px; padding: 10px; border: 1px solid #cfe0cf;
    background: #fff; color: #2d6a4f; border-radius: 8px; font-size: 14px; cursor: pointer;
}
.danger-zone {
    margin-top: 24px; border: 1.5px solid #f0d0cc; background: #fdf7f6;
    border-radius: 10px; padding: 16px 18px;
}
.danger-zone h3 { margin: 0 0 6px; font-size: 15px; color: #a4271b; }
.danger-zone p { font-size: 13px; line-height: 1.55; color: #6b4a46; margin: 6px 0; }
.danger-zone ul { font-size: 13px; color: #6b4a46; padding-left: 20px; margin: 6px 0; }
.danger-zone li { margin: 3px 0; }
.danger-zone input {
    width: 100%; box-sizing: border-box; padding: 9px; margin-top: 8px;
    border: 1.5px solid #e0c0bc; border-radius: 8px; font-size: 14px;
}
.danger-zone button {
    width: 100%; margin-top: 10px; padding: 11px; border: none; border-radius: 8px;
    background: #a4271b; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}
.danger-zone button:disabled { background: #d9b5b1; cursor: default; }

/* Our UI owns the top of the screen; Leaflet's corners sit below it. */
.leaflet-top.leaflet-left { top: 156px; }
.leaflet-top.leaflet-right { top: 156px; }

/* ---- Mobile ---- */
@media (max-width: 600px), (pointer: coarse) {
    /* Pinch-zoom exists; the zoom buttons only occupy the corner the
       search box needs. */
    .leaflet-control-zoom { display: none !important; }
    #legend { bottom: 58px; font-size: 11px; max-width: 46vw; }
    /* Centred, the footer collides with the attribution bottom-right. */
    #legal-footer { left: 8px; transform: none; font-size: 10px; }
    .leaflet-control-attribution { font-size: 9px; max-width: 56vw; }
    .leaflet-top.leaflet-left { top: 150px; }
    .leaflet-top.leaflet-right { top: 150px; }
    .sheet { height: 44vh; }
    .tag-filter { max-width: 70vw !important; }
    #locate-btn { bottom: 64px; width: 44px; height: 44px; }
    #locate-msg { bottom: 116px; }
    body.sheet-open #locate-btn { bottom: calc(44vh + 10px); }
    body.sheet-open #locate-msg { bottom: calc(44vh + 62px); }
    #landing-card { padding: 18px 16px 14px !important; }
    #landing-logo { width: 124px !important; }
    #landing h1 { font-size: 20px !important; }
    /* iOS zooms the entire page when a focused input is under 16px,
       and never zooms back out. 16px is the threshold, not a preference. */
    input, textarea, select { font-size: 16px !important; }
}

/* ---- Bottom sheets (tree detail, spot detail) ----
   A side drawer covers the map and ends the browsing. A sheet that rises
   from the bottom leaves the map live above it, so you can read one tree
   and tap the next without closing anything. Two heights: a peek that
   shows the heading, and full for the narrative and, later, comments. */
.sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500;
    background: #fff; border-radius: 18px 18px 0 0;
    box-shadow: 0 -6px 24px rgba(0,0,0,0.3);
    height: 46vh; max-height: 88vh;
    display: flex; flex-direction: column;
    transform: translateY(101%); transition: transform .22s ease, height .22s ease;
    /* Closed means GONE: translated-away-but-present stayed reachable by
       a stray swipe, showing an empty panel. */
    visibility: hidden; pointer-events: none;
    font-family: Georgia, "Times New Roman", serif;
}
.sheet.open { transform: translateY(0); visibility: visible; pointer-events: auto; }
.sheet.full { height: 88vh; }
@media (min-width: 601px) {
    /* On a wide screen a full-width sheet is a waste: dock it bottom-left
       and leave the map beside it. */
    .sheet { left: 12px; right: auto; width: 420px; border-radius: 18px 18px 0 0; }
}
.sheet-grip {
    flex:0 0 auto; width:calc(100% - 120px); min-height:48px;
    margin:6px 108px 6px 12px; padding:8px 10px; box-sizing:border-box;
    border:1px solid #cfe0cf; border-radius:10px; background:#f1f6f0;
    color:#1b4332; font:600 13px/1.35 -apple-system,"Segoe UI",sans-serif;
    cursor:pointer; touch-action:none; user-select:none;
}
.sheet-grip:hover { background:#e4efe2; }
.sheet-grip:focus-visible { outline:3px solid #2d6a4f; outline-offset:2px; }
.sheet-scroll { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* While a sheet is up, the bottom-left furniture is underneath it. */
body.sheet-open #legend, body.sheet-open #legal-footer { display: none; }
/* The locate button stays visible with a sheet open — you are most
   likely to want it precisely when you are reading about a place. It
   rides above the sheet and moves clear of its top edge. */
body.sheet-open #locate-btn { bottom: calc(44vh + 12px); z-index: 1550; }
body.sheet-open #locate-msg { bottom: calc(44vh + 68px); z-index: 1550; }
/* Species photos: two compact previews, full image only on request. */
#tp-photos { margin: 0 0 18px; font: 12px/1.45 -apple-system, "Segoe UI", sans-serif; }
#tp-photos[hidden] { display: none; }
.tp-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.tp-photo-button { display: block; width: 100%; padding: 0; overflow: hidden; border: 1px solid #dfe8df;
    border-radius: 10px; background: #f6f4ec; color: #1b4332; cursor: zoom-in; font: inherit; }
.tp-photo-button:focus-visible, #species-photo-dialog button:focus-visible { outline: 3px solid #2d6a4f; outline-offset: 3px; }
.tp-photo-button img { display: block; width: 100%; height: 100px; object-fit: contain; }
.tp-photo-label { display: block; padding: 6px 8px; font-weight: 600; }
.tp-photo-note { color: #666; margin: 7px 0 4px; font-size: 11px; }
.tp-photo-credits { color: #555; font-size: 11px; overflow-wrap: anywhere; }
.tp-photo-credits summary { cursor: pointer; min-height: 24px; }
.tp-photo-credits ul { margin: 5px 0; padding-left: 18px; }
.tp-photo-credits li { margin-bottom: 7px; }
.tp-photo-credits a, #species-photo-dialog a { color: #21623e; }
.tp-photo-failure { padding: 15px 8px; color: #666; font: 12px/1.5 -apple-system, "Segoe UI", sans-serif; }
#species-photo-dialog { width: min(820px, calc(100vw - 24px)); box-sizing: border-box;
    max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 18px; border: 0; border-radius: 14px;
    background: #fff; color: #1b4332; overflow: hidden; font: 14px/1.5 -apple-system, "Segoe UI", sans-serif; }
#species-photo-dialog[open] { display: flex; flex-direction: column; }
.species-photo-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#species-photo-dialog::backdrop { background: rgba(10,25,18,.78); }
.species-photo-header { flex: 0 0 auto; position: relative; z-index: 1; background: #fff; display: flex; align-items: start; justify-content: space-between; gap: 12px; }
#species-photo-title { font: 600 18px/1.4 Georgia, serif; margin: 5px 0 12px; min-width: 0; overflow-wrap: anywhere; }
.species-photo-close { flex: 0 0 auto; min-width: 44px; min-height: 44px; border: 1px solid #dfe8df;
    border-radius: 8px; background: #f6f4ec; color: #1b4332; cursor: pointer; font: 600 14px system-ui; }
#species-photo-large { display: block; width: 100%; max-width: 100%; height: min(55vh, 620px); height: min(55dvh, 620px); object-fit: contain; background: #f6f4ec; }
#species-photo-large[hidden], #species-photo-error[hidden] { display: none; }
#species-photo-credit { margin-top: 10px; color: #555; font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 600px) { #species-photo-dialog { padding: 12px; } }

#tree-panel { }
#tp-close, .sheet-close {
    position: absolute; top: 10px; right: 12px;
    border: none; background: rgba(255,255,255,0.9); font-size: 24px;
    line-height: 1; cursor: pointer; color: #666; z-index: 2;
}
.tp-body { padding: 22px 22px 60px; }
#tp-common { font-size: 24px; font-weight: 700; margin: 0 0 2px; color: #1b4332; }
#tp-latin { font-style: italic; color: #777; margin: 0 0 18px; font-size: 15px; }
.tp-intro { font-size: 16px; line-height: 1.6; color: #222; }
.tp-point { margin: 14px 0; font-size: 15px; line-height: 1.6; }
.tp-point b { color: #1b4332; }
.tp-h {
    font-family: sans-serif; font-size: 12px; text-transform: uppercase;
    letter-spacing: .8px; color: #2a7d2e; margin: 26px 0 8px;
    border-top: 2px solid #e2efda; padding-top: 14px;
}
.tp-signs { margin: 8px 0; padding-left: 20px; font-size: 15px; line-height: 1.55; }
.tp-signs li { margin: 6px 0; }
.tp-remember { font-size: 15px; line-height: 1.6; font-style: italic; color: #333; }
.tp-data { width: 100%; border-collapse: collapse; font-family: sans-serif; font-size: 13px; }
.tp-data td { border-bottom: 1px solid #eee; padding: 7px 4px; vertical-align: top; line-height: 1.45; }
.tp-data td:first-child { font-weight: 600; color: #555; width: 38%; }
.tp-facts { font-family: sans-serif; font-size: 14px; margin: 4px 0 0; }
.tp-facts div { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #f0f0f0; }
.tp-facts b { color: #1b4332; }
#tp-content.collapsed { max-height: 220px; overflow: hidden; position: relative; }
#tp-content.collapsed::after {
    content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
    background: linear-gradient(transparent, #fff);
}
#tp-more {
    font-family: sans-serif; font-size: 14px; color: #2a7d2e; background: none;
    border: none; cursor: pointer; padding: 8px 0; font-weight: 600;
}
.tp-interact { font-family: sans-serif; background: #f7faf7; margin: 26px -22px 0; padding: 18px 22px 24px; }
.tp-agg { font-size: 14px; color: #1b4332; margin-bottom: 10px; }
.tp-agg b { font-size: 18px; }
.tp-rate-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 4px; }
.tp-rate-row button {
    width: 30px; height: 30px; border: 1px solid #cfe0cf; background: #fff;
    border-radius: 6px; cursor: pointer; font-size: 13px; color: #333;
}
.tp-rate-row button.sel { background: #2a7d2e; color: #fff; border-color: #2a7d2e; }
#tp-comment {
    width: 100%; box-sizing: border-box; margin-top: 8px; padding: 9px;
    border: 1px solid #cfe0cf; border-radius: 6px; font-family: sans-serif;
    font-size: 14px; resize: vertical; min-height: 60px;
}
.tp-ranger-toggle { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-size: 14px; }
#tp-submit {
    width: 100%; margin-top: 10px; padding: 11px; border: none; border-radius: 6px;
    background: #2a7d2e; color: #fff; font-size: 14px; cursor: pointer;
}
#tp-submit:disabled { background: #b5ccb5; cursor: default; }
#tp-copy {
    margin-top: 14px; padding: 8px 14px; border: 1px solid #2a7d2e; background: #fff;
    color: #2a7d2e; border-radius: 6px; cursor: pointer; font-size: 13px; font-family: sans-serif;
}
#tp-copy.copied { background: #2a7d2e; color: #fff; }
.tp-soon { font-family: sans-serif; color: #999; font-size: 14px; font-style: italic; margin-top: 8px; }
.tp-raw { font-size: 15px; line-height: 1.6; color: #222; white-space: pre-wrap; }
.tp-ratings { font-family: sans-serif; margin-top: 16px; }
.tp-rating-item { border-top: 1px solid #eee; padding: 9px 0; font-size: 14px; }
.tp-rscore { font-weight: 700; color: #2a7d2e; }
.tp-rwho { font-weight: 600; color: #1b4332; }
.tp-rnote { color: #444; line-height: 1.5; margin-top: 2px; }
.tp-rranger { color: #b8860b; font-size: 12px; font-weight: 600; }
.tp-verify-btn { margin-left: 8px; font-size: 12px; padding: 2px 8px; border: 1px solid #b8860b; background: #fff; color: #b8860b; border-radius: 10px; cursor: pointer; }
.tp-verified { color: #2a7d2e; font-size: 12px; font-weight: 600; margin-left: 6px; }
.tp-comments { font-family: sans-serif; margin-top: 24px; }
.tp-comment-item { border-top: 1px solid #eee; padding: 10px 0; font-size: 14px; }
.tp-comment-item.reply { margin-left: 22px; border-left: 2px solid #e2efda; border-top: none; padding-left: 12px; }
.tp-cmeta { font-size: 12px; color: #999; }
.tp-cwho { font-weight: 600; color: #1b4332; }
.tp-ctext { margin: 3px 0; line-height: 1.5; color: #333; }
.tp-reply-link { background: none; border: none; color: #2a7d2e; font-size: 12px; cursor: pointer; padding: 2px 6px 2px 0; }
.tp-reply-box { display: none; margin-top: 6px; }
.tp-reply-box textarea { width: 100%; box-sizing: border-box; padding: 7px; border: 1px solid #cfe0cf; border-radius: 6px; font-family: sans-serif; }
.tp-reply-box button { margin-top: 5px; padding: 6px 12px; border: none; border-radius: 6px; background: #2a7d2e; color: #fff; font-size: 13px; cursor: pointer; }
/* Both sheets share these: the spot thread is the same component with a
   different thread id, so it must not be a differently styled twin. */
#tp-new-comment, #sp-new-comment { width: 100%; box-sizing: border-box; padding: 9px; border: 1px solid #cfe0cf; border-radius: 6px; font-family: sans-serif; font-size: 14px; min-height: 50px; }
#tp-post-comment, #sp-post-comment { margin-top: 6px; padding: 8px 14px; border: none; border-radius: 6px; background: #2d6a4f; color: #fff; font-size: 13px; cursor: pointer; }
.tp-reactions { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.tp-react-btn {
    background: #fff; border: 1px solid #e0e8e0; border-radius: 14px;
    padding: 2px 9px; font-size: 13px; cursor: pointer; color: #555;
    display: flex; align-items: center; gap: 3px; transition: all .12s;
}
.tp-react-btn:hover { border-color: #40916c; }
.tp-react-btn.mine { background: #e6f4ea; border-color: #2a7d2e; color: #1b4332; font-weight: 600; }
.tp-react-btn .count { font-size: 12px; color: #888; }
.tp-react-btn.mine .count { color: #2a7d2e; }
#map-feedback { position:fixed; left:auto; right:12px; bottom:86px; z-index:1300;
    background:#1b4332; color:#fff; border:2px solid #f6f4ec; border-radius:24px;
    padding:10px 16px; font:700 14px -apple-system,"Segoe UI",sans-serif;
    box-shadow:0 3px 12px rgba(0,0,0,.32); cursor:pointer; }
body.sheet-open #map-feedback { bottom:calc(46dvh + 72px); z-index:1550; }
#feedback { position:fixed; inset:0; z-index:5000; background:rgba(20,30,24,.6);
    display:none; align-items:center; justify-content:center; padding:16px; box-sizing:border-box; }
#feedback.open { display:flex; }
#fb-card { background:#fff; width:100%; max-width:520px; max-height:calc(100dvh - 32px);
    overflow-y:auto; border-radius:18px; padding:22px; box-sizing:border-box;
    box-shadow:0 12px 36px rgba(0,0,0,.25); font:14px/1.5 -apple-system,"Segoe UI",sans-serif; }
#fb-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
#fb-title { margin:0 0 8px; font:600 21px Georgia,serif; color:#1b4332; }
#fb-close { flex:none; background:none; border:0; color:#1b4332; font:24px/1 sans-serif;
    padding:4px 8px; cursor:pointer; min-width:44px; min-height:44px; }
#fb-intro { margin:0 0 12px; color:#555; }
#fb-message { width:100%; min-height:125px; max-height:35dvh; resize:vertical;
    border:1px solid #9ab49f; border-radius:9px; box-sizing:border-box;
    padding:12px; font:16px/1.5 -apple-system,"Segoe UI",sans-serif; }
#fb-note { margin:8px 0 12px; color:#606963; font-size:12px; }
#fb-send { border:0; border-radius:9px; background:#2d6a4f; color:#fff;
    padding:11px 24px; min-height:44px; cursor:pointer; font:700 15px sans-serif; }
#fb-send:disabled { opacity:.55; cursor:default; }
#fb-status { margin:10px 0 0; min-height:21px; color:#a4271b; }
#fb-status.ok { color:#21623e; }
#fb-trap { position:absolute; left:-9999px; }
@media (max-width:600px) {
    #map-feedback { bottom:120px; }
    body.sheet-open #map-feedback { bottom:calc(46dvh + 72px); z-index:1550; }
    #feedback { align-items:flex-end; padding:0; }
    #fb-card { max-height:92dvh; border-radius:18px 18px 0 0;
        padding:20px 20px calc(20px + env(safe-area-inset-bottom,0px)); }
}

html, body { width:100%; max-width:100%; height:100%; height:100dvh; }
#landing, #ui, #fb-card, .sheet, #legal-footer { box-sizing:border-box; }
#landing-card { flex-shrink:0; min-width:0; }
#landing { overscroll-behavior:contain; }
#legal-footer { max-width:calc(100% - 24px); white-space:normal; text-align:center; }
.map-panel-head { display:flex; align-items:center; justify-content:space-between;
    gap:8px; position:sticky; top:0; z-index:2; background:#fff;
    padding:4px 8px 4px 12px; border-bottom:1px solid #eee; font-weight:600; }
.map-panel-close { flex:none; min-width:44px; min-height:44px; padding:0;
    background:transparent; border:0; color:#1b4332; font:26px/1 sans-serif; cursor:pointer; }
.map-panel-close:focus-visible { outline:2px solid #2d6a4f; outline-offset:-3px; }
@media (max-width:600px) {
    #legal-footer { bottom:calc(2px + env(safe-area-inset-bottom, 0px)); }
    #locate-btn { bottom:calc(64px + env(safe-area-inset-bottom, 0px)); }
    #map-feedback { bottom:calc(120px + env(safe-area-inset-bottom, 0px)); }
    .sheet { height:46dvh; max-height:88dvh; }
    .sheet.full { height:88dvh; }
    body.sheet-open #locate-btn { bottom:calc(46dvh + 12px); }
    body.sheet-open #map-feedback { bottom:calc(46dvh + 72px); }
    body:has(.sheet.open.full) #map-feedback,
    body:has(.sheet.open.full) #locate-btn { visibility:hidden; }
}

#ui, #wiz, #pin-picker { width:100vw; height:100dvh; right:auto !important; bottom:auto !important; }
#wiz, #wiz * { box-sizing:border-box; }
#wiz-card { min-width:0; width:min(100%,520px); }
#wiz-body { min-width:0; overflow-wrap:anywhere; }
#wiz-body fieldset { width:100%; }
/* Shared cream/forest palette and editorial type for the add-place flow. */
#wiz { font-family: Georgia, "Times New Roman", serif; color:#1b4332; }
#wiz-card { background:#f6f4ec; border-top:5px solid #40916c; box-shadow:0 12px 48px #102c2440; max-height:92dvh; overflow:hidden; }
#wiz-title { font:600 24px/1.25 Georgia,"Times New Roman",serif; }
#wiz-body { min-height:0; font-size:16px; line-height:1.5; }
#wiz-head, #wiz-foot { border-color:#d8dfcf; flex-shrink:0; }
#wiz-head { padding:18px 20px 14px; }
#wiz-body fieldset { border:1px solid #ccd7c4; border-radius:12px; padding:12px 14px; margin:0 0 14px; min-width:0; background:#fffdf7; }
#wiz-body legend { padding:0 5px; font-weight:600; }
#wiz-body fieldset label { display:flex; gap:10px; align-items:flex-start; padding:9px 0; cursor:pointer; }
#wiz-body input[type=radio] { accent-color:#1b4332; width:20px; height:20px; flex-shrink:0; }
#wiz .wiz-opt, #wiz .wiz-tag { font-family:Georgia,"Times New Roman",serif; background:#fffdf7; }
#wiz .wiz-opt.sel { background:#e6eddd; border-color:#40916c; }
#wiz .wiz-tag.sel { background:#1b4332; }
#wiz input[type=text], #wiz textarea { background:#fffdf7; border-color:#c6d1bc; color:#1b4332; font-family:Georgia,"Times New Roman",serif; }
#wiz input:focus-visible, #wiz textarea:focus-visible, #wiz button:focus-visible, #map-content-button:focus-visible { outline:3px solid #40916c; outline-offset:3px; }
#wiz-foot { gap:8px; padding:12px 16px 16px; }
#wiz-foot button { min-height:44px; padding:10px 14px; }
#wiz-back { background:#e6eddd; }
#map-primary-actions { flex-wrap:nowrap !important; width:min(350px,calc(100vw - 24px)); gap:8px !important; }
#map-primary-actions > button { min-width:0; flex:1; min-height:44px; padding:8px 10px !important; font-size:14px !important; }
#map-content-button { width:min(350px,calc(100vw - 24px)) !important; height:auto !important; min-height:56px; flex:0 0 auto !important; border-radius:16px !important; padding:8px 16px !important; gap:12px; font:15px -apple-system,"Segoe UI",sans-serif; }
#map-content-button span { text-align:left; }
#map-content-button strong, #map-content-button small { display:block; }
#map-content-button small { font-size:12px; opacity:.85; margin-top:2px; }

#map-primary-actions { width:auto; max-width:calc(100vw - 24px); gap:6px !important; }
#map-primary-actions > button { flex:0 1 auto; min-height:40px; padding:8px 12px !important; font-size:14px !important; }
#map-content-button { width:auto !important; min-height:40px; padding:8px 15px !important; gap:8px; border-radius:20px !important; font-size:14px; }
#map-content-button small { display:none; }
#map-content-button svg { width:17px; height:17px; }
#map-actions { gap:4px !important; }
#pin-search { position:absolute;top:16px;left:50%;transform:translateX(-50%);width:min(92vw,400px);background:#f6f4ec;color:#1b4332;border-radius:12px;padding:12px;box-sizing:border-box;pointer-events:auto;box-shadow:0 3px 16px #0003;font:14px/1.4 -apple-system,"Segoe UI",sans-serif; }
#pin-search label { display:block;font-weight:600;margin-bottom:6px; }
#pin-search form { display:flex;gap:6px; }
#pin-search input { min-width:0;flex:1;width:100%;font:inherit;padding:10px;border:1px solid #a6b9a0;border-radius:8px;box-sizing:border-box;font-size:16px; }
#pin-search button { font:inherit;min-height:40px;border:0;border-radius:8px;cursor:pointer;padding:8px 10px;background:#1b4332;color:#f6f4ec; }
#pin-results { max-height:25dvh;overflow:auto; }
#pin-results button { width:100%;text-align:left;background:#fffdf7;color:#1b4332;margin-top:5px;border:1px solid #d5ddce; }
#pin-search small { display:block;font-size:11px;margin-top:5px; }
#pin-search-status { margin-top:6px; }
#pin-search.collapsed form, #pin-search.collapsed #pin-results, #pin-search.collapsed #pin-search-status, #pin-search.collapsed small, #pin-search.collapsed details { display:none; }
#pin-search.collapsed label { margin:0;cursor:pointer; }
#pin-hint { width:max-content;max-width:calc(100vw - 32px);box-sizing:border-box; }
#pin-search small a { color:#2d6a4f; }
#pin-search #pin-hint { position:static;transform:none;width:auto;max-width:none;background:none;color:#1b4332;padding:0;margin:0 0 10px;border-radius:0;text-align:left;font:14px/1.4 -apple-system,"Segoe UI",sans-serif; }

#auth-modal .password-toggle { display:flex;align-items:center;gap:8px;min-height:36px;margin:4px 0 8px;font-weight:400;cursor:pointer; }
#auth-modal .password-toggle input { width:18px;height:18px;flex:0 0 18px;margin:0;padding:0;accent-color:#2d6a4f; }
#auth-modal .password-toggle input:focus-visible { outline:2px solid #40916c;outline-offset:3px; }
#wiz input[type=text], #wiz textarea, #pin-search input { font-family:Arial,Helvetica,sans-serif; }
body.map-panel-open #map-feedback { z-index:1100; }
#feedback, #landing { width:100vw;height:100dvh;box-sizing:border-box;right:auto;bottom:auto; }
#fb-card, #fb-title { min-width:0; }
#fb-title { overflow-wrap:anywhere; }
#auth-modal .consent { display:grid;grid-template-columns:20px minmax(0,1fr);gap:10px;align-items:start;font:13px/1.5 Arial,Helvetica,sans-serif;margin:14px 0;color:#46534b;cursor:pointer;text-align:left; }
#auth-modal .consent input[type=checkbox] { width:20px;height:20px;margin:0;padding:0;accent-color:#2d6a4f; }
#auth-modal .consent > span { min-width:0;overflow-wrap:anywhere; }
#auth-modal .consent a { color:#2d6a4f;text-decoration:underline;text-underline-offset:2px; }
#auth-modal .consent-translations { display:block;font:inherit;font-size:12px;margin-top:5px; }
#auth-modal .consent input:focus-visible { outline:2px solid #40916c;outline-offset:3px; }
@media(max-width:360px) { #map-primary-actions > button { font-size:12.5px !important;padding:8px !important; } }

#pin-search .pin-query-wrap { position:relative;flex:1;min-width:0; }
#pin-search #pin-query { padding-right:44px; }
#pin-query::-webkit-search-cancel-button { -webkit-appearance:none; }
#pin-search #pin-close { position:absolute;right:0;top:0;width:44px;height:44px;padding:0;background:transparent;color:#1b4332;font:30px Arial; }
#acct-modal { width:520px;background:#f6f4ec;font:16px/1.55 Arial,sans-serif;padding:26px; }
#acct-modal h2 { font-size:28px;margin:0 32px 6px; }
.acct-intro { text-align:center;color:#52705a;margin:0 0 20px;font-size:15px; }
.acct-tabs { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:20px; }
.acct-tabs button { min-height:44px;border:1px solid #b8cbb7;border-radius:10px;padding:9px;font:600 15px Arial;background:#fffdf7;color:#1b4332;cursor:pointer; }
.acct-tabs button[aria-selected="true"] { background:#1b4332;color:#fffdf7; }
#acct-modal [role="tabpanel"][hidden] { display:none; }
#acct-modal .row { background:#fffdf7;border:1px solid #e0e6d8;border-radius:12px;padding:16px;margin:10px 0;font-size:17px; }
#acct-modal #acct-rings { font-size:25px; }
#acct-modal #acct-lists { font-size:16px; }
#acct-modal .danger-zone p, #acct-modal .danger-zone li { font-size:15px;line-height:1.5; }
#acct-modal #acct-lists a { display:inline-block;padding:6px 0;font-size:16px; }
#tp-delete-rating { margin-top:10px;min-height:44px;padding:8px 14px;border:1px solid #a45a4e;color:#8c3025;background:#fffaf5;border-radius:8px;font:14px Arial;cursor:pointer; }
@media(max-width:380px) { #acct-modal { padding:22px 14px; }.acct-tabs button {font-size:14px;} }


#sp-photos { margin:14px 0 4px;padding-bottom:12px;border-bottom:1px solid #ccd7c4;font:15px/1.5 Arial,sans-serif; }
#sp-photos:empty { display:none; }
#sp-photos h3 { font:600 20px Georgia,serif;color:#1b4332;margin:5px 0; }
#sp-photos small { display:block;margin:10px 0;color:#526451; }
.spot-photo-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px; }
.spot-photo-thumb { padding:0;width:100%;height:100px;overflow:hidden;border:1px solid #b8cbb7;border-radius:10px;background:#eef3ec;cursor:zoom-in; }
.spot-photo-thumb img { width:100%;height:100%;object-fit:cover; }
.spot-photo-remove { width:100%;min-height:44px;background:none;border:0;color:#8c3025;font:14px Arial;cursor:pointer; }
.spot-photo-add { min-height:44px;padding:10px 15px;margin-top:10px;border:0;border-radius:10px;background:#1b4332;color:#fffdf7;font:600 15px Arial;cursor:pointer; }
#spot-photo-viewer { max-width:calc(100vw - 24px);max-height:90dvh;padding:12px;border:0;border-radius:14px;background:#f6f4ec;box-sizing:border-box; }
#spot-photo-viewer[open] { display:flex;flex-direction:column;gap:10px; }
#spot-photo-viewer::backdrop { background:#102219cc; }
#spot-photo-viewer button { align-self:flex-end;flex-shrink:0;min-height:44px;border:0;background:#1b4332;color:white;border-radius:8px;padding:10px;font:16px Arial; }
#spot-photo-viewer img { min-height:0;max-height:calc(90dvh - 90px);max-width:100%;object-fit:contain; }


/* align-items:flex-start + overflow-y on the BACKDROP: on a
   short phone a centred flex child gets clipped at the top
   and you cannot scroll up to it. */
#landing { position:fixed; inset:0; z-index:2000; background:rgba(27,67,50,.94);
    display:flex; align-items:flex-start; justify-content:center;
    padding:16px; overflow-y:auto; -webkit-overflow-scrolling:touch; }
#landing-card { margin:auto; }
#landing-card { max-width:440px; width:100%; color:#1b4332; text-align:center;
    background:#f6f4ec; border-radius:16px; padding:22px 22px 18px;
    box-shadow:0 10px 40px rgba(0,0,0,.35); box-sizing:border-box; }
#landing-logo { width:150px; max-width:76%; height:auto; display:block; margin:0 auto 6px; }
#landing h1 { font:400 22px Georgia,serif; margin:0 0 6px; }
#landing-line { font:15px/1.35 -apple-system,"Segoe UI",sans-serif; opacity:.7;
    min-height:42px; display:flex; align-items:center; justify-content:center; margin:0 0 12px; transition:opacity .45s ease; }
#landing-where { display:flex; gap:6px; margin:0 0 8px; position:relative; }
#landing-where input { flex:1; min-width:0; box-sizing:border-box; padding:9px 12px;
    border:1px solid rgba(27,67,50,.25); border-radius:9px;
    font:14px -apple-system,"Segoe UI",sans-serif; color:#1b4332; outline:none; background:#fff; }
#landing-where button { border:1px solid rgba(27,67,50,.25); background:#fff; color:#1b4332;
    border-radius:9px; padding:0 12px; font:13px -apple-system,"Segoe UI",sans-serif; cursor:pointer; }
#landing-hits { position:absolute; top:40px; left:0; right:0; background:#fff; z-index:5;
    border-radius:9px; box-shadow:0 3px 12px rgba(0,0,0,.25); overflow:hidden; display:none;
    max-height:170px; overflow-y:auto; text-align:left; }
#landing-hits div { padding:7px 12px; cursor:pointer; font:14px -apple-system,"Segoe UI",sans-serif; }
#landing-hits div:hover { background:#f6f4ec; }
#landing-chosen { font:12px -apple-system,"Segoe UI",sans-serif; opacity:.7;
    margin:0 0 8px; }
#landing .alt { display:flex; gap:8px; margin-top:10px; }
#landing .alt button { flex:1; background:transparent; color:#1b4332;
    border:1px solid rgba(27,67,50,.3); border-radius:9px; padding:9px;
    font:500 13px -apple-system,"Segoe UI",sans-serif; cursor:pointer; }
#landing .alt button:hover { border-color:#1b4332; }
#landing .door { display:flex; align-items:center; gap:10px; width:100%; box-sizing:border-box;
    margin:0 0 6px; background:#fff; color:#1b4332; border:1px solid rgba(27,67,50,.18);
    border-radius:10px; padding:9px 13px; font:600 15px -apple-system,"Segoe UI",sans-serif;
    cursor:pointer; text-align:left; }
#landing .door em { font-style:normal; font-weight:400; font-size:12px; opacity:.6; }
#landing .door .dot { width:11px; height:11px; border-radius:50%; flex:0 0 11px; }
#landing .door:hover { border-color:#1b4332; }
#landing .landing-actions { display:flex;gap:8px;margin:12px 0 4px; }
#landing .landing-actions button { flex:1;min-width:0;min-height:44px;border-radius:9px;padding:9px;font:500 13px -apple-system,"Segoe UI",sans-serif;cursor:pointer; }
#landing .landing-feedback { border:1px solid #2d6a4f;background:#2d6a4f;color:#fff; }
#landing .skip { background:transparent;color:#1b4332;border:1px solid rgba(27,67,50,.3); }
#landing .skip:hover { border-color:#1b4332; }
#landing-acct { margin-top:10px; }
/* The language switch lives on the front door: it is the first
   thing an English speaker needs, and the landing covers the map. */
#landing-card { position:relative; }
/* In the card's flow, top right, rather than pinned to the corner:
   pinned, it sat on the card's edge and collided with the logo on
   a narrow phone. Deep green so it reads as a control, not a label. */
#landing-lang { display:flex; width:fit-content; margin:0 0 6px auto; gap:2px;
    background:#1b4332; border-radius:16px; padding:3px; }
#landing-lang button { border:none; background:none; color:#f6f4ec; cursor:pointer;
    font:600 13px -apple-system,"Segoe UI",sans-serif; padding:5px 12px; border-radius:13px; }
#landing-lang button:hover:not(.on) { background:rgba(246,244,236,.15); }
#landing-lang button.on { background:#f6f4ec; color:#1b4332; cursor:default; }
#landing-acct button { background:none; border:none; color:#2d6a4f; cursor:pointer;
    font:600 13px -apple-system,"Segoe UI",sans-serif; text-decoration:underline; }


/* Discovery: warm editorial cards, clear actions, no extra font downloads. */
.discovery-eyebrow { display:block;font:700 11px/1.4 Arial,sans-serif;letter-spacing:.09em;text-transform:uppercase;color:#715735; }
#landing #landing-card { max-width:880px;padding:24px;text-align:left;border:1px solid #e7dfca;border-radius:24px;box-shadow:0 24px 90px #10261955; }
#landing { box-sizing:border-box;background:rgba(22,48,35,.86);padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom)); }
#landing .landing-masthead { display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px; }
#landing #landing-logo { width:124px;margin:0; }
#landing #landing-lang { margin:0;flex-shrink:0; }
#landing .landing-grid { display:grid;grid-template-columns:1fr 1fr;gap:28px; }
#landing h1 { font:400 34px/1.06 Georgia,serif;letter-spacing:-.025em;margin:7px 0 10px;max-width:360px; }
#landing #landing-line { display:block;min-height:0;font:14px/1.5 Arial,sans-serif;opacity:1;color:#596252;margin:0 0 18px; }
.landing-season { position:relative;isolation:isolate;overflow:hidden;border-radius:18px;background:#ede0c5;padding:20px;border:1px solid #dfcba7; }
.landing-season[data-season=blossom] { background:#f3e0e3;border-color:#e4c9d2; }
.landing-season[data-season=shade], .landing-season[data-season=evergreen] { background:#e0e8d6;border-color:#c1d0b7; }
.landing-season h2 { font:400 29px/1.08 Georgia,serif;margin:10px 85px 10px 0;letter-spacing:-.025em;color:#463422; }
.landing-season p { font:14px/1.5 Arial,sans-serif;color:#584c39;margin:0 0 16px;position:relative;max-width:30em; }
.landing-season .season-art { width:110px;position:absolute;right:4px;top:23px;z-index:-1;transform:rotate(-9deg);opacity:.9; }
.season-art svg { width:100%;height:auto;display:block; }
#landing .season-cta, #discover-dialog [data-story] { min-height:44px;border:0;background:#284d38;color:#fffdf5;border-radius:11px;padding:11px 16px;font:700 14px Arial,sans-serif;cursor:pointer; }
#landing .season-more { display:block;border:0;background:none;text-decoration:underline;text-underline-offset:3px;padding:12px 0 0;color:#5f4e34;font:13px Arial,sans-serif;cursor:pointer; }
#landing .landing-section-title { font:400 23px/1.2 Georgia,serif;margin:0 0 12px; }
#landing #landing-where { margin:0 0 8px; }
#landing #landing-where input { min-height:46px;font:16px Arial,sans-serif;background:#fffefa;border-color:#bfc9b6; }
#landing #landing-hits { top:49px; }
#landing .alt { margin:0 0 16px; }
#landing .alt button { min-height:42px;background:#edf0e5;font:13px Arial,sans-serif; }
#landing .landing-doors { display:grid;gap:7px; }
#landing .door { margin:0;min-height:58px;background:#fffefa;padding:10px 12px;font:600 14px Arial,sans-serif;border-color:#d4ddca; }
#landing .door em { display:block;margin-top:3px;font:12px/1.3 Arial,sans-serif;color:#63725d;opacity:1; }
#landing .door br { display:none; }
#landing .door .dot { width:30px;height:30px;flex-basis:30px;border-radius:10px;display:flex;align-items:center;justify-content:center; }
#landing .door .dot svg { width:18px;height:18px;fill:#fff; }
#landing .door::after { content:'↗';margin-left:auto;font-size:18px;color:#677558; }
#landing .landing-features { border-top:1px solid #d8dece;margin-top:16px;padding-top:12px; }
#landing .landing-features p { font:700 11px Arial,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:#617456;margin:0 0 7px; }
#landing .landing-features button { display:block;width:100%;min-height:38px;border:0;border-radius:6px;background:none;color:#31553d;text-align:left;cursor:pointer;font:13px Arial,sans-serif;padding:7px 3px; }
#landing .landing-features button:hover { background:#e9eddf; }
#landing .landing-features button span { color:#788569;float:right; }
#landing .landing-footer { display:flex;align-items:center;gap:16px;justify-content:space-between;border-top:1px solid #d8dece;margin-top:22px;padding-top:14px; }
#landing .landing-actions { margin:0;flex:1;max-width:370px; }
#landing #landing-acct { margin:0;max-width:220px;text-align:right; }
#landing #landing-acct button { font:600 13px/1.4 Arial,sans-serif;min-height:44px; }
#landing button:focus-visible, #discover-dialog button:focus-visible, #map-discover:focus-visible, #discovery-dock button:focus-visible { outline:3px solid #b37629;outline-offset:3px; }
#map-secondary-actions { display:flex;align-items:center;justify-content:center;gap:7px;pointer-events:auto; }
#map-discover { display:flex;align-items:center;gap:6px;min-height:40px;padding:7px 13px;border:1px solid #e6ce9d;border-radius:18px;background:#f4e7cb;color:#62411f;font:700 13px Arial,sans-serif;box-shadow:0 2px 8px #0002;cursor:pointer; }
#map-discover svg { width:18px;height:18px; }
#discovery-dock { pointer-events:auto;box-sizing:border-box;width:min(350px,calc(100vw - 24px));background:#fffaf0;border:1px solid #d6c5a4;color:#29412d;border-radius:14px;padding:4px 10px 8px;box-shadow:0 3px 14px #15332224;font:13px Arial,sans-serif; }
#discovery-dock[hidden] { display:none; }
.discovery-dock-head { display:flex;align-items:center;gap:8px; }
.discovery-dot { width:10px;height:10px;border:2px solid white;box-shadow:0 0 0 1px #a58c67;border-radius:50%;flex-shrink:0; }
.discovery-dock-head strong { flex:1;font-size:14px; }
.discovery-end { border:0;background:none;min-width:44px;min-height:40px;font:26px Arial;cursor:pointer;color:#556b51; }
#discovery-status { margin:0 0 5px;font:12px/1.4 Arial,sans-serif; }
.discovery-dock-actions { display:flex;gap:5px; }
.discovery-dock-actions button { min-height:40px;border:0;border-radius:8px;padding:7px 9px;cursor:pointer;font:600 12px Arial,sans-serif;background:#eff0e3;color:#33583c; }
.discovery-dock-actions .discovery-search { background:#2e563c;color:#fff;flex:1; }
#discover-dialog { box-sizing:border-box;width:min(580px,calc(100vw - 24px));max-height:88vh;max-height:88dvh;background:#f8f5eb;color:#29412d;border:1px solid #ded8c8;border-radius:20px;padding:0;box-shadow:0 18px 80px #0005; }
#discover-dialog::backdrop { background:#142c24aa; }
#discover-dialog header { display:flex;gap:12px;align-items:center;justify-content:space-between;padding:20px 20px 14px;border-bottom:1px solid #dfe0cf;background:#f8f5eb;position:sticky;top:0;z-index:1; }
#discover-dialog h2 { font:400 28px/1.1 Georgia,serif;margin:7px 0 0; }
.discovery-close { flex:0 0 44px;min-height:44px;border:1px solid #cbd1bd;border-radius:50%;background:transparent;font:27px Arial;cursor:pointer;color:#31533c; }
.discovery-dialog-body { padding:16px 20px 20px; }
.discovery-card { display:flex;gap:12px;background:#fffdf7;border:1px solid #dedac8;border-radius:15px;margin:0 0 12px;padding:16px; }
.discovery-mini-art { width:68px;flex-shrink:0; }
.discovery-mini-art svg { width:100%;height:auto; }
.discovery-card h3 { font:400 25px/1.12 Georgia,serif;margin:7px 0; }
.discovery-card p { font:14px/1.5 Arial,sans-serif;margin:8px 0 12px; }
.discovery-card .discovery-tip { padding:10px 12px;border-left:3px solid #bd954f;background:#f3edda; }
.discovery-footnote { font:12px/1.5 Arial,sans-serif;color:#69745e;margin:14px 0 0; }
.discovery-all { background:none;border:0;min-height:44px;text-decoration:underline;font:14px Arial,sans-serif;color:#31553d;cursor:pointer; }
@media(max-width:600px) {
    #landing #landing-card { max-width:460px;padding:16px;border-radius:18px; }
    #landing .landing-masthead { margin-bottom:14px;gap:8px; }
    #landing #landing-logo { width:105px; }
    #landing #landing-lang button { padding:6px 9px;font-size:12px; }
    #landing .landing-grid { grid-template-columns:1fr;gap:18px; }
    #landing h1 { font-size:29px;max-width:none; }
    #landing #landing-line { margin-bottom:13px;font-size:13px; }
    .landing-season { padding:15px; }
    .landing-season h2 { font-size:27px;margin-top:7px;margin-bottom:8px; }
    .landing-season p { font-size:13px;line-height:1.4;margin-bottom:12px; }
    .landing-season .season-art { width:100px;top:22px; }
    #landing .season-more { padding-top:10px;min-height:38px; }
    #landing .landing-section-title { font-size:22px; }
    #landing .landing-features { margin-top:13px; }
    #landing .landing-footer { flex-direction:column;align-items:stretch;gap:4px;margin-top:16px;padding-top:12px; }
    #landing .landing-actions { max-width:none; }
    #landing #landing-acct { max-width:none;text-align:center; }
    #discover-dialog h2 { font-size:25px; }
    .discovery-mini-art { width:42px; }
    .discovery-card { gap:9px;padding:12px; }
    .discovery-card h3 { font-size:23px; }
}
@media(prefers-reduced-motion:reduce) { #landing *, #discover-dialog * { scroll-behavior:auto!important;transition:none!important; } }

.tree-story-note { background:#f1e8d5;border-left:3px solid #b57c3d;border-radius:0 9px 9px 0;padding:12px 14px;margin:0 0 16px;font:14px/1.5 Arial,sans-serif;color:#4a4b35; }
.tree-story-note p { margin:5px 0 0; }
.sheet-open #discovery-dock { display:none; }

#landing .landing-header-tools { display:flex;flex-direction:column;align-items:flex-end;min-width:0; }
#landing .landing-header-tools #landing-acct { max-width:185px;text-align:right; }
#landing .landing-header-tools #landing-acct button { min-height:34px;padding:4px 0;font-size:12px; }
#landing .landing-footer .landing-actions { max-width:none; }
#landing #landing-hits button { display:block;width:100%;min-height:44px;border:0;border-radius:0;text-align:left;padding:9px 12px;font:14px Arial,sans-serif; }
#landing #landing-hits button:hover, #landing #landing-hits button:focus-visible { background:#edf0e5; }


:root {
    --heybaum-ink: #1b4332;
    --heybaum-paper: #f6f4ec;
    --heybaum-line: #d6dfce;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --nav-space: calc(82px + var(--safe-bottom));
}
body { overscroll-behavior: none; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 3px solid #ac752e; outline-offset: 3px; }
#map-toolbar { top: calc(10px + var(--safe-top)) !important; }
#app-navigation {
    position: fixed; bottom: calc(12px + var(--safe-bottom)); left: 50%; transform: translateX(-50%);
    z-index: 1400; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
    width: min(350px, calc(100vw - 28px)); padding: 5px; box-sizing: border-box;
    border: 1px solid var(--heybaum-line); border-radius: 24px;
    background: var(--heybaum-paper); box-shadow: 0 6px 24px #1b433226;
}
#app-navigation button {
    border: 0; border-radius: 19px; min-height: 52px; background: transparent; color: #59705b;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font: 600 11px/1.2 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; cursor: pointer;
}
#app-navigation button[aria-current] { background: #e1ead8; color: var(--heybaum-ink); }
#app-navigation svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
#legal-footer { bottom: var(--nav-space); }
#locate-btn { bottom: calc(var(--nav-space) + 32px); }
#locate-msg { bottom: calc(var(--nav-space) + 86px); }
#map-feedback { bottom: calc(var(--nav-space) + 88px); }
.leaflet-bottom { bottom: var(--safe-bottom); }
body.sheet-open #app-navigation,
body:has(#pin-picker.on) #app-navigation,
body:has(#wiz.on) #app-navigation { visibility: hidden; }
#connection-status {
    position: fixed; left: 50%; bottom: calc(var(--nav-space) + 26px); transform: translateX(-50%);
    z-index: 1600; width: max-content; max-width: calc(100vw - 48px); box-sizing: border-box;
    padding: 10px 14px; border-radius: 12px; background: #fff3d9; color: #62411f;
    box-shadow: 0 2px 12px #0002; font: 13px/1.4 Arial,sans-serif;
}
#connection-status[hidden] { display: none; }
.native-session-note { font: 12px/1.5 Arial,sans-serif; color: #687163; border-top: 1px solid #d6dfce; padding-top: 12px; }
@media (max-width: 600px) {
    #auth-modal, #acct-modal { box-sizing: border-box; width: min(440px, 94vw); padding: 25px 20px; max-height: calc(88dvh - var(--safe-top)); }
    #auth-overlay, #acct-overlay { padding-top: calc(20px + var(--safe-top)); padding-bottom: var(--safe-bottom); box-sizing: border-box; }
    #auth-modal input, #acct-modal input, #wiz input, #wiz textarea { font-size: 16px; }
    #auth-modal .x, #acct-modal .x { min-width: 44px; min-height: 44px; top: 4px; right: 6px; }
    #ui #topbar { display: none; }
    #legal-footer { bottom: var(--nav-space); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 28px); }
    .sheet .sheet-scroll { padding-bottom: calc(20px + var(--safe-bottom)); }
    #dirs { padding-bottom: calc(14px + var(--safe-bottom)) !important; box-sizing: border-box; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
