/* ═══════════════════════════════════════════════════════════════
   TournamentMU – Warzone Fire & War Atmosphere CSS
   Particle layer + enhanced fire design elements
   ═══════════════════════════════════════════════════════════════ */

/* ── Warzone particle container ── */
.tmu-warzone {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  overflow: hidden;
}

/* ── Ember particles ── */
.tmu-wz-ember {
  position: absolute;
  border-radius: 50%;
  will-change: top, left, opacity;
  transition: none;
}

/* ── Ash particles ── */
.tmu-wz-ash {
  position: absolute;
  border-radius: 50%;
  background: rgba(180, 160, 140, 0.5);
  will-change: top, left, transform;
}

/* ── Smoke plumes ── */
.tmu-wz-smoke {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(60, 30, 20, 0.15), transparent 70%);
  filter: blur(30px);
  will-change: top, left;
}

/* ── Spark flashes ── */
.tmu-wz-spark {
  position: absolute;
  border-radius: 50%;
  will-change: top, left, opacity;
}

/* ── Beat flash overlay ── */
.tmu-wz-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9991;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 60, 20, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.06s ease-out;
}
.tmu-wz-flash.is-flash {
  opacity: 1;
}

/* ── Fire line at header bottom ── */
.tmu-wz-fireline {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 601;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 60, 20, 0.3) 10%,
    rgba(255, 120, 40, 0.7) 30%,
    rgba(255, 200, 80, 0.9) 50%,
    rgba(255, 120, 40, 0.7) 70%,
    rgba(255, 60, 20, 0.3) 90%,
    transparent 100%
  );
  box-shadow:
    0 0 8px rgba(255, 80, 30, 0.4),
    0 0 20px rgba(255, 60, 20, 0.2),
    0 2px 30px rgba(255, 80, 30, 0.15);
  animation: tmu-wz-fireline-pulse 3s ease-in-out infinite;
}

@keyframes tmu-wz-fireline-pulse {
  0%, 100% { opacity: 0.6; filter: brightness(1); }
  50%      { opacity: 1;   filter: brightness(1.3); }
}

/* When audio plays, fire line intensifies */
body.is-audio-playing .tmu-wz-fireline,
body.is-audio-playing ~ .tmu-wz-fireline {
  animation: none;
  opacity: calc(0.5 + 0.5 * var(--tmu-rx-energy, 0));
  filter: brightness(calc(1 + 0.6 * var(--tmu-rx-beat, 0)));
  box-shadow:
    0 0 calc(8px + 16px * var(--tmu-rx-bass, 0)) rgba(255, 80, 30, calc(0.4 + 0.4 * var(--tmu-rx-bass, 0))),
    0 0 calc(20px + 30px * var(--tmu-rx-beat, 0)) rgba(255, 60, 20, calc(0.2 + 0.4 * var(--tmu-rx-beat, 0))),
    0 2px calc(30px + 20px * var(--tmu-rx-energy, 0)) rgba(255, 80, 30, 0.15);
  transition: opacity 0.06s linear, filter 0.06s linear, box-shadow 0.06s linear;
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCED SITE-WIDE FIRE DESIGN
   ═══════════════════════════════════════════════════════════════ */

/* ── Glowing fire dividers between sections ── */
.mu-section-divider,
.mu-footer::before {
  position: relative;
}

.mu-footer {
  position: relative;
}

.mu-footer::after {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 100, 40, 0.6), rgba(255, 180, 60, 0.8), rgba(255, 100, 40, 0.6), transparent);
  box-shadow: 0 0 12px rgba(255, 80, 30, 0.3), 0 0 30px rgba(255, 60, 20, 0.1);
  animation: tmu-wz-fireline-pulse 4s ease-in-out infinite;
}

/* ── Enhanced card fire borders ── */
.nova-contentBlock,
.pageContent,
.panel-body {
  border: 1px solid rgba(255, 80, 40, 0.12);
  position: relative;
  overflow: hidden;
}

.nova-contentBlock::before,
.pageContent::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 120, 50, 0.5), transparent);
  animation: tmu-card-sweep 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes tmu-card-sweep {
  0%   { left: -50%; }
  100% { left: 150%; }
}

/* ── Fire corner accents on cards ── */
.nova-contentBlock::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  background:
    linear-gradient(135deg, rgba(255, 80, 40, 0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* ── Ember glow on interactive elements ── */
.mu-btn {
  position: relative;
  overflow: hidden;
}

.mu-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 200, 100, 0.15);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
  pointer-events: none;
}

.mu-btn:hover::after {
  width: 200%;
  height: 200%;
}

