/* ✨ Агент ArmanGPT (#967, макет #933) — «Тёплая сцена»: бордо/золото/крем; текст ≥14px, кнопки ≥44px, 360px. */
body.ag-open .bottom-nav { display: none !important; }
.ag-ov { position: fixed; inset: 0; z-index: 450; display: flex; flex-direction: column; color: #fbf1de;
  background: radial-gradient(90% 50% at 50% 28%, rgba(122,36,51,.55), transparent 70%), linear-gradient(#1b0c10, #110708 70%); }
.ag-ov[hidden] { display: none; }
.ag-head { display: flex; align-items: center; gap: 8px; padding: calc(8px + var(--safe-t, 0px)) 12px 6px 4px; flex: none; }
.ag-title { flex: 1; margin: 0; font: 700 26px Georgia, "Times New Roman", serif; color: #fbf1de; }
.ag-pill { min-height: 36px; padding: 0 14px; border-radius: 18px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 700; color: #f2c46d;
  background: rgba(40,19,21,.9); border: 1.5px solid rgba(242,196,109,.45); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ag-pill.is-live { color: #2a1a12; background: linear-gradient(#f6d58b, #e0a43a); border-color: #f6d58b; }
.ag-ic { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 1.5px solid rgba(242,196,109,.4); background: rgba(40,19,21,.85); color: #f2c46d; font-size: 20px; display: grid; place-items: center; }
.ag-x { font-size: 22px; }
.ag-ic.is-on { background: rgba(242,196,109,.2); }
.ag-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 16px 10px; }
.ag-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 0 6px; transition: padding .3s; }
.ag-orb { --lv: 0; position: relative; width: 168px; height: 168px; border-radius: 50%; margin: 8px 0 14px;
  background: radial-gradient(circle at 38% 32%, #ffe3a6, #f2b25a 45%, #c66a3a 80%, #8a3a2a);
  box-shadow: 0 0 calc(40px + var(--lv) * 60px) rgba(242,180,90,.55), 0 0 0 calc(16px + var(--lv) * 14px) rgba(242,196,109,.08), 0 0 0 calc(34px + var(--lv) * 18px) rgba(242,196,109,.05);
  transform: scale(calc(1 + var(--lv) * .06)); transition: box-shadow .12s, transform .12s; }
.ag-orb i { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 70% 75%, rgba(122,36,51,.35), transparent 60%); }
@media (prefers-reduced-motion: no-preference) { .ag-ov:not(.is-voice) .ag-orb { animation: ag-breathe 4.5s ease-in-out infinite; } }
@keyframes ag-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
.ag-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 34px; margin-bottom: 10px; }
.ag-wave b { width: 5px; height: 30px; border-radius: 3px; background: linear-gradient(#f6d58b, #e0a43a); transform: scaleY(.25); transition: transform .08s; }
.ag-hello { margin: 0 0 6px; font-size: 16px; line-height: 1.45; max-width: 330px; }
.ag-sub { margin: 0 0 14px; font-size: 14px; line-height: 1.4; color: #cbb89c; max-width: 320px; }
.ag-chips, .ag-reply { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ag-reply { justify-content: flex-start; margin: 2px 0 10px; }
.ag-chip { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1.5px solid rgba(242,196,109,.4); background: rgba(40,19,21,.85); color: #fbf1de; font-size: 15px; font-family: inherit; }
.ag-chip.is-old { color: #cbb89c; border-style: dashed; }
.ag-chip.is-gold { background: linear-gradient(#f6d58b, #e0a43a); color: #2a1a12; border: 0; font-weight: 800; margin-top: 8px; }
.ag-hero.is-small { padding: 0; }
.ag-hero.is-small .ag-orb { width: 64px; height: 64px; margin: 2px 0 6px; }
.ag-hero.is-small .ag-hello, .ag-hero.is-small .ag-sub, .ag-hero.is-small .ag-chips { display: none; }
.ag-hero.is-small .ag-wave { height: 20px; margin-bottom: 4px; }
.ag-hero.is-small .ag-wave b { height: 18px; }
.ag-log { display: flex; flex-direction: column; gap: 10px; }
.ag-msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; }
.ag-msg p { margin: 0; }
.ag-msg.is-me { align-self: flex-end; background: rgba(242,196,109,.16); border: 1px solid rgba(242,196,109,.4); border-bottom-right-radius: 4px; }
.ag-msg.is-ai { align-self: flex-start; background: rgba(40,19,21,.92); border: 1px solid rgba(242,196,109,.2); border-bottom-left-radius: 4px; }
.ag-msg.ag-think p { color: #cbb89c; font-style: italic; }
.ag-msg.ag-note { background: none; border: 0; padding: 0 4px; align-self: center; }
.ag-msg.ag-note small { font-size: 14px; color: #8a8179; }
.ag-media img, .ag-media video { display: block; max-width: 100%; max-height: 220px; border-radius: 12px; margin-bottom: 6px; }
.ag-media audio { width: 240px; max-width: 100%; margin-bottom: 6px; }
.ag-vars { display: flex; flex-direction: column; gap: 8px; max-width: 100%; width: 100%; padding: 8px; box-sizing: border-box; }
.ag-var { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; min-height: 72px; padding: 8px 10px; border-radius: 14px;
  border: 1.5px solid rgba(242,196,109,.22); background: rgba(27,12,16,.85); color: #fbf1de; text-align: left; font-family: inherit; }
.ag-var.is-mid { border-color: rgba(242,196,109,.7); }
.ag-var.is-picked { background: rgba(242,196,109,.16); border-color: #f6d58b; }
.ag-smp { position: relative; width: 64px; height: 56px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #3a1a20, #1b0c10); display: grid; place-items: center; }
.ag-smp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ag-smp i { position: relative; font-style: normal; font-size: 20px; color: #fbf1de; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.ag-vt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ag-vt b { font-size: 16px; }
.ag-vt small { font-size: 14px; color: #cbb89c; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ag-var em { font-style: normal; font-weight: 800; font-size: 16px; color: #f2c46d; white-space: nowrap; }
.ag-job .ag-bar { height: 8px; margin: 10px 0 6px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.ag-job .ag-bar i { display: block; height: 100%; width: 6%; background: linear-gradient(90deg, #f6d58b, #e0a43a); transition: width .6s; }
.ag-job small { font-size: 14px; color: #cbb89c; display: block; }
.ag-job.is-ok small { color: #8fdcae; }
.ag-job.is-err small { color: #ff9a8a; }
.ag-job .ag-chip { margin-top: 8px; }
.ag-place { margin: 0 12px 6px; font-size: 14px; color: #cbb89c; display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; overflow-x: auto; white-space: nowrap; }
.ag-place[hidden] { display: none; }
.ag-pl { flex: none; min-height: 36px; padding: 0 10px; border-radius: 10px; border: 1px dashed rgba(242,196,109,.45); background: transparent; color: #cbb89c; font-size: 14px; font-family: inherit; }
.ag-pl.is-on { border-style: solid; color: #2a1a12; background: #f2c46d; }
.ag-type { display: flex; gap: 8px; align-items: flex-end; padding: 0 12px 8px; }
.ag-type[hidden] { display: none; }
.ag-type textarea { flex: 1; min-height: 48px; max-height: 120px; padding: 12px 14px; box-sizing: border-box; border-radius: 16px; border: 1.5px solid rgba(242,196,109,.4); background: rgba(27,12,16,.95); color: #fbf1de; font: 16px/1.35 inherit; font-family: inherit; resize: none; }
.ag-send { width: 48px; height: 48px; border-radius: 50%; border: 0; background: linear-gradient(#f6d58b, #e0a43a); color: #2a1a12; font-size: 20px; flex: none; }
.ag-menuhint { margin: 0 0 4px; text-align: center; font-size: 14px; color: #8a8179; }
.ag-foot { display: flex; align-items: center; gap: 8px; padding: 6px 12px calc(12px + env(safe-area-inset-bottom, 0px)); flex: none; }
.ag-talk { flex: 1; min-width: 0; min-height: 52px; padding: 0 12px; border-radius: 26px; border: 0; background: linear-gradient(#f6d58b, #e0a43a); color: #2a1a12; font-size: 16px; font-weight: 800; font-family: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-talk:disabled { opacity: .7; }
.ag-talk.is-live { background: linear-gradient(#e46a5a, #b8342a); color: #fff; }
/* вариант Б: шар-кнопка на Главной, над нижней панелью */
.ag-entry { position: fixed; right: 14px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 90; width: 60px; height: 60px; border-radius: 50%; border: 0; padding: 0;
  background: radial-gradient(circle at 38% 32%, #ffe3a6, #f2b25a 45%, #c66a3a 85%); box-shadow: 0 0 24px rgba(242,180,90,.6), 0 6px 16px rgba(0,0,0,.45); }
.ag-entry[hidden] { display: none; }
.ag-entry span { font-size: 24px; }
.ag-entry i { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(242,196,109,.5); }
@media (prefers-reduced-motion: no-preference) { .ag-entry i { animation: ag-ring 2.6s ease-out infinite; } }
@keyframes ag-ring { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
body.ag-open .ag-entry, body.office-open .ag-entry, body.cr2-open .ag-entry { display: none; }
