/* V15.5 — Smart Reading + Premium HUD + Senior App UX */
#aea5-app.ada155-app{
  --aea155-ink:#263a34;
  --aea155-muted:#65756f;
  --aea155-ivory:#fffaf3;
  --aea155-sage:#dfece6;
  --aea155-blue:#dfeef4;
  --aea155-terra:#ead7cd;
  --aea155-line:rgba(57,88,78,.13);
}

/* ------------------------------------------------------------------
   1. Retire old debug-looking range overlay. V15.5 supplies one focus.
   ------------------------------------------------------------------ */
.ada150-hud-layer{display:none!important}
.aea155-focus-layer{position:fixed;inset:0;z-index:2192;pointer-events:none;overflow:hidden;contain:layout style}
.aea155-focus-layer[hidden]{display:none!important}
.aea155-focus-frame{position:fixed;border:1.5px solid rgba(65,182,211,.56);border-left:4px solid rgba(54,188,218,.88);border-radius:12px;background:linear-gradient(90deg,rgba(92,199,224,.055),rgba(92,199,224,.012));box-shadow:0 0 0 3px rgba(80,192,218,.045),0 10px 28px rgba(63,140,159,.08);transition:left .16s ease,top .16s ease,width .16s ease,height .16s ease,opacity .16s ease}
.aea155-focus-frame:before,.aea155-focus-frame:after{content:"";position:absolute;left:-7px;width:16px;height:16px;border-left:2px solid rgba(48,179,210,.88)}
.aea155-focus-frame:before{top:-5px;border-top:2px solid rgba(48,179,210,.88);border-radius:7px 0 0 0}
.aea155-focus-frame:after{bottom:-5px;border-bottom:2px solid rgba(48,179,210,.88);border-radius:0 0 0 7px}
.aea155-focus-beacon{position:fixed;width:15px;height:15px;border-radius:50%;background:#4cc0dc;box-shadow:0 0 0 5px rgba(76,192,220,.14),0 0 20px rgba(76,192,220,.38)}
.aea155-focus-beacon:after{content:"";position:absolute;inset:-10px;border-radius:50%;border:1.5px solid rgba(76,192,220,.48);animation:aea155-pulse 1.65s ease-out infinite}
.aea155-focus-badge{position:fixed;min-height:28px;padding:5px 9px;border-radius:999px;border:1px solid rgba(67,151,174,.18);background:rgba(244,250,251,.96);backdrop-filter:blur(8px);box-shadow:0 8px 20px rgba(58,96,105,.10);font:800 12px/1 Manrope,sans-serif;color:#426b78;white-space:nowrap}
.aea155-focus-badge[hidden]{display:none!important}
@keyframes aea155-pulse{0%{transform:scale(.72);opacity:.85}80%,100%{transform:scale(1.5);opacity:0}}

/* ------------------------------------------------------------------
   2. Compact mini player. It should look like an app component, not HUD debug.
   ------------------------------------------------------------------ */
#aea5-app.ada155-app .ada148-reader-hud{
  left:auto!important;right:18px!important;top:calc(var(--aea-adminbar,0px) + 86px)!important;transform:none!important;
  width:min(470px,calc(100vw - 36px))!important;min-width:0!important;
  grid-template-columns:38px minmax(0,1fr) auto!important;gap:10px!important;
  padding:11px 12px!important;border-radius:19px!important;
  background:rgba(246,250,249,.97)!important;border:1px solid rgba(59,101,88,.14)!important;
  box-shadow:0 14px 34px rgba(48,72,64,.14),inset 0 1px rgba(255,255,255,.82)!important;
}
#aea5-app.ada155-app .ada148-hud-reticle{width:36px!important;height:36px!important}
#aea5-app.ada155-app .ada148-hud-reticle i:first-child{inset:2px!important}
#aea5-app.ada155-app .ada148-hud-reticle i:nth-child(2){inset:9px!important}
#aea5-app.ada155-app .ada148-hud-copy{gap:2px!important}
#aea5-app.ada155-app .ada148-hud-copy>span{font-size:11px!important;letter-spacing:.11em!important;color:#6e8079!important}
#aea5-app.ada155-app .ada148-hud-copy>strong{font-size:16px!important;line-height:1.18!important;color:#293f37!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#aea5-app.ada155-app .ada148-hud-copy>small{font-size:13px!important;line-height:1.3!important;color:#667870!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#aea5-app.ada155-app .ada148-hud-count{font-size:13px!important;color:#527080!important}
#aea5-app.ada155-app .ada148-hud-actions{grid-column:2/-1!important;justify-self:end!important;margin-top:3px!important}
#aea5-app.ada155-app .ada148-hud-actions button{min-height:44px!important;border-radius:13px!important;font-size:14px!important;background:#fffaf3!important}
#aea5-app.ada155-app .ada148-hud-actions button:last-child{width:44px!important;background:#f2dfdc!important}

/* ------------------------------------------------------------------
   3. Assistant as a concise premium app sheet.
   ------------------------------------------------------------------ */
#aea5-app.ada155-app .aea5-angel{
  width:min(500px,calc(100vw - 32px))!important;max-width:500px!important;
  max-height:min(760px,calc(100dvh - var(--aea-adminbar,0px) - 102px))!important;
  padding:18px!important;border-radius:24px!important;
  background:rgba(255,250,243,.985)!important;border:1px solid rgba(55,80,71,.12)!important;
  box-shadow:0 24px 70px rgba(40,55,50,.18)!important;
}
#aea5-app.ada155-app .aea5-angel-head{padding-bottom:13px!important;margin-bottom:10px!important;border-bottom:1px solid rgba(55,80,71,.09)!important}
#aea5-app.ada155-app .aea5-angel-head h2{font-size:clamp(29px,3.4vw,38px)!important;line-height:1.04!important;max-width:16ch!important}
#aea5-app.ada155-app .aea5-angel-head p:last-child{font-size:16px!important;line-height:1.48!important;max-width:46ch!important}
#aea5-app.ada155-app .ada13-start{gap:9px!important;margin-top:8px!important}
#aea5-app.ada155-app .ada13-start>button{min-height:72px!important;padding:12px 14px!important;border-radius:17px!important;background:#fffdf9!important;border:1px solid var(--aea155-line)!important;box-shadow:0 7px 18px rgba(43,57,52,.055)!important}
#aea5-app.ada155-app .ada13-start>button:first-child{background:linear-gradient(180deg,#e6f2f5,#deedf2)!important;border-color:rgba(81,143,163,.22)!important}
#aea5-app.ada155-app .ada13-start>button:nth-child(2){background:linear-gradient(180deg,#e9f2ed,#e0ece6)!important}
#aea5-app.ada155-app .ada13-start>button:nth-child(3){background:linear-gradient(180deg,#f9efe8,#f4e7dd)!important}
#aea5-app.ada155-app .ada13-start>button strong{font-size:17px!important;color:var(--aea155-ink)!important}
#aea5-app.ada155-app .ada13-start>button small{font-size:14.5px!important;line-height:1.42!important;color:var(--aea155-muted)!important}
#aea5-app.ada155-app .ada13-orientation{margin:8px 0!important;padding:10px 12px!important;border-radius:14px!important;background:#f5f1e9!important}
#aea5-app.ada155-app .ada13-orientation p{font-size:14.5px!important;line-height:1.45!important}
#aea5-app.ada155-app .ada149-reader-location{margin-top:8px!important;padding:11px 12px!important;border-radius:14px!important;background:#eef4f1!important}
#aea5-app.ada155-app .ada149-reader-location>span{font-size:12.5px!important;letter-spacing:.07em!important}
#aea5-app.ada155-app .ada149-reader-location>strong{font-size:15.5px!important;line-height:1.35!important}
#aea5-app.ada155-app .ada149-reader-location>small{display:none!important}
#aea5-app.ada155-app .ada13-more{margin-top:9px!important}
#aea5-app.ada155-app .ada13-more>summary{min-height:52px!important;padding:0 14px!important;border-radius:15px!important;background:#f3eee6!important;border:1px solid rgba(62,79,72,.10)!important;font-size:16px!important;text-decoration:none!important}
#aea5-app.ada155-app .ada13-more>summary span{margin-left:auto!important;color:#72827c!important}
#aea5-app.ada155-app .aea155-voice-note{margin:0!important;font-size:14px!important;line-height:1.45!important;color:#64766f!important;background:#eef5f0!important;padding:10px 11px!important;border-radius:12px!important}

