/* The feature map (map.html): the course full screen beside a panel of switches, one for each map feature, so a
   club can pair the ones it likes. ctrl studio's dark look for the panel (golf.css's tokens); the course and the
   hole zoom are land.css's. On a phone the switches are a row along the bottom. */
:root { --panel: 340px; --barh: 0px; color-scheme: dark; }
html, body { height: 100%; }
body.fullmap { margin: 0; overflow: hidden; background: #0c130f; color: var(--c-ink); font: 400 15px/1.5 var(--font-body); }

/* ---------- The panel ---------- */
.fm-panel { position: fixed; z-index: 5; left: 0; top: 0; bottom: 0; width: var(--panel); display: flex; flex-direction: column;
  background: var(--c-bg); border-right: 1px solid var(--c-line); overflow-y: auto; overscroll-behavior: contain; }
.fm-head { padding: 22px 22px 14px; }
.fm-home { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--c-muted); font: 500 12px/1 var(--mono); text-decoration: none; }
.fm-home:hover { color: var(--c-ink); }
.fm-home kbd { font-size: 10px; padding: 3px 5px 4px; }
html.in-frame .fm-home { display: none; }
.fm-label { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; color: var(--c-muted); font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.fm-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 3px rgb(255 90 31 / .2); }
.fm-panel h1 { margin: 0; font: 600 27px/1.08 var(--font-body); letter-spacing: -0.04em; }
.fm-panel h1 span { color: var(--c-muted); }
.fm-lede { margin: 10px 0 0; color: var(--c-muted); font-size: 14px; }
.fm-bar-title { display: none; }

/* each feature a button (a tap goes straight to it on the map) with its switch in the corner (Zak, 1 Dec 2026) */
.fm-list { list-style: none; margin: 0; padding: 4px 14px 14px; display: grid; gap: 8px; }
.fm-item { position: relative; }
.fm-go { width: 100%; display: grid; grid-template-columns: 26px 1fr; gap: 2px 8px; align-items: start; padding: 13px 64px 12px 12px; text-align: left; cursor: pointer;
  border-radius: 12px; border: 1px solid var(--c-line); border-bottom-width: 3px; background: rgb(255 255 255 / .035); color: inherit; font: inherit;
  transition: background .2s, border-color .2s, translate 90ms; }
.fm-go:hover { background: rgb(255 255 255 / .07); border-color: rgb(255 90 31 / .55); }
.fm-go:active { translate: 0 2px; border-bottom-width: 1px; margin-bottom: 2px; }
.fm-go:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; }
.fm-item.is-shown .fm-go { border-color: var(--c-accent); background: rgb(255 90 31 / .08); }
.fm-n { grid-row: 1 / 4; padding-top: 2px; color: var(--c-accent); font: 500 12px/1.4 var(--mono); }
.fm-t { grid-column: 2; }
.fm-t b { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; }
.fm-t small { display: block; margin-top: 3px; color: var(--c-muted); font-size: 13px; line-height: 1.4; }
.fm-t em { display: none; margin-top: 4px; color: #e8b48a; font: italic 400 12.5px/1.35 var(--font-body); }
body.f-off-flyover .fm-item[data-needs="flyover"] em { display: block; }
.fm-pkg { grid-column: 2; margin-top: 7px; color: var(--c-muted); font: 500 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.fm-show { grid-column: 2; margin-top: 9px; color: var(--c-accent); font: 500 12px/1 var(--mono); opacity: .8; transition: opacity .2s; }
.fm-go:hover .fm-show { opacity: 1; }
.fm-item:has(input:not(:checked)) .fm-t b, body.f-off-flyover .fm-item[data-needs="flyover"] .fm-t b { color: var(--c-muted); }
.fm-item:has(input:not(:checked)) .fm-show { color: var(--c-muted); }
/* the switch */
.fm-switch { position: absolute; top: 8px; right: 8px; padding: 6px; cursor: pointer; border-radius: 99px; }
.fm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.fm-sw { display: block; position: relative; width: 38px; height: 22px; border-radius: 99px; background: rgb(255 255 255 / .16); transition: background .2s; }
.fm-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / .4); transition: translate .25s var(--ease); }
.fm-switch input:checked + .fm-sw { background: var(--c-accent); }
.fm-switch input:checked + .fm-sw::after { translate: 16px 0; }
.fm-switch input:focus-visible + .fm-sw { outline: 2px solid var(--c-ink); outline-offset: 2px; }

