/* V15.3 — Senior Guide UX: simple, clickable, non-blocking */

/* Panel: compact enough to leave header/site controls usable. */
#aea5-app.ada151-reader .aea5-angel{
  top:calc(var(--aea-adminbar,0px) + 86px)!important;
  right:18px!important;
  bottom:18px!important;
  left:auto!important;
  width:min(520px,calc(100vw - 36px))!important;
  max-width:520px!important;
  max-height:calc(100dvh - var(--aea-adminbar,0px) - 104px)!important;
  padding:20px!important;
  overflow:auto!important;
  overflow-x:hidden!important;
  pointer-events:auto!important;
  z-index:2300!important;
}
#aea5-app.ada151-reader .aea5-angel[hidden]{display:none!important}

/* Always-visible, explicit close target. */
#aea5-app.ada151-reader .aea5-angel-head{grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important}
#aea5-app.ada151-reader .ada153-close-assistant{
  position:sticky!important;top:0!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;
  width:auto!important;height:auto!important;min-width:92px!important;min-height:48px!important;
  padding:0 14px!important;border-radius:14px!important;
  font:800 15px/1 Manrope,sans-serif!important;
  background:#fffaf3!important;color:#33443e!important;border:1px solid rgba(48,67,60,.14)!important;
  box-shadow:0 7px 18px rgba(49,63,58,.08)!important;
}
#aea5-app.ada151-reader .ada153-close-assistant span{font-size:21px!important;line-height:1!important}
#aea5-app.ada151-reader .ada153-close-assistant strong{font-size:15px!important;line-height:1!important}

/* Companion mode simplifies the panel instead of adding more controls. */
#aea5-app.ada151-reader .ada153-senior-guide{display:none}
#aea5-app.ada151-reader.is-companion .ada153-senior-guide{
  display:grid!important;gap:14px!important;margin-top:14px!important;
}
#aea5-app.ada151-reader.is-companion .ada13-start,
#aea5-app.ada151-reader.is-companion .ada13-orientation,
#aea5-app.ada151-reader.is-companion .ada148-reader,
#aea5-app.ada151-reader.is-companion .ada149-reader-location,
#aea5-app.ada151-reader.is-companion .ada131-speech-progress,
#aea5-app.ada151-reader.is-companion .ada13-more,
#aea5-app.ada151-reader.is-companion .ada7-tour-controls,
#aea5-app.ada151-reader.is-companion .aea5-live{
  display:none!important;
}

#aea5-app.ada151-reader.is-companion .aea5-angel-head>div>p:last-child{
  font-size:16px!important;line-height:1.55!important;margin-bottom:0!important;
}
#aea5-app.ada151-reader.is-companion .aea5-angel-head h2{
  font-size:clamp(30px,3.2vw,38px)!important;max-width:13ch!important;
}

#aea5-app.ada151-reader .ada153-location-card{
  display:grid!important;gap:7px!important;padding:16px!important;
  border-radius:18px!important;background:#edf4ef!important;
  border:1px solid rgba(73,105,93,.14)!important;
}
#aea5-app.ada151-reader .ada153-location-card>span{
  font:800 13px/1.2 Manrope,sans-serif!important;letter-spacing:.08em!important;color:#6a7c75!important;
}
#aea5-app.ada151-reader .ada153-location-card h3{
  margin:0!important;font:600 clamp(26px,4vw,34px)/1.05 "Source Serif 4",serif!important;color:#24352f!important;
}
#aea5-app.ada151-reader .ada153-location-card p{
  margin:0!important;font-size:16.5px!important;line-height:1.55!important;color:#53645e!important;
}

