/* The Grass Bot (js/bot.js): its button under the profile picture on Home, and its chat sheet. */
.bar-right { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bot-btn { width: 44px; height: 44px; padding: 0; border: 0; background: none; display: grid; place-items: center;
  filter: drop-shadow(0 3px 6px rgba(5, 20, 10, .35)); transition: transform 120ms ease-out; -webkit-tap-highlight-color: transparent; }
.bot-btn:active { transform: scale(.94); }
.gbot { width: 100%; height: 100%; display: block; overflow: visible; }

.bot-sheet { display: flex; flex-direction: column; height: 78dvh; max-height: 78dvh; overflow: hidden; padding-bottom: calc(12px + var(--sab)); }
.bot-head { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.bot-head .gbot { width: 44px; height: 44px; flex: none; }
.bot-head h2 { font-family: var(--serif); font-weight: 500; font-size: 22px; }
.bot-x { margin-left: auto; width: 44px; height: 44px; border: 0; background: none; color: var(--quiet); display: grid; place-items: center; }
.bot-x .ico { width: 22px; height: 22px; }
.bot-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 14px 0; }
.bot-msg { max-width: 85%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.bot-msg.bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.bot-msg.me { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 6px; }
.bot-msg.thinking { display: inline-flex; gap: 4px; }
.bot-msg.thinking span { width: 7px; height: 7px; border-radius: 50%; background: var(--quiet); animation: bot-dot 1s ease-in-out infinite; }
.bot-msg.thinking span:nth-child(2) { animation-delay: .15s; } .bot-msg.thinking span:nth-child(3) { animation-delay: .3s; }
@keyframes bot-dot { 0%, 100% { opacity: .3; transform: none; } 50% { opacity: 1; transform: translateY(-3px); } }
.bot-starters { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 10px; }
.bot-starters:empty { display: none; }
.bot-form { display: flex; gap: 8px; }
.bot-form .input { flex: 1; min-width: 0; }
@media (prefers-reduced-motion: reduce) { .bot-msg.thinking span { animation: none; opacity: .6; } }
/* With the bot under the profile picture the bar is taller: keep the logo level with the picture, not the pair. */
.hero .bar:has(.bar-right) { align-items: flex-start; }
.hero .bar:has(.bar-right) .chip-brand { min-height: 44px; height: 44px; }   /* the ball is taller than the circle; centre on the circle */

/* On the course the bot sits in the dark top bar, between the course name and "Saved on phone". */
.bot-btn.on-course { width: 40px; height: 40px; flex: none; }
textarea.input { min-height: 84px; padding-top: 12px; resize: none; line-height: 1.4; }

/* The chat sheet: see-through grass green with a soft blur, white type (Luke, 2026-10-10: "something there, green, see-through"). */
.sheet.bot-sheet { background: linear-gradient(rgba(10, 52, 26, .8), rgba(10, 52, 26, .8)), url(/img/grass.jpg) center top / 460px auto; background-color: rgba(10, 52, 26, .8);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); color: #fff; border-top: 1px solid rgba(255, 255, 255, .28); }
.bot-sheet .bot-head { border-bottom-color: rgba(255, 255, 255, .25); }
.bot-sheet .bot-head h2, .bot-sheet .bot-x { color: #fff; }
.bot-sheet .bot-msg.bot { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .28); color: #fff; }
.bot-sheet .bot-msg.me { background: #fff; color: #0A1F14; }
.bot-sheet .bot-msg.thinking span { background: #fff; }
.bot-sheet .bot-starters .chip, .bot-sheet .bot-starters button { background: rgba(255, 255, 255, .92); color: #0A1F14; }
.bot-sheet .small, .bot-sheet .quiet, .bot-sheet .hint { color: rgba(255, 255, 255, .85); }

/* Patch: bigger, real grass growing out of him (blade shapes come from js/bot.js), swaying; and a golf swing now and then. */
.gbot { overflow: visible; }
.bot-btn .patch-say { position: absolute; right: 70px; top: 4px; width: max-content; max-width: var(--say-w, 100px); padding: 4px 8px; border-radius: 9px; background: #fff; color: #0A1F14;
  font: 650 12.5px/1.2 var(--sans, system-ui); text-align: center; box-shadow: 0 2px 8px rgba(4, 28, 12, .25); opacity: 0; transform: translateX(4px) scale(.96); transform-origin: right center;
  transition: opacity 220ms ease-out, transform 220ms ease-out; pointer-events: none; }
.bot-btn .patch-say::after { content: ""; position: absolute; top: 50%; right: -4px; width: 8px; height: 8px; margin-top: -4px; background: #fff; transform: rotate(45deg); border-radius: 0 2px 0 0; }
.bot-btn .patch-say.on { opacity: 1; transform: none; }


/* A white ball stands out on the grass; a soft shadow sits him on it. */


/* Big Balls the robot: tall, so his button is a tall box. The club arm swings from the shoulder, the other hand waves, the equaliser mouth moves. */
.bot-corner .gbot { filter: drop-shadow(0 3px 4px rgba(0, 25, 8, .45)); }


/* Big Balls (3D robot pictures). Float, look around, hop; a cyan mouth moves over a hidden smile while he talks. */
.bot-corner { width: 62px; height: 43px; top: 0; }
.gb3 { position: relative; display: block; width: 100%; height: 100%; }
.g3-body { position: absolute; inset: 0; display: block; animation: g3-float 3.4s ease-in-out infinite; filter: drop-shadow(0 4px 5px rgba(0, 25, 8, .45)); }
.g3 { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.g3-l, .g3-r { opacity: 0; }
.g3-l { animation: g3-look-l 16s ease-in-out infinite; } .g3-r { animation: g3-look-r 16s ease-in-out infinite; }
@keyframes g3-look-l { 0%, 26%, 44%, 100% { opacity: 0; } 30%, 40% { opacity: 1; } }
@keyframes g3-look-r { 0%, 62%, 80%, 100% { opacity: 0; } 66%, 76% { opacity: 1; } }
@keyframes g3-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-3px) rotate(1.2deg); } }
.gb3.hop { animation: g3-hop .9s cubic-bezier(.3, .7, .3, 1); }
@keyframes g3-hop { 0%, 100% { transform: none; } 30% { transform: translateY(-9px) scale(1.04); } 55% { transform: translateY(0) scale(.98, 1.02); } 75% { transform: translateY(-3px); } }

.g3-patch, .g3-mouth { position: absolute; left: 46.2%; top: 72.8%; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; }
.g3-patch { width: 17%; height: 20%; border-radius: 50%; background: radial-gradient(closest-side, rgb(34, 73, 99) 62%, rgba(34, 73, 99, 0)); }
.g3-mouth { width: 10%; height: 9%; display: grid; place-items: center; }
.g3-mouth i { display: block; width: 100%; height: 100%; border-radius: 0 0 99px 99px; background: #8DEBF6; box-shadow: 0 0 5px #38D2F0; transform-origin: 50% 20%; }
.gb3.talk .g3-patch, .gb3.talk .g3-mouth { opacity: 1; }
.gb3.talk .g3-l, .gb3.talk .g3-r { animation: none; opacity: 0; }
.gb3.talk .g3-mouth i { animation: g3-talk .32s ease-in-out infinite alternate; }
@keyframes g3-talk { from { transform: scaleY(.25); } to { transform: scaleY(1.35); } }
@media (prefers-reduced-motion: reduce) { .g3-body, .g3-l, .g3-r, .gb3.hop, .gb3.talk .g3-mouth i { animation: none; } }
