/* "Ask about Noteoriety" assistant. Sits bottom right on wide screens, bottom centre on phones,
   so it never covers the Menu tab, the music button or the progress readout. */
.as-btn {
  position: fixed; z-index: 58; bottom: 24px; right: 240px;
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px 0 16px;
  border: 1px solid rgba(255, 214, 140, 0.35); border-radius: 999px;
  background: rgba(8, 14, 30, 0.88); color: #ffd98a;
  font: 600 0.95rem/1 "Sora", "Helvetica Neue", Arial, sans-serif; cursor: pointer;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}
.as-btn:hover { background: rgba(255, 184, 74, 0.2); }
.as-btn svg { width: 22px; height: 22px; flex: none; }
.as-btn__short { display: none; }
html.jlock .as-btn { opacity: 0; pointer-events: none; }
html.pb-open .as-btn, html.xmb-open .as-btn { display: none; }
.as-panel {
  position: fixed; z-index: 59; bottom: 84px; right: 24px; width: min(380px, calc(100vw - 32px)); max-height: min(560px, 72vh);
  display: flex; flex-direction: column;
  border: 1px solid rgba(255, 214, 140, 0.3); border-radius: 20px; background: linear-gradient(160deg, #0d1530, #060a18);
  color: #eef2fb; font: 400 1rem/1.5 "Sora", "Helvetica Neue", Arial, sans-serif; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.as-panel[hidden] { display: none; }
.as-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 4px 18px; }
.as-title { margin: 0; font: 600 1.05rem/1.2 "Sora", Arial, sans-serif; }
.as-x { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 1.6rem; cursor: pointer; }
.as-x:hover { background: rgba(255, 255, 255, 0.1); }
.as-note { margin: 0; padding: 0 18px 10px; font-size: 0.85rem; line-height: 1.45; color: rgba(226, 232, 248, 0.85); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.as-log { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px; display: grid; gap: 10px; align-content: start; min-height: 120px; }
.as-m { max-width: 92%; padding: 10px 14px; border-radius: 16px; font-size: 1rem; }
.as-m p { margin: 0; }
.as-m--bot { background: rgba(255, 255, 255, 0.08); justify-self: start; border-bottom-left-radius: 4px; }
.as-m--you { background: linear-gradient(135deg, #ffd98a, #ffb84a); color: #1a0f02; justify-self: end; border-bottom-right-radius: 4px; }
.as-m.is-wait { opacity: 0.7; }
.as-help { display: grid; gap: 8px; margin-top: 10px; }
.as-help a, .as-help button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(255, 214, 140, 0.4); background: transparent; color: #ffd98a; font: 600 0.95rem/1 "Sora", Arial, sans-serif; text-decoration: none; cursor: pointer;
}
.as-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; }
.as-chips[hidden] { display: none; }
.as-chip { min-height: 44px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 999px; background: rgba(255, 255, 255, 0.05); color: #eef2fb; font: 400 0.95rem/1 "Sora", Arial, sans-serif; cursor: pointer; }
.as-chip:hover { border-color: #ffb84a; }
.as-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.as-in { flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 12px; background: rgba(255, 255, 255, 0.06); color: #fff; font: 400 1rem/1.2 "Sora", Arial, sans-serif; }
.as-send { min-height: 48px; padding: 0 18px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #ffd98a, #ffb84a 55%, #ff7a1f); color: #1a0f02; font: 600 1rem/1 "Sora", Arial, sans-serif; cursor: pointer; }
.as-send:disabled { opacity: 0.5; cursor: wait; }
.as-btn:focus-visible, .as-panel :focus-visible { outline: 3px solid #ffd98a; outline-offset: 2px; }
@media (max-width: 1100px) { .as-btn { right: 190px; } }
@media (max-width: 899px) {
  .as-btn { right: auto; left: 50%; translate: -50% 0; bottom: 10px; padding: 0 16px 0 12px; }
  .as-btn__long { display: none; } .as-btn__short { display: inline; }
  .as-panel { right: 8px; left: 8px; width: auto; bottom: 66px; max-height: 70vh; }
}
@media (prefers-reduced-motion: reduce) { .as-btn, .as-panel { transition: none; } }
@media (max-width: 899px) {
  .as-panel { max-height: 78vh; }
  .as-note { font-size: 0.8rem; padding-bottom: 8px; }
  .as-log { min-height: 160px; }
  .as-help { display: flex; flex-wrap: wrap; }
  .as-help a, .as-help button { flex: 1 1 auto; }
}
