/* The fixed dial owns its reading veil; character visibility never changes it. */
:root{
  --dial-height:76px;--dial-drop:10px;--indicator-width:190px;
  --dial-gap:12px;--dial-fade:48px;
  --dial-visible-height:max(0px,calc(var(--dial-height) - var(--dial-drop) + var(--safe-bottom)));
  --dial-shield-height:calc(var(--dial-visible-height) + var(--dial-gap));
  --dial-clearance:calc(var(--dial-shield-height) + var(--dial-fade));
  --dial-label-size:22px;
  --dial-rendered-height:min(var(--dial-height),calc(var(--indicator-width) * .4));
  --dial-letterbox-y:calc((var(--dial-height) - var(--dial-rendered-height)) / 2);
  /* Label centers in the 600 x 240 SVG: y=7.918326 (02/03), y=134.890992 (00/05).
     Keep the visual fade tied to those labels, independently of reading padding. */
  --dial-veil-original-transparent:calc(var(--dial-visible-height) - var(--dial-letterbox-y) - var(--dial-rendered-height) * .032993024 + var(--dial-label-size) / 2 + var(--dial-rendered-height) / 15);
  --dial-veil-solid:calc(var(--dial-visible-height) - var(--dial-letterbox-y) - var(--dial-rendered-height) * .5620458 - var(--dial-label-size) / 2 - var(--dial-rendered-height) / 24);
  /* The previous ramp was 1.5 times the original. Extend it by another third,
     keeping the opaque endpoint fixed: the new ramp is twice the original. */
  --dial-veil-transparent:calc(var(--dial-veil-original-transparent) + (var(--dial-veil-original-transparent) - var(--dial-veil-solid)));
  --dial-veil-ramp:calc(var(--dial-veil-transparent) - var(--dial-veil-solid));
  --dial-veil-height:max(var(--dial-clearance),var(--dial-veil-transparent));
  /* Only extend the reading tail when the higher veil needs more room.
     Keep the last control and keyboard focus at least 24px above the whole veil. */
  --dial-content-padding:max(calc(var(--dial-clearance) + 40px),calc(var(--dial-veil-height) + 24px));
  --dial-scroll-clearance:max(calc(var(--dial-clearance) + 24px),calc(var(--dial-veil-height) + 24px));
  /* Existing section padding adds safe-bottom separately. */
  --companions-space:calc(var(--dial-content-padding) - var(--safe-bottom) - 40px);
}
#site #main{height:calc(100dvh - var(--header-height) - var(--safe-top));mask-image:none;-webkit-mask-image:none}
#main>.view{scroll-padding-bottom:var(--dial-scroll-clearance)}
#main>.view>.view-content{padding-bottom:var(--dial-content-padding)}
/* Keep the original central drag surface; the full-width veil never takes input. */
#companion-gesture-zone{position:fixed;inset:auto auto 0 50%;transform:translateX(-50%);width:calc(var(--indicator-width) + 24px);height:var(--dial-visible-height);z-index:103;touch-action:pinch-zoom;user-select:none}
.companion-dock::before{content:none}
.dial-footer{width:var(--indicator-width);height:calc(var(--dial-height) + var(--safe-bottom));bottom:calc(0px - var(--dial-drop));overflow:visible;isolation:isolate;pointer-events:none;z-index:105}
.dial-footer::before{
  content:'';display:block;position:absolute;inset:auto auto var(--dial-drop) 50%;
  width:100vw;height:var(--dial-veil-height);transform:translateX(-50%);z-index:-1;pointer-events:none;
  background:linear-gradient(to top,
    #06131b 0px,#06131b var(--dial-veil-solid),
    #06131be0 calc(var(--dial-veil-solid) + var(--dial-veil-ramp) * .25),
    #06131b80 calc(var(--dial-veil-solid) + var(--dial-veil-ramp) * .5),
    #06131b1f calc(var(--dial-veil-solid) + var(--dial-veil-ramp) * .75),
    #06131b00 var(--dial-veil-transparent),#06131b00 100%);
}
.dial-footer>#dial-art,.dial-footer .dial-links{inset:0;width:100%;height:var(--dial-height);aspect-ratio:auto;transform:none;pointer-events:none}
.dial-footer .dial-links .dial-step{position:absolute;display:grid;place-items:center;transform:translate(-50%,-50%);width:var(--dial-label-size);height:var(--dial-label-size);padding:0;color:#bbd0da;pointer-events:none;transition:color .25s,text-shadow .25s}
.dial-step b{font:500 10px/1 var(--display)}
.dial-footer .dial-links .dial-step.is-current{color:#66fca0;text-shadow:0 0 3px #a7ffc9,0 0 10px #66fca0e6,0 0 22px #39ff88b3}
.dial-step.is-current b{font-size:12px;font-weight:600}
.scroll-cue{z-index:106;bottom:calc(var(--dial-shield-height) + 4px)}
.site-header .header-controls{gap:5px}
body.companions-paused #home-title em{animation-play-state:paused!important}
@media(min-width:601px) and (max-width:959px){
  :root{--dial-height:116px;--indicator-width:290px;--dial-drop:18px}
}
@media(min-width:960px){
  :root{--dial-height:184px;--dial-drop:28px;--indicator-width:460px;--dial-fade:64px}
  .dial-step b{font-size:13px}.dial-step.is-current b{font-size:15px}
  .site-header .header-controls{gap:8px}
}
@media(min-width:1200px) and (min-height:950px){:root{--dial-height:200px;--indicator-width:500px;--dial-drop:30px}}
@media(min-width:960px) and (max-height:800px){
  :root{--dial-height:160px;--indicator-width:400px;--dial-drop:24px}
}
@media(max-width:380px){
  :root{--indicator-width:156px;--dial-height:63px;--dial-drop:9px}
  .site-header .brand>span{display:none}
  .site-header .header-controls{gap:4px}
}
@media(max-height:500px) and (orientation:landscape){
  :root{--header-height:64px;--indicator-width:200px;--dial-height:80px;--dial-drop:16px;--dial-fade:36px}
  .site-header{padding-block:10px}
}
body.companions-keyboard{--dial-clearance:18px;--dial-content-padding:58px;--dial-scroll-clearance:42px;--companions-space:calc(18px - var(--safe-bottom))}
body.companions-keyboard .dial-footer,body.companions-keyboard #companion-gesture-zone{visibility:hidden}
@media(prefers-reduced-motion:reduce){.dial-step{transition:none}}
