/* ============================================================================
   THE EMBER MYSTIC — Left-Side Hearthside Parlor & Embers Treasury
   ============================================================================ */

@keyframes emMistRise {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.96);
    filter: blur(6px);
  }
  65% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes emHaloPulse {
  0%, 100% {
    box-shadow:
      0 22px 54px rgba(0, 0, 0, 0.72),
      0 0 26px rgba(232, 168, 73, 0.12),
      inset 0 1px 0 rgba(244, 219, 168, 0.16);
  }
  50% {
    box-shadow:
      0 24px 60px rgba(0, 0, 0, 0.78),
      0 0 38px rgba(232, 168, 73, 0.24),
      inset 0 1px 0 rgba(244, 219, 168, 0.26);
  }
}

@keyframes emSparkDrift {
  0% { transform: translateY(6px) scale(0.7); opacity: 0; }
  35% { opacity: 0.85; }
  100% { transform: translateY(-22px) scale(1.1); opacity: 0; }
}

@keyframes emDotPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* Floating launcher pill (desktop minimized / tablet) & sleek bottom bar (mobile) */
.em-launcher {
  position: fixed;
  left: 20px;
  bottom: 22px;
  z-index: 940;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.62rem;
  padding: 0.72rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 106, 0.52);
  background: linear-gradient(135deg, rgba(24, 19, 17, 0.95), rgba(12, 13, 20, 0.97));
  backdrop-filter: blur(16px);
  color: #f4dfb2;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.72), 0 0 24px rgba(232, 168, 73, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.em-launcher.is-visible {
  display: inline-flex;
  animation: emMistRise 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.em-launcher:hover {
  transform: translateY(-2px);
  border-color: #e8a849;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.78), 0 0 28px rgba(232, 168, 73, 0.34);
}

.em-launcher-orb {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe4a3 0%, #e8a849 55%, rgba(232, 168, 73, 0.1) 100%);
  box-shadow: 0 0 12px #e8a849;
  flex-shrink: 0;
}

.em-launcher-sub {
  display: none;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: #cbbba0;
  text-transform: none;
}

.em-launcher-chevron {
  display: none;
  margin-left: auto;
  color: #e8a849;
  font-size: 0.9rem;
}

/* Mobile backdrop when bottom sheet is open */
.em-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 945;
  background: rgba(5, 6, 10, 0.62);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.em-mobile-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.em-sheet-grabber {
  display: none;
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: rgba(212, 175, 106, 0.42);
  margin: 0 auto 0.55rem;
}

/* Main Left-Side Parlor Panel */
.em-parlor,
.em-parlor * {
  box-sizing: border-box;
}

.em-parlor {
  position: fixed;
  left: 16px;
  top: 84px;
  width: clamp(300px, calc((100vw - 1120px) / 2 - 26px), 440px);
  max-width: calc(100vw - 32px);
  height: calc(100vh - 104px);
  max-height: 780px;
  z-index: 950;
  display: none;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 106, 0.36);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(232, 168, 73, 0.13) 0%, rgba(16, 15, 22, 0.94) 44%),
    linear-gradient(180deg, rgba(14, 14, 20, 0.96) 0%, rgba(9, 10, 15, 0.98) 100%);
  backdrop-filter: blur(18px);
  overflow: hidden;
  color: #e6dfd1;
}

.em-parlor.is-open {
  display: flex;
  animation: emMistRise 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards, emHaloPulse 5.5s ease-in-out 0.9s infinite;
}

.em-parlor.is-dragging {
  animation: none !important;
  transition: none !important;
  user-select: none;
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.86), 0 0 36px rgba(232, 168, 73, 0.28);
}

@media (min-width: 769px) {
  .em-head {
    cursor: grab;
    user-select: none;
  }
  .em-parlor.is-dragging .em-head {
    cursor: grabbing;
  }
}

/* On narrower desktop / tablets (769px - 1439px), clean slide-over parlor */
@media (max-width: 1439px) and (min-width: 769px) {
  .em-parlor {
    left: 16px;
    top: 76px;
    width: min(410px, calc(100vw - 32px));
    height: calc(100vh - 96px);
    max-height: 740px;
  }
}