.fm-foot { margin-top: auto; padding: 16px 22px 22px; border-top: 1px solid var(--c-line); }
.fm-mixline { margin: 0 0 12px; font-size: 13.5px; color: var(--c-muted); }
.fm-mixline b { color: var(--c-ink); font-weight: 600; }
.fm-ask { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: 99px; background: var(--c-ink); color: var(--c-bg);
  font: 600 14px/1 var(--font-body); text-decoration: none; transition: background .2s; }
.fm-ask:hover { background: #fff; }

/* ---------- The map: the hole zoom, open on the whole course beside the panel ---------- */
.land-zoom.is-full { inset: 0 0 var(--barh) var(--panel); width: auto; height: auto; background: #0c130f; }
.lz-all { position: absolute; left: 0; top: 0; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .45s, visibility 0s .45s; }
.at-course .lz-all { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .6s .15s; }
.lz-all .land-lines { overflow: visible; }
.lz-all .land-pin, .lz-all .land-flag { transform: rotate(var(--r, 0rad)) scale(var(--k, 1)); }
.lz-all .land-pin { width: 34px; height: 34px; font-size: .95rem; }
.lz-all .land-flag { width: 7px; height: 7px; }
.at-course .lz-hole, .at-course .lz-close { opacity: 0 !important; }
.at-course .lz-back { opacity: 0; visibility: hidden; pointer-events: none; }
.lz-wind { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .5s; }
.at-course:not(.f-off-weather) .lz-wind { opacity: 1; }
.lz-hint { position: absolute; z-index: 2; left: 0; right: 0; bottom: 18px; margin: 0; display: flex; justify-content: center; pointer-events: none;
  opacity: 0; transition: opacity .4s; }
.lz-hint span { background: rgb(16 26 21 / .8); color: #fff; padding: .5rem 1.1rem; border-radius: 99px; font-size: .92rem; font-weight: 600;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 2px 10px rgb(0 0 0 / .25); }
.at-course:not(.is-leaving) .lz-hint { opacity: 1; transition: opacity .5s .4s; }

/* what each switch takes away */
.land-zoom.f-off-flyover .lz-fly { display: none; }
.land-zoom.f-off-flyover .lz-step { grid-row: 1; }
.land-zoom.f-off-notes .lz-floats { display: none; }
.land-zoom.f-off-measure .lz-mhint { display: none; }
/* .lzg-go-3d is hidden in land.css */
.land-zoom.f-off-slopes .lzg-fall, .land-zoom.f-off-slopes .lzg-sub, .land-zoom.f-off-slopes .lzg-seg, .land-zoom.f-off-slopes .lzg-key, .land-zoom.f-off-slopes .lzg-tip { display: none; }
.land-zoom.f-off-slopes:not(.in-green) .lzg-go-on { display: none; }
.land-zoom.f-off-slopes:not(.in-green) .lzg-go-3d { display: inline; }
.land-zoom.f-off-slopes .lz-card:not([data-g3d]) .lz-green-card, .land-zoom.f-off-slopes.f-off-g3d .lz-green-card { display: none; }
.land-zoom.f-off-slopes:not(.in-g3d) .lz-gtools { display: none; }

/* ---------- Then and now: the old photo left of a line dragged across the course (land.js, then.js) ---------- */
.lz-then { width: 100%; height: 100%; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
.lz-tn { --x: 0px; --yx: 0px; --t: 0px; --h: 100%; --m: 50%; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .4s, visibility 0s .4s; }
.at-course:not(.is-leaving):not(.f-off-then) :is(.lz-then, .lz-tn) { opacity: 1; visibility: visible; transition: opacity .5s .2s; }
.lz-tn .tn-line { position: absolute; top: var(--t); height: var(--h); left: var(--x); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 14px rgb(0 0 0 / .5); }
.lz-tn .tn-knob { position: absolute; top: var(--m); left: var(--x); translate: -50% -50%; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: #17261d; box-shadow: 0 4px 18px rgb(0 0 0 / .4); cursor: ew-resize; pointer-events: auto; touch-action: none; transition: scale .2s var(--ease); }
.lz-tn .tn-knob::before { content: ""; position: absolute; inset: -14px; }   /* a bigger target */
.lz-tn .tn-knob i::before { content: "‹ ›"; font: 600 21px/1 var(--font-body); font-style: normal; letter-spacing: .12em; padding-left: .12em; }
.lz-tn .tn-knob:hover, .lz-tn .tn-knob.is-dragging { scale: 1.08; }
.lz-tn .tn-knob:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }
.lz-tn .tn-tag { position: absolute; top: calc(var(--m) - 11px); padding: 6px 10px; border-radius: 99px; background: rgb(16 26 21 / .8); color: #fff;
  font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: opacity .25s; }
.lz-tn .tn-a { right: calc(100% - var(--x) + 32px); }
.lz-tn .tn-b { left: calc(var(--x) + 32px); }
.lz-tn.is-parked .tn-a { opacity: 0; }
.lz-tn .tn-years { position: absolute; top: calc(var(--m) + 36px); left: var(--yx); translate: -50% 0; display: flex; gap: 2px; padding: 3px; border-radius: 99px;
  background: rgb(16 26 21 / .8); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 2px 10px rgb(0 0 0 / .25); pointer-events: auto; }
.lz-tn .tn-years button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 99px; background: none; color: rgb(255 255 255 / .75); font: 500 12px/1 var(--mono); cursor: pointer; }
.lz-tn .tn-years button:hover { color: #fff; }
.lz-tn .tn-years button[aria-pressed="true"] { background: #fff; color: #17261d; }
.lz-tn.is-parked .tn-years { opacity: 0; pointer-events: none; transition: opacity .25s; }

/* ---------- Today's weather, over the whole course ---------- */
.fm-wx { position: fixed; z-index: 4; left: calc(var(--panel) + 16px); top: 16px; margin: 0; padding: 12px 14px; border-radius: 12px; min-width: 190px;
  background: rgb(16 26 21 / .78); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 4px 18px rgb(0 0 0 / .3);
  font-size: 13px; line-height: 1.35; opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; pointer-events: none; }
body:has(.land-zoom.at-course:not(.is-leaving)):not(.f-off-weather) .fm-wx { opacity: 1; visibility: visible; transition: opacity .5s .3s; }
.fm-wx p { margin: 0; }
.fmw-now b { font: 600 26px/1 var(--font-body); letter-spacing: -0.03em; margin-right: 4px; }
.fmw-now span { color: rgb(255 255 255 / .8); }
.fmw-wind { margin-top: 6px !important; font-weight: 600; }
.fmw-wind .wx-gust { font-weight: 400; color: rgb(255 255 255 / .75); }
.fmw-arrow { display: inline-block; rotate: calc(var(--wd, 60deg) + var(--turn, 0rad)); color: var(--fairway); }
.fmw-sun { color: rgb(255 255 255 / .75); }
.fmw-sun .wx-last { display: block; }
.fmw-north { position: absolute; top: 10px; right: 12px; font: 600 11px/1 var(--mono); color: rgb(255 255 255 / .7); }
.fmw-n { display: inline-block; rotate: var(--turn, 0rad); }

/* ---------- A small screen: the switches along the bottom ---------- */
@media (max-width: 760px) {
  :root { --panel: 0px; --barh: calc(104px + env(safe-area-inset-bottom)); }
  .fm-panel { top: auto; right: 0; width: auto; height: var(--barh); overflow: hidden; border-right: 0; border-top: 1px solid var(--c-line); padding-bottom: env(safe-area-inset-bottom); }
  .fm-head, .fm-foot { display: none; }
  .fm-bar-title { display: block; margin: 0; padding: 10px 16px 0; color: var(--c-muted); font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
  .fm-bar-title b { color: var(--c-ink); font-weight: 500; }
  .fm-list { display: flex; gap: 8px; padding: 10px 16px 12px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .fm-list::-webkit-scrollbar { display: none; }
  .fm-item { flex: none; scroll-snap-align: start; }
  .fm-go { display: flex; align-items: center; min-height: 52px; padding: 10px 62px 10px 12px; }
  .fm-n, .fm-t small, .fm-t em, .fm-pkg, .fm-show { display: none !important; }
  .fm-t b { font-size: 14px; white-space: nowrap; }
  .fm-switch { top: 50%; translate: 0 -50%; right: 6px; }
  .fm-wx { left: 10px; top: 10px; min-width: 0; padding: 9px 11px; font-size: 12px; }
  .fmw-now b { font-size: 20px; }
  .fmw-sun { display: none; }
  .fmw-north { position: static; display: inline-block; margin-top: 4px !important; }
  .lz-hint { bottom: 10px; }
  .lz-all .land-pin { width: 28px; height: 28px; font-size: .8rem; }
}

/* "See today on the course": the weather card says hello */
@keyframes fm-ping { 0%, 100% { box-shadow: 0 4px 18px rgb(0 0 0 / .3), 0 0 0 0 rgb(255 90 31 / 0); } 30% { box-shadow: 0 4px 18px rgb(0 0 0 / .3), 0 0 0 4px rgb(255 90 31 / .85); } }
.fm-wx.ping { animation: fm-ping 1.4s ease-out 2 .3s; }