/* ── War atmosphere overlays ── */
body.nova::after {
  content: "";
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(
    0deg,
    rgba(255, 30, 10, 0.04) 0%,
    rgba(255, 60, 20, 0.02) 40%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
  animation: tmu-war-floor-glow 5s ease-in-out infinite;
}

@keyframes tmu-war-floor-glow {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

/* ── Enhanced topPanel with war fire ── */
.topPanel {
  position: relative;
}

/* Fire embers container from header edges */
.topPanel .topPanel__inner::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 12px;
  background:
    radial-gradient(3px 3px at 5% 50%, rgba(255, 100, 40, 0.7), transparent 70%),
    radial-gradient(2px 2px at 15% 30%, rgba(255, 140, 50, 0.5), transparent 60%),
    radial-gradient(2.5px 2.5px at 30% 70%, rgba(255, 80, 30, 0.6), transparent 60%),
    radial-gradient(2px 2px at 45% 40%, rgba(255, 160, 60, 0.4), transparent 60%),
    radial-gradient(3px 3px at 60% 60%, rgba(255, 100, 40, 0.7), transparent 70%),
    radial-gradient(2px 2px at 75% 30%, rgba(255, 120, 30, 0.5), transparent 60%),
    radial-gradient(2.5px 2.5px at 90% 70%, rgba(255, 140, 50, 0.6), transparent 60%);
  pointer-events: none;
  animation: tmu-ember-drift 2s ease-in-out infinite alternate;
  z-index: 2;
}

@keyframes tmu-ember-drift {
  0%   { transform: translateY(0); opacity: 0.5; }
  100% { transform: translateY(-4px); opacity: 0.9; }
}

/* ── Logo fire glow ── */
.topPanel__logo img {
  animation: tmu-logo-fire 3s ease-in-out infinite;
}

@keyframes tmu-logo-fire {
  0%, 100% { box-shadow: 0 8px 20px rgba(6, 2, 4, 0.5), 0 0 12px rgba(255, 60, 20, 0.15); }
  50%      { box-shadow: 0 8px 24px rgba(6, 2, 4, 0.5), 0 0 20px rgba(255, 80, 30, 0.3), 0 0 40px rgba(255, 60, 20, 0.1); }
}

/* ── Section titles fire text ── */
.nova-pageTitle h1,
.nova-pageTitle h2,
.tmu-section-title {
  background: linear-gradient(135deg, #fff 0%, var(--tmu-inferno) 40%, var(--tmu-ember) 70%, var(--tmu-gold) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: tmu-fire-text-shift 6s ease-in-out infinite;
}

@keyframes tmu-fire-text-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Links hover fire ── */
a:not(.mu-btn):not(.topPanel__menu a):hover {
  text-shadow: 0 0 8px rgba(255, 80, 40, 0.3);
}

/* ── Scrollbar fire theme ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(8, 6, 10, 0.9);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 80, 40, 0.35), rgba(255, 120, 50, 0.2));
  border-radius: 4px;
  border: 1px solid rgba(255, 60, 20, 0.15);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 80, 40, 0.55), rgba(255, 120, 50, 0.35));
}

/* ═══════════════════════════════════════════════════════════════
   MUSIC-REACTIVE ENHANCEMENTS
   These expand heavily on the existing audio-reactive system
   ═══════════════════════════════════════════════════════════════ */

/* ── Warzone particles speed up with music ── */
body.is-audio-playing .tmu-warzone {
  filter: brightness(calc(1 + 0.3 * var(--tmu-rx-energy, 0)));
}

/* ── Beat flash intensifies ── */
body.is-audio-playing .tmu-wz-flash.is-flash {
  background: radial-gradient(
    ellipse at 50% 100%,
    rgba(255, 60, 20, calc(0.06 + 0.12 * var(--tmu-rx-beat, 0))),
    transparent 70%
  );
}

/* ── Cards breathe with music ── */
body.is-audio-playing .nova-contentBlock,
body.is-audio-playing .pageContent {
  border-color: rgba(255, 80, 40, calc(0.12 + 0.2 * var(--tmu-rx-mid, 0)));
  box-shadow:
    0 4px 20px rgba(3, 6, 12, 0.3),
    0 0 calc(4px + 16px * var(--tmu-rx-energy, 0)) rgba(255, 80, 40, calc(0.03 + 0.08 * var(--tmu-rx-energy, 0)));
  transition: border-color 0.08s linear, box-shadow 0.08s linear;
}

body.is-audio-playing .nova-contentBlock::before,
body.is-audio-playing .pageContent::before {
  animation-duration: calc(6s - 3s * var(--tmu-rx-energy, 0));
}

/* ── Buttons pulse with beat ── */
body.is-audio-playing .mu-btn--primary {
  box-shadow:
    0 4px 16px rgba(255, 60, 20, 0.3),
    0 0 calc(8px + 20px * var(--tmu-rx-beat, 0)) rgba(255, 80, 40, calc(0.15 + 0.35 * var(--tmu-rx-beat, 0)));
  transform: scale(calc(1 + 0.015 * var(--tmu-rx-beat, 0)));
  transition: box-shadow 0.06s linear, transform 0.06s ease-out;
}

/* ── Footer fire intensifies with music ── */
body.is-audio-playing .mu-footer {
  border-color: rgba(255, 100, 50, calc(0.2 + 0.35 * var(--tmu-rx-bass, 0)));
  transition: border-color 0.08s linear;
}

body.is-audio-playing .mu-footer::after {
  animation: none;
  opacity: calc(0.6 + 0.4 * var(--tmu-rx-energy, 0));
  box-shadow:
    0 0 calc(12px + 20px * var(--tmu-rx-bass, 0)) rgba(255, 80, 30, calc(0.3 + 0.4 * var(--tmu-rx-bass, 0))),
    0 0 calc(30px + 30px * var(--tmu-rx-beat, 0)) rgba(255, 60, 20, calc(0.1 + 0.3 * var(--tmu-rx-beat, 0)));
  transition: opacity 0.06s linear, box-shadow 0.06s linear;
}

/* ── Social icons pulse ── */
body.is-audio-playing .nova-social {
  border-color: rgba(255, 100, 50, calc(0.2 + 0.4 * var(--tmu-rx-mid, 0)));
  box-shadow: 0 0 calc(4px + 10px * var(--tmu-rx-beat, 0)) rgba(255, 80, 40, calc(0.1 + 0.2 * var(--tmu-rx-beat, 0)));
  transition: border-color 0.08s linear, box-shadow 0.06s linear;
}

/* ── War floor glow intensifies ── */
body.is-audio-playing.nova::after {
  animation: none;
  opacity: calc(0.4 + 0.6 * var(--tmu-rx-bass, 0));
  background: linear-gradient(
    0deg,
    rgba(255, 30, 10, calc(0.04 + 0.08 * var(--tmu-rx-bass, 0))) 0%,
    rgba(255, 60, 20, calc(0.02 + 0.04 * var(--tmu-rx-energy, 0))) 40%,
    transparent 100%
  );
  transition: opacity 0.06s linear;
}

/* ── Logo pulses on beat ── */
body.is-audio-playing .topPanel__logo img {
  animation: none;
  box-shadow:
    0 8px 20px rgba(6, 2, 4, 0.5),
    0 0 calc(12px + 20px * var(--tmu-rx-beat, 0)) rgba(255, 60, 20, calc(0.15 + 0.4 * var(--tmu-rx-beat, 0))),
    0 0 calc(5px + 30px * var(--tmu-rx-bass, 0)) rgba(255, 80, 40, calc(0.05 + 0.15 * var(--tmu-rx-bass, 0)));
  transform: scale(calc(1 + 0.03 * var(--tmu-rx-beat, 0)));
  transition: box-shadow 0.06s linear, transform 0.06s ease-out;
}

/* ── Title text fire intensifies ── */
body.is-audio-playing .nova-pageTitle h1,
body.is-audio-playing .nova-pageTitle h2 {
  animation-duration: calc(6s - 3s * var(--tmu-rx-energy, 0));
  filter: brightness(calc(1 + 0.3 * var(--tmu-rx-beat, 0)));
  transition: filter 0.06s linear;
}

/* ── Tab panels glow ── */
body.is-audio-playing .nav-pills .nav-link {
  border-color: rgba(255, 80, 40, calc(0.15 + 0.2 * var(--tmu-rx-mid, 0)));
  transition: border-color 0.08s linear;
}

/* ── War drumbeat body border flash ── */
body.is-audio-playing {
  border-left: 2px solid rgba(255, 60, 20, calc(0.0 + 0.15 * var(--tmu-rx-beat, 0)));
  border-right: 2px solid rgba(255, 60, 20, calc(0.0 + 0.15 * var(--tmu-rx-beat, 0)));
  transition: border-color 0.04s linear;
}

/* ── Mobile menu items glow ── */
body.is-audio-playing .topPanel__menu li a {
  text-shadow: 0 0 calc(2px + 8px * var(--tmu-rx-treble, 0)) rgba(255, 100, 50, calc(0.0 + 0.2 * var(--tmu-rx-treble, 0)));
  transition: text-shadow 0.1s linear;
}

/* ── Selection color fire ── */
::selection {
  background: rgba(255, 80, 40, 0.35);
  color: #fff;
}

/* ── Focus ring fire ── */
:focus-visible {
  outline: 2px solid rgba(255, 100, 50, 0.6);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   MUSIC-REACTIVE – LWE ELEMENTS (cmd-bar, hero, rankings, footer)
   ═══════════════════════════════════════════════════════════════ */

/* ── Command Bar border pulses with beat ── */
body.is-audio-playing .cmd-bar.is-scrolled::before {
  border-bottom-color: rgba(255, 107, 53, calc(0.12 + 0.25 * var(--tmu-rx-beat, 0)));
  box-shadow: 0 4px calc(30px + 20px * var(--tmu-rx-bass, 0)) rgba(0, 0, 0, calc(0.5 + 0.2 * var(--tmu-rx-bass, 0)));
  transition: border-bottom-color 0.06s linear, box-shadow 0.06s linear;
}

/* ── Hero logo pulses ── */
body.is-audio-playing .cmd-bar__logo {
  filter: drop-shadow(0 0 calc(8px + 14px * var(--tmu-rx-beat, 0)) rgba(255, 107, 53, calc(0.2 + 0.4 * var(--tmu-rx-beat, 0))));
  transform: scale(calc(1 + 0.02 * var(--tmu-rx-beat, 0)));
  transition: filter 0.06s linear, transform 0.06s ease-out;
}

/* ── Hero title flickers with energy ── */
body.is-audio-playing .tmu-hero__h1 {
  filter: brightness(calc(1 + 0.2 * var(--tmu-rx-beat, 0)));
  text-shadow: 0 0 calc(20px + 30px * var(--tmu-rx-beat, 0)) rgba(255, 77, 26, calc(0.1 + 0.3 * var(--tmu-rx-beat, 0)));
  transition: filter 0.06s linear, text-shadow 0.06s linear;
}

/* ── Announcement bar glows on beat ── */
body.is-audio-playing .tmu-announce {
  box-shadow: 0 0 calc(8px + 12px * var(--tmu-rx-beat, 0)) rgba(255, 87, 34, calc(0.05 + 0.1 * var(--tmu-rx-beat, 0)));
  transition: box-shadow 0.06s linear;
}

/* ── World bar stats pulse ── */
body.is-audio-playing .tmu-world-bar__val {
  text-shadow: 0 0 calc(4px + 10px * var(--tmu-rx-beat, 0)) rgba(0, 240, 255, calc(0.1 + 0.3 * var(--tmu-rx-beat, 0)));
  transition: text-shadow 0.08s linear;
}

/* ── Rankings tabs pulse ── */
body.is-audio-playing .tmu-lb__tab {
  border-color: rgba(255, 107, 53, calc(0.18 + 0.2 * var(--tmu-rx-mid, 0)));
  transition: border-color 0.08s linear;
}

/* ── Rankings table rows shimmer ── */
body.is-audio-playing .tmu-lb__content .dmn-rankings-table tbody tr:hover td {
  background: rgba(255, 77, 26, calc(0.06 + 0.08 * var(--tmu-rx-energy, 0)));
  box-shadow: inset 0 0 calc(8px + 12px * var(--tmu-rx-beat, 0)) rgba(255, 87, 34, calc(0.02 + 0.06 * var(--tmu-rx-beat, 0)));
}

/* ── Download cards breathe ── */
body.is-audio-playing .tmu-dl-card {
  border-color: rgba(255, 107, 53, calc(0.12 + 0.2 * var(--tmu-rx-mid, 0)));
  box-shadow: 0 0 calc(8px + 16px * var(--tmu-rx-energy, 0)) rgba(255, 87, 34, calc(0.05 + 0.08 * var(--tmu-rx-energy, 0)));
  transition: border-color 0.08s linear, box-shadow 0.08s linear;
}

/* ── LWE Footer fire line pulses ── */
body.is-audio-playing .lwe-footer {
  border-top-color: rgba(255, 107, 53, calc(0.08 + 0.15 * var(--tmu-rx-bass, 0)));
  transition: border-top-color 0.06s linear;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE & PERFORMANCE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .tmu-wz-smoke {
    display: none; /* hide heavy smoke on mobile */
  }
  .tmu-wz-fireline {
    top: 60px;
    height: 1px;
  }
  body.nova::after {
    height: 100px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   AI BOT v3 – TournamentMU WAR GUIDE – MASSIVE UPGRADE
   ai-agent.png avatar, hint system, glass morphism, fire effects
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════
   TOGGLE BUTTON – ai-agent.png (portrait 1024×1536)
   Shows full character art — NO borders, NO clipping
   ═══════════════════════════════ */
.tmu-aibot-toggle {
  position: fixed;
  bottom: 30px;
  left: 16px;
  z-index: 9999;
  width: 120px;
  height: 160px;
  border-radius: 0;
  background: none;
  border: none;
  box-shadow: none;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: transform .25s ease, filter .3s ease;
  animation: tmu-npc-float 4s ease-in-out infinite;
  padding: 0;
  overflow: visible;
  will-change: transform;
  contain: layout;
}

.tmu-aibot-toggle__avatar {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  filter: drop-shadow(0 2px 12px rgba(255, 87, 34, .45)) drop-shadow(0 0 30px rgba(255, 60, 20, .18));
  transition: transform .3s ease, filter .3s ease;
}

.tmu-aibot-toggle:hover {
  transform: scale(1.06) translateY(-4px);
  box-shadow: none;
}

.tmu-aibot-toggle:hover .tmu-aibot-toggle__avatar {
  filter: drop-shadow(0 2px 16px rgba(255, 87, 34, .6)) drop-shadow(0 0 40px rgba(255, 60, 20, .25)) brightness(1.08);
}

/* Pulsing ring effects – subtle ground glow */
.tmu-aibot-toggle__ring {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: radial-gradient(ellipse, rgba(255, 87, 34, .3), transparent 70%);
  animation: tmu-ring-glow 3s ease-in-out infinite;
  pointer-events: none;
}

.tmu-aibot-toggle__ring--2 {
  bottom: -8px;
  width: 100%;
  height: 16px;
  animation-delay: 1.5s;
  background: radial-gradient(ellipse, rgba(255, 60, 20, .15), transparent 70%);
}

@keyframes tmu-ring-glow {
  0%, 100% { opacity: .6; transform: translateX(-50%) scaleX(1); }
  50%      { opacity: .2; transform: translateX(-50%) scaleX(1.2); }
}

@keyframes tmu-toggle-pulse {
  0%, 100% { filter: drop-shadow(0 2px 12px rgba(255, 87, 34, .45)) drop-shadow(0 0 30px rgba(255, 60, 20, .18)); }
  50%      { filter: drop-shadow(0 2px 18px rgba(255, 87, 34, .6)) drop-shadow(0 0 45px rgba(255, 60, 20, .3)); }
}

/* NPC idle floating animation */
@keyframes tmu-npc-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.tmu-aibot-toggle:not(.is-open) {
  animation: tmu-npc-float 4s ease-in-out infinite;
}

/* NPC name tag */
.tmu-aibot-toggle__nametag {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: .65rem;
  font-weight: 700;
  color: var(--tmu-flame, #ff5722);
  text-shadow: 0 0 10px rgba(255, 87, 34, .6), 0 1px 3px rgba(0,0,0,.9);
  letter-spacing: .5px;
  text-transform: uppercase;
  pointer-events: none;
  opacity: .9;
  transition: opacity .3s ease;
  background: rgba(0, 0, 0, .5);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 87, 34, .25);
}
.tmu-aibot-toggle:hover .tmu-aibot-toggle__nametag { opacity: 1; }
.tmu-aibot-toggle.is-open .tmu-aibot-toggle__nametag { display: none; }

/* Close state */
.tmu-aibot-toggle svg { width: 26px; height: 26px; fill: #fff; filter: drop-shadow(0 0 4px rgba(255, 200, 100, .5)); }
.tmu-aibot-toggle .tmu-aibot-toggle__close { display: none; }
.tmu-aibot-toggle.is-open .tmu-aibot-toggle__avatar { display: none; }
.tmu-aibot-toggle.is-open .tmu-aibot-toggle__close { display: block; }
.tmu-aibot-toggle.is-open .tmu-aibot-toggle__ring { display: none; }
.tmu-aibot-toggle.is-open {
  animation: none;
  background: linear-gradient(135deg, rgba(58,32,32,.9), rgba(26,14,14,.95));
  border: 1px solid rgba(255, 87, 34, .3);
  border-radius: 50%;
  width: 56px; height: 56px;
  bottom: 30px;
}

/* Notification dot */
.tmu-aibot-toggle__dot {
  position: absolute;
  top: 6px; right: 0px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #ff4422;
  border: 2px solid rgba(8, 6, 10, .8);
  animation: tmu-fire-pulse 1.5s ease-in-out infinite;
  z-index: 2;
}
.tmu-aibot-toggle.is-open .tmu-aibot-toggle__dot { display: none; }

/* ═══════════════════════════════
   SPEECH BUBBLE – Pro tips from Aegis
   ═══════════════════════════════ */
.tmu-aibot-hint {
  position: fixed;
  bottom: 140px;
  left: 110px;
  z-index: 9998;
  max-width: 290px;
  width: max-content;
  padding: 14px 18px 14px 16px;
  background:
    linear-gradient(135deg,
      rgba(16, 8, 14, .96) 0%,
      rgba(30, 15, 10, .95) 100%);
  border: 1px solid rgba(255, 138, 0, .35);
  border-radius: 16px 16px 16px 4px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, .5),
    0 0 24px rgba(255, 87, 34, .12),
    inset 0 1px 0 rgba(255, 200, 100, .08);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  opacity: 0;
  transform: translateX(-10px) scale(.95);
  pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
}

/* Speech bubble tail pointing toward the character */
.tmu-aibot-hint::after {
  content: '';
  position: absolute;
  bottom: 16px;
  left: -10px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 10px solid rgba(16, 8, 14, .96);
  filter: drop-shadow(-2px 0 3px rgba(255, 138, 0, .15));
}
.tmu-aibot-hint::before {
  content: '';
  position: absolute;
  bottom: 15px;
  left: -12px;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-right: 12px solid rgba(255, 138, 0, .35);
}

.tmu-aibot-hint.is-visible {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

/* Glow accent */
.tmu-aibot-hint__glow {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, transparent, rgba(255, 138, 0, .6), rgba(255, 87, 34, .8), rgba(255, 138, 0, .6), transparent);
  animation: tmu-flame-border 3s linear infinite;
}

.tmu-aibot-hint__close {
  position: absolute;
  top: 6px; right: 8px;
  width: 20px; height: 20px;
  background: none;
  border: none;
  color: rgba(255, 200, 150, .3);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color .2s;
}
.tmu-aibot-hint__close:hover { color: var(--tmu-flame, #ff5722); }

.tmu-aibot-hint__icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 87, 34, .15), rgba(255, 138, 0, .08));
  border: 1px solid rgba(255, 87, 34, .2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.tmu-aibot-hint__body { flex: 1; min-width: 0; }

.tmu-aibot-hint__label {
  display: block;
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--tmu-inferno, #ff8a00);
  margin-bottom: 3px;
}

.tmu-aibot-hint__text {
  margin: 0;
  font-size: .78rem;
  line-height: 1.5;
  color: rgba(255, 220, 200, .8);
}

.tmu-aibot-hint__text strong {
  color: var(--tmu-flame, #ff5722);
  font-weight: 700;
}

.tmu-aibot-hint__text em {
  color: var(--tmu-inferno, #ff8a00);
  font-style: normal;
  font-weight: 600;
}

/* ═══════════════════════════════
   CHAT WINDOW – Glass morphism
   ═══════════════════════════════ */
.tmu-aibot-window {
  position: fixed;
  bottom: 200px;
  left: 16px;
  z-index: 9998;
  width: 420px;
  max-width: calc(100vw - 32px);
  height: 660px;
  max-height: calc(100vh - 120px);
  background:
    linear-gradient(170deg,
      rgba(16, 8, 14, .97) 0%,
      rgba(8, 6, 10, .98) 100%);
  border: 1px solid rgba(255, 87, 34, .3);
  border-radius: 20px;
  box-shadow:
    0 12px 50px rgba(0, 0, 0, .6),
    0 0 40px rgba(255, 87, 34, .12),
    inset 0 1px 0 rgba(255, 138, 0, .1);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(.95);
  pointer-events: none;
  transition: opacity .35s cubic-bezier(.4,0,.2,1), transform .35s cubic-bezier(.4,0,.2,1);
}
.tmu-aibot-window.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ═══════════════════════════════
   HEADER – with ai-agent.png
   ═══════════════════════════════ */
.tmu-aibot-header {
  flex-shrink: 0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background:
    linear-gradient(135deg,
      rgba(255, 87, 34, .1) 0%,
      rgba(255, 138, 0, .05) 50%,
      rgba(8, 6, 10, .95) 100%);
  border-bottom: 1px solid rgba(255, 87, 34, .15);
  position: relative;
}

.tmu-aibot-header__fire {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tmu-flame, #ff5722), var(--tmu-inferno, #ff8a00), var(--tmu-flame, #ff5722), transparent);
  animation: tmu-flame-border 3s linear infinite;
  z-index: 1;
}

.tmu-aibot-avatar {
  width: 44px; height: 44px;
  border-radius: 6px;
  border: none;
  box-shadow: 0 0 10px rgba(255, 87, 34, .2);
  background: none;
  overflow: hidden;
  flex-shrink: 0;
}
.tmu-aibot-avatar img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 0;
  display: block;
  filter: drop-shadow(0 0 4px rgba(255, 87, 34, .3));
}

.tmu-aibot-header__info { flex: 1; min-width: 0; }

.tmu-aibot-header__name {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--tmu-flame, #ff5722);
  text-shadow: 0 0 10px rgba(255, 87, 34, .3);
  line-height: 1.2;
}

.tmu-aibot-header__subtitle {
  font-size: .65rem;
  color: rgba(255, 200, 150, .35);
  text-transform: uppercase;
  letter-spacing: .5px;
  line-height: 1.3;
}

.tmu-aibot-header__status {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}
.tmu-aibot-header__status::before { display: none; }

.tmu-aibot-header__status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, .5);
  flex-shrink: 0;
  animation: tmu-status-pulse 2s ease-in-out infinite;
}

#tmu-aibot-status-text {
  font-size: .7rem;
  color: rgba(255, 200, 150, .5);
  transition: opacity .25s ease;
}

@keyframes tmu-status-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(34, 197, 94, .5); }
  50%      { opacity: .5; box-shadow: 0 0 3px rgba(34, 197, 94, .3); }
}

/* Header action buttons */
.tmu-aibot-header__actions {
  display: flex; gap: 6px; flex-shrink: 0;
}

.tmu-aibot-header__btn {
  width: 30px; height: 30px;
  border: 1px solid rgba(255, 87, 34, .15);
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  color: rgba(255, 200, 150, .4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  padding: 0;
}
.tmu-aibot-header__btn:hover {
  border-color: rgba(255, 87, 34, .4);
  background: rgba(255, 87, 34, .08);
  color: var(--tmu-flame, #ff5722);
}

/* ═══════════════════════════════
   MESSAGES AREA
   ═══════════════════════════════ */
.tmu-aibot-messages {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 87, 34, .25) transparent;
}
.tmu-aibot-messages::-webkit-scrollbar { width: 5px; }
.tmu-aibot-messages::-webkit-scrollbar-track { background: transparent; }
.tmu-aibot-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 87, 34, .25);
  border-radius: 3px;
}

/* ═══════════════════════════════
   WELCOME SCREEN
   ═══════════════════════════════ */
.tmu-aibot-welcome {
  text-align: center;
  padding: 24px 16px 16px;
}

.tmu-aibot-welcome__avatar {
  position: relative;
  width: 100px; height: 130px;
  margin: 0 auto 14px;
}

.tmu-aibot-welcome__avatar img {
  width: 100%; height: 100%;
  border-radius: 0;
  object-fit: contain;
  object-position: bottom center;
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 2px 12px rgba(255, 87, 34, .4)) drop-shadow(0 0 25px rgba(255, 60, 20, .15));
  animation: tmu-welcome-avatar-glow 3s ease-in-out infinite;
}