/* On phones (<= 768px): sleek docked bottom peek bar + auto-fitting native bottom sheet */
@media (max-width: 768px) {
  .em-launcher {
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    max-width: calc(100vw - 20px);
    box-sizing: border-box;
    border-radius: 14px;
    padding: 0.78rem 0.95rem;
    justify-content: flex-start;
  }

  body.ae-has-floating-share .em-launcher {
    right: 68px;
    max-width: calc(100vw - 78px);
    padding: 0.72rem 0.85rem;
  }

  body.ae-has-floating-share .em-launcher-sub {
    display: none;
  }

  .em-launcher-sub,
  .em-launcher-chevron {
    display: inline-block;
  }

  .em-sheet-grabber {
    display: block;
  }

  .em-parlor {
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: min(84dvh, 680px);
    max-height: 86dvh;
    border-radius: 18px 18px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .em-head {
    padding: 0.78rem 0.9rem 0.7rem;
  }

  .em-feed {
    padding: 0.8rem 0.85rem;
  }

  .em-msg.is-mystic {
    max-width: 96%;
    font-size: 1rem;
  }

  .em-composer {
    padding: 0.62rem 0.75rem 0.75rem;
  }
}

/* Header */
.em-head {
  position: relative;
  padding: 1rem 1.05rem 0.85rem;
  border-bottom: 1px solid rgba(212, 175, 106, 0.2);
  background: linear-gradient(180deg, rgba(232, 168, 73, 0.08) 0%, transparent 100%);
  flex-shrink: 0;
}

.em-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.em-spark {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #f5d284;
  box-shadow: 0 0 8px #e8a849;
  animation: emSparkDrift 3.6s ease-in-out infinite;
}

.em-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.em-eyebrow {
  display: block;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #e8a849;
  margin-bottom: 0.18rem;
}

.em-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.em-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6ee7a8;
  box-shadow: 0 0 10px rgba(110, 231, 168, 0.85);
  flex-shrink: 0;
  animation: emDotPulse 2.4s ease-in-out infinite;
}

.em-live-status {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #a9e6c4;
  margin-top: 0.22rem;
}

.em-title {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.42rem;
  font-weight: 600;
  color: #f6e2b6;
  line-height: 1.12;
}

.em-head-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.em-icon-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 106, 0.24);
  color: #cfc5b3;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.em-icon-btn:hover {
  border-color: #e8a849;
  color: #fff2d1;
  background: rgba(232, 168, 73, 0.12);
}

/* Status + Wallet Bar */
.em-status-bar {
  margin-top: 0.68rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.em-quota-pill {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: #d6cbb8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 106, 0.22);
  border-radius: 999px;
  padding: 0.22rem 0.62rem;
}

.em-quota-pill.is-keeper {
  color: #ffe3a3;
  border-color: rgba(232, 168, 73, 0.55);
  background: rgba(232, 168, 73, 0.14);
}

.em-wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f4d694;
  background: rgba(232, 168, 73, 0.12);
  border: 1px solid rgba(232, 168, 73, 0.42);
  border-radius: 999px;
  padding: 0.24rem 0.68rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.em-wallet-btn:hover {
  background: rgba(232, 168, 73, 0.22);
  border-color: #f3c46b;
}

/* Scrollable Conversation Feed */
.em-feed {
  flex: 1;
  overflow-y: auto;
  padding: 0.95rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 106, 0.35) transparent;
}

.em-msg {
  padding: 0.82rem 0.96rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.04rem;
  line-height: 1.56;
  animation: emMistRise 0.38s ease forwards;
}

.em-msg.is-mystic {
  align-self: flex-start;
  max-width: 94%;
  border-radius: 4px 14px 14px 14px;
  background: linear-gradient(145deg, rgba(232, 168, 73, 0.12), rgba(40, 26, 20, 0.52));
  border: 1px solid rgba(212, 175, 106, 0.3);
  color: #efe7d8;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.em-msg.is-guest {
  align-self: flex-end;
  max-width: 86%;
  border-radius: 14px 4px 14px 14px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff8eb;
}

.em-msg.is-system {
  align-self: center;
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  padding: 0.65rem 0.88rem;
  background: linear-gradient(135deg, rgba(110, 231, 168, 0.09), rgba(20, 44, 38, 0.36));
  border: 1px solid rgba(110, 231, 168, 0.34);
  color: #c8f3dc;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.76rem;
  line-height: 1.5;
  text-align: center;
}

