/* Sam as a star-orb in a small round window onto the night sky (2026-10-19; replaces the TV and anchorman).
   anchor.js draws the sky and the orb on the canvas; this file only places the window, the bubble and the hint. */
.anchor {
  position: fixed; right: 12px; bottom: var(--am-bottom, 11rem); z-index: 55;
  width: clamp(76px, 21vw, 96px); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  transition: bottom 0.3s ease;
}
.anchor[hidden] { display: none; }
.anchor .am-tv, .anchor .am-tv:hover { display: block; width: 100%; aspect-ratio: 1; padding: 0; margin: 0; border: 0; background: #000; cursor: pointer; border-radius: 50%; overflow: hidden; touch-action: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 10px 26px rgba(0,0,0,.6); transition: transform .2s cubic-bezier(.3,1.5,.5,1), box-shadow .25s; }
.am-tv:focus-visible { outline: 3px solid var(--accent, #f26657); outline-offset: 3px; }
.am-sky { display: block; width: 100%; height: 100%; }
.anchor[data-press="1"] .am-tv { transform: scale(.94); }
.anchor[data-held="1"] .am-tv, .anchor[data-state="listening"] .am-tv { transform: scale(1.08); box-shadow: 0 0 0 2px rgba(255,150,140,.7), 0 10px 26px rgba(0,0,0,.6); }
.anchor[data-state="thinking"] .am-tv { box-shadow: 0 0 0 1px rgba(230,236,255,.35), 0 10px 26px rgba(0,0,0,.6); }

/* what Sam is doing: one quiet word beside the window, only while listening, thinking or speaking */
.am-status {
  position: absolute; right: calc(100% + 10px); top: 50%; transform: translate(6px, -50%); white-space: nowrap; pointer-events: none;
  display: inline-flex; align-items: center; gap: .45rem; padding: .38rem .7rem .38rem .55rem; border-radius: 999px;
  background: rgba(6, 8, 14, .78); color: #e6ebf5; box-shadow: 0 0 0 1px rgba(255,255,255,.1); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 600 .74rem/1 'Montserrat', system-ui, sans-serif; letter-spacing: .04em;
  opacity: 0; transition: opacity .35s ease, transform .35s ease;
}
.anchor[data-status="1"] .am-status { opacity: 1; transform: translate(0, -50%); }
.am-status i { width: 6px; height: 6px; border-radius: 50%; background: #dfe6ff; animation: amSoft 1.6s ease-in-out infinite; }
.anchor[data-state="listening"] .am-status i { background: #ff968c; }
@keyframes amSoft { 50% { opacity: .35; transform: scale(.7); } }
.am-bubble, .am-hint { display: none !important; }

/* speech bubble */
.am-bubble {
  position: absolute; right: 6px; bottom: calc(100% + 2px); width: max-content; max-width: min(15rem, calc(100vw - 24px)); min-width: 2rem;
  background: #fff8e6; color: #2a1d12; border: 2px solid #3a2a1a; border-radius: 14px 14px 4px 14px;
  padding: .45rem .65rem; font: 600 .8rem/1.35 'Montserrat', system-ui, sans-serif; box-shadow: 0 6px 16px rgba(0,0,0,.35);
  transform-origin: 90% 100%; animation: amPop .25s cubic-bezier(.3,1.6,.5,1);
}
.am-bubble[hidden] { display: none; }
@keyframes amPop { from { transform: scale(.6); opacity: 0; } }
.am-bubble-ai { display: inline-block; background: linear-gradient(135deg, #7c5cff, #ff6a5c); color: #fff; font: 800 .6rem 'Montserrat', sans-serif; letter-spacing: .08em; padding: .1rem .38rem; border-radius: 6px; margin-right: .4rem; vertical-align: 1px; }
.am-bubble-ai[hidden] { display: none; }
.am-dots-t { display: inline-flex; gap: 3px; vertical-align: middle; }
.am-dots-t i { width: 6px; height: 6px; border-radius: 50%; background: #3a2a1a; animation: amDot 1s infinite; }
.am-dots-t i:nth-child(2) { animation-delay: .15s; } .am-dots-t i:nth-child(3) { animation-delay: .3s; }
@keyframes amDot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }

@media (prefers-reduced-motion: reduce) { .am-tv, .am-status { transition: none; } .am-status i { animation: none; } }

/* Sam's card: the same words Sam speaks, written down (what Sam can / can't do, privacy) */
#sam-panel { position: fixed; z-index: 70; left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 100px); max-width: 420px; margin: 0 auto;
  background: #fff8e6; color: #2a1d12; border: 2px solid #3a2a1a; border-radius: 16px; padding: 14px 40px 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.45);
  font: 500 .88rem/1.4 'Montserrat', system-ui, sans-serif; animation: amPop .25s cubic-bezier(.3,1.6,.5,1); }
#sam-panel strong { display: block; margin-bottom: 6px; font-size: .95rem; }
#sam-panel ul { margin: 0; padding-left: 1.1rem; } #sam-panel li { margin: 3px 0; }
.sam-panel-x { position: absolute; top: 6px; right: 8px; width: 32px; height: 32px; border: 0; background: none; font-size: 22px; line-height: 1; color: #2a1d12; cursor: pointer; }
@media (min-width: 960px) { .stack-page #sam-panel { left: auto; right: calc(50% - 540px + 24px); width: 440px; bottom: 110px; } }
