* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { color-scheme: light; font-family: Arial, sans-serif; color: #193c30; background: #ccdde1; }
body { margin: 0; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; }
button, select, input { font: inherit; }
button, select { cursor: pointer; color: inherit; background: #fffdf6; border: 1px solid #ccd3c3; border-radius: 8px; min-height: 44px; padding: 10px 12px; }
button:hover { background: #e8ecd9; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid #b86d30; outline-offset: 3px; }
button[aria-pressed="true"] { background: #254d38; color: #fffdf6; }
header { position: absolute; top: 20px; left: 24px; padding: 12px; border-radius: 10px; background: #fffdf3e8; }
.brand { color: inherit; text-decoration: none; font-size: 14px; font-weight: bold; letter-spacing: 2px; }
.brand span { margin-left: 12px; }
header p { font-size: 12px; margin: 8px 0 0; }
.lighting { position: absolute; top: 24px; right: 28px; }
.lighting button { background: #fffdf6e8; }
.lighting button[aria-pressed="true"] { background: #254d38; color: #fffdf6; }
.intro { position: absolute; left: 32px; top: 130px; max-width: 340px; pointer-events: none; }
.eyebrow { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; margin: 0 0 10px; }
h1, h2 { font-family: Georgia, serif; font-weight: 400; }
h1 { font-size: clamp(34px, 4.5vw, 62px); line-height: 1.02; letter-spacing: -2px; margin: 0 0 18px; }
.intro > p:not(.eyebrow) { font-size: 14px; line-height: 1.6; }
.intro button { pointer-events: auto; margin-top: 8px; }
.primary { color: #fffdf1; background: #234b37; border-color: #234b37; font-weight: bold; }
.primary:hover { background: #173a29; }
.primary span { margin-left: 28px; }
.panel { position: absolute; right: 28px; bottom: 50px; width: 342px; padding: 22px; background: #fffdf3f5; border: 1px solid #ffffff90; border-radius: 16px; box-shadow: 0 16px 60px #193c3030; }
.hole-details { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
h2 { font-size: 29px; margin: 0; }
#tee-set { font-size: 12px; max-width: 120px; }
#distance { font-size: 13px; margin: 12px 0 20px; }
.holes { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.holes button { min-height: 36px; padding: 0; font-size: 12px; border-radius: 5px; }
.actions { display: flex; gap: 6px; margin: 16px 0 10px; }
.actions button { flex: 1; padding: 8px 5px; font-size: 12px; }
#fly { width: 100%; }
.extras { display: flex; justify-content: space-between; gap: 6px; margin-top: 8px; }
.extras button { padding: 8px 0; background: transparent; border: 0; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.status { margin: 0; font-size: 12px; }
.status:empty { display: none; }
.note { position: absolute; bottom: 16px; left: 32px; font-size: 11px; max-width: 280px; background: #fffdf3e8; border-radius: 6px; padding: 8px 10px; }
.note summary { cursor: pointer; }
.note p { line-height: 1.6; margin: 8px 0 0; }
.tour { position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); padding: 16px 20px; background: #173b2ff0; color: #fffdf3; border-radius: 12px; }
.tour-top, .tour-bottom, .dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.tour-top { font-family: Georgia, serif; font-size: 22px; }
.tour button { color: inherit; background: transparent; border-color: #ffffff50; font: 12px Arial, sans-serif; }
.tour-bottom { font-size: 12px; }
progress { width: 100%; height: 3px; margin: 16px 0 10px; accent-color: #d3b47b; }
body.flying .panel, body.flying .intro, body.flying .note { visibility: hidden; }
dialog { border: 0; border-radius: 14px; background: #fffdf3; color: #193c30; padding: 20px; max-width: min(950px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); }
dialog::backdrop { background: #0e251de0; }
.dialog-top { margin-bottom: 16px; }
#course-photo { display: block; max-width: 100%; max-height: 72dvh; object-fit: contain; margin: auto; }
#share-url { display: block; width: min(440px, 72vw); margin-top: 12px; padding: 12px; border: 1px solid #9cae98; border-radius: 6px; }
#loading, #error { position: absolute; top: 45%; left: 50%; transform: translateX(-50%); background: #fffdf3; padding: 22px; border-radius: 12px; text-align: center; }
#error a { color: inherit; }
@media (max-width: 650px) {
  header { top: 14px; left: 10px; padding: 8px; }
  .brand { font-size: 11px; letter-spacing: 1px; }
  header p { font-size: 10px; }
  .lighting { top: 14px; right: 14px; }
  .lighting button { font-size: 11px; padding: 8px; }
  .intro { top: 95px; left: 18px; max-width: 230px; }
  h1 { font-size: 38px; letter-spacing: -1px; }
  .intro > p:not(.eyebrow), .intro > button { display: none; }
  .panel { bottom: 12px; left: 12px; right: 12px; width: auto; padding: 14px; }
  .panel .eyebrow { display: none; }
  h2 { font-size: 26px; }
  #distance { margin: 6px 0 12px; }
  .actions { margin-top: 10px; }
  .extras { margin-top: 2px; }
  .note { display: none; }
  .tour { bottom: 16px; }
}
@media (max-height: 650px) {
  .intro { display: none; }
  .panel { bottom: 10px; padding: 12px; }
  #distance { margin: 6px 0; }
  .actions { margin-top: 8px; }
}
@media (max-height: 480px) and (min-width: 651px) {
  .panel { width: 330px; }
  .panel .eyebrow { display: none; }
  .holes button { min-height: 28px; }
  .lighting { right: 370px; }
}