.em-msg.is-system .em-msg-label {
  color: #7ae8ac;
  margin-bottom: 0.22rem;
}

.em-msg-label {
  display: block;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d4af6a;
  margin-bottom: 0.32rem;
}

.em-msg.is-guest .em-msg-label {
  color: #a99f8d;
}

.em-msg p {
  margin: 0 0 0.65rem 0;
}

.em-msg p:last-child {
  margin-bottom: 0;
}

.em-cursor {
  display: inline-block;
  width: 6px;
  height: 1.02em;
  margin-left: 3px;
  vertical-align: -2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffe5a3, #e8a849);
  box-shadow: 0 0 8px rgba(232, 168, 73, 0.8);
  animation: emDotPulse 0.8s ease-in-out infinite;
}

/* Tailored Starter Prompt Chips */
.em-starters {
  display: flex;
  flex-direction: column;
  gap: 0.44rem;
  margin-top: 0.25rem;
}

.em-starters-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.61rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #a89c86;
}

.em-starter-chip {
  text-align: left;
  background: rgba(18, 19, 27, 0.85);
  border: 1px solid rgba(212, 175, 106, 0.26);
  border-radius: 8px;
  padding: 0.52rem 0.72rem;
  color: #e6d7b6;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.98rem;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.18s ease;
}

.em-starter-chip:hover {
  border-color: #e8a849;
  background: rgba(232, 168, 73, 0.12);
  transform: translateX(2px);
}

/* Typing / Thinking Indicator */
.em-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  color: #d4af6a;
  padding: 0.45rem 0.65rem;
}

.em-typing-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e8a849;
  animation: emDotPulse 1.2s ease-in-out infinite;
}

.em-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.em-typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* 2-Tier Unlock Gate inside Parlor */
.em-gate {
  margin-top: 0.35rem;
  padding: 0.92rem 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(232, 168, 73, 0.44);
  background: linear-gradient(180deg, rgba(232, 168, 73, 0.12) 0%, rgba(15, 15, 22, 0.92) 100%);
}

.em-gate-title {
  margin: 0 0 0.35rem 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.22rem;
  color: #f6e0b0;
}

.em-gate-copy {
  margin: 0 0 0.78rem 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 0.98rem;
  line-height: 1.48;
  color: #d8cfc0;
}

.em-gate-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.em-gate-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.62rem 0.78rem;
  border-radius: 7px;
  border: 1px solid rgba(212, 175, 106, 0.36);
  background: rgba(14, 15, 22, 0.9);
  color: #f2e7d0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.16s ease;
}

.em-gate-btn:hover {
  border-color: #e8a849;
  background: rgba(232, 168, 73, 0.16);
  transform: translateY(-1px);
}

.em-gate-btn.is-featured {
  border-color: #e8a849;
  background: linear-gradient(135deg, rgba(232, 168, 73, 0.26), rgba(186, 128, 44, 0.2));
  color: #fff2cf;
}

.em-gate-cost {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f4cb77;
  white-space: nowrap;
}

/* Composer Footer (2027 Unified Auto-Growing Chat Shell) */
.em-composer {
  padding: 0.72rem 0.85rem 0.85rem;
  border-top: 1px solid rgba(232, 168, 73, 0.22);
  background: linear-gradient(180deg, rgba(14, 14, 21, 0.96) 0%, rgba(9, 10, 15, 0.99) 100%);
  flex-shrink: 0;
}

.em-composer-shell {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.52rem 0.52rem 0.52rem 0.88rem;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 106, 0.34);
  background: rgba(22, 23, 33, 0.94);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.em-composer-shell:focus-within {
  border-color: #e8a849;
  background: rgba(26, 27, 38, 0.98);
  box-shadow: 0 0 0 3px rgba(232, 168, 73, 0.14), inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.em-input {
  flex: 1;
  resize: none;
  min-height: 24px;
  max-height: 140px;
  padding: 0.34rem 0;
  margin: 0;
  border: none;
  background: transparent;
  color: #f6efe0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.86rem;
  line-height: 1.5;
  overflow-y: hidden;
  box-sizing: border-box;
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 106, 0.35) transparent;
}

.em-input::placeholder {
  color: #9e9482;
}

.em-send-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(232, 168, 73, 0.75);
  background: linear-gradient(135deg, #ebb85e, #bf8028);
  color: #131117;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(232, 168, 73, 0.24);
  transition: filter 0.2s ease, opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.em-send-btn:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 16px rgba(232, 168, 73, 0.38);
}

