/* Ask Books — the educated bot's door + face (2026-11-28; built to the
 * FACE STANDARD the same day: avatar, mic, labelled Ask, pinned
 * composer, in-area scroll — construction per Ask Music's
 * FACE-NOTE.md).
 * Distinct from Ezra's Support pill (filled cyan, bottom-right)
 * and the authors’ ✦ Writer pill (bottom-right, signed-in pages):
 * Ask Books is a dark pill with an amber hairline and its own little
 * family figure, bottom-left. Nothing here touches the other pills.
 *
 * COSMETICS LAW, built in: the panel is a fixed-height box that fits
 * the viewport; the conversation scrolls INSIDE it (the log carries
 * min-height:0 so flex can actually shrink it); the composer is
 * pinned at the panel's foot. Nothing spills, nothing overlaps. */

.askb-pill, .askb-pill *, .askb-panel, .askb-panel * { box-sizing: border-box; }

.askb-pill { position: fixed; left: 18px; bottom: 18px; z-index: 99950;
  display: inline-flex; align-items: center; gap: 9px;
  background: #0A1622; color: #FFB84D; border: 1px solid #FFB84D;
  border-radius: 999px; padding: 10px 20px 10px 13px; font-weight: 800;
  font-size: .95rem; cursor: pointer; min-height: 48px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45); letter-spacing: .02em; }
.askb-pill:hover, .askb-pill:focus-visible { background: #2A1E08; outline: none; }
.askb-pill-ava { display: inline-flex; width: 26px; height: 26px; flex: 0 0 auto; }
.askb-pill-ava svg { width: 100%; height: 100%; display: block; }

.askb-panel { position: fixed; left: 18px; bottom: 76px; z-index: 99951;
  width: min(400px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 96px));
  height: min(620px, calc(100dvh - 96px));
  display: flex; flex-direction: column; overflow: hidden;
  background: #14100A; border: 1px solid rgba(255,184,77,.45);
  border-radius: 16px; padding: 16px; color: #F4EDE2;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
  font-family: inherit; font-size: .95rem; line-height: 1.45; }
.askb-panel[hidden] { display: none; }

.askb-head { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; margin-bottom: 6px; }
.askb-head-ava { display: inline-flex; width: 42px; height: 42px; flex: 0 0 auto;
  animation: askbBob 3.6s ease-in-out infinite; }
.askb-head-ava svg { width: 100%; height: 100%; display: block; }
@keyframes askbBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.askb-title { color: #FFB84D; font-size: 1.05rem; flex: 1 1 auto; }
.askb-close { background: transparent; border: 1px solid rgba(255,184,77,.45);
  color: #F4EDE2; border-radius: 8px; min-width: 48px; min-height: 48px;
  font-size: 1rem; cursor: pointer; flex: 0 0 auto; }
.askb-note { color: #C9BBA3; font-size: .82rem; margin: 0 0 10px; flex: 0 0 auto; }

.askb-log { overflow-y: auto; flex: 1 1 auto; min-height: 0;
  padding-right: 2px; overscroll-behavior: contain; }
.askb-msg { background: rgba(255,184,77,.07); border: 1px solid rgba(28,43,58,.9);
  border-radius: 10px; padding: 9px 11px; margin: 0 0 8px; }
.askb-msg.bot { display: flex; gap: 9px; }
.askb-ava { display: inline-flex; width: 30px; height: 30px; flex: 0 0 auto; margin-top: 1px; }
.askb-ava svg { width: 100%; height: 100%; display: block; }
.askb-body { flex: 1 1 auto; min-width: 0; }
.askb-msg.me { background: rgba(126,188,226,.10); }
.askb-who { display: block; font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 3px; opacity: .75; }
.askb-msg p { margin: 0 0 6px; }

.askb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px;
  flex: 0 1 auto; min-height: 0; max-height: 118px; overflow-y: auto; overscroll-behavior: contain; }
.askb-chip { background: #171208; color: #FFD9A0; border: 1px solid #4A3A1E;
  border-radius: 999px; padding: 10px 13px; min-height: 48px;
  font-size: .83rem; cursor: pointer; text-align: left; }
.askb-chip:hover, .askb-chip:focus-visible { border-color: #FFB84D; color: #FFB84D; outline: none; }

.askb-form { display: flex; gap: 8px; flex: 0 0 auto; align-items: stretch; }
.askb-input { flex: 1 1 auto; min-width: 0; background: #0D0A06;
  border: 1px solid #4A3A1E; border-radius: 9px; color: #F4EDE2;
  padding: 12px; min-height: 48px; font-size: .95rem; }
.askb-input:focus { border-color: #FFB84D; outline: none; }
.askb-mic { flex: 0 0 auto; width: 48px; min-height: 48px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #0D0A06; color: #FFD9A0; border: 1px solid #4A3A1E;
  border-radius: 9px; cursor: pointer; }
.askb-mic:hover, .askb-mic:focus-visible { border-color: #FFB84D; color: #FFB84D; outline: none; }
.askb-mic[hidden] { display: none; }
.askb-mic.on { background: #3A0D16; border-color: #FF2E40; color: #FF5A6A;
  animation: askbPulse 1.2s ease-in-out infinite; }
@keyframes askbPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,46,64,.45); } 50% { box-shadow: 0 0 0 7px rgba(255,46,64,0); } }
.askb-send { background: #FFB84D; color: #2A1A02; border: 0; border-radius: 9px;
  padding: 12px 18px; min-width: 64px; min-height: 48px; font-weight: 800; cursor: pointer; flex: 0 0 auto; }

@media (prefers-reduced-motion: reduce) {
  .askb-head-ava, .askb-mic.on { animation: none; }
}

@media (max-width: 560px) {
  .askb-pill { left: 12px; bottom: 12px; }
    .askb-panel { left: 12px; right: 12px; width: auto; bottom: 70px;
    height: min(620px, calc(100vh - 90px));
    height: min(620px, calc(100dvh - 90px)); }
  }

/* Short viewports (landscape phones, small windows): the note and the
   chip shelf give their room to the conversation. */
@media (max-height: 520px) {
  .askb-note { display: none; }
  .askb-chips { max-height: 56px; }
}

/* ---- doing roads ---- */
.askb-chip-road{border-color:#FFB84D;color:#FFB84D;font-weight:700}
.askb-acts{display:inline-block;margin:8px 0 2px}
.askb-act{
  display:inline-block;min-height:44px;margin:0 6px 6px 0;padding:10px 14px;
  background:rgba(0,229,255,.08);color:#FFB84D;border:1px solid rgba(0,229,255,.55);
  border-radius:999px;font:inherit;font-size:13px;font-weight:700;cursor:pointer;
  text-decoration:none;vertical-align:middle;
}
.askb-act:hover{background:rgba(0,229,255,.16)}
.askb-act.askb-on{background:#FFB84D;color:#0B0F14}
.askb-road-label{display:block;margin:10px 0 2px;font-size:12.5px;color:#9fb3c8}
.askb-road-input,.askb-road-area{
  display:block;width:100%;margin-top:4px;padding:10px;border-radius:10px;
  background:#0B0F14;border:1px solid rgba(255,255,255,.22);color:#EAF2F8;
  font:inherit;font-size:14px;
}
.askb-road-area{resize:vertical}
.askb-cost{
  display:block;margin:10px 0;padding:9px 11px;border-radius:10px;
  background:rgba(255,209,102,.08);border:1px solid rgba(255,209,102,.45);
  color:#FFE9A8;font-size:13px;line-height:1.5;
}
