/* A top-origin fixed viewport layer owns the bottom-right anchor; no JS top offset. */
.homer-ball-anchor{position:fixed;top:0;left:0;right:0;height:100%;height:100dvh;z-index:80;pointer-events:none}
.homer-golf-ball{--homer-widget-height:100px;--homer-hit-size:64px;position:absolute;top:auto;right:max(18px,env(safe-area-inset-right));bottom:calc(4px + env(safe-area-inset-bottom));width:64px;height:var(--homer-widget-height);z-index:80;isolation:isolate;pointer-events:none}
.homer-golf-ball[hidden]{display:none}
.homer-ball-hit{position:absolute;top:calc(-4px - var(--homer-hit-size)*.165);transform-origin:50% calc(100% - var(--homer-hit-size)*.165);left:calc(var(--homer-hit-size)*-.165);display:grid;place-items:center;width:calc(var(--homer-hit-size)*1.33);height:calc(var(--homer-hit-size)*1.33);padding:2px;border:0;border-radius:50%;background:transparent;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;pointer-events:auto;z-index:2}
.homer-ball-hit[hidden]{display:none}
/* The transparent grab target is 1.33x wider/taller; artwork and its spring pivot stay fixed. */
/* The objects are the controls: never draw button chrome, including global focus rings. */
body .homer-golf-ball :is(.homer-ball-hit,.homer-ball-tee),body .homer-golf-ball :is(.homer-ball-hit,.homer-ball-tee):is(:hover,:focus,:focus-visible,:active,:disabled){appearance:none;-webkit-appearance:none;outline:none;outline-offset:0;border:0;box-shadow:none;background:transparent;border-radius:0}
body .homer-golf-ball :is(.homer-ball-hit,.homer-ball-tee)::before,body .homer-golf-ball :is(.homer-ball-hit,.homer-ball-tee)::after{content:none}
/* Keyboard focus changes the object itself, without surrounding lines or shapes. */
.homer-ball-hit:focus-visible .homer-ball-art{filter:brightness(1.08) contrast(1.08)}
.homer-ball-tee:focus-visible img{filter:brightness(1.3)}
.homer-ball-art{position:relative;display:block;width:60px;height:60px;transform-origin:center;pointer-events:none;animation:homer-ball-hover 3.6s ease-in-out infinite}
.has-ball-surface>img{visibility:hidden}
@keyframes homer-ball-hover{0%,100%{transform:translateY(-1px)}50%{transform:translateY(-3px)}}
.homer-ball-art img,.homer-flight-ball img{display:block;width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none}
.homer-ball-tee{position:absolute;bottom:0;left:10px;display:grid;place-items:end center;width:44px;height:44px;padding:0;border:0;border-radius:12px;background:none;pointer-events:auto;touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer;z-index:1}
.homer-ball-tee:disabled{cursor:default;opacity:1;pointer-events:none}
.homer-ball-tee img{display:block;width:35px;height:38.5px;object-fit:contain;pointer-events:none;user-select:none;-webkit-user-drag:none}
.homer-ball-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.homer-ball-flight{position:fixed;inset:0;z-index:80;overflow:hidden;pointer-events:none}
.homer-flight-ball{position:absolute;transform-origin:center;will-change:transform,opacity;pointer-events:none}
.homer-golf-ball.is-held .homer-ball-hit{cursor:grabbing}
.homer-golf-ball.is-spinning .homer-ball-art,.homer-golf-ball.is-held .homer-ball-art,.homer-golf-ball.is-bouncing .homer-ball-art{animation-play-state:paused}
.homer-golf-ball.is-cracking .homer-ball-art{animation-play-state:paused}
.homer-ball-cracks{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none;overflow:hidden;clip-path:circle(47.2% at 50% 50%)}
.homer-ball-cracks g{transition:opacity 100ms ease-out}
.homer-ball-cracks path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.homer-ball-cracks .crack-light{stroke:rgba(255,255,255,.8);stroke-width:2.8}
.homer-ball-cracks .crack-dark{stroke:rgba(40,43,46,.8);stroke-width:1.5}
.homer-ball-pieces{position:absolute;left:2px;top:-4px;width:calc(100% - 4px);aspect-ratio:1;z-index:3;pointer-events:none}
.homer-ball-pieces[hidden]{display:none}
.homer-ball-shard,.homer-ball-shard-face{position:absolute;inset:0;display:block;pointer-events:none}
.homer-ball-shard{filter:drop-shadow(0 1.5px 1px rgba(28,38,48,.24))}
.homer-ball-shard-face img{display:block;width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none}
.is-repairing .homer-ball-shard{filter:none}
.is-repairing .homer-ball-cracks{opacity:0;transition:opacity 200ms ease 520ms}
.homer-golf-ball:is(.is-pulling,.is-bouncing) .homer-ball-hit{will-change:transform}
.homer-golf-ball.is-bouncing .homer-ball-hit{pointer-events:none}
.homer-golf-ball[hidden] .homer-ball-art,.homer-golf-ball.is-empty .homer-ball-art{animation-play-state:paused}
body:has(dialog[open]) .homer-golf-ball,body:has(.homer-analytics:not([hidden])) .homer-golf-ball{visibility:hidden}
@media(max-width:600px){.homer-golf-ball{--homer-widget-height:88px;--homer-hit-size:52px;right:max(12px,env(safe-area-inset-right));bottom:calc(4px + env(safe-area-inset-bottom));width:52px}.homer-ball-art{width:48px;height:48px}.homer-ball-tee{left:4px}}
@media(prefers-reduced-motion:reduce){.homer-golf-ball *{transition:none!important;animation:none!important}}
@media print{.homer-ball-anchor,.homer-golf-ball,.homer-ball-flight{display:none}}