.em-send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ============================================================================
   EMBERS TREASURY MODAL (4 Bundles)
   ============================================================================ */
.em-treasury-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(5, 6, 10, 0.78);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.em-treasury-overlay.is-open {
  display: flex;
}

.em-treasury-card {
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 106, 0.42);
  background: linear-gradient(180deg, #16151e 0%, #0d0e14 100%);
  padding: 1.65rem 1.85rem;
  color: #e8e1d4;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.85);
}

.em-treasury-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.em-treasury-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin: 1rem 0 1.15rem;
}

@media (max-width: 560px) {
  .em-treasury-grid {
    grid-template-columns: 1fr;
  }
}

.em-bundle-card {
  position: relative;
  border-radius: 9px;
  border: 1px solid rgba(212, 175, 106, 0.28);
  background: rgba(20, 21, 30, 0.86);
  padding: 1.05rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.em-bundle-card.is-popular {
  border-color: #e8a849;
  background: linear-gradient(180deg, rgba(232, 168, 73, 0.14) 0%, rgba(20, 21, 30, 0.92) 100%);
}

.em-bundle-tag {
  position: absolute;
  top: -10px;
  right: 12px;
  background: #e8a849;
  color: #131117;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
}

.em-bundle-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.24rem;
  font-weight: 600;
  color: #f4dfb2;
}

.em-bundle-amount {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #e8a849;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.em-bundle-price {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: #fff6e0;
  margin-top: 0.15rem;
}

.em-bundle-note {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.68rem;
  color: #a99f8c;
  margin-bottom: 0.5rem;
}

.em-bundle-btn {
  margin-top: auto;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 106, 0.44);
  background: rgba(232, 168, 73, 0.12);
  color: #f6e2b6;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.em-bundle-btn:hover {
  background: rgba(232, 168, 73, 0.26);
  border-color: #e8a849;
}

.em-treasury-msg {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.76rem;
  line-height: 1.5;
  color: #d9cfb9;
  background: rgba(232, 168, 73, 0.08);
  border: 1px solid rgba(212, 175, 106, 0.26);
  border-radius: 8px;
  padding: 0.72rem 0.9rem;
}

/* Floating Scroll Share Pill (upper-right beside reading column on desktop with warm amber aura, docked beside Ember Mystic bar on mobile) */
@keyframes aeShareAmberGlow {
  0%, 100% {
    box-shadow:
      0 10px 26px rgba(0, 0, 0, 0.72),
      0 0 18px rgba(232, 168, 73, 0.32),
      0 0 36px rgba(232, 149, 45, 0.14),
      inset 0 1px 0 rgba(255, 228, 163, 0.25);
  }
  50% {
    box-shadow:
      0 12px 30px rgba(0, 0, 0, 0.78),
      0 0 26px rgba(232, 168, 73, 0.58),
      0 0 48px rgba(232, 149, 45, 0.26),
      inset 0 1px 0 rgba(255, 228, 163, 0.42);
  }
}

#floating-share-btn {
  position: fixed;
  top: 80px;
  left: min(calc(50% + 556px), calc(100vw - 188px));
  right: auto;
  bottom: auto;
  z-index: 945;
  height: 44px;
  padding: 0 1.05rem;
  border-radius: 999px;
  border: 1.5px solid rgba(232, 184, 88, 0.9);
  background: linear-gradient(135deg, rgba(30, 22, 16, 0.95), rgba(14, 15, 22, 0.97));
  color: #f8dfa2;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.52rem;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: aeShareAmberGlow 3.6s ease-in-out infinite;
  transition: transform 0.18s ease, border-color 0.2s ease, background 0.2s ease;
}

#floating-share-btn:hover {
  transform: translateY(-2px);
  border-color: #ffe4a3;
  background: linear-gradient(135deg, rgba(42, 30, 18, 0.97), rgba(18, 18, 26, 0.98));
}

#floating-share-btn:active {
  transform: scale(0.95);
}

#floating-share-btn .floating-share-label {
  display: inline;
}

@media (max-width: 768px) {
  #floating-share-btn {
    top: auto;
    left: auto;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 14px;
  }

  #floating-share-btn .floating-share-label {
    display: none;
  }
}
