/* Shared template v0.1. Desktop derives from Pebble; portrait from the website tour. */
html,body{background:var(--page-background,#07110c);color:var(--text-color,#f4f0e6)}
#scrub{accent-color:var(--accent,#e5e8e0)}
header>a img{display:block;max-width:220px;max-height:52px;object-fit:contain}
#stops button[aria-current=true]{text-decoration:underline;text-underline-offset:5px}
#next{position:relative;border:1px solid #ffffffa6;border-radius:6px;padding:.85cqw 1.9cqw;font-size:1.05cqw;letter-spacing:.08em}
#next:hover,#next:focus-visible{background:#ffffff10}
/* Tablets and narrow windows keep their fixed, touch-sized control. */
@media (max-width:1024px), (pointer:coarse) and (max-width:1366px){#next{font-size:12px;padding:12px 24px;min-height:44px}}
#holeOptions a{min-height:36px}
/* Portrait is a distinct full-height composition. The right rail always has its own lane. */
@media (max-aspect-ratio:1/1){
 #surface{width:100vw;height:100dvh;--safe-left:max(22px,env(safe-area-inset-left));--safe-right:max(18px,env(safe-area-inset-right));touch-action:none}
 #film,#arrival video{object-fit:cover;object-position:var(--mobile-position,50% 50%)}
 header{top:max(20px,env(safe-area-inset-top));left:6%;right:5%;font-size:24px;gap:16px}
 header>a{max-width:calc(100% - 100px);font-size:24px!important;line-height:1.1}
 header>a img{max-width:100%;max-height:44px}
 .hole-switch summary{font-size:12px;min-height:44px;padding:10px 12px}
 #holeOptions{max-height:45dvh}
 #holeOptions a{font-size:13px;min-height:44px;padding:12px 3px}
 #surface .teereveal-quality{top:auto!important;bottom:max(55px,calc(env(safe-area-inset-bottom) + 44px));right:6%!important;font-size:11px}
 #surface .teereveal-quality select{font-size:12px;padding:10px;min-height:44px}
 #surface .teereveal-quality>span{display:none}
 #surface[data-tee-layout=atlas] #teeIntro{inset:16% 20% auto 8%;display:grid;grid-template-columns:minmax(0,1fr) 74px;grid-template-rows:auto auto auto;column-gap:18px;row-gap:22px;align-items:start;border:0;padding:0;max-height:66dvh;overflow-y:auto;scrollbar-width:thin;pointer-events:auto;touch-action:pan-y;overscroll-behavior:contain}
 #surface[data-tee-layout=atlas] #teeIntro>*{position:static;inset:auto;translate:none;width:auto;text-align:left}
 #surface[data-tee-layout=atlas] .teeTitle{grid-column:1;grid-row:1}
 #surface[data-tee-layout=atlas] .teeTitle small{font:9px var(--ui-font);letter-spacing:.15em;opacity:.7}
 #surface[data-tee-layout=atlas] #teeHole{font-size:36px;line-height:1.1;margin:12px 0;letter-spacing:-.02em;white-space:normal}
 #surface[data-tee-layout=atlas] #teeMeta{font-size:9px;line-height:1.5;letter-spacing:.08em;white-space:normal}
 #surface[data-tee-layout=atlas] #teeMap{display:block;grid-column:2;grid-row:1 / span 2;width:74px;height:100%;min-height:210px;max-height:290px;object-fit:contain;align-self:center}
 #surface[data-tee-layout=atlas] .teeYardBlock{grid-column:1;grid-row:2;border:0;padding:0}
 #surface[data-tee-layout=atlas] #teeYards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px;justify-content:start;margin:0}
 #surface[data-tee-layout=atlas] #teeYards>div{min-width:0}
 #surface[data-tee-layout=atlas] #teeYards small{font-size:8px;line-height:1.2;letter-spacing:.02em;margin-bottom:5px;opacity:.7;white-space:normal;min-height:20px}
 #surface[data-tee-layout=atlas] #teeYards strong{font-size:22px;font-weight:400}
 #surface[data-tee-layout=atlas] .teeCopy{grid-column:1 / -1;grid-row:3;border-top:1px solid #ffffff26;padding-top:18px}
 #surface[data-tee-layout=atlas] #teeBody{font-size:20px;line-height:1.4;margin:0;max-height:none;min-height:0;overflow:visible}
 #surface[data-tee-layout=atlas] .explore-cue{display:none}
 #surface[data-hole] #note[data-index][data-side]{top:24%;left:8%;right:auto;width:72%;max-height:58dvh;pointer-events:auto;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin}
 #surface #title{font-size:36px;line-height:1.1;margin:0 0 12px}
 #surface #pro{font-size:10px;letter-spacing:.18em}
 #surface #note #body{font-size:20px;line-height:1.4;max-height:none;min-height:0;overflow:visible;margin:10px 0 0}
 #surface #reading{margin-top:18px}
 #surface #next{font-size:13px;min-height:44px;padding:12px 18px;margin-top:18px}
 #surface #shade,#surface #shade[data-side]{background:linear-gradient(90deg,#03110bd9, #03110b99 65%,#03110b33),linear-gradient(0deg,#03110b55,transparent 50%)}
 #surface[data-tee-layout=atlas] #shade[data-tee=true]{background:linear-gradient(180deg,#03110bd9,#03110b99 62%,#03110b33)}
 #surface #transport{left:6%;right:6%;bottom:max(55px,calc(env(safe-area-inset-bottom) + 44px));font-size:13px}
 #surface #play{min-width:60px;min-height:44px;font-size:13px;border:1px solid #ffffff55;border-radius:6px}
 #surface #timeline{position:fixed;top:32%;right:max(12px,env(safe-area-inset-right));width:44px;height:40%;margin:0;display:flex;justify-content:center}
 #surface #scrub{writing-mode:vertical-lr;direction:rtl;width:44px;height:100%;margin:0;cursor:ns-resize;touch-action:none}
 #stops{display:none}
 footer{display:none}
 .source-credit{left:6%;bottom:max(12px,env(safe-area-inset-bottom));font-size:8px;max-width:45%;line-height:1.4}
 .powered{right:6%;bottom:max(12px,env(safe-area-inset-bottom));font-size:8px;gap:5px}.powered img{width:78px}
 #surface::after{height:14%}
}
@media (max-aspect-ratio:1/1) and (max-height:740px){
 #surface[data-tee-layout=atlas] #teeIntro{top:15%;row-gap:14px;max-height:64dvh}
 #surface[data-tee-layout=atlas] #teeHole{font-size:32px;margin:8px 0}
 #surface[data-tee-layout=atlas] #teeYards{gap:8px}
 #surface[data-tee-layout=atlas] #teeYards strong{font-size:20px}
 #surface[data-tee-layout=atlas] #teeMap{min-height:180px;max-height:230px}
 #surface[data-tee-layout=atlas] #teeBody,#surface #note #body{font-size:18px}
 #surface[data-tee-layout=atlas] .teeCopy{padding-top:14px}
}
@media (max-aspect-ratio:1/1) and (min-width:600px){
 #surface[data-tee-layout=atlas] #teeIntro{left:14%;right:23%;grid-template-columns:minmax(0,1fr) 130px;column-gap:30px}
 #surface[data-tee-layout=atlas] #teeMap{width:130px;max-height:340px}
 #surface[data-tee-layout=atlas] #teeHole{font-size:48px}
 #surface[data-tee-layout=atlas] #teeBody,#surface #note #body{font-size:25px}
 #surface[data-hole] #note[data-index][data-side]{left:14%;width:62%}
}
/* Decorations are separate from the title so they cannot wrap on phones. */
#teeHole::before{content:'— ';}#teeHole::after{content:' —';}
@media(max-aspect-ratio:1/1){
 #teeHole::before,#teeHole::after{content:none}
 #surface #note:has(#next:not([hidden])) #body{max-height:none;min-height:0;overflow:visible}
 #surface[data-tee-layout=atlas] #teeIntro{row-gap:18px}
}
@media(max-aspect-ratio:1/1) and (max-height:740px){
 #surface[data-tee-layout=atlas] #teeIntro{grid-template-columns:minmax(0,1fr) 74px;row-gap:12px}
 #surface[data-tee-layout=atlas] #teeMap{grid-row:1;min-height:105px;max-height:115px}
 #surface[data-tee-layout=atlas] .teeYardBlock{grid-column:1 / -1}
 #surface[data-tee-layout=atlas] #teeYards{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px 10px}
 #surface[data-tee-layout=atlas] #teeYards small{min-height:18px;margin-bottom:3px}
}
#mobileCue{display:none}
@media(max-aspect-ratio:1/1){#mobileCue{display:block;position:absolute;right:24px;bottom:15.5%;z-index:3;font:10px var(--ui-font);letter-spacing:.06em;pointer-events:none}#mobileCue span{font-size:23px;margin-left:8px}}
@media(max-aspect-ratio:1/1) and (max-height:740px){#mobileCue{display:none}}
@media(min-aspect-ratio:2/1) and (min-width:1100px){
 #surface[data-tee-layout=atlas] #teeHole{font-size:min(5.1875cqw,8.3vh)}
}
@media(max-aspect-ratio:1/1) and (min-height:741px){
 #surface[data-tee-layout=atlas] #teeIntro{top:14%;max-height:68dvh}
 #mobileCue{bottom:14.5%}
}
@media(max-aspect-ratio:1/1) and (max-height:740px){#surface[data-tee-layout=atlas] #teeIntro{max-height:65dvh}}
/* Review 02: quiet controls, persistent booking, and course-first mobile notes. */
#surface,#surface *{text-shadow:none!important}
#scrub{filter:none}
.header-actions{display:flex;align-items:center;gap:12px;font:12px var(--ui-font)}
.book-now{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:8px 20px;border:1px solid #ffffff65;border-radius:999px;background:#ffffff15;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);white-space:nowrap}
.book-now:hover,.book-now:focus-visible{background:#ffffff2a}
#expandNotes{display:none}
@media(max-aspect-ratio:1/1){
 header{gap:8px;left:6%;right:5%}
 header>a{font-size:20px!important;max-width:calc(100% - 173px)}
 .header-actions{gap:7px;font-size:11px}
 .book-now{min-height:40px;padding:8px 13px}
 .hole-switch summary{min-height:40px;padding:8px 10px;font-size:11px;gap:6px}
 #surface[data-hole] #note[data-index][data-side]{top:auto;bottom:17%;left:8%;right:auto;width:72%;max-height:43dvh;transform-origin:center bottom;overflow:visible}
 #surface #title{font-size:28px;line-height:1.08;margin-bottom:8px}
 #surface #pro{font:9px var(--ui-font);letter-spacing:.15em}
 #surface #note #body,#surface #note:has(#next:not([hidden])) #body{font:normal 15px/1.45 var(--ui-font);margin-top:8px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:none;overflow:hidden;min-height:0}
 #surface #note.expanded #body,#surface #note.expanded:has(#next:not([hidden])) #body{display:block;max-height:23dvh;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y}
 #expandNotes{display:block;font:11px var(--ui-font);letter-spacing:.03em;min-height:32px;padding:6px 0;text-decoration:underline;text-underline-offset:4px;pointer-events:auto}
 #surface #reading{margin-top:3px}
 #surface #next{font-size:12px;min-height:40px;padding:10px 16px;margin-top:12px}
 #surface #shade,#surface #shade[data-side]{background:linear-gradient(0deg,#03110bea 0%,#03110bd4 19%,#03110b9c 32%,transparent 58%)}
 #surface:has(#note.expanded) #shade{background:linear-gradient(0deg,#03110bee 0%,#03110bd4 35%,transparent 67%)}
 #surface[data-tee-layout=atlas] #shade[data-tee=true]{background:linear-gradient(180deg,#03110b9c,transparent 46%),linear-gradient(0deg,#03110be0,transparent 45%)}
 /* Compact tee facts above, readable introduction below; keep the middle open. */
 #surface[data-tee-layout=atlas] #teeIntro{inset:14% 20% 19% 8%;display:block;overflow:visible;max-height:none}
 #surface[data-tee-layout=atlas] .teeTitle{position:absolute;top:0;left:0;width:70%}
 #surface[data-tee-layout=atlas] .teeTitle small{font-size:8px}
 #surface[data-tee-layout=atlas] #teeHole{font-size:32px;margin:8px 0}
 #surface[data-tee-layout=atlas] #teeMeta{font-size:9px}
 #surface[data-tee-layout=atlas] #teeMap{position:absolute;top:0;right:0;left:auto;width:62px;height:145px;min-height:0;max-height:none}
 #surface[data-tee-layout=atlas] .teeYardBlock{position:absolute;top:95px;left:0;width:100%;border:0}
 #surface[data-tee-layout=atlas] #teeYards{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px 8px}
 #surface[data-tee-layout=atlas] #teeYards small{font:7px/1.2 var(--ui-font);min-height:17px;letter-spacing:0;margin-bottom:3px}
 #surface[data-tee-layout=atlas] #teeYards strong{font:normal 18px var(--ui-font)}
 #surface[data-tee-layout=atlas] .teeCopy{position:absolute;top:auto;bottom:0;left:0;width:100%;border:0;padding:0}
 #surface[data-tee-layout=atlas] #teeBody{font:normal 15px/1.45 var(--ui-font);max-height:24dvh;overflow-y:auto;touch-action:pan-y}
 #mobileCue{bottom:14%;font-size:9px}
 #surface #timeline{top:30%;height:38%}
}
@media(max-aspect-ratio:1/1) and (max-height:740px){
 #surface[data-tee-layout=atlas] #teeIntro{top:14%;bottom:20%}
 #surface[data-tee-layout=atlas] #teeMap{height:115px;width:52px}
 #surface[data-tee-layout=atlas] .teeYardBlock{top:83px}
 #surface[data-tee-layout=atlas] #teeYards{gap:6px 8px}
 #surface[data-tee-layout=atlas] #teeBody{font-size:14px;max-height:23dvh}
 #surface #note #body,#surface #note:has(#next:not([hidden])) #body{font-size:14px}
 #surface[data-hole] #note[data-index][data-side]{bottom:18%}
}
@media(max-aspect-ratio:1/1) and (min-width:600px){
 #surface[data-tee-layout=atlas] #teeIntro{left:14%;right:23%}
 #surface[data-tee-layout=atlas] #teeMap{width:90px;height:190px}
 #surface[data-tee-layout=atlas] #teeHole{font-size:40px}
 #surface[data-tee-layout=atlas] .teeYardBlock{top:120px}
 #surface[data-tee-layout=atlas] #teeBody,#surface #note #body,#surface #note:has(#next:not([hidden])) #body{font-size:18px}
 #surface[data-hole] #note[data-index][data-side]{left:14%;width:62%}
}
@media(max-aspect-ratio:1/1){#surface[data-tee-layout=atlas] #teeMap{height:104px}#surface[data-tee-layout=atlas] .teeYardBlock{top:115px}}
@media(max-aspect-ratio:1/1) and (max-height:740px){#surface[data-tee-layout=atlas] #teeMap{height:94px}#surface[data-tee-layout=atlas] .teeYardBlock{top:105px}}
@media(max-aspect-ratio:1/1) and (min-width:600px){#surface[data-tee-layout=atlas] #teeMap{height:130px}#surface[data-tee-layout=atlas] .teeYardBlock{top:145px}}
@media(max-aspect-ratio:1/1){
 #surface[data-tee-layout=atlas] #teeIntro .teeTitle{position:absolute;top:0;left:0;width:70%}
 #surface[data-tee-layout=atlas] #teeIntro .teeYardBlock{position:absolute;top:115px;left:0;width:100%}
 #surface[data-tee-layout=atlas] #teeIntro .teeCopy{position:absolute;top:auto;bottom:0;left:0;width:100%;border:0;padding:0}
}
@media(max-aspect-ratio:1/1) and (max-height:740px){#surface[data-tee-layout=atlas] #teeIntro .teeYardBlock{top:105px}}
@media(max-aspect-ratio:1/1) and (min-width:600px){#surface[data-tee-layout=atlas] #teeIntro .teeYardBlock{top:145px}}
.powered img{width:4.6cqw}
@media(max-aspect-ratio:1/1){
 .powered img{width:60px}
 #surface[data-tee-layout=atlas] #shade[data-tee=true]{background:linear-gradient(180deg,#03110ba6 0%,#03110b80 36%,transparent 53%),linear-gradient(0deg,#03110be8 0%,#03110b80 23%,transparent 43%)}
}
/* Review 03: one expanding glass capsule, matched booking control. */
.header-actions{--pill-width:96px;--pill-height:40px;position:relative;width:204px;height:var(--pill-height);flex:0 0 204px;align-items:flex-start;gap:12px}
.header-actions .book-now{box-sizing:border-box;width:var(--pill-width);height:var(--pill-height);min-height:var(--pill-height);padding:0;flex:none}
.header-actions .hole-switch{position:absolute;top:0;right:0;box-sizing:border-box;width:var(--pill-width);min-height:var(--pill-height);border:1px solid #ffffff65;border-radius:20px;background:#ffffff15;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);overflow:hidden}
.header-actions .hole-switch summary{height:calc(var(--pill-height) - 2px);min-height:0;box-sizing:border-box;padding:0;justify-content:center;gap:6px;border:0;border-radius:0;font:12px var(--ui-font);white-space:nowrap}
.header-actions .hole-switch summary>span:last-child{transition:rotate .2s}
.header-actions .hole-switch[open] summary>span:last-child{rotate:180deg}
.header-actions #holeOptions{position:static;inset:auto;width:100%;min-width:0;max-height:50dvh;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0 0 6px;border:0;background:none}
.header-actions .hole-switch:not([open]) #holeOptions{display:none}
.header-actions #holeOptions a{display:flex;justify-content:center;align-items:center;min-height:38px;padding:0;font:12px var(--ui-font);background:none}
.header-actions #holeOptions a:hover,.header-actions #holeOptions a:focus-visible{background:#ffffff20}
.header-actions #holeOptions a[aria-current=page]{background:#ffffff0d}
@media(max-aspect-ratio:1/1){
 .header-actions{--pill-width:80px;--pill-height:40px;width:168px;flex-basis:168px;gap:8px}
 .header-actions .book-now,.header-actions .hole-switch summary,.header-actions #holeOptions a{font-size:11px}
 /* Restore the fuller serif tee composition; later Course notes stay compact. */
 #surface[data-tee-layout=atlas] #teeIntro{inset:14% 20% auto 8%;display:grid;grid-template-columns:minmax(0,1fr) 74px;grid-template-rows:auto auto auto;column-gap:18px;row-gap:18px;max-height:68dvh;overflow-y:auto;scrollbar-width:thin}
 #surface[data-tee-layout=atlas] #teeIntro>*{position:static!important;inset:auto!important;width:auto!important;text-align:left}
 #surface[data-tee-layout=atlas] #teeIntro .teeTitle{grid-column:1;grid-row:1}
 #surface[data-tee-layout=atlas] #teeIntro .teeTitle small{font:9px var(--ui-font);letter-spacing:.15em}
 #surface[data-tee-layout=atlas] #teeIntro #teeHole{font:normal 36px/1.1 var(--display-font);margin:12px 0;letter-spacing:-.02em}
 #surface[data-tee-layout=atlas] #teeIntro #teeMap{grid-column:2;grid-row:1 / span 2;width:74px!important;height:100%;min-height:210px;max-height:290px;object-fit:contain;align-self:center}
 #surface[data-tee-layout=atlas] #teeIntro .teeYardBlock{grid-column:1;grid-row:2;border:0;padding:0}
 #surface[data-tee-layout=atlas] #teeIntro #teeYards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 10px;margin:0}
 #surface[data-tee-layout=atlas] #teeIntro #teeYards small{font:8px/1.2 var(--ui-font);min-height:20px;margin-bottom:5px;letter-spacing:.02em}
 #surface[data-tee-layout=atlas] #teeIntro #teeYards strong{font:normal 22px var(--display-font)}
 #surface[data-tee-layout=atlas] #teeIntro .teeCopy{grid-column:1 / -1;grid-row:3;border-top:1px solid #ffffff26;padding-top:18px}
 #surface[data-tee-layout=atlas] #teeIntro #teeBody{font:italic 20px/1.4 var(--display-font);max-height:none;overflow:visible;margin:0}
 #surface[data-tee-layout=atlas] #shade[data-tee=true]{background:linear-gradient(180deg,#03110bd9,#03110b99 62%,#03110b33)}
}
@media(max-aspect-ratio:1/1) and (max-height:740px){
 #surface[data-tee-layout=atlas] #teeIntro{top:15%;row-gap:12px;max-height:65dvh}
 #surface[data-tee-layout=atlas] #teeIntro #teeHole{font-size:32px;margin:8px 0}
 #surface[data-tee-layout=atlas] #teeIntro #teeMap{grid-row:1;min-height:105px;max-height:115px}
 #surface[data-tee-layout=atlas] #teeIntro .teeYardBlock{grid-column:1 / -1}
 #surface[data-tee-layout=atlas] #teeIntro #teeYards{grid-template-columns:repeat(4,minmax(0,1fr));gap:9px 10px}
 #surface[data-tee-layout=atlas] #teeIntro #teeYards small{min-height:18px;margin-bottom:3px}
 #surface[data-tee-layout=atlas] #teeIntro #teeYards strong{font-size:20px}
 #surface[data-tee-layout=atlas] #teeIntro #teeBody{font-size:18px}
 #surface[data-tee-layout=atlas] #teeIntro .teeCopy{padding-top:14px}
}
@media(max-aspect-ratio:1/1) and (min-width:600px){
 #surface[data-tee-layout=atlas] #teeIntro{left:14%;right:23%;grid-template-columns:minmax(0,1fr) 130px;column-gap:30px}
 #surface[data-tee-layout=atlas] #teeIntro #teeMap{width:130px!important;max-height:340px}
 #surface[data-tee-layout=atlas] #teeIntro #teeHole{font-size:48px}
 #surface[data-tee-layout=atlas] #teeIntro #teeBody{font-size:25px}
}
@media(prefers-reduced-motion:reduce){.header-actions .hole-switch summary>span:last-child{transition:none}}
/* Completion invitation: clear outline, 6px corners, a short light travelling the border. */
#next .invite{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
#next .invite rect{fill:none;stroke:#fff;stroke-width:1;vector-effect:non-scaling-stroke;stroke-dasharray:14 86;animation:invitation 4.8s linear infinite}
@keyframes invitation{to{stroke-dashoffset:-100}}
@media(prefers-reduced-motion:reduce){#next .invite rect{animation:none}}

/* Optional course contrast treatment for headers over bright sky. */
#surface::before{content:"";position:absolute;inset:0 0 auto;height:15%;z-index:2;pointer-events:none;background:linear-gradient(#000,transparent);opacity:var(--header-scrim-opacity,0)}
/* Longer portrait scrub travel for finer finger positioning; clear both control rows. */
@media(max-aspect-ratio:1/1){
 #surface #timeline{top:max(100px,calc(env(safe-area-inset-top) + 80px));bottom:max(150px,calc(env(safe-area-inset-bottom) + 130px));height:auto}
}
/* Portrait cue terminates directly on the scrub rail's centerline. */
@media(max-aspect-ratio:1/1){
 #mobileCue{
  display:flex;align-items:center;justify-content:flex-end;gap:10px;
  right:max(12px,env(safe-area-inset-right));
  bottom:max(108px,calc(env(safe-area-inset-bottom) + 88px));
  height:36px;font:12px/1.2 var(--ui-font);letter-spacing:.025em;
 }
 #mobileCue span{display:flex;align-items:center;justify-content:center;width:44px;flex:0 0 44px;height:36px;margin:0;font:32px/1 var(--ui-font)}
}

/* Center the complete mobile tee composition regardless of copy length. */
@media(max-aspect-ratio:1/1){
 #surface[data-tee-layout=atlas] #teeIntro{
  --tee-top:max(100px,calc(env(safe-area-inset-top) + 80px));
  --tee-bottom:max(150px,calc(env(safe-area-inset-bottom) + 130px));
  top:calc((100% + var(--tee-top) - var(--tee-bottom)) / 2);
  bottom:auto;translate:0 -50%;
  max-height:calc(100% - var(--tee-top) - var(--tee-bottom));
 }
}

/* The hole diagram shows only when course.json supplies one (1.4.0); otherwise it stays hidden. */
#surface[data-tee-layout=atlas] #teeMap[hidden]{display:none!important}
@media(max-aspect-ratio:1/1){#surface[data-tee-layout=atlas] #teeIntro{grid-template-columns:minmax(0,1fr)} #surface[data-tee-layout=atlas] #teeIntro .teeCopy{grid-column:1;grid-row:3}}

html.arriving #surface::before{opacity:calc(var(--header-scrim-opacity,0) * var(--arrival-reveal,0))}
html.arriving #surface::after{opacity:var(--arrival-reveal,0)}

.ui-icon{display:inline-block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}.explore-arrow .ui-icon{width:24px;height:32px}#mobileCue .ui-icon{width:24px;height:32px}.hole-switch .ui-icon{width:12px;height:12px}

/* Keep landscape phone notes clear of the playback controls. */
@media(orientation:landscape) and (max-height:500px){
 #surface #note{top:17%;width:42%;left:3%;right:auto}
 #surface #note h1{font-size:26px;margin:0 105px 7px 0}
 #surface #body{font-size:15px;line-height:1.3;max-height:calc(100dvh - 200px);overflow-y:auto;pointer-events:auto;touch-action:pan-y}
 #surface #next{position:absolute;top:0;right:0;min-height:36px;padding:8px 10px;font-size:11px}
 #surface #reading{margin-top:8px}
}

html.mobile-shell #surface{width:100vw;height:100vh;left:0;top:0;transform:none}html.mobile-shell #film{object-fit:cover;object-position:center}

/* Keep one cover crop throughout departure, cloud, and tee landing. */
html.mobile-shell.dive-entry.entering #surface{width:100vw;height:100vh;left:0;top:0;transform:none}
html.mobile-shell #arrival video{object-fit:cover;object-position:center}
html.mobile-shell.entering #arrival{background-size:cover!important}
/* The fixed desktop canvas becomes shallow on landscape phones. Reserve the rail. */
html.mobile-shell #note{max-height:calc(76vh - 150px);display:flex;flex-direction:column}
html.mobile-shell #note #body{min-height:0;overflow-y:auto;flex:0 1 auto;touch-action:pan-y;pointer-events:auto}
html.mobile-shell #note #next{flex-shrink:0;align-self:flex-start}

@media(min-aspect-ratio:2/1){
 html.mobile-shell #note{width:34%}
 html.mobile-shell #note #body{font-size:1.4cqw;line-height:1.4}
}

/* Mobile landscape tee copy clears the fixed transport rail. */
@media(min-aspect-ratio:2/1){
 html.mobile-shell #surface[data-tee-layout=atlas] .teeCopy{top:53%;left:17%;width:42%}
 html.mobile-shell #surface[data-tee-layout=atlas] #teeBody{font-size:1.3cqw;line-height:1.4;margin:0}
}

/* Mobile dive and tour share one decoded surface; no visibility swap at landing. */
html.mobile-shell.continuous-entry.entering #film{visibility:visible!important}
html.mobile-shell.continuous-entry.entering #arrival{display:none!important}