@keyframes tmu-welcome-avatar-glow {
  0%, 100% { filter: drop-shadow(0 2px 12px rgba(255, 87, 34, .4)) drop-shadow(0 0 25px rgba(255, 60, 20, .15)); }
  50%      { filter: drop-shadow(0 2px 18px rgba(255, 87, 34, .55)) drop-shadow(0 0 40px rgba(255, 60, 20, .25)); }
}

.tmu-aibot-welcome__badge {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tmu-ember, #ff4422), var(--tmu-flame, #ff5722));
  border: 2px solid rgba(8, 6, 10, .9);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tmu-aibot-welcome__title {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tmu-flame, #ff5722);
  text-shadow: 0 0 12px rgba(255, 87, 34, .3);
  margin-bottom: 2px;
}

.tmu-aibot-welcome__subtitle {
  font-size: .68rem;
  color: rgba(255, 200, 150, .35);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.tmu-aibot-welcome__text {
  font-size: .8rem;
  line-height: 1.55;
  color: rgba(255, 200, 150, .55);
  margin: 0 0 16px;
}

.tmu-aibot-welcome__text strong {
  color: var(--tmu-flame, #ff5722);
}

/* Stats row */
.tmu-aibot-welcome__stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 12px 0 4px;
  border-top: 1px solid rgba(255, 87, 34, .1);
}

.tmu-aibot-welcome__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tmu-aibot-welcome__stat-val {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--tmu-inferno, #ff8a00);
  text-shadow: 0 0 8px rgba(255, 138, 0, .2);
}

.tmu-aibot-welcome__stat-lbl {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: rgba(255, 200, 150, .35);
}

/* Uptime stat: special accent */
.tmu-aibot-welcome__stat--uptime .tmu-aibot-welcome__stat-val {
  color: #4fc3f7;
  text-shadow: 0 0 8px rgba(79, 195, 247, .25);
}
.tmu-aibot-welcome__stat--uptime .tmu-aibot-welcome__stat-lbl {
  color: rgba(79, 195, 247, .4);
}

/* ═══════════════════════════════
   QUICK-ACTION CHIPS
   ═══════════════════════════════ */
.tmu-aibot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 14px;
  justify-content: center;
  max-height: 200px;
  overflow-y: auto;
}

.tmu-aibot-chip {
  padding: 6px 13px;
  font-size: .72rem;
  border: 1px solid rgba(255, 87, 34, .22);
  border-radius: 18px;
  background: rgba(255, 87, 34, .05);
  color: rgba(255, 200, 150, .65);
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}

.tmu-aibot-chip:hover {
  background: rgba(255, 87, 34, .14);
  border-color: rgba(255, 87, 34, .45);
  color: var(--tmu-flame, #ff5722);
  box-shadow: 0 0 12px rgba(255, 87, 34, .1);
  transform: translateY(-1px);
}

.tmu-aibot-chip__icon { margin-right: 4px; }

/* ═══════════════════════════════
   MESSAGE BUBBLES
   ═══════════════════════════════ */
.tmu-aibot-msg {
  max-width: 88%;
  animation: tmu-msg-appear .35s ease forwards;
  word-break: break-word;
}

@keyframes tmu-msg-appear {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Bot message (left, with avatar) */
.tmu-aibot-msg--bot {
  align-self: flex-start;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.tmu-aibot-msg__avatar {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 6px;
  overflow: hidden;
  border: none;
  background: none;
  margin-top: 2px;
}
.tmu-aibot-msg__avatar img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 3px rgba(255, 87, 34, .25));
}

.tmu-aibot-msg__col {
  flex: 1;
  min-width: 0;
}

.tmu-aibot-msg__bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: .88rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Bot bubble */
.tmu-aibot-msg--bot .tmu-aibot-msg__bubble {
  background: linear-gradient(135deg, rgba(255, 87, 34, .07) 0%, rgba(74, 53, 53, .25) 100%);
  border: 1px solid rgba(255, 87, 34, .12);
  border-top-left-radius: 4px;
  color: rgba(255, 240, 230, .92);
}

.tmu-aibot-msg__bubble strong,
.tmu-aibot-msg__bubble b { color: var(--tmu-flame, #ff5722); }

.tmu-aibot-msg__bubble code {
  background: rgba(255, 87, 34, .1);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: .8rem;
  color: var(--tmu-inferno, #ff8a00);
}

.tmu-aibot-msg__bubble ul,
.tmu-aibot-msg__bubble ol { margin: 6px 0; padding-left: 18px; }
.tmu-aibot-msg__bubble li { margin-bottom: 3px; }
.tmu-aibot-msg__bubble p { margin: 0 0 6px 0; }
.tmu-aibot-msg__bubble p:last-child { margin-bottom: 0; }

.tmu-aibot-h {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: .88rem;
  color: var(--tmu-inferno, #ff8a00);
  margin: 8px 0 4px;
  text-shadow: 0 0 8px rgba(255, 87, 34, .2);
}

.tmu-aibot-h5 {
  font-size: .82rem;
  color: rgba(255, 200, 150, .95);
}

.tmu-aibot-hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 87, 34, .3), transparent);
  margin: 8px 0;
}

.tmu-aibot-quote {
  border-left: 3px solid var(--tmu-flame, #ff5722);
  padding: 4px 10px;
  margin: 6px 0;
  background: rgba(255, 87, 34, .06);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: rgba(255, 220, 200, .85);
}

.tmu-aibot-olist {
  margin: 6px 0;
  padding-left: 22px;
  counter-reset: none;
}

.tmu-aibot-olist li {
  margin-bottom: 3px;
}

.tmu-aibot-msg__bubble em {
  color: rgba(255, 200, 150, .95);
  font-style: italic;
}

/* User message (right) */
.tmu-aibot-msg--user {
  align-self: flex-end;
}

.tmu-aibot-msg--user .tmu-aibot-msg__bubble {
  background: linear-gradient(135deg, var(--tmu-ember, #ff4422), var(--tmu-flame, #ff5722));
  border: none;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

/* Timestamp */
.tmu-aibot-msg__time {
  display: block;
  font-size: .6rem;
  color: rgba(255, 200, 150, .25);
  margin-top: 3px;
  padding: 0 4px;
}
.tmu-aibot-msg--user .tmu-aibot-msg__time { text-align: right; }

/* Error message */
.tmu-aibot-msg--error {
  align-self: center;
  background: rgba(220, 38, 38, .1);
  border: 1px solid rgba(220, 38, 38, .25);
  color: #fca5a5;
  text-align: center;
  max-width: 90%;
  font-size: .8rem;
  padding: 10px 16px;
  border-radius: 12px;
}

/* Info message */
.tmu-aibot-msg--info {
  align-self: center;
  background: rgba(255, 138, 0, .06);
  border: 1px solid rgba(255, 138, 0, .18);
  color: rgba(255, 200, 150, .65);
  text-align: center;
  max-width: 90%;
  font-size: .78rem;
  padding: 8px 14px;
  border-radius: 12px;
}

/* ═══════════════════════════════
   TYPING INDICATOR
   ═══════════════════════════════ */
.tmu-aibot-typing {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
}
.tmu-aibot-typing.is-visible { display: flex; }

.tmu-aibot-typing__avatar {
  width: 30px; height: 30px;
  border-radius: 6px;
  overflow: hidden;
  border: none;
  background: none;
  flex-shrink: 0;
}
.tmu-aibot-typing__avatar img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 3px rgba(255, 87, 34, .25));
}

.tmu-aibot-typing__bubble {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255, 87, 34, .05);
  border: 1px solid rgba(255, 87, 34, .1);
  border-radius: 16px;
  border-top-left-radius: 4px;
}

.tmu-aibot-typing__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--tmu-flame, #ff5722);
  opacity: .4;
  animation: tmu-typing-bounce .8s ease-in-out infinite;
}
.tmu-aibot-typing__dot:nth-child(2) { animation-delay: .15s; }
.tmu-aibot-typing__dot:nth-child(3) { animation-delay: .3s; }

@keyframes tmu-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30%           { transform: translateY(-5px); opacity: 1; }
}

.tmu-aibot-typing__text {
  font-size: .68rem;
  color: rgba(255, 200, 150, .3);
  font-style: italic;
}

/* ═══════════════════════════════
   INPUT AREA
   ═══════════════════════════════ */
.tmu-aibot-input {
  flex-shrink: 0;
  padding: 10px 14px 8px;
  border-top: 1px solid rgba(255, 87, 34, .12);
  background: rgba(8, 6, 10, .6);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tmu-aibot-input__wrapper {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  min-width: 0;
}

.tmu-aibot-input__field {
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
  max-height: 80px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 87, 34, .18);
  border-radius: 20px;
  color: rgba(255, 240, 230, .9);
  font-size: .84rem;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  line-height: 1.4;
  overflow-y: auto;
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
}
.tmu-aibot-input__field::placeholder { color: rgba(255, 200, 150, .3); }
.tmu-aibot-input__field:focus {
  border-color: rgba(255, 87, 34, .42);
  box-shadow: 0 0 14px rgba(255, 87, 34, .1);
}
.tmu-aibot-input__field:disabled {
  opacity: .45;
  cursor: not-allowed;
  background: rgba(255, 255, 255, .015);
}

.tmu-aibot-input__send {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tmu-ember, #ff4422), var(--tmu-flame, #ff5722));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.tmu-aibot-input__send svg { width: 18px; height: 18px; fill: currentColor; }
.tmu-aibot-input__send:hover {
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(255, 87, 34, .4);
}
.tmu-aibot-input__send:disabled {
  opacity: .35;
  cursor: not-allowed;
  transform: none;
}

/* Meta row (hint + counter) */
.tmu-aibot-input__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 4px 0;
}

.tmu-aibot-input__hint {
  font-size: .62rem;
  color: rgba(255, 200, 150, .2);
}
.tmu-aibot-input__hint kbd {
  padding: 1px 4px;
  border: 1px solid rgba(255, 87, 34, .12);
  border-radius: 3px;
  font-family: inherit;
  font-size: .6rem;
  background: rgba(255, 255, 255, .025);
}

.tmu-aibot-input__counter {
  font-size: .6rem;
  color: rgba(255, 200, 150, .2);
  transition: color .2s ease;
}
.tmu-aibot-input__counter.is-warn { color: rgba(255, 180, 100, .5); }
.tmu-aibot-input__counter.is-max { color: rgba(220, 38, 38, .7); }

/* ═══════════════════════════════
   GUEST LOCK OVERLAY
   ═══════════════════════════════ */
.tmu-aibot-guest-lock {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  background:
    linear-gradient(170deg,
      rgba(8, 4, 6, .97) 0%,
      rgba(16, 8, 12, .98) 50%,
      rgba(8, 4, 6, .99) 100%);
  backdrop-filter: blur(8px);
  border-radius: inherit;
}

.tmu-aibot-guest-lock__icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 12px rgba(255, 87, 34, .4));
  animation: tmu-fire-pulse 2.5s ease-in-out infinite;
}

