.twhnav{position:fixed;right:20px;bottom:max(20px,calc(env(safe-area-inset-bottom) + 14px));z-index:2147483000;font-family:-apple-system,system-ui,'Segoe UI',sans-serif;}
.twhnav *{box-sizing:border-box;}
/* Kill the default mobile blue tap-highlight everywhere in the nav (and,
   since this stylesheet ships on every page, everywhere else too) -- a
   premium press state comes from each element's own :active/:hover rule
   instead. Keyboard focus stays fully visible via :focus-visible below. */
a,button,.twhnav *{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;}
:focus{outline:none;}
a:focus-visible,button:focus-visible{outline:2px solid #d1ba71;outline-offset:3px;}
/* scrim so scrolled-under copy dims and stays legible instead of vanishing behind the FAB */
.twhnav::before{content:"";position:fixed;left:0;right:0;bottom:0;height:130px;z-index:-1;pointer-events:none;
  background:linear-gradient(180deg,transparent,rgba(11,10,8,.55) 55%,rgba(11,10,8,.72));}
.twhnav-toggle{position:relative;width:54px;height:54px;border-radius:50%;border:1px solid rgba(209,186,113,.4);
  background:rgba(17,15,11,.86);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
  box-shadow:0 10px 34px rgba(0,0,0,.55),inset 0 0 0 1px rgba(209,186,113,.08);cursor:pointer;
  display:flex;align-items:center;justify-content:center;transition:transform .3s cubic-bezier(.2,.8,.2,1),border-color .3s,box-shadow .3s;}
.twhnav-toggle:hover{transform:translateY(-2px);border-color:rgba(209,186,113,.7);}
.twhnav-toggle:focus-visible{outline:2px solid #d1ba71;outline-offset:3px;}
/* ---- compass <-> cross morph: two icons cross-faded + counter-rotated, not
   a literal path morph (SVG path interpolation needs matching point counts
   and would be fragile) -- reads just as smooth, far more robust. Refined
   15 Jul: opacity and transform now share ONE duration/curve (previously
   .32s opacity vs .48s transform -- the transform kept invisibly easing
   for ~130ms after the icon had already faded out, which read as an abrupt
   swap rather than one continuous motion). Compass no longer shrinks past
   .58 (was .4 -- past that its fine ring/needle strokes just turned to an
   illegible smear before vanishing, which is what actually LOOKED like a
   "crop"). The .twhnav-toggle.morph pulse (JS-triggered on every toggle
   click, open or close) gives the button itself one shared breath through
   the swap so the two icons read as a single gesture, not two independent
   fades. ---- */
.twhnav-icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  transition:opacity .38s cubic-bezier(.24,.74,.3,1),transform .38s cubic-bezier(.28,1.18,.34,1);}
.twhnav-icon svg{stroke:#d1ba71;color:#d1ba71;fill:none;}
.twhnav-icon-compass svg{width:23px;height:23px;}
.twhnav-icon-cross{opacity:0;transform:rotate(-42deg) scale(.58);}
.twhnav-icon-cross svg{width:16px;height:16px;}
.twhnav.open .twhnav-icon-compass{opacity:0;transform:rotate(42deg) scale(.58);}
.twhnav.open .twhnav-icon-cross{opacity:1;transform:rotate(0deg) scale(1);}
.twhnav.open .twhnav-toggle{border-color:rgba(209,186,113,.65);box-shadow:0 10px 34px rgba(0,0,0,.55),0 0 0 1px rgba(209,186,113,.18),0 0 22px -6px rgba(209,186,113,.35);}
@keyframes twhnavMorphPulse{0%{transform:scale(1);}45%{transform:scale(.91);}100%{transform:scale(1);}}
.twhnav-toggle.morph{animation:twhnavMorphPulse .38s cubic-bezier(.24,.74,.3,1);}
@media (prefers-reduced-motion:reduce){.twhnav-toggle.morph{animation:none;}}

/* ---- radial fan: icon-only circles, staggered spring-out along an arc ---- */
.twhnav-fan{position:absolute;right:2px;bottom:2px;width:1px;height:1px;pointer-events:none;}
.twhnav-fi{position:absolute;right:0;bottom:0;display:flex;flex-direction:column;align-items:center;gap:6px;
  transform:translate(0,0) scale(.4);opacity:0;pointer-events:none;
  transition:transform .46s cubic-bezier(.34,1.42,.4,1),opacity .28s ease;transition-delay:0s;}
.twhnav.open .twhnav-fi{opacity:1;pointer-events:auto;transform:translate(var(--fx),var(--fy)) scale(1);}
.twhnav-fi-circle{width:46px;height:46px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  border:1px solid rgba(209,186,113,.32);background:rgba(17,15,11,.88);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  color:#efe7d4;box-shadow:0 8px 22px rgba(0,0,0,.45);transition:border-color .25s,box-shadow .25s,background .25s,transform .25s;}
.twhnav-fi-circle svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.5;}
.twhnav-fi:hover .twhnav-fi-circle,.twhnav-fi:active .twhnav-fi-circle{transform:translateY(-2px);border-color:rgba(209,186,113,.7);
  box-shadow:0 8px 22px rgba(0,0,0,.45),0 0 16px -4px rgba(209,186,113,.4);}
.twhnav-fi.cur .twhnav-fi-circle{color:#f3e7bf;border-color:rgba(209,186,113,.75);background:rgba(209,186,113,.13);
  box-shadow:0 8px 22px rgba(0,0,0,.4),0 0 0 1px rgba(209,186,113,.3),0 0 18px -4px rgba(209,186,113,.5);}
.twhnav-fi.locked{pointer-events:none;}
.twhnav-fi.locked .twhnav-fi-circle{opacity:.4;}
@media (prefers-reduced-motion:no-preference){
  .twhnav.open .twhnav-fi:nth-of-type(1){transition-delay:.02s;}
  .twhnav.open .twhnav-fi:nth-of-type(2){transition-delay:.07s;}
  .twhnav.open .twhnav-fi:nth-of-type(3){transition-delay:.12s;}
}

@media (max-width:520px){.twhnav{right:14px;bottom:max(14px,calc(env(safe-area-inset-bottom) + 10px));}}
@media (prefers-reduced-motion:reduce){.twhnav-toggle,.twhnav-fi,.twhnav-fi-circle,.twhnav-icon{transition:none;}}
@media print{.twhnav{display:none;}}

/* ---- compass rail v3 -- horizontal bottom roll-rail (Dan, 19 Jul 12:02,
   supersedes the right-edge shrink: "could it just be a straight,
   horizontal, infinite scroll at the very bottom of the screen? That way
   we can have the writing and the icon"). The dial soul lying flat: same
   physics constants and gesture code path -- infinite wrap, one-detent
   flick, tap-any-visible-item, haptic tick, reduced-motion fade -- just
   mapped to the X axis. Each item = small icon + word. Active item sits
   centred in gold; neighbours dim toward the edges. Fine tick marks roll
   along the rail's top edge. Slim + safe-area aware; the rail HIDES while
   the keyboard is up (any input focused -> body.twh-kb) so it never
   covers a CTA or fights the keyboard, and content gets bottom clearance
   via the body.twh-dial rules below. Horizontal page scrollers are safe:
   the gesture only lives inside the fixed bar itself. ---- */
.twhnav.docked .twhnav-toggle{display:none;}
.twhnav.docked::before{display:none;}
.twhdial{position:fixed;left:0;right:0;bottom:0;height:calc(54px + env(safe-area-inset-bottom));z-index:2147483000;display:none;
  touch-action:none;user-select:none;-webkit-user-select:none;overflow:hidden;
  transition:transform .28s ease,opacity .28s ease;}
.twhdial.on{display:block;}
body.twh-kb .twhdial,body.vg-on .twhdial{transform:translateY(110%);opacity:0;pointer-events:none;}
/* vg-on = the full-screen voice-recording state (journal/check-in): its HUD
   owns the bottom edge while recording, so the rail bows out exactly like
   it does for the keyboard. */
.twhdial::before{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,transparent,rgba(11,10,8,.78) 30%,rgba(11,10,8,.97));
  -webkit-mask:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent);
          mask:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent);}