#aea5-app.ada151-reader .ada153-senior-actions{display:grid!important;gap:10px!important}
#aea5-app.ada151-reader .ada153-senior-actions>button{
  display:grid!important;grid-template-columns:52px minmax(0,1fr)!important;gap:12px!important;align-items:center!important;
  width:100%!important;min-height:72px!important;padding:13px 15px!important;
  border-radius:17px!important;text-align:left!important;
  background:#fffaf3!important;border:1px solid rgba(52,72,64,.13)!important;color:#263832!important;
  box-shadow:0 8px 18px rgba(43,57,52,.07)!important;
}
#aea5-app.ada151-reader .ada153-senior-actions>button>span:first-child{
  width:44px!important;height:44px!important;border-radius:13px!important;display:grid!important;place-items:center!important;
  background:#e6f0f4!important;color:#3f6d80!important;font-size:20px!important;
}
#aea5-app.ada151-reader .ada153-senior-actions strong{
  display:block!important;font-size:17px!important;line-height:1.25!important;color:#263832!important;
}
#aea5-app.ada151-reader .ada153-senior-actions small{
  display:block!important;margin-top:3px!important;font-size:14.5px!important;line-height:1.45!important;color:#687872!important;
}
#aea5-app.ada151-reader .ada153-senior-actions .ada153-senior-primary{
  background:#dfeef3!important;border-color:#a8cbd7!important;box-shadow:0 9px 20px rgba(66,116,134,.11)!important;
}
#aea5-app.ada151-reader.is-speaking .ada153-senior-primary{background:#d7e9ef!important}
#aea5-app.ada151-reader.is-speech-paused .ada153-senior-primary{background:#f7edcf!important;border-color:#dec889!important}

#aea5-app.ada151-reader .ada153-senior-secondary{
  display:flex!important;align-items:center!important;justify-content:center!important;gap:8px 14px!important;flex-wrap:wrap!important;
  padding-top:4px!important;
}
#aea5-app.ada151-reader .ada153-senior-secondary button{
  min-height:44px!important;padding:8px 10px!important;border:0!important;background:transparent!important;box-shadow:none!important;
  color:#526761!important;font-size:14.5px!important;font-weight:700!important;text-decoration:underline!important;text-underline-offset:4px!important;
}
#aea5-app.ada151-reader .ada153-senior-secondary button:last-child{color:#936353!important}

#aea5-app.ada151-reader .ada153-senior-progress{
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;
  padding:11px 13px!important;border-radius:14px!important;background:#f7f1e8!important;color:#566761!important;
}
#aea5-app.ada151-reader .ada153-senior-progress strong{font-size:14.5px!important;line-height:1.35!important}
#aea5-app.ada151-reader .ada153-senior-progress span{font-size:14px!important;font-weight:800!important;white-space:nowrap!important}

/* While the assistant panel is open, the companion bar becomes a single status strip. */
#aea5-app.ada153-assistant-open.is-companion .ada121-companion-bar{
  width:min(520px,calc(100vw - 36px))!important;
  grid-template-columns:1fr!important;
  padding:7px!important;
  bottom:10px!important;
}
#aea5-app.ada153-assistant-open.is-companion .ada121-companion-bar>button:not(.ada121-companion-where){display:none!important}
#aea5-app.ada153-assistant-open.is-companion .ada121-companion-where{
  display:grid!important;min-height:52px!important;border-radius:13px!important;
}

/* Site remains clickable outside the assistant rectangle. */
body.aea5-panel-open::before,
body.aea5-panel-open::after{pointer-events:none!important}
#aea5-app.ada153-assistant-open .aea5-header{pointer-events:auto!important}
#aea5-app.ada153-assistant-open main{pointer-events:auto!important}

/* Senior readability mode: slightly larger, less dense text without breaking layout. */
#aea5-app.is-reading-clear main p,
#aea5-app.is-reading-clear main li{font-size:clamp(17px,1.1vw,19px)!important;line-height:1.76!important}
#aea5-app.is-reading-clear main .aea5-container{max-width:1180px!important}

@media(max-width:900px){
  #aea5-app.ada151-reader .aea5-angel{
    top:calc(var(--aea-adminbar,0px) + 76px)!important;right:10px!important;left:auto!important;
    width:min(500px,calc(100vw - 20px))!important;max-width:500px!important;
    max-height:calc(100dvh - var(--aea-adminbar,0px) - 90px)!important;
  }
}
@media(max-width:640px){
  #aea5-app.ada151-reader .aea5-angel{
    top:auto!important;left:6px!important;right:6px!important;bottom:6px!important;
    width:auto!important;max-width:none!important;max-height:calc(100dvh - var(--aea-adminbar,0px) - 12px)!important;
    padding:14px!important;
  }
  #aea5-app.ada151-reader .ada153-close-assistant{min-width:82px!important;padding:0 10px!important}
  #aea5-app.ada151-reader .ada153-senior-actions>button{min-height:68px!important;grid-template-columns:46px minmax(0,1fr)!important;padding:12px!important}
  #aea5-app.ada151-reader .ada153-senior-actions>button>span:first-child{width:40px!important;height:40px!important}
  #aea5-app.ada153-assistant-open.is-companion .ada121-companion-bar{display:none!important}
}