.tmu-aibot-guest-lock__title {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--tmu-flame, #ff5722);
  text-shadow: 0 0 14px rgba(255, 87, 34, .4);
  margin-bottom: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tmu-aibot-guest-lock__text {
  font-size: .85rem;
  line-height: 1.7;
  color: rgba(255, 200, 150, .6);
  max-width: 280px;
  margin: 0 0 20px;
}

.tmu-aibot-guest-lock__text strong {
  color: var(--tmu-inferno, #ff8a00);
  font-weight: 700;
}

.tmu-aibot-guest-lock__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--tmu-ember, #ff4422), var(--tmu-flame, #ff5722));
  color: #fff;
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .5px;
  box-shadow:
    0 0 20px rgba(255, 87, 34, .35),
    inset 0 1px 0 rgba(255, 200, 100, .2);
  transition: transform .2s ease, box-shadow .2s ease;
}

.tmu-aibot-guest-lock__btn:hover {
  transform: scale(1.04);
  box-shadow:
    0 0 28px rgba(255, 87, 34, .5),
    inset 0 1px 0 rgba(255, 200, 100, .25);
  color: #fff;
  text-decoration: none;
}

.tmu-aibot-guest-lock__hint {
  margin-top: 14px;
  font-size: .72rem;
  color: rgba(255, 200, 150, .35);
}

.tmu-aibot-guest-lock__hint a {
  color: var(--tmu-flame, #ff5722);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  transition: color .2s ease;
}
.tmu-aibot-guest-lock__hint a:hover { color: var(--tmu-inferno, #ff8a00); }

/* ═══════════════════════════════════════════════════════════════
   AUDIO-REACTIVE – AI BOT
   ═══════════════════════════════════════════════════════════════ */
body.is-audio-playing .tmu-aibot-toggle {
  filter:
    drop-shadow(0 2px calc(12px + 16px * var(--tmu-rx-beat, 0)) rgba(255, 87, 34, calc(.45 + .3 * var(--tmu-rx-beat, 0))))
    drop-shadow(0 0 calc(30px + 25px * var(--tmu-rx-bass, 0)) rgba(255, 60, 20, calc(.18 + .2 * var(--tmu-rx-bass, 0))));
  transition: filter .06s linear;
}

body.is-audio-playing .tmu-aibot-window {
  box-shadow:
    0 12px 50px rgba(0, 0, 0, .6),
    0 0 calc(40px + 20px * var(--tmu-rx-energy, 0)) rgba(255, 87, 34, calc(.12 + .1 * var(--tmu-rx-energy, 0)));
  transition: box-shadow .1s linear;
}

body.is-audio-playing .tmu-aibot-hint {
  box-shadow:
    0 8px 32px rgba(0, 0, 0, .5),
    0 0 calc(24px + 16px * var(--tmu-rx-energy, 0)) rgba(255, 87, 34, calc(.12 + .08 * var(--tmu-rx-energy, 0)));
  transition: box-shadow .1s linear;
}

/* ═══════════════════════════════════════════════════════════════
   FEEDBACK PAGE – Guest Notice
   ═══════════════════════════════════════════════════════════════ */

.tmu-feedback__guest-notice {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 24px;
  margin: 0 auto 24px;
  max-width: 800px;
  border: 1px solid rgba(255, 138, 0, 0.3);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 87, 34, 0.06) 0%, rgba(255, 138, 0, 0.03) 100%);
  backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
}

.tmu-feedback__guest-notice::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 138, 0, 0.5), rgba(255, 87, 34, 0.7), rgba(255, 138, 0, 0.5), transparent);
}

