/* AIO AI GPT — Mascot V2: isolated widget, bottom LEFT. Do not cover Share / Back-to-top on the right. */
.aio-mascot-widget {
  --aio-m2-cyan: #69e2ff;
  --aio-m2-size: 112px;
  position: fixed !important;
  left: max(14px, env(safe-area-inset-left)) !important;
  right: auto !important;
  bottom: max(14px, env(safe-area-inset-bottom)) !important;
  top: auto !important;
  z-index: 1200 !important; /* below share button (9996) and share modal */
  width: var(--aio-m2-size);
  height: calc(var(--aio-m2-size) * 1.23);
  display: block;
  color: #edfaff;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  isolation: isolate;
  pointer-events: none;
  -webkit-font-smoothing: antialiased;
}
.aio-mascot-widget *, .aio-mascot-widget *::before, .aio-mascot-widget *::after { box-sizing: border-box; }
.aio-mascot-widget button, .aio-mascot-widget textarea, .aio-mascot-widget a { font: inherit; }
.aio-mascot-widget a { text-decoration: none; }
.aio-mascot-widget[hidden] { display:none !important; }
.aio-mascot-sr-only { position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important; }

.aio-mascot-avatar {
  position:relative;
  border:0;
  outline-offset: 3px;
  width:100%;height:100%;padding:0;
  background:transparent;
  color:inherit;
  display:block;
  cursor:pointer;
  pointer-events:auto;
  -webkit-tap-highlight-color:transparent;
  perspective:700px;
}
.aio-mascot-avatar:focus-visible { outline:2px solid #76eaff; border-radius:14px; }
.aio-mascot-aura {
  position:absolute; inset:14% 5% 0;
  border-radius:50%;
  background:radial-gradient(circle,rgba(20,191,255,.30),rgba(12,152,249,.04) 56%,transparent 72%);
  filter:blur(12px);
  animation:aioM2Aura 3.9s ease-in-out infinite;
}
.aio-mascot-avatar img {
  width:100%;height:100%;object-fit:contain;
  position:relative;
  display:block;
  filter: drop-shadow(0 12px 12px rgba(0,0,0,.45)) drop-shadow(0 0 9px rgba(37,184,255,.32));
  transform-origin: 50% 55%;
  animation:aioM2Float 4.6s ease-in-out infinite;
}
.aio-mascot-widget.is-open .aio-mascot-avatar img { animation-duration:3.4s; }
.aio-mascot-dot {
  position:absolute;right:4px;top:7px;width:12px;height:12px;
  border-radius:50%;background:#65e4ff;border:2px solid #0b2936;
  box-shadow:0 0 12px #35c9ff;
  animation:aioM2Aura 2.5s infinite;
}
.aio-mascot-label {
  position:absolute;left:50%;bottom:0;
  transform:translateX(-50%);
  padding:2px 8px;
  border-radius:999px;
  background:#062d40;
  border:1px solid rgba(126,220,255,.40);
  white-space:nowrap;
  font: 900 10px/1.45 Inter,system-ui,sans-serif;
  color:#b7f2ff;
  box-shadow:0 6px 12px rgba(0,0,0,.3);
}

.aio-mascot-panel {
  position:absolute;
  bottom:8px;left:calc(100% + 10px);
  width: min(328px, calc(100vw - 170px));
  max-height:min(74dvh, 520px);
  overflow:auto;
  pointer-events:auto;
  border:1px solid rgba(99,216,255,.42);
  border-radius:20px;
  background:linear-gradient(155deg,rgba(10,43,61,.985),rgba(4,21,32,.985));
  box-shadow:0 18px 48px rgba(0,0,0,.44),0 0 21px rgba(52,189,255,.16);
  backdrop-filter:blur(12px);
  padding:15px;
  opacity:0;
  visibility:hidden;
  transform:translateY(9px) scale(.97);
  transform-origin:bottom left;
  transition:transform .23s ease,opacity .23s ease,visibility .23s ease;
  scrollbar-width:thin;
}
.aio-mascot-widget.is-open .aio-mascot-panel {
  opacity:1;visibility:visible;transform:translateY(0) scale(1);
}
.aio-mascot-panel-head {
  display:flex;align-items:flex-start;justify-content:space-between;gap:8px;
  margin-bottom:8px;
}
.aio-mascot-panel-head strong {
  display:block;margin:0;color:#76e4ff;
  font-size:13px;line-height:1.25;font-weight:900;letter-spacing:.02em;
}
.aio-mascot-panel-head span { display:block;color:#91bfce;font-size:11px;margin-top:3px; }
.aio-mascot-x {
  width:32px;height:32px;flex:0 0 32px;
  border:1px solid rgba(255,255,255,.12);border-radius:10px;
  background:rgba(255,255,255,.055);color:#e7faff;cursor:pointer;font-size:20px!important;
}
.aio-mascot-x:hover { background:rgba(90,205,255,.15); }
.aio-mascot-message {
  color:#effbff;min-height:61px;
  font-size:14px;line-height:1.55;font-weight:650;
  overflow-wrap:break-word;margin:0 0 11px;
}
.aio-mascot-cursor { display:inline-block;width:2px;height:.95em;background:#57d9ff;vertical-align:-2px;margin-left:2px;animation:aioM2Cursor .8s steps(1) infinite; }
.aio-mascot-chips { display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px; }
.aio-mascot-chip {
  border:1px solid rgba(100,210,255,.30);border-radius:999px;
  padding:7px 10px;background:rgba(39,135,170,.17);
  color:#d7f4ff!important;font-size:12px!important;font-weight:750!important;
  line-height:1.25;min-height:32px;cursor:pointer;
}
.aio-mascot-chip:hover { background:rgba(44,153,188,.34);border-color:rgba(116,226,255,.65); }
.aio-mascot-form { display:flex;flex-direction:column;gap:7px;margin:0; }
.aio-mascot-form label { color:#9ccbd9;font-size:12px;font-weight:800; }
.aio-mascot-form textarea {
  border:1px solid rgba(124,216,255,.38);border-radius:10px;
  width:100%;min-height:56px;max-height:140px;resize:vertical;
  padding:9px 10px;
  background:#071c2a;color:#effaff;font-size:13px!important;line-height:1.4;
}
.aio-mascot-form textarea::placeholder { color:#96b0bd; }
.aio-mascot-form textarea:focus-visible { outline:2px solid #62d9ff;outline-offset:1px; }
.aio-mascot-send {
  min-height:37px;display:flex;align-items:center;justify-content:center;gap:6px;
  padding:8px 11px;border:1px solid #7edcff;border-radius:10px;
  color:#062535;background:linear-gradient(100deg,#6fddff,#56edcd);
  font-size:12px!important;font-weight:900!important;cursor:pointer;
}
.aio-mascot-send:hover { filter:brightness(1.09); }
.aio-mascot-foot { margin:9px 0 0;color:#93baca;font-size:11px;line-height:1.45; }
.aio-mascot-widget a:focus-visible,.aio-mascot-widget button:focus-visible { outline:2px solid #93efff;outline-offset:2px; }

@media(max-width:740px) {
  .aio-mascot-widget {
    --aio-m2-size: 82px;
    left:max(8px,env(safe-area-inset-left))!important;
    bottom:max(8px,env(safe-area-inset-bottom))!important;
  }
  .aio-mascot-panel {
    left:0;
    bottom:calc(100% + 36px);
    width:min(320px, calc(100vw - 20px));
    max-height:min(62dvh,430px);
    transform-origin:bottom left;
    padding:12px;
  }
  .aio-mascot-message{min-height:43px;font-size:13px;}
  .aio-mascot-panel-head strong{font-size:13px;}
}
@media(max-width:390px) {
  .aio-mascot-widget { --aio-m2-size:74px; }
  .aio-mascot-panel { width:calc(100vw - 18px);padding:11px;max-height:min(58dvh,400px); }
  .aio-mascot-message{min-height:0;}
}
@media(max-height:550px) and (min-width:741px) {
  .aio-mascot-widget { --aio-m2-size:85px; }
  .aio-mascot-panel { max-height:calc(100dvh - 50px); }
}
@keyframes aioM2Float {
  0%,100% { transform:translateY(0) rotateZ(-1.7deg) rotateY(0deg); }
  32% { transform:translateY(-6px) rotateZ(1.4deg) rotateY(6deg); }
  66% { transform:translateY(-2px) rotateZ(-.7deg) rotateY(-3deg); }
}
@keyframes aioM2Aura { 0%,100%{ opacity:.55; transform:scale(.94); } 50%{ opacity:1; transform:scale(1.1); } }
@keyframes aioM2Cursor { 50%{ opacity:0; } }
@media(prefers-reduced-motion:reduce) {
  .aio-mascot-widget *, .aio-mascot-widget *::before, .aio-mascot-widget *::after {
    animation:none!important;transition:none!important;
  }
}
@media print { .aio-mascot-widget{display:none!important;} }

/* AIO Mascot V3: only mobile teaser, desktop V2 untouched. */
.aio-mascot-mobile-nudge { display:none; }
@media (max-width: 740px) {
  .aio-mascot-widget.has-nudge:not(.is-open) .aio-mascot-mobile-nudge {
    position: absolute;
    display:block;
    left: calc(var(--aio-m2-size) + 9px);
    bottom: 25px;
    width: min(194px, calc(100vw - 168px));
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(104,220,255,.56);
    color: #f1fbff;
    background: linear-gradient(145deg,rgba(9,44,61,.98),rgba(5,25,37,.98));
    box-shadow: 0 12px 30px rgba(0,0,0,.34),0 0 18px rgba(56,174,255,.12);
    text-align: left;
    pointer-events: auto;
    cursor:pointer;
    -webkit-tap-highlight-color: transparent;
    animation:aioM3NudgeIn .25s ease-out both;
    z-index:1;
  }
  .aio-mascot-mobile-nudge strong {
    display:block;color:#7ce8ff;
    font-size:12px;line-height:1.25;font-weight:850;margin-bottom:3px;
  }
  .aio-mascot-mobile-nudge span {
    display:block;
    font-size:12px;line-height:1.34;font-weight:600;
    overflow-wrap:break-word;
  }
  .aio-mascot-mobile-nudge::before {
    content:'';position:absolute;left:-6px;bottom:19px;
    width:11px;height:11px;transform:rotate(45deg);
    border-left:1px solid rgba(104,220,255,.56);
    border-bottom:1px solid rgba(104,220,255,.56);
    background:#0a3042;
  }
  .aio-mascot-mobile-nudge:focus-visible {outline:2px solid #a4ecff;outline-offset:3px;}
  .aio-mascot-widget.is-open .aio-mascot-panel {
    max-height: min(58dvh, 410px);
    overscroll-behavior:contain;
  }
}
@media (max-width: 360px) {
  .aio-mascot-widget.has-nudge:not(.is-open) .aio-mascot-mobile-nudge {
    width: calc(100vw - 171px);
    padding: 8px 10px;
  }
}
@keyframes aioM3NudgeIn {
  from { opacity:0; transform:translateY(5px); }
  to { opacity:1; transform:translateY(0); }
}
@media(prefers-reduced-motion:reduce){
  .aio-mascot-widget .aio-mascot-mobile-nudge {animation:none!important;}
}

/* AIO Mascot Guide V2 (2026-10-14) — isolated context tips; no global design changes. */
.aio-mascot-widget .aio-mascot-menu-label {
  color: #a5cad8; font-size: 11px; font-weight: 850;
  letter-spacing: .035em; margin: 9px 0 7px;
}
.aio-mascot-widget .aio-mascot-advice {
  border: 1px solid rgba(113, 219, 253, .32);
  border-left: 3px solid #79deff;
  border-radius: 11px; background: rgba(52, 142, 178, .12);
  padding: 9px 11px; margin: 0 0 11px;
}
.aio-mascot-widget .aio-mascot-advice[hidden] { display: none !important; }
.aio-mascot-widget .aio-mascot-advice strong {
  display: block; color: #b9efff; font-size: 12px; margin-bottom: 4px;
}
.aio-mascot-widget .aio-mascot-advice p {
  margin: 0 0 6px; color: #d0e6ee; font-size: 11.5px; line-height: 1.48;
}
.aio-mascot-widget .aio-mascot-advice a {
  display: inline-block; color: #87eaff !important;
  font-size: 11.5px !important; font-weight: 850 !important;
  border-bottom: 1px solid rgba(135, 234, 255, .45);
}
.aio-mascot-widget .aio-mascot-advice a:hover { color: #f3fdff !important; }
.aio-mascot-widget .aio-mascot-chip { overflow-wrap: anywhere; }
@media (max-width: 740px) {
  .aio-mascot-widget .aio-mascot-advice { padding: 8px 9px; }
  .aio-mascot-widget .aio-mascot-advice p { font-size: 11px; }
}

/* AIO Mascot V2.1 routing & coverage fix. Existing visual style is untouched.
   Keep links, buttons and text readable within the mascot panel. */
.aio-mascot-widget .aio-mascot-panel [data-aio-mascot-context] {
  overflow-wrap: anywhere;
}