/* Advanced sections become compact accordion-like cards on mobile. */
#aea5-app.ada155-app .aea155-advanced-toggle{display:none!important}

/* Companion mode should remain short and obvious. */
#aea5-app.ada155-app .ada153-location-card{padding:13px 14px!important;border-radius:16px!important}
#aea5-app.ada155-app .ada153-location-card h3{font-size:28px!important}
#aea5-app.ada155-app .ada153-senior-actions{gap:8px!important}
#aea5-app.ada155-app .ada153-senior-actions>button{min-height:66px!important;border-radius:16px!important}
#aea5-app.ada155-app .ada153-senior-secondary{padding-top:1px!important}
#aea5-app.ada155-app .ada153-senior-progress{margin-top:2px!important}

/* Floating assistant should never compete with active playback. */
#aea5-app.ada155-app.is-speaking .aea154-mobile-assistant-trigger,
#aea5-app.ada155-app.is-speech-paused .aea154-mobile-assistant-trigger,
#aea5-app.ada155-app.ada153-assistant-open .aea154-mobile-assistant-trigger{display:none!important}

@media(max-width:640px){
  #aea5-app.ada155-app .aea5-angel{
    top:auto!important;left:8px!important;right:8px!important;bottom:calc(8px + env(safe-area-inset-bottom,0px))!important;
    width:auto!important;max-width:none!important;
    max-height:min(78dvh,720px)!important;
    padding:14px!important;border-radius:22px!important;
  }
  #aea5-app.ada155-app .aea5-angel-head{position:sticky!important;top:-14px!important;z-index:30!important;margin:-14px -14px 8px!important;padding:14px 14px 12px!important;background:rgba(255,250,243,.99)!important;border-radius:22px 22px 0 0!important}
  #aea5-app.ada155-app .aea5-angel-head h2{font-size:27px!important;max-width:11ch!important}
  #aea5-app.ada155-app .aea5-angel-head p:last-child{font-size:15.5px!important;line-height:1.4!important;-webkit-line-clamp:2!important}
  #aea5-app.ada155-app .ada153-close-assistant{min-width:104px!important;min-height:54px!important;border-radius:14px!important}
  #aea5-app.ada155-app .ada13-start>button{min-height:64px!important;padding:10px 11px!important;grid-template-columns:40px minmax(0,1fr)!important}
  #aea5-app.ada155-app .ada13-start>button>span:first-child{width:38px!important;height:38px!important}
  #aea5-app.ada155-app .ada13-start>button strong{font-size:17px!important}
  #aea5-app.ada155-app .ada13-start>button small{font-size:14.5px!important}
  #aea5-app.ada155-app:not(.is-companion) .ada13-orientation,
  #aea5-app.ada155-app:not(.is-companion) .ada149-reader-location,
  #aea5-app.ada155-app:not(.is-companion) .ada131-speech-progress,
  #aea5-app.ada155-app:not(.is-companion) .aea5-live{display:none!important}

  #aea5-app.ada155-app .ada13-more[open] .ada8-angel-layout{display:grid!important;gap:8px!important;padding-top:8px!important}
  #aea5-app.ada155-app .ada8-angel-layout>section.aea155-advanced-section{padding:0!important;border:1px solid rgba(59,82,73,.10)!important;border-radius:14px!important;background:#fffdf9!important;overflow:hidden!important}
  #aea5-app.ada155-app .aea155-advanced-section>h3{display:none!important}
  #aea5-app.ada155-app .aea155-advanced-toggle{display:flex!important;align-items:center!important;justify-content:space-between!important;width:100%!important;min-height:54px!important;padding:0 13px!important;border:0!important;border-radius:0!important;background:#f8f3eb!important;box-shadow:none!important;color:#31473f!important;font:800 16px/1.2 Manrope,sans-serif!important;text-align:left!important}
  #aea5-app.ada155-app .aea155-advanced-toggle:after{content:"+";font-size:22px;font-weight:500;color:#73847d}
  #aea5-app.ada155-app .aea155-advanced-section.is-open>.aea155-advanced-toggle:after{content:"−"}
  #aea5-app.ada155-app .aea155-advanced-section:not(.is-open)>:not(.aea155-advanced-toggle):not(h3){display:none!important}
  #aea5-app.ada155-app .aea155-advanced-section.is-open>:not(.aea155-advanced-toggle):not(h3){margin:0!important;padding:12px!important}

  /* Mobile mini player: compact, readable and below the site header. */
  #aea5-app.ada155-app .ada148-reader-hud{
    left:12px!important;right:12px!important;top:calc(var(--aea-adminbar,0px) + 82px)!important;width:auto!important;
    grid-template-columns:32px minmax(0,1fr) auto!important;gap:8px!important;padding:9px 10px!important;border-radius:18px!important;
  }
  #aea5-app.ada155-app .ada148-hud-reticle{width:30px!important;height:30px!important}
  #aea5-app.ada155-app .ada148-hud-copy>span{font-size:10.5px!important}
  #aea5-app.ada155-app .ada148-hud-copy>strong{font-size:15px!important}
  #aea5-app.ada155-app .ada148-hud-copy>small{font-size:12.5px!important}
  #aea5-app.ada155-app .ada148-hud-actions{grid-column:2/-1!important}
  #aea5-app.ada155-app .ada148-hud-actions button{min-height:42px!important;font-size:14px!important}

  .aea155-focus-badge{display:none!important}
  .aea155-focus-frame{border-radius:9px!important;border-width:1.5px!important;border-left-width:4px!important}
  .aea155-focus-beacon{width:13px!important;height:13px!important}
}

@media(max-width:380px){
  #aea5-app.ada155-app .aea5-angel{left:5px!important;right:5px!important;bottom:calc(5px + env(safe-area-inset-bottom,0px))!important;max-height:82dvh!important}
  #aea5-app.ada155-app .aea5-angel-head h2{font-size:25px!important}
  #aea5-app.ada155-app .ada13-start>button small{font-size:14px!important}
}

@media(prefers-reduced-motion:reduce){
  .aea155-focus-beacon:after{animation:none!important}
  .aea155-focus-frame{transition:none!important}
}
#aea5-app.is-no-motion~.aea155-focus-layer .aea155-focus-beacon:after{animation:none!important}