.tmu-feedback__guest-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.15), rgba(74, 53, 53, 0.4));
  border: 1px solid rgba(255, 87, 34, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--tmu-flame, #ff5722);
}

.tmu-feedback__guest-title {
  font-family: var(--tmu-font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--tmu-inferno, #ff8a00);
  margin: 0 0 6px;
}

.tmu-feedback__guest-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--tmu-muted, #b8a09a);
  margin: 0;
}

.tmu-feedback__guest-link {
  color: var(--tmu-flame, #ff5722);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  transition: color 0.2s ease;
}
.tmu-feedback__guest-link:hover { color: var(--tmu-inferno, #ff8a00); }

.tmu-feedback__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE – AI BOT
   ═══════════════════════════════════════════════════════════════ */

/* ─── TABLET (768px) ─── */
@media (max-width: 768px) {
  .tmu-aibot-window {
    left: 12px;
    bottom: 180px;
    width: 360px;
    max-width: calc(100vw - 24px);
    height: 580px;
    max-height: calc(100vh - 200px);
    border-radius: 16px;
  }
  .tmu-aibot-toggle {
    bottom: 24px;
    left: 12px;
    width: 100px;
    height: 135px;
  }
  .tmu-aibot-toggle.is-open {
    width: 48px;
    height: 48px;
    bottom: 24px;
  }
  .tmu-aibot-hint {
    left: 96px;
    bottom: 120px;
    max-width: calc(100vw - 110px);
  }
  .tmu-aibot-hint::after {
    bottom: 14px;
    left: -10px;
  }
  .tmu-aibot-hint::before {
    bottom: 13px;
    left: -12px;
  }
  .tmu-aibot-welcome__avatar {
    width: 80px;
    height: 110px;
  }
  .tmu-aibot-welcome__avatar img {
    width: 80px;
    height: 110px;
  }
  .tmu-aibot-welcome__stats { gap: 14px; }
  .tmu-aibot-welcome__stat-val { font-size: 1rem; }
  .tmu-aibot-welcome__stat-lbl { font-size: .58rem; }
  .tmu-aibot-chip { font-size: .7rem; padding: 6px 11px; }
}

/* ─── PHONE (480px) ─── */
@media (max-width: 480px) {
  /* Full-screen chat on phone */
  .tmu-aibot-window {
    left: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
    z-index: 10001;
  }

  /* Toggle: smaller on phone, bottom-left corner */
  .tmu-aibot-toggle {
    bottom: 16px;
    left: 8px;
    width: 75px;
    height: 100px;
  }
  .tmu-aibot-toggle.is-open {
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
  }
  .tmu-aibot-toggle__ring,
  .tmu-aibot-toggle__ring--2 { display: none; }
  .tmu-aibot-toggle__dot { width: 10px; height: 10px; }

  /* Nametag: smaller on phone */
  .tmu-aibot-nametag { font-size: .55rem; padding: 2px 6px; bottom: calc(100% + 2px); }

  /* Speech bubble: from character on phone */
  .tmu-aibot-hint {
    left: 72px;
    right: auto;
    bottom: 80px;
    max-width: calc(100vw - 84px);
  }
  .tmu-aibot-hint::after {
    bottom: 12px;
    left: -10px;
  }
  .tmu-aibot-hint::before {
    bottom: 11px;
    left: -12px;
  }
  .tmu-aibot-hint__text { font-size: .72rem; }
  .tmu-aibot-hint__label { font-size: .55rem; }

  /* Header: more compact */
  .tmu-aibot-header {
    padding: 12px 14px;
    gap: 10px;
    /* Safe area for notch phones */
    padding-top: max(12px, env(safe-area-inset-top, 12px));
  }
  .tmu-aibot-avatar { width: 36px; height: 36px; }
  .tmu-aibot-header__name { font-size: .82rem; }
  .tmu-aibot-header__status { font-size: .6rem; }
  .tmu-aibot-header__actions button { width: 28px; height: 28px; }
  .tmu-aibot-header__actions svg { width: 13px; height: 13px; }

  /* Welcome section: tighter */
  .tmu-aibot-welcome { padding: 20px 14px 10px; }
  .tmu-aibot-welcome__avatar { width: 70px; height: 95px; }
  .tmu-aibot-welcome__avatar img { width: 70px; height: 95px; }
  .tmu-aibot-welcome__title { font-size: 1rem; }
  .tmu-aibot-welcome__subtitle { font-size: .62rem; }
  .tmu-aibot-welcome__text { font-size: .72rem; padding: 0 6px; }
  .tmu-aibot-welcome__stats {
    gap: 10px;
    padding: 10px 0 4px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .tmu-aibot-welcome__stat-val { font-size: .9rem; }
  .tmu-aibot-welcome__stat-lbl { font-size: .52rem; }

  /* Chips: bigger touch targets on mobile */
  .tmu-aibot-chips {
    padding: 0 12px 12px;
    gap: 7px;
    max-height: 140px;
  }
  .tmu-aibot-chip {
    font-size: .7rem;
    padding: 8px 13px;
    min-height: 34px;
    display: flex;
    align-items: center;
  }

  /* Messages area: fill available space */
  .tmu-aibot-messages {
    flex: 1;
    min-height: 0;
    padding: 10px 12px;
  }
  .tmu-aibot-msg { max-width: 92%; font-size: .82rem; }
  .tmu-aibot-msg--bot { padding: 10px 14px; }
  .tmu-aibot-msg--user { padding: 10px 14px; }

  /* Input area: safe area bottom for iPhones */
  .tmu-aibot-input-wrap {
    padding: 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
  }
  .tmu-aibot-input {
    font-size: 16px !important;  /* Prevents iOS zoom on focus */
    padding: 10px 14px;
    min-height: 42px;
  }
  .tmu-aibot-send {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  /* Character counter */
  .tmu-aibot-counter { font-size: .55rem; }

  /* Guest overlay */
  .tmu-aibot-guest { padding: 30px 18px; }
  .tmu-aibot-guest__title { font-size: 1rem; }
  .tmu-aibot-guest__text { font-size: .75rem; }

  /* Typing indicator */
  .tmu-aibot-typing { padding: 10px 12px; }
}

/* ─── VERY SMALL PHONE (360px) ─── */
@media (max-width: 360px) {
  .tmu-aibot-toggle {
    bottom: 12px;
    left: 6px;
    width: 60px;
    height: 80px;
  }
  .tmu-aibot-hint {
    left: 56px;
    right: auto;
    bottom: 64px;
    max-width: calc(100vw - 68px);
  }
  .tmu-aibot-hint::after {
    bottom: 10px;
    left: -10px;
  }
  .tmu-aibot-hint::before {
    bottom: 9px;
    left: -12px;
  }
  .tmu-aibot-welcome__avatar { width: 60px; height: 80px; }
  .tmu-aibot-welcome__avatar img { width: 60px; height: 80px; }
  .tmu-aibot-welcome__stats { gap: 8px; }
  .tmu-aibot-welcome__stat-val { font-size: .8rem; }
  .tmu-aibot-chip { font-size: .65rem; padding: 6px 10px; min-height: 30px; }
}

/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION (global catch-all)
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .tmu-warzone,
  .tmu-wz-flash,
  .tmu-wz-fireline { display: none !important; }

  .nova-contentBlock::before,
  .pageContent::before,
  .mu-footer::after,
  body.nova::after { animation: none !important; }

  .topPanel__logo img { animation: none !important; }

  .nova-pageTitle h1,
  .nova-pageTitle h2 {
    animation: none !important;
    -webkit-text-fill-color: var(--tmu-text);
  }

  .tmu-aibot-toggle,
  .tmu-aibot-toggle__ring,
  .tmu-aibot-header__status-dot,
  .tmu-aibot-welcome__avatar img { animation: none !important; }

  .tmu-aibot-toggle:not(.is-open) { animation: none !important; }

  .tmu-aibot-window { transition: opacity .15s ease; transform: none !important; }
  .tmu-aibot-hint { transition: opacity .15s ease; transform: none !important; }
  .tmu-aibot-msg { animation: none !important; }
  .tmu-aibot-typing__dot { animation: none !important; opacity: .7; }
}