.twhdial svg.arc{position:absolute;left:0;top:0;width:100%;height:10px;pointer-events:none;opacity:.5;transition:opacity .3s;overflow:visible;}
.twhdial.live svg.arc{opacity:1;}
.twhdial .di{position:absolute;left:50%;top:31px;display:flex;align-items:center;gap:7px;
  color:#847b66;text-decoration:none;white-space:nowrap;will-change:transform,opacity;}
.twhdial .di svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto;}
.twhdial .di .dl{font:600 9.5px/1 -apple-system,system-ui,'Segoe UI',sans-serif;letter-spacing:.12em;text-transform:uppercase;color:inherit;}
.twhdial .di.near{color:#ecd692;}
.twhdial.live .di.near{text-shadow:0 0 14px rgba(209,186,113,.5);}
.twhdial .di.cur svg{filter:drop-shadow(0 0 9px rgba(209,186,113,.4));}
@media (prefers-reduced-motion:reduce){.twhdial .di{transition:opacity .3s !important;}}
/* Content clears the rail from below. .wrap already carries 116px+safe
   bottom padding (dock era) and .beat carries 88-96px+safe -- both exceed
   the 54px rail. The coach composer is the one fixed-bottom element: lift
   it above the rail (the rail owns the safe-area inset while it's up),
   and give the chat column the extra room. While the keyboard is up
   (body.twh-kb) the rail is gone, so the composer drops back to the edge. */
body.twh-dial #bar{bottom:calc(54px + env(safe-area-inset-bottom));padding-bottom:12px;}
body.twh-kb.twh-dial #bar{bottom:0;padding-bottom:calc(16px + env(safe-area-inset-bottom));}
body.twh-dial #chat{padding-bottom:216px;}
@media print{.twhdial{display:none;}}

#twhdial .di{height:60px;min-width:96px;padding:8px 14px 0;justify-content:center;top:27px;box-sizing:border-box;}
.twhdial{view-transition-name:twh-rail;}

/* ---- anonymous/marketing nav: unchanged vertical list, but detuned gold (liquid-glass, not solid fill) ---- */
.twhnav-menu{position:absolute;right:2px;bottom:66px;display:flex;flex-direction:column;gap:8px;opacity:0;transform:translateY(10px) scale(.96);pointer-events:none;transition:opacity .28s,transform .28s cubic-bezier(.2,.8,.2,1);}
.twhnav.open .twhnav-menu{opacity:1;transform:none;pointer-events:auto;}
.twhnav-item{display:flex;align-items:center;gap:10px;justify-content:flex-end;text-decoration:none;padding:10px 16px;border-radius:999px;border:1px solid rgba(209,186,113,.28);background:rgba(11,10,8,.92);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:#efe7d4;font-size:14px;letter-spacing:.015em;white-space:nowrap;box-shadow:0 8px 24px rgba(0,0,0,.4);transition:border-color .25s,color .25s,transform .25s,background .25s;}
.twhnav-item:hover{border-color:rgba(209,186,113,.75);transform:translateX(-3px);}
.twhnav-item.cur{color:#f3e7bf;background:rgba(209,186,113,.13);border-color:rgba(209,186,113,.6);font-weight:600;box-shadow:0 8px 24px rgba(0,0,0,.4),0 0 16px -4px rgba(209,186,113,.4);}
.twhnav-item.locked{opacity:.42;cursor:default;}
.twhnav-item.locked:hover{transform:none;border-color:rgba(209,186,113,.28);}
.twhnav-dot{width:5px;height:5px;border-radius:50%;background:rgba(209,186,113,.6);flex:0 0 auto;}
.twhnav-item.cur .twhnav-dot{background:#f3e7bf;}
