/* Mochi 3D polish: existing UI only. No new features. Never transform layout ancestors of fixed/sticky UI. */
:root {
  --depth-ease: cubic-bezier(.22, .8, .28, 1);
  --depth-shadow: 0 16px 36px rgba(10, 16, 32, .18), inset 0 1px rgba(255,255,255,.12);
  --depth-lift: 0 22px 44px rgba(10, 16, 32, .22), inset 0 1px rgba(255,255,255,.16);
  --depth-press: 0 6px 14px rgba(10, 16, 32, .14), inset 0 1px rgba(255,255,255,.08);
  --depth-wait: 0 24px 52px rgba(8, 14, 30, .24), inset 0 1px rgba(255,255,255,.14);
}

.podium,
.commands-panel,
.chat,
.composer,
.home-card,
.wait-shell,
.wait-progress,
.wait-activity,
.workflow-card,
.experience-card,
.premium-plan,
.profile-summary,
.progress-card,
.achievement-item,
.mission-card,
.result-card,
.activity-card,
.wait-activity-card,
.short-wait-card,
.docs-grid article,
.task-pick,
.confirm-modal,
.attach-menu,
.toast,
.support-x-link,
.xp-hero,
.leaderboard-mini {
  box-shadow: var(--depth-shadow);
  transition: box-shadow .2s var(--depth-ease), border-color .2s ease, background-color .2s ease;
}

.composer {
  position: relative;
  z-index: 2;
  box-shadow: 0 20px 40px rgba(10, 16, 32, .20), inset 0 1px rgba(255,255,255,.14);
}

.chat {
  box-shadow: var(--depth-shadow), inset 0 1px rgba(255,255,255,.10);
}

.wait-shell,
.short-wait-card {
  transform: translateZ(0);
}

.bubble {
  box-shadow: 0 10px 22px rgba(10, 16, 32, .12), inset 0 1px rgba(255,255,255,.10);
}

.podium {
  perspective: 860px;
  overflow: visible;
}
.mochi { transform-style: preserve-3d; }
.mochi-body { transform: translateZ(10px); }
.mochi-shadow {
  filter: blur(1px);
  opacity: .85;
}

.wait-shell,
.short-wait-card,
.wait-progress,
.wait-activity,
.activity-card,
.workflow-card {
  box-shadow: var(--depth-wait);
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.06), transparent 38%),
    linear-gradient(90deg, transparent, rgba(255,255,255,.03), transparent);
}

.wait-head,
.hub-label,
.stage-label {
  text-shadow: 0 8px 18px rgba(8, 14, 30, .18);
}

.bar,
.progress-track,
.short-wait-progress-bar {
  box-shadow: inset 0 1px 2px rgba(8, 14, 30, .22), 0 8px 16px rgba(8, 14, 30, .10);
}

#progress-fill,
#profile-progress-fill,
#short-wait-progress-fill,
#xp-rewards-progress {
  box-shadow: 0 6px 14px rgba(101, 224, 192, .22);
}

.topbar {
  box-shadow: 0 10px 28px rgba(10, 16, 32, .12);
}

.btn,
.icon-attach,
.mic-button,
#send-btn {
  transition: box-shadow .16s var(--depth-ease), transform .16s var(--depth-ease), background-color .16s ease, border-color .16s ease;
}

@media (hover: hover) and (pointer: fine) {
  .experience-card:hover,
  .premium-plan:hover,
  .docs-grid article:hover,
  .task-pick:hover,
  .achievement-item:hover,
  .mission-card:hover,
  .result-card:hover,
  .activity-card:hover,
  .wait-activity-card:hover,
  .profile-summary:hover,
  .support-x-link:hover,
  .workflow-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--depth-lift);
  }
  .history-list li:not(.empty-cmd):hover {
    transform: translateY(-1px);
    box-shadow: var(--depth-lift);
  }
  .btn:not(:disabled):hover,
  .icon-attach:hover,
  .mic-button:hover,
  #send-btn:not(:disabled):hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 12px 22px rgba(10, 16, 32, .16);
  }
}

.btn:not(:disabled):active,
.icon-attach:active,
.mic-button:active,
#send-btn:not(:disabled):active,
.task-pick:active,
.experience-card:active,
.support-x-link:active,
.activity-card:active {
  transform: translateY(1px) scale(.985);
  box-shadow: var(--depth-press);
}

input:focus,
textarea:focus,
select:focus {
  transform: none;
}

body.mobile-keyboard-open .podium,
body.mobile-keyboard-open .companion,
body.mobile-keyboard-open .mochi,
body.mobile-keyboard-open .mochi-body,
body.mobile-keyboard-open .chat,
body.mobile-keyboard-open .composer,
body.mobile-keyboard-open .messages,
body.mobile-keyboard-open .topbar {
  transform: none !important;
  animation: none !important;
  filter: none;
}

@media (max-width: 767px) {
  .experience-card,
  .premium-plan,
  .docs-grid article,
  .task-pick,
  .achievement-item,
  .mission-card,
  .result-card,
  .activity-card,
  .wait-activity-card,
  .profile-summary,
  .history-list li,
  .support-x-link,
  .workflow-card {
    transform: none !important;
  }
  .mochi-body { transform: none; }
  .podium,
  .commands-panel,
  .chat,
  .home-card,
  .wait-shell,
  .composer,
  .wait-progress,
  .wait-activity,
  .short-wait-card {
    box-shadow: 0 10px 22px rgba(10, 16, 32, .12);
    background-image: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .podium,
  .commands-panel,
  .chat,
  .composer,
  .home-card,
  .wait-shell,
  .wait-progress,
  .wait-activity,
  .workflow-card,
  .experience-card,
  .premium-plan,
  .profile-summary,
  .achievement-item,
  .mission-card,
  .result-card,
  .activity-card,
  .wait-activity-card,
  .docs-grid article,
  .task-pick,
  .history-list li,
  .mochi,
  .mochi-body,
  .btn,
  .icon-attach,
  .mic-button,
  #send-btn,
  .support-x-link,
  .confirm-modal,
  .attach-menu,
  .toast {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }
}
