/* The hole in 3D (js/hole3d.js). Sky behind a see-through canvas, labels as crisp HTML pinned to the ground, the
   overlay in the Play screen's own glass. The haze colour at the horizon matches the scene fog (0xd6e3e4). */
.h3d { position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background: linear-gradient(180deg, #5D93C8 0%, #8DB6DA 34%, #C4D9E2 58%, #D6E3E4 72%, #D6E3E4 100%); }
.h3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.h3d-tags { position: absolute; inset: 0; pointer-events: none; }
/* a satellite photo is on its way: nothing shows until it is on the ground (no flash of the drawn ground first) */
.h3d-canvas, .h3d-tags { transition: opacity .22s ease; }
.h3d--wait .h3d-canvas, .h3d--wait .h3d-tags { opacity: 0; }
/* the flyover: the labels step aside for the ride; a planned shot's card comes up when its ball has landed */
.h3d--fly .h3d-tags > *:not(.h3d-shot), .h3d--fly .h3d-shot:not([data-fly="on"]) { opacity: 0 !important; }
.h3d--fly .h3d-shot { transition: opacity 260ms ease; font-size: 16px; padding: 5px 11px 6px; }
.h3d--fly .h3d-shot span { font-size: 13px; }
.h3d-lost::after { content: 'The 3D view stopped. Close it and open it again.'; position: absolute; inset: auto 16px 50% 16px; text-align: center; color: #10241A; font: 600 15px/1.4 var(--sans, system-ui); }

/* labels: a small plate on a stem, the stem's foot on the spot it names */
.h3d-tag { position: absolute; left: 0; top: 0; translate: -50% -100%; padding: 4px 8px 5px; border-radius: 8px; white-space: nowrap;
  font: 600 13px/1.15 var(--sans, -apple-system, system-ui, sans-serif); color: #fff; background: rgba(12, 28, 18, .78);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .3); transition: opacity 160ms; will-change: transform; }
.h3d-tag::after { content: ''; position: absolute; left: 50%; top: 100%; width: 2px; height: 10px; translate: -50% 0; background: rgba(12, 28, 18, .7); }
.h3d-tag b { font-weight: 800; font-variant-numeric: tabular-nums; }
.h3d-tag span { display: block; font-size: 12px; font-weight: 500; opacity: .8; }
.h3d-ring { padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .88); color: #10241A; font-size: 13px; }
.h3d-ring::after { display: none; }
/* On the satellite photo (Terrain) the labels are see-through glass, not white cards (Luke, 2026-11-22: "there's a lot of white
   happening, I want to see more of the course… see-through, but you should be able to see what's being written"): a faint dark-green
   tint, a hairline edge, white writing with a soft shadow so it reads over grass, sand and water alike. */
.h3d--sat .h3d-ring, .h3d-shot { background: rgba(14, 34, 24, .34); color: #fff; border: 1px solid rgba(255, 255, 255, .34);
  -webkit-backdrop-filter: blur(3px) saturate(1.15); backdrop-filter: blur(3px) saturate(1.15); text-shadow: 0 1px 2px rgba(0, 0, 0, .75); box-shadow: none; }
/* the shot planner's cards: placed by the engine every frame (transform), each on the side of its spot that has room */
.h3d-shot { font-size: 13px; padding: 3px 8px 4px; transition: opacity 160ms; }
.h3d-shot[data-side="r"] { translate: 14px -60%; } .h3d-shot[data-side="l"] { translate: calc(-100% - 14px) -60%; }
.h3d-shot::after { display: none; }
.h3d-shot span { opacity: .9; }
.h3d-shot[data-haz="sand"] { background: rgba(150, 105, 30, .42); border-color: rgba(255, 215, 140, .7); } .h3d-shot[data-haz="water"] { background: rgba(30, 90, 160, .42); border-color: rgba(150, 205, 255, .7); }
.h3d--plan .h3d-ring, .h3d--plan .h3d-green, .h3d--plan .h3d-club { visibility: hidden; }
.h3d-club { background: #E2C27A; color: #241A06; }
.h3d-club::after { background: rgba(140, 105, 40, .8); }
.h3d-sand { background: #F3E9CC; color: #3B3020; }
.h3d-sand::after { background: rgba(120, 100, 60, .7); }
.h3d-water { background: #1E5A75; }
.h3d-water::after { background: rgba(20, 70, 95, .8); }
.h3d-tee { padding: 3px 8px; background: #10241A; }
.h3d-green { padding: 5px 10px 6px; background: #10241A; text-align: center; }
.h3d-green b { font-size: 17px; }

/* Inside the Play screen (js/map3d.js): the 3D fills the map box, under the card, the view switch and the plates. */
.play.pf .map .pf-3d { position: absolute; inset: 0; z-index: 0; }
.play.pf .map .pf-3d.h3d { touch-action: none; }

/* Map -> "2D or 3D": a small card dropped from the Map button */
.pf-dim { position: fixed; z-index: 95; width: 220px; padding: 10px; border-radius: 18px; color: #F3EEE2;
  background: rgba(12, 28, 18, .9); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 16px 32px -10px rgba(0, 0, 0, .6);
  animation: pf-dim-in 220ms cubic-bezier(.32, .72, 0, 1) both; transform-origin: 85% 0; }
.pf-dim-t { margin: 2px 6px 8px; font-size: 13px; font-weight: 650; color: rgba(243, 238, 226, .7); }
.pf-dim button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 56px; margin-top: 4px; padding: 9px 12px;
  border: 0; border-radius: 12px; background: rgba(255, 255, 255, .06); color: inherit; text-align: left; font: inherit; }
.pf-dim button b { font-size: 17px; font-weight: 750; }
.pf-dim button span { font-size: 13px; color: rgba(243, 238, 226, .7); }
.pf-dim button[aria-pressed="true"] { background: #F1EEE4; color: #0F2A1C; }
.pf-dim button[aria-pressed="true"] span { color: rgba(15, 42, 28, .7); }
.pf-dim button:active { transform: scale(.98); }
.pf-dim button:focus-visible { outline: 2px solid #E2C27A; outline-offset: 1px; }
@keyframes pf-dim-in { from { opacity: 0; transform: scale(.94) translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pf-dim { animation: none; } }
/* you are here (GPS) on the 2.5D map: the plain dot, or the golfer's marker as a dark token, both with a GPS-blue pulse */
.h3d-you { position: absolute; left: 0; top: 0; translate: -50% -50%; pointer-events: none; display: grid; place-items: center; }
.h3d-you[hidden] { display: none; }   /* GPS off: display: grid above would otherwise beat the hidden attribute */
.h3d-you::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #2FB8E8; animation: h3d-you 1.6s cubic-bezier(.2, .7, .3, 1) infinite; }
.h3d-you--dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #0F2A1C, 0 2px 6px rgba(0, 0, 0, .45); }
.h3d-you:not(.h3d-you--dot) { width: 36px; height: 36px; border-radius: 50%; background: #0F2A1C; color: #fff; box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(0, 0, 0, .45); }
.h3d-you svg { width: 23px; height: 23px; stroke-width: 1.9; }
.h3d-you.is-coarse { opacity: .75; }
@keyframes h3d-you { from { transform: scale(1); opacity: .95; } to { transform: scale(2.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .h3d-you::before { animation: none; opacity: .5; transform: scale(1.5); } }

/* the putting helper's marks (Luke, 2026-11-03): the ball where the golfer tapped, the aim spot beside the hole */
.h3d-mark { position: absolute; left: 0; top: 0; translate: -50% -50%; pointer-events: none; }
.h3d-mark[hidden] { display: none; }
.h3d-mark--ball { width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #0F2A1C, 0 3px 8px rgba(0, 0, 0, .5); }
.h3d-mark--aim { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid #E3C078; box-shadow: 0 0 0 1.5px rgba(15, 42, 28, .85), 0 3px 8px rgba(0, 0, 0, .45); }
.h3d-mark--aim::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: #E3C078; }
