/* Shared viewport and safe-area dimensions for mobile browsers and installed apps. */
:root{--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px);--viewport-height:100vh;-webkit-text-size-adjust:100%;text-size-adjust:100%}
@supports(height:100dvh){:root{--viewport-height:100dvh}}
#app,.workspace,#main,.game-header>div,.game-status>div,.stick-side,.stick-readout,.field,.mode-card,.quiz-caddy p,.guide-steps span,.record-name,.learning-banner>div{min-width:0}
button,input,select{max-width:100%}input,select{min-width:0}.primary,.secondary,.text-button{white-space:normal;overflow-wrap:anywhere}.hero h1{white-space:normal;word-break:keep-all}.hero-link{flex-wrap:wrap;text-align:left}.intro-strip>span{flex-wrap:wrap}.intro-strip i{margin-left:0}.card-meta{flex-wrap:wrap;gap:6px}.resume-banner span,.hole-results b,.final-ranks b{min-width:0;overflow-wrap:anywhere}.detail-stats{flex-wrap:wrap;gap:12px 24px}.info-panel{flex-wrap:wrap}.info-panel>div{flex:1 1 180px}.source-note a{white-space:normal;overflow-wrap:anywhere}
.modal-backdrop{padding:calc(12px + var(--safe-top)) calc(12px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(12px + var(--safe-left));height:var(--viewport-height);bottom:auto;overflow:hidden}
.modal{width:min(100%,580px);max-width:100%;max-height:calc(var(--viewport-height) - var(--safe-top) - var(--safe-bottom) - 24px);min-height:0;overflow:auto;scroll-padding-block:54px 20px;overflow-wrap:break-word}
.modal.wide{width:min(100%,690px)}.modal h2{padding-right:16px;margin-right:20px}.mode-options,.name-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mode-card{overflow-wrap:anywhere}.quiz-caddy{display:grid;grid-template-columns:minmax(48px,75px) minmax(0,1fr)}.quiz-caddy .mascot{width:100%;max-width:75px}.check-field{align-items:flex-start}.check-field input{flex-shrink:0}.mini-holes{grid-template-columns:repeat(3,minmax(0,1fr))}.mini-holes button{min-width:0}.table-scroll{max-width:100%;-webkit-overflow-scrolling:touch}.hole-results>div,.final-ranks>div{flex-wrap:wrap}.shot-event h2{font-size:clamp(30px,8vw,46px);padding:0;margin-right:0}.shot-event>strong{overflow-wrap:anywhere}.dock-action{min-width:0;width:min(92%,310px)}
.game-shell{height:var(--viewport-height);min-height:0;width:100%;padding:var(--safe-top) max(12px,var(--safe-right)) var(--safe-bottom) max(12px,var(--safe-left));overflow:auto;overscroll-behavior:contain}
.game-shell .game-header{flex-shrink:0}.game-header h1{letter-spacing:0}.game-header-right{flex-shrink:0}.game-shell .game-layout{min-height:0}.game-shell .field-area{min-height:140px}.game-shell .map-wrapper{min-height:0}.joystick-dock{min-width:0;padding:8px 0 6px}.joystick-console{--stick-size:clamp(128px,42vw,180px);grid-template-columns:minmax(0,1fr) var(--stick-size) minmax(0,1fr);gap:clamp(4px,2vw,16px);width:min(100%,480px);margin:4px auto 0}.joystick{width:var(--stick-size);height:var(--stick-size);max-width:none}.stick-side{gap:4px}.stick-help{white-space:normal;flex-wrap:wrap;gap:3px;line-height:1.3;min-height:44px;font-size:16px;padding:3px 0;width:100%}.stick-help svg{width:18px}.shot-mode{white-space:normal;word-break:keep-all;font-size:16px;padding:5px 6px;line-height:1.3}.power-meter{width:min(100%,88px)}.stick-readout{font-size:16px}.stick-readout strong{font-size:clamp(28px,8vw,36px)}.stick-readout>b{font-size:clamp(19px,5.6vw,23px)}.stick-caption{font-size:15px;line-height:1.4}.joystick-dock .relief-button{max-width:100%;min-height:44px;font-size:15px;line-height:1.4;padding:4px 2px}.stick-instruction{font-size:clamp(18px,4.8vw,21px);line-height:1.4}
@media(max-width:1024px){
 .topbar{height:auto;min-height:72px;gap:8px;padding:calc(8px + var(--safe-top)) max(12px,var(--safe-right)) 8px max(12px,var(--safe-left));display:grid;grid-template-columns:minmax(0,1fr) auto}.breadcrumbs{display:block;font-size:15px;line-height:1.4}.breadcrumbs>strong{display:block;font-size:16px}.breadcrumbs>span{display:none}.top-actions{gap:3px}.top-actions .icon-button{flex-shrink:0;min-width:44px;min-height:44px;width:44px}.profile{display:none}
}
@media(max-width:760px){
 #main{padding:16px max(12px,var(--safe-right)) calc(100px + var(--safe-bottom)) max(12px,var(--safe-left))}.hero-text{padding:22px 20px 8px}.hero h1{font-size:clamp(30px,8.5vw,35px)}.hero .eyebrow{flex-wrap:wrap;line-height:1.5}.hero p{overflow-wrap:break-word}.hero p br{display:none}.hero-link{font-size:17px;line-height:1.6}.round-bar{padding:14px 12px}.round-route>div>div{gap:6px 10px}.start-button{min-width:0}.mobile-nav{padding:5px max(8px,var(--safe-right)) calc(6px + var(--safe-bottom)) max(8px,var(--safe-left));display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px}.mobile-nav button{min-width:0;font-size:16px}.learning-banner{flex-wrap:wrap;gap:12px}.learning-banner>div{flex:1 1 160px}.learning-banner>b{margin-left:auto}.record-stats>div{flex-wrap:wrap}.records-panel select{max-width:100%}.modal{padding:30px 18px 20px}.mode-card b{font-size:20px}.mode-card small{font-size:16px;word-break:keep-all}.mini-holes{gap:8px}.mini-holes button{padding:10px}.game-header h1{font-size:20px}.game-header h1 span{font-size:15px;margin-left:4px}.game-header small{font-size:15px}.game-shell .game-header{gap:4px;height:62px;min-height:62px}.game-header-right .icon-button{width:44px;min-width:44px}.game-status{padding:0 4px 5px;gap:8px}.game-status small{font-size:15px}.game-status strong{font-size:25px}.game-status strong span{font-size:15px;margin-left:2px}.game-status em{font-size:14px}.game-shell .game-progress{margin:3px 0 7px}.stick-side{gap:3px}.terrain-readout{max-width:calc(100% - 24px)}
}
@media(max-width:400px){.name-grid{grid-template-columns:1fr}.mini-holes{grid-template-columns:repeat(2,minmax(0,1fr))}.quiz-caddy{grid-template-columns:1fr}.quiz-caddy .mascot{width:65px;justify-self:center}.mode-options{gap:8px}.mode-card{padding:14px 5px}.game-header h1 span{display:block;margin-left:0;font-size:14px}.game-shell .game-header{height:74px;min-height:74px}.game-header h1{margin-top:0;line-height:1.2}.game-status strong{font-size:23px}.game-status strong span{font-size:14px}.game-status{gap:5px}.stick-help,.shot-mode{font-size:15px}.stick-readout{font-size:15px}}
@media(max-height:700px) and (orientation:portrait){
 .game-shell .game-header{height:58px;min-height:58px}.game-header small{line-height:1.2}.game-header h1 strong{font-size:24px}.game-shell .field-area{min-height:110px}.joystick-console{--stick-size:clamp(128px,38vw,146px);margin-top:2px}.joystick-dock{padding:4px 0}.stick-caption{font-size:14px;margin-top:2px}.stick-help{min-height:44px}.joystick-dock .relief-button{min-height:40px;font-size:14px}.terrain-readout{top:7px;left:8px;max-width:calc(100% - 122px)}.game-shell .field-top>span{visibility:hidden}.game-shell .map-legend{font-size:12px;padding:3px 5px}.terrain-key{font-size:12px}.caddy-radio{width:42px;height:44px}.game-shell .map-wrapper{padding:42px 0 36px}
}
/* In landscape the score sits above the controls, leaving the course unobstructed. */
@media(max-height:540px) and (orientation:landscape){
 .game-shell{--dock-width:clamp(220px,40vw,340px);display:grid;grid-template-columns:minmax(0,1fr) var(--dock-width);grid-template-rows:54px 10px minmax(0,1fr);column-gap:10px;min-height:0;padding:var(--safe-top) max(8px,var(--safe-right)) var(--safe-bottom) max(8px,var(--safe-left));overflow:auto}
 .game-shell .game-header{grid-column:1;grid-row:1;min-width:0;height:54px;min-height:0;gap:2px}.game-header h1{margin-top:0;font-size:19px}.game-header h1 strong{font-size:24px}.game-header h1 span{font-size:14px}.game-header small{font-size:14px}.game-header-right{margin:0 0 0 auto}.game-header-right>.icon-button:last-child{display:none}.game-shell .game-status{grid-column:2;grid-row:1/3;position:static;right:auto;top:auto;width:100%;max-width:none;margin:0;padding:3px 2px;gap:4px;align-self:center;grid-template-columns:1.1fr 1fr .7fr}.game-status small{font-size:14px;line-height:1.2}.game-status strong{font-size:22px;line-height:1.2}.game-status strong span{font-size:13px;margin-left:1px}.game-status em{font-size:12px}.game-shell .game-progress{grid-column:1;grid-row:2;margin:1px 0 4px}.game-shell .game-layout{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:minmax(0,1fr) var(--dock-width);gap:10px;min-height:0}.game-shell .field-area{height:100%;min-height:150px}.game-shell .map-wrapper{padding:45px 0 32px}.joystick-dock{align-self:stretch;overflow:auto;padding:3px 0;min-height:0}.joystick-console{--stick-size:clamp(116px,19vw,144px);gap:4px}.stick-help{font-size:14px;min-height:40px}.shot-mode{font-size:14px;padding:4px 2px}.stick-help svg{display:none}.stick-side{gap:0}.stick-instruction{font-size:17px;line-height:1.25}.stick-readout{font-size:14px;gap:1px}.stick-readout strong{font-size:28px}.stick-readout>b{font-size:19px}.power-meter{margin:3px 0;height:6px}.stick-caption{font-size:14px;margin-top:2px;line-height:1.3}.joystick-dock .relief-button{font-size:13px;min-height:36px;padding:2px}.game-shell .field-top{top:6px;right:6px;left:auto}.game-shell .field-top>span{display:none}.game-shell .field-top button{font-size:14px;padding:5px 7px;min-height:38px}.terrain-readout{top:6px;left:6px;padding:4px 6px;max-width:calc(100% - 114px)}.terrain-readout span{font-size:13px}.terrain-readout strong{font-size:14px}.game-shell .map-legend{left:6px;bottom:4px;font-size:12px;gap:0;padding:3px 5px}.terrain-key{font-size:12px}.caddy-radio{display:none}
}
@media(max-height:540px) and (orientation:landscape) and (max-width:700px){.game-header h1 span{display:none}.game-header small{font-size:13px}.game-header .icon-button{min-width:40px;width:40px}.game-shell .map-legend{right:6px}.game-shell .terrain-key{display:none}.terrain-readout span{display:none}.terrain-readout{top:6px;max-width:calc(100% - 108px)}.terrain-readout strong{font-size:13px}.game-shell .map-wrapper{padding:42px 0 26px}}
@media(max-width:760px) and (orientation:portrait){.game-header>div:not(.game-header-right){flex:1}.game-header small{display:block;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.game-header h1{line-height:1.2;margin-top:1px;white-space:nowrap}.game-header h1 strong{font-size:25px}.game-header h1 span{display:inline;font-size:14px;margin-left:4px}}
@media(max-width:760px) and (orientation:portrait){.game-shell .game-header{height:auto;min-height:58px;padding-block:4px}.game-header h1{white-space:normal}.game-header h1 span{display:inline-block}}
@media(max-height:540px) and (orientation:landscape){.game-shell{--dock-width:clamp(250px,40vw,340px)}}
.modal-backdrop{top:var(--viewport-top,0px)}
/* Senior-friendly quiz library and feedback. */
.quiz-library{padding:24px;background:#fff;border:1px solid #dbe5d5;border-radius:20px;margin:24px 0 32px}.quiz-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.quiz-filters .field{font-size:18px}.quiz-filters select{font-size:19px;min-height:52px;width:100%}.quiz-practice-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}.quiz-practice-actions>button{flex:1 1 220px;min-height:56px;font-size:19px}.quiz-local-note,.quiz-reassurance{font-size:17px;line-height:1.7;color:#526354}.quiz-local-note{margin-bottom:0}.quiz-meta{display:flex;flex-wrap:wrap;gap:10px;margin:0 30px 20px 0}.quiz-meta .eyebrow{font-size:16px;line-height:1.6}.quiz-meta .pill{font-size:16px;white-space:normal}.quiz-panel h2.quiz-question{font-size:clamp(24px,5.8vw,30px);line-height:1.5;margin:0 0 16px;padding:0}.quiz-answers button{align-items:center;font-size:20px;line-height:1.6;text-align:left;padding:16px;gap:12px;min-height:70px}.quiz-answers button b{font-weight:600;min-width:0;overflow-wrap:anywhere}.quiz-answers button>span{flex-shrink:0}.quiz-answers button:disabled{opacity:1}.quiz-answers button.correct{border:2px solid #29774d;background:#e7f4dd;color:#17452f}.quiz-answers button.wrong{border:2px solid #b34934;background:#fff1ed;color:#803221}.quiz-explanation{margin-top:22px;border-top:1px solid #dbe5d5;padding-top:20px}.quiz-explanation>strong{font-size:23px;display:block}.quiz-correct-answer{font-size:20px;font-weight:700;line-height:1.7}.quiz-explanation .quiz-caddy{background:#f1f6ec;border-radius:16px;padding:14px;gap:14px;align-items:center}.quiz-explanation .quiz-caddy p{font-size:19px;line-height:1.8;margin:0}.quiz-review-note{font-size:17px;line-height:1.6}.quiz-panel #quiz-feedback:focus{outline:none}.quiz-level{font-size:16px;margin-left:10px;color:#526354}.rules-grid .rule-card{display:block;text-align:left;min-width:0}.rules-grid .rule-card h3{font-size:21px;line-height:1.65;overflow-wrap:anywhere;margin:18px 0}.quiz-more{margin-top:24px;min-height:54px;font-size:19px}.quiz-session-result{display:grid;text-align:center;gap:10px;margin:24px 0}.quiz-session-result b{font-size:44px;color:#286244}.quiz-session-result span{font-size:19px}.source-note{font-size:16px;line-height:1.9}.quiz-skip{font-size:18px;min-height:48px}
@media(max-width:400px){.quiz-filters{grid-template-columns:1fr;gap:12px}.quiz-library{padding:18px 14px}.quiz-answers button{font-size:19px;padding:14px 10px;gap:9px}.quiz-panel h2.quiz-question{font-size:24px}.quiz-explanation .quiz-caddy{grid-template-columns:1fr}.quiz-practice-actions>button{flex-basis:100%}}
